tf-checkout-react 2.0.0-beta.1 → 2.0.0-beta.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.esm.js +473 -263
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +473 -263
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/src/EmbeddedCheckout.tsx +6 -1
- package/src/auth/AuthModal.tsx +3 -3
- package/src/auth/ForgotPasswordForm.tsx +4 -6
- package/src/auth/LoginForm.tsx +2 -2
- package/src/auth/RegisterForm.tsx +2 -2
- package/src/auth/ResetPasswordForm.tsx +7 -7
- package/src/configure.ts +1 -5
- package/src/confirmer.ts +1 -5
- package/src/sections/AddOns.tsx +14 -7
- package/src/sections/BillingInfo.tsx +40 -33
- package/src/sections/Confirmation.tsx +8 -6
- package/src/sections/OrderSummary.tsx +7 -5
- package/src/sections/Payment.tsx +17 -13
- package/src/sections/Tickets.tsx +32 -15
- package/src/sections/billing/BillingAddressFields.tsx +19 -13
- package/src/sections/billing/TicketHoldersCard.tsx +103 -94
- package/src/ui/CheckoutProvider.tsx +5 -1
- package/src/ui/InstallmentPicker.tsx +4 -2
- package/src/ui/PaymentMethods.tsx +82 -76
- package/src/ui/TimerBanner.tsx +7 -3
package/dist/index.js
CHANGED
|
@@ -4285,7 +4285,91 @@ var en = {
|
|
|
4285
4285
|
"referral.inviteFriends": "Invite friends",
|
|
4286
4286
|
"referral.howToInvite": "How do you invite your friends?",
|
|
4287
4287
|
"referral.sendThisLink": "Send them this link:",
|
|
4288
|
-
"referral.howMuchCheaper": "How much cheaper?"
|
|
4288
|
+
"referral.howMuchCheaper": "How much cheaper?",
|
|
4289
|
+
// --- Checkout body (localization pass) ---------------------------------
|
|
4290
|
+
"common.submit": "Submit",
|
|
4291
|
+
"common.each": "each",
|
|
4292
|
+
"billing.heading": "Billing Information",
|
|
4293
|
+
"billing.continueToPayment": "Continue to payment",
|
|
4294
|
+
"billing.ttfOptIn": "Keep me updated about future events from The Ticket Fairy",
|
|
4295
|
+
"billing.fieldRequired": "This field is required.",
|
|
4296
|
+
"billing.firstNamePlaceholder": "First name *",
|
|
4297
|
+
"billing.lastNamePlaceholder": "Last name *",
|
|
4298
|
+
"billing.emailMustMatch": "Email addresses must match.",
|
|
4299
|
+
"billing.emailInvalid": "Enter a valid email address.",
|
|
4300
|
+
"billing.emailRegistered": "This email is already registered.",
|
|
4301
|
+
"billing.loginAutofill": "Log in to autofill your details",
|
|
4302
|
+
"billing.loginAutofillPlain": "Log in to autofill your details.",
|
|
4303
|
+
"billing.firstNameRequired": "First name is required.",
|
|
4304
|
+
"billing.lastNameRequired": "Last name is required.",
|
|
4305
|
+
"billing.streetRequired": "Street address is required.",
|
|
4306
|
+
"billing.cityRequired": "City is required.",
|
|
4307
|
+
"billing.postcodeRequired": "ZIP / postcode is required.",
|
|
4308
|
+
"billing.countryRequired": "Country is required.",
|
|
4309
|
+
"billing.stateRequired": "State / county is required.",
|
|
4310
|
+
"billing.countryEmpty": "\u2014 country * \u2014",
|
|
4311
|
+
"billing.stateEmpty": "\u2014 state / county \u2014",
|
|
4312
|
+
"billing.stateEmptyRequired": "\u2014 state / county * \u2014",
|
|
4313
|
+
"billing.holderTitle": "Ticket {{number}}",
|
|
4314
|
+
"billing.nationality": "Nationality",
|
|
4315
|
+
"billing.gender": "Gender",
|
|
4316
|
+
"billing.instagramHandle": "Instagram handle",
|
|
4317
|
+
"billing.phoneOptional": "Phone",
|
|
4318
|
+
"billing.phoneAria": "Phone",
|
|
4319
|
+
"billing.phoneInvalid": "Enter a valid phone number.",
|
|
4320
|
+
"billing.phonePlaceholder": "Phone number",
|
|
4321
|
+
"billing.dob": "Date of birth *",
|
|
4322
|
+
"billing.dobWithAge": "Date of birth * (must be {{age}}+)",
|
|
4323
|
+
"billing.dobRequired": "Date of birth is required.",
|
|
4324
|
+
"billing.ageMinimum": "You must be {{age}} or older.",
|
|
4325
|
+
"billing.privacyAgree": "I have read and agree to {{brand}}",
|
|
4326
|
+
"billing.privacyLink": "Privacy Policy.",
|
|
4327
|
+
"tickets.getTickets": "Get tickets",
|
|
4328
|
+
"tickets.selectOnMap": "Select on map",
|
|
4329
|
+
"tickets.selectSeats": "Select seats",
|
|
4330
|
+
"tickets.hideInfo": "Hide info",
|
|
4331
|
+
"tickets.viewInfo": "View info",
|
|
4332
|
+
"tickets.salesNotStarted": "Sales not started",
|
|
4333
|
+
"tickets.salesEnded": "Sales Ended",
|
|
4334
|
+
"tickets.accessCode": "Access code",
|
|
4335
|
+
"tickets.promoCode": "Promo code",
|
|
4336
|
+
"tickets.reserving": "Reserving\u2026",
|
|
4337
|
+
"addons.eyebrow": "Get Your Tickets",
|
|
4338
|
+
"addons.heading": "UPGRADES & ADD-ONS",
|
|
4339
|
+
"addons.confirmSelection": "CONFIRM SELECTION",
|
|
4340
|
+
"addons.updating": "Updating\u2026",
|
|
4341
|
+
"payment.title": "Payment",
|
|
4342
|
+
"payment.card": "Card",
|
|
4343
|
+
"payment.paymentPlan": "Payment plan",
|
|
4344
|
+
"payment.oxxo": "OXXO (pay in cash)",
|
|
4345
|
+
"payment.submitPayment": "Submit Payment",
|
|
4346
|
+
"payment.completeRegistration": "Complete Registration",
|
|
4347
|
+
"payment.placing": "Placing\u2026",
|
|
4348
|
+
"payment.testCard": "Test card: 4242 4242 4242 4242 \xB7 any future date \xB7 any CVC",
|
|
4349
|
+
"payment.testCardXendit": "Test card: 4000 0000 0000 0002 \xB7 any future date \xB7 any CVC",
|
|
4350
|
+
"confirmation.pending": "Payment pending",
|
|
4351
|
+
"confirmation.confirmed": "Your Tickets are Confirmed!",
|
|
4352
|
+
"confirmation.pendingBody": "We\u2019ll email your tickets as soon as the payment settles.",
|
|
4353
|
+
"confirmation.alreadyPaid": "This order was already paid \u2014 nothing was charged again.",
|
|
4354
|
+
"confirmation.available": "Your tickets are available in the My Tickets section \u2014 please bring them with you to the event.",
|
|
4355
|
+
"referral.copied": "Copied!",
|
|
4356
|
+
"referral.copyLink": "Copy link",
|
|
4357
|
+
"timer.completePurchase": "Please complete your purchase before the timer reaches zero.",
|
|
4358
|
+
"auth.logIn": "Log in",
|
|
4359
|
+
"auth.signUp": "Sign Up",
|
|
4360
|
+
"auth.passwordReset": "Password reset",
|
|
4361
|
+
"auth.backToLogin": "Back to log in",
|
|
4362
|
+
"auth.sendResetInstructions": "Send reset instructions",
|
|
4363
|
+
"auth.createAccount": "Create Account",
|
|
4364
|
+
"auth.forgotPassword": "Forgot password?",
|
|
4365
|
+
"auth.forgotIntro": "Enter your email and we\u2019ll send you instructions to reset your password.",
|
|
4366
|
+
"auth.missingToken": "This password-reset link is missing its token.",
|
|
4367
|
+
"auth.passwordTooShort": "Password must have at least 8 characters.",
|
|
4368
|
+
"auth.passwordNeedsSpecial": "Password must contain at least one special character.",
|
|
4369
|
+
"auth.passwordsMustMatch": "Passwords must match.",
|
|
4370
|
+
"auth.passwordChanged": "Your password has been changed. You can now log in.",
|
|
4371
|
+
"auth.selectState": "Select state / region",
|
|
4372
|
+
"auth.notRequired": "Not required"
|
|
4289
4373
|
};
|
|
4290
4374
|
|
|
4291
4375
|
// ../tf-checkout-shared/src/i18n/resolve.ts
|
|
@@ -4417,7 +4501,91 @@ var esMX = {
|
|
|
4417
4501
|
"referral.inviteFriends": "Invita a tus amigos",
|
|
4418
4502
|
"referral.howToInvite": "\xBFC\xF3mo invitas a tus amigos?",
|
|
4419
4503
|
"referral.sendThisLink": "Env\xEDales este enlace:",
|
|
4420
|
-
"referral.howMuchCheaper": "\xBFCu\xE1nto m\xE1s barato?"
|
|
4504
|
+
"referral.howMuchCheaper": "\xBFCu\xE1nto m\xE1s barato?",
|
|
4505
|
+
// --- Checkout body (localization pass) ---------------------------------
|
|
4506
|
+
"common.submit": "Enviar",
|
|
4507
|
+
"common.each": "c/u",
|
|
4508
|
+
"billing.heading": "Informaci\xF3n de facturaci\xF3n",
|
|
4509
|
+
"billing.continueToPayment": "Continuar al pago",
|
|
4510
|
+
"billing.ttfOptIn": "Quiero recibir novedades sobre pr\xF3ximos eventos de The Ticket Fairy",
|
|
4511
|
+
"billing.fieldRequired": "Este campo es obligatorio.",
|
|
4512
|
+
"billing.firstNamePlaceholder": "Nombre *",
|
|
4513
|
+
"billing.lastNamePlaceholder": "Apellido *",
|
|
4514
|
+
"billing.emailMustMatch": "Los correos electr\xF3nicos deben coincidir.",
|
|
4515
|
+
"billing.emailInvalid": "Ingresa un correo electr\xF3nico v\xE1lido.",
|
|
4516
|
+
"billing.emailRegistered": "Este correo ya est\xE1 registrado.",
|
|
4517
|
+
"billing.loginAutofill": "Inicia sesi\xF3n para completar tus datos",
|
|
4518
|
+
"billing.loginAutofillPlain": "Inicia sesi\xF3n para completar tus datos.",
|
|
4519
|
+
"billing.firstNameRequired": "El nombre es obligatorio.",
|
|
4520
|
+
"billing.lastNameRequired": "El apellido es obligatorio.",
|
|
4521
|
+
"billing.streetRequired": "La calle y n\xFAmero son obligatorios.",
|
|
4522
|
+
"billing.cityRequired": "La ciudad es obligatoria.",
|
|
4523
|
+
"billing.postcodeRequired": "El c\xF3digo postal es obligatorio.",
|
|
4524
|
+
"billing.countryRequired": "El pa\xEDs es obligatorio.",
|
|
4525
|
+
"billing.stateRequired": "El estado es obligatorio.",
|
|
4526
|
+
"billing.countryEmpty": "\u2014 pa\xEDs * \u2014",
|
|
4527
|
+
"billing.stateEmpty": "\u2014 estado \u2014",
|
|
4528
|
+
"billing.stateEmptyRequired": "\u2014 estado * \u2014",
|
|
4529
|
+
"billing.holderTitle": "Boleto {{number}}",
|
|
4530
|
+
"billing.nationality": "Nacionalidad",
|
|
4531
|
+
"billing.gender": "G\xE9nero",
|
|
4532
|
+
"billing.instagramHandle": "Usuario de Instagram",
|
|
4533
|
+
"billing.phoneOptional": "Tel\xE9fono",
|
|
4534
|
+
"billing.phoneAria": "Tel\xE9fono",
|
|
4535
|
+
"billing.phoneInvalid": "Ingresa un n\xFAmero de tel\xE9fono v\xE1lido.",
|
|
4536
|
+
"billing.phonePlaceholder": "N\xFAmero de tel\xE9fono",
|
|
4537
|
+
"billing.dob": "Fecha de nacimiento *",
|
|
4538
|
+
"billing.dobWithAge": "Fecha de nacimiento * (debes tener {{age}}+)",
|
|
4539
|
+
"billing.dobRequired": "La fecha de nacimiento es obligatoria.",
|
|
4540
|
+
"billing.ageMinimum": "Debes tener {{age}} a\xF1os o m\xE1s.",
|
|
4541
|
+
"billing.privacyAgree": "He le\xEDdo y acepto el",
|
|
4542
|
+
"billing.privacyLink": "Aviso de Privacidad.",
|
|
4543
|
+
"tickets.getTickets": "Comprar boletos",
|
|
4544
|
+
"tickets.selectOnMap": "Seleccionar en el mapa",
|
|
4545
|
+
"tickets.selectSeats": "Seleccionar asientos",
|
|
4546
|
+
"tickets.hideInfo": "Ocultar informaci\xF3n",
|
|
4547
|
+
"tickets.viewInfo": "Ver informaci\xF3n",
|
|
4548
|
+
"tickets.salesNotStarted": "Venta no iniciada",
|
|
4549
|
+
"tickets.salesEnded": "Venta finalizada",
|
|
4550
|
+
"tickets.accessCode": "C\xF3digo de acceso",
|
|
4551
|
+
"tickets.promoCode": "C\xF3digo promocional",
|
|
4552
|
+
"tickets.reserving": "Reservando\u2026",
|
|
4553
|
+
"addons.eyebrow": "Obt\xE9n tus boletos",
|
|
4554
|
+
"addons.heading": "MEJORAS Y COMPLEMENTOS",
|
|
4555
|
+
"addons.confirmSelection": "CONFIRMAR SELECCI\xD3N",
|
|
4556
|
+
"addons.updating": "Actualizando\u2026",
|
|
4557
|
+
"payment.title": "Pago",
|
|
4558
|
+
"payment.card": "Tarjeta",
|
|
4559
|
+
"payment.paymentPlan": "Plan de pagos",
|
|
4560
|
+
"payment.oxxo": "OXXO (pago en efectivo)",
|
|
4561
|
+
"payment.submitPayment": "Pagar",
|
|
4562
|
+
"payment.completeRegistration": "Completar registro",
|
|
4563
|
+
"payment.placing": "Procesando\u2026",
|
|
4564
|
+
"payment.testCard": "Tarjeta de prueba: 4242 4242 4242 4242 \xB7 cualquier fecha futura \xB7 cualquier CVC",
|
|
4565
|
+
"payment.testCardXendit": "Tarjeta de prueba: 4000 0000 0000 0002 \xB7 cualquier fecha futura \xB7 cualquier CVC",
|
|
4566
|
+
"confirmation.pending": "Pago pendiente",
|
|
4567
|
+
"confirmation.confirmed": "\xA1Tus boletos est\xE1n confirmados!",
|
|
4568
|
+
"confirmation.pendingBody": "Te enviaremos tus boletos por correo en cuanto se acredite el pago.",
|
|
4569
|
+
"confirmation.alreadyPaid": "Esta orden ya estaba pagada: no se te cobr\xF3 de nuevo.",
|
|
4570
|
+
"confirmation.available": "Tus boletos est\xE1n disponibles en la secci\xF3n Mis boletos. Recuerda llevarlos contigo al evento.",
|
|
4571
|
+
"referral.copied": "\xA1Copiado!",
|
|
4572
|
+
"referral.copyLink": "Copiar enlace",
|
|
4573
|
+
"timer.completePurchase": "Completa tu compra antes de que el temporizador llegue a cero.",
|
|
4574
|
+
"auth.logIn": "Iniciar sesi\xF3n",
|
|
4575
|
+
"auth.signUp": "Crear cuenta",
|
|
4576
|
+
"auth.passwordReset": "Restablecer contrase\xF1a",
|
|
4577
|
+
"auth.backToLogin": "Volver a iniciar sesi\xF3n",
|
|
4578
|
+
"auth.sendResetInstructions": "Enviar instrucciones",
|
|
4579
|
+
"auth.createAccount": "Crear cuenta",
|
|
4580
|
+
"auth.forgotPassword": "\xBFOlvidaste tu contrase\xF1a?",
|
|
4581
|
+
"auth.forgotIntro": "Ingresa tu correo y te enviaremos instrucciones para restablecer tu contrase\xF1a.",
|
|
4582
|
+
"auth.missingToken": "A este enlace de restablecimiento le falta el token.",
|
|
4583
|
+
"auth.passwordTooShort": "La contrase\xF1a debe tener al menos 8 caracteres.",
|
|
4584
|
+
"auth.passwordNeedsSpecial": "La contrase\xF1a debe incluir al menos un car\xE1cter especial.",
|
|
4585
|
+
"auth.passwordsMustMatch": "Las contrase\xF1as deben coincidir.",
|
|
4586
|
+
"auth.passwordChanged": "Tu contrase\xF1a se cambi\xF3. Ya puedes iniciar sesi\xF3n.",
|
|
4587
|
+
"auth.selectState": "Selecciona estado / regi\xF3n",
|
|
4588
|
+
"auth.notRequired": "No requerido"
|
|
4421
4589
|
};
|
|
4422
4590
|
|
|
4423
4591
|
// ../tf-checkout-shared/src/i18n/locales/index.ts
|
|
@@ -5307,6 +5475,7 @@ Button.displayName = "Button";
|
|
|
5307
5475
|
|
|
5308
5476
|
// src/ui/InstallmentPicker.tsx
|
|
5309
5477
|
var useInstallmentPicker = () => {
|
|
5478
|
+
const t = useT();
|
|
5310
5479
|
const [pending, setPending] = (0, import_react8.useState)(null);
|
|
5311
5480
|
const onInstallmentOffers = (0, import_react8.useCallback)(
|
|
5312
5481
|
(offers) => new Promise((resolve) => setPending({ offers, resolve })),
|
|
@@ -5321,9 +5490,9 @@ var useInstallmentPicker = () => {
|
|
|
5321
5490
|
{
|
|
5322
5491
|
className: "tf-checkout-installments",
|
|
5323
5492
|
role: "dialog",
|
|
5324
|
-
"aria-label": "
|
|
5493
|
+
"aria-label": t("payment.chooseInstallments")
|
|
5325
5494
|
},
|
|
5326
|
-
/* @__PURE__ */ import_react8.default.createElement("div", { className: "tf-checkout-installments__box" }, /* @__PURE__ */ import_react8.default.createElement("strong", null, "
|
|
5495
|
+
/* @__PURE__ */ import_react8.default.createElement("div", { className: "tf-checkout-installments__box" }, /* @__PURE__ */ import_react8.default.createElement("strong", null, t("payment.payInInstallments")), /* @__PURE__ */ import_react8.default.createElement("div", { className: "tf-checkout-installments__list" }, pending.offers.map((o, i) => {
|
|
5327
5496
|
var _a;
|
|
5328
5497
|
return /* @__PURE__ */ import_react8.default.createElement(
|
|
5329
5498
|
"button",
|
|
@@ -5667,63 +5836,73 @@ var PaymentMethods = ({
|
|
|
5667
5836
|
children,
|
|
5668
5837
|
inputSlotFor,
|
|
5669
5838
|
className
|
|
5670
|
-
}) =>
|
|
5671
|
-
|
|
5672
|
-
|
|
5673
|
-
|
|
5674
|
-
|
|
5675
|
-
|
|
5676
|
-
|
|
5677
|
-
|
|
5678
|
-
|
|
5679
|
-
|
|
5680
|
-
|
|
5681
|
-
|
|
5682
|
-
|
|
5683
|
-
|
|
5684
|
-
|
|
5685
|
-
|
|
5686
|
-
className: cx(
|
|
5687
|
-
"tf-checkout-payment__method",
|
|
5688
|
-
isSelected && "tf-checkout-payment__method--selected"
|
|
5689
|
-
)
|
|
5690
|
-
},
|
|
5691
|
-
/* @__PURE__ */ import_react13.default.createElement("span", { className: "tf-checkout-payment__method-head" }, /* @__PURE__ */ import_react13.default.createElement(
|
|
5692
|
-
"input",
|
|
5693
|
-
{
|
|
5694
|
-
type: "radio",
|
|
5695
|
-
name: "tf-pay-method",
|
|
5696
|
-
className: "tf-checkout-payment__method-radio",
|
|
5697
|
-
checked: isSelected,
|
|
5698
|
-
onChange: () => onSelect(o.value)
|
|
5699
|
-
}
|
|
5700
|
-
), o.iconUrl && /* @__PURE__ */ import_react13.default.createElement("img", { className: "tf-checkout-payment__method-icon", src: o.iconUrl, alt: "" }), /* @__PURE__ */ import_react13.default.createElement("span", { className: "tf-checkout-payment__method-label" }, o.label)),
|
|
5701
|
-
isSelected && (o.value === inputSlotFor || o.extra) && /* @__PURE__ */ import_react13.default.createElement("div", { className: "tf-checkout-payment__method-body" }, o.value === inputSlotFor && children, o.extra && /* @__PURE__ */ import_react13.default.createElement(
|
|
5702
|
-
Field,
|
|
5839
|
+
}) => {
|
|
5840
|
+
const t = useT();
|
|
5841
|
+
return /* @__PURE__ */ import_react13.default.createElement(
|
|
5842
|
+
"div",
|
|
5843
|
+
{
|
|
5844
|
+
className: cx("tf-checkout-payment__methods", className),
|
|
5845
|
+
role: "radiogroup",
|
|
5846
|
+
"aria-label": t("payment.method")
|
|
5847
|
+
},
|
|
5848
|
+
options.map((o) => {
|
|
5849
|
+
var _a, _b, _c, _d, _e, _f;
|
|
5850
|
+
const isSelected = o.value === selected;
|
|
5851
|
+
const extraValue = o.extra === "phoneNumber" ? (_a = extraValues[o.value]) == null ? void 0 : _a.phoneNumber : (_b = extraValues[o.value]) == null ? void 0 : _b.cashtag;
|
|
5852
|
+
const extraInvalid = Boolean(isSelected && o.extra && showValidation) && !(extraValue == null ? void 0 : extraValue.trim());
|
|
5853
|
+
return /* @__PURE__ */ import_react13.default.createElement(
|
|
5854
|
+
"label",
|
|
5703
5855
|
{
|
|
5704
|
-
|
|
5705
|
-
|
|
5706
|
-
|
|
5856
|
+
key: o.value,
|
|
5857
|
+
className: cx(
|
|
5858
|
+
"tf-checkout-payment__method",
|
|
5859
|
+
isSelected && "tf-checkout-payment__method--selected"
|
|
5860
|
+
)
|
|
5707
5861
|
},
|
|
5708
|
-
/* @__PURE__ */ import_react13.default.createElement(
|
|
5709
|
-
|
|
5862
|
+
/* @__PURE__ */ import_react13.default.createElement("span", { className: "tf-checkout-payment__method-head" }, /* @__PURE__ */ import_react13.default.createElement(
|
|
5863
|
+
"input",
|
|
5710
5864
|
{
|
|
5711
|
-
|
|
5712
|
-
|
|
5713
|
-
|
|
5714
|
-
|
|
5715
|
-
|
|
5716
|
-
value: o.extra === "phoneNumber" ? (_d = (_c = extraValues[o.value]) == null ? void 0 : _c.phoneNumber) != null ? _d : "" : (_f = (_e = extraValues[o.value]) == null ? void 0 : _e.cashtag) != null ? _f : "",
|
|
5717
|
-
onChange: (e) => onExtraChange(
|
|
5718
|
-
o.value,
|
|
5719
|
-
o.extra === "phoneNumber" ? { phoneNumber: e.target.value } : { cashtag: e.target.value }
|
|
5720
|
-
)
|
|
5865
|
+
type: "radio",
|
|
5866
|
+
name: "tf-pay-method",
|
|
5867
|
+
className: "tf-checkout-payment__method-radio",
|
|
5868
|
+
checked: isSelected,
|
|
5869
|
+
onChange: () => onSelect(o.value)
|
|
5721
5870
|
}
|
|
5722
|
-
)
|
|
5723
|
-
|
|
5724
|
-
|
|
5725
|
-
|
|
5726
|
-
|
|
5871
|
+
), o.iconUrl && /* @__PURE__ */ import_react13.default.createElement(
|
|
5872
|
+
"img",
|
|
5873
|
+
{
|
|
5874
|
+
className: "tf-checkout-payment__method-icon",
|
|
5875
|
+
src: o.iconUrl,
|
|
5876
|
+
alt: ""
|
|
5877
|
+
}
|
|
5878
|
+
), /* @__PURE__ */ import_react13.default.createElement("span", { className: "tf-checkout-payment__method-label" }, o.label)),
|
|
5879
|
+
isSelected && (o.value === inputSlotFor || o.extra) && /* @__PURE__ */ import_react13.default.createElement("div", { className: "tf-checkout-payment__method-body" }, o.value === inputSlotFor && children, o.extra && /* @__PURE__ */ import_react13.default.createElement(
|
|
5880
|
+
Field,
|
|
5881
|
+
{
|
|
5882
|
+
label: `${EXTRA_LABEL[o.extra]} *`,
|
|
5883
|
+
error: extraInvalid ? t("billing.fieldRequired") : void 0,
|
|
5884
|
+
invalid: extraInvalid
|
|
5885
|
+
},
|
|
5886
|
+
/* @__PURE__ */ import_react13.default.createElement(
|
|
5887
|
+
Input,
|
|
5888
|
+
{
|
|
5889
|
+
inputMode: o.extra === "phoneNumber" ? "tel" : "text",
|
|
5890
|
+
required: true,
|
|
5891
|
+
invalid: extraInvalid,
|
|
5892
|
+
"aria-invalid": extraInvalid,
|
|
5893
|
+
placeholder: o.extra === "phoneNumber" ? "e.g. 081234567890" : "$cashtag",
|
|
5894
|
+
value: o.extra === "phoneNumber" ? (_d = (_c = extraValues[o.value]) == null ? void 0 : _c.phoneNumber) != null ? _d : "" : (_f = (_e = extraValues[o.value]) == null ? void 0 : _e.cashtag) != null ? _f : "",
|
|
5895
|
+
onChange: (e) => onExtraChange(
|
|
5896
|
+
o.value,
|
|
5897
|
+
o.extra === "phoneNumber" ? { phoneNumber: e.target.value } : { cashtag: e.target.value }
|
|
5898
|
+
)
|
|
5899
|
+
}
|
|
5900
|
+
)
|
|
5901
|
+
))
|
|
5902
|
+
);
|
|
5903
|
+
})
|
|
5904
|
+
);
|
|
5905
|
+
};
|
|
5727
5906
|
|
|
5728
5907
|
// src/ui/Stepper.tsx
|
|
5729
5908
|
var import_react14 = __toESM(require("react"));
|
|
@@ -5812,9 +5991,10 @@ var clock2 = (s) => {
|
|
|
5812
5991
|
var TimerBanner = ({
|
|
5813
5992
|
seconds,
|
|
5814
5993
|
urgentAt = 60,
|
|
5815
|
-
message
|
|
5994
|
+
message,
|
|
5816
5995
|
className
|
|
5817
5996
|
}) => {
|
|
5997
|
+
const t = useT();
|
|
5818
5998
|
const [dismissed, setDismissed] = (0, import_react18.useState)(false);
|
|
5819
5999
|
if (seconds === void 0 || seconds <= 0 || dismissed) return null;
|
|
5820
6000
|
const urgent = seconds <= urgentAt;
|
|
@@ -5828,14 +6008,14 @@ var TimerBanner = ({
|
|
|
5828
6008
|
className
|
|
5829
6009
|
)
|
|
5830
6010
|
},
|
|
5831
|
-
/* @__PURE__ */ import_react18.default.createElement("span", { className: "tf-checkout-timerbanner__msg" }, message),
|
|
6011
|
+
/* @__PURE__ */ import_react18.default.createElement("span", { className: "tf-checkout-timerbanner__msg" }, message != null ? message : t("timer.completePurchase")),
|
|
5832
6012
|
/* @__PURE__ */ import_react18.default.createElement("span", { className: "tf-checkout-timerbanner__clock" }, clock2(seconds)),
|
|
5833
6013
|
/* @__PURE__ */ import_react18.default.createElement(
|
|
5834
6014
|
"button",
|
|
5835
6015
|
{
|
|
5836
6016
|
type: "button",
|
|
5837
6017
|
className: "tf-checkout-timerbanner__close",
|
|
5838
|
-
"aria-label": "
|
|
6018
|
+
"aria-label": t("common.dismiss"),
|
|
5839
6019
|
onClick: () => setDismissed(true)
|
|
5840
6020
|
},
|
|
5841
6021
|
"\xD7"
|
|
@@ -5868,9 +6048,9 @@ var ForgotPasswordForm = ({
|
|
|
5868
6048
|
void onSubmit(email);
|
|
5869
6049
|
};
|
|
5870
6050
|
if (successMessage) {
|
|
5871
|
-
return /* @__PURE__ */ import_react19.default.createElement("div", { className: "tf-checkout-auth__form" }, /* @__PURE__ */ import_react19.default.createElement("div", { className: "tf-checkout-auth__success", role: "status" }, successMessage), /* @__PURE__ */ import_react19.default.createElement(Button, { type: "button", block: true, onClick: () => onBackToLogin(email) }, "
|
|
6051
|
+
return /* @__PURE__ */ import_react19.default.createElement("div", { className: "tf-checkout-auth__form" }, /* @__PURE__ */ import_react19.default.createElement("div", { className: "tf-checkout-auth__success", role: "status" }, successMessage), /* @__PURE__ */ import_react19.default.createElement(Button, { type: "button", block: true, onClick: () => onBackToLogin(email) }, t("auth.backToLogin")));
|
|
5872
6052
|
}
|
|
5873
|
-
return /* @__PURE__ */ import_react19.default.createElement("form", { className: "tf-checkout-auth__form", onSubmit: submit, noValidate: true }, /* @__PURE__ */ import_react19.default.createElement("p", { className: "tf-checkout-auth__intro" }, "
|
|
6053
|
+
return /* @__PURE__ */ import_react19.default.createElement("form", { className: "tf-checkout-auth__form", onSubmit: submit, noValidate: true }, /* @__PURE__ */ import_react19.default.createElement("p", { className: "tf-checkout-auth__intro" }, t("auth.forgotIntro")), error && /* @__PURE__ */ import_react19.default.createElement("div", { className: "tf-checkout-auth__alert", role: "alert" }, error), /* @__PURE__ */ import_react19.default.createElement(Field, { label: t("auth.email"), error: errors.email }, /* @__PURE__ */ import_react19.default.createElement(
|
|
5874
6054
|
Input,
|
|
5875
6055
|
{
|
|
5876
6056
|
type: "email",
|
|
@@ -5885,14 +6065,14 @@ var ForgotPasswordForm = ({
|
|
|
5885
6065
|
onFieldChange == null ? void 0 : onFieldChange();
|
|
5886
6066
|
}
|
|
5887
6067
|
}
|
|
5888
|
-
)), /* @__PURE__ */ import_react19.default.createElement(Button, { type: "submit", block: true, loading }, "
|
|
6068
|
+
)), /* @__PURE__ */ import_react19.default.createElement(Button, { type: "submit", block: true, loading }, t("auth.sendResetInstructions")), /* @__PURE__ */ import_react19.default.createElement(
|
|
5889
6069
|
"button",
|
|
5890
6070
|
{
|
|
5891
6071
|
type: "button",
|
|
5892
6072
|
className: "tf-checkout-auth__text-button tf-checkout-auth__back",
|
|
5893
6073
|
onClick: () => onBackToLogin(email)
|
|
5894
6074
|
},
|
|
5895
|
-
"
|
|
6075
|
+
t("auth.backToLogin")
|
|
5896
6076
|
));
|
|
5897
6077
|
};
|
|
5898
6078
|
|
|
@@ -5994,14 +6174,14 @@ var LoginForm = ({
|
|
|
5994
6174
|
}
|
|
5995
6175
|
}
|
|
5996
6176
|
)
|
|
5997
|
-
), /* @__PURE__ */ import_react21.default.createElement(Button, { type: "submit", block: true, loading }, "
|
|
6177
|
+
), /* @__PURE__ */ import_react21.default.createElement(Button, { type: "submit", block: true, loading }, t("auth.logIn")), allowPasswordReset && onForgotPassword && /* @__PURE__ */ import_react21.default.createElement(
|
|
5998
6178
|
"button",
|
|
5999
6179
|
{
|
|
6000
6180
|
type: "button",
|
|
6001
6181
|
className: "tf-checkout-auth__text-button tf-checkout-auth__forgot",
|
|
6002
6182
|
onClick: () => onForgotPassword(email)
|
|
6003
6183
|
},
|
|
6004
|
-
"
|
|
6184
|
+
t("auth.forgotPassword")
|
|
6005
6185
|
));
|
|
6006
6186
|
};
|
|
6007
6187
|
|
|
@@ -6228,7 +6408,7 @@ var RegisterForm = ({
|
|
|
6228
6408
|
invalid: Boolean(errors.stateId),
|
|
6229
6409
|
onChange: (event) => setField("stateId", event.target.value)
|
|
6230
6410
|
},
|
|
6231
|
-
/* @__PURE__ */ import_react22.default.createElement("option", { value: "" }, states.length > 0 ? "
|
|
6411
|
+
/* @__PURE__ */ import_react22.default.createElement("option", { value: "" }, states.length > 0 ? t("auth.selectState") : t("auth.notRequired")),
|
|
6232
6412
|
states.map((state) => /* @__PURE__ */ import_react22.default.createElement("option", { key: state.id, value: state.id }, state.name))
|
|
6233
6413
|
)
|
|
6234
6414
|
), /* @__PURE__ */ import_react22.default.createElement(
|
|
@@ -6322,7 +6502,7 @@ var RegisterForm = ({
|
|
|
6322
6502
|
}
|
|
6323
6503
|
)
|
|
6324
6504
|
)),
|
|
6325
|
-
/* @__PURE__ */ import_react22.default.createElement(Button, { type: "submit", block: true, loading }, "
|
|
6505
|
+
/* @__PURE__ */ import_react22.default.createElement(Button, { type: "submit", block: true, loading }, t("auth.createAccount"))
|
|
6326
6506
|
);
|
|
6327
6507
|
};
|
|
6328
6508
|
|
|
@@ -6414,7 +6594,7 @@ var AuthModal = ({
|
|
|
6414
6594
|
if (event.target === event.currentTarget && !auth.isSubmitting) onClose();
|
|
6415
6595
|
};
|
|
6416
6596
|
const isPasswordReset = auth.view === "forgot-password";
|
|
6417
|
-
const title = isPasswordReset ? "
|
|
6597
|
+
const title = isPasswordReset ? t("auth.passwordReset") : t("auth.title");
|
|
6418
6598
|
return /* @__PURE__ */ import_react23.default.createElement("div", { className: cx("tf-checkout-auth", className), onMouseDown: closeFromBackdrop }, /* @__PURE__ */ import_react23.default.createElement(
|
|
6419
6599
|
"div",
|
|
6420
6600
|
{
|
|
@@ -6456,7 +6636,7 @@ var AuthModal = ({
|
|
|
6456
6636
|
),
|
|
6457
6637
|
onClick: () => auth.showLogin(auth.suggestedEmail)
|
|
6458
6638
|
},
|
|
6459
|
-
"
|
|
6639
|
+
t("auth.logIn")
|
|
6460
6640
|
),
|
|
6461
6641
|
/* @__PURE__ */ import_react23.default.createElement(
|
|
6462
6642
|
"button",
|
|
@@ -6470,7 +6650,7 @@ var AuthModal = ({
|
|
|
6470
6650
|
),
|
|
6471
6651
|
onClick: () => auth.showRegister(auth.suggestedEmail)
|
|
6472
6652
|
},
|
|
6473
|
-
"
|
|
6653
|
+
t("auth.signUp")
|
|
6474
6654
|
)
|
|
6475
6655
|
),
|
|
6476
6656
|
logoUrl && /* @__PURE__ */ import_react23.default.createElement("div", { className: "tf-checkout-auth__logo-wrap" }, /* @__PURE__ */ import_react23.default.createElement(
|
|
@@ -6539,9 +6719,9 @@ var ResetPasswordForm = ({
|
|
|
6539
6719
|
const validation = (0, import_react24.useMemo)(() => {
|
|
6540
6720
|
if (!submitted) return {};
|
|
6541
6721
|
return {
|
|
6542
|
-
token: token ? "" : "
|
|
6543
|
-
password: password.length < 8 ? "
|
|
6544
|
-
confirmation: password !== confirmation ? "
|
|
6722
|
+
token: token ? "" : t("auth.missingToken"),
|
|
6723
|
+
password: password.length < 8 ? t("auth.passwordTooShort") : !/[@$!%*#?&]/.test(password) ? t("auth.passwordNeedsSpecial") : "",
|
|
6724
|
+
confirmation: password !== confirmation ? t("auth.passwordsMustMatch") : ""
|
|
6545
6725
|
};
|
|
6546
6726
|
}, [confirmation, password, submitted, token]);
|
|
6547
6727
|
const reset = hooks_exports.useResetPassword({
|
|
@@ -6558,7 +6738,7 @@ var ResetPasswordForm = ({
|
|
|
6558
6738
|
reset.mutate({ token, password, passwordConfirmation: confirmation });
|
|
6559
6739
|
};
|
|
6560
6740
|
if (success) {
|
|
6561
|
-
return /* @__PURE__ */ import_react24.default.createElement("div", { className: "tf-checkout-auth__form" }, /* @__PURE__ */ import_react24.default.createElement("div", { className: "tf-checkout-auth__success", role: "status" }, "
|
|
6741
|
+
return /* @__PURE__ */ import_react24.default.createElement("div", { className: "tf-checkout-auth__form" }, /* @__PURE__ */ import_react24.default.createElement("div", { className: "tf-checkout-auth__success", role: "status" }, t("auth.passwordChanged")), onBackToLogin && /* @__PURE__ */ import_react24.default.createElement(Button, { type: "button", block: true, onClick: onBackToLogin }, t("auth.logIn")));
|
|
6562
6742
|
}
|
|
6563
6743
|
return /* @__PURE__ */ import_react24.default.createElement("form", { className: "tf-checkout-auth__form", onSubmit: submit, noValidate: true }, /* @__PURE__ */ import_react24.default.createElement("h2", { className: "tf-checkout-auth__title" }, t("auth.changePassword")), validation.token && /* @__PURE__ */ import_react24.default.createElement("div", { className: "tf-checkout-auth__alert", role: "alert" }, validation.token), reset.error && /* @__PURE__ */ import_react24.default.createElement("div", { className: "tf-checkout-auth__alert", role: "alert" }, errorMessage(reset.error)), /* @__PURE__ */ import_react24.default.createElement(Field, { label: t("auth.newPassword"), error: validation.password }, /* @__PURE__ */ import_react24.default.createElement(
|
|
6564
6744
|
Input,
|
|
@@ -6582,7 +6762,7 @@ var ResetPasswordForm = ({
|
|
|
6582
6762
|
invalid: Boolean(validation.confirmation),
|
|
6583
6763
|
onChange: (event) => setConfirmation(event.target.value)
|
|
6584
6764
|
}
|
|
6585
|
-
)), /* @__PURE__ */ import_react24.default.createElement(Button, { type: "submit", block: true, loading: reset.isPending, disabled: !token }, "
|
|
6765
|
+
)), /* @__PURE__ */ import_react24.default.createElement(Button, { type: "submit", block: true, loading: reset.isPending, disabled: !token }, t("common.submit")));
|
|
6586
6766
|
};
|
|
6587
6767
|
|
|
6588
6768
|
// src/sections/Tickets.tsx
|
|
@@ -6637,7 +6817,7 @@ var Tickets = ({
|
|
|
6637
6817
|
eventId,
|
|
6638
6818
|
title = false,
|
|
6639
6819
|
onContinue,
|
|
6640
|
-
buttonLabel
|
|
6820
|
+
buttonLabel,
|
|
6641
6821
|
timeSlotDates,
|
|
6642
6822
|
step,
|
|
6643
6823
|
onSelectSeats,
|
|
@@ -6647,7 +6827,9 @@ var Tickets = ({
|
|
|
6647
6827
|
className
|
|
6648
6828
|
}) => {
|
|
6649
6829
|
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j;
|
|
6830
|
+
const tr = useT();
|
|
6650
6831
|
const checkout = useCheckoutContext();
|
|
6832
|
+
const buttonText = buttonLabel != null ? buttonLabel : tr("tickets.getTickets");
|
|
6651
6833
|
const ticketsQuery = hooks_exports.useTicketsWithMeta(eventId);
|
|
6652
6834
|
const promoMeta = (_a = ticketsQuery.data) == null ? void 0 : _a.promo;
|
|
6653
6835
|
const showWaitingList = (_c = (_b = ticketsQuery.data) == null ? void 0 : _b.showWaitingList) != null ? _c : false;
|
|
@@ -6733,7 +6915,7 @@ var Tickets = ({
|
|
|
6733
6915
|
const seatMapRow = (t) => isSeated && !t.allowDirectPurchase;
|
|
6734
6916
|
const hasSeatMapTickets = tickets.some(seatMapRow);
|
|
6735
6917
|
const directPurchasable = tickets.filter((t) => !seatMapRow(t));
|
|
6736
|
-
const seatCtaLabel = (eventInfo == null ? void 0 : eventInfo.tableMapEnabled) ? "
|
|
6918
|
+
const seatCtaLabel = (eventInfo == null ? void 0 : eventInfo.tableMapEnabled) ? tr("tickets.selectOnMap") : tr("tickets.selectSeats");
|
|
6737
6919
|
const firstTableIndex = tickets.findIndex((t) => t.isTable);
|
|
6738
6920
|
const firstTableId = firstTableIndex > 0 && tickets.slice(0, firstTableIndex).some((t) => !t.isTable) ? tickets[firstTableIndex].id : void 0;
|
|
6739
6921
|
const prime = () => {
|
|
@@ -6766,7 +6948,7 @@ var Tickets = ({
|
|
|
6766
6948
|
const ticketIndex = tickets.findIndex((candidate) => candidate.id === t.id);
|
|
6767
6949
|
const previousTicket = ticketIndex > 0 ? tickets[ticketIndex - 1] : void 0;
|
|
6768
6950
|
const startsNamedGroup = Boolean(t.groupName) && t.groupName !== (previousTicket == null ? void 0 : previousTicket.groupName);
|
|
6769
|
-
return /* @__PURE__ */ import_react25.default.createElement(import_react25.Fragment, { key: t.id }, startsNamedGroup ? /* @__PURE__ */ import_react25.default.createElement("div", { className: "tf-checkout-tickets__group" }, t.groupName) : t.id === firstTableId && /* @__PURE__ */ import_react25.default.createElement("div", { className: "tf-checkout-tickets__group" }, "
|
|
6951
|
+
return /* @__PURE__ */ import_react25.default.createElement(import_react25.Fragment, { key: t.id }, startsNamedGroup ? /* @__PURE__ */ import_react25.default.createElement("div", { className: "tf-checkout-tickets__group" }, t.groupName) : t.id === firstTableId && /* @__PURE__ */ import_react25.default.createElement("div", { className: "tf-checkout-tickets__group" }, tr("tickets.reserveTables")), /* @__PURE__ */ import_react25.default.createElement("div", { className: "tf-checkout-tickets__row-wrap" }, /* @__PURE__ */ import_react25.default.createElement("div", { className: "tf-checkout-tickets__row" }, /* @__PURE__ */ import_react25.default.createElement("div", { className: "tf-checkout-tickets__info" }, /* @__PURE__ */ import_react25.default.createElement("div", { className: "tf-checkout-tickets__name" }, /* @__PURE__ */ import_react25.default.createElement("span", null, t.name), t.descriptionRich && /* @__PURE__ */ import_react25.default.createElement(
|
|
6770
6952
|
"button",
|
|
6771
6953
|
{
|
|
6772
6954
|
type: "button",
|
|
@@ -6775,7 +6957,7 @@ var Tickets = ({
|
|
|
6775
6957
|
"aria-controls": `ticket-description-${t.id}`,
|
|
6776
6958
|
onClick: () => setVisibleDescription((current2) => current2 === t.id ? null : t.id)
|
|
6777
6959
|
},
|
|
6778
|
-
visibleDescription === t.id ? "
|
|
6960
|
+
visibleDescription === t.id ? tr("tickets.hideInfo") : tr("tickets.viewInfo")
|
|
6779
6961
|
)), /* @__PURE__ */ import_react25.default.createElement("div", { className: "tf-checkout-tickets__price" }, discounted && /* @__PURE__ */ import_react25.default.createElement("span", { className: "tf-checkout-tickets__old" }, money(sym, original)), /* @__PURE__ */ import_react25.default.createElement(
|
|
6780
6962
|
"span",
|
|
6781
6963
|
{
|
|
@@ -6785,7 +6967,7 @@ var Tickets = ({
|
|
|
6785
6967
|
)
|
|
6786
6968
|
},
|
|
6787
6969
|
isFree ? "FREE" : money(sym, t.price)
|
|
6788
|
-
), !isFree && !t.soldOut && /* @__PURE__ */ import_react25.default.createElement("span", { className: "tf-checkout-tickets__fees" }, "(", money(sym, t.priceWithFees), " with fees)"), t.depositPercent != null && /* @__PURE__ */ import_react25.default.createElement("span", { className: "tf-checkout-tickets__deposit" }, t.depositPercent.toFixed(2), "% DEPOSIT"))), seatMapRow(t) ? null : unavailable ? /* @__PURE__ */ import_react25.default.createElement("span", { className: "tf-checkout-tickets__soldout" }, t.soldOut ? "
|
|
6970
|
+
), !isFree && !t.soldOut && /* @__PURE__ */ import_react25.default.createElement("span", { className: "tf-checkout-tickets__fees" }, "(", money(sym, t.priceWithFees), " with fees)"), t.depositPercent != null && /* @__PURE__ */ import_react25.default.createElement("span", { className: "tf-checkout-tickets__deposit" }, t.depositPercent.toFixed(2), "% DEPOSIT"))), seatMapRow(t) ? null : unavailable ? /* @__PURE__ */ import_react25.default.createElement("span", { className: "tf-checkout-tickets__soldout" }, t.soldOut ? tr("tickets.soldOut") : notStarted ? tr("tickets.salesNotStarted") : tr("tickets.salesEnded")) : /* @__PURE__ */ import_react25.default.createElement("div", { className: "tf-checkout-tickets__qty" }, t.isTable && /* @__PURE__ */ import_react25.default.createElement("span", { className: "tf-checkout-tickets__guests" }, tr("tickets.guests")), /* @__PURE__ */ import_react25.default.createElement(
|
|
6789
6971
|
QuantitySelect,
|
|
6790
6972
|
{
|
|
6791
6973
|
value: (_a2 = qty[t.id]) != null ? _a2 : 0,
|
|
@@ -6832,7 +7014,7 @@ var Tickets = ({
|
|
|
6832
7014
|
title: title || "",
|
|
6833
7015
|
pills: listQuery.isFetching && !listQuery.isLoading ? /* @__PURE__ */ import_react25.default.createElement(Loader, null) : void 0
|
|
6834
7016
|
}
|
|
6835
|
-
), listQuery.isLoading && /* @__PURE__ */ import_react25.default.createElement("div", { className: "tf-checkout-tickets__loading" }, /* @__PURE__ */ import_react25.default.createElement(Loader, { className: "tf-checkout-tickets__loading-spinner" })), listQuery.error && /* @__PURE__ */ import_react25.default.createElement("p", { className: "tf-checkout-error-text" }, listQuery.error.message), isTimeSlot && dates.length > 0 && /* @__PURE__ */ import_react25.default.createElement("div", { className: "tf-checkout-tickets__currency" }, /* @__PURE__ */ import_react25.default.createElement("span", { className: "tf-checkout-tickets__currency-label" }, "
|
|
7017
|
+
), listQuery.isLoading && /* @__PURE__ */ import_react25.default.createElement("div", { className: "tf-checkout-tickets__loading" }, /* @__PURE__ */ import_react25.default.createElement(Loader, { className: "tf-checkout-tickets__loading-spinner" })), listQuery.error && /* @__PURE__ */ import_react25.default.createElement("p", { className: "tf-checkout-error-text" }, listQuery.error.message), isTimeSlot && dates.length > 0 && /* @__PURE__ */ import_react25.default.createElement("div", { className: "tf-checkout-tickets__currency" }, /* @__PURE__ */ import_react25.default.createElement("span", { className: "tf-checkout-tickets__currency-label" }, tr("common.date")), /* @__PURE__ */ import_react25.default.createElement(
|
|
6836
7018
|
"select",
|
|
6837
7019
|
{
|
|
6838
7020
|
className: "tf-checkout-select",
|
|
@@ -6843,7 +7025,7 @@ var Tickets = ({
|
|
|
6843
7025
|
}
|
|
6844
7026
|
},
|
|
6845
7027
|
dates.map((d) => /* @__PURE__ */ import_react25.default.createElement("option", { key: d, value: d }, d))
|
|
6846
|
-
)), checkout.currency && checkout.currency.available.length > 1 && /* @__PURE__ */ import_react25.default.createElement("div", { className: "tf-checkout-tickets__currency" }, /* @__PURE__ */ import_react25.default.createElement("span", { className: "tf-checkout-tickets__currency-label" }, "
|
|
7028
|
+
)), checkout.currency && checkout.currency.available.length > 1 && /* @__PURE__ */ import_react25.default.createElement("div", { className: "tf-checkout-tickets__currency" }, /* @__PURE__ */ import_react25.default.createElement("span", { className: "tf-checkout-tickets__currency-label" }, tr("common.currency")), /* @__PURE__ */ import_react25.default.createElement(
|
|
6847
7029
|
"select",
|
|
6848
7030
|
{
|
|
6849
7031
|
className: "tf-checkout-select",
|
|
@@ -6851,7 +7033,7 @@ var Tickets = ({
|
|
|
6851
7033
|
onChange: (e) => changeCurrency(e.target.value)
|
|
6852
7034
|
},
|
|
6853
7035
|
checkout.currency.available.map((c) => /* @__PURE__ */ import_react25.default.createElement("option", { key: c.code, value: c.code }, c.name, " (", c.code, ")"))
|
|
6854
|
-
)), isTimeSlot && !slotQuery.isLoading && tickets.length === 0 && slotDate && /* @__PURE__ */ import_react25.default.createElement("p", { className: "tf-checkout-note" }, "
|
|
7036
|
+
)), isTimeSlot && !slotQuery.isLoading && tickets.length === 0 && slotDate && /* @__PURE__ */ import_react25.default.createElement("p", { className: "tf-checkout-note" }, tr("tickets.noSessions")), isTimeSlot ? timeGroups.map((g) => /* @__PURE__ */ import_react25.default.createElement(import_react25.Fragment, { key: g.time }, g.time && /* @__PURE__ */ import_react25.default.createElement("div", { className: "tf-checkout-tickets__slot-time" }, g.time), g.items.map(renderRow))) : tickets.map(renderRow), showCodeInput && /* @__PURE__ */ import_react25.default.createElement("div", { className: "tf-checkout-tickets__promo" }, !isAccess && !promoOpen ? /* @__PURE__ */ import_react25.default.createElement(
|
|
6855
7037
|
"button",
|
|
6856
7038
|
{
|
|
6857
7039
|
type: "button",
|
|
@@ -6862,7 +7044,7 @@ var Tickets = ({
|
|
|
6862
7044
|
) : /* @__PURE__ */ import_react25.default.createElement(import_react25.default.Fragment, null, /* @__PURE__ */ import_react25.default.createElement(FieldRow, null, /* @__PURE__ */ import_react25.default.createElement(Field, null, /* @__PURE__ */ import_react25.default.createElement(
|
|
6863
7045
|
Input,
|
|
6864
7046
|
{
|
|
6865
|
-
placeholder: isAccess ? "
|
|
7047
|
+
placeholder: isAccess ? tr("tickets.accessCode") : tr("tickets.promoCode"),
|
|
6866
7048
|
value: code,
|
|
6867
7049
|
onChange: (e) => setCode(e.target.value),
|
|
6868
7050
|
onKeyDown: (e) => e.key === "Enter" && applyCode()
|
|
@@ -6893,7 +7075,7 @@ var Tickets = ({
|
|
|
6893
7075
|
loading: checkout.isBusy,
|
|
6894
7076
|
disabled: checkout.isBusy || selected.length === 0
|
|
6895
7077
|
},
|
|
6896
|
-
checkout.isBusy ? "
|
|
7078
|
+
checkout.isBusy ? tr("tickets.reserving") : selectionIsTable ? tr("tickets.reserveTables") : buttonText
|
|
6897
7079
|
), hasSeatMapTickets && /* @__PURE__ */ import_react25.default.createElement(Button, { block: true, onClick: () => onSelectSeats == null ? void 0 : onSelectSeats() }, seatCtaLabel), (error || checkout.error) && /* @__PURE__ */ import_react25.default.createElement("p", { className: "tf-checkout-error-text" }, error || checkout.error));
|
|
6898
7080
|
};
|
|
6899
7081
|
|
|
@@ -7254,13 +7436,17 @@ var AddOns = ({
|
|
|
7254
7436
|
eventId,
|
|
7255
7437
|
onContinue,
|
|
7256
7438
|
onSkip,
|
|
7257
|
-
buttonLabel
|
|
7258
|
-
eyebrow
|
|
7259
|
-
heading
|
|
7439
|
+
buttonLabel,
|
|
7440
|
+
eyebrow,
|
|
7441
|
+
heading,
|
|
7260
7442
|
className
|
|
7261
7443
|
}) => {
|
|
7262
7444
|
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
7445
|
+
const t = useT();
|
|
7263
7446
|
const checkout = useCheckoutContext();
|
|
7447
|
+
const buttonText = buttonLabel != null ? buttonLabel : t("addons.confirmSelection");
|
|
7448
|
+
const eyebrowText = eyebrow != null ? eyebrow : t("addons.eyebrow");
|
|
7449
|
+
const headingText = heading != null ? heading : t("addons.heading");
|
|
7264
7450
|
const combined = !onContinue;
|
|
7265
7451
|
const addonsQuery = hooks_exports.useEventAddons(eventId);
|
|
7266
7452
|
const all = (_a = addonsQuery.data) != null ? _a : [];
|
|
@@ -7290,14 +7476,14 @@ var AddOns = ({
|
|
|
7290
7476
|
return ((_a3 = selection[id]) != null ? _a3 : 0) > 0;
|
|
7291
7477
|
})
|
|
7292
7478
|
);
|
|
7293
|
-
const
|
|
7479
|
+
const t2 = setTimeout(() => {
|
|
7294
7480
|
checkout.setAddonDataCapture(captureForSelected);
|
|
7295
7481
|
checkout.setAddons(selection).catch((e) => setError(errorMessage(e)));
|
|
7296
7482
|
}, 500);
|
|
7297
|
-
return () => clearTimeout(
|
|
7483
|
+
return () => clearTimeout(t2);
|
|
7298
7484
|
}, [combined, qty, capture]);
|
|
7299
7485
|
const hasRequired = ((_f = checkout.requiredAddOns) != null ? _f : []).some((a) => a.required);
|
|
7300
|
-
const head = /* @__PURE__ */ import_react27.default.createElement("div", { className: "tf-checkout-addons__head" },
|
|
7486
|
+
const head = /* @__PURE__ */ import_react27.default.createElement("div", { className: "tf-checkout-addons__head" }, eyebrowText && /* @__PURE__ */ import_react27.default.createElement("span", { className: "tf-checkout-addons__eyebrow" }, eyebrowText), /* @__PURE__ */ import_react27.default.createElement("span", { className: "tf-checkout-addons__heading" }, headingText), onSkip && !hasRequired && /* @__PURE__ */ import_react27.default.createElement("button", { type: "button", className: "tf-checkout-addons__skip", onClick: onSkip }, "Skip"));
|
|
7301
7487
|
if (addonsQuery.isLoading) {
|
|
7302
7488
|
return /* @__PURE__ */ import_react27.default.createElement(Card, { className }, head, /* @__PURE__ */ import_react27.default.createElement("div", { className: "tf-checkout-section-loader" }, /* @__PURE__ */ import_react27.default.createElement(Loader, null)));
|
|
7303
7489
|
}
|
|
@@ -7344,7 +7530,7 @@ var AddOns = ({
|
|
|
7344
7530
|
className: "tf-checkout-addons__desc",
|
|
7345
7531
|
dangerouslySetInnerHTML: { __html: a.description }
|
|
7346
7532
|
}
|
|
7347
|
-
)), soldOut(a) ? /* @__PURE__ */ import_react27.default.createElement("span", { className: "tf-checkout-tickets__soldout" }, "
|
|
7533
|
+
)), soldOut(a) ? /* @__PURE__ */ import_react27.default.createElement("span", { className: "tf-checkout-tickets__soldout" }, t("tickets.soldOut")) : /* @__PURE__ */ import_react27.default.createElement(
|
|
7348
7534
|
QuantitySelect,
|
|
7349
7535
|
{
|
|
7350
7536
|
value: n,
|
|
@@ -7375,7 +7561,7 @@ var AddOns = ({
|
|
|
7375
7561
|
loading: checkout.isBusy,
|
|
7376
7562
|
disabled: checkout.isBusy || selectedCount === 0
|
|
7377
7563
|
},
|
|
7378
|
-
checkout.isBusy ? "
|
|
7564
|
+
checkout.isBusy ? t("addons.updating") : buttonText
|
|
7379
7565
|
), missing.length > 0 && /* @__PURE__ */ import_react27.default.createElement("p", { className: "tf-checkout-note" }, "Required add-on: ", missing.join(", "), "."), (error || checkout.error) && /* @__PURE__ */ import_react27.default.createElement("p", { className: "tf-checkout-error-text" }, error || checkout.error));
|
|
7380
7566
|
};
|
|
7381
7567
|
|
|
@@ -7393,17 +7579,18 @@ var BillingAddressFields = ({
|
|
|
7393
7579
|
setBilling
|
|
7394
7580
|
}) => {
|
|
7395
7581
|
var _a, _b, _c, _d, _e;
|
|
7582
|
+
const t = useT();
|
|
7396
7583
|
const setValue = (key) => (event) => setBilling((current2) => ({ ...current2, [key]: event.target.value }));
|
|
7397
|
-
return /* @__PURE__ */ import_react28.default.createElement(import_react28.default.Fragment, null, /* @__PURE__ */ import_react28.default.createElement("div", { className: "tf-checkout-billing__section-label" }, "
|
|
7584
|
+
return /* @__PURE__ */ import_react28.default.createElement(import_react28.default.Fragment, null, /* @__PURE__ */ import_react28.default.createElement("div", { className: "tf-checkout-billing__section-label" }, t("billing.address")), /* @__PURE__ */ import_react28.default.createElement(
|
|
7398
7585
|
Field,
|
|
7399
7586
|
{
|
|
7400
|
-
error: fieldError("Street address", "
|
|
7587
|
+
error: fieldError("Street address", t("billing.streetRequired")),
|
|
7401
7588
|
invalid: Boolean(fieldError("Street address"))
|
|
7402
7589
|
},
|
|
7403
7590
|
/* @__PURE__ */ import_react28.default.createElement(
|
|
7404
7591
|
Input,
|
|
7405
7592
|
{
|
|
7406
|
-
placeholder: "
|
|
7593
|
+
placeholder: t("billing.streetPlaceholder"),
|
|
7407
7594
|
autoComplete: "street-address",
|
|
7408
7595
|
value: (_a = billing.streetAddress) != null ? _a : "",
|
|
7409
7596
|
required: true,
|
|
@@ -7415,13 +7602,13 @@ var BillingAddressFields = ({
|
|
|
7415
7602
|
), /* @__PURE__ */ import_react28.default.createElement(FieldRow, null, /* @__PURE__ */ import_react28.default.createElement(
|
|
7416
7603
|
Field,
|
|
7417
7604
|
{
|
|
7418
|
-
error: fieldError("City", "
|
|
7605
|
+
error: fieldError("City", t("billing.cityRequired")),
|
|
7419
7606
|
invalid: Boolean(fieldError("City"))
|
|
7420
7607
|
},
|
|
7421
7608
|
/* @__PURE__ */ import_react28.default.createElement(
|
|
7422
7609
|
Input,
|
|
7423
7610
|
{
|
|
7424
|
-
placeholder: "
|
|
7611
|
+
placeholder: t("billing.cityPlaceholder"),
|
|
7425
7612
|
autoComplete: "address-level2",
|
|
7426
7613
|
value: (_b = billing.city) != null ? _b : "",
|
|
7427
7614
|
required: true,
|
|
@@ -7433,13 +7620,13 @@ var BillingAddressFields = ({
|
|
|
7433
7620
|
), /* @__PURE__ */ import_react28.default.createElement(
|
|
7434
7621
|
Field,
|
|
7435
7622
|
{
|
|
7436
|
-
error: fieldError("ZIP / postcode", "
|
|
7623
|
+
error: fieldError("ZIP / postcode", t("billing.postcodeRequired")),
|
|
7437
7624
|
invalid: Boolean(fieldError("ZIP / postcode"))
|
|
7438
7625
|
},
|
|
7439
7626
|
/* @__PURE__ */ import_react28.default.createElement(
|
|
7440
7627
|
Input,
|
|
7441
7628
|
{
|
|
7442
|
-
placeholder: "
|
|
7629
|
+
placeholder: t("billing.postcodePlaceholder"),
|
|
7443
7630
|
autoComplete: "postal-code",
|
|
7444
7631
|
value: (_c = billing.zip) != null ? _c : "",
|
|
7445
7632
|
required: true,
|
|
@@ -7451,14 +7638,14 @@ var BillingAddressFields = ({
|
|
|
7451
7638
|
)), /* @__PURE__ */ import_react28.default.createElement(FieldRow, null, /* @__PURE__ */ import_react28.default.createElement(
|
|
7452
7639
|
Field,
|
|
7453
7640
|
{
|
|
7454
|
-
error: fieldError("Country", "
|
|
7641
|
+
error: fieldError("Country", t("billing.countryRequired")),
|
|
7455
7642
|
invalid: Boolean(fieldError("Country"))
|
|
7456
7643
|
},
|
|
7457
7644
|
/* @__PURE__ */ import_react28.default.createElement(
|
|
7458
7645
|
Select,
|
|
7459
7646
|
{
|
|
7460
7647
|
value: (_d = billing.countryId) != null ? _d : "",
|
|
7461
|
-
"aria-label": "
|
|
7648
|
+
"aria-label": t("billing.countryLabel"),
|
|
7462
7649
|
required: true,
|
|
7463
7650
|
invalid: Boolean(fieldError("Country")),
|
|
7464
7651
|
"aria-invalid": Boolean(fieldError("Country")),
|
|
@@ -7478,13 +7665,13 @@ var BillingAddressFields = ({
|
|
|
7478
7665
|
});
|
|
7479
7666
|
}
|
|
7480
7667
|
},
|
|
7481
|
-
/* @__PURE__ */ import_react28.default.createElement("option", { value: "" }, "
|
|
7668
|
+
/* @__PURE__ */ import_react28.default.createElement("option", { value: "" }, t("billing.countryEmpty")),
|
|
7482
7669
|
countries.map((country) => /* @__PURE__ */ import_react28.default.createElement("option", { key: country.id, value: country.id }, country.name))
|
|
7483
7670
|
)
|
|
7484
7671
|
), /* @__PURE__ */ import_react28.default.createElement(
|
|
7485
7672
|
Field,
|
|
7486
7673
|
{
|
|
7487
|
-
error: fieldError("State / county", "
|
|
7674
|
+
error: fieldError("State / county", t("billing.stateRequired")),
|
|
7488
7675
|
invalid: Boolean(fieldError("State / county"))
|
|
7489
7676
|
},
|
|
7490
7677
|
/* @__PURE__ */ import_react28.default.createElement(
|
|
@@ -7492,7 +7679,7 @@ var BillingAddressFields = ({
|
|
|
7492
7679
|
{
|
|
7493
7680
|
value: (_e = billing.stateId) != null ? _e : "",
|
|
7494
7681
|
disabled: !billing.countryId || states.length === 0,
|
|
7495
|
-
"aria-label": "
|
|
7682
|
+
"aria-label": t("billing.stateLabel"),
|
|
7496
7683
|
required: states.length > 0,
|
|
7497
7684
|
invalid: Boolean(fieldError("State / county")),
|
|
7498
7685
|
"aria-invalid": Boolean(fieldError("State / county")),
|
|
@@ -7507,7 +7694,7 @@ var BillingAddressFields = ({
|
|
|
7507
7694
|
}));
|
|
7508
7695
|
}
|
|
7509
7696
|
},
|
|
7510
|
-
/* @__PURE__ */ import_react28.default.createElement("option", { value: "" },
|
|
7697
|
+
/* @__PURE__ */ import_react28.default.createElement("option", { value: "" }, states.length > 0 ? t("billing.stateEmptyRequired") : t("billing.stateEmpty")),
|
|
7511
7698
|
states.map((state) => /* @__PURE__ */ import_react28.default.createElement("option", { key: state.id, value: state.id }, state.name))
|
|
7512
7699
|
)
|
|
7513
7700
|
)));
|
|
@@ -7587,114 +7774,121 @@ var TicketHoldersCard = ({
|
|
|
7587
7774
|
fieldError,
|
|
7588
7775
|
renderCustomFields,
|
|
7589
7776
|
patchHolder
|
|
7590
|
-
}) =>
|
|
7591
|
-
const
|
|
7592
|
-
|
|
7593
|
-
|
|
7594
|
-
|
|
7595
|
-
|
|
7596
|
-
|
|
7597
|
-
{
|
|
7598
|
-
|
|
7599
|
-
error: fieldError(firstNameKey, "First name is required."),
|
|
7600
|
-
invalid: Boolean(fieldError(firstNameKey))
|
|
7601
|
-
},
|
|
7602
|
-
/* @__PURE__ */ import_react30.default.createElement(
|
|
7603
|
-
Input,
|
|
7777
|
+
}) => {
|
|
7778
|
+
const t = useT();
|
|
7779
|
+
return /* @__PURE__ */ import_react30.default.createElement(Card, { className: "tf-checkout-billing__holders-card" }, /* @__PURE__ */ import_react30.default.createElement(SectionHeader, { title: t("billing.ticketHolders") }), holders.map((holder, index) => {
|
|
7780
|
+
const firstNameKey = `Ticket ${index + 1} holder first name`;
|
|
7781
|
+
const lastNameKey = `Ticket ${index + 1} holder last name`;
|
|
7782
|
+
const emailKey = `Ticket ${index + 1} holder email`;
|
|
7783
|
+
const phoneKey = `Ticket ${index + 1} holder phone`;
|
|
7784
|
+
return /* @__PURE__ */ import_react30.default.createElement("div", { key: index, className: "tf-checkout-billing__holder" }, /* @__PURE__ */ import_react30.default.createElement("div", { className: "tf-checkout-billing__holder-title" }, t("billing.holderTitle", { number: index + 1 })), holderNamesRequired && /* @__PURE__ */ import_react30.default.createElement(FieldRow, null, /* @__PURE__ */ import_react30.default.createElement(
|
|
7785
|
+
Field,
|
|
7604
7786
|
{
|
|
7605
|
-
|
|
7606
|
-
|
|
7607
|
-
invalid: Boolean(fieldError(firstNameKey))
|
|
7608
|
-
|
|
7609
|
-
|
|
7610
|
-
|
|
7611
|
-
|
|
7612
|
-
|
|
7613
|
-
|
|
7614
|
-
|
|
7615
|
-
|
|
7616
|
-
|
|
7617
|
-
|
|
7618
|
-
|
|
7619
|
-
/* @__PURE__ */ import_react30.default.createElement(
|
|
7620
|
-
|
|
7787
|
+
label: t("billing.holderFirstName"),
|
|
7788
|
+
error: fieldError(firstNameKey, t("billing.firstNameRequired")),
|
|
7789
|
+
invalid: Boolean(fieldError(firstNameKey))
|
|
7790
|
+
},
|
|
7791
|
+
/* @__PURE__ */ import_react30.default.createElement(
|
|
7792
|
+
Input,
|
|
7793
|
+
{
|
|
7794
|
+
value: holder.firstName,
|
|
7795
|
+
required: true,
|
|
7796
|
+
invalid: Boolean(fieldError(firstNameKey)),
|
|
7797
|
+
"aria-invalid": Boolean(fieldError(firstNameKey)),
|
|
7798
|
+
onChange: (event) => patchHolder(index, { firstName: event.target.value })
|
|
7799
|
+
}
|
|
7800
|
+
)
|
|
7801
|
+
), /* @__PURE__ */ import_react30.default.createElement(
|
|
7802
|
+
Field,
|
|
7621
7803
|
{
|
|
7622
|
-
|
|
7623
|
-
|
|
7624
|
-
invalid: Boolean(fieldError(lastNameKey))
|
|
7625
|
-
|
|
7626
|
-
|
|
7627
|
-
|
|
7628
|
-
|
|
7629
|
-
|
|
7630
|
-
|
|
7631
|
-
|
|
7632
|
-
|
|
7633
|
-
|
|
7634
|
-
|
|
7635
|
-
|
|
7636
|
-
/* @__PURE__ */ import_react30.default.createElement(
|
|
7637
|
-
|
|
7804
|
+
label: t("billing.holderLastName"),
|
|
7805
|
+
error: fieldError(lastNameKey, t("billing.lastNameRequired")),
|
|
7806
|
+
invalid: Boolean(fieldError(lastNameKey))
|
|
7807
|
+
},
|
|
7808
|
+
/* @__PURE__ */ import_react30.default.createElement(
|
|
7809
|
+
Input,
|
|
7810
|
+
{
|
|
7811
|
+
value: holder.lastName,
|
|
7812
|
+
required: true,
|
|
7813
|
+
invalid: Boolean(fieldError(lastNameKey)),
|
|
7814
|
+
"aria-invalid": Boolean(fieldError(lastNameKey)),
|
|
7815
|
+
onChange: (event) => patchHolder(index, { lastName: event.target.value })
|
|
7816
|
+
}
|
|
7817
|
+
)
|
|
7818
|
+
)), collectHolderContact && /* @__PURE__ */ import_react30.default.createElement(FieldRow, null, /* @__PURE__ */ import_react30.default.createElement(
|
|
7819
|
+
Field,
|
|
7638
7820
|
{
|
|
7639
|
-
|
|
7640
|
-
|
|
7641
|
-
|
|
7642
|
-
|
|
7643
|
-
|
|
7644
|
-
|
|
7645
|
-
|
|
7646
|
-
|
|
7647
|
-
|
|
7648
|
-
|
|
7649
|
-
|
|
7650
|
-
|
|
7651
|
-
|
|
7652
|
-
|
|
7653
|
-
|
|
7654
|
-
|
|
7655
|
-
/* @__PURE__ */ import_react30.default.createElement(
|
|
7656
|
-
|
|
7821
|
+
label: t("billing.email"),
|
|
7822
|
+
error: fieldError(emailKey, t("billing.emailInvalid")),
|
|
7823
|
+
invalid: Boolean(fieldError(emailKey))
|
|
7824
|
+
},
|
|
7825
|
+
/* @__PURE__ */ import_react30.default.createElement(
|
|
7826
|
+
Input,
|
|
7827
|
+
{
|
|
7828
|
+
type: "email",
|
|
7829
|
+
autoComplete: "email",
|
|
7830
|
+
value: holder.email,
|
|
7831
|
+
required: true,
|
|
7832
|
+
invalid: Boolean(fieldError(emailKey)),
|
|
7833
|
+
"aria-invalid": Boolean(fieldError(emailKey)),
|
|
7834
|
+
onChange: (event) => patchHolder(index, { email: event.target.value })
|
|
7835
|
+
}
|
|
7836
|
+
)
|
|
7837
|
+
), /* @__PURE__ */ import_react30.default.createElement(
|
|
7838
|
+
Field,
|
|
7657
7839
|
{
|
|
7658
|
-
|
|
7659
|
-
|
|
7660
|
-
|
|
7661
|
-
|
|
7662
|
-
|
|
7663
|
-
|
|
7664
|
-
|
|
7665
|
-
|
|
7666
|
-
|
|
7667
|
-
|
|
7668
|
-
|
|
7669
|
-
|
|
7670
|
-
|
|
7671
|
-
|
|
7672
|
-
|
|
7673
|
-
|
|
7674
|
-
|
|
7675
|
-
|
|
7840
|
+
label: t("billing.phone"),
|
|
7841
|
+
error: fieldError(phoneKey, t("billing.phoneInvalid")),
|
|
7842
|
+
invalid: Boolean(fieldError(phoneKey))
|
|
7843
|
+
},
|
|
7844
|
+
/* @__PURE__ */ import_react30.default.createElement(
|
|
7845
|
+
import_react_international_phone2.PhoneInput,
|
|
7846
|
+
{
|
|
7847
|
+
className: "tf-checkout-phone",
|
|
7848
|
+
inputClassName: `tf-checkout-input tf-checkout-phone__input${fieldError(phoneKey) ? " tf-checkout-input--invalid" : ""}`,
|
|
7849
|
+
defaultCountry: phoneCountry,
|
|
7850
|
+
disableDialCodeAndPrefix: true,
|
|
7851
|
+
showDisabledDialCodeAndPrefix: true,
|
|
7852
|
+
disableDialCodePrefill: true,
|
|
7853
|
+
value: holder.phone,
|
|
7854
|
+
required: true,
|
|
7855
|
+
inputProps: {
|
|
7856
|
+
autoComplete: "tel",
|
|
7857
|
+
"aria-label": phoneKey,
|
|
7858
|
+
"aria-invalid": Boolean(fieldError(phoneKey))
|
|
7859
|
+
},
|
|
7860
|
+
onChange: (phone) => patchHolder(index, { phone })
|
|
7861
|
+
}
|
|
7862
|
+
)
|
|
7863
|
+
)), renderCustomFields(holder, index));
|
|
7864
|
+
}));
|
|
7865
|
+
};
|
|
7676
7866
|
|
|
7677
7867
|
// src/sections/BillingInfo.tsx
|
|
7678
7868
|
var BillingInfo = ({
|
|
7679
7869
|
eventId,
|
|
7680
7870
|
onContinue,
|
|
7681
|
-
heading
|
|
7682
|
-
buttonLabel
|
|
7871
|
+
heading,
|
|
7872
|
+
buttonLabel,
|
|
7683
7873
|
onLogin,
|
|
7684
7874
|
skipWhenProfileComplete = false,
|
|
7685
7875
|
requireEmailConfirmation = false,
|
|
7686
7876
|
collectTicketHolders = false,
|
|
7687
7877
|
collectHolderContact = false,
|
|
7688
|
-
ttfOptInLabel
|
|
7878
|
+
ttfOptInLabel,
|
|
7689
7879
|
brandOptInLabel,
|
|
7690
7880
|
privacyPolicy,
|
|
7691
7881
|
showPrivacyError = false,
|
|
7692
7882
|
step,
|
|
7693
7883
|
className
|
|
7694
7884
|
}) => {
|
|
7695
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _A, _B, _C, _D;
|
|
7885
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _A, _B, _C, _D, _E;
|
|
7886
|
+
const t = useT();
|
|
7696
7887
|
const checkout = useCheckoutContext();
|
|
7697
7888
|
const validation = useCheckoutValidation();
|
|
7889
|
+
const headingText = heading != null ? heading : t("billing.heading");
|
|
7890
|
+
const buttonText = buttonLabel != null ? buttonLabel : t("billing.continueToPayment");
|
|
7891
|
+
const ttfOptInText = ttfOptInLabel != null ? ttfOptInLabel : t("billing.ttfOptIn");
|
|
7698
7892
|
const profile = hooks_exports.useProfile({ retry: false });
|
|
7699
7893
|
const event = hooks_exports.useEvent(eventId);
|
|
7700
7894
|
const combined = !onContinue;
|
|
@@ -7835,11 +8029,11 @@ var BillingInfo = ({
|
|
|
7835
8029
|
(0, import_react31.useEffect)(() => {
|
|
7836
8030
|
const email = billing.email.trim();
|
|
7837
8031
|
if (checkout.isLoggedIn || !isEmail(email)) return;
|
|
7838
|
-
const
|
|
8032
|
+
const t2 = setTimeout(
|
|
7839
8033
|
() => checkout.checkBuyerEmail(email).catch(() => void 0),
|
|
7840
8034
|
600
|
|
7841
8035
|
);
|
|
7842
|
-
return () => clearTimeout(
|
|
8036
|
+
return () => clearTimeout(t2);
|
|
7843
8037
|
}, [billing.email, checkout.isLoggedIn]);
|
|
7844
8038
|
const emailTaken = !checkout.isLoggedIn && checkout.existingAccountEmail === billing.email.trim();
|
|
7845
8039
|
const needsNationality = checkout.buyerFields.some((f) => f.kind === "nationality");
|
|
@@ -7963,7 +8157,7 @@ var BillingInfo = ({
|
|
|
7963
8157
|
const complete = missingDetails.length === 0;
|
|
7964
8158
|
const showValidation = validation.attempt > 0;
|
|
7965
8159
|
const missingSet = new Set(missingDetails);
|
|
7966
|
-
const fieldError = (key, message = "
|
|
8160
|
+
const fieldError = (key, message = t("billing.fieldRequired")) => showValidation && missingSet.has(key) ? message : void 0;
|
|
7967
8161
|
const dobError = showValidation ? missingDetails.find(
|
|
7968
8162
|
(detail) => detail === "Date of birth" || detail.startsWith("Age ")
|
|
7969
8163
|
) : void 0;
|
|
@@ -7971,7 +8165,7 @@ var BillingInfo = ({
|
|
|
7971
8165
|
const commit = () => {
|
|
7972
8166
|
checkout.setBilling(committedBilling);
|
|
7973
8167
|
checkout.setHolders(committedHolders);
|
|
7974
|
-
if (
|
|
8168
|
+
if (ttfOptInText || brandOptInLabel) checkout.setConsent(consent);
|
|
7975
8169
|
};
|
|
7976
8170
|
(0, import_react31.useEffect)(() => {
|
|
7977
8171
|
if (combined) commit();
|
|
@@ -7993,7 +8187,7 @@ var BillingInfo = ({
|
|
|
7993
8187
|
const hasEventSpecificDetails = checkout.buyerFields.length > 0 || checkout.customFields.some((group) => group.fields.length > 0) || showHolders || gates.showDob;
|
|
7994
8188
|
const skipBilling = skipWhenProfileComplete && checkout.isLoggedIn && profile.isSuccess && complete && !hasEventSpecificDetails;
|
|
7995
8189
|
if (skipBilling) return null;
|
|
7996
|
-
return /* @__PURE__ */ import_react31.default.createElement(import_react31.default.Fragment, null, /* @__PURE__ */ import_react31.default.createElement(Card, { className }, /* @__PURE__ */ import_react31.default.createElement(SectionHeader, { step, title:
|
|
8190
|
+
return /* @__PURE__ */ import_react31.default.createElement(import_react31.default.Fragment, null, /* @__PURE__ */ import_react31.default.createElement(Card, { className }, /* @__PURE__ */ import_react31.default.createElement(SectionHeader, { step, title: headingText }), onLogin && !checkout.isLoggedIn && /* @__PURE__ */ import_react31.default.createElement("div", { className: "tf-checkout-billing__login" }, /* @__PURE__ */ import_react31.default.createElement("span", null, "Login & skip ahead:"), /* @__PURE__ */ import_react31.default.createElement(
|
|
7997
8191
|
"button",
|
|
7998
8192
|
{
|
|
7999
8193
|
type: "button",
|
|
@@ -8010,7 +8204,7 @@ var BillingInfo = ({
|
|
|
8010
8204
|
/* @__PURE__ */ import_react31.default.createElement(
|
|
8011
8205
|
Input,
|
|
8012
8206
|
{
|
|
8013
|
-
placeholder: "
|
|
8207
|
+
placeholder: t("billing.firstNamePlaceholder"),
|
|
8014
8208
|
value: billing.firstName,
|
|
8015
8209
|
required: true,
|
|
8016
8210
|
invalid: Boolean(fieldError("First name")),
|
|
@@ -8027,7 +8221,7 @@ var BillingInfo = ({
|
|
|
8027
8221
|
/* @__PURE__ */ import_react31.default.createElement(
|
|
8028
8222
|
Input,
|
|
8029
8223
|
{
|
|
8030
|
-
placeholder: "
|
|
8224
|
+
placeholder: t("billing.lastNamePlaceholder"),
|
|
8031
8225
|
value: billing.lastName,
|
|
8032
8226
|
required: true,
|
|
8033
8227
|
invalid: Boolean(fieldError("Last name")),
|
|
@@ -8046,7 +8240,7 @@ var BillingInfo = ({
|
|
|
8046
8240
|
{
|
|
8047
8241
|
type: "email",
|
|
8048
8242
|
autoComplete: "email",
|
|
8049
|
-
placeholder: "
|
|
8243
|
+
placeholder: t("billing.emailPlaceholder"),
|
|
8050
8244
|
value: billing.email,
|
|
8051
8245
|
required: true,
|
|
8052
8246
|
invalid: Boolean(fieldError("Valid email address")),
|
|
@@ -8059,7 +8253,7 @@ var BillingInfo = ({
|
|
|
8059
8253
|
{
|
|
8060
8254
|
error: fieldError(
|
|
8061
8255
|
"Matching email confirmation",
|
|
8062
|
-
"
|
|
8256
|
+
t("billing.emailMustMatch")
|
|
8063
8257
|
),
|
|
8064
8258
|
invalid: Boolean(fieldError("Matching email confirmation"))
|
|
8065
8259
|
},
|
|
@@ -8068,7 +8262,7 @@ var BillingInfo = ({
|
|
|
8068
8262
|
{
|
|
8069
8263
|
type: "email",
|
|
8070
8264
|
autoComplete: "email",
|
|
8071
|
-
placeholder: "
|
|
8265
|
+
placeholder: t("billing.confirmEmailPlaceholder"),
|
|
8072
8266
|
value: (_C = billing.confirmEmail) != null ? _C : "",
|
|
8073
8267
|
required: true,
|
|
8074
8268
|
invalid: Boolean(fieldError("Matching email confirmation")),
|
|
@@ -8076,15 +8270,15 @@ var BillingInfo = ({
|
|
|
8076
8270
|
onChange: setB("confirmEmail")
|
|
8077
8271
|
}
|
|
8078
8272
|
)
|
|
8079
|
-
)), !showValidation && requireEmailConfirmation && billing.confirmEmail && billing.confirmEmail.trim().toLowerCase() !== billing.email.trim().toLowerCase() && /* @__PURE__ */ import_react31.default.createElement("p", { className: "tf-checkout-error-text" }, "
|
|
8273
|
+
)), !showValidation && requireEmailConfirmation && billing.confirmEmail && billing.confirmEmail.trim().toLowerCase() !== billing.email.trim().toLowerCase() && /* @__PURE__ */ import_react31.default.createElement("p", { className: "tf-checkout-error-text" }, t("billing.emailMismatch")), emailTaken && /* @__PURE__ */ import_react31.default.createElement("p", { className: "tf-checkout-note tf-checkout-billing__email-taken" }, t("billing.emailRegistered"), " ", onLogin ? /* @__PURE__ */ import_react31.default.createElement(
|
|
8080
8274
|
"button",
|
|
8081
8275
|
{
|
|
8082
8276
|
type: "button",
|
|
8083
8277
|
className: "tf-checkout-billing__login-link",
|
|
8084
8278
|
onClick: () => onLogin(billing.email)
|
|
8085
8279
|
},
|
|
8086
|
-
"
|
|
8087
|
-
) : "
|
|
8280
|
+
t("billing.loginAutofill")
|
|
8281
|
+
) : t("billing.loginAutofillPlain")), checkout.buyerFields.map((f) => {
|
|
8088
8282
|
var _a2;
|
|
8089
8283
|
return /* @__PURE__ */ import_react31.default.createElement(
|
|
8090
8284
|
BuyerField,
|
|
@@ -8095,15 +8289,15 @@ var BillingInfo = ({
|
|
|
8095
8289
|
onChange: (v) => setBilling((b) => ({ ...b, [f.key]: v })),
|
|
8096
8290
|
countries,
|
|
8097
8291
|
error: fieldError(
|
|
8098
|
-
f.kind === "nationality" ? "
|
|
8292
|
+
f.kind === "nationality" ? t("billing.nationality") : f.kind === "gender" ? t("billing.gender") : t("billing.instagramHandle")
|
|
8099
8293
|
)
|
|
8100
8294
|
}
|
|
8101
8295
|
);
|
|
8102
8296
|
}), gates.showPhone && /* @__PURE__ */ import_react31.default.createElement(
|
|
8103
8297
|
Field,
|
|
8104
8298
|
{
|
|
8105
|
-
label:
|
|
8106
|
-
error: fieldError("Valid phone number", "
|
|
8299
|
+
label: gates.phoneRequired ? t("billing.phone") : t("billing.phoneOptional"),
|
|
8300
|
+
error: fieldError("Valid phone number", t("billing.phoneInvalid")),
|
|
8107
8301
|
invalid: Boolean(fieldError("Valid phone number"))
|
|
8108
8302
|
},
|
|
8109
8303
|
/* @__PURE__ */ import_react31.default.createElement(
|
|
@@ -8117,10 +8311,10 @@ var BillingInfo = ({
|
|
|
8117
8311
|
disableDialCodePrefill: true,
|
|
8118
8312
|
value: (_D = billing.phone) != null ? _D : "",
|
|
8119
8313
|
required: gates.phoneRequired,
|
|
8120
|
-
placeholder: "
|
|
8314
|
+
placeholder: t("billing.phonePlaceholder"),
|
|
8121
8315
|
inputProps: {
|
|
8122
8316
|
autoComplete: "tel",
|
|
8123
|
-
"aria-label": "
|
|
8317
|
+
"aria-label": t("billing.phoneAria"),
|
|
8124
8318
|
"aria-invalid": Boolean(fieldError("Valid phone number"))
|
|
8125
8319
|
},
|
|
8126
8320
|
onChange: (phone) => setBilling((current2) => ({ ...current2, phone }))
|
|
@@ -8129,8 +8323,8 @@ var BillingInfo = ({
|
|
|
8129
8323
|
), gates.showDob && /* @__PURE__ */ import_react31.default.createElement(
|
|
8130
8324
|
Field,
|
|
8131
8325
|
{
|
|
8132
|
-
label:
|
|
8133
|
-
error: dobError === "Date of birth" ? "
|
|
8326
|
+
label: gates.minimumAge ? t("billing.dobWithAge", { age: gates.minimumAge }) : t("billing.dob"),
|
|
8327
|
+
error: dobError === "Date of birth" ? t("billing.dobRequired") : dobError ? t("billing.ageMinimum", { age: (_E = gates.minimumAge) != null ? _E : "" }) : void 0,
|
|
8134
8328
|
invalid: Boolean(dobError)
|
|
8135
8329
|
},
|
|
8136
8330
|
/* @__PURE__ */ import_react31.default.createElement(
|
|
@@ -8181,17 +8375,17 @@ var BillingInfo = ({
|
|
|
8181
8375
|
"aria-invalid": (showPrivacyError || showValidation) && !consent.ttfOptIn,
|
|
8182
8376
|
onChange: (e) => setConsent((c) => ({ ...c, ttfOptIn: e.target.checked })),
|
|
8183
8377
|
className: "tf-checkout-checkbox--consent",
|
|
8184
|
-
label: /* @__PURE__ */ import_react31.default.createElement(import_react31.default.Fragment, null, "
|
|
8378
|
+
label: /* @__PURE__ */ import_react31.default.createElement(import_react31.default.Fragment, null, t("billing.privacyAgree", { brand: privacyPolicy.brandName }), " ", /* @__PURE__ */ import_react31.default.createElement("a", { href: privacyPolicy.url, target: "_blank", rel: "noreferrer" }, privacyPolicy.linkLabel || t("billing.privacyLink")), " *")
|
|
8185
8379
|
}
|
|
8186
8380
|
),
|
|
8187
|
-
(showPrivacyError || showValidation) && !consent.ttfOptIn && /* @__PURE__ */ import_react31.default.createElement("div", { className: "tf-checkout-consent__error" }, "
|
|
8188
|
-
) :
|
|
8381
|
+
(showPrivacyError || showValidation) && !consent.ttfOptIn && /* @__PURE__ */ import_react31.default.createElement("div", { className: "tf-checkout-consent__error" }, t("common.required"))
|
|
8382
|
+
) : ttfOptInText ? /* @__PURE__ */ import_react31.default.createElement(
|
|
8189
8383
|
Checkbox,
|
|
8190
8384
|
{
|
|
8191
8385
|
checked: consent.ttfOptIn,
|
|
8192
8386
|
onChange: (e) => setConsent((c) => ({ ...c, ttfOptIn: e.target.checked })),
|
|
8193
8387
|
className: "tf-checkout-checkbox--consent",
|
|
8194
|
-
label:
|
|
8388
|
+
label: ttfOptInText
|
|
8195
8389
|
}
|
|
8196
8390
|
) : null, !combined && /* @__PURE__ */ import_react31.default.createElement(import_react31.default.Fragment, null, /* @__PURE__ */ import_react31.default.createElement(
|
|
8197
8391
|
Button,
|
|
@@ -8206,7 +8400,7 @@ var BillingInfo = ({
|
|
|
8206
8400
|
onContinue == null ? void 0 : onContinue();
|
|
8207
8401
|
}
|
|
8208
8402
|
},
|
|
8209
|
-
|
|
8403
|
+
buttonText
|
|
8210
8404
|
))), showHolders && /* @__PURE__ */ import_react31.default.createElement(
|
|
8211
8405
|
TicketHoldersCard,
|
|
8212
8406
|
{
|
|
@@ -8241,12 +8435,13 @@ var import_react33 = __toESM(require("react"));
|
|
|
8241
8435
|
var import_react32 = __toESM(require("react"));
|
|
8242
8436
|
var OrderSummary = ({ eventId, className }) => {
|
|
8243
8437
|
var _a, _b, _c;
|
|
8438
|
+
const t = useT();
|
|
8244
8439
|
const checkout = useCheckoutContext();
|
|
8245
8440
|
const event = hooks_exports.useEvent(eventId);
|
|
8246
8441
|
const breakdown = checkout.breakdown;
|
|
8247
8442
|
const detailed = checkout.priceBreakdown;
|
|
8248
8443
|
if (!breakdown || breakdown.tickets.length === 0) return null;
|
|
8249
|
-
return /* @__PURE__ */ import_react32.default.createElement(Card, { className: ["tf-checkout-order-summary", className].filter(Boolean).join(" ") }, ((_a = event.data) == null ? void 0 : _a.name) && /* @__PURE__ */ import_react32.default.createElement("div", { className: "tf-checkout-order-summary__group" }, /* @__PURE__ */ import_react32.default.createElement("div", { className: "tf-checkout-order-summary__label" }, "
|
|
8444
|
+
return /* @__PURE__ */ import_react32.default.createElement(Card, { className: ["tf-checkout-order-summary", className].filter(Boolean).join(" ") }, ((_a = event.data) == null ? void 0 : _a.name) && /* @__PURE__ */ import_react32.default.createElement("div", { className: "tf-checkout-order-summary__group" }, /* @__PURE__ */ import_react32.default.createElement("div", { className: "tf-checkout-order-summary__label" }, t("common.event")), /* @__PURE__ */ import_react32.default.createElement("div", { className: "tf-checkout-order-summary__event" }, event.data.name)), /* @__PURE__ */ import_react32.default.createElement("div", { className: "tf-checkout-order-summary__group" }, /* @__PURE__ */ import_react32.default.createElement("div", { className: "tf-checkout-order-summary__label" }, t("tickets.yourTickets")), breakdown.tickets.map((ticket, index) => {
|
|
8250
8445
|
var _a2;
|
|
8251
8446
|
const detail = detailed == null ? void 0 : detailed.tickets[index];
|
|
8252
8447
|
return /* @__PURE__ */ import_react32.default.createElement(
|
|
@@ -8255,7 +8450,7 @@ var OrderSummary = ({ eventId, className }) => {
|
|
|
8255
8450
|
key: `${ticket.ticketTypeId}-${index}`,
|
|
8256
8451
|
className: "tf-checkout-order-summary__item"
|
|
8257
8452
|
},
|
|
8258
|
-
/* @__PURE__ */ import_react32.default.createElement("div", { className: "tf-checkout-order-summary__ticket" }, ticket.quantity, " x ", ticket.name, " - ", (_a2 = detail == null ? void 0 : detail.unit_price) != null ? _a2 : ticket.unit, " ", "each"),
|
|
8453
|
+
/* @__PURE__ */ import_react32.default.createElement("div", { className: "tf-checkout-order-summary__ticket" }, ticket.quantity, " x ", ticket.name, " - ", (_a2 = detail == null ? void 0 : detail.unit_price) != null ? _a2 : ticket.unit, " ", t("common.each")),
|
|
8259
8454
|
(detail == null ? void 0 : detail.line_total) && detail.line_total !== detail.unit_price && /* @__PURE__ */ import_react32.default.createElement("div", { className: "tf-checkout-order-summary__fees" }, "(", detail.line_total, " with fees)")
|
|
8260
8455
|
);
|
|
8261
8456
|
})), ((_b = detailed == null ? void 0 : detailed.add_ons.length) != null ? _b : 0) > 0 && /* @__PURE__ */ import_react32.default.createElement("div", { className: "tf-checkout-order-summary__group" }, /* @__PURE__ */ import_react32.default.createElement("div", { className: "tf-checkout-order-summary__label" }, (detailed == null ? void 0 : detailed.add_ons_title) || "Add-ons"), detailed == null ? void 0 : detailed.add_ons.map((addOn, index) => /* @__PURE__ */ import_react32.default.createElement(
|
|
@@ -8264,8 +8459,8 @@ var OrderSummary = ({ eventId, className }) => {
|
|
|
8264
8459
|
key: `${addOn.name}-${index}`,
|
|
8265
8460
|
className: "tf-checkout-order-summary__item"
|
|
8266
8461
|
},
|
|
8267
|
-
/* @__PURE__ */ import_react32.default.createElement("div", { className: "tf-checkout-order-summary__ticket" }, addOn.quantity, " x ", addOn.name, addOn.show_price ? ` - ${addOn.unit_price} each` : "")
|
|
8268
|
-
))), /* @__PURE__ */ import_react32.default.createElement("div", { className: "tf-checkout-order-summary__total" }, /* @__PURE__ */ import_react32.default.createElement("div", { className: "tf-checkout-order-summary__label" }, "
|
|
8462
|
+
/* @__PURE__ */ import_react32.default.createElement("div", { className: "tf-checkout-order-summary__ticket" }, addOn.quantity, " x ", addOn.name, addOn.show_price ? ` - ${addOn.unit_price} ${t("common.each")}` : "")
|
|
8463
|
+
))), /* @__PURE__ */ import_react32.default.createElement("div", { className: "tf-checkout-order-summary__total" }, /* @__PURE__ */ import_react32.default.createElement("div", { className: "tf-checkout-order-summary__label" }, t("common.total")), /* @__PURE__ */ import_react32.default.createElement("div", { className: "tf-checkout-order-summary__amount" }, (_c = detailed == null ? void 0 : detailed.total) != null ? _c : `${breakdown.currencySymbol || `${breakdown.currencyCode} `}${Number(
|
|
8269
8464
|
breakdown.total
|
|
8270
8465
|
).toFixed(2)}`)));
|
|
8271
8466
|
};
|
|
@@ -8308,6 +8503,7 @@ var Payment = ({
|
|
|
8308
8503
|
className
|
|
8309
8504
|
}) => {
|
|
8310
8505
|
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m;
|
|
8506
|
+
const t = useT();
|
|
8311
8507
|
const checkout = useCheckoutContext();
|
|
8312
8508
|
const validation = useCheckoutValidation();
|
|
8313
8509
|
const [error, setError] = (0, import_react33.useState)("");
|
|
@@ -8337,7 +8533,11 @@ var Payment = ({
|
|
|
8337
8533
|
const out = [];
|
|
8338
8534
|
if (isXendit) {
|
|
8339
8535
|
if (methods.xenditCard)
|
|
8340
|
-
out.push({
|
|
8536
|
+
out.push({
|
|
8537
|
+
id: { kind: "xenditCard" },
|
|
8538
|
+
value: "xenditCard",
|
|
8539
|
+
label: t("payment.card")
|
|
8540
|
+
});
|
|
8341
8541
|
for (const w of methods.xenditEWallets)
|
|
8342
8542
|
out.push({
|
|
8343
8543
|
id: { kind: "xenditEWallet", walletKey: w.key },
|
|
@@ -8349,23 +8549,23 @@ var Payment = ({
|
|
|
8349
8549
|
} else if (checkout.gateway === "razorpay") {
|
|
8350
8550
|
out.push({ id: { kind: "razorpay" }, value: "razorpay", label: "Razorpay" });
|
|
8351
8551
|
} else {
|
|
8352
|
-
out.push({ id: { kind: "card" }, value: "card", label: "
|
|
8353
|
-
for (const
|
|
8354
|
-
if (
|
|
8552
|
+
out.push({ id: { kind: "card" }, value: "card", label: t("payment.card") });
|
|
8553
|
+
for (const t2 of (_b2 = checkout.redirectPaymentMethods) != null ? _b2 : []) {
|
|
8554
|
+
if (t2 === "paypal" && methods.paypal) continue;
|
|
8355
8555
|
out.push({
|
|
8356
|
-
id: { kind: "redirect", methodType:
|
|
8357
|
-
value: `rd:${
|
|
8358
|
-
label: redirectLabel(
|
|
8556
|
+
id: { kind: "redirect", methodType: t2 },
|
|
8557
|
+
value: `rd:${t2}`,
|
|
8558
|
+
label: redirectLabel(t2)
|
|
8359
8559
|
});
|
|
8360
8560
|
}
|
|
8361
8561
|
if ((_c2 = checkout.paymentPlan) == null ? void 0 : _c2.available)
|
|
8362
8562
|
out.push({
|
|
8363
8563
|
id: { kind: "paymentPlan" },
|
|
8364
8564
|
value: "paymentPlan",
|
|
8365
|
-
label: "
|
|
8565
|
+
label: t("payment.paymentPlan")
|
|
8366
8566
|
});
|
|
8367
8567
|
if (offersOxxo)
|
|
8368
|
-
out.push({ id: { kind: "oxxo" }, value: "oxxo", label: "
|
|
8568
|
+
out.push({ id: { kind: "oxxo" }, value: "oxxo", label: t("payment.oxxo") });
|
|
8369
8569
|
}
|
|
8370
8570
|
if (methods.paypal)
|
|
8371
8571
|
out.push({ id: { kind: "paypal" }, value: "paypal", label: "PayPal" });
|
|
@@ -8422,7 +8622,7 @@ var Payment = ({
|
|
|
8422
8622
|
const extra = selectedOption == null ? void 0 : selectedOption.extra;
|
|
8423
8623
|
const extrasOk = !extra || (extra === "cashtag" ? Boolean((_i = (_h = extras[selected]) == null ? void 0 : _h.cashtag) == null ? void 0 : _i.trim()) : Boolean((_k = (_j = extras[selected]) == null ? void 0 : _j.phoneNumber) == null ? void 0 : _k.trim()));
|
|
8424
8624
|
const privacyOk = !requirePrivacyPolicy || checkout.consent.ttfOptIn;
|
|
8425
|
-
const payLabel = isFree ? "
|
|
8625
|
+
const payLabel = isFree ? t("payment.completeRegistration") : isPlanSelected ? planConfirmLabel((_l = checkout.paymentPlan) == null ? void 0 : _l.configuration) : t("payment.submitPayment");
|
|
8426
8626
|
const planTerms = paymentPlanTerms((_m = checkout.paymentPlan) == null ? void 0 : _m.configuration);
|
|
8427
8627
|
const finalizing = checkout.status === "placing" || checkout.status === "succeeded";
|
|
8428
8628
|
const pay = () => {
|
|
@@ -8503,15 +8703,15 @@ var Payment = ({
|
|
|
8503
8703
|
}
|
|
8504
8704
|
}
|
|
8505
8705
|
) : /* @__PURE__ */ import_react33.default.createElement(CardInput, null)
|
|
8506
|
-
), isXendit && cardAreaError && /* @__PURE__ */ import_react33.default.createElement("p", { className: "tf-checkout-error-text" }, cardAreaError), showTestCardHint && /* @__PURE__ */ import_react33.default.createElement("p", { className: "tf-checkout-note" }, isXendit ? "
|
|
8706
|
+
), isXendit && cardAreaError && /* @__PURE__ */ import_react33.default.createElement("p", { className: "tf-checkout-error-text" }, cardAreaError), showTestCardHint && /* @__PURE__ */ import_react33.default.createElement("p", { className: "tf-checkout-note" }, isXendit ? t("payment.testCardXendit") : t("payment.testCard"))), isPlanSelected && planTerms.length > 0 && /* @__PURE__ */ import_react33.default.createElement("div", { className: "tf-checkout-payment__plan" }, /* @__PURE__ */ import_react33.default.createElement("strong", null, planTermsTitle(checkout.paymentPlan.configuration)), planTerms.map((part) => /* @__PURE__ */ import_react33.default.createElement("p", { key: part.id, className: "tf-checkout-note" }, part.text))), isPlanSelected && savedLast4 && /* @__PURE__ */ import_react33.default.createElement("div", { className: "tf-checkout-payment__plan-savedcard" }, /* @__PURE__ */ import_react33.default.createElement("p", { className: "tf-checkout-note" }, "Your payment will proceed with the card ending in", " ", /* @__PURE__ */ import_react33.default.createElement("strong", null, "**** ", savedLast4)), /* @__PURE__ */ import_react33.default.createElement(
|
|
8507
8707
|
Checkbox,
|
|
8508
8708
|
{
|
|
8509
8709
|
checked: useSavedCard,
|
|
8510
8710
|
onChange: (e) => setUseSavedCard(e.target.checked),
|
|
8511
|
-
label: "
|
|
8711
|
+
label: t("payment.useThisCard")
|
|
8512
8712
|
}
|
|
8513
8713
|
)));
|
|
8514
|
-
return /* @__PURE__ */ import_react33.default.createElement("div", { className: ["tf-checkout-payment-stack", className].filter(Boolean).join(" ") }, /* @__PURE__ */ import_react33.default.createElement(Card, null, /* @__PURE__ */ import_react33.default.createElement(SectionHeader, { title: "
|
|
8714
|
+
return /* @__PURE__ */ import_react33.default.createElement("div", { className: ["tf-checkout-payment-stack", className].filter(Boolean).join(" ") }, /* @__PURE__ */ import_react33.default.createElement(Card, null, /* @__PURE__ */ import_react33.default.createElement(SectionHeader, { title: t("payment.title") }), !isFree && /* @__PURE__ */ import_react33.default.createElement(import_react33.default.Fragment, null, !singleCard && /* @__PURE__ */ import_react33.default.createElement("div", { className: "tf-checkout-payment__label" }, t("payment.method")), !methods ? /* @__PURE__ */ import_react33.default.createElement("div", { className: "tf-checkout-payment__cardbox" }, /* @__PURE__ */ import_react33.default.createElement(Loader, null)) : singleCard ? paymentInput : /* @__PURE__ */ import_react33.default.createElement(
|
|
8515
8715
|
PaymentMethods,
|
|
8516
8716
|
{
|
|
8517
8717
|
options,
|
|
@@ -8552,7 +8752,7 @@ var Payment = ({
|
|
|
8552
8752
|
loading: finalizing,
|
|
8553
8753
|
disabled: checkout.isBusy || finalizing || !isFree && !methods
|
|
8554
8754
|
},
|
|
8555
|
-
finalizing ? "
|
|
8755
|
+
finalizing ? t("payment.placing") : payLabel
|
|
8556
8756
|
)), bottomError && /* @__PURE__ */ import_react33.default.createElement("p", { className: "tf-checkout-error-text" }, bottomError));
|
|
8557
8757
|
};
|
|
8558
8758
|
|
|
@@ -8599,6 +8799,7 @@ var Confirmation = ({
|
|
|
8599
8799
|
children,
|
|
8600
8800
|
className
|
|
8601
8801
|
}) => {
|
|
8802
|
+
const t = useT();
|
|
8602
8803
|
const checkout = useCheckoutContext();
|
|
8603
8804
|
const order = checkout.order;
|
|
8604
8805
|
const [copied, setCopied] = (0, import_react35.useState)(false);
|
|
@@ -8632,7 +8833,7 @@ var Confirmation = ({
|
|
|
8632
8833
|
() => void 0
|
|
8633
8834
|
);
|
|
8634
8835
|
};
|
|
8635
|
-
return /* @__PURE__ */ import_react35.default.createElement(Card, { className: cx("tf-checkout-confirmation", className) }, /* @__PURE__ */ import_react35.default.createElement("span", { className: "tf-checkout-confirmation__check" }, pending ? "\u23F3" : "\u2713"), /* @__PURE__ */ import_react35.default.createElement("strong", { className: "tf-checkout-confirmation__title" }, pending ? "
|
|
8836
|
+
return /* @__PURE__ */ import_react35.default.createElement(Card, { className: cx("tf-checkout-confirmation", className) }, /* @__PURE__ */ import_react35.default.createElement("span", { className: "tf-checkout-confirmation__check" }, pending ? "\u23F3" : "\u2713"), /* @__PURE__ */ import_react35.default.createElement("strong", { className: "tf-checkout-confirmation__title" }, pending ? t("confirmation.pending") : t("confirmation.confirmed")), /* @__PURE__ */ import_react35.default.createElement("p", { className: "tf-checkout-note" }, pending ? t("confirmation.pendingBody") : order.alreadyPaid ? t("confirmation.alreadyPaid") : t("confirmation.available")), order.orderHash && /* @__PURE__ */ import_react35.default.createElement("p", { className: "tf-checkout-confirmation__ref" }, "Reference: ", order.orderHash), pending && order.pendingVoucherUrl && /* @__PURE__ */ import_react35.default.createElement(
|
|
8636
8837
|
"a",
|
|
8637
8838
|
{
|
|
8638
8839
|
className: "tf-checkout-button tf-checkout-button--secondary tf-checkout-button--block",
|
|
@@ -8648,7 +8849,7 @@ var Confirmation = ({
|
|
|
8648
8849
|
href: viewOrderUrl
|
|
8649
8850
|
},
|
|
8650
8851
|
"View my tickets"
|
|
8651
|
-
), children, !pending && url && /* @__PURE__ */ import_react35.default.createElement("div", { className: "tf-checkout-confirmation__share" }, /* @__PURE__ */ import_react35.default.createElement("strong", null, "
|
|
8852
|
+
), children, !pending && url && /* @__PURE__ */ import_react35.default.createElement("div", { className: "tf-checkout-confirmation__share" }, /* @__PURE__ */ import_react35.default.createElement("strong", null, t("referral.cheaperOrFree")), /* @__PURE__ */ import_react35.default.createElement("p", { className: "tf-checkout-note" }, "Invite friends with your link. When they buy, you get rewarded."), /* @__PURE__ */ import_react35.default.createElement("div", { className: "tf-checkout-confirmation__share-link" }, /* @__PURE__ */ import_react35.default.createElement("input", { className: "tf-checkout-input", readOnly: true, value: url }), /* @__PURE__ */ import_react35.default.createElement(Button, { variant: "secondary", onClick: copy }, copied ? t("referral.copied") : t("referral.copyLink"))), /* @__PURE__ */ import_react35.default.createElement("div", { className: "tf-checkout-confirmation__socials" }, shares.map((s) => /* @__PURE__ */ import_react35.default.createElement(
|
|
8652
8853
|
"a",
|
|
8653
8854
|
{
|
|
8654
8855
|
key: s.label,
|
|
@@ -9064,32 +9265,41 @@ var EmbeddedCheckout = ({
|
|
|
9064
9265
|
locale,
|
|
9065
9266
|
messages,
|
|
9066
9267
|
className
|
|
9067
|
-
}) => /* @__PURE__ */ import_react38.default.createElement(
|
|
9068
|
-
|
|
9268
|
+
}) => /* @__PURE__ */ import_react38.default.createElement(
|
|
9269
|
+
CheckoutProvider,
|
|
9069
9270
|
{
|
|
9070
|
-
|
|
9071
|
-
|
|
9072
|
-
|
|
9073
|
-
|
|
9074
|
-
|
|
9075
|
-
|
|
9076
|
-
|
|
9077
|
-
|
|
9078
|
-
|
|
9079
|
-
|
|
9080
|
-
|
|
9081
|
-
|
|
9082
|
-
|
|
9083
|
-
|
|
9084
|
-
|
|
9085
|
-
|
|
9086
|
-
|
|
9087
|
-
|
|
9088
|
-
|
|
9089
|
-
|
|
9090
|
-
|
|
9091
|
-
|
|
9092
|
-
|
|
9271
|
+
theme,
|
|
9272
|
+
locale,
|
|
9273
|
+
messages,
|
|
9274
|
+
className
|
|
9275
|
+
},
|
|
9276
|
+
/* @__PURE__ */ import_react38.default.createElement(
|
|
9277
|
+
Flow,
|
|
9278
|
+
{
|
|
9279
|
+
key: eventId,
|
|
9280
|
+
eventId,
|
|
9281
|
+
onComplete,
|
|
9282
|
+
confirmationMode,
|
|
9283
|
+
initialView,
|
|
9284
|
+
onViewChange,
|
|
9285
|
+
autoScroll,
|
|
9286
|
+
requireEmailConfirmation,
|
|
9287
|
+
collectTicketHolders,
|
|
9288
|
+
collectHolderContact,
|
|
9289
|
+
onLogin,
|
|
9290
|
+
auth,
|
|
9291
|
+
skipBillingWhenProfileComplete,
|
|
9292
|
+
ttfOptInLabel,
|
|
9293
|
+
brandOptInLabel,
|
|
9294
|
+
privacyPolicy,
|
|
9295
|
+
additionalConditions,
|
|
9296
|
+
initialPromoCode,
|
|
9297
|
+
referrer,
|
|
9298
|
+
readAttributionFromUrl,
|
|
9299
|
+
showTestCardHint
|
|
9300
|
+
}
|
|
9301
|
+
)
|
|
9302
|
+
);
|
|
9093
9303
|
|
|
9094
9304
|
// src/ResumedCheckout.tsx
|
|
9095
9305
|
var import_react39 = __toESM(require("react"));
|