tf-checkout-react 1.0.84 → 1.0.88
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/billing-info-container/index.d.ts +4 -1
- package/dist/components/paymentContainer/index.d.ts +4 -2
- package/dist/components/ticketsContainer/index.d.ts +2 -1
- package/dist/components/timerWidget/index.d.ts +15 -0
- package/dist/tf-checkout-react.cjs.development.js +226 -87
- package/dist/tf-checkout-react.cjs.development.js.map +1 -1
- package/dist/tf-checkout-react.cjs.production.min.js +1 -1
- package/dist/tf-checkout-react.cjs.production.min.js.map +1 -1
- package/dist/tf-checkout-react.esm.js +228 -89
- package/dist/tf-checkout-react.esm.js.map +1 -1
- package/dist/tf-checkout-styles.css +1 -1
- package/dist/utils/showZero.d.ts +1 -0
- package/package.json +2 -1
- package/src/api/index.ts +4 -5
- package/src/components/billing-info-container/index.tsx +105 -102
- package/src/components/common/CustomField.tsx +15 -12
- package/src/components/paymentContainer/index.tsx +30 -10
- package/src/components/ticketsContainer/index.tsx +17 -9
- package/src/components/ticketsContainer/style.css +5 -0
- package/src/components/timerWidget/index.tsx +70 -0
- package/src/components/timerWidget/style.css +26 -0
- package/src/components/waitingList/index.tsx +12 -6
- package/src/utils/showZero.tsx +10 -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}.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}
|
|
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{border:none;font-size:18px;margin-top:5px;outline:none;width:100%}.timer,.zip_element input{background-color:#000;color:#fff}.timer{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAGwSURBVEhLtZa9SgNBEMc9sUxxRcoUKSzSWIhXpFMhhYWFhaBg4yPYiWCXZxBLERsLRS3EQkEfwCKdjWJAwSKCgoKCcudv4O5YLrt7EzgXhiU3/4+b2ckmwVjJSpKkQ6wAi4gwhT+z3wRBcEz0yjSseUTrcRyfsHsXmD0AmbHOC9Ii8VImnuXBPglHpQ5wwSVM7sNnTG7Za4JwDdCjxyAiH3nyA2mtaTJufiDZ5dCaqlItILh1NHatfN5skvjx9Z38m69CgzuXmZgVrPIGE763Jx9qKsRozWYw6xOHdER+nn2KkO+Bb+UV5CBN6WC6QtBgbRVozrahAbmm6HtUsgtPC19tFdxXZYBOfkbmFJ1VaHA1VAHjd0pp70oTZzvR+EVrx2Ygfdsq6eu55BHYR8hlcki+n+kERUFG8BrA0BwjeAv2M8WLQBtcy+SD6fNsmnB3AlBLrgTtVW1c2QN4bVWLATaIS60J2Du5y1TiJgjSBvFVZgTmwCU+dAZFoPxGEEs8nyHC9Bwe2GvEJv2WXZb0vjdyFT4Cxk3e/kIqlOGoVLwwPevpYHT+00T+hWwXDf4AJAOUqWcDhbwAAAAASUVORK5CYII=);background-position:15px;background-repeat:no-repeat;-moz-border-radius:3px;-webkit-border-radius:3px;border-radius:3px;-moz-box-shadow:0 0 12px #999;-webkit-box-shadow:0 0 12px #999;box-shadow:0 0 12px #999;margin:0 0 6px;max-width:300px;overflow:hidden;padding:15px 15px 15px 50px;pointer-events:auto;position:absolute;right:15px;width:300px}.timer .countdown{font-weight:700;margin-top:10px}.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}.event-closed-message{font-family:Bebas Neue;letter-spacing:.5px}.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 @@
|
|
|
1
|
+
export declare const showZero: (value?: number) => string | number | null;
|
package/package.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"version": "1.0.
|
|
2
|
+
"version": "1.0.88",
|
|
3
3
|
"license": "MIT",
|
|
4
4
|
"main": "dist/index.js",
|
|
5
5
|
"typings": "dist/index.d.ts",
|
|
@@ -81,6 +81,7 @@
|
|
|
81
81
|
"nanoid": "^3.1.30",
|
|
82
82
|
"prop-types": "^15.7.2",
|
|
83
83
|
"react-bootstrap": "^2.0.2",
|
|
84
|
+
"react-countdown": "^2.3.2",
|
|
84
85
|
"react-inlinesvg": "^2.3.0",
|
|
85
86
|
"react-share": "^4.4.0"
|
|
86
87
|
}
|
package/src/api/index.ts
CHANGED
|
@@ -33,6 +33,10 @@ publicRequest.interceptors.response.use(
|
|
|
33
33
|
window.localStorage.removeItem('auth_guest_token')
|
|
34
34
|
window.localStorage.removeItem('user_data')
|
|
35
35
|
window.localStorage.removeItem('access_token')
|
|
36
|
+
const errorType = error?.response?.data?.error
|
|
37
|
+
if (errorType === 'invalid_token') {
|
|
38
|
+
window.location.href = '/'
|
|
39
|
+
}
|
|
36
40
|
}
|
|
37
41
|
}
|
|
38
42
|
return Promise.reject(error)
|
|
@@ -224,11 +228,6 @@ export const getProfileData = (accessToken: any) =>
|
|
|
224
228
|
},
|
|
225
229
|
})
|
|
226
230
|
.catch((e: any) => {
|
|
227
|
-
const errorType = e?.response?.data?.error
|
|
228
|
-
if (isWindowDefined) {
|
|
229
|
-
const event = new window.CustomEvent('auth_error', { detail: errorType })
|
|
230
|
-
window.document.dispatchEvent(event)
|
|
231
|
-
}
|
|
232
231
|
return e
|
|
233
232
|
})
|
|
234
233
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import React, { FC, useEffect, useState,
|
|
1
|
+
import React, { FC, useEffect, useState, useRef } from 'react'
|
|
2
2
|
import { AxiosError } from 'axios'
|
|
3
3
|
import {
|
|
4
4
|
Field,
|
|
@@ -14,6 +14,7 @@ import _map from 'lodash/map'
|
|
|
14
14
|
import _get from 'lodash/get'
|
|
15
15
|
import _includes from 'lodash/includes'
|
|
16
16
|
import _isEqual from 'lodash/isEqual'
|
|
17
|
+
import _isEmpty from 'lodash/isEmpty'
|
|
17
18
|
|
|
18
19
|
import './style.css'
|
|
19
20
|
import { combineValidators, requiredValidator } from '../../validators'
|
|
@@ -39,6 +40,7 @@ import {
|
|
|
39
40
|
getValidateFunctions,
|
|
40
41
|
setLoggedUserData,
|
|
41
42
|
} from './utils'
|
|
43
|
+
import { createCheckoutDataBodyWithDefaultHolder } from '../../utils'
|
|
42
44
|
import { CustomField } from '../common/CustomField'
|
|
43
45
|
import axios from 'axios'
|
|
44
46
|
import { CheckboxField } from '../common/CheckboxField'
|
|
@@ -50,6 +52,7 @@ import { ErrorFocus } from '../../utils/formikErrorFocus'
|
|
|
50
52
|
import { FormikPhoneNumberField } from '../common/FormikPhoneNumberField'
|
|
51
53
|
import { ThemeProvider, createTheme } from '@mui/material/styles'
|
|
52
54
|
import { CSSProperties } from '@mui/styles'
|
|
55
|
+
import Backdrop from '@mui/material/Backdrop'
|
|
53
56
|
|
|
54
57
|
export interface IBillingInfoPage {
|
|
55
58
|
data?: IBillingInfoData[];
|
|
@@ -60,47 +63,38 @@ export interface IBillingInfoPage {
|
|
|
60
63
|
eventId: any,
|
|
61
64
|
res: any
|
|
62
65
|
) => void;
|
|
63
|
-
|
|
64
66
|
onRegisterSuccess?: (value: {
|
|
65
67
|
accessToken: string;
|
|
66
68
|
refreshToken: string;
|
|
67
69
|
}) => void;
|
|
68
|
-
|
|
69
70
|
onRegisterError?: (e: AxiosError, email: string) => void;
|
|
70
|
-
|
|
71
71
|
onSubmitError?: (e: AxiosError) => void;
|
|
72
|
-
|
|
73
72
|
onGetCartSuccess?: (res: any) => void;
|
|
74
|
-
|
|
75
73
|
onGetCartError?: (e: AxiosError) => void;
|
|
76
|
-
|
|
77
74
|
onGetCountriesSuccess?: (res: any) => void;
|
|
78
|
-
|
|
79
75
|
onGetCountriesError?: (e: AxiosError) => void;
|
|
80
|
-
|
|
81
76
|
onGetStatesSuccess?: (res: any) => void;
|
|
82
|
-
|
|
83
77
|
onGetStatesError?: (e: AxiosError) => void;
|
|
84
|
-
|
|
85
78
|
onGetProfileDataSuccess?: (res: any) => void;
|
|
86
|
-
|
|
87
79
|
onGetProfileDataError?: (e: AxiosError) => void;
|
|
88
|
-
|
|
89
80
|
onAuthorizeSuccess?: () => void;
|
|
90
|
-
|
|
91
81
|
onAuthorizeError?: (e: AxiosError) => void;
|
|
92
|
-
|
|
93
82
|
onLogin?: () => void;
|
|
94
83
|
onLoginSuccess?: () => void;
|
|
95
84
|
onErrorClose?: () => void;
|
|
96
|
-
|
|
97
85
|
initialValues?: FormikValues;
|
|
98
86
|
buttonName?: string;
|
|
99
87
|
theme?: 'light' | 'dark';
|
|
100
88
|
isLoggedIn?: boolean;
|
|
101
89
|
accountInfoTitle?: string | JSX.Element;
|
|
102
90
|
hideLogo?: boolean;
|
|
103
|
-
themeOptions?: ThemeOptions & {
|
|
91
|
+
themeOptions?: ThemeOptions & {
|
|
92
|
+
input?: CSSProperties;
|
|
93
|
+
checkbox?: CSSProperties;
|
|
94
|
+
};
|
|
95
|
+
hideErrorsAlertSection?: boolean;
|
|
96
|
+
onSkipBillingPage: (data: any) => void;
|
|
97
|
+
skipPage?: boolean;
|
|
104
98
|
}
|
|
105
99
|
|
|
106
100
|
const LogicRunner: FC<{
|
|
@@ -118,7 +112,7 @@ const LogicRunner: FC<{
|
|
|
118
112
|
setValues,
|
|
119
113
|
setUserValues,
|
|
120
114
|
onGetStatesSuccess,
|
|
121
|
-
onGetStatesError
|
|
115
|
+
onGetStatesError,
|
|
122
116
|
}) => {
|
|
123
117
|
const prevCountry = useRef(values.country)
|
|
124
118
|
useEffect(() => {
|
|
@@ -162,7 +156,7 @@ const LogicRunner: FC<{
|
|
|
162
156
|
confirmEmail: parsedData?.email || '',
|
|
163
157
|
state: parsedData?.state || '',
|
|
164
158
|
street_address: parsedData?.street_address || '',
|
|
165
|
-
country: parsedData?.country ||
|
|
159
|
+
country: parsedData?.country || '1',
|
|
166
160
|
zip: parsedData?.zip || '',
|
|
167
161
|
brand_opt_in: parsedData?.brand_opt_in || '',
|
|
168
162
|
city: parsedData?.city || '',
|
|
@@ -180,10 +174,8 @@ const LogicRunner: FC<{
|
|
|
180
174
|
}
|
|
181
175
|
getStoredUserData()
|
|
182
176
|
}, [userDataEncoded, setValues, setUserValues])
|
|
183
|
-
|
|
184
177
|
return null
|
|
185
178
|
}
|
|
186
|
-
|
|
187
179
|
export const BillingInfoContainer = ({
|
|
188
180
|
data = [],
|
|
189
181
|
ticketHoldersFields = {
|
|
@@ -213,7 +205,10 @@ export const BillingInfoContainer = ({
|
|
|
213
205
|
accountInfoTitle = '',
|
|
214
206
|
hideLogo,
|
|
215
207
|
themeOptions,
|
|
216
|
-
onErrorClose = () => {}
|
|
208
|
+
onErrorClose = () => {},
|
|
209
|
+
hideErrorsAlertSection = false,
|
|
210
|
+
onSkipBillingPage = () => {},
|
|
211
|
+
skipPage = false,
|
|
217
212
|
}: IBillingInfoPage) => {
|
|
218
213
|
const themeMui = createTheme(themeOptions)
|
|
219
214
|
const isWindowDefined = typeof window !== 'undefined'
|
|
@@ -225,11 +220,9 @@ export const BillingInfoContainer = ({
|
|
|
225
220
|
isWindowDefined && window.localStorage.getItem('access_token')
|
|
226
221
|
? window.localStorage.getItem('access_token') || ''
|
|
227
222
|
: ''
|
|
228
|
-
|
|
229
223
|
const [dataWithUniqueIds, setDataWithUniqueIds] = useState<
|
|
230
224
|
IBillingInfoData[]
|
|
231
225
|
>(data)
|
|
232
|
-
|
|
233
226
|
const [isLoggedIn, setIsLoggedIn] = useState(!!access_token)
|
|
234
227
|
const [cartInfoData, setCartInfo] = useState<any>({})
|
|
235
228
|
const [countries, setCountries] = useState<any>([])
|
|
@@ -254,6 +247,7 @@ export const BillingInfoContainer = ({
|
|
|
254
247
|
state: '',
|
|
255
248
|
zip: '',
|
|
256
249
|
})
|
|
250
|
+
const [loading, setLoading] = useState(true)
|
|
257
251
|
const [error, setError] = useState(null)
|
|
258
252
|
const emailLogged =
|
|
259
253
|
_get(userData, 'email', '') || _get(userValues, 'email', '')
|
|
@@ -261,16 +255,15 @@ export const BillingInfoContainer = ({
|
|
|
261
255
|
_get(userData, 'first_name', '') || _get(userValues, 'first_name', '')
|
|
262
256
|
const lastNameLogged =
|
|
263
257
|
_get(userData, 'last_name', '') || _get(userValues, 'last_name', '')
|
|
264
|
-
|
|
265
258
|
const showDOB = getQueryVariable('age_required') === 'true'
|
|
266
259
|
const eventId = getQueryVariable('event_id')
|
|
267
260
|
const optedInFieldValue: boolean = _get(cartInfoData, 'optedIn', false)
|
|
268
|
-
const ttfOptIn: boolean = _get(cartInfoData, 'ttfOptIn', false)
|
|
261
|
+
const ttfOptIn: boolean = Boolean(_get(cartInfoData, 'ttfOptIn', false))
|
|
269
262
|
const hideTtfOptIn: boolean = _get(cartInfoData, 'hide_ttf_opt_in', true)
|
|
270
263
|
|
|
271
264
|
// Get prevProps
|
|
272
265
|
const prevData = useRef(data)
|
|
273
|
-
|
|
266
|
+
|
|
274
267
|
useEffect(() => {
|
|
275
268
|
const hasUniqueId = _get(dataWithUniqueIds, '[0].uniqueId')
|
|
276
269
|
const isEqualData = _isEqual(prevData.current, data)
|
|
@@ -281,7 +274,7 @@ export const BillingInfoContainer = ({
|
|
|
281
274
|
}
|
|
282
275
|
}
|
|
283
276
|
}, [dataWithUniqueIds, data])
|
|
284
|
-
|
|
277
|
+
|
|
285
278
|
const getQuantity = (cart: any = []) => {
|
|
286
279
|
let qty: any = 0
|
|
287
280
|
cart.forEach((item: any) => {
|
|
@@ -290,28 +283,11 @@ export const BillingInfoContainer = ({
|
|
|
290
283
|
return qty
|
|
291
284
|
}
|
|
292
285
|
|
|
293
|
-
const handleAuthErrors = useCallback((e) => {
|
|
294
|
-
setIsLoggedIn(false)
|
|
295
|
-
if (isWindowDefined && e?.detail === 'invalid_token') {
|
|
296
|
-
window.location.href = '/'
|
|
297
|
-
}
|
|
298
|
-
}, [])
|
|
299
|
-
|
|
300
|
-
useEffect(() => {
|
|
301
|
-
isWindowDefined &&
|
|
302
|
-
window.document.addEventListener('auth_error', handleAuthErrors)
|
|
303
|
-
return () => {
|
|
304
|
-
isWindowDefined &&
|
|
305
|
-
window.document.removeEventListener('auth_error', handleAuthErrors)
|
|
306
|
-
}
|
|
307
|
-
}, [handleAuthErrors])
|
|
308
|
-
|
|
309
286
|
useEffect(() => {
|
|
310
287
|
if ((pIsLoggedIn || access_token) && !isLoggedIn) {
|
|
311
288
|
setIsLoggedIn(true)
|
|
312
289
|
}
|
|
313
290
|
}, [pIsLoggedIn, isLoggedIn, access_token])
|
|
314
|
-
|
|
315
291
|
//just once
|
|
316
292
|
useEffect(() => {
|
|
317
293
|
// fetch countries data
|
|
@@ -335,7 +311,6 @@ export const BillingInfoContainer = ({
|
|
|
335
311
|
fetchCountries()
|
|
336
312
|
fetchCart()
|
|
337
313
|
}, [])
|
|
338
|
-
|
|
339
314
|
// fetch cart data
|
|
340
315
|
const fetchCart = async () => {
|
|
341
316
|
try {
|
|
@@ -354,7 +329,6 @@ export const BillingInfoContainer = ({
|
|
|
354
329
|
}
|
|
355
330
|
}
|
|
356
331
|
}
|
|
357
|
-
|
|
358
332
|
// fetch user data
|
|
359
333
|
const fetchUserData = async (token: string) => {
|
|
360
334
|
try {
|
|
@@ -362,7 +336,11 @@ export const BillingInfoContainer = ({
|
|
|
362
336
|
const userDataResponse = await getProfileData(token)
|
|
363
337
|
const profileSpecifiedData = _get(userDataResponse, 'data.data')
|
|
364
338
|
const profileDataObj = setLoggedUserData(profileSpecifiedData)
|
|
365
|
-
setUserValues({
|
|
339
|
+
setUserValues({
|
|
340
|
+
...profileDataObj,
|
|
341
|
+
firstName: profileDataObj.first_name,
|
|
342
|
+
lastName: profileDataObj.last_name,
|
|
343
|
+
})
|
|
366
344
|
window.localStorage.setItem(
|
|
367
345
|
'user_data',
|
|
368
346
|
JSON.stringify(profileDataObj)
|
|
@@ -375,11 +353,42 @@ export const BillingInfoContainer = ({
|
|
|
375
353
|
}
|
|
376
354
|
}
|
|
377
355
|
}
|
|
378
|
-
|
|
379
356
|
useEffect(() => {
|
|
380
357
|
fetchUserData(access_token)
|
|
381
358
|
}, [access_token])
|
|
382
359
|
|
|
360
|
+
useEffect(() => {
|
|
361
|
+
const collectPaymentData = async () => {
|
|
362
|
+
if (skipPage && !_isEmpty(ticketsQuantity)) {
|
|
363
|
+
setLoading(true)
|
|
364
|
+
const checkoutBody = createCheckoutDataBodyWithDefaultHolder(
|
|
365
|
+
ticketsQuantity.length,
|
|
366
|
+
userData
|
|
367
|
+
)
|
|
368
|
+
|
|
369
|
+
try {
|
|
370
|
+
const res = await postOnCheckout(checkoutBody, access_token)
|
|
371
|
+
onSkipBillingPage(_get(res, 'data.data.attributes'))
|
|
372
|
+
setLoading(false)
|
|
373
|
+
} catch (e) {
|
|
374
|
+
onSubmitError(e)
|
|
375
|
+
}
|
|
376
|
+
} else {
|
|
377
|
+
setLoading(false)
|
|
378
|
+
}
|
|
379
|
+
}
|
|
380
|
+
collectPaymentData()
|
|
381
|
+
}, [skipPage, ticketsQuantity])
|
|
382
|
+
|
|
383
|
+
// Displaying loader
|
|
384
|
+
if (loading) {
|
|
385
|
+
return (
|
|
386
|
+
<Backdrop sx={{ color: '#fff' }} open={true}>
|
|
387
|
+
<CircularProgress color="inherit" />
|
|
388
|
+
</Backdrop>
|
|
389
|
+
)
|
|
390
|
+
}
|
|
391
|
+
|
|
383
392
|
return (
|
|
384
393
|
<ThemeProvider theme={themeMui}>
|
|
385
394
|
<Formik
|
|
@@ -387,8 +396,8 @@ export const BillingInfoContainer = ({
|
|
|
387
396
|
dataWithUniqueIds,
|
|
388
397
|
{
|
|
389
398
|
...initialValues,
|
|
390
|
-
country: _get(userData, 'country', '') ||
|
|
391
|
-
state: _get(userData, 'state', '') ||
|
|
399
|
+
country: _get(userData, 'country', '') || '1',
|
|
400
|
+
state: _get(userData, 'state', '') || '1',
|
|
392
401
|
brand_opt_in: optedInFieldValue,
|
|
393
402
|
ttf_opt_in: ttfOptIn,
|
|
394
403
|
},
|
|
@@ -425,7 +434,6 @@ export const BillingInfoContainer = ({
|
|
|
425
434
|
)
|
|
426
435
|
return
|
|
427
436
|
}
|
|
428
|
-
|
|
429
437
|
const checkoutBodyForRegistration = createCheckoutDataBody(
|
|
430
438
|
ticketsQuantity.length,
|
|
431
439
|
values,
|
|
@@ -436,7 +444,6 @@ export const BillingInfoContainer = ({
|
|
|
436
444
|
values,
|
|
437
445
|
checkoutBodyForRegistration
|
|
438
446
|
)
|
|
439
|
-
|
|
440
447
|
let access_token_register = null
|
|
441
448
|
try {
|
|
442
449
|
const resRegister = await register(bodyFormData)
|
|
@@ -449,12 +456,10 @@ export const BillingInfoContainer = ({
|
|
|
449
456
|
'data.data.attributes.refresh_token'
|
|
450
457
|
)
|
|
451
458
|
handleSetAccessToken(access_token_register)
|
|
452
|
-
|
|
453
459
|
const tokens = {
|
|
454
460
|
accessToken: access_token_register,
|
|
455
461
|
refreshToken,
|
|
456
462
|
}
|
|
457
|
-
|
|
458
463
|
onRegisterSuccess(tokens)
|
|
459
464
|
} catch (e) {
|
|
460
465
|
if (axios.isAxiosError(e)) {
|
|
@@ -462,7 +467,6 @@ export const BillingInfoContainer = ({
|
|
|
462
467
|
if (_includes(error, 'You must be aged')) {
|
|
463
468
|
formikHelpers.setFieldError('holderAge', error)
|
|
464
469
|
}
|
|
465
|
-
|
|
466
470
|
if (error?.password) {
|
|
467
471
|
formikHelpers.setFieldError('password', error.password)
|
|
468
472
|
formikHelpers.setFieldError(
|
|
@@ -470,7 +474,6 @@ export const BillingInfoContainer = ({
|
|
|
470
474
|
error.password
|
|
471
475
|
)
|
|
472
476
|
}
|
|
473
|
-
|
|
474
477
|
if (error?.email && !onLogin) {
|
|
475
478
|
// False will stand for outside controll
|
|
476
479
|
setAlreadyHasUser(true)
|
|
@@ -480,7 +483,6 @@ export const BillingInfoContainer = ({
|
|
|
480
483
|
}
|
|
481
484
|
return
|
|
482
485
|
}
|
|
483
|
-
|
|
484
486
|
const profileData = await getProfileData(access_token_register)
|
|
485
487
|
const profileSpecifiedData = _get(profileData, 'data.data')
|
|
486
488
|
const profileDataObj = setLoggedUserData(profileSpecifiedData)
|
|
@@ -490,7 +492,6 @@ export const BillingInfoContainer = ({
|
|
|
490
492
|
JSON.stringify(profileDataObj)
|
|
491
493
|
)
|
|
492
494
|
}
|
|
493
|
-
|
|
494
495
|
const checkoutBody = createCheckoutDataBody(
|
|
495
496
|
ticketsQuantity.length,
|
|
496
497
|
values,
|
|
@@ -542,7 +543,7 @@ export const BillingInfoContainer = ({
|
|
|
542
543
|
onGetStatesError={onGetStatesError}
|
|
543
544
|
/>
|
|
544
545
|
<div className={`billing-info-container ${theme}`}>
|
|
545
|
-
{error && (
|
|
546
|
+
{error && !hideErrorsAlertSection && (
|
|
546
547
|
<Alert severity="error" onClose={onErrorClose} variant="filled">
|
|
547
548
|
{error}
|
|
548
549
|
</Alert>
|
|
@@ -653,49 +654,51 @@ export const BillingInfoContainer = ({
|
|
|
653
654
|
</React.Fragment>
|
|
654
655
|
)
|
|
655
656
|
})}
|
|
656
|
-
|
|
657
|
-
<
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
<
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
<div
|
|
666
|
-
{
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
657
|
+
{!_isEmpty(ticketHoldersFields.fields) && (
|
|
658
|
+
<div className="ticket-holders-fields">
|
|
659
|
+
<p>{ticketHoldersFields.label}</p>
|
|
660
|
+
{_map(ticketsQuantity, (_item, index) => (
|
|
661
|
+
<div key={_item}>
|
|
662
|
+
<h5>Ticket {index + 1}</h5>
|
|
663
|
+
{_map(ticketHoldersFields.fields, group => {
|
|
664
|
+
const { groupClassname, groupItems } = group
|
|
665
|
+
return (
|
|
666
|
+
<div key={group.id}>
|
|
667
|
+
<div className={groupClassname}>
|
|
668
|
+
{_map(groupItems, element => (
|
|
669
|
+
<div
|
|
670
|
+
className={element.className}
|
|
671
|
+
key={element.name}
|
|
672
|
+
>
|
|
673
|
+
<Field
|
|
674
|
+
name={`${element.name}-${index}`}
|
|
675
|
+
label={element.label}
|
|
676
|
+
type={element.type}
|
|
677
|
+
required={true}
|
|
678
|
+
component={
|
|
679
|
+
element.type === 'checkbox'
|
|
680
|
+
? CheckboxField
|
|
681
|
+
: CustomField
|
|
682
|
+
}
|
|
683
|
+
validate={combineValidators(
|
|
684
|
+
element.required
|
|
685
|
+
? requiredValidator
|
|
686
|
+
: () => {},
|
|
687
|
+
element.onValidate
|
|
688
|
+
? element.onValidate
|
|
689
|
+
: () => {}
|
|
690
|
+
)}
|
|
691
|
+
/>
|
|
692
|
+
</div>
|
|
693
|
+
))}
|
|
694
|
+
</div>
|
|
692
695
|
</div>
|
|
693
|
-
|
|
694
|
-
)
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
|
|
696
|
+
)
|
|
697
|
+
})}
|
|
698
|
+
</div>
|
|
699
|
+
))}
|
|
700
|
+
</div>
|
|
701
|
+
)}
|
|
699
702
|
<div className="button-container">
|
|
700
703
|
<Button
|
|
701
704
|
type="submit"
|
|
@@ -59,23 +59,26 @@ export const CustomField = ({
|
|
|
59
59
|
className: theme,
|
|
60
60
|
MenuProps: { className: theme },
|
|
61
61
|
}}
|
|
62
|
-
InputLabelProps={{
|
|
62
|
+
InputLabelProps={{
|
|
63
|
+
sx: customTheme?.input,
|
|
64
|
+
shrink: field.name === 'holderAge' ? true : undefined,
|
|
65
|
+
}}
|
|
63
66
|
inputProps={{
|
|
64
|
-
sx: customTheme?.input
|
|
67
|
+
sx: customTheme?.input,
|
|
65
68
|
}}
|
|
66
69
|
{...field}
|
|
67
70
|
>
|
|
68
71
|
{isSelectField
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
72
|
+
? _map(selectOptions, option => (
|
|
73
|
+
<option
|
|
74
|
+
key={option.value}
|
|
75
|
+
value={option.value}
|
|
76
|
+
disabled={option.disabled}
|
|
77
|
+
>
|
|
78
|
+
{option.label}
|
|
79
|
+
</option>
|
|
80
|
+
))
|
|
81
|
+
: null}
|
|
79
82
|
</TextField>
|
|
80
83
|
)
|
|
81
84
|
}
|
|
@@ -4,7 +4,11 @@ import Container from '@mui/material/Container'
|
|
|
4
4
|
import CircularProgress from '@mui/material/CircularProgress'
|
|
5
5
|
import Alert from '@mui/material/Alert'
|
|
6
6
|
import { Elements } from '@stripe/react-stripe-js'
|
|
7
|
-
import {
|
|
7
|
+
import {
|
|
8
|
+
loadStripe,
|
|
9
|
+
StripeConstructorOptions,
|
|
10
|
+
StripeElementsOptions,
|
|
11
|
+
} from '@stripe/stripe-js'
|
|
8
12
|
import _map from 'lodash/map'
|
|
9
13
|
import _get from 'lodash/get'
|
|
10
14
|
import _identity from 'lodash/identity'
|
|
@@ -20,15 +24,14 @@ import { getPaymentData, handlePaymentSuccess, getConditions } from '../../api'
|
|
|
20
24
|
import { StripeCardNumberElementOptions } from '@stripe/stripe-js'
|
|
21
25
|
import { ThemeProvider, createTheme } from '@mui/material/styles'
|
|
22
26
|
import { ThemeOptions } from '@mui/material'
|
|
23
|
-
import { CSSProperties } from
|
|
27
|
+
import { CSSProperties } from '@mui/styles'
|
|
28
|
+
import TimerWidget from '../timerWidget'
|
|
24
29
|
|
|
25
30
|
const publishableKey = CONFIGS.STRIPE_PUBLISHABLE_KEY || ''
|
|
26
31
|
|
|
27
32
|
const getStripePromise = (reviewData: any) => {
|
|
28
|
-
const stripePublishableKey =
|
|
29
|
-
reviewData,
|
|
30
|
-
'payment_method.stripe_publishable_key'
|
|
31
|
-
) || publishableKey
|
|
33
|
+
const stripePublishableKey =
|
|
34
|
+
_get(reviewData, 'payment_method.stripe_publishable_key') || publishableKey
|
|
32
35
|
const stripeAccount = _get(
|
|
33
36
|
reviewData,
|
|
34
37
|
'payment_method.stripe_connected_account'
|
|
@@ -61,8 +64,13 @@ export interface IPaymentPage {
|
|
|
61
64
|
onPaymentError: (value: AxiosError) => void;
|
|
62
65
|
stripeCardOptions?: StripeCardNumberElementOptions;
|
|
63
66
|
disableZipSection: boolean;
|
|
64
|
-
themeOptions?: ThemeOptions & {
|
|
65
|
-
|
|
67
|
+
themeOptions?: ThemeOptions & {
|
|
68
|
+
input?: CSSProperties;
|
|
69
|
+
checkbox?: CSSProperties;
|
|
70
|
+
};
|
|
71
|
+
elementsOptions?: StripeElementsOptions;
|
|
72
|
+
onCountdownFinish?: () => void;
|
|
73
|
+
enableTimer?: boolean;
|
|
66
74
|
}
|
|
67
75
|
|
|
68
76
|
const initialOrderValues: IOrderData = {
|
|
@@ -96,7 +104,9 @@ export const PaymentContainer = ({
|
|
|
96
104
|
stripeCardOptions = {},
|
|
97
105
|
disableZipSection = false,
|
|
98
106
|
themeOptions,
|
|
99
|
-
elementsOptions
|
|
107
|
+
elementsOptions,
|
|
108
|
+
onCountdownFinish = () => {},
|
|
109
|
+
enableTimer = false,
|
|
100
110
|
}: IPaymentPage) => {
|
|
101
111
|
const [reviewData, setReviewData] = useState(initialReviewValues)
|
|
102
112
|
const [orderData, setOrderData] = useState(initialOrderValues)
|
|
@@ -193,6 +203,13 @@ export const PaymentContainer = ({
|
|
|
193
203
|
return (
|
|
194
204
|
<ThemeProvider theme={themeMui}>
|
|
195
205
|
<div className="payment_page">
|
|
206
|
+
{!paymentIsLoading && !error && enableTimer && (
|
|
207
|
+
<TimerWidget
|
|
208
|
+
expires_at={_get(reviewData, 'expires_at', 0)}
|
|
209
|
+
buyLoading={paymentIsLoading}
|
|
210
|
+
onCountdownFinish={onCountdownFinish}
|
|
211
|
+
/>
|
|
212
|
+
)}
|
|
196
213
|
{error && (
|
|
197
214
|
<Alert severity="error" onClose={onErrorClose} variant="filled">
|
|
198
215
|
{error}
|
|
@@ -229,7 +246,10 @@ export const PaymentContainer = ({
|
|
|
229
246
|
<p className="payment_info__error">{errorText}</p>
|
|
230
247
|
)}
|
|
231
248
|
<div>
|
|
232
|
-
<Elements
|
|
249
|
+
<Elements
|
|
250
|
+
stripe={getStripePromise(reviewData)}
|
|
251
|
+
options={elementsOptions}
|
|
252
|
+
>
|
|
233
253
|
<StripePayment
|
|
234
254
|
stripe_client_secret={_get(
|
|
235
255
|
reviewData,
|