tf-checkout-react 1.7.30 → 2.0.0-beta.0
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/LICENSE +1 -1
- package/README.md +141 -1033
- package/dist/checkout.css +17 -0
- package/dist/index.d.mts +3930 -0
- package/dist/index.d.ts +3930 -30
- package/dist/index.esm.js +9123 -0
- package/dist/index.esm.js.map +1 -0
- package/dist/index.js +9277 -6
- package/dist/index.js.map +1 -0
- package/dist/styles/addons.css +75 -0
- package/dist/styles/auth.css +294 -0
- package/dist/styles/billing.css +98 -0
- package/dist/styles/confirmation.css +51 -0
- package/dist/styles/foundation.css +146 -0
- package/dist/styles/payment.css +179 -0
- package/dist/styles/primitives.css +356 -0
- package/dist/styles/seat-map.css +46 -0
- package/dist/styles/tickets.css +285 -0
- package/dist/styles/verification-confirmation.css +258 -0
- package/package.json +93 -78
- package/src/.d.ts +1 -1
- package/src/CardInput.tsx +374 -0
- package/src/EmbeddedCheckout.tsx +400 -0
- package/src/ResumedCheckout.tsx +132 -0
- package/src/auth/AuthModal.tsx +231 -0
- package/src/auth/ForgotPasswordForm.tsx +93 -0
- package/src/auth/LoginForm.tsx +104 -0
- package/src/auth/PasswordInput.tsx +33 -0
- package/src/auth/RegisterForm.tsx +333 -0
- package/src/auth/ResetPasswordForm.tsx +112 -0
- package/src/auth/index.ts +5 -0
- package/src/checkout.css +17 -0
- package/src/configure.ts +29 -0
- package/src/confirmer.ts +439 -0
- package/src/index.ts +41 -30
- package/src/instance.ts +21 -0
- package/src/sections/AddOns.tsx +241 -0
- package/src/sections/BillingInfo.tsx +743 -0
- package/src/sections/Confirmation.tsx +146 -0
- package/src/sections/IDVerification.tsx +76 -0
- package/src/sections/OrderConfirmation.tsx +277 -0
- package/src/sections/OrderIDVerification.tsx +117 -0
- package/src/sections/OrderSummary.tsx +84 -0
- package/src/sections/Payment.tsx +541 -0
- package/src/sections/SeatMap.tsx +512 -0
- package/src/sections/Tickets.tsx +573 -0
- package/src/sections/billing/BillingAddressFields.tsx +138 -0
- package/src/sections/billing/BuyerField.tsx +75 -0
- package/src/sections/billing/TicketHoldersCard.tsx +119 -0
- package/src/sections/billing/types.ts +10 -0
- package/src/sections/index.ts +15 -0
- package/src/sections/seatMap.utils.ts +105 -0
- package/src/styles/addons.css +75 -0
- package/src/styles/auth.css +294 -0
- package/src/styles/billing.css +98 -0
- package/src/styles/confirmation.css +51 -0
- package/src/styles/foundation.css +146 -0
- package/src/styles/payment.css +179 -0
- package/src/styles/primitives.css +356 -0
- package/src/styles/seat-map.css +46 -0
- package/src/styles/tickets.css +285 -0
- package/src/styles/verification-confirmation.css +258 -0
- package/src/typings.d.ts +2 -2
- package/src/ui/Button.tsx +38 -0
- package/src/ui/Card.tsx +54 -0
- package/src/ui/CheckoutProvider.tsx +172 -0
- package/src/ui/CustomFields.tsx +195 -0
- package/src/ui/Field.tsx +114 -0
- package/src/ui/I18nProvider.tsx +36 -0
- package/src/ui/InstallmentPicker.tsx +69 -0
- package/src/ui/Loader.tsx +12 -0
- package/src/ui/PaymentMethods.tsx +133 -0
- package/src/ui/PriceLine.tsx +24 -0
- package/src/ui/QuantitySelect.tsx +50 -0
- package/src/ui/Stepper.tsx +36 -0
- package/src/ui/Timer.tsx +34 -0
- package/src/ui/TimerBanner.tsx +55 -0
- package/src/ui/cx.ts +3 -0
- package/src/ui/index.ts +54 -0
- package/src/ui/theme.ts +83 -0
- package/src/useCheckout.ts +35 -0
- package/src/xendit.ts +438 -0
- package/dist/adapters/customFields.d.ts +0 -12
- package/dist/adapters/index.d.ts +0 -1
- package/dist/api/auth.d.ts +0 -27
- package/dist/api/cart.d.ts +0 -2
- package/dist/api/checkout.d.ts +0 -3
- package/dist/api/common.d.ts +0 -11
- package/dist/api/guestTicketDelegation.d.ts +0 -47
- package/dist/api/index.d.ts +0 -82
- package/dist/api/interceptors.d.ts +0 -1
- package/dist/api/orders.d.ts +0 -2
- package/dist/api/payment.d.ts +0 -5
- package/dist/api/preRegistrationComplete.d.ts +0 -3
- package/dist/api/publicRequest.d.ts +0 -9
- package/dist/api/resale.d.ts +0 -5
- package/dist/components/account-settings/index.d.ts +0 -3
- package/dist/components/addonsContainer/AddonComponent.d.ts +0 -18
- package/dist/components/addonsContainer/SimpleAddonsContainer.d.ts +0 -20
- package/dist/components/addonsContainer/adapters/index.d.ts +0 -12
- package/dist/components/addonsContainer/index.d.ts +0 -22
- package/dist/components/addonsContainer/normalizers/index.d.ts +0 -1
- package/dist/components/addonsContainer/useAddons.d.ts +0 -23
- package/dist/components/addonsContainer/utils/index.d.ts +0 -16
- package/dist/components/billing-info-container/hooks/index.d.ts +0 -3
- package/dist/components/billing-info-container/hooks/usePaymentContext.d.ts +0 -5
- package/dist/components/billing-info-container/hooks/usePaymentRedirect.d.ts +0 -14
- package/dist/components/billing-info-container/hooks/useStripePayment.d.ts +0 -18
- package/dist/components/billing-info-container/index.d.ts +0 -69
- package/dist/components/billing-info-container/utils.d.ts +0 -59
- package/dist/components/common/Checkbox.d.ts +0 -11
- package/dist/components/common/CheckboxField/index.d.ts +0 -9
- package/dist/components/common/CopyField.d.ts +0 -12
- package/dist/components/common/CopyMessageModal.d.ts +0 -7
- package/dist/components/common/CustomField.d.ts +0 -26
- package/dist/components/common/DatePickerField.d.ts +0 -20
- package/dist/components/common/FieldSection/index.d.ts +0 -19
- package/dist/components/common/FieldSection/utils/index.d.ts +0 -8
- package/dist/components/common/FormikPhoneNumberField.d.ts +0 -11
- package/dist/components/common/Loader.d.ts +0 -2
- package/dist/components/common/ModalComponent/index.d.ts +0 -16
- package/dist/components/common/NativeSelectFeild/index.d.ts +0 -21
- package/dist/components/common/PhoneNumberField.d.ts +0 -14
- package/dist/components/common/PoweredBy.d.ts +0 -2
- package/dist/components/common/RadioField.d.ts +0 -11
- package/dist/components/common/RadioGroupField/index.d.ts +0 -17
- package/dist/components/common/RedirectModal.d.ts +0 -7
- package/dist/components/common/SelectField/index.d.ts +0 -19
- package/dist/components/common/SnackbarAlert.d.ts +0 -13
- package/dist/components/common/index.d.ts +0 -11
- package/dist/components/common/socials.d.ts +0 -10
- package/dist/components/confirmModal/index.d.ts +0 -10
- package/dist/components/confirmationContainer/config.d.ts +0 -1
- package/dist/components/confirmationContainer/index.d.ts +0 -46
- package/dist/components/confirmationContainer/social-buttons.d.ts +0 -16
- package/dist/components/countdown/index.d.ts +0 -14
- package/dist/components/delegationsContainer/IssueComponent.d.ts +0 -10
- package/dist/components/delegationsContainer/IssueTicketForm.d.ts +0 -9
- package/dist/components/delegationsContainer/TicketsAssignedTable.d.ts +0 -11
- package/dist/components/delegationsContainer/TicketsAvailableTable.d.ts +0 -11
- package/dist/components/delegationsContainer/index.d.ts +0 -10
- package/dist/components/forgotPasswordModal/index.d.ts +0 -12
- package/dist/components/idVerificationContainer/VerificationPendingModal.d.ts +0 -10
- package/dist/components/idVerificationContainer/constants.d.ts +0 -21
- package/dist/components/idVerificationContainer/index.d.ts +0 -16
- package/dist/components/index.d.ts +0 -12
- package/dist/components/loginForm/index.d.ts +0 -31
- package/dist/components/loginModal/SignUpForm.d.ts +0 -10
- package/dist/components/loginModal/constants.d.ts +0 -39
- package/dist/components/loginModal/index.d.ts +0 -22
- package/dist/components/myTicketsContainer/index.d.ts +0 -16
- package/dist/components/myTicketsContainer/row.d.ts +0 -3
- package/dist/components/myTicketsContainer/tableConfig.d.ts +0 -5
- package/dist/components/orderDetailsContainer/CustomFieldsForm.d.ts +0 -12
- package/dist/components/orderDetailsContainer/TicketHolderCustomFields.d.ts +0 -10
- package/dist/components/orderDetailsContainer/index.d.ts +0 -66
- package/dist/components/orderDetailsContainer/ticketsTable.d.ts +0 -46
- package/dist/components/orderDetailsContainer/utils/index.d.ts +0 -6
- package/dist/components/paymentContainer/OrderDetails.d.ts +0 -9
- package/dist/components/paymentContainer/PaymentPlanSection.d.ts +0 -10
- package/dist/components/paymentContainer/handlePayment.d.ts +0 -15
- package/dist/components/paymentContainer/index.d.ts +0 -39
- package/dist/components/preRegistration/FieldsSection.d.ts +0 -19
- package/dist/components/preRegistration/Influancers.d.ts +0 -2
- package/dist/components/preRegistration/PreRegistrationComplete.d.ts +0 -13
- package/dist/components/preRegistration/PreRegistrationInformations.d.ts +0 -2
- package/dist/components/preRegistration/Prewards.d.ts +0 -2
- package/dist/components/preRegistration/ShareOptions.d.ts +0 -2
- package/dist/components/preRegistration/constants.d.ts +0 -2
- package/dist/components/preRegistration/index.d.ts +0 -23
- package/dist/components/preRegistration/utils.d.ts +0 -12
- package/dist/components/registerForm/adapters/index.d.ts +0 -4
- package/dist/components/registerForm/constants.d.ts +0 -1
- package/dist/components/registerForm/index.d.ts +0 -16
- package/dist/components/registerModal/index.d.ts +0 -12
- package/dist/components/resetPasswordContainer/index.d.ts +0 -10
- package/dist/components/rsvpContainer/index.d.ts +0 -7
- package/dist/components/seatMapContainer/SeatMapComponent.d.ts +0 -8
- package/dist/components/seatMapContainer/TicketsSection.d.ts +0 -9
- package/dist/components/seatMapContainer/addToCart.d.ts +0 -14
- package/dist/components/seatMapContainer/index.d.ts +0 -2
- package/dist/components/seatMapContainer/utils.d.ts +0 -6
- package/dist/components/signupModal/index.d.ts +0 -12
- package/dist/components/ticketResale/index.d.ts +0 -12
- package/dist/components/ticketResaleModal/index.d.ts +0 -19
- package/dist/components/ticketsContainer/AccessCodeSection.d.ts +0 -7
- package/dist/components/ticketsContainer/InfoIcon.d.ts +0 -5
- package/dist/components/ticketsContainer/PromoCodeSection.d.ts +0 -15
- package/dist/components/ticketsContainer/ReferralLogic.d.ts +0 -5
- package/dist/components/ticketsContainer/TicketRow.d.ts +0 -13
- package/dist/components/ticketsContainer/TicketsSection.d.ts +0 -20
- package/dist/components/ticketsContainer/TimeSlotTicketRow.d.ts +0 -19
- package/dist/components/ticketsContainer/TimeSlotsSection.d.ts +0 -25
- package/dist/components/ticketsContainer/index.d.ts +0 -93
- package/dist/components/ticketsContainer/utils.d.ts +0 -13
- package/dist/components/timerWidget/index.d.ts +0 -16
- package/dist/components/waitingList/index.d.ts +0 -9
- package/dist/constants/index.d.ts +0 -7
- package/dist/env.d.ts +0 -16
- package/dist/hoc/CustomFields/index.d.ts +0 -3
- package/dist/hoc/index.d.ts +0 -1
- package/dist/hooks/index.d.ts +0 -1
- package/dist/hooks/useCookieListener.d.ts +0 -1
- package/dist/hooks/useEventListener.d.ts +0 -1
- package/dist/hooks/useLocalStorageListener.d.ts +0 -1
- package/dist/hooks/useOnline.d.ts +0 -1
- package/dist/hooks/usePixel.d.ts +0 -6
- package/dist/images/Polygon.png +0 -0
- package/dist/images/cross.svg +0 -44
- package/dist/images/done.svg +0 -3
- package/dist/images/edit.svg +0 -10
- package/dist/images/email.svg +0 -1
- package/dist/images/instagram.svg +0 -5
- package/dist/images/logo-ttf.png +0 -0
- package/dist/images/spotify.svg +0 -6
- package/dist/images/user.svg +0 -1
- package/dist/images/xmark.svg +0 -92
- package/dist/normalizers/index.d.ts +0 -4
- package/dist/tf-checkout-react.cjs.development.js +0 -16149
- package/dist/tf-checkout-react.cjs.development.js.map +0 -1
- package/dist/tf-checkout-react.cjs.production.min.js +0 -2
- package/dist/tf-checkout-react.cjs.production.min.js.map +0 -1
- package/dist/tf-checkout-react.esm.js +0 -16116
- package/dist/tf-checkout-react.esm.js.map +0 -1
- package/dist/tf-checkout-styles.css +0 -1
- package/dist/types/add_on.d.ts +0 -8
- package/dist/types/billing-info-data.d.ts +0 -27
- package/dist/types/checkoutPageConfigs.d.ts +0 -13
- package/dist/types/index.d.ts +0 -6
- package/dist/types/order-data.d.ts +0 -15
- package/dist/types/payment-field.d.ts +0 -6
- package/dist/types/payment-plan-configuration.d.ts +0 -18
- package/dist/types/referral-promotion.d.ts +0 -6
- package/dist/types/verification.d.ts +0 -12
- package/dist/utils/adaptStripeErrors.d.ts +0 -8
- package/dist/utils/auth.d.ts +0 -21
- package/dist/utils/cookies.d.ts +0 -3
- package/dist/utils/createCheckoutDataBodyWithDefaultHolder.d.ts +0 -23
- package/dist/utils/createMarkup.d.ts +0 -3
- package/dist/utils/customFields.d.ts +0 -35
- package/dist/utils/downloadPDF.d.ts +0 -1
- package/dist/utils/form.d.ts +0 -3
- package/dist/utils/formikErrorFocus.d.ts +0 -2
- package/dist/utils/getDomain.d.ts +0 -1
- package/dist/utils/getImage.d.ts +0 -1
- package/dist/utils/getQueryVariable.d.ts +0 -1
- package/dist/utils/htmlNodeFromString.d.ts +0 -1
- package/dist/utils/index.d.ts +0 -15
- package/dist/utils/isBrowser.d.ts +0 -1
- package/dist/utils/isValidNumber.d.ts +0 -1
- package/dist/utils/jsonUtils.d.ts +0 -1
- package/dist/utils/replaceVarInString.d.ts +0 -1
- package/dist/utils/setConfigs.d.ts +0 -11
- package/dist/utils/showZero.d.ts +0 -1
- package/dist/validators/index.d.ts +0 -8
- package/src/adapters/customFields.ts +0 -85
- package/src/adapters/index.ts +0 -1
- package/src/api/auth.ts +0 -88
- package/src/api/cart.ts +0 -28
- package/src/api/checkout.ts +0 -28
- package/src/api/common.ts +0 -190
- package/src/api/guestTicketDelegation.ts +0 -79
- package/src/api/index.ts +0 -346
- package/src/api/interceptors.ts +0 -77
- package/src/api/orders.ts +0 -30
- package/src/api/payment.ts +0 -77
- package/src/api/preRegistrationComplete.ts +0 -37
- package/src/api/publicRequest.ts +0 -47
- package/src/api/resale.ts +0 -28
- package/src/assets/images/Polygon.png +0 -0
- package/src/assets/images/cross.svg +0 -44
- package/src/assets/images/done.svg +0 -3
- package/src/assets/images/edit.svg +0 -10
- package/src/assets/images/email.svg +0 -1
- package/src/assets/images/instagram.svg +0 -5
- package/src/assets/images/logo-ttf.png +0 -0
- package/src/assets/images/spotify.svg +0 -6
- package/src/assets/images/user.svg +0 -1
- package/src/assets/images/xmark.svg +0 -92
- package/src/components/account-settings/index.tsx +0 -161
- package/src/components/account-settings/style.css +0 -200
- package/src/components/addonsContainer/AddonComponent.tsx +0 -204
- package/src/components/addonsContainer/SimpleAddonsContainer.tsx +0 -459
- package/src/components/addonsContainer/adapters/index.tsx +0 -62
- package/src/components/addonsContainer/index.tsx +0 -353
- package/src/components/addonsContainer/normalizers/index.ts +0 -5
- package/src/components/addonsContainer/useAddons.ts +0 -248
- package/src/components/addonsContainer/utils/index.tsx +0 -231
- package/src/components/billing-info-container/hooks/index.ts +0 -3
- package/src/components/billing-info-container/hooks/usePaymentContext.ts +0 -22
- package/src/components/billing-info-container/hooks/usePaymentRedirect.ts +0 -145
- package/src/components/billing-info-container/hooks/useStripePayment.ts +0 -119
- package/src/components/billing-info-container/index.tsx +0 -1695
- package/src/components/billing-info-container/style.css +0 -150
- package/src/components/billing-info-container/utils.tsx +0 -413
- package/src/components/common/Checkbox.tsx +0 -51
- package/src/components/common/CheckboxField/index.tsx +0 -41
- package/src/components/common/CopyField.tsx +0 -53
- package/src/components/common/CopyMessageModal.tsx +0 -34
- package/src/components/common/CustomField.tsx +0 -168
- package/src/components/common/DatePickerField.tsx +0 -126
- package/src/components/common/FieldSection/index.tsx +0 -141
- package/src/components/common/FieldSection/utils/index.tsx +0 -92
- package/src/components/common/FormikPhoneNumberField.tsx +0 -51
- package/src/components/common/Loader.tsx +0 -8
- package/src/components/common/ModalComponent/index.tsx +0 -68
- package/src/components/common/NativeSelectFeild/index.tsx +0 -86
- package/src/components/common/PhoneNumberField.tsx +0 -117
- package/src/components/common/PoweredBy.tsx +0 -15
- package/src/components/common/RadioField.tsx +0 -36
- package/src/components/common/RadioGroupField/index.tsx +0 -76
- package/src/components/common/RedirectModal.tsx +0 -43
- package/src/components/common/SelectField/index.tsx +0 -104
- package/src/components/common/SnackbarAlert.tsx +0 -52
- package/src/components/common/index.tsx +0 -11
- package/src/components/common/socials.tsx +0 -33
- package/src/components/confirmModal/index.tsx +0 -60
- package/src/components/confirmationContainer/config.ts +0 -79
- package/src/components/confirmationContainer/index.tsx +0 -349
- package/src/components/confirmationContainer/social-buttons.tsx +0 -149
- package/src/components/confirmationContainer/style.css +0 -206
- package/src/components/countdown/index.tsx +0 -100
- package/src/components/countdown/style.css +0 -10
- package/src/components/delegationsContainer/IssueComponent.tsx +0 -156
- package/src/components/delegationsContainer/IssueTicketForm.tsx +0 -109
- package/src/components/delegationsContainer/TicketsAssignedTable.tsx +0 -55
- package/src/components/delegationsContainer/TicketsAvailableTable.tsx +0 -54
- package/src/components/delegationsContainer/index.tsx +0 -83
- package/src/components/forgotPasswordModal/index.tsx +0 -138
- package/src/components/forgotPasswordModal/style.css +0 -47
- package/src/components/idVerificationContainer/VerificationPendingModal.tsx +0 -47
- package/src/components/idVerificationContainer/constants.ts +0 -27
- package/src/components/idVerificationContainer/index.tsx +0 -323
- package/src/components/index.ts +0 -12
- package/src/components/loginForm/index.tsx +0 -202
- package/src/components/loginModal/SignUpForm.tsx +0 -329
- package/src/components/loginModal/constants.ts +0 -46
- package/src/components/loginModal/index.tsx +0 -263
- package/src/components/loginModal/style.css +0 -116
- package/src/components/myTicketsContainer/index.tsx +0 -228
- package/src/components/myTicketsContainer/row.tsx +0 -46
- package/src/components/myTicketsContainer/style.css +0 -40
- package/src/components/myTicketsContainer/tableConfig.tsx +0 -80
- package/src/components/myTicketsContainer/types.d.ts +0 -41
- package/src/components/orderDetailsContainer/CustomFieldsForm.tsx +0 -75
- package/src/components/orderDetailsContainer/TicketHolderCustomFields.tsx +0 -100
- package/src/components/orderDetailsContainer/index.tsx +0 -586
- package/src/components/orderDetailsContainer/style.css +0 -77
- package/src/components/orderDetailsContainer/ticketsTable.tsx +0 -246
- package/src/components/orderDetailsContainer/utils/index.tsx +0 -55
- package/src/components/paymentContainer/OrderDetails.tsx +0 -277
- package/src/components/paymentContainer/PaymentPlanSection.tsx +0 -169
- package/src/components/paymentContainer/handlePayment.ts +0 -86
- package/src/components/paymentContainer/index.tsx +0 -643
- package/src/components/paymentContainer/style.css +0 -196
- package/src/components/preRegistration/FieldsSection.tsx +0 -150
- package/src/components/preRegistration/Influancers.tsx +0 -34
- package/src/components/preRegistration/PreRegistrationComplete.tsx +0 -186
- package/src/components/preRegistration/PreRegistrationInformations.tsx +0 -60
- package/src/components/preRegistration/Prewards.tsx +0 -41
- package/src/components/preRegistration/ShareOptions.tsx +0 -77
- package/src/components/preRegistration/constants.tsx +0 -169
- package/src/components/preRegistration/index.tsx +0 -330
- package/src/components/preRegistration/style.css +0 -3
- package/src/components/preRegistration/utils.ts +0 -163
- package/src/components/registerForm/adapters/index.tsx +0 -10
- package/src/components/registerForm/constants.tsx +0 -98
- package/src/components/registerForm/index.tsx +0 -188
- package/src/components/registerModal/index.tsx +0 -154
- package/src/components/registerModal/style.css +0 -18
- package/src/components/resetPasswordContainer/index.tsx +0 -102
- package/src/components/resetPasswordContainer/style.css +0 -36
- package/src/components/rsvpContainer/index.tsx +0 -126
- package/src/components/seatMapContainer/SeatMapComponent.tsx +0 -77
- package/src/components/seatMapContainer/TicketsSection.tsx +0 -286
- package/src/components/seatMapContainer/addToCart.ts +0 -66
- package/src/components/seatMapContainer/index.tsx +0 -443
- package/src/components/seatMapContainer/utils.ts +0 -133
- package/src/components/signupModal/index.tsx +0 -178
- package/src/components/signupModal/style.css +0 -58
- package/src/components/ticketResale/index.tsx +0 -86
- package/src/components/ticketResaleModal/index.tsx +0 -224
- package/src/components/ticketResaleModal/style.css +0 -28
- package/src/components/ticketsContainer/AccessCodeSection.tsx +0 -50
- package/src/components/ticketsContainer/InfoIcon.tsx +0 -35
- package/src/components/ticketsContainer/PromoCodeSection.tsx +0 -116
- package/src/components/ticketsContainer/ReferralLogic.tsx +0 -33
- package/src/components/ticketsContainer/TicketRow.tsx +0 -107
- package/src/components/ticketsContainer/TicketsSection.tsx +0 -350
- package/src/components/ticketsContainer/TimeSlotTicketRow.tsx +0 -243
- package/src/components/ticketsContainer/TimeSlotsSection.tsx +0 -194
- package/src/components/ticketsContainer/index.tsx +0 -986
- package/src/components/ticketsContainer/style.css +0 -178
- package/src/components/ticketsContainer/utils.ts +0 -35
- package/src/components/timerWidget/index.tsx +0 -97
- package/src/components/timerWidget/style.css +0 -35
- package/src/components/waitingList/index.tsx +0 -190
- package/src/components/waitingList/style.css +0 -27
- package/src/constants/index.ts +0 -3
- package/src/env.ts +0 -29
- package/src/hoc/CustomFields/index.tsx +0 -85
- package/src/hoc/index.ts +0 -1
- package/src/hooks/index.ts +0 -1
- package/src/hooks/useCookieListener.ts +0 -32
- package/src/hooks/useEventListener.ts +0 -32
- package/src/hooks/useLocalStorageListener.ts +0 -32
- package/src/hooks/useOnline.ts +0 -21
- package/src/hooks/usePixel.ts +0 -88
- package/src/normalizers/index.ts +0 -49
- package/src/types/add_on.ts +0 -8
- package/src/types/api/auth.d.ts +0 -63
- package/src/types/api/axiosResponse.d.ts +0 -6
- package/src/types/api/cart.d.ts +0 -73
- package/src/types/api/checkout.d.ts +0 -92
- package/src/types/api/common.d.ts +0 -153
- package/src/types/api/guestTicketDelegation.d.ts +0 -18
- package/src/types/api/orders.d.ts +0 -116
- package/src/types/api/payment.d.ts +0 -180
- package/src/types/api/preRegistration.d.ts +0 -11
- package/src/types/api/preRegistrationComplete.d.ts +0 -95
- package/src/types/api/ticketResale.d.ts +0 -13
- package/src/types/billing-info-data.ts +0 -37
- package/src/types/checkoutPageConfigs.ts +0 -13
- package/src/types/formFields.d.ts +0 -29
- package/src/types/index.ts +0 -6
- package/src/types/order-data.ts +0 -16
- package/src/types/payment-field.ts +0 -7
- package/src/types/payment-plan-configuration.ts +0 -19
- package/src/types/pre-registration-complete.d.ts +0 -47
- package/src/types/referral-promotion.ts +0 -7
- package/src/types/seatMap.d.ts +0 -159
- package/src/types/verification.ts +0 -12
- package/src/utils/adaptStripeErrors.ts +0 -26
- package/src/utils/auth.ts +0 -45
- package/src/utils/cookies.ts +0 -73
- package/src/utils/createCheckoutDataBodyWithDefaultHolder.ts +0 -81
- package/src/utils/createMarkup.ts +0 -1
- package/src/utils/customFields.ts +0 -80
- package/src/utils/downloadPDF.tsx +0 -42
- package/src/utils/form.ts +0 -34
- package/src/utils/formikErrorFocus.ts +0 -24
- package/src/utils/getDomain.ts +0 -21
- package/src/utils/getImage.ts +0 -14
- package/src/utils/getQueryVariable.ts +0 -13
- package/src/utils/htmlNodeFromString.ts +0 -6
- package/src/utils/index.ts +0 -15
- package/src/utils/isBrowser.ts +0 -2
- package/src/utils/isValidNumber.ts +0 -8
- package/src/utils/jsonUtils.ts +0 -8
- package/src/utils/replaceVarInString.ts +0 -9
- package/src/utils/setConfigs.ts +0 -24
- package/src/utils/showZero.tsx +0 -10
- package/src/validators/index.ts +0 -61
|
@@ -1,196 +0,0 @@
|
|
|
1
|
-
.payment_page {
|
|
2
|
-
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen,
|
|
3
|
-
Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', Icons16, sans-serif;
|
|
4
|
-
}
|
|
5
|
-
.payment_page .order_info_section {
|
|
6
|
-
padding: 15px 0;
|
|
7
|
-
}
|
|
8
|
-
.payment_page .order_info_section .order_info_block {
|
|
9
|
-
padding-bottom: 15px;
|
|
10
|
-
padding-top: 15px;
|
|
11
|
-
}
|
|
12
|
-
.payment_page .order_info_section .order_info_block .field-underline {
|
|
13
|
-
border-bottom: 1px solid #000;
|
|
14
|
-
padding-bottom: 15px;
|
|
15
|
-
}
|
|
16
|
-
.payment_page .order_info_section .order_info_block .order_info_title {
|
|
17
|
-
font-size: 14px;
|
|
18
|
-
font-weight: 700;
|
|
19
|
-
padding-bottom: 3px;
|
|
20
|
-
}
|
|
21
|
-
.payment_page .order_info_section .order_info_block .order_info_text {
|
|
22
|
-
font-size: 16px;
|
|
23
|
-
line-height: 1.15;
|
|
24
|
-
outline: none;
|
|
25
|
-
}
|
|
26
|
-
.payment_page .MuiBox-root {
|
|
27
|
-
text-align: center;
|
|
28
|
-
margin-left: auto;
|
|
29
|
-
margin-right: auto;
|
|
30
|
-
padding: 20px;
|
|
31
|
-
}
|
|
32
|
-
.payment_page .payment_info_label {
|
|
33
|
-
padding: 20px 0;
|
|
34
|
-
text-align: center;
|
|
35
|
-
}
|
|
36
|
-
.payment_page .payment_form {
|
|
37
|
-
padding: 20px;
|
|
38
|
-
color: #fff;
|
|
39
|
-
}
|
|
40
|
-
.payment_page .payment_form input,
|
|
41
|
-
.payment_page .payment_form label {
|
|
42
|
-
color: #fff;
|
|
43
|
-
}
|
|
44
|
-
.payment_page .payment_button {
|
|
45
|
-
padding-top: 20px;
|
|
46
|
-
text-align: center;
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
.payment_page .payment_method_selector {
|
|
50
|
-
display: flex;
|
|
51
|
-
gap: 12px;
|
|
52
|
-
margin-bottom: 20px;
|
|
53
|
-
justify-content: center;
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
.payment_page .payment_method_option {
|
|
57
|
-
padding: 12px 24px;
|
|
58
|
-
border: 2px solid #e0e0e0;
|
|
59
|
-
border-radius: 8px;
|
|
60
|
-
background: #fff;
|
|
61
|
-
cursor: pointer;
|
|
62
|
-
font-size: 14px;
|
|
63
|
-
font-weight: 500;
|
|
64
|
-
transition: all 0.2s ease;
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
.payment_page .payment_method_option:hover {
|
|
68
|
-
border-color: #999;
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
.payment_page .payment_method_option.selected {
|
|
72
|
-
border-color: #1976d2;
|
|
73
|
-
background-color: #e3f2fd;
|
|
74
|
-
color: #1976d2;
|
|
75
|
-
}
|
|
76
|
-
|
|
77
|
-
.payment_page .payment_plan .payment_plan_block .payment_plan_text {
|
|
78
|
-
padding-bottom: 10px;
|
|
79
|
-
}
|
|
80
|
-
|
|
81
|
-
.payment_page .payment_plan .payment_plan_highlight {
|
|
82
|
-
font-weight: bold;
|
|
83
|
-
}
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
/* Default styles - mobile section is hidden on desktop */
|
|
87
|
-
.mobile-order-summary {
|
|
88
|
-
display: none;
|
|
89
|
-
}
|
|
90
|
-
|
|
91
|
-
/* Mobile-specific styles */
|
|
92
|
-
@media (max-width: 767px) {
|
|
93
|
-
/* Show mobile summary on mobile devices */
|
|
94
|
-
.mobile-order-summary {
|
|
95
|
-
display: block;
|
|
96
|
-
margin-bottom: 15px;
|
|
97
|
-
background-color: #f8f8f8;
|
|
98
|
-
border-radius: 8px;
|
|
99
|
-
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
|
|
100
|
-
}
|
|
101
|
-
|
|
102
|
-
.mobile-order-summary-content {
|
|
103
|
-
display: flex;
|
|
104
|
-
align-items: flex-start;
|
|
105
|
-
padding: 15px;
|
|
106
|
-
cursor: pointer;
|
|
107
|
-
}
|
|
108
|
-
|
|
109
|
-
.mobile-order-info-container:after {
|
|
110
|
-
display: inline-block;
|
|
111
|
-
content: "⌃";
|
|
112
|
-
font-weight: 900;
|
|
113
|
-
font-size: 15px;
|
|
114
|
-
top: -2px;
|
|
115
|
-
left: 6px;
|
|
116
|
-
float: right;
|
|
117
|
-
position: relative;
|
|
118
|
-
transform: rotate(180deg);
|
|
119
|
-
transition: transform 0.25s, top 0.25s;
|
|
120
|
-
}
|
|
121
|
-
|
|
122
|
-
.mobile-order-info-container.open:after {
|
|
123
|
-
top: 2px;
|
|
124
|
-
transform: rotate(0deg);
|
|
125
|
-
}
|
|
126
|
-
|
|
127
|
-
.mobile-order-info-container.order-info-container-left {
|
|
128
|
-
text-align: left;
|
|
129
|
-
}
|
|
130
|
-
.mobile-order-info-container.order-info-container-right {
|
|
131
|
-
text-align: right;
|
|
132
|
-
}
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
.mobile-order-icon {
|
|
136
|
-
margin-right: 15px;
|
|
137
|
-
color: #1976d2;
|
|
138
|
-
padding-top: 2px;
|
|
139
|
-
}
|
|
140
|
-
|
|
141
|
-
.mobile-order-info {
|
|
142
|
-
flex: 1;
|
|
143
|
-
}
|
|
144
|
-
|
|
145
|
-
.mobile-order-text {
|
|
146
|
-
font-size: 14px;
|
|
147
|
-
color: #666;
|
|
148
|
-
margin-bottom: 4px;
|
|
149
|
-
}
|
|
150
|
-
|
|
151
|
-
.mobile-order-total {
|
|
152
|
-
font-size: 18px;
|
|
153
|
-
font-weight: bold;
|
|
154
|
-
color: #333;
|
|
155
|
-
margin-bottom: 8px;
|
|
156
|
-
}
|
|
157
|
-
|
|
158
|
-
.mobile-order-timer {
|
|
159
|
-
display: flex;
|
|
160
|
-
align-items: center;
|
|
161
|
-
margin-top: 8px;
|
|
162
|
-
padding-top: 8px;
|
|
163
|
-
border-top: 1px dashed #ddd;
|
|
164
|
-
}
|
|
165
|
-
|
|
166
|
-
.mobile-timer-icon {
|
|
167
|
-
margin-right: 8px;
|
|
168
|
-
color: #f44336;
|
|
169
|
-
}
|
|
170
|
-
|
|
171
|
-
.mobile-timer-text {
|
|
172
|
-
font-size: 13px;
|
|
173
|
-
color: #666;
|
|
174
|
-
}
|
|
175
|
-
|
|
176
|
-
.mobile-timer-countdown {
|
|
177
|
-
font-weight: bold;
|
|
178
|
-
color: #f44336;
|
|
179
|
-
}
|
|
180
|
-
|
|
181
|
-
.mobile-order-expand {
|
|
182
|
-
color: #666;
|
|
183
|
-
padding-top: 2px;
|
|
184
|
-
}
|
|
185
|
-
|
|
186
|
-
/* Hide the original content when collapsed on mobile */
|
|
187
|
-
.order_info_section.collapsed {
|
|
188
|
-
display: none !important;
|
|
189
|
-
}
|
|
190
|
-
|
|
191
|
-
/* Show the original content when expanded on mobile */
|
|
192
|
-
.order_info_section.expanded {
|
|
193
|
-
display: grid !important;
|
|
194
|
-
margin-top: 10px;
|
|
195
|
-
}
|
|
196
|
-
}
|
|
@@ -1,150 +0,0 @@
|
|
|
1
|
-
import { Field, FormikValues } from 'formik'
|
|
2
|
-
import _map from 'lodash/map'
|
|
3
|
-
import React, { FC } from 'react'
|
|
4
|
-
|
|
5
|
-
import { replaceVarInString } from '../../utils'
|
|
6
|
-
import {
|
|
7
|
-
CheckboxField,
|
|
8
|
-
CustomField,
|
|
9
|
-
NativeSelectField,
|
|
10
|
-
PhoneNumberField,
|
|
11
|
-
} from '../common'
|
|
12
|
-
import { DatePickerField } from '../common/DatePickerField'
|
|
13
|
-
import { getValidateFunctions } from './utils'
|
|
14
|
-
import {ThemeOptions} from "@mui/material";
|
|
15
|
-
import {CSSProperties} from "@mui/styles";
|
|
16
|
-
|
|
17
|
-
const isDocumentDefined = typeof document !== 'undefined'
|
|
18
|
-
|
|
19
|
-
export interface IFieldsSectionProps {
|
|
20
|
-
formFields?: IFormFieldsSection[];
|
|
21
|
-
values: FormikValues;
|
|
22
|
-
setFieldValue: (
|
|
23
|
-
field: string,
|
|
24
|
-
value: FormikValues,
|
|
25
|
-
shouldValidate?: boolean | undefined
|
|
26
|
-
) => void;
|
|
27
|
-
|
|
28
|
-
countries?: { [key: string]: string | number }[];
|
|
29
|
-
theme?: 'dark' | 'light';
|
|
30
|
-
themeOptions?: ThemeOptions & {
|
|
31
|
-
input?: CSSProperties;
|
|
32
|
-
checkbox?: CSSProperties;
|
|
33
|
-
};
|
|
34
|
-
containerClass?: string;
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
const SectionContainer: FC<{ className: string }> = ({
|
|
38
|
-
children,
|
|
39
|
-
className,
|
|
40
|
-
}) => <div className={className}>{children}</div>
|
|
41
|
-
|
|
42
|
-
const insertHTML = (elementId: string, text = '') => {
|
|
43
|
-
if (isDocumentDefined) {
|
|
44
|
-
const elem = document && document.getElementById(elementId)
|
|
45
|
-
|
|
46
|
-
if (!elem?.childNodes.length) {
|
|
47
|
-
elem?.insertAdjacentHTML('afterbegin', text)
|
|
48
|
-
}
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
return null
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
const getFieldClassNames = (id: string, existingClassNames: string) => {
|
|
55
|
-
if (isDocumentDefined) {
|
|
56
|
-
const elem = document && document.getElementById(id)
|
|
57
|
-
|
|
58
|
-
if ((elem?.parentElement?.clientWidth || 0) < 375) {
|
|
59
|
-
return existingClassNames + ' full-width'
|
|
60
|
-
}
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
return existingClassNames
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
export const FieldsSection = ({
|
|
67
|
-
formFields = [],
|
|
68
|
-
|
|
69
|
-
countries = [],
|
|
70
|
-
|
|
71
|
-
values,
|
|
72
|
-
setFieldValue,
|
|
73
|
-
theme,
|
|
74
|
-
containerClass = '',
|
|
75
|
-
themeOptions,
|
|
76
|
-
}: IFieldsSectionProps) => (
|
|
77
|
-
<>
|
|
78
|
-
{_map(formFields, (item, index) => {
|
|
79
|
-
const {
|
|
80
|
-
name,
|
|
81
|
-
groupLabel,
|
|
82
|
-
groupLabelVars = [],
|
|
83
|
-
groupLabelClassName,
|
|
84
|
-
groupClassName = '',
|
|
85
|
-
fields,
|
|
86
|
-
} = item
|
|
87
|
-
return (
|
|
88
|
-
<SectionContainer key={name} className={groupClassName}>
|
|
89
|
-
<span id={`group_label_${index}`} className={groupLabelClassName}>
|
|
90
|
-
{typeof groupLabel === 'string'
|
|
91
|
-
? insertHTML(
|
|
92
|
-
`group_label_${index}`,
|
|
93
|
-
replaceVarInString(groupLabel, groupLabelVars)
|
|
94
|
-
)
|
|
95
|
-
: groupLabel}
|
|
96
|
-
</span>
|
|
97
|
-
<div className={`fields-container ${groupClassName}`}>
|
|
98
|
-
{_map(fields, (fieldData, fieldIndex) => {
|
|
99
|
-
const {
|
|
100
|
-
name,
|
|
101
|
-
label,
|
|
102
|
-
className = 'full-width',
|
|
103
|
-
type,
|
|
104
|
-
component,
|
|
105
|
-
options = [],
|
|
106
|
-
} = fieldData
|
|
107
|
-
const id = `${name}-${fieldIndex}`
|
|
108
|
-
const classNames = `${containerClass}-container__field ${className}`
|
|
109
|
-
|
|
110
|
-
return (
|
|
111
|
-
component || (
|
|
112
|
-
<div
|
|
113
|
-
key={name}
|
|
114
|
-
id={id}
|
|
115
|
-
className={getFieldClassNames(id, classNames)}
|
|
116
|
-
>
|
|
117
|
-
<Field
|
|
118
|
-
name={name}
|
|
119
|
-
label={label}
|
|
120
|
-
type={type}
|
|
121
|
-
validate={getValidateFunctions({
|
|
122
|
-
element: fieldData,
|
|
123
|
-
values,
|
|
124
|
-
})}
|
|
125
|
-
setFieldValue={setFieldValue}
|
|
126
|
-
component={
|
|
127
|
-
type === 'checkbox'
|
|
128
|
-
? CheckboxField
|
|
129
|
-
: type === 'select'
|
|
130
|
-
? NativeSelectField
|
|
131
|
-
: type === 'phone'
|
|
132
|
-
? PhoneNumberField
|
|
133
|
-
: type === 'date'
|
|
134
|
-
? DatePickerField
|
|
135
|
-
: CustomField
|
|
136
|
-
}
|
|
137
|
-
selectOptions={name === 'country' ? countries : options}
|
|
138
|
-
theme={theme}
|
|
139
|
-
themeOptions={themeOptions}
|
|
140
|
-
/>
|
|
141
|
-
</div>
|
|
142
|
-
)
|
|
143
|
-
)
|
|
144
|
-
})}
|
|
145
|
-
</div>
|
|
146
|
-
</SectionContainer>
|
|
147
|
-
)
|
|
148
|
-
})}
|
|
149
|
-
</>
|
|
150
|
-
)
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
import _isEmpty from 'lodash/isEmpty'
|
|
2
|
-
import _map from 'lodash/map'
|
|
3
|
-
import React from 'react'
|
|
4
|
-
|
|
5
|
-
export const Influancers = (props: IInfluancersProps) => {
|
|
6
|
-
const {
|
|
7
|
-
data,
|
|
8
|
-
classNamePrefix,
|
|
9
|
-
headerNode = (
|
|
10
|
-
<>
|
|
11
|
-
TOP
|
|
12
|
-
<span> INFLUANCERS</span>
|
|
13
|
-
</>
|
|
14
|
-
),
|
|
15
|
-
} = props
|
|
16
|
-
return (
|
|
17
|
-
<div className={`${classNamePrefix}_influencers_container`}>
|
|
18
|
-
{!_isEmpty(data) && (
|
|
19
|
-
<div className={`${classNamePrefix}_influencers_header`}>{headerNode}</div>
|
|
20
|
-
)}
|
|
21
|
-
<div className={`${classNamePrefix}_influencers`}>
|
|
22
|
-
{_map(data, (influencer, index) => (
|
|
23
|
-
<div key={influencer.prereg_id} className={`${classNamePrefix}_influencer`}>
|
|
24
|
-
<span className={`${classNamePrefix}_influencer_index`}>{index + 1}</span>
|
|
25
|
-
<span className={`${classNamePrefix}_influencer_title`}>INFLUENCER</span>
|
|
26
|
-
<span className={`${classNamePrefix}_influencer_name`}>
|
|
27
|
-
{influencer.name}
|
|
28
|
-
</span>
|
|
29
|
-
</div>
|
|
30
|
-
))}
|
|
31
|
-
</div>
|
|
32
|
-
</div>
|
|
33
|
-
)
|
|
34
|
-
}
|
|
@@ -1,186 +0,0 @@
|
|
|
1
|
-
import "./style.css"
|
|
2
|
-
|
|
3
|
-
import { ThemeOptions } from '@mui/material'
|
|
4
|
-
import { createTheme, ThemeProvider } from '@mui/material/styles'
|
|
5
|
-
import { CSSProperties } from '@mui/styles'
|
|
6
|
-
import axios, { AxiosError } from 'axios'
|
|
7
|
-
import _get from 'lodash/get'
|
|
8
|
-
import _identity from 'lodash/identity'
|
|
9
|
-
import _isEmpaty from 'lodash/isEmpty'
|
|
10
|
-
import React, { FC, useEffect, useState } from 'react'
|
|
11
|
-
|
|
12
|
-
import {
|
|
13
|
-
getPreRegistrationInfluencers,
|
|
14
|
-
getPreRegistrationShareOptions,
|
|
15
|
-
} from '../../api/preRegistrationComplete'
|
|
16
|
-
import { X_TF_ECOMMERCE } from '../../constants'
|
|
17
|
-
import { useCookieListener } from '../../hooks'
|
|
18
|
-
import { getCookieByName, getQueryVariable } from '../../utils'
|
|
19
|
-
import { CopyMessageModal } from '../common'
|
|
20
|
-
import ConfirmModal from '../confirmModal'
|
|
21
|
-
import { LoginModal } from '../loginModal'
|
|
22
|
-
import { Prewards } from './Prewards'
|
|
23
|
-
import { ShareOptions } from './ShareOptions'
|
|
24
|
-
|
|
25
|
-
const isWindowDefined = typeof window !== 'undefined'
|
|
26
|
-
|
|
27
|
-
export const PreRegistrationComplete: FC<
|
|
28
|
-
IPreRegistrationCompleteProps & {
|
|
29
|
-
onGetConfirmationDataError?: (error: AxiosError) => void;
|
|
30
|
-
skipInitialValidation?: boolean;
|
|
31
|
-
themeOptions?: ThemeOptions & {
|
|
32
|
-
input?: CSSProperties;
|
|
33
|
-
checkbox?: CSSProperties;
|
|
34
|
-
};
|
|
35
|
-
}
|
|
36
|
-
> = ({
|
|
37
|
-
eventId: pEventId,
|
|
38
|
-
classNamePrefix = '',
|
|
39
|
-
onLinkCopied = _identity,
|
|
40
|
-
hasCopyIcon = false,
|
|
41
|
-
pageHeader = 'Pre-Registration Confirmation',
|
|
42
|
-
onGetConfirmationDataError = _identity,
|
|
43
|
-
onGetConfirmationDataSuccess = _identity,
|
|
44
|
-
pageMessage = 'Pre registration was successful!',
|
|
45
|
-
onLoginSuccess = _identity,
|
|
46
|
-
logo,
|
|
47
|
-
themeOptions,
|
|
48
|
-
skipInitialValidation = false,
|
|
49
|
-
}) => {
|
|
50
|
-
const themeMui = createTheme(themeOptions)
|
|
51
|
-
|
|
52
|
-
const localStorageHash = isWindowDefined
|
|
53
|
-
? localStorage.getItem('pre-registration-hash')
|
|
54
|
-
: ''
|
|
55
|
-
const queryHash = getQueryVariable('hash') || ''
|
|
56
|
-
queryHash &&
|
|
57
|
-
isWindowDefined &&
|
|
58
|
-
window.localStorage.setItem('pre-registration-hash', queryHash)
|
|
59
|
-
const hash = queryHash || localStorageHash
|
|
60
|
-
const [isLoggedIn, setIsLoggedIn] = useState(Boolean(getCookieByName(X_TF_ECOMMERCE)))
|
|
61
|
-
const [showModalLogin, setShowModalLogin] = useState(!isLoggedIn)
|
|
62
|
-
const [showCopyModal, setShowCopyModal] = useState(false)
|
|
63
|
-
const [prizes, setPrizes] = useState([] as Array<IPrizeData>)
|
|
64
|
-
const [shareOptions, setShareOptions] = useState({} as IShareOptionsData)
|
|
65
|
-
const [shareActionData, setShareActionData] = useState(
|
|
66
|
-
{} as ISubmitShareActionAttributes
|
|
67
|
-
)
|
|
68
|
-
const [error, setError] = useState({} as AxiosError)
|
|
69
|
-
useCookieListener(X_TF_ECOMMERCE, value => setIsLoggedIn(Boolean(value)))
|
|
70
|
-
useEffect(() => {
|
|
71
|
-
const fetchConfirmationData = async () => {
|
|
72
|
-
// Skip validation if this is a freshly completed pre-registration
|
|
73
|
-
if (skipInitialValidation) {
|
|
74
|
-
onGetConfirmationDataSuccess()
|
|
75
|
-
return
|
|
76
|
-
}
|
|
77
|
-
|
|
78
|
-
try {
|
|
79
|
-
if (hash && isLoggedIn) {
|
|
80
|
-
const shareOptionsData = await getPreRegistrationShareOptions({
|
|
81
|
-
hash,
|
|
82
|
-
})
|
|
83
|
-
const { attributes } = shareOptionsData.data
|
|
84
|
-
setShareOptions(shareOptionsData.data)
|
|
85
|
-
setShareActionData({
|
|
86
|
-
shareActionToken: attributes.shareActionToken,
|
|
87
|
-
tokenShuffleMethod: attributes.tokenShuffleMethod,
|
|
88
|
-
})
|
|
89
|
-
const eventId = _get(shareOptionsData, 'data.attributes.eventId')
|
|
90
|
-
if (eventId || pEventId) {
|
|
91
|
-
const influencersData = await getPreRegistrationInfluencers({
|
|
92
|
-
eventId: eventId || pEventId,
|
|
93
|
-
})
|
|
94
|
-
setPrizes(influencersData.data.attributes.prizes)
|
|
95
|
-
}
|
|
96
|
-
onGetConfirmationDataSuccess()
|
|
97
|
-
}
|
|
98
|
-
} catch (error) {
|
|
99
|
-
if (axios.isAxiosError(error)) {
|
|
100
|
-
setError(error.response?.data as AxiosError)
|
|
101
|
-
}
|
|
102
|
-
}
|
|
103
|
-
}
|
|
104
|
-
fetchConfirmationData()
|
|
105
|
-
}, [
|
|
106
|
-
pEventId,
|
|
107
|
-
hash,
|
|
108
|
-
onGetConfirmationDataError,
|
|
109
|
-
onGetConfirmationDataSuccess,
|
|
110
|
-
isLoggedIn,
|
|
111
|
-
skipInitialValidation,
|
|
112
|
-
])
|
|
113
|
-
|
|
114
|
-
const onClose = () => {
|
|
115
|
-
setShowCopyModal(false)
|
|
116
|
-
}
|
|
117
|
-
|
|
118
|
-
const updateShareActionData = async () => {
|
|
119
|
-
if (hash) {
|
|
120
|
-
const shareOptionsData = await getPreRegistrationShareOptions({
|
|
121
|
-
hash,
|
|
122
|
-
})
|
|
123
|
-
setShareOptions(shareOptionsData.data)
|
|
124
|
-
setShareActionData({
|
|
125
|
-
shareActionToken: shareOptionsData.data.attributes.shareActionToken,
|
|
126
|
-
tokenShuffleMethod: shareOptionsData.data.attributes.tokenShuffleMethod,
|
|
127
|
-
})
|
|
128
|
-
}
|
|
129
|
-
}
|
|
130
|
-
return (
|
|
131
|
-
<ThemeProvider theme={themeMui}>
|
|
132
|
-
{isLoggedIn && _isEmpaty(error) ? (
|
|
133
|
-
<div className={`${classNamePrefix}_pre_registration_complete_container`}>
|
|
134
|
-
<CopyMessageModal showCopyModal={showCopyModal} onClose={onClose} />
|
|
135
|
-
<h2 className={`${classNamePrefix}_pre_registration_complete_header preregistration_confirmation_header`}>
|
|
136
|
-
{pageHeader}
|
|
137
|
-
</h2>
|
|
138
|
-
<div className={`${classNamePrefix}_pre_registration_complete_message`}>
|
|
139
|
-
{pageMessage}
|
|
140
|
-
</div>
|
|
141
|
-
<div className={`${classNamePrefix}_pre_registration_complete_body`}>
|
|
142
|
-
{!_isEmpaty(prizes) && (
|
|
143
|
-
<Prewards classNamePrefix={classNamePrefix} data={prizes} />
|
|
144
|
-
)}
|
|
145
|
-
|
|
146
|
-
{!_isEmpaty(shareOptions) && (
|
|
147
|
-
<ShareOptions
|
|
148
|
-
classNamePrefix={classNamePrefix}
|
|
149
|
-
data={shareOptions}
|
|
150
|
-
onLinkCopied={() => {
|
|
151
|
-
setShowCopyModal(true)
|
|
152
|
-
onLinkCopied()
|
|
153
|
-
}}
|
|
154
|
-
shareActionData={shareActionData}
|
|
155
|
-
updateShareActionData={updateShareActionData}
|
|
156
|
-
hasCopyIcon={hasCopyIcon}
|
|
157
|
-
hash={hash}
|
|
158
|
-
/>
|
|
159
|
-
)}
|
|
160
|
-
</div>
|
|
161
|
-
</div>
|
|
162
|
-
) : (
|
|
163
|
-
showModalLogin && (
|
|
164
|
-
<LoginModal
|
|
165
|
-
logo={logo}
|
|
166
|
-
onClose={() => {
|
|
167
|
-
setShowModalLogin(false)
|
|
168
|
-
}}
|
|
169
|
-
onLogin={res => {
|
|
170
|
-
setShowModalLogin(false)
|
|
171
|
-
onLoginSuccess(res)
|
|
172
|
-
}}
|
|
173
|
-
showForgotPasswordButton
|
|
174
|
-
/>
|
|
175
|
-
)
|
|
176
|
-
)}
|
|
177
|
-
{!_isEmpaty(error) && (
|
|
178
|
-
<ConfirmModal
|
|
179
|
-
hideCancelBtn
|
|
180
|
-
message={error.message}
|
|
181
|
-
onConfirm={() => onGetConfirmationDataError(error)}
|
|
182
|
-
/>
|
|
183
|
-
)}
|
|
184
|
-
</ThemeProvider>
|
|
185
|
-
)
|
|
186
|
-
}
|
|
@@ -1,60 +0,0 @@
|
|
|
1
|
-
import { createTheme, ThemeProvider } from '@mui/material/styles'
|
|
2
|
-
import _identity from 'lodash/identity'
|
|
3
|
-
import _slice from 'lodash/slice'
|
|
4
|
-
import React, { useEffect, useState } from 'react'
|
|
5
|
-
|
|
6
|
-
import { getPreRegistrationInfluencers } from '../../api/preRegistrationComplete'
|
|
7
|
-
import { Influancers } from './Influancers'
|
|
8
|
-
import { Prewards } from './Prewards'
|
|
9
|
-
|
|
10
|
-
export const PreRegistrationInformations = (props: IPreRegistrationInformationProps) => {
|
|
11
|
-
const {
|
|
12
|
-
classNamePrefix,
|
|
13
|
-
eventId,
|
|
14
|
-
onGetPreregistrationDataSuccess = _identity,
|
|
15
|
-
onGetPreregistrationDataError = _identity,
|
|
16
|
-
influancersHeaderNode,
|
|
17
|
-
prewardsHeaderNode,
|
|
18
|
-
themeOptions,
|
|
19
|
-
} = props
|
|
20
|
-
|
|
21
|
-
const themeMui = createTheme(themeOptions)
|
|
22
|
-
|
|
23
|
-
const [prizes, setPrizes] = useState([] as Array<IPrizeData>)
|
|
24
|
-
const [influencers, setInfluencers] = useState([] as Array<IInfluencerData>)
|
|
25
|
-
const topInfluancers = _slice(influencers, 0, 10)
|
|
26
|
-
useEffect(() => {
|
|
27
|
-
const fetchPreregistrationData = async () => {
|
|
28
|
-
try {
|
|
29
|
-
const preregistrationData = await getPreRegistrationInfluencers({
|
|
30
|
-
eventId,
|
|
31
|
-
})
|
|
32
|
-
setPrizes(preregistrationData.data.attributes.prizes)
|
|
33
|
-
setInfluencers(preregistrationData.data.attributes.influencers)
|
|
34
|
-
onGetPreregistrationDataSuccess()
|
|
35
|
-
} catch (error) {
|
|
36
|
-
if (error) {
|
|
37
|
-
onGetPreregistrationDataError()
|
|
38
|
-
}
|
|
39
|
-
}
|
|
40
|
-
}
|
|
41
|
-
fetchPreregistrationData()
|
|
42
|
-
}, [eventId, onGetPreregistrationDataError, onGetPreregistrationDataSuccess])
|
|
43
|
-
|
|
44
|
-
return (
|
|
45
|
-
<ThemeProvider theme={themeMui}>
|
|
46
|
-
<div className={`${classNamePrefix}_pre_registration_info_container`}>
|
|
47
|
-
<Prewards
|
|
48
|
-
headerNode={prewardsHeaderNode}
|
|
49
|
-
data={prizes}
|
|
50
|
-
classNamePrefix={classNamePrefix}
|
|
51
|
-
/>
|
|
52
|
-
<Influancers
|
|
53
|
-
headerNode={influancersHeaderNode}
|
|
54
|
-
data={topInfluancers}
|
|
55
|
-
classNamePrefix={classNamePrefix}
|
|
56
|
-
/>
|
|
57
|
-
</div>
|
|
58
|
-
</ThemeProvider>
|
|
59
|
-
)
|
|
60
|
-
}
|
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
import _isEmpty from 'lodash/isEmpty'
|
|
2
|
-
import _map from 'lodash/map'
|
|
3
|
-
import React from 'react'
|
|
4
|
-
|
|
5
|
-
export const Prewards = (props: IPrewardsProps) => {
|
|
6
|
-
const {
|
|
7
|
-
data,
|
|
8
|
-
classNamePrefix = '',
|
|
9
|
-
headerNode = (
|
|
10
|
-
<>
|
|
11
|
-
PRE
|
|
12
|
-
<span>WARDS™</span>
|
|
13
|
-
</>
|
|
14
|
-
),
|
|
15
|
-
} = props
|
|
16
|
-
return (
|
|
17
|
-
<div className={`${classNamePrefix}_prewards`}>
|
|
18
|
-
{!_isEmpty(data) && (
|
|
19
|
-
<div className={`${classNamePrefix}_prewards_heder`}>{headerNode}</div>
|
|
20
|
-
)}
|
|
21
|
-
<div className={`${classNamePrefix}_prizes`}>
|
|
22
|
-
{_map(data, prize => {
|
|
23
|
-
const { description, name, image, id } = prize
|
|
24
|
-
return (
|
|
25
|
-
<div className={`${classNamePrefix}_prize`} key={id}>
|
|
26
|
-
{image && <img className={`${classNamePrefix}_image`} alt="" src={image} />}
|
|
27
|
-
<div className={`${classNamePrefix}_info`}>
|
|
28
|
-
<h4 className={`${classNamePrefix}_name`}>{name}</h4>
|
|
29
|
-
{description && (
|
|
30
|
-
<article className={`${classNamePrefix}_description`}>
|
|
31
|
-
{description}
|
|
32
|
-
</article>
|
|
33
|
-
)}
|
|
34
|
-
</div>
|
|
35
|
-
</div>
|
|
36
|
-
)
|
|
37
|
-
})}
|
|
38
|
-
</div>
|
|
39
|
-
</div>
|
|
40
|
-
)
|
|
41
|
-
}
|