tf-checkout-react 1.0.76 → 1.0.80
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/api/index.d.ts +1 -0
- package/dist/components/billing-info-container/index.d.ts +1 -1
- package/dist/components/common/FormikPhoneNumberField.d.ts +1 -1
- package/dist/components/countdown/index.d.ts +11 -0
- package/dist/components/orderDetailsContainer/ticketsTable.d.ts +13 -1
- package/dist/components/paymentContainer/index.d.ts +5 -2
- package/dist/components/ticketsContainer/PromoCodeSection.d.ts +2 -1
- package/dist/components/ticketsContainer/index.d.ts +9 -1
- package/dist/components/waitingList/index.d.ts +1 -2
- package/dist/tf-checkout-react.cjs.development.js +410 -154
- 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 +411 -155
- package/dist/tf-checkout-react.esm.js.map +1 -1
- package/dist/tf-checkout-styles.css +1 -1
- package/dist/utils/downloadPDF.d.ts +1 -0
- package/dist/utils/index.d.ts +1 -0
- package/package.json +2 -1
- package/src/api/index.ts +9 -0
- package/src/components/billing-info-container/index.tsx +1 -1
- package/src/components/common/CheckboxField.tsx +13 -9
- package/src/components/common/CustomField.tsx +2 -2
- package/src/components/common/FormikPhoneNumberField.tsx +4 -3
- package/src/components/common/SelectField.tsx +2 -2
- package/src/components/countdown/index.tsx +89 -0
- package/src/components/countdown/style.css +10 -0
- package/src/components/loginModal/index.tsx +2 -0
- package/src/components/orderDetailsContainer/ticketsTable.tsx +66 -60
- package/src/components/paymentContainer/index.tsx +6 -3
- package/src/components/stripePayment/index.tsx +3 -3
- package/src/components/ticketsContainer/PromoCodeSection.tsx +42 -33
- package/src/components/ticketsContainer/TicketsSection.tsx +10 -6
- package/src/components/ticketsContainer/index.tsx +188 -70
- package/src/components/ticketsContainer/style.css +7 -0
- package/src/components/waitingList/index.tsx +3 -9
- package/src/components/waitingList/style.css +4 -2
- package/src/utils/downloadPDF.tsx +22 -0
- package/src/utils/index.ts +2 -1
|
@@ -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 @@
|
|
|
1
|
+
export declare const downloadPDF: (pdfUrl: string) => void;
|
package/dist/utils/index.d.ts
CHANGED
|
@@ -1,4 +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';
|
|
4
5
|
export { createCheckoutDataBodyWithDefaultHolder } from './createCheckoutDataBodyWithDefaultHolder';
|
package/package.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"version": "1.0.
|
|
2
|
+
"version": "1.0.80",
|
|
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/`, {
|
|
@@ -47,7 +47,7 @@ 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/
|
|
50
|
+
import { CSSProperties } from '@mui/styles'
|
|
51
51
|
|
|
52
52
|
export interface IBillingInfoPage {
|
|
53
53
|
data?: IBillingInfoData[];
|
|
@@ -4,6 +4,7 @@ import FormControlLabel from '@mui/material/FormControlLabel'
|
|
|
4
4
|
import Checkbox from '@mui/material/Checkbox'
|
|
5
5
|
import { FieldInputProps } from 'formik'
|
|
6
6
|
import { useTheme } from '@mui/styles'
|
|
7
|
+
import { FormControl, FormHelperText } from '@mui/material'
|
|
7
8
|
|
|
8
9
|
export interface ICheckboxField {
|
|
9
10
|
label: string | number | JSX.Element;
|
|
@@ -24,14 +25,17 @@ export const CheckboxField = ({
|
|
|
24
25
|
}: ICheckboxField & IOtherProps) => {
|
|
25
26
|
const customTheme: any = useTheme()
|
|
26
27
|
return (
|
|
27
|
-
<
|
|
28
|
-
<
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
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>
|
|
36
40
|
)
|
|
37
41
|
}
|
|
@@ -59,9 +59,9 @@ export const CustomField = ({
|
|
|
59
59
|
className: theme,
|
|
60
60
|
MenuProps: { className: theme },
|
|
61
61
|
}}
|
|
62
|
-
InputLabelProps={{ sx: customTheme
|
|
62
|
+
InputLabelProps={{ sx: customTheme?.input }}
|
|
63
63
|
inputProps={{
|
|
64
|
-
sx: customTheme
|
|
64
|
+
sx: customTheme?.input
|
|
65
65
|
}}
|
|
66
66
|
{...field}
|
|
67
67
|
>
|
|
@@ -17,7 +17,7 @@ interface IOtherProps {
|
|
|
17
17
|
export const FormikPhoneNumberField = ({
|
|
18
18
|
label,
|
|
19
19
|
field,
|
|
20
|
-
form: { touched, errors },
|
|
20
|
+
form: { touched, errors, initialValues },
|
|
21
21
|
setFieldValue,
|
|
22
22
|
selectOptions,
|
|
23
23
|
...rest
|
|
@@ -30,6 +30,7 @@ export const FormikPhoneNumberField = ({
|
|
|
30
30
|
return (
|
|
31
31
|
<MuiPhoneNumber
|
|
32
32
|
name='phone'
|
|
33
|
+
value={initialValues.phone}
|
|
33
34
|
onChange={(e: any) => setFieldValue("phone", removePlusSign(e))}
|
|
34
35
|
variant="outlined"
|
|
35
36
|
defaultCountry='us'
|
|
@@ -39,10 +40,10 @@ export const FormikPhoneNumberField = ({
|
|
|
39
40
|
helperText={isTouched && error}
|
|
40
41
|
fullWidth
|
|
41
42
|
InputLabelProps={{
|
|
42
|
-
sx: customTheme
|
|
43
|
+
sx: customTheme?.input
|
|
43
44
|
}}
|
|
44
45
|
InputProps={{
|
|
45
|
-
sx: customTheme
|
|
46
|
+
sx: customTheme?.input
|
|
46
47
|
}}
|
|
47
48
|
autoFormat={false}
|
|
48
49
|
{...rest}
|
|
@@ -44,7 +44,7 @@ export const SelectField = ({
|
|
|
44
44
|
|
|
45
45
|
return (
|
|
46
46
|
<FormControl fullWidth={true}>
|
|
47
|
-
<InputLabel style={customTheme
|
|
47
|
+
<InputLabel style={customTheme?.input} htmlFor={field.name} error={!!error && isTouched} shrink={true}>
|
|
48
48
|
{label}
|
|
49
49
|
</InputLabel>
|
|
50
50
|
<Select
|
|
@@ -60,7 +60,7 @@ export const SelectField = ({
|
|
|
60
60
|
className={theme}
|
|
61
61
|
MenuProps={{ className: theme }}
|
|
62
62
|
{...field}
|
|
63
|
-
style={customTheme
|
|
63
|
+
style={customTheme?.input}
|
|
64
64
|
>
|
|
65
65
|
{_map(selectOptions, option => (
|
|
66
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
|
|
@@ -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) {
|
|
@@ -6,13 +6,14 @@ import TableContainer from '@mui/material/TableContainer'
|
|
|
6
6
|
import TableHead from '@mui/material/TableHead'
|
|
7
7
|
import TableRow from '@mui/material/TableRow'
|
|
8
8
|
import Paper from '@mui/material/Paper'
|
|
9
|
+
import { downloadPDF } from '../../utils'
|
|
9
10
|
|
|
10
|
-
interface
|
|
11
|
-
|
|
11
|
+
interface IAddOnTypes {
|
|
12
|
+
name: string;
|
|
13
|
+
status: string;
|
|
12
14
|
}
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
add_ons: any[];
|
|
15
|
+
interface ITicketTypes {
|
|
16
|
+
add_ons?: IAddOnTypes[];
|
|
16
17
|
hash: string;
|
|
17
18
|
ticket_type: string;
|
|
18
19
|
holder_name: string;
|
|
@@ -20,67 +21,72 @@ interface TicketTypes {
|
|
|
20
21
|
pdf_link: string;
|
|
21
22
|
}
|
|
22
23
|
|
|
23
|
-
interface
|
|
24
|
-
|
|
25
|
-
status: string;
|
|
24
|
+
interface TicketsTableTypes {
|
|
25
|
+
tickets: ITicketTypes[];
|
|
26
26
|
}
|
|
27
27
|
|
|
28
|
-
const TicketsTable = ({ tickets = [] }: TicketsTableTypes) =>
|
|
29
|
-
|
|
30
|
-
<
|
|
31
|
-
|
|
32
|
-
<
|
|
33
|
-
<
|
|
34
|
-
<
|
|
35
|
-
<
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
{
|
|
45
|
-
<
|
|
28
|
+
const TicketsTable = ({ tickets = [] }: TicketsTableTypes) => (
|
|
29
|
+
<div className="tickets-box">
|
|
30
|
+
<h4 className="sub-title">Your Tickets</h4>
|
|
31
|
+
<TableContainer component={Paper}>
|
|
32
|
+
<Table aria-label="collapsible table">
|
|
33
|
+
<TableHead>
|
|
34
|
+
<TableRow>
|
|
35
|
+
<TableCell>Ticket ID</TableCell>
|
|
36
|
+
<TableCell>Ticket Type</TableCell>
|
|
37
|
+
<TableCell>Ticket Holder Name</TableCell>
|
|
38
|
+
<TableCell>Status</TableCell>
|
|
39
|
+
<TableCell>Download</TableCell>
|
|
40
|
+
</TableRow>
|
|
41
|
+
</TableHead>
|
|
42
|
+
<TableBody>
|
|
43
|
+
{tickets.map((ticket: ITicketTypes, index: number) => (
|
|
44
|
+
<Fragment key={index}>
|
|
45
|
+
<TableRow>
|
|
46
|
+
<TableCell>{ticket.hash}</TableCell>
|
|
47
|
+
<TableCell>{ticket.ticket_type}</TableCell>
|
|
48
|
+
<TableCell>{ticket.holder_name}</TableCell>
|
|
49
|
+
<TableCell>{ticket.status}</TableCell>
|
|
50
|
+
<TableCell>
|
|
51
|
+
<span
|
|
52
|
+
aria-hidden={true}
|
|
53
|
+
className="download-button"
|
|
54
|
+
onClick={() => downloadPDF(ticket.pdf_link)}
|
|
55
|
+
>
|
|
56
|
+
Download
|
|
57
|
+
</span>
|
|
58
|
+
</TableCell>
|
|
59
|
+
</TableRow>
|
|
60
|
+
{!!ticket.add_ons?.length && (
|
|
46
61
|
<TableRow>
|
|
47
|
-
<TableCell
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
<Table className='ticket-add-on-table'>
|
|
59
|
-
<TableHead>
|
|
60
|
-
<TableRow>
|
|
61
|
-
<TableCell>Add-On</TableCell>
|
|
62
|
-
<TableCell>Status</TableCell>
|
|
63
|
-
</TableRow>
|
|
64
|
-
</TableHead>
|
|
65
|
-
<TableBody>
|
|
66
|
-
{ticket.add_ons.map((add_on: AddOnTypes, index: number) => (
|
|
62
|
+
<TableCell colSpan={5}>
|
|
63
|
+
<Table className="ticket-add-on-table">
|
|
64
|
+
<TableHead>
|
|
65
|
+
<TableRow>
|
|
66
|
+
<TableCell>Add-On</TableCell>
|
|
67
|
+
<TableCell>Status</TableCell>
|
|
68
|
+
</TableRow>
|
|
69
|
+
</TableHead>
|
|
70
|
+
<TableBody>
|
|
71
|
+
{ticket.add_ons.map(
|
|
72
|
+
(add_on: IAddOnTypes, index: number) => (
|
|
67
73
|
<TableRow key={index}>
|
|
68
74
|
<TableCell>{add_on.name}</TableCell>
|
|
69
75
|
<TableCell>{add_on.status}</TableCell>
|
|
70
76
|
</TableRow>
|
|
71
|
-
)
|
|
72
|
-
|
|
73
|
-
</
|
|
74
|
-
</
|
|
75
|
-
</
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
</
|
|
81
|
-
</
|
|
82
|
-
</
|
|
83
|
-
|
|
84
|
-
|
|
77
|
+
)
|
|
78
|
+
)}
|
|
79
|
+
</TableBody>
|
|
80
|
+
</Table>
|
|
81
|
+
</TableCell>
|
|
82
|
+
</TableRow>
|
|
83
|
+
)}
|
|
84
|
+
</Fragment>
|
|
85
|
+
))}
|
|
86
|
+
</TableBody>
|
|
87
|
+
</Table>
|
|
88
|
+
</TableContainer>
|
|
89
|
+
</div>
|
|
90
|
+
)
|
|
85
91
|
|
|
86
92
|
export default TicketsTable
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import React, {
|
|
1
|
+
import React, { useEffect, useState } from 'react'
|
|
2
2
|
import { AxiosError } from 'axios'
|
|
3
3
|
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 { loadStripe, StripeConstructorOptions } from '@stripe/stripe-js'
|
|
7
|
+
import { loadStripe, StripeConstructorOptions, StripeElementsOptions } from '@stripe/stripe-js'
|
|
8
8
|
import _map from 'lodash/map'
|
|
9
9
|
import _get from 'lodash/get'
|
|
10
10
|
import _identity from 'lodash/identity'
|
|
@@ -20,6 +20,7 @@ import { getPaymentData, handlePaymentSuccess, getConditions } from '../../api'
|
|
|
20
20
|
import { StripeCardNumberElementOptions } from '@stripe/stripe-js'
|
|
21
21
|
import { ThemeProvider, createTheme } from '@mui/material/styles'
|
|
22
22
|
import { ThemeOptions } from '@mui/material'
|
|
23
|
+
import { CSSProperties } from "@mui/styles"
|
|
23
24
|
|
|
24
25
|
const publishableKey = CONFIGS.STRIPE_PUBLISHABLE_KEY || ''
|
|
25
26
|
|
|
@@ -61,6 +62,7 @@ export interface IPaymentPage {
|
|
|
61
62
|
stripeCardOptions?: StripeCardNumberElementOptions;
|
|
62
63
|
disableZipSection: boolean;
|
|
63
64
|
themeOptions?: ThemeOptions & { input?: CSSProperties; checkbox?: CSSProperties };
|
|
65
|
+
elementsOptions?: StripeElementsOptions;
|
|
64
66
|
}
|
|
65
67
|
|
|
66
68
|
const initialOrderValues: IOrderData = {
|
|
@@ -94,6 +96,7 @@ export const PaymentContainer = ({
|
|
|
94
96
|
stripeCardOptions = {},
|
|
95
97
|
disableZipSection = false,
|
|
96
98
|
themeOptions,
|
|
99
|
+
elementsOptions
|
|
97
100
|
}: IPaymentPage) => {
|
|
98
101
|
const [reviewData, setReviewData] = useState(initialReviewValues)
|
|
99
102
|
const [orderData, setOrderData] = useState(initialOrderValues)
|
|
@@ -226,7 +229,7 @@ export const PaymentContainer = ({
|
|
|
226
229
|
<p className="payment_info__error">{errorText}</p>
|
|
227
230
|
)}
|
|
228
231
|
<div>
|
|
229
|
-
<Elements stripe={getStripePromise(reviewData)}>
|
|
232
|
+
<Elements stripe={getStripePromise(reviewData)} options={elementsOptions}>
|
|
230
233
|
<StripePayment
|
|
231
234
|
stripe_client_secret={_get(
|
|
232
235
|
reviewData,
|
|
@@ -191,7 +191,7 @@ const CheckoutForm = ({
|
|
|
191
191
|
<label className="card_number_element">
|
|
192
192
|
<span className="card_label_text">Card number</span>
|
|
193
193
|
<CardNumberElement
|
|
194
|
-
options={{ ...options
|
|
194
|
+
options={{ ...options, ...stripeCardOptions, }}
|
|
195
195
|
onReady={_identity}
|
|
196
196
|
onChange={_identity}
|
|
197
197
|
onBlur={_identity}
|
|
@@ -200,11 +200,11 @@ const CheckoutForm = ({
|
|
|
200
200
|
</label>
|
|
201
201
|
<label className="expiration_element">
|
|
202
202
|
<span className="card_label_text">Expiration date</span>
|
|
203
|
-
<CardExpiryElement options={{ ...options
|
|
203
|
+
<CardExpiryElement options={{ ...options, ...stripeCardOptions }} />
|
|
204
204
|
</label>
|
|
205
205
|
<label className="cvc_element">
|
|
206
206
|
<span className="card_label_text">CVC</span>
|
|
207
|
-
<CardCvcElement options={{ ...options
|
|
207
|
+
<CardCvcElement options={{ ...options, ...stripeCardOptions }} />
|
|
208
208
|
</label>
|
|
209
209
|
{!disableZipSection && (
|
|
210
210
|
<label className="zip_element">
|
|
@@ -9,7 +9,7 @@ export interface IPromoCodeSectionProps {
|
|
|
9
9
|
showPromoInput: boolean;
|
|
10
10
|
isPromotionsEnabled: boolean;
|
|
11
11
|
isAllTicketsSoldOut: boolean;
|
|
12
|
-
|
|
12
|
+
isAccessCodeEnabled?: boolean;
|
|
13
13
|
setPromoCode: (value: string) => void;
|
|
14
14
|
setPromoCodeUpdated: (value: string) => void;
|
|
15
15
|
setShowPromoInput: (value: boolean) => void;
|
|
@@ -20,12 +20,45 @@ export const PromoCodeSection = ({
|
|
|
20
20
|
promoCodeIsApplied,
|
|
21
21
|
showPromoInput,
|
|
22
22
|
isPromotionsEnabled,
|
|
23
|
-
isAllTicketsSoldOut,
|
|
24
23
|
setPromoCode,
|
|
25
24
|
setPromoCodeUpdated,
|
|
26
25
|
setShowPromoInput,
|
|
26
|
+
isAccessCodeEnabled,
|
|
27
27
|
}: IPromoCodeSectionProps) => {
|
|
28
28
|
|
|
29
|
+
const renderInputField = () => {
|
|
30
|
+
return (
|
|
31
|
+
<div className="promo-code-block">
|
|
32
|
+
<div className="promo-code-block">
|
|
33
|
+
<p className="promo-code-text">
|
|
34
|
+
{ isAccessCodeEnabled ? 'Access code required' : 'Promo code'}
|
|
35
|
+
</p>
|
|
36
|
+
|
|
37
|
+
</div>
|
|
38
|
+
<input
|
|
39
|
+
className="promo-code-input"
|
|
40
|
+
placeholder=""
|
|
41
|
+
onChange={e => {
|
|
42
|
+
setPromoCode(e.target.value)
|
|
43
|
+
}}
|
|
44
|
+
onKeyPress={event => {
|
|
45
|
+
if (event.key === 'Enter') {
|
|
46
|
+
setPromoCodeUpdated(promoCode)
|
|
47
|
+
}
|
|
48
|
+
}}
|
|
49
|
+
/>
|
|
50
|
+
<Button
|
|
51
|
+
className="promo-submit-button"
|
|
52
|
+
onClick={() => {
|
|
53
|
+
setPromoCodeUpdated(promoCode)
|
|
54
|
+
}}
|
|
55
|
+
>
|
|
56
|
+
{isAccessCodeEnabled ? 'ENTER' : 'APPLY'}
|
|
57
|
+
</Button>
|
|
58
|
+
</div>
|
|
59
|
+
)
|
|
60
|
+
}
|
|
61
|
+
|
|
29
62
|
return (
|
|
30
63
|
<div >
|
|
31
64
|
{promoCodeIsApplied ? (
|
|
@@ -34,39 +67,13 @@ export const PromoCodeSection = ({
|
|
|
34
67
|
src={getImage('done.svg')}
|
|
35
68
|
preProcessor={(code) => code.replace(/fill=".*?"/g, 'fill="currentColor"')}
|
|
36
69
|
/>
|
|
37
|
-
<p>PROMO CODE APPLIED SUCCESSFULLY</p>
|
|
70
|
+
<p className="promo-code-success">PROMO CODE APPLIED SUCCESSFULLY</p>
|
|
38
71
|
</div>
|
|
39
72
|
) : null}
|
|
40
|
-
{showPromoInput && (
|
|
41
|
-
|
|
42
|
-
<input
|
|
43
|
-
placeholder="Promo Code"
|
|
44
|
-
onChange={e => {
|
|
45
|
-
setPromoCode(e.target.value)
|
|
46
|
-
}}
|
|
47
|
-
onKeyPress={event => {
|
|
48
|
-
if (event.key === 'Enter') {
|
|
49
|
-
setPromoCodeUpdated(promoCode)
|
|
50
|
-
}
|
|
51
|
-
}}
|
|
52
|
-
/>
|
|
53
|
-
<Button
|
|
54
|
-
className="promo-apply-button"
|
|
55
|
-
placeholder="Promo Code"
|
|
56
|
-
onClick={() => {
|
|
57
|
-
setPromoCodeUpdated(promoCode)
|
|
58
|
-
}}
|
|
59
|
-
>
|
|
60
|
-
Apply
|
|
61
|
-
</Button>
|
|
62
|
-
</div>
|
|
73
|
+
{showPromoInput && !promoCodeIsApplied && (
|
|
74
|
+
renderInputField()
|
|
63
75
|
)}
|
|
64
|
-
{isPromotionsEnabled && !showPromoInput &&
|
|
65
|
-
<p className="promo-code-text">
|
|
66
|
-
Access code needed
|
|
67
|
-
</p>
|
|
68
|
-
)}
|
|
69
|
-
{isPromotionsEnabled && !showPromoInput ? (
|
|
76
|
+
{isPromotionsEnabled && !showPromoInput && !isAccessCodeEnabled ? (
|
|
70
77
|
<Button
|
|
71
78
|
className="promo-code-button"
|
|
72
79
|
placeholder="Promo Codes"
|
|
@@ -76,7 +83,9 @@ export const PromoCodeSection = ({
|
|
|
76
83
|
>
|
|
77
84
|
Got a promo code? Click here
|
|
78
85
|
</Button>
|
|
79
|
-
) :
|
|
86
|
+
) : !isPromotionsEnabled && !showPromoInput && isAccessCodeEnabled && !promoCodeIsApplied ? renderInputField() :
|
|
87
|
+
null
|
|
88
|
+
}
|
|
80
89
|
</div>
|
|
81
90
|
)
|
|
82
91
|
}
|