tf-checkout-react 1.0.106 → 1.2.1
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/README.md +278 -1
- package/dist/api/index.d.ts +40 -28
- package/dist/components/account-settings/index.d.ts +3 -0
- package/dist/components/billing-info-container/index.d.ts +11 -8
- package/dist/components/common/PhoneNumberField.d.ts +9 -0
- package/dist/components/common/index.d.ts +1 -0
- package/dist/components/confirmationContainer/index.d.ts +2 -1
- package/dist/components/countdown/index.d.ts +2 -1
- package/dist/components/forgotPasswordModal/index.d.ts +11 -0
- package/dist/components/index.d.ts +1 -0
- package/dist/components/loginModal/index.d.ts +35 -2
- package/dist/components/myTicketsContainer/index.d.ts +2 -1
- package/dist/components/myTicketsContainer/tableConfig.d.ts +1 -1
- package/dist/components/orderDetailsContainer/index.d.ts +6 -1
- package/dist/components/orderDetailsContainer/ticketsTable.d.ts +2 -1
- package/dist/components/paymentContainer/index.d.ts +2 -1
- package/dist/components/resetPasswordContainer/index.d.ts +10 -0
- package/dist/components/signupModal/index.d.ts +14 -0
- package/dist/components/ticketsContainer/PromoCodeSection.d.ts +3 -2
- package/dist/components/ticketsContainer/TicketsSection.d.ts +1 -2
- package/dist/components/ticketsContainer/index.d.ts +7 -3
- package/dist/index.d.ts +2 -0
- package/dist/tf-checkout-react.cjs.development.js +2177 -1482
- 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 +2166 -1473
- package/dist/tf-checkout-react.esm.js.map +1 -1
- package/dist/tf-checkout-styles.css +1 -1
- package/dist/utils/cookies.d.ts +3 -0
- package/dist/utils/createCheckoutDataBodyWithDefaultHolder.d.ts +6 -1
- package/dist/utils/downloadPDF.d.ts +1 -1
- package/dist/utils/getDomain.d.ts +1 -0
- package/dist/utils/index.d.ts +2 -0
- package/package.json +12 -1
- package/src/api/index.ts +100 -29
- package/src/components/account-settings/index.tsx +161 -0
- package/src/components/account-settings/style.css +200 -0
- package/src/components/billing-info-container/index.tsx +145 -99
- package/src/components/billing-info-container/style.css +1 -1
- package/src/components/billing-info-container/utils.ts +11 -3
- package/src/components/common/PhoneNumberField.tsx +68 -0
- package/src/components/common/SnackbarAlert.tsx +1 -1
- package/src/components/common/dist/PhoneNumberField.js +96 -0
- package/src/components/common/index.tsx +1 -0
- package/src/components/confirmationContainer/index.tsx +19 -9
- package/src/components/countdown/index.tsx +3 -1
- package/src/components/forgotPasswordModal/index.tsx +107 -0
- package/src/components/forgotPasswordModal/style.css +47 -0
- package/src/components/index.ts +1 -0
- package/src/components/loginModal/index.tsx +72 -71
- package/src/components/myTicketsContainer/index.tsx +99 -95
- package/src/components/myTicketsContainer/style.css +2 -2
- package/src/components/myTicketsContainer/tableConfig.tsx +3 -6
- package/src/components/orderDetailsContainer/index.tsx +80 -21
- package/src/components/orderDetailsContainer/style.css +7 -3
- package/src/components/orderDetailsContainer/ticketsTable.tsx +130 -83
- package/src/components/paymentContainer/index.tsx +114 -49
- package/src/components/registerModal/index.tsx +3 -10
- package/src/components/resetPasswordContainer/index.tsx +96 -0
- package/src/components/resetPasswordContainer/style.css +36 -0
- package/src/components/signupModal/index.tsx +195 -0
- package/src/components/signupModal/style.css +58 -0
- package/src/components/stripePayment/index.tsx +14 -12
- package/src/components/stripePayment/style.css +3 -3
- package/src/components/ticketResaleModal/index.tsx +12 -14
- package/src/components/ticketsContainer/PromoCodeSection.tsx +8 -7
- package/src/components/ticketsContainer/TicketRow.tsx +12 -6
- package/src/components/ticketsContainer/TicketsSection.tsx +0 -3
- package/src/components/ticketsContainer/index.tsx +155 -86
- package/src/env.ts +3 -3
- package/src/index.ts +3 -1
- package/src/utils/cookies.ts +42 -0
- package/src/utils/createCheckoutDataBodyWithDefaultHolder.ts +16 -4
- package/src/utils/downloadPDF.tsx +28 -6
- package/src/utils/getDomain.ts +15 -0
- package/src/utils/index.ts +2 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
.button-container{display:flex;justify-content:center;padding:20px}.billing-info-container{margin:0 auto;max-width:800px}.billing-info-container .is-half{width:49%}.billing-info-container p{color:#000}.billing-info-container .main-header{font-size:2rem;font-weight:600}.billing-info-container__twoFields{display:flex;justify-content:space-between;margin-top:15px}.billing-info-container__singleField{margin-top:15px}.account-actions-block{color:#182026;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen,Ubuntu,Cantarell,Open Sans,Helvetica Neue,Icons16,sans-serif;margin-top:10px}.login-register-button,.MuiButtonBase-root.MuiButton-root,.MuiButtonBase-root.MuiButton-root:hover{background-color:#212529;border:#f28051;border-radius:5px;color:#fff;cursor:pointer;display:block;font-family:Inter-Bold;font-size:26px;font-weight:700;line-height:1.15;margin-top:10px;min-height:46px;outline:none;overflow:hidden;padding:14px 12px 12px;position:relative;text-align:center;text-overflow:ellipsis;text-transform:uppercase;width:49%}.logo-image-container{margin-top:5px;text-align:center;width:49%}.logo-image-container img{height:30px}.login-block{align-items:center;display:flex;flex-direction:column}.login-register-button:hover{background-color:#505050!important;border-color:#505050!important}.login-register-block{display:flex;justify-content:space-between}@media only screen and (max-width:820px){.billing-info-container{width:90%}.billing-info-container .main-header{font-size:1.5rem}}.email-checking{margin-bottom:15px}.modal-title{align-items:center;background-color:#fff;display:flex;font-family:Inter;font-size:18px;font-weight:700;height:49px;line-height:22px;padding-left:25px;position:relative}.login-modal-body{padding:15px 25px}.login-modal-body input{background:#fff!important}.login-modal-body__email,.login-modal-body__password{margin-bottom:20px}.login-action-button button{background-color:#212529;border:none;border-radius:0;color:#fff;cursor:pointer;font-size:26px;font-weight:600;height:45px;line-height:18px;margin:10px 0;outline:none;padding:10px;width:100%}.login-action-button button:hover{background-color:#505050;border-color:#505050}.server_auth__error{color:red;font-family:Inter;font-size:12px;font-style:normal;padding-left:25px;padding-top:15px}.info-text-for-login{font-size:14px;margin-bottom:4px;padding-left:10px}.forgot-password{text-align:center}.forgot-password span{cursor:pointer}.forgot-password span:hover{text-decoration:underline}.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}.timer{background-color:#000;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;color:#fff;margin:0 0 6px;max-width:300px;overflow:hidden;padding:15px 15px 15px 50px;pointer-events:auto;position:absolute;right:15px;width:300px}.timer .close-icon{cursor:pointer;display:flex;position:absolute;right:10px;top:10px}.timer .countdown{font-weight:700;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}.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%;z-index:1400}.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 .action-button{background-color:#212529;border:1px solid #fff;border-radius:0;color:#fff;cursor:pointer;display:block;font-family:Bebas Neue;font-size:14px;font-weight:400;line-height:normal;margin-bottom:20px;margin-top:20px;min-height:auto;outline:none;overflow:hidden;padding:12px;position:relative;text-align:center;text-decoration:none;text-overflow:ellipsis;text-transform:uppercase;width:max-content}.order-details .download-button:hover{background-color:#505050}.order-details .personal-link{padding:20px 0}.resale-modal .field-box{display:flex;margin-bottom:10px}.resale-modal .field-box .icon{align-items:center;display:flex;height:56px;justify-content:center;min-width:44px}.resale-modal .field-box .empty-box{min-width:44px}.resale-modal .resale-action-button button{background-color:#212529;color:#fff;cursor:pointer;width:100%}.resale-modal .resale-action-button button[disabled]{opacity:.7}.resale-modal .resale-action-button button:hover{background-color:#505050;border-color:#505050;width:100%}.confirm-modal .footer{border-top:1px solid #c0bfbf;display:flex;gap:10px;justify-content:flex-end}.confirm-modal .footer button,.confirm-modal .footer button:hover{font-size:12px;min-height:unset;padding:12px 8px;text-transform:unset;width:max-content}.confirm-modal .footer button:hover{background:#505050}
|
|
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}button{margin-top:10px}.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}.forgot-password-modal .forgot-password-container{margin:0 auto;max-width:800px}.forgot-password-modal .title{background-color:#fff;font-family:Inter;font-size:18px;font-weight:700}.forgot-password-modal .forgot-password-container__singleField{margin-top:15px}.forgot-password-modal .forgot-password-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-top:10px;outline:none;padding:10px;text-transform:uppercase;width:100%}.forgot-password-modal .forgot-password-action-button button:hover:enabled{background-color:#505050;border-color:#505050}.forgot-password-modal .login{margin-top:10px;text-align:center}.forgot-password-modal .login span{cursor:pointer}.forgot-password-modal .login span:hover{text-decoration:underline}.forgot-password-modal button[disabled]{cursor:unset;opacity:.7}.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}.forgot-password{text-align:center}.forgot-password span{cursor:pointer}.forgot-password span:hover{text-decoration:underline}.signup-modal .signup-container{margin:0 auto;max-width:800px}.signup-modal .title{background-color:#fff;font-family:Inter;font-size:18px;font-weight:700}.signup-modal .signup-container .is-half{width:49%}.signup-modal .signup-container__twoFields{display:flex;justify-content:space-between;margin-top:15px}.signup-modal .signup-container__singleField{margin-top:15px}.signup-modal button{margin-top:10px}.signup-modal .signup-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-top:10px;outline:none;padding:10px;text-transform:uppercase;width:100%}.signup-modal .signup-action-button button:hover:enabled{background-color:#505050;border-color:#505050}.signup-modal .login{margin-top:10px;text-align:center}.signup-modal .login span{cursor:pointer}.signup-modal .login span:hover{text-decoration:underline}.signup-modal button[disabled]{cursor:unset;opacity:.7}.timer{background-color:#000;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;color:#fff;margin:0 0 6px;max-width:300px;overflow:hidden;padding:15px 15px 15px 50px;pointer-events:auto;position:absolute;right:15px;width:300px}.timer .close-icon{cursor:pointer;display:flex;position:absolute;right:10px;top:10px}.timer .countdown{font-weight:700;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}.event-closed-message{font-family:Bebas Neue;letter-spacing:.5px}.countdown p{margin:0}.countdown .title{font-weight:700}.countdown .message{font-weight:700;margin-top:20px}.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}.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%;z-index:1400}.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 .action-button{background-color:#212529;border:1px solid #fff;border-radius:0;color:#fff;cursor:pointer;display:block;font-family:Bebas Neue;font-size:14px;font-weight:400;line-height:normal;margin-bottom:20px;margin-top:20px;min-height:auto;outline:none;overflow:hidden;padding:12px;position:relative;text-align:center;text-decoration:none;text-overflow:ellipsis;text-transform:uppercase;width:max-content}.order-details .download-button:hover{background-color:#505050}.order-details .personal-link{padding:20px 0}.order-details .total-referrer{padding:0 0 20px}.resale-modal .field-box{display:flex;margin-bottom:10px}.resale-modal .field-box .icon{align-items:center;display:flex;height:56px;justify-content:center;min-width:44px}.resale-modal .field-box .empty-box{min-width:44px}.resale-modal .resale-action-button button{background-color:#212529;color:#fff;cursor:pointer;width:100%}.resale-modal .resale-action-button button[disabled]{opacity:.7}.resale-modal .resale-action-button button:hover{background-color:#505050;border-color:#505050;width:100%}.confirm-modal .footer{border-top:1px solid #c0bfbf;display:flex;gap:10px;justify-content:flex-end}.confirm-modal .footer button,.confirm-modal .footer button:hover{font-size:12px;min-height:unset;padding:12px 8px;text-transform:unset;width:max-content}.confirm-modal .footer button:hover{background:#505050}.reset-password{margin:0 auto;max-width:300px;padding:14px}.reset-password .title{font-size:20px;font-weight:700}.reset-password .field-item{margin-top:14px}.reset-password .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-top:14px;outline:none;padding:10px;text-transform:uppercase;width:100%}.reset-password .action-button button:hover:enabled{background-color:#505050;border-color:#505050}.reset-password .action-button button[disabled]{cursor:unset;opacity:.7}
|
|
@@ -3,5 +3,10 @@ interface ICheckoutBody {
|
|
|
3
3
|
[key: string]: any;
|
|
4
4
|
};
|
|
5
5
|
}
|
|
6
|
-
|
|
6
|
+
interface IUserCredentialsValues {
|
|
7
|
+
emailLogged?: string;
|
|
8
|
+
firstNameLogged?: string;
|
|
9
|
+
lastNameLogged?: string;
|
|
10
|
+
}
|
|
11
|
+
export declare const createCheckoutDataBodyWithDefaultHolder: (ticketsQuantity: number, logedInValues: {}, includeDob?: boolean, userCredentials?: IUserCredentialsValues) => ICheckoutBody;
|
|
7
12
|
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const downloadPDF: (pdfUrl: string) =>
|
|
1
|
+
export declare const downloadPDF: (pdfUrl: string) => Promise<any> | undefined;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function getDomain(url: string, subdomain?: string): string;
|
package/dist/utils/index.d.ts
CHANGED
|
@@ -3,3 +3,5 @@ export { getQueryVariable } from './getQueryVariable';
|
|
|
3
3
|
export { ErrorFocus } from './formikErrorFocus';
|
|
4
4
|
export { downloadPDF } from './downloadPDF';
|
|
5
5
|
export { createCheckoutDataBodyWithDefaultHolder } from './createCheckoutDataBodyWithDefaultHolder';
|
|
6
|
+
export { setCustomCookie, getCookieByName, deleteCookieByName } from './cookies';
|
|
7
|
+
export { getDomain } from './getDomain';
|
package/package.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"version": "1.
|
|
2
|
+
"version": "1.2.1",
|
|
3
3
|
"license": "MIT",
|
|
4
4
|
"main": "dist/index.js",
|
|
5
5
|
"typings": "dist/index.d.ts",
|
|
@@ -51,7 +51,18 @@
|
|
|
51
51
|
"@types/lodash": "^4.14.176",
|
|
52
52
|
"@types/react": "^17.0.34",
|
|
53
53
|
"@types/react-dom": "^17.0.11",
|
|
54
|
+
"@typescript-eslint/eslint-plugin": "^4.23.0",
|
|
54
55
|
"@typescript-eslint/parser": "5.4.0",
|
|
56
|
+
"eslint": "^7.26.0",
|
|
57
|
+
"eslint-config-react-app": "^5.2.1",
|
|
58
|
+
"eslint-plugin-flowtype": "^5.7.2",
|
|
59
|
+
"eslint-plugin-import": "^2.22.1",
|
|
60
|
+
"eslint-plugin-jsx-a11y": "^6.4.1",
|
|
61
|
+
"eslint-plugin-react": "^7.23.2",
|
|
62
|
+
"eslint-plugin-react-hooks": "^4.2.0",
|
|
63
|
+
"eslint-plugin-simple-import-sort": "^7.0.0",
|
|
64
|
+
"eslint-plugin-unused-imports": "^2.0.0",
|
|
65
|
+
"eslint-webpack-plugin": "^3.2.0",
|
|
55
66
|
"husky": "^7.0.4",
|
|
56
67
|
"react": "^17.0.2",
|
|
57
68
|
"react-dom": "^17.0.2",
|
package/src/api/index.ts
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
import axios, { AxiosInstance, AxiosRequestConfig } from 'axios'
|
|
1
|
+
import axios, { AxiosInstance, AxiosRequestConfig, AxiosResponse } from 'axios'
|
|
2
2
|
import _get from 'lodash/get'
|
|
3
3
|
|
|
4
|
-
import { CONFIGS } from '../utils'
|
|
4
|
+
import { CONFIGS, getCookieByName, setCustomCookie } from '../utils'
|
|
5
5
|
|
|
6
6
|
const isWindowDefined = typeof window !== 'undefined'
|
|
7
|
+
const isDocumentDefined = typeof document !== 'undefined'
|
|
7
8
|
|
|
8
9
|
const ttfHeaders: { [key: string]: any } = {
|
|
9
10
|
Accept: 'application/vnd.api+json',
|
|
@@ -28,7 +29,7 @@ export const publicRequest: IPublicRequest = axios.create({
|
|
|
28
29
|
publicRequest.interceptors.response.use(
|
|
29
30
|
response => {
|
|
30
31
|
const authGuestToken = _get(response, 'headers.authorization-guest')
|
|
31
|
-
|
|
32
|
+
|
|
32
33
|
if (isWindowDefined && authGuestToken) {
|
|
33
34
|
window.localStorage.setItem('auth_guest_token', authGuestToken)
|
|
34
35
|
publicRequest.setGuestToken(authGuestToken)
|
|
@@ -86,6 +87,14 @@ publicRequest.interceptors.request.use((config: AxiosRequestConfig) => {
|
|
|
86
87
|
config.headers = updatedHeaders
|
|
87
88
|
}
|
|
88
89
|
|
|
90
|
+
if (getCookieByName('X-TF-ECOMMERCE')) {
|
|
91
|
+
const updatedHeaders = {
|
|
92
|
+
...config.headers,
|
|
93
|
+
'X-TF-ECOMMERCE': getCookieByName('X-TF-ECOMMERCE'),
|
|
94
|
+
}
|
|
95
|
+
config.headers = updatedHeaders
|
|
96
|
+
}
|
|
97
|
+
|
|
89
98
|
if (CONFIGS.X_SOURCE_ORIGIN) {
|
|
90
99
|
const updatedHeaders = {
|
|
91
100
|
...config.headers,
|
|
@@ -101,6 +110,18 @@ publicRequest.interceptors.request.use((config: AxiosRequestConfig) => {
|
|
|
101
110
|
return config
|
|
102
111
|
})
|
|
103
112
|
|
|
113
|
+
publicRequest.interceptors.response.use((response: AxiosResponse) => {
|
|
114
|
+
const xtfCookie = _get(response, 'headers.x-tf-ecommerce')
|
|
115
|
+
const url = _get(response, 'config.url')
|
|
116
|
+
const method = _get(response, 'config.method')
|
|
117
|
+
|
|
118
|
+
if (xtfCookie && !(url === '/auth' && method === 'delete')) {
|
|
119
|
+
setCustomCookie('X-TF-ECOMMERCE', xtfCookie)
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
return response
|
|
123
|
+
})
|
|
124
|
+
|
|
104
125
|
publicRequest.setGuestToken = token =>
|
|
105
126
|
(publicRequest.defaults.headers.common['Authorization-Guest'] = token)
|
|
106
127
|
|
|
@@ -130,7 +151,7 @@ export const setCustomHeader = (response: any) => {
|
|
|
130
151
|
}
|
|
131
152
|
}
|
|
132
153
|
|
|
133
|
-
export const handleSetAccessToken = (token:
|
|
154
|
+
export const handleSetAccessToken = (token: string) => {
|
|
134
155
|
if (token) {
|
|
135
156
|
if (isWindowDefined) {
|
|
136
157
|
window.localStorage.setItem('access_token', token)
|
|
@@ -140,8 +161,24 @@ export const handleSetAccessToken = (token: any) => {
|
|
|
140
161
|
}
|
|
141
162
|
|
|
142
163
|
export function getEvent(id: string | number) {
|
|
164
|
+
let referralValue = ""
|
|
165
|
+
if (isWindowDefined) {
|
|
166
|
+
const params = new URL(`${window.location}`)
|
|
167
|
+
const referralId = params.searchParams.get('ttf_r') || ''
|
|
168
|
+
const referral_key = window.localStorage.getItem('referral_key')
|
|
169
|
+
let referralIdlocal = ""
|
|
170
|
+
if (referral_key) {
|
|
171
|
+
referralIdlocal = referral_key.split('.')[1]
|
|
172
|
+
}
|
|
173
|
+
referralValue = referralId || referralIdlocal
|
|
174
|
+
}
|
|
175
|
+
|
|
143
176
|
const response = publicRequest
|
|
144
|
-
.get(`v1/event/${id}`, {
|
|
177
|
+
.get(`v1/event/${id}`, {
|
|
178
|
+
headers: { ...ttfHeaders,
|
|
179
|
+
"Referer-Url": isDocumentDefined ? document.referrer : '',
|
|
180
|
+
"Referrer-Id": isWindowDefined ? referralValue : ''
|
|
181
|
+
} })
|
|
145
182
|
.catch(error => {
|
|
146
183
|
throw error
|
|
147
184
|
})
|
|
@@ -166,7 +203,12 @@ export function getTickets(id: string | number, promoCode: string) {
|
|
|
166
203
|
}
|
|
167
204
|
|
|
168
205
|
export const addToCart = (id: string | number, data: any) => {
|
|
169
|
-
const res = publicRequest.post(`v1/event/${id}/add-to-cart/`, {
|
|
206
|
+
const res = publicRequest.post(`v1/event/${id}/add-to-cart/`, {
|
|
207
|
+
data,
|
|
208
|
+
headers: {
|
|
209
|
+
"Referer-Url": isDocumentDefined ? document.referrer : '',
|
|
210
|
+
}
|
|
211
|
+
})
|
|
170
212
|
return res
|
|
171
213
|
}
|
|
172
214
|
|
|
@@ -175,7 +217,7 @@ export const getCart = () => {
|
|
|
175
217
|
return res
|
|
176
218
|
}
|
|
177
219
|
|
|
178
|
-
export const postOnCheckout = (data: any, accessToken
|
|
220
|
+
export const postOnCheckout = (data: any, accessToken?: string) => {
|
|
179
221
|
const res = publicRequest.post(
|
|
180
222
|
`v1/on-checkout/`,
|
|
181
223
|
{ data },
|
|
@@ -189,10 +231,9 @@ export const postOnCheckout = (data: any, accessToken: string) => {
|
|
|
189
231
|
return res
|
|
190
232
|
}
|
|
191
233
|
|
|
192
|
-
export const authorize = (data:
|
|
234
|
+
export const authorize = (data: { email: string, password: string }) =>
|
|
193
235
|
publicRequest.post(
|
|
194
|
-
|
|
195
|
-
'e9d8f8922797b4621e562255afe90dbf'}`,
|
|
236
|
+
`/auth?clientId=${CONFIGS.CLIENT_ID || 'e9d8f8922797b4621e562255afe90dbf'}`,
|
|
196
237
|
data
|
|
197
238
|
)
|
|
198
239
|
|
|
@@ -204,7 +245,11 @@ export const getAccessToken = (data: FormData) =>
|
|
|
204
245
|
|
|
205
246
|
export const getPaymentData = (hash: string) => {
|
|
206
247
|
const response = publicRequest
|
|
207
|
-
.get(`v1/order/${hash}/review
|
|
248
|
+
.get(`v1/order/${hash}/review/`, {
|
|
249
|
+
headers: {
|
|
250
|
+
"Referer-Url": isDocumentDefined ? document.referrer : '' ,
|
|
251
|
+
}
|
|
252
|
+
})
|
|
208
253
|
.catch(error => {
|
|
209
254
|
throw error
|
|
210
255
|
})
|
|
@@ -224,7 +269,11 @@ export const handlePaymentData = (orderHash: string, data: any) => {
|
|
|
224
269
|
|
|
225
270
|
export const handlePaymentSuccess = (orderHash: string) => {
|
|
226
271
|
const res = publicRequest
|
|
227
|
-
.post(`v1/order/${orderHash}/success
|
|
272
|
+
.post(`v1/order/${orderHash}/success`, {
|
|
273
|
+
headers: {
|
|
274
|
+
"Referer-Url": isDocumentDefined ? document.referrer : ''
|
|
275
|
+
}
|
|
276
|
+
})
|
|
228
277
|
.catch(error => {
|
|
229
278
|
throw error
|
|
230
279
|
})
|
|
@@ -233,14 +282,18 @@ export const handlePaymentSuccess = (orderHash: string) => {
|
|
|
233
282
|
|
|
234
283
|
export const handleFreeSuccess = (orderHash: string) => {
|
|
235
284
|
const res = publicRequest
|
|
236
|
-
.post(`v1/order/${orderHash}/complete_free_registration
|
|
285
|
+
.post(`v1/order/${orderHash}/complete_free_registration`, {
|
|
286
|
+
headers: {
|
|
287
|
+
"Referer-Url": isDocumentDefined ? document.referrer : ''
|
|
288
|
+
}
|
|
289
|
+
})
|
|
237
290
|
.catch(error => {
|
|
238
291
|
throw error
|
|
239
292
|
})
|
|
240
293
|
return res
|
|
241
294
|
}
|
|
242
295
|
|
|
243
|
-
export const getProfileData = (accessToken
|
|
296
|
+
export const getProfileData = (accessToken?: string) =>
|
|
244
297
|
publicRequest
|
|
245
298
|
.get('/customer/profile/', {
|
|
246
299
|
headers: {
|
|
@@ -248,9 +301,7 @@ export const getProfileData = (accessToken: any) =>
|
|
|
248
301
|
Authorization: `Bearer ${accessToken}`,
|
|
249
302
|
},
|
|
250
303
|
})
|
|
251
|
-
.catch((e: any) =>
|
|
252
|
-
return e
|
|
253
|
-
})
|
|
304
|
+
.catch((e: any) => e)
|
|
254
305
|
|
|
255
306
|
export const getCountries = () => publicRequest.get('/countries/')
|
|
256
307
|
|
|
@@ -275,26 +326,46 @@ export const getConditions = (eventId: string) =>
|
|
|
275
326
|
publicRequest.get(`v1/event/${eventId}/conditions`)
|
|
276
327
|
|
|
277
328
|
// resale
|
|
278
|
-
export const resaleTicket = (data: any, hash: string) =>
|
|
279
|
-
|
|
280
|
-
}
|
|
329
|
+
export const resaleTicket = (data: any, hash: string) =>
|
|
330
|
+
publicRequest.post(`v1/ticket/${hash}/sell`, data)
|
|
281
331
|
|
|
282
|
-
export const removeFromResale = (hash: string) =>
|
|
283
|
-
|
|
284
|
-
}
|
|
332
|
+
export const removeFromResale = (hash: string) =>
|
|
333
|
+
publicRequest.delete(`v1/ticket/${hash}/sell`)
|
|
285
334
|
|
|
286
335
|
export const postReferralVisits = (eventId: string, referralId: string) =>
|
|
287
336
|
publicRequest.post(`v1/event/${eventId}/referrer/`, {
|
|
288
337
|
referrer: `${referralId}`,
|
|
289
338
|
})
|
|
290
339
|
|
|
291
|
-
export const
|
|
292
|
-
return publicRequest.post(`v1/ticket/${hash}/process/`)
|
|
293
|
-
}
|
|
340
|
+
export const logout = () => publicRequest.delete('/auth')
|
|
294
341
|
|
|
295
|
-
|
|
296
|
-
|
|
342
|
+
// forgot password
|
|
343
|
+
export const forgotPassword = (email: string) =>
|
|
344
|
+
publicRequest.post(`/auth/restore-password`, { email })
|
|
345
|
+
|
|
346
|
+
// reset password
|
|
347
|
+
interface IResetPasswordData {
|
|
348
|
+
token: string;
|
|
349
|
+
password: string;
|
|
350
|
+
confirmPassword: string;
|
|
297
351
|
}
|
|
352
|
+
export const resetPassword = (data: IResetPasswordData) =>
|
|
353
|
+
publicRequest.post(`/auth/reset-password`, data)
|
|
354
|
+
|
|
355
|
+
export const processTicket = (hash: string) =>
|
|
356
|
+
publicRequest.post(`v1/ticket/${hash}/process/`)
|
|
357
|
+
|
|
358
|
+
export const declineInvitation = (hash: string) =>
|
|
359
|
+
publicRequest.post(`v1/ticket/${hash}/decline`)
|
|
298
360
|
|
|
299
361
|
export const sendRSVPInfo = (eventId: number, data: any) =>
|
|
300
|
-
publicRequest.post(`v1/event/${eventId}/send-rsvp-info`, data)
|
|
362
|
+
publicRequest.post(`v1/event/${eventId}/send-rsvp-info`, data)
|
|
363
|
+
|
|
364
|
+
export const validatePhoneNumber = async (phone: string): Promise<any> => {
|
|
365
|
+
const response: AxiosResponse<
|
|
366
|
+
any,
|
|
367
|
+
AxiosRequestConfig
|
|
368
|
+
> = await publicRequest.get(`/v1/account/validate_phone?phone=${phone}`)
|
|
369
|
+
|
|
370
|
+
return response.data
|
|
371
|
+
}
|
|
@@ -0,0 +1,161 @@
|
|
|
1
|
+
import React from "react"
|
|
2
|
+
import './style.css'
|
|
3
|
+
import Icon from "../../../src/assets/images/Polygon.png"
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
export const AccountSettings = () => {
|
|
7
|
+
return (
|
|
8
|
+
<div className="account-settings">
|
|
9
|
+
<h2>Account Settings</h2>
|
|
10
|
+
<div className="tab">
|
|
11
|
+
<div className="tab-menu">
|
|
12
|
+
<ul>
|
|
13
|
+
<li className="active">ACCOUNT INFO/PASSWORD</li>
|
|
14
|
+
<li>PRIVACY SETTINGS</li>
|
|
15
|
+
<li>ACTIVE SESSIONS</li>
|
|
16
|
+
</ul>
|
|
17
|
+
</div>
|
|
18
|
+
<div className="tab-content">
|
|
19
|
+
<div className="account-info">
|
|
20
|
+
|
|
21
|
+
</div>
|
|
22
|
+
<div className="privacy">
|
|
23
|
+
<p>
|
|
24
|
+
Please note: Opting Out here doesn’t mean you’ll be removed
|
|
25
|
+
from that Brand’s mailing list outside of Restless Nites
|
|
26
|
+
– just from communications inside our site. You’ll have
|
|
27
|
+
to contact them directly to break ties further.
|
|
28
|
+
</p>
|
|
29
|
+
<div className="pr-settings">
|
|
30
|
+
<div className="pr-settings-item">
|
|
31
|
+
<div className="item-name">
|
|
32
|
+
<img src={Icon} alt="Icon"/>
|
|
33
|
+
<span>Das Bunker</span>
|
|
34
|
+
</div>
|
|
35
|
+
<div className="item-box">
|
|
36
|
+
<span>Opt In?</span>
|
|
37
|
+
<label className="checkbox-block">
|
|
38
|
+
<input type="checkbox" />
|
|
39
|
+
<span className="checkmark" />
|
|
40
|
+
</label>
|
|
41
|
+
</div>
|
|
42
|
+
</div>
|
|
43
|
+
<div className="pr-settings-item">
|
|
44
|
+
<div className="item-name">
|
|
45
|
+
<img src={Icon} alt="Icon"/>
|
|
46
|
+
<span>Das Bunker</span>
|
|
47
|
+
</div>
|
|
48
|
+
<div className="item-box">
|
|
49
|
+
<span>Opt In?</span>
|
|
50
|
+
<label className="checkbox-block">
|
|
51
|
+
<input type="checkbox" />
|
|
52
|
+
<span className="checkmark" />
|
|
53
|
+
</label>
|
|
54
|
+
</div>
|
|
55
|
+
</div>
|
|
56
|
+
<div className="pr-settings-item">
|
|
57
|
+
<div className="item-name">
|
|
58
|
+
<img src={Icon} alt="Icon"/>
|
|
59
|
+
<span>Das Bunker</span>
|
|
60
|
+
</div>
|
|
61
|
+
<div className="item-box">
|
|
62
|
+
<span>Opt In?</span>
|
|
63
|
+
<label className="checkbox-block">
|
|
64
|
+
<input type="checkbox" />
|
|
65
|
+
<span className="checkmark" />
|
|
66
|
+
</label>
|
|
67
|
+
</div>
|
|
68
|
+
</div>
|
|
69
|
+
<div className="pr-settings-item">
|
|
70
|
+
<div className="item-name">
|
|
71
|
+
<img src={Icon} alt="Icon"/>
|
|
72
|
+
<span>Das Bunker</span>
|
|
73
|
+
</div>
|
|
74
|
+
<div className="item-box">
|
|
75
|
+
<span>Opt In?</span>
|
|
76
|
+
<label className="checkbox-block">
|
|
77
|
+
<input type="checkbox" />
|
|
78
|
+
<span className="checkmark" />
|
|
79
|
+
</label>
|
|
80
|
+
</div>
|
|
81
|
+
</div>
|
|
82
|
+
<div className="pr-settings-item">
|
|
83
|
+
<div className="item-name">
|
|
84
|
+
<img src={Icon} alt="Icon"/>
|
|
85
|
+
<span>Das Bunker</span>
|
|
86
|
+
</div>
|
|
87
|
+
<div className="item-box">
|
|
88
|
+
<span>Opt In?</span>
|
|
89
|
+
<label className="checkbox-block">
|
|
90
|
+
<input type="checkbox" />
|
|
91
|
+
<span className="checkmark" />
|
|
92
|
+
</label>
|
|
93
|
+
</div>
|
|
94
|
+
</div>
|
|
95
|
+
<div className="pr-settings-item">
|
|
96
|
+
<div className="item-name">
|
|
97
|
+
<img src={Icon} alt="Icon"/>
|
|
98
|
+
<span>Das Bunker</span>
|
|
99
|
+
</div>
|
|
100
|
+
<div className="item-box">
|
|
101
|
+
<span>Opt In?</span>
|
|
102
|
+
<label className="checkbox-block">
|
|
103
|
+
<input type="checkbox" />
|
|
104
|
+
<span className="checkmark" />
|
|
105
|
+
</label>
|
|
106
|
+
</div>
|
|
107
|
+
</div>
|
|
108
|
+
</div>
|
|
109
|
+
</div>
|
|
110
|
+
<div className="sessions">
|
|
111
|
+
<div className="sessions-item">
|
|
112
|
+
<div className="sessions-info">
|
|
113
|
+
<span>Apple – Los Angeles, United States</span>
|
|
114
|
+
<span>Chrome – Current session</span>
|
|
115
|
+
</div>
|
|
116
|
+
<button>
|
|
117
|
+
Log Out
|
|
118
|
+
</button>
|
|
119
|
+
</div>
|
|
120
|
+
<div className="sessions-item">
|
|
121
|
+
<div className="sessions-info">
|
|
122
|
+
<span>Apple – Los Angeles, United States</span>
|
|
123
|
+
<span>Chrome – Current session</span>
|
|
124
|
+
</div>
|
|
125
|
+
<button>
|
|
126
|
+
Log Out
|
|
127
|
+
</button>
|
|
128
|
+
</div>
|
|
129
|
+
<div className="sessions-item">
|
|
130
|
+
<div className="sessions-info">
|
|
131
|
+
<span>Apple – Los Angeles, United States</span>
|
|
132
|
+
<span>Chrome – Current session</span>
|
|
133
|
+
</div>
|
|
134
|
+
<button>
|
|
135
|
+
Log Out
|
|
136
|
+
</button>
|
|
137
|
+
</div>
|
|
138
|
+
<div className="sessions-item">
|
|
139
|
+
<div className="sessions-info">
|
|
140
|
+
<span>Apple – Los Angeles, United States</span>
|
|
141
|
+
<span>Chrome – Current session</span>
|
|
142
|
+
</div>
|
|
143
|
+
<button>
|
|
144
|
+
Log Out
|
|
145
|
+
</button>
|
|
146
|
+
</div>
|
|
147
|
+
<div className="sessions-item">
|
|
148
|
+
<div className="sessions-info">
|
|
149
|
+
<span>Apple – Los Angeles, United States</span>
|
|
150
|
+
<span>Chrome – Current session</span>
|
|
151
|
+
</div>
|
|
152
|
+
<button>
|
|
153
|
+
Log Out
|
|
154
|
+
</button>
|
|
155
|
+
</div>
|
|
156
|
+
</div>
|
|
157
|
+
</div>
|
|
158
|
+
</div>
|
|
159
|
+
</div>
|
|
160
|
+
)
|
|
161
|
+
}
|