@bigz-app/booking-widget 1.4.0 → 1.4.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/booking-widget.js +508 -319
- package/dist/booking-widget.js.map +1 -1
- package/dist/components/UniversalBookingWidget.d.ts.map +1 -1
- package/dist/components/booking/BookingForm.d.ts +1 -0
- package/dist/components/booking/BookingForm.d.ts.map +1 -1
- package/dist/components/booking/GiftCardOnlyBooking.d.ts.map +1 -1
- package/dist/components/booking/StripePaymentForm.d.ts.map +1 -1
- package/dist/components/booking/VoucherInput.d.ts.map +1 -1
- package/dist/components/events/EventInstanceSelection.d.ts +2 -1
- package/dist/components/events/EventInstanceSelection.d.ts.map +1 -1
- package/dist/components/events/EventTypeSelection.d.ts.map +1 -1
- package/dist/components/events/NextEventsPreview.d.ts.map +1 -1
- package/dist/components/shared/flow-progress.d.ts +8 -0
- package/dist/components/shared/flow-progress.d.ts.map +1 -0
- package/dist/components/shared/payment-logos-strip.d.ts +2 -0
- package/dist/components/shared/payment-logos-strip.d.ts.map +1 -0
- package/dist/components/upsells/UpsellsStep.d.ts.map +1 -1
- package/dist/i18n/locales/de.d.ts.map +1 -1
- package/dist/i18n/locales/en.d.ts.map +1 -1
- package/dist/i18n/locales/es.d.ts.map +1 -1
- package/dist/i18n/locales/pt.d.ts.map +1 -1
- package/dist/i18n/locales/sv.d.ts.map +1 -1
- package/dist/index.cjs +508 -319
- package/dist/index.cjs.map +1 -1
- package/dist/index.esm.js +508 -319
- package/dist/index.esm.js.map +1 -1
- package/dist/utils.d.ts +2 -2
- package/dist/utils.d.ts.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -233,6 +233,7 @@ const de$1 = {
|
|
|
233
233
|
// Buttons
|
|
234
234
|
"button.bookNow": "Jetzt buchen",
|
|
235
235
|
"button.selectDate": "Jetzt Termin auswählen",
|
|
236
|
+
"button.viewDates": "Termine ansehen",
|
|
236
237
|
"button.moreDetails": "Mehr Details",
|
|
237
238
|
"button.toPayment": "Zur Zahlung ↓",
|
|
238
239
|
"button.redeem": "Einlösen",
|
|
@@ -256,6 +257,7 @@ const de$1 = {
|
|
|
256
257
|
"events.availableFrom": "Freie Plätze ab {{date}}",
|
|
257
258
|
"events.noAvailableDates": "Keine Termine frei",
|
|
258
259
|
"events.previewSectionTitle": "Specials & nächste Termine",
|
|
260
|
+
"events.seeMoreDates": "Weitere Termine ansehen...",
|
|
259
261
|
// Event instances
|
|
260
262
|
"instances.title": "Terminauswahl",
|
|
261
263
|
"instances.noAvailable": "Keine verfügbaren Termine",
|
|
@@ -270,7 +272,7 @@ const de$1 = {
|
|
|
270
272
|
"nextEvents.subtitle": "Wähle einen Termin aus oder zeige alle verfügbaren Termine an",
|
|
271
273
|
"nextEvents.noUpcoming": "Keine bevorstehenden Termine",
|
|
272
274
|
"nextEvents.noUpcomingMessage": "Aktuell sind keine Termine verfügbar. Bitte schaue später noch einmal vorbei oder kontaktiere uns direkt.",
|
|
273
|
-
"nextEvents.showAll": "
|
|
275
|
+
"nextEvents.showAll": "Weitere Termine ansehen...",
|
|
274
276
|
"nextEvents.priceOnRequest": "Preis auf Anfrage",
|
|
275
277
|
// Specials view
|
|
276
278
|
"specials.title": "Sonderangebote",
|
|
@@ -309,6 +311,10 @@ const de$1 = {
|
|
|
309
311
|
"booking.maxSpotsReached": "Maximal {{count}} Plätze verfügbar.",
|
|
310
312
|
"booking.comment": "Kommentar (optional)",
|
|
311
313
|
"booking.commentPlaceholder": "Zusätzliche Anmerkungen zur Buchung...",
|
|
314
|
+
"booking.stepDate": "Termin",
|
|
315
|
+
"booking.stepUpsells": "Extras",
|
|
316
|
+
"booking.stepDetails": "Angaben",
|
|
317
|
+
"booking.stepPayment": "Zahlung",
|
|
312
318
|
// Booking summary
|
|
313
319
|
"summary.title": "Buchungszusammenfassung",
|
|
314
320
|
"summary.subtotal": "Zwischensumme:",
|
|
@@ -441,6 +447,7 @@ const de$1 = {
|
|
|
441
447
|
"upsells.selectedPlural": "{{count}} Extras ausgewählt",
|
|
442
448
|
"upsells.savePercent": "{{percent}}% sparen",
|
|
443
449
|
"booking.paymentUnavailable": "Online-Zahlung ist für diese Buchung nicht verfügbar. Bitte kontaktiere uns, um die Reservierung abzuschließen.",
|
|
450
|
+
"booking.depositNotConfigured": "Online-Anzahlung ist für dieses Event nicht verfügbar. Bitte kontaktiere uns, um die Reservierung abzuschließen.",
|
|
444
451
|
"upsells.spotsFree": "{{count}} Plätze frei",
|
|
445
452
|
"upsells.notAvailable": "Nicht verfügbar",
|
|
446
453
|
"upsells.reason.outOfStock": "{{productName}} ist nicht auf Lager",
|
|
@@ -466,6 +473,9 @@ const de$1 = {
|
|
|
466
473
|
"promo.giftCode": "Dein Geschenk-Code",
|
|
467
474
|
"promo.copied": "Kopiert!",
|
|
468
475
|
"promo.copy": "Kopieren",
|
|
476
|
+
"trust.securePayment": "Sichere Zahlung",
|
|
477
|
+
"trust.paypal": "PayPal",
|
|
478
|
+
"trust.stripe": "Stripe",
|
|
469
479
|
};
|
|
470
480
|
|
|
471
481
|
const en = {
|
|
@@ -513,6 +523,7 @@ const en = {
|
|
|
513
523
|
// Buttons
|
|
514
524
|
"button.bookNow": "Book now",
|
|
515
525
|
"button.selectDate": "Select a date",
|
|
526
|
+
"button.viewDates": "View dates",
|
|
516
527
|
"button.moreDetails": "More details",
|
|
517
528
|
"button.toPayment": "To payment ↓",
|
|
518
529
|
"button.redeem": "Redeem",
|
|
@@ -536,6 +547,7 @@ const en = {
|
|
|
536
547
|
"events.availableFrom": "Available from {{date}}",
|
|
537
548
|
"events.noAvailableDates": "No dates available",
|
|
538
549
|
"events.previewSectionTitle": "Specials & upcoming dates",
|
|
550
|
+
"events.seeMoreDates": "See more dates...",
|
|
539
551
|
// Event instances
|
|
540
552
|
"instances.title": "Select a date",
|
|
541
553
|
"instances.noAvailable": "No available dates",
|
|
@@ -550,7 +562,7 @@ const en = {
|
|
|
550
562
|
"nextEvents.subtitle": "Select a date or view all available dates",
|
|
551
563
|
"nextEvents.noUpcoming": "No upcoming dates",
|
|
552
564
|
"nextEvents.noUpcomingMessage": "There are currently no dates available. Please check back later or contact us directly.",
|
|
553
|
-
"nextEvents.showAll": "
|
|
565
|
+
"nextEvents.showAll": "See more dates...",
|
|
554
566
|
"nextEvents.priceOnRequest": "Price on request",
|
|
555
567
|
// Specials view
|
|
556
568
|
"specials.title": "Special Offers",
|
|
@@ -589,6 +601,10 @@ const en = {
|
|
|
589
601
|
"booking.maxSpotsReached": "Maximum {{count}} spots available.",
|
|
590
602
|
"booking.comment": "Comment (optional)",
|
|
591
603
|
"booking.commentPlaceholder": "Additional notes for the booking...",
|
|
604
|
+
"booking.stepDate": "Date",
|
|
605
|
+
"booking.stepUpsells": "Extras",
|
|
606
|
+
"booking.stepDetails": "Details",
|
|
607
|
+
"booking.stepPayment": "Payment",
|
|
592
608
|
// Booking summary
|
|
593
609
|
"summary.title": "Booking Summary",
|
|
594
610
|
"summary.subtotal": "Subtotal:",
|
|
@@ -721,6 +737,7 @@ const en = {
|
|
|
721
737
|
"upsells.selectedPlural": "{{count}} extras selected",
|
|
722
738
|
"upsells.savePercent": "Save {{percent}}%",
|
|
723
739
|
"booking.paymentUnavailable": "Online payment is not available for this booking. Please contact us to complete your reservation.",
|
|
740
|
+
"booking.depositNotConfigured": "Online deposit payment is not available for this event. Please contact us to complete your reservation.",
|
|
724
741
|
"upsells.spotsFree": "{{count}} spots available",
|
|
725
742
|
"upsells.notAvailable": "Not available",
|
|
726
743
|
"upsells.reason.outOfStock": "{{productName}} is out of stock",
|
|
@@ -746,6 +763,9 @@ const en = {
|
|
|
746
763
|
"promo.giftCode": "Your gift code",
|
|
747
764
|
"promo.copied": "Copied!",
|
|
748
765
|
"promo.copy": "Copy",
|
|
766
|
+
"trust.securePayment": "Secure payment",
|
|
767
|
+
"trust.paypal": "PayPal",
|
|
768
|
+
"trust.stripe": "Stripe",
|
|
749
769
|
};
|
|
750
770
|
|
|
751
771
|
const es = {
|
|
@@ -793,6 +813,7 @@ const es = {
|
|
|
793
813
|
// Buttons
|
|
794
814
|
"button.bookNow": "Reservar ahora",
|
|
795
815
|
"button.selectDate": "Seleccionar fecha",
|
|
816
|
+
"button.viewDates": "Ver fechas",
|
|
796
817
|
"button.moreDetails": "Más detalles",
|
|
797
818
|
"button.toPayment": "Al pago ↓",
|
|
798
819
|
"button.redeem": "Canjear",
|
|
@@ -816,6 +837,7 @@ const es = {
|
|
|
816
837
|
"events.availableFrom": "Disponible desde {{date}}",
|
|
817
838
|
"events.noAvailableDates": "Sin fechas disponibles",
|
|
818
839
|
"events.previewSectionTitle": "Especiales & próximas fechas",
|
|
840
|
+
"events.seeMoreDates": "Ver más fechas...",
|
|
819
841
|
// Event instances
|
|
820
842
|
"instances.title": "Seleccionar fecha",
|
|
821
843
|
"instances.noAvailable": "Sin fechas disponibles",
|
|
@@ -830,7 +852,7 @@ const es = {
|
|
|
830
852
|
"nextEvents.subtitle": "Selecciona una fecha o consulta todas las fechas disponibles",
|
|
831
853
|
"nextEvents.noUpcoming": "Sin próximas fechas",
|
|
832
854
|
"nextEvents.noUpcomingMessage": "Actualmente no hay fechas disponibles. Por favor, vuelve más tarde o contáctanos directamente.",
|
|
833
|
-
"nextEvents.showAll": "
|
|
855
|
+
"nextEvents.showAll": "Ver más fechas...",
|
|
834
856
|
"nextEvents.priceOnRequest": "Precio bajo consulta",
|
|
835
857
|
// Specials view
|
|
836
858
|
"specials.title": "Ofertas especiales",
|
|
@@ -869,6 +891,10 @@ const es = {
|
|
|
869
891
|
"booking.maxSpotsReached": "Máximo {{count}} plazas disponibles.",
|
|
870
892
|
"booking.comment": "Comentario (opcional)",
|
|
871
893
|
"booking.commentPlaceholder": "Notas adicionales para la reserva...",
|
|
894
|
+
"booking.stepDate": "Fecha",
|
|
895
|
+
"booking.stepUpsells": "Extras",
|
|
896
|
+
"booking.stepDetails": "Datos",
|
|
897
|
+
"booking.stepPayment": "Pago",
|
|
872
898
|
// Booking summary
|
|
873
899
|
"summary.title": "Resumen de la reserva",
|
|
874
900
|
"summary.subtotal": "Subtotal:",
|
|
@@ -1001,6 +1027,7 @@ const es = {
|
|
|
1001
1027
|
"upsells.selectedPlural": "{{count}} extras seleccionados",
|
|
1002
1028
|
"upsells.savePercent": "Ahorra {{percent}}%",
|
|
1003
1029
|
"booking.paymentUnavailable": "El pago en línea no está disponible para esta reserva. Contáctanos para completarla.",
|
|
1030
|
+
"booking.depositNotConfigured": "El pago de depósito en línea no está disponible para este evento. Contáctanos para completar la reserva.",
|
|
1004
1031
|
"upsells.spotsFree": "{{count}} plazas disponibles",
|
|
1005
1032
|
"upsells.notAvailable": "No disponible",
|
|
1006
1033
|
"upsells.reason.outOfStock": "{{productName}} está agotado",
|
|
@@ -1026,6 +1053,9 @@ const es = {
|
|
|
1026
1053
|
"promo.giftCode": "Tu codigo de regalo",
|
|
1027
1054
|
"promo.copied": "Copiado!",
|
|
1028
1055
|
"promo.copy": "Copiar",
|
|
1056
|
+
"trust.securePayment": "Pago seguro",
|
|
1057
|
+
"trust.paypal": "PayPal",
|
|
1058
|
+
"trust.stripe": "Stripe",
|
|
1029
1059
|
};
|
|
1030
1060
|
|
|
1031
1061
|
const pt = {
|
|
@@ -1073,6 +1103,7 @@ const pt = {
|
|
|
1073
1103
|
// Buttons
|
|
1074
1104
|
"button.bookNow": "Reservar agora",
|
|
1075
1105
|
"button.selectDate": "Selecionar data",
|
|
1106
|
+
"button.viewDates": "Ver datas",
|
|
1076
1107
|
"button.moreDetails": "Mais detalhes",
|
|
1077
1108
|
"button.toPayment": "Para pagamento ↓",
|
|
1078
1109
|
"button.redeem": "Resgatar",
|
|
@@ -1096,6 +1127,7 @@ const pt = {
|
|
|
1096
1127
|
"events.availableFrom": "Disponível a partir de {{date}}",
|
|
1097
1128
|
"events.noAvailableDates": "Sem datas disponíveis",
|
|
1098
1129
|
"events.previewSectionTitle": "Especiais & próximas datas",
|
|
1130
|
+
"events.seeMoreDates": "Ver mais datas...",
|
|
1099
1131
|
// Event instances
|
|
1100
1132
|
"instances.title": "Selecionar data",
|
|
1101
1133
|
"instances.noAvailable": "Sem datas disponíveis",
|
|
@@ -1110,7 +1142,7 @@ const pt = {
|
|
|
1110
1142
|
"nextEvents.subtitle": "Selecione uma data ou veja todas as datas disponíveis",
|
|
1111
1143
|
"nextEvents.noUpcoming": "Sem próximas datas",
|
|
1112
1144
|
"nextEvents.noUpcomingMessage": "Atualmente não há datas disponíveis. Por favor, volte mais tarde ou contacte-nos diretamente.",
|
|
1113
|
-
"nextEvents.showAll": "
|
|
1145
|
+
"nextEvents.showAll": "Ver mais datas...",
|
|
1114
1146
|
"nextEvents.priceOnRequest": "Preço sob consulta",
|
|
1115
1147
|
// Specials view
|
|
1116
1148
|
"specials.title": "Ofertas especiais",
|
|
@@ -1149,6 +1181,10 @@ const pt = {
|
|
|
1149
1181
|
"booking.maxSpotsReached": "Máximo {{count}} lugares disponíveis.",
|
|
1150
1182
|
"booking.comment": "Comentário (opcional)",
|
|
1151
1183
|
"booking.commentPlaceholder": "Notas adicionais para a reserva...",
|
|
1184
|
+
"booking.stepDate": "Data",
|
|
1185
|
+
"booking.stepUpsells": "Extras",
|
|
1186
|
+
"booking.stepDetails": "Dados",
|
|
1187
|
+
"booking.stepPayment": "Pagamento",
|
|
1152
1188
|
// Booking summary
|
|
1153
1189
|
"summary.title": "Resumo da reserva",
|
|
1154
1190
|
"summary.subtotal": "Subtotal:",
|
|
@@ -1281,6 +1317,7 @@ const pt = {
|
|
|
1281
1317
|
"upsells.selectedPlural": "{{count}} extras selecionados",
|
|
1282
1318
|
"upsells.savePercent": "Poupa {{percent}}%",
|
|
1283
1319
|
"booking.paymentUnavailable": "O pagamento online não está disponível para esta reserva. Contacta-nos para concluir a reserva.",
|
|
1320
|
+
"booking.depositNotConfigured": "O pagamento de depósito online não está disponível para este evento. Contacta-nos para concluir a reserva.",
|
|
1284
1321
|
"upsells.spotsFree": "{{count}} lugares disponíveis",
|
|
1285
1322
|
"upsells.notAvailable": "Não disponível",
|
|
1286
1323
|
"upsells.reason.outOfStock": "{{productName}} está esgotado",
|
|
@@ -1306,6 +1343,9 @@ const pt = {
|
|
|
1306
1343
|
"promo.giftCode": "O teu codigo de oferta",
|
|
1307
1344
|
"promo.copied": "Copiado!",
|
|
1308
1345
|
"promo.copy": "Copiar",
|
|
1346
|
+
"trust.securePayment": "Pagamento seguro",
|
|
1347
|
+
"trust.paypal": "PayPal",
|
|
1348
|
+
"trust.stripe": "Stripe",
|
|
1309
1349
|
};
|
|
1310
1350
|
|
|
1311
1351
|
const sv = {
|
|
@@ -1353,6 +1393,7 @@ const sv = {
|
|
|
1353
1393
|
// Buttons
|
|
1354
1394
|
"button.bookNow": "Boka nu",
|
|
1355
1395
|
"button.selectDate": "Välj datum",
|
|
1396
|
+
"button.viewDates": "Visa datum",
|
|
1356
1397
|
"button.moreDetails": "Mer information",
|
|
1357
1398
|
"button.toPayment": "Till betalning ↓",
|
|
1358
1399
|
"button.redeem": "Lös in",
|
|
@@ -1376,6 +1417,7 @@ const sv = {
|
|
|
1376
1417
|
"events.availableFrom": "Lediga platser från {{date}}",
|
|
1377
1418
|
"events.noAvailableDates": "Inga datum lediga",
|
|
1378
1419
|
"events.previewSectionTitle": "Specials & kommande datum",
|
|
1420
|
+
"events.seeMoreDates": "Se fler datum...",
|
|
1379
1421
|
// Event instances
|
|
1380
1422
|
"instances.title": "Välj datum",
|
|
1381
1423
|
"instances.noAvailable": "Inga tillgängliga datum",
|
|
@@ -1390,7 +1432,7 @@ const sv = {
|
|
|
1390
1432
|
"nextEvents.subtitle": "Välj ett datum eller visa alla tillgängliga datum",
|
|
1391
1433
|
"nextEvents.noUpcoming": "Inga kommande datum",
|
|
1392
1434
|
"nextEvents.noUpcomingMessage": "Det finns för närvarande inga datum tillgängliga. Kom tillbaka senare eller kontakta oss direkt.",
|
|
1393
|
-
"nextEvents.showAll": "
|
|
1435
|
+
"nextEvents.showAll": "Se fler datum...",
|
|
1394
1436
|
"nextEvents.priceOnRequest": "Pris på förfrågan",
|
|
1395
1437
|
// Specials view
|
|
1396
1438
|
"specials.title": "Specialerbjudanden",
|
|
@@ -1429,6 +1471,10 @@ const sv = {
|
|
|
1429
1471
|
"booking.maxSpotsReached": "Maximalt {{count}} platser tillgängliga.",
|
|
1430
1472
|
"booking.comment": "Kommentar (valfritt)",
|
|
1431
1473
|
"booking.commentPlaceholder": "Ytterligare anteckningar för bokningen...",
|
|
1474
|
+
"booking.stepDate": "Datum",
|
|
1475
|
+
"booking.stepUpsells": "Tillägg",
|
|
1476
|
+
"booking.stepDetails": "Uppgifter",
|
|
1477
|
+
"booking.stepPayment": "Betalning",
|
|
1432
1478
|
// Booking summary
|
|
1433
1479
|
"summary.title": "Bokningssammanfattning",
|
|
1434
1480
|
"summary.subtotal": "Delsumma:",
|
|
@@ -1561,6 +1607,7 @@ const sv = {
|
|
|
1561
1607
|
"upsells.selectedPlural": "{{count}} tillägg valda",
|
|
1562
1608
|
"upsells.savePercent": "Spara {{percent}}%",
|
|
1563
1609
|
"booking.paymentUnavailable": "Onlinebetalning är inte tillgänglig för denna bokning. Kontakta oss för att slutföra bokningen.",
|
|
1610
|
+
"booking.depositNotConfigured": "Online deposition är inte tillgänglig för detta evenemang. Kontakta oss för att slutföra bokningen.",
|
|
1564
1611
|
"upsells.spotsFree": "{{count}} platser lediga",
|
|
1565
1612
|
"upsells.notAvailable": "Inte tillgängligt",
|
|
1566
1613
|
"upsells.reason.outOfStock": "{{productName}} är slut i lager",
|
|
@@ -1586,6 +1633,9 @@ const sv = {
|
|
|
1586
1633
|
"promo.giftCode": "Din presentkod",
|
|
1587
1634
|
"promo.copied": "Kopierad!",
|
|
1588
1635
|
"promo.copy": "Kopiera",
|
|
1636
|
+
"trust.securePayment": "Säker betalning",
|
|
1637
|
+
"trust.paypal": "PayPal",
|
|
1638
|
+
"trust.stripe": "Stripe",
|
|
1589
1639
|
};
|
|
1590
1640
|
|
|
1591
1641
|
const SUPPORTED_LOCALES = ["de", "en", "es", "sv", "pt"];
|
|
@@ -2270,7 +2320,7 @@ const createApiHeaders = (_config, locale) => {
|
|
|
2270
2320
|
return {
|
|
2271
2321
|
"Content-Type": "application/json",
|
|
2272
2322
|
"X-Origin-Url": window.location.href,
|
|
2273
|
-
"X-Language": locale
|
|
2323
|
+
"X-Language": locale,
|
|
2274
2324
|
"X-User-Agent": navigator.userAgent,
|
|
2275
2325
|
};
|
|
2276
2326
|
};
|
|
@@ -6257,6 +6307,7 @@ const IconChevronRight = ({ size = 20, color = "white", className, }) => (jsxRun
|
|
|
6257
6307
|
|
|
6258
6308
|
function GiftCardOnlyBooking({ config, eventDetails, formData, discountCode, giftCards, onSuccess, onError, upsellSelections = [], }) {
|
|
6259
6309
|
const t = useTranslations();
|
|
6310
|
+
const { locale } = useLocale();
|
|
6260
6311
|
const [isLoading, setIsLoading] = React.useState(false);
|
|
6261
6312
|
const [error, setError] = React.useState(null);
|
|
6262
6313
|
const handleBooking = async () => {
|
|
@@ -6278,7 +6329,7 @@ function GiftCardOnlyBooking({ config, eventDetails, formData, discountCode, gif
|
|
|
6278
6329
|
};
|
|
6279
6330
|
const response = await fetch(getApiUrl(config.apiBaseUrl, "/booking/create-gift-card-booking"), {
|
|
6280
6331
|
method: "POST",
|
|
6281
|
-
headers: createApiHeaders(config),
|
|
6332
|
+
headers: createApiHeaders(config, locale),
|
|
6282
6333
|
body: JSON.stringify(createRequestBody(config, requestData)),
|
|
6283
6334
|
});
|
|
6284
6335
|
const data = await response.json();
|
|
@@ -6429,7 +6480,7 @@ function MolliePaymentForm({ config, eventDetails, formData, totalAmount, discou
|
|
|
6429
6480
|
try {
|
|
6430
6481
|
const response = await fetch(getApiUrl(config.apiBaseUrl, "/booking/mollie-methods"), {
|
|
6431
6482
|
method: "POST",
|
|
6432
|
-
headers: createApiHeaders(config),
|
|
6483
|
+
headers: createApiHeaders(config, locale),
|
|
6433
6484
|
body: JSON.stringify(createRequestBody(config, {
|
|
6434
6485
|
organizationId: config.organizationId,
|
|
6435
6486
|
amount: Math.round(totalAmount),
|
|
@@ -6572,7 +6623,7 @@ function MolliePaymentForm({ config, eventDetails, formData, totalAmount, discou
|
|
|
6572
6623
|
}
|
|
6573
6624
|
const response = await fetch(getApiUrl(config.apiBaseUrl, "/booking/create-mollie-payment"), {
|
|
6574
6625
|
method: "POST",
|
|
6575
|
-
headers: createApiHeaders(config),
|
|
6626
|
+
headers: createApiHeaders(config, locale),
|
|
6576
6627
|
body: JSON.stringify(createRequestBody(config, buildRequestData(token))),
|
|
6577
6628
|
});
|
|
6578
6629
|
const data = await response.json();
|
|
@@ -6608,7 +6659,7 @@ function MolliePaymentForm({ config, eventDetails, formData, totalAmount, discou
|
|
|
6608
6659
|
}
|
|
6609
6660
|
const response = await fetch(getApiUrl(config.apiBaseUrl, "/booking/create-mollie-payment"), {
|
|
6610
6661
|
method: "POST",
|
|
6611
|
-
headers: createApiHeaders(config),
|
|
6662
|
+
headers: createApiHeaders(config, locale),
|
|
6612
6663
|
body: JSON.stringify(createRequestBody(config, buildRequestData())),
|
|
6613
6664
|
});
|
|
6614
6665
|
const data = await response.json();
|
|
@@ -6806,6 +6857,7 @@ function PaymentFormInner({ eventDetails, formData, totalAmount, onSuccess, onEr
|
|
|
6806
6857
|
}
|
|
6807
6858
|
function StripePaymentForm({ config, eventDetails, formData, totalAmount, discountCode, giftCards, onSuccess, onError, systemConfig, stripePromise, stripeAppearance, upsellSelections = [], }) {
|
|
6808
6859
|
const t = useTranslations();
|
|
6860
|
+
const { locale } = useLocale();
|
|
6809
6861
|
const [clientSecret, setClientSecret] = React.useState(null);
|
|
6810
6862
|
const [paymentIntentId, setPaymentIntentId] = React.useState(null);
|
|
6811
6863
|
const [isCreatingPaymentIntent, setIsCreatingPaymentIntent] = React.useState(false);
|
|
@@ -6908,7 +6960,7 @@ function StripePaymentForm({ config, eventDetails, formData, totalAmount, discou
|
|
|
6908
6960
|
}
|
|
6909
6961
|
const response = await fetch(getApiUrl(config.apiBaseUrl, "/booking/create-stripe-payment"), {
|
|
6910
6962
|
method: "POST",
|
|
6911
|
-
headers: createApiHeaders(config),
|
|
6963
|
+
headers: createApiHeaders(config, locale),
|
|
6912
6964
|
body: JSON.stringify(createRequestBody(config, requestData)),
|
|
6913
6965
|
});
|
|
6914
6966
|
const data = await response.json();
|
|
@@ -7284,10 +7336,60 @@ function Accordion({ title, priceInfo, children, isOpen, onToggle, }) {
|
|
|
7284
7336
|
}, children: children }))] }));
|
|
7285
7337
|
}
|
|
7286
7338
|
|
|
7339
|
+
function FlowProgress({ currentStep, hasUpsellsStep }) {
|
|
7340
|
+
const t = useTranslations();
|
|
7341
|
+
const steps = hasUpsellsStep
|
|
7342
|
+
? [
|
|
7343
|
+
{ key: "date", label: t("booking.stepDate") },
|
|
7344
|
+
{ key: "upsells", label: t("booking.stepUpsells") },
|
|
7345
|
+
{ key: "details", label: t("booking.stepDetails") },
|
|
7346
|
+
{ key: "payment", label: t("booking.stepPayment") },
|
|
7347
|
+
]
|
|
7348
|
+
: [
|
|
7349
|
+
{ key: "date", label: t("booking.stepDate") },
|
|
7350
|
+
{ key: "details", label: t("booking.stepDetails") },
|
|
7351
|
+
{ key: "payment", label: t("booking.stepPayment") },
|
|
7352
|
+
];
|
|
7353
|
+
const activeIndex = Math.max(steps.findIndex((step) => step.key === currentStep), 0);
|
|
7354
|
+
const progressPercent = steps.length > 1 ? (activeIndex / (steps.length - 1)) * 100 : 100;
|
|
7355
|
+
return (jsxRuntime.jsxs("div", { style: {
|
|
7356
|
+
backgroundColor: "var(--bw-surface-color)",
|
|
7357
|
+
border: "1px solid var(--bw-border-color)",
|
|
7358
|
+
borderRadius: "var(--bw-border-radius)",
|
|
7359
|
+
padding: "12px 14px",
|
|
7360
|
+
marginBottom: "16px",
|
|
7361
|
+
}, children: [jsxRuntime.jsx("div", { style: {
|
|
7362
|
+
display: "flex",
|
|
7363
|
+
justifyContent: "space-between",
|
|
7364
|
+
alignItems: "center",
|
|
7365
|
+
marginBottom: "10px",
|
|
7366
|
+
fontFamily: "var(--bw-font-family)",
|
|
7367
|
+
gap: "8px",
|
|
7368
|
+
}, children: steps.map((step, index) => (jsxRuntime.jsxs("span", { style: {
|
|
7369
|
+
fontSize: "12px",
|
|
7370
|
+
fontWeight: 700,
|
|
7371
|
+
color: index <= activeIndex ? "var(--bw-highlight-color)" : "var(--bw-text-muted)",
|
|
7372
|
+
whiteSpace: "nowrap",
|
|
7373
|
+
}, children: [index + 1, ". ", step.label] }, step.key))) }), jsxRuntime.jsx("div", { style: {
|
|
7374
|
+
width: "100%",
|
|
7375
|
+
height: "8px",
|
|
7376
|
+
borderRadius: "999px",
|
|
7377
|
+
backgroundColor: "var(--bw-background-color)",
|
|
7378
|
+
border: "1px solid var(--bw-border-color)",
|
|
7379
|
+
overflow: "hidden",
|
|
7380
|
+
}, children: jsxRuntime.jsx("div", { style: {
|
|
7381
|
+
width: `${progressPercent}%`,
|
|
7382
|
+
height: "100%",
|
|
7383
|
+
backgroundColor: "var(--bw-highlight-color)",
|
|
7384
|
+
transition: "width 0.25s ease",
|
|
7385
|
+
} }) })] }));
|
|
7386
|
+
}
|
|
7387
|
+
|
|
7287
7388
|
// Spinner icon (kept local as it has animation style)
|
|
7288
7389
|
const IconSpinner = ({ size = 16, color = "currentColor" }) => (jsxRuntime.jsx("svg", { width: size, height: size, viewBox: "0 0 24 24", fill: "none", stroke: color, strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", style: { animation: "spin 1s linear infinite" }, children: jsxRuntime.jsx("path", { d: "M21 12a9 9 0 1 1-6.219-8.56" }) }));
|
|
7289
7390
|
function VoucherInput({ config, orderValue, eventInstanceId, customerEmail, onVoucherValidated, appliedVouchers, onRemoveVoucher, disabled = false, }) {
|
|
7290
7391
|
const t = useTranslations();
|
|
7392
|
+
const { locale } = useLocale();
|
|
7291
7393
|
const [inputValue, setInputValue] = React.useState("");
|
|
7292
7394
|
const [isLoading, setIsLoading] = React.useState(false);
|
|
7293
7395
|
const [error, setError] = React.useState(null);
|
|
@@ -7307,7 +7409,7 @@ function VoucherInput({ config, orderValue, eventInstanceId, customerEmail, onVo
|
|
|
7307
7409
|
try {
|
|
7308
7410
|
const response = await fetch(getApiUrl(config.apiBaseUrl, "/booking/validate-voucher"), {
|
|
7309
7411
|
method: "POST",
|
|
7310
|
-
headers: createApiHeaders(config),
|
|
7412
|
+
headers: createApiHeaders(config, locale),
|
|
7311
7413
|
body: JSON.stringify(createRequestBody(config, {
|
|
7312
7414
|
code: code.trim(),
|
|
7313
7415
|
orderValue: orderValue,
|
|
@@ -11498,6 +11600,7 @@ function BookingForm({ config, eventDetails, stripePromise, onSuccess, onError,
|
|
|
11498
11600
|
const { locale } = useLocale();
|
|
11499
11601
|
const timezone = useTimezone();
|
|
11500
11602
|
const roundEnabled = systemConfig?.roundPricesEnabled !== false;
|
|
11603
|
+
const widgetPaymentMode = systemConfig?.widgetPaymentMode ?? "all";
|
|
11501
11604
|
const participantFieldsConfig = eventDetails.participantFieldsConfig ?? DEFAULT_PARTICIPANT_FIELDS_CONFIG;
|
|
11502
11605
|
const participantLevelOptions = eventDetails.participantLevelOptions ?? ["beginner", "advanced"];
|
|
11503
11606
|
const roundDiscountUp = (minorUnits) => Math.ceil(minorUnits / 100) * 100;
|
|
@@ -11511,6 +11614,7 @@ function BookingForm({ config, eventDetails, stripePromise, onSuccess, onError,
|
|
|
11511
11614
|
const [paymentOption, setPaymentOption] = React.useState(() => persistedState?.paymentOption ?? "deposit");
|
|
11512
11615
|
// Per-participant upsell selections: participantIndex -> array of upsell package IDs
|
|
11513
11616
|
const [participantUpsells, setParticipantUpsells] = React.useState(() => persistedState?.participantUpsells ?? {});
|
|
11617
|
+
const [showPaymentValidationHint, setShowPaymentValidationHint] = React.useState(false);
|
|
11514
11618
|
const wasOpenRef = React.useRef(false);
|
|
11515
11619
|
const form = useForm({
|
|
11516
11620
|
resolver: t(createBookingFormSchema(t$1, participantFieldsConfig)),
|
|
@@ -11634,12 +11738,22 @@ function BookingForm({ config, eventDetails, stripePromise, onSuccess, onError,
|
|
|
11634
11738
|
const totalDiscount = calculateTotalDiscount();
|
|
11635
11739
|
const totalAmount = calculateTotal();
|
|
11636
11740
|
const depositAmount = calculateDeposit();
|
|
11637
|
-
|
|
11638
|
-
|
|
11639
|
-
const
|
|
11640
|
-
const
|
|
11641
|
-
|
|
11642
|
-
|
|
11741
|
+
const allowsDepositInWidget = widgetPaymentMode === "all" || widgetPaymentMode === "deposits_only";
|
|
11742
|
+
const allowsFullInWidget = widgetPaymentMode === "all" || widgetPaymentMode === "full_only";
|
|
11743
|
+
const hasConfiguredDeposit = depositAmount > 0;
|
|
11744
|
+
const hasDepositChoice = allowsDepositInWidget && hasConfiguredDeposit && depositAmount < totalAmount;
|
|
11745
|
+
const depositsOnlyBlocked = widgetPaymentMode === "deposits_only" && !hasConfiguredDeposit;
|
|
11746
|
+
React.useEffect(() => {
|
|
11747
|
+
if (widgetPaymentMode === "deposits_only") {
|
|
11748
|
+
setPaymentOption("deposit");
|
|
11749
|
+
}
|
|
11750
|
+
else if (widgetPaymentMode === "full_only") {
|
|
11751
|
+
setPaymentOption("full");
|
|
11752
|
+
}
|
|
11753
|
+
}, [widgetPaymentMode]);
|
|
11754
|
+
const paymentAmount = allowsFullInWidget && (!hasDepositChoice || paymentOption === "full" || !allowsDepositInWidget)
|
|
11755
|
+
? totalAmount
|
|
11756
|
+
: Math.min(depositAmount, totalAmount);
|
|
11643
11757
|
// Convert per-participant upsells to UpsellSelection[] format for API
|
|
11644
11758
|
// Includes participantIndices to track which participants selected each upsell
|
|
11645
11759
|
const aggregatedUpsellSelections = React.useCallback(() => {
|
|
@@ -11798,7 +11912,39 @@ function BookingForm({ config, eventDetails, stripePromise, onSuccess, onError,
|
|
|
11798
11912
|
onClose();
|
|
11799
11913
|
};
|
|
11800
11914
|
// Footer navigation
|
|
11801
|
-
const
|
|
11915
|
+
const canContinueToPayment = isReadyForPayment();
|
|
11916
|
+
const handleContinueToPayment = async () => {
|
|
11917
|
+
if (canContinueToPayment && hasPaymentProvider) {
|
|
11918
|
+
setShowPaymentValidationHint(false);
|
|
11919
|
+
setCheckoutStep("payment");
|
|
11920
|
+
return;
|
|
11921
|
+
}
|
|
11922
|
+
const participantErrors = await form.trigger("participants");
|
|
11923
|
+
const customerErrors = await form.trigger(["customerName", "customerEmail", "acceptTerms"]);
|
|
11924
|
+
if (!participantErrors || !customerErrors) {
|
|
11925
|
+
setShowPaymentValidationHint(true);
|
|
11926
|
+
}
|
|
11927
|
+
};
|
|
11928
|
+
React.useEffect(() => {
|
|
11929
|
+
if (showPaymentValidationHint && canContinueToPayment) {
|
|
11930
|
+
setShowPaymentValidationHint(false);
|
|
11931
|
+
}
|
|
11932
|
+
}, [showPaymentValidationHint, canContinueToPayment]);
|
|
11933
|
+
const footerContent = (jsxRuntime.jsxs("div", { style: { width: "100%", display: "flex", flexDirection: "column", gap: "6px" }, children: [checkoutStep === "details" && (jsxRuntime.jsx("div", { style: {
|
|
11934
|
+
minHeight: "14px",
|
|
11935
|
+
fontSize: "11px",
|
|
11936
|
+
color: "var(--bw-error-color)",
|
|
11937
|
+
textAlign: "center",
|
|
11938
|
+
fontFamily: "var(--bw-font-family)",
|
|
11939
|
+
opacity: showPaymentValidationHint ? 1 : 0,
|
|
11940
|
+
transition: "opacity 0.15s ease",
|
|
11941
|
+
pointerEvents: "none",
|
|
11942
|
+
}, children: t$1("payment.fillRequired") })), jsxRuntime.jsxs("div", { style: { display: "flex", gap: "12px", width: "100%" }, children: [jsxRuntime.jsx("button", { type: "button", onClick: checkoutStep === "payment" ? () => setCheckoutStep("details") : handleClose, style: mergeStyles(buttonStyles.secondary, buttonStyles.fullWidth), children: checkoutStep === "payment" ? t$1("button.backToDetails") : t$1("common.back") }), checkoutStep === "details" && (jsxRuntime.jsx("button", { type: "button", onClick: handleContinueToPayment, disabled: !hasPaymentProvider, style: mergeStyles(buttonStyles.primary, buttonStyles.fullWidth, !canContinueToPayment
|
|
11943
|
+
? {
|
|
11944
|
+
opacity: 0.55,
|
|
11945
|
+
cursor: "pointer",
|
|
11946
|
+
}
|
|
11947
|
+
: undefined), children: t$1("button.continueToPayment") }))] })] }));
|
|
11802
11948
|
if (!eventDetails.bookingOpen) {
|
|
11803
11949
|
return (jsxRuntime.jsx(Sidebar, { isOpen: isOpen, onClose: handleClose, title: t$1("booking.notPossible"), children: jsxRuntime.jsx("div", { style: {
|
|
11804
11950
|
display: "flex",
|
|
@@ -11815,7 +11961,7 @@ function BookingForm({ config, eventDetails, stripePromise, onSuccess, onError,
|
|
|
11815
11961
|
fontFamily: "var(--bw-font-family)",
|
|
11816
11962
|
}, children: t$1("booking.notPossible") }), jsxRuntime.jsx("p", { style: { color: "var(--bw-text-muted)", fontFamily: "var(--bw-font-family)" }, children: t$1("booking.notPossibleMessage") })] }) }) }));
|
|
11817
11963
|
}
|
|
11818
|
-
return (jsxRuntime.jsx(Sidebar, { isOpen: isOpen, onClose: handleClose, title: t$1("booking.title", { name: eventDetails.name }), footer: footerContent, children: jsxRuntime.jsxs("div", { className: "booking-widget-container", style: { padding: "16px" }, children: [checkoutStep === "details" && (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsxs("div", { style: cardStyles$1, children: [jsxRuntime.jsx("h2", { style: sectionHeaderStyles$1, children: t$1("booking.eventDetails") }), jsxRuntime.jsxs("div", { style: {
|
|
11964
|
+
return (jsxRuntime.jsx(Sidebar, { isOpen: isOpen, onClose: handleClose, title: t$1("booking.title", { name: eventDetails.name }), footer: footerContent, children: jsxRuntime.jsxs("div", { className: "booking-widget-container", style: { padding: "16px" }, children: [jsxRuntime.jsx(FlowProgress, { currentStep: checkoutStep === "details" ? "details" : "payment", hasUpsellsStep: upsells.length > 0 }), checkoutStep === "details" && (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsxs("div", { style: cardStyles$1, children: [jsxRuntime.jsx("h2", { style: sectionHeaderStyles$1, children: t$1("booking.eventDetails") }), jsxRuntime.jsxs("div", { style: {
|
|
11819
11965
|
display: "grid",
|
|
11820
11966
|
gridTemplateColumns: "repeat(auto-fit, minmax(200px, 1fr))",
|
|
11821
11967
|
gap: "12px",
|
|
@@ -11941,7 +12087,7 @@ function BookingForm({ config, eventDetails, stripePromise, onSuccess, onError,
|
|
|
11941
12087
|
}, children: t$1("summary.giftCard", { code: giftCard.code }) }), jsxRuntime.jsxs("span", { style: { color: "var(--bw-success-color)", fontFamily: "var(--bw-font-family)" }, children: ["-", formatCurrency(giftCard.balanceToUse || giftCard.discountAmount)] })] }, giftCard.code)))] })), jsxRuntime.jsxs("div", { style: {
|
|
11942
12088
|
borderTop: "1px solid var(--bw-border-color)",
|
|
11943
12089
|
paddingTop: "12px",
|
|
11944
|
-
}, children: [
|
|
12090
|
+
}, children: [hasDepositChoice && (jsxRuntime.jsxs("div", { style: {
|
|
11945
12091
|
display: "flex",
|
|
11946
12092
|
justifyContent: "space-between",
|
|
11947
12093
|
alignItems: "center",
|
|
@@ -11951,7 +12097,7 @@ function BookingForm({ config, eventDetails, stripePromise, onSuccess, onError,
|
|
|
11951
12097
|
color: "var(--bw-text-muted)",
|
|
11952
12098
|
fontFamily: "var(--bw-font-family)",
|
|
11953
12099
|
fontWeight: 500,
|
|
11954
|
-
}, children: formatCurrency(totalAmount) })] })),
|
|
12100
|
+
}, children: formatCurrency(totalAmount) })] })), hasDepositChoice && widgetPaymentMode === "all" && (jsxRuntime.jsxs("div", { style: {
|
|
11955
12101
|
display: "flex",
|
|
11956
12102
|
gap: "8px",
|
|
11957
12103
|
marginBottom: "16px",
|
|
@@ -12007,19 +12153,19 @@ function BookingForm({ config, eventDetails, stripePromise, onSuccess, onError,
|
|
|
12007
12153
|
alignItems: "center",
|
|
12008
12154
|
fontSize: "18px",
|
|
12009
12155
|
fontWeight: 600,
|
|
12010
|
-
}, children: [jsxRuntime.jsx("span", { style: { color: "var(--bw-text-color)", fontFamily: "var(--bw-font-family)" }, children:
|
|
12156
|
+
}, children: [jsxRuntime.jsx("span", { style: { color: "var(--bw-text-color)", fontFamily: "var(--bw-font-family)" }, children: hasDepositChoice && paymentOption === "deposit"
|
|
12011
12157
|
? t$1("summary.payToday")
|
|
12012
12158
|
: t$1("summary.totalAmount") }), jsxRuntime.jsx("span", { style: {
|
|
12013
12159
|
color: "var(--bw-highlight-color)",
|
|
12014
12160
|
fontFamily: "var(--bw-font-family)",
|
|
12015
12161
|
fontWeight: 700,
|
|
12016
|
-
}, children: formatCurrency(paymentAmount) })] }),
|
|
12162
|
+
}, children: formatCurrency(paymentAmount) })] }), hasDepositChoice && paymentOption === "deposit" && (jsxRuntime.jsx("div", { style: {
|
|
12017
12163
|
fontSize: "12px",
|
|
12018
12164
|
color: "var(--bw-text-muted)",
|
|
12019
12165
|
fontFamily: "var(--bw-font-family)",
|
|
12020
12166
|
marginTop: "8px",
|
|
12021
12167
|
textAlign: "right",
|
|
12022
|
-
}, children: t$1("summary.remainingOnSite", { amount: formatCurrency(totalAmount - depositAmount) }) }))] })] })] }), !hasPaymentProvider && (jsxRuntime.jsx("div", { style: cardStyles$1, children: jsxRuntime.jsx("p", { style: { ...errorTextStyles$1, margin: 0 }, children: t$1("booking.paymentUnavailable") }) })), hasPaymentProvider && (systemConfig?.paymentProvider === "mollie" ? (jsxRuntime.jsxs("div", { style: cardStyles$1, children: [jsxRuntime.jsx("h2", { style: { ...sectionHeaderStyles$1 }, children: t$1("summary.payment") }), jsxRuntime.jsx(MolliePaymentForm, { config: config, eventDetails: eventDetails, formData: paymentFormData, totalAmount: paymentAmount, discountCode: discountCodeProp, giftCards: appliedGiftCards, onSuccess: onSuccess, onError: onError, upsellSelections: aggregatedUpsellSelections(), mollieProfileId: systemConfig?.mollieProfileId, mollieTestmode: systemConfig?.mollieTestmode })] })) : (jsxRuntime.jsxs("div", { style: cardStyles$1, children: [jsxRuntime.jsx("h2", { style: { ...sectionHeaderStyles$1 }, children: t$1("summary.payment") }), jsxRuntime.jsx(StripePaymentForm, { config: config, eventDetails: eventDetails, formData: paymentFormData, totalAmount: paymentAmount, discountCode: discountCodeProp, giftCards: appliedGiftCards, onSuccess: onSuccess, onError: onError, systemConfig: systemConfig ?? null, stripePromise: stripePromise, stripeAppearance: stripeAppearance, upsellSelections: aggregatedUpsellSelections() })] })))] }))] }) }));
|
|
12168
|
+
}, children: t$1("summary.remainingOnSite", { amount: formatCurrency(totalAmount - depositAmount) }) }))] })] })] }), depositsOnlyBlocked && (jsxRuntime.jsx("div", { style: cardStyles$1, children: jsxRuntime.jsx("p", { style: { ...errorTextStyles$1, margin: 0 }, children: t$1("booking.depositNotConfigured") }) })), !hasPaymentProvider && !depositsOnlyBlocked && (jsxRuntime.jsx("div", { style: cardStyles$1, children: jsxRuntime.jsx("p", { style: { ...errorTextStyles$1, margin: 0 }, children: t$1("booking.paymentUnavailable") }) })), hasPaymentProvider && !depositsOnlyBlocked && (systemConfig?.paymentProvider === "mollie" ? (jsxRuntime.jsxs("div", { style: cardStyles$1, children: [jsxRuntime.jsx("h2", { style: { ...sectionHeaderStyles$1 }, children: t$1("summary.payment") }), jsxRuntime.jsx(MolliePaymentForm, { config: config, eventDetails: eventDetails, formData: paymentFormData, totalAmount: paymentAmount, discountCode: discountCodeProp, giftCards: appliedGiftCards, onSuccess: onSuccess, onError: onError, upsellSelections: aggregatedUpsellSelections(), mollieProfileId: systemConfig?.mollieProfileId, mollieTestmode: systemConfig?.mollieTestmode })] })) : (jsxRuntime.jsxs("div", { style: cardStyles$1, children: [jsxRuntime.jsx("h2", { style: { ...sectionHeaderStyles$1 }, children: t$1("summary.payment") }), jsxRuntime.jsx(StripePaymentForm, { config: config, eventDetails: eventDetails, formData: paymentFormData, totalAmount: paymentAmount, discountCode: discountCodeProp, giftCards: appliedGiftCards, onSuccess: onSuccess, onError: onError, systemConfig: systemConfig ?? null, stripePromise: stripePromise, stripeAppearance: stripeAppearance, upsellSelections: aggregatedUpsellSelections() })] })))] }))] }) }));
|
|
12023
12169
|
}
|
|
12024
12170
|
|
|
12025
12171
|
/**
|
|
@@ -12867,6 +13013,31 @@ const ImageCarousel = ({ images, eventName }) => {
|
|
|
12867
13013
|
} }))] }));
|
|
12868
13014
|
};
|
|
12869
13015
|
|
|
13016
|
+
function PaymentLogosStrip() {
|
|
13017
|
+
const logoHeight = 34;
|
|
13018
|
+
const logoCellStyle = {
|
|
13019
|
+
display: "inline-flex",
|
|
13020
|
+
alignItems: "center",
|
|
13021
|
+
justifyContent: "center",
|
|
13022
|
+
padding: "0px 1px",
|
|
13023
|
+
minHeight: "36px",
|
|
13024
|
+
borderRadius: "6px",
|
|
13025
|
+
};
|
|
13026
|
+
return (jsxRuntime.jsxs("div", { style: {
|
|
13027
|
+
padding: "8px 5px",
|
|
13028
|
+
backgroundColor: "var(--bw-background-color)",
|
|
13029
|
+
border: "1px solid var(--bw-border-color)",
|
|
13030
|
+
display: "flex",
|
|
13031
|
+
alignItems: "center",
|
|
13032
|
+
justifyContent: "center",
|
|
13033
|
+
borderRadius: "var(--bw-border-radius)",
|
|
13034
|
+
gap: "0px",
|
|
13035
|
+
flexWrap: "wrap",
|
|
13036
|
+
width: "fit-content",
|
|
13037
|
+
margin: "20px auto",
|
|
13038
|
+
}, children: [jsxRuntime.jsx("span", { style: logoCellStyle, children: jsxRuntime.jsxs("svg", { width: logoHeight, height: logoHeight, viewBox: "0 0 48 48", fill: "none", "aria-label": "PayPal", children: [jsxRuntime.jsx("circle", { cx: "24", cy: "24", r: "20", fill: "#0070BA" }), jsxRuntime.jsx("path", { d: "M32.3305 18.0977C32.3082 18.24 32.2828 18.3856 32.2542 18.5351C31.2704 23.5861 27.9046 25.331 23.606 25.331H21.4173C20.8916 25.331 20.4486 25.7127 20.3667 26.2313L19.2461 33.3381L18.9288 35.3527C18.8755 35.693 19.1379 36 19.4815 36H23.3634C23.8231 36 24.2136 35.666 24.286 35.2127L24.3241 35.0154L25.055 30.3772L25.1019 30.1227C25.1735 29.6678 25.5648 29.3338 26.0245 29.3338H26.6051C30.3661 29.3338 33.3103 27.8068 34.1708 23.388C34.5303 21.5421 34.3442 20.0008 33.393 18.9168C33.1051 18.59 32.748 18.3188 32.3305 18.0977Z", fill: "white", fillOpacity: "0.6" }), jsxRuntime.jsx("path", { d: "M31.3009 17.6871C31.1506 17.6434 30.9955 17.6036 30.8364 17.5678C30.6766 17.5328 30.5127 17.5018 30.3441 17.4748C29.754 17.3793 29.1074 17.334 28.4147 17.334H22.5676C22.4237 17.334 22.2869 17.3666 22.1644 17.4254C21.8948 17.5551 21.6944 17.8104 21.6459 18.1229L20.402 26.0013L20.3662 26.2311C20.4481 25.7126 20.8911 25.3308 21.4168 25.3308H23.6055C27.9041 25.3308 31.2699 23.5851 32.2537 18.5349C32.2831 18.3854 32.3078 18.2398 32.33 18.0975C32.0811 17.9655 31.8115 17.8525 31.5212 17.7563C31.4496 17.7324 31.3757 17.7094 31.3009 17.6871Z", fill: "white", fillOpacity: "0.8" }), jsxRuntime.jsx("path", { d: "M21.6461 18.1231C21.6946 17.8105 21.895 17.5552 22.1646 17.4264C22.2879 17.3675 22.4239 17.3349 22.5678 17.3349H28.4149C29.1077 17.3349 29.7542 17.3803 30.3444 17.4757C30.513 17.5027 30.6768 17.5338 30.8367 17.5687C30.9957 17.6045 31.1508 17.6443 31.3011 17.688C31.3759 17.7103 31.4498 17.7334 31.5222 17.7564C31.8125 17.8527 32.0821 17.9664 32.331 18.0976C32.6237 16.231 32.3287 14.9601 31.3194 13.8093C30.2068 12.5424 28.1986 12 25.629 12H18.169C17.6441 12 17.1963 12.3817 17.1152 12.9011L14.0079 32.5969C13.9467 32.9866 14.2473 33.3381 14.6402 33.3381H19.2458L20.4022 26.0014L21.6461 18.1231Z", fill: "white" })] }) }), jsxRuntime.jsx("span", { style: logoCellStyle, children: jsxRuntime.jsxs("svg", { width: logoHeight * 2.2, height: logoHeight, viewBox: "0 -139.5 750 750", fill: "none", "aria-label": "Mastercard", children: [jsxRuntime.jsx("rect", { fill: "#000000", x: "0", y: "0", width: "750", height: "471", rx: "40" }), jsxRuntime.jsx("path", { d: "M434.008334,235.5 C434.008334,334.641668 353.6375,415.004169 254.499999,415.004169 C155.362498,415.004169 74.9999973,334.641668 74.9999973,235.5 C74.9999973,136.366666 155.362498,55.9958324 254.499999,55.9958324 C353.6375,55.9958324 434.008334,136.366666 434.008334,235.5", fill: "#D9222A" }), jsxRuntime.jsx("path", { d: "M495.491667,55.9958324 C449.1125,55.9958324 406.85,73.5916658 374.991666,102.462499 C368.504166,108.345833 362.445833,114.7 356.866666,121.458333 L393.133333,121.458333 C398.091667,127.4875 402.658333,133.829166 406.816667,140.470833 L343.183333,140.470833 C339.370833,146.575 335.908333,152.916666 332.841666,159.479167 L417.154167,159.479167 C420.033333,165.6375 422.575,171.975 424.754167,178.483333 L325.241666,178.483333 C323.166666,184.675 321.420833,191.0125 320.024999,197.491667 L429.966667,197.491667 C432.604167,209.741667 434.008334,222.458334 434.008334,235.5 C434.008334,255.433334 430.754167,274.612501 424.754167,292.520834 L325.241666,292.520834 C327.416666,299.033334 329.958333,305.375001 332.837499,311.529168 L417.154167,311.529168 C414.079167,318.091668 410.625,324.433335 406.808333,330.541668 L343.183333,330.541668 C347.3375,337.170835 351.9125,343.520835 356.866666,349.537501 L393.125,349.537501 C387.554167,356.308335 381.491666,362.670835 374.995833,368.550002 C406.854167,397.416668 449.1125,415.004169 495.491667,415.004169 C594.629168,415.004169 675.000002,334.641668 675.000002,235.5 C675.000002,136.370833 594.629168,55.9958324 495.491667,55.9958324", fill: "#EE9F2D" })] }) }), jsxRuntime.jsx("span", { style: logoCellStyle, children: jsxRuntime.jsxs("svg", { width: logoHeight * 1.1, height: logoHeight, viewBox: "0 0 750 471", fill: "none", "aria-label": "Visa", children: [jsxRuntime.jsx("rect", { fill: "#0E4595", x: "0", y: "0", width: "750", height: "471", rx: "40" }), jsxRuntime.jsx("polygon", { fill: "#FFFFFF", points: "278.1975 334.2275 311.5585 138.4655 364.9175 138.4655 331.5335 334.2275" }), jsxRuntime.jsx("path", { d: "M524.3075,142.6875 C513.7355,138.7215 497.1715,134.4655 476.4845,134.4655 C423.7605,134.4655 386.6205,161.0165 386.3045,199.0695 C386.0075,227.1985 412.8185,242.8905 433.0585,252.2545 C453.8275,261.8495 460.8105,267.9695 460.7115,276.5375 C460.5795,289.6595 444.1255,295.6545 428.7885,295.6545 C407.4315,295.6545 396.0855,292.6875 378.5625,285.3785 L371.6865,282.2665 L364.1975,326.0905 C376.6605,331.5545 399.7065,336.2895 423.6355,336.5345 C479.7245,336.5345 516.1365,310.2875 516.5505,269.6525 C516.7515,247.3835 502.5355,230.4355 471.7515,216.4645 C453.1005,207.4085 441.6785,201.3655 441.7995,192.1955 C441.7995,184.0585 451.4675,175.3575 472.3565,175.3575 C489.8055,175.0865 502.4445,178.8915 512.2925,182.8575 L517.0745,185.1165 L524.3075,142.6875", fill: "#FFFFFF" }), jsxRuntime.jsx("path", { d: "M661.6145,138.4655 L620.3835,138.4655 C607.6105,138.4655 598.0525,141.9515 592.4425,154.6995 L513.1975,334.1025 L569.2285,334.1025 C569.2285,334.1025 578.3905,309.9805 580.4625,304.6845 C586.5855,304.6845 641.0165,304.7685 648.7985,304.7685 C650.3945,311.6215 655.2905,334.1025 655.2905,334.1025 L704.8025,334.1025 L661.6145,138.4655 Z M596.1975,264.8725 C600.6105,253.5935 617.4565,210.1495 617.4565,210.1495 C617.1415,210.6705 621.8365,198.8155 624.5315,191.4655 L628.1385,208.3435 C628.1385,208.3435 638.3555,255.0725 640.4905,264.8715 L596.1975,264.8715 L596.1975,264.8725 Z", fill: "#FFFFFF" }), jsxRuntime.jsx("path", { d: "M45.878906 138.46484L45.197266 142.53906C66.288263 147.64458 85.126465 155.03257 101.61914 164.22461L148.96484 333.91602L205.41992 333.84961L289.42383 138.46484L232.90234 138.46484L180.66211 271.96094L175.0957 244.83203C174.83824 244.00408 174.55942 243.17304 174.27344 242.3418L156.10742 154.99219C152.87742 142.59619 143.50892 138.89684 131.91992 138.46484L45.878906 138.46484Z", fill: "#FFFFFF" })] }) }), jsxRuntime.jsx("span", { style: logoCellStyle, children: jsxRuntime.jsxs("svg", { width: logoHeight * 2, height: logoHeight, viewBox: "0 -9 58 58", fill: "none", "aria-label": "Klarna", children: [jsxRuntime.jsx("rect", { x: "0.5", y: "0.5", width: "57", height: "39", rx: "3.5", fill: "#F4B6C7", stroke: "#F3F3F3" }), jsxRuntime.jsx("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M7.41299 25.7963H5V15H7.41299V25.7963ZM13.4398 15H11.0784C11.0784 16.9868 10.1885 18.8104 8.63709 20.0034L7.70155 20.7226L11.3264 25.7967H14.3068L10.9714 21.1277C12.5525 19.5116 13.4398 17.3373 13.4398 15ZM17.289 25.7933H15.0102V15.0021H17.289V25.7933ZM24.1766 18.3286V18.8061C23.5616 18.3754 22.8192 18.1223 22.0185 18.1223C19.8993 18.1223 18.1815 19.8857 18.1815 22.0611C18.1815 24.2365 19.8993 26 22.0185 26C22.8192 26 23.5616 25.7469 24.1766 25.3163V25.7933H26.3539V18.3286H24.1766ZM24.1694 22.0611C24.1694 23.1218 23.2861 23.9818 22.1966 23.9818C21.1071 23.9818 20.2238 23.1218 20.2238 22.0611C20.2238 21.0004 21.1071 20.1407 22.1966 20.1407C23.2861 20.1407 24.1694 21.0004 24.1694 22.0611ZM47.1454 18.8061V18.3286H49.3226V25.7933H47.1454V25.3163C46.5304 25.7469 45.788 26 44.9872 26C42.868 26 41.1502 24.2365 41.1502 22.0611C41.1502 19.8857 42.868 18.1223 44.9872 18.1223C45.788 18.1223 46.5304 18.3754 47.1454 18.8061ZM45.1654 23.9818C46.255 23.9818 47.1381 23.1218 47.1381 22.0611C47.1381 21.0004 46.255 20.1407 45.1654 20.1407C44.0758 20.1407 43.1926 21.0004 43.1926 22.0611C43.1926 23.1218 44.0758 23.9818 45.1654 23.9818ZM50.2675 24.5482C50.2675 23.7736 50.8792 23.1457 51.6337 23.1457C52.3882 23.1457 53 23.7736 53 24.5482C53 25.3227 52.3882 25.9507 51.6337 25.9507C50.8792 25.9507 50.2675 25.3227 50.2675 24.5482ZM37.2814 18.1278C36.4117 18.1278 35.5887 18.405 35.0384 19.1697V18.329H32.8706V25.7933H35.065V21.8706C35.065 20.7354 35.8065 20.1796 36.6993 20.1796C37.6562 20.1796 38.2063 20.7663 38.2063 21.8551V25.7933H40.3809V21.0463C40.3809 19.3092 39.0354 18.1278 37.2814 18.1278ZM29.7219 18.3287V19.3009C30.1583 18.7177 30.9715 18.3291 31.8557 18.3291V20.5013L31.8298 20.5003C30.9684 20.5003 29.7269 21.1323 29.7269 22.3082V25.7933H27.4928V18.3287H29.7219Z", fill: "#17120F" })] }) }), jsxRuntime.jsx("span", { style: { ...logoCellStyle, marginLeft: "-10px" }, children: jsxRuntime.jsxs("svg", { width: logoHeight * 1.9, height: logoHeight, viewBox: "0 -11 70 70", fill: "none", "aria-label": "Google Pay", children: [jsxRuntime.jsx("rect", { x: "0.5", y: "0.5", width: "69", height: "47", rx: "5.5", fill: "white", stroke: "#D9D9D9" }), jsxRuntime.jsx("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M33.0603 31.5161V25.4741H36.1786C37.4564 25.4741 38.535 25.046 39.4142 24.2015L39.6252 23.9875C41.2313 22.2391 41.1258 19.5155 39.4142 17.898C38.5584 17.0416 37.3861 16.5778 36.1786 16.6016H31.1729V31.5161H33.0603ZM33.0605 23.6425V18.4332H36.2262C36.9063 18.4332 37.5512 18.6948 38.0319 19.1706C39.052 20.1696 39.0754 21.8347 38.0905 22.8694C37.6098 23.3809 36.9297 23.6663 36.2262 23.6425H33.0605ZM48.4293 22.1083C47.6204 21.359 46.5185 20.9784 45.1234 20.9784C43.3298 20.9784 41.9816 21.6444 41.0906 22.9646L42.7553 24.0231C43.3649 23.1192 44.1973 22.6673 45.2524 22.6673C45.9206 22.6673 46.5653 22.9171 47.0694 23.369C47.5618 23.7972 47.8432 24.4156 47.8432 25.0698V25.5098C47.1163 25.1055 46.2019 24.8914 45.0765 24.8914C43.7635 24.8914 42.7084 25.2006 41.923 25.831C41.1375 26.4613 40.739 27.2939 40.739 28.3524C40.7155 29.3158 41.1258 30.2316 41.8527 30.85C42.5912 31.5161 43.5291 31.8491 44.631 31.8491C45.9323 31.8491 46.9639 31.2663 47.7494 30.1007H47.8314V31.5161H49.6368V25.2244C49.6368 23.9042 49.2382 22.8576 48.4293 22.1083ZM43.3066 29.6369C42.9197 29.3514 42.6852 28.8876 42.6852 28.3881C42.6852 27.8291 42.9432 27.3652 43.4473 26.9965C43.9632 26.6278 44.6081 26.4375 45.3702 26.4375C46.4255 26.4256 47.2462 26.6635 47.8325 27.1392C47.8325 27.948 47.5159 28.6497 46.8945 29.2444C46.3317 29.8153 45.5696 30.1364 44.7723 30.1364C44.2446 30.1483 43.7287 29.9699 43.3066 29.6369ZM53.693 35.9999L60.0001 21.3114H57.9485L55.0295 28.6378H54.9943L52.0049 21.3114H49.9534L54.0916 30.8619L51.747 35.9999H53.693Z", fill: "#3C4043" }), jsxRuntime.jsx("path", { d: "M26.544 24.1659C26.544 23.5831 26.4971 23.0003 26.4034 22.4294H18.4434V25.7239H23.0037C22.8161 26.7825 22.2065 27.734 21.3155 28.3286V30.4695H24.0353C25.6296 28.9828 26.544 26.7825 26.544 24.1659Z", fill: "#4285F4" }), jsxRuntime.jsx("path", { d: "M18.4442 32.539C20.7185 32.539 22.6411 31.7778 24.0361 30.4695L21.3164 28.3287C20.5544 28.852 19.5814 29.1493 18.4442 29.1493C16.2403 29.1493 14.3763 27.6388 13.7081 25.6169H10.9062V27.8291C12.3365 30.7193 15.2555 32.539 18.4442 32.539Z", fill: "#34A853" }), jsxRuntime.jsx("path", { d: "M13.708 25.6169C13.3563 24.5584 13.3563 23.4048 13.708 22.3343V20.134H10.9058C9.69808 22.5484 9.69808 25.4029 10.9058 27.8172L13.708 25.6169Z", fill: "#FBBC04" }), jsxRuntime.jsx("path", { d: "M18.4442 18.8019C19.6517 18.7781 20.8123 19.242 21.6798 20.0864L24.0948 17.6363C22.559 16.1853 20.5427 15.3885 18.4442 15.4123C15.2555 15.4123 12.3365 17.2439 10.9062 20.134L13.7081 22.3462C14.3763 20.3124 16.2403 18.8019 18.4442 18.8019Z", fill: "#EA4335" })] }) }), jsxRuntime.jsx("span", { style: { ...logoCellStyle, marginLeft: "10px" }, children: jsxRuntime.jsxs("svg", { width: logoHeight * 1, height: logoHeight, viewBox: "0 0 70 48", fill: "none", "aria-label": "Apple Pay", children: [jsxRuntime.jsx("rect", { x: "0.5", y: "0.5", width: "69", height: "47", rx: "5.5", fill: "white", stroke: "#D9D9D9" }), jsxRuntime.jsx("g", { transform: "translate(12,8)", children: jsxRuntime.jsx("path", { d: "M31.099 17.255a4.646 4.646 0 0 1 1.421-3.315c.437-.43.95-.764 1.51-.983-.27-.715-.669-1.375-1.177-1.946a5.4 5.4 0 0 0-1.773-1.3 4.975 4.975 0 0 0-2.119-.464c-.786.011-1.562.185-2.276.512-.598.286-1.25.453-1.91.488a4.495 4.495 0 0 1-1.75-.488 5.5 5.5 0 0 0-2.346-.536 5.66 5.66 0 0 0-3.047.887 6.168 6.168 0 0 0-2.229 2.412 7.501 7.501 0 0 0-.839 3.498c.024 1.224.289 2.434.78 3.556a20.964 20.964 0 0 0 2.019 3.854c.444.664.95 1.284 1.515 1.853a3.045 3.045 0 0 0 2.041.948c.579-.006 1.149-.147 1.665-.41a4.928 4.928 0 0 1 2.217-.538c.795 0 1.58.184 2.292.538.53.261 1.11.402 1.7.41.696-.013 1.365-.265 1.9-.715.67-.545 1.252-1.192 1.724-1.92a12.29 12.29 0 0 0 1.197-2.246 4.95 4.95 0 0 1-2.113-1.852 4.573 4.573 0 0 1-.76-2.668M29.42 5.207a4.252 4.252 0 0 0 .98-2.697 3.76 3.76 0 0 0-.026-.51 4.359 4.359 0 0 0-2.79 1.424 4.124 4.124 0 0 0-1.05 2.63c-.005.171.005.343.032.513.157.021.315.03.474.024a3.67 3.67 0 0 0 2.38-1.384", fill: "#000000" }) })] }) })] }));
|
|
13039
|
+
}
|
|
13040
|
+
|
|
12870
13041
|
function VoucherPurchaseCard({ config, minEventPrice, fallbackImages = [], onClick, standalone = false, }) {
|
|
12871
13042
|
const t = useTranslations();
|
|
12872
13043
|
const [activeSlideIndex, setActiveSlideIndex] = React.useState(0);
|
|
@@ -13986,7 +14157,7 @@ function EventTypeSelection({ eventTypes, onEventTypeSelect, onInstancePreview,
|
|
|
13986
14157
|
display: "flex",
|
|
13987
14158
|
flexDirection: "column",
|
|
13988
14159
|
justifyContent: "space-between",
|
|
13989
|
-
height: "
|
|
14160
|
+
height: "540px",
|
|
13990
14161
|
}, children: [jsxRuntime.jsxs("div", { children: [jsxRuntime.jsx("h2", { className: "event-type-title", style: {
|
|
13991
14162
|
fontSize: "clamp(1.1rem, 2.5vw, 24px)",
|
|
13992
14163
|
fontWeight: 700,
|
|
@@ -14056,19 +14227,9 @@ function EventTypeSelection({ eventTypes, onEventTypeSelect, onInstancePreview,
|
|
|
14056
14227
|
}) }) })) : (jsxRuntime.jsx("div", { className: "event-type-desc", style: {
|
|
14057
14228
|
margin: "10px 0",
|
|
14058
14229
|
height: "7.5em", // Same height as highlights
|
|
14059
|
-
}, children: "\u00A0" })) })] }), jsxRuntime.jsxs("div", { children: [
|
|
14060
|
-
fontWeight: 700,
|
|
14061
|
-
color: "var(--bw-text-color)",
|
|
14062
|
-
fontFamily: "var(--bw-font-family)",
|
|
14063
|
-
textAlign: "right",
|
|
14064
|
-
}, children: jsxRuntime.jsx("span", { children: formatDurationInfo(eventType.durationInfo, t) }) }), jsxRuntime.jsx("div", { className: "event-type-price", style: {
|
|
14065
|
-
fontSize: "clamp(1.72rem, 4vw, 32px)",
|
|
14066
|
-
fontWeight: 700,
|
|
14067
|
-
color: "var(--bw-text-color)",
|
|
14068
|
-
fontFamily: "var(--bw-font-family)",
|
|
14069
|
-
textAlign: "right",
|
|
14070
|
-
}, children: jsxRuntime.jsxs("span", { children: [t("common.from"), " ", formatCurrency(eventType.minPrice)] }) })] }), (() => {
|
|
14230
|
+
}, children: "\u00A0" })) })] }), jsxRuntime.jsxs("div", { children: [(() => {
|
|
14071
14231
|
const preview = eventType.cardPreview ?? [];
|
|
14232
|
+
const hasMoreDates = eventType.availableInstancesCount > preview.length;
|
|
14072
14233
|
return (jsxRuntime.jsxs("div", { style: {
|
|
14073
14234
|
marginTop: "12px",
|
|
14074
14235
|
borderTop: "1px solid var(--bw-border-color)",
|
|
@@ -14102,8 +14263,33 @@ function EventTypeSelection({ eventTypes, onEventTypeSelect, onInstancePreview,
|
|
|
14102
14263
|
transition: "background 0.15s",
|
|
14103
14264
|
boxSizing: "border-box",
|
|
14104
14265
|
}, children: [jsxRuntime.jsxs("span", { style: { whiteSpace: "nowrap", display: "flex", alignItems: "center", gap: "3px" }, children: [item.isSpecial && (jsxRuntime.jsx("span", { style: { color: "var(--bw-highlight-color)", fontSize: "11px", lineHeight: 1 }, children: "\u2605" })), formatWeekday(item.startTime, timezone, locale), " ", formatDate(item.startTime, timezone, locale)] }), jsxRuntime.jsx("span", { style: { overflow: "hidden", textOverflow: "ellipsis", whiteSpace: "nowrap", opacity: 0.75 }, children: item.name }), jsxRuntime.jsxs("span", { style: { display: "flex", alignItems: "center", gap: "4px", whiteSpace: "nowrap" }, children: [hasDiscount && (jsxRuntime.jsx("span", { style: { textDecoration: "line-through", opacity: 0.55, fontSize: "11px" }, children: formatCurrency(item.basePrice) })), jsxRuntime.jsx("span", { style: { fontWeight: 700, color: item.isSpecial ? "var(--bw-highlight-color)" : "var(--bw-text-color)" }, children: formatCurrency(item.price) })] }), item.specialDescription ? (jsxRuntime.jsx(InfoBadge, { text: item.specialDescription })) : (jsxRuntime.jsx("span", {}))] }, item.id));
|
|
14105
|
-
}) })
|
|
14106
|
-
|
|
14266
|
+
}) }), hasMoreDates && (jsxRuntime.jsx("button", { type: "button", onClick: (e) => {
|
|
14267
|
+
e.stopPropagation();
|
|
14268
|
+
onEventTypeSelect(eventType);
|
|
14269
|
+
}, style: {
|
|
14270
|
+
marginTop: "6px",
|
|
14271
|
+
padding: 0,
|
|
14272
|
+
border: "none",
|
|
14273
|
+
background: "none",
|
|
14274
|
+
color: "var(--bw-highlight-color)",
|
|
14275
|
+
fontFamily: "var(--bw-font-family)",
|
|
14276
|
+
fontSize: "13px",
|
|
14277
|
+
fontWeight: 600,
|
|
14278
|
+
cursor: "pointer",
|
|
14279
|
+
textDecoration: "underline",
|
|
14280
|
+
}, children: t("events.seeMoreDates") }))] }));
|
|
14281
|
+
})(), jsxRuntime.jsxs("div", { style: { marginBottom: "16px" }, children: [jsxRuntime.jsx("div", { className: "event-type-price", style: {
|
|
14282
|
+
fontWeight: 700,
|
|
14283
|
+
color: "var(--bw-text-color)",
|
|
14284
|
+
fontFamily: "var(--bw-font-family)",
|
|
14285
|
+
textAlign: "right",
|
|
14286
|
+
}, children: jsxRuntime.jsx("span", { children: formatDurationInfo(eventType.durationInfo, t) }) }), jsxRuntime.jsx("div", { className: "event-type-price", style: {
|
|
14287
|
+
fontSize: "clamp(1.72rem, 4vw, 32px)",
|
|
14288
|
+
fontWeight: 700,
|
|
14289
|
+
color: "var(--bw-text-color)",
|
|
14290
|
+
fontFamily: "var(--bw-font-family)",
|
|
14291
|
+
textAlign: "right",
|
|
14292
|
+
}, children: jsxRuntime.jsxs("span", { children: [t("common.from"), " ", formatCurrency(eventType.minPrice)] }) })] }), jsxRuntime.jsxs("div", { style: {
|
|
14107
14293
|
display: "flex",
|
|
14108
14294
|
justifyContent: "flex-end",
|
|
14109
14295
|
alignItems: "center",
|
|
@@ -14161,7 +14347,7 @@ function EventTypeSelection({ eventTypes, onEventTypeSelect, onInstancePreview,
|
|
|
14161
14347
|
fontFamily: "var(--bw-font-family)",
|
|
14162
14348
|
boxShadow: "var(--bw-shadow-md)",
|
|
14163
14349
|
}, children: t("events.soldOut") }) }))] }, eventType.id));
|
|
14164
|
-
}) }) })), jsxRuntime.jsx(EventTypeDetailsDialog, { isOpen: detailsDialogOpen, onClose: handleCloseDetails, eventType: selectedEventTypeForDetails, onEventTypeSelect: onEventTypeSelect })] }));
|
|
14350
|
+
}) }) })), jsxRuntime.jsx(PaymentLogosStrip, {}), jsxRuntime.jsx(EventTypeDetailsDialog, { isOpen: detailsDialogOpen, onClose: handleCloseDetails, eventType: selectedEventTypeForDetails, onEventTypeSelect: onEventTypeSelect })] }));
|
|
14165
14351
|
}
|
|
14166
14352
|
|
|
14167
14353
|
const getAllocationBadgeInfo = (availableSpots, maxParticipants, t) => {
|
|
@@ -14288,7 +14474,7 @@ const PriceDisplay = ({ price, yearPrices, t }) => {
|
|
|
14288
14474
|
boxShadow: displayInfo ? "0 2px 4px rgba(0, 0, 0, 0.2)" : "none",
|
|
14289
14475
|
}, children: formatCurrency(price) }));
|
|
14290
14476
|
};
|
|
14291
|
-
function EventInstanceSelection({ eventInstances, selectedEventType, onEventInstanceSelect, onBackToEventTypes, isOpen, onClose, isLoadingEventInstances = false, isLoadingEventDetails = false, }) {
|
|
14477
|
+
function EventInstanceSelection({ eventInstances, selectedEventType, onEventInstanceSelect, onBackToEventTypes, isOpen, onClose, isLoadingEventInstances = false, isLoadingEventDetails = false, hasUpsellsStep = false, }) {
|
|
14292
14478
|
const t = useTranslations();
|
|
14293
14479
|
const { locale } = useLocale();
|
|
14294
14480
|
const timezone = useTimezone();
|
|
@@ -14354,88 +14540,88 @@ function EventInstanceSelection({ eventInstances, selectedEventType, onEventInst
|
|
|
14354
14540
|
const footerNav = (jsxRuntime.jsx("button", { type: "button", onClick: handleClose, style: mergeStyles(buttonStyles.secondary, buttonStyles.fullWidth), children: t("common.back") }));
|
|
14355
14541
|
// Show loading state first if we're loading event instances
|
|
14356
14542
|
if (isLoadingEventInstances) {
|
|
14357
|
-
return (jsxRuntime.jsx(Sidebar, { isOpen: isOpen, onClose: handleClose, title: `${selectedEventType?.name}`, footer: footerNav, children: jsxRuntime.
|
|
14358
|
-
|
|
14359
|
-
|
|
14360
|
-
|
|
14361
|
-
|
|
14362
|
-
|
|
14363
|
-
|
|
14364
|
-
|
|
14365
|
-
|
|
14366
|
-
padding: "16px 20px",
|
|
14367
|
-
cursor: "pointer",
|
|
14368
|
-
borderBottom: "1px solid var(--bw-border-color)",
|
|
14369
|
-
}, children: [jsxRuntime.jsxs("div", { style: { display: "flex", alignItems: "center", gap: "12px" }, children: [jsxRuntime.jsx("div", { style: {
|
|
14370
|
-
width: "80px",
|
|
14371
|
-
height: "20px",
|
|
14372
|
-
backgroundColor: "var(--bw-border-color)",
|
|
14373
|
-
borderRadius: "var(--bw-border-radius-small)",
|
|
14374
|
-
} }), jsxRuntime.jsx("div", { style: {
|
|
14375
|
-
width: "16px",
|
|
14376
|
-
height: "16px",
|
|
14377
|
-
backgroundColor: "var(--bw-border-color)",
|
|
14378
|
-
borderRadius: "var(--bw-border-radius-small)",
|
|
14379
|
-
} })] }), jsxRuntime.jsx("div", { style: {
|
|
14380
|
-
width: "70px",
|
|
14381
|
-
height: "16px",
|
|
14382
|
-
backgroundColor: "var(--bw-highlight-color)",
|
|
14383
|
-
opacity: 0.3,
|
|
14384
|
-
borderRadius: "var(--bw-border-radius-small)",
|
|
14385
|
-
} })] }), jsxRuntime.jsx("div", { style: {
|
|
14386
|
-
display: "flex",
|
|
14387
|
-
flexDirection: "column",
|
|
14388
|
-
gap: "12px",
|
|
14389
|
-
paddingTop: "12px",
|
|
14390
|
-
padding: "12px 20px 20px 20px",
|
|
14391
|
-
}, children: Array.from({ length: 2 }).map((_, eventIdx) => (jsxRuntime.jsxs("div", { style: {
|
|
14392
|
-
position: "relative",
|
|
14393
|
-
border: "1px solid var(--bw-border-color)",
|
|
14394
|
-
backgroundColor: "var(--bw-surface-color)",
|
|
14395
|
-
borderRadius: "var(--bw-border-radius)",
|
|
14543
|
+
return (jsxRuntime.jsx(Sidebar, { isOpen: isOpen, onClose: handleClose, title: `${selectedEventType?.name}`, footer: footerNav, children: jsxRuntime.jsxs("div", { style: { padding: "24px" }, children: [jsxRuntime.jsx(FlowProgress, { currentStep: "date", hasUpsellsStep: hasUpsellsStep }), jsxRuntime.jsx("div", { style: { display: "flex", flexDirection: "column", gap: "20px" }, children: Array.from({ length: 3 }).map((_, idx) => (jsxRuntime.jsxs("div", { className: "skeleton-shimmer", style: {
|
|
14544
|
+
backgroundColor: "var(--bw-surface-color)",
|
|
14545
|
+
border: "1px solid var(--bw-border-color)",
|
|
14546
|
+
borderRadius: "var(--bw-border-radius)",
|
|
14547
|
+
overflow: "hidden",
|
|
14548
|
+
}, children: [jsxRuntime.jsxs("div", { style: {
|
|
14549
|
+
display: "flex",
|
|
14550
|
+
justifyContent: "space-between",
|
|
14551
|
+
alignItems: "center",
|
|
14396
14552
|
padding: "16px 20px",
|
|
14397
|
-
|
|
14398
|
-
|
|
14399
|
-
|
|
14400
|
-
|
|
14401
|
-
|
|
14402
|
-
alignItems: "flex-start",
|
|
14403
|
-
gap: "12px",
|
|
14404
|
-
marginBottom: "4px",
|
|
14405
|
-
}, children: [jsxRuntime.jsxs("div", { style: { display: "flex", alignItems: "flex-start", gap: "12px" }, children: [jsxRuntime.jsx("div", { style: {
|
|
14406
|
-
width: "40px",
|
|
14407
|
-
height: "40px",
|
|
14408
|
-
backgroundColor: "var(--bw-background-color)",
|
|
14409
|
-
border: "1px solid var(--bw-border-color)",
|
|
14410
|
-
borderTopWidth: "4px",
|
|
14411
|
-
borderRadius: "var(--bw-border-radius-small)",
|
|
14412
|
-
} }), jsxRuntime.jsxs("div", { style: { display: "flex", flexDirection: "column", gap: "4px" }, children: [jsxRuntime.jsx("div", { style: {
|
|
14413
|
-
width: "80px",
|
|
14414
|
-
height: "16px",
|
|
14415
|
-
backgroundColor: "var(--bw-border-color)",
|
|
14416
|
-
borderRadius: "var(--bw-border-radius)",
|
|
14417
|
-
} }), jsxRuntime.jsx("div", { style: {
|
|
14418
|
-
width: "60px",
|
|
14419
|
-
height: "14px",
|
|
14420
|
-
backgroundColor: "var(--bw-border-color)",
|
|
14421
|
-
borderRadius: "var(--bw-border-radius)",
|
|
14422
|
-
} })] })] }), jsxRuntime.jsx("div", { style: { display: "flex", flexDirection: "column", alignItems: "flex-end" }, children: jsxRuntime.jsx("div", { style: {
|
|
14423
|
-
width: "70px",
|
|
14424
|
-
height: "20px",
|
|
14425
|
-
backgroundColor: "var(--bw-highlight-color)",
|
|
14426
|
-
opacity: 0.3,
|
|
14427
|
-
borderRadius: "var(--bw-border-radius)",
|
|
14428
|
-
} }) })] }), jsxRuntime.jsxs("div", { style: { display: "flex", alignItems: "center", gap: "8px", marginBottom: "4px" }, children: [jsxRuntime.jsx("div", { style: {
|
|
14429
|
-
width: "120px",
|
|
14430
|
-
height: "16px",
|
|
14553
|
+
cursor: "pointer",
|
|
14554
|
+
borderBottom: "1px solid var(--bw-border-color)",
|
|
14555
|
+
}, children: [jsxRuntime.jsxs("div", { style: { display: "flex", alignItems: "center", gap: "12px" }, children: [jsxRuntime.jsx("div", { style: {
|
|
14556
|
+
width: "80px",
|
|
14557
|
+
height: "20px",
|
|
14431
14558
|
backgroundColor: "var(--bw-border-color)",
|
|
14432
|
-
borderRadius: "var(--bw-border-radius)",
|
|
14559
|
+
borderRadius: "var(--bw-border-radius-small)",
|
|
14433
14560
|
} }), jsxRuntime.jsx("div", { style: {
|
|
14434
|
-
width: "
|
|
14435
|
-
height: "
|
|
14561
|
+
width: "16px",
|
|
14562
|
+
height: "16px",
|
|
14436
14563
|
backgroundColor: "var(--bw-border-color)",
|
|
14437
|
-
borderRadius: "
|
|
14438
|
-
} })] })
|
|
14564
|
+
borderRadius: "var(--bw-border-radius-small)",
|
|
14565
|
+
} })] }), jsxRuntime.jsx("div", { style: {
|
|
14566
|
+
width: "70px",
|
|
14567
|
+
height: "16px",
|
|
14568
|
+
backgroundColor: "var(--bw-highlight-color)",
|
|
14569
|
+
opacity: 0.3,
|
|
14570
|
+
borderRadius: "var(--bw-border-radius-small)",
|
|
14571
|
+
} })] }), jsxRuntime.jsx("div", { style: {
|
|
14572
|
+
display: "flex",
|
|
14573
|
+
flexDirection: "column",
|
|
14574
|
+
gap: "12px",
|
|
14575
|
+
paddingTop: "12px",
|
|
14576
|
+
padding: "12px 20px 20px 20px",
|
|
14577
|
+
}, children: Array.from({ length: 2 }).map((_, eventIdx) => (jsxRuntime.jsxs("div", { style: {
|
|
14578
|
+
position: "relative",
|
|
14579
|
+
border: "1px solid var(--bw-border-color)",
|
|
14580
|
+
backgroundColor: "var(--bw-surface-color)",
|
|
14581
|
+
borderRadius: "var(--bw-border-radius)",
|
|
14582
|
+
padding: "16px 20px",
|
|
14583
|
+
fontFamily: "var(--bw-font-family)",
|
|
14584
|
+
}, children: [jsxRuntime.jsxs("div", { style: {
|
|
14585
|
+
display: "flex",
|
|
14586
|
+
justifyContent: "space-between",
|
|
14587
|
+
width: "100%",
|
|
14588
|
+
alignItems: "flex-start",
|
|
14589
|
+
gap: "12px",
|
|
14590
|
+
marginBottom: "4px",
|
|
14591
|
+
}, children: [jsxRuntime.jsxs("div", { style: { display: "flex", alignItems: "flex-start", gap: "12px" }, children: [jsxRuntime.jsx("div", { style: {
|
|
14592
|
+
width: "40px",
|
|
14593
|
+
height: "40px",
|
|
14594
|
+
backgroundColor: "var(--bw-background-color)",
|
|
14595
|
+
border: "1px solid var(--bw-border-color)",
|
|
14596
|
+
borderTopWidth: "4px",
|
|
14597
|
+
borderRadius: "var(--bw-border-radius-small)",
|
|
14598
|
+
} }), jsxRuntime.jsxs("div", { style: { display: "flex", flexDirection: "column", gap: "4px" }, children: [jsxRuntime.jsx("div", { style: {
|
|
14599
|
+
width: "80px",
|
|
14600
|
+
height: "16px",
|
|
14601
|
+
backgroundColor: "var(--bw-border-color)",
|
|
14602
|
+
borderRadius: "var(--bw-border-radius)",
|
|
14603
|
+
} }), jsxRuntime.jsx("div", { style: {
|
|
14604
|
+
width: "60px",
|
|
14605
|
+
height: "14px",
|
|
14606
|
+
backgroundColor: "var(--bw-border-color)",
|
|
14607
|
+
borderRadius: "var(--bw-border-radius)",
|
|
14608
|
+
} })] })] }), jsxRuntime.jsx("div", { style: { display: "flex", flexDirection: "column", alignItems: "flex-end" }, children: jsxRuntime.jsx("div", { style: {
|
|
14609
|
+
width: "70px",
|
|
14610
|
+
height: "20px",
|
|
14611
|
+
backgroundColor: "var(--bw-highlight-color)",
|
|
14612
|
+
opacity: 0.3,
|
|
14613
|
+
borderRadius: "var(--bw-border-radius)",
|
|
14614
|
+
} }) })] }), jsxRuntime.jsxs("div", { style: { display: "flex", alignItems: "center", gap: "8px", marginBottom: "4px" }, children: [jsxRuntime.jsx("div", { style: {
|
|
14615
|
+
width: "120px",
|
|
14616
|
+
height: "16px",
|
|
14617
|
+
backgroundColor: "var(--bw-border-color)",
|
|
14618
|
+
borderRadius: "var(--bw-border-radius)",
|
|
14619
|
+
} }), jsxRuntime.jsx("div", { style: {
|
|
14620
|
+
width: "50px",
|
|
14621
|
+
height: "20px",
|
|
14622
|
+
backgroundColor: "var(--bw-border-color)",
|
|
14623
|
+
borderRadius: "16px",
|
|
14624
|
+
} })] })] }, eventIdx))) })] }, idx))) })] }) }));
|
|
14439
14625
|
}
|
|
14440
14626
|
// Show empty state only if not loading and no event instances
|
|
14441
14627
|
if (eventInstances.length === 0) {
|
|
@@ -14454,116 +14640,116 @@ function EventInstanceSelection({ eventInstances, selectedEventType, onEventInst
|
|
|
14454
14640
|
fontFamily: "var(--bw-font-family)",
|
|
14455
14641
|
}, children: t("instances.noAvailable") }), jsxRuntime.jsx("p", { style: { color: "var(--bw-text-muted)", fontFamily: "var(--bw-font-family)" }, children: t("instances.noAvailableMessage") })] }) }) }));
|
|
14456
14642
|
}
|
|
14457
|
-
return (jsxRuntime.jsx(Sidebar, { isOpen: isOpen, onClose: handleClose, title: `${selectedEventType?.name}`, footer: footerNav, children: jsxRuntime.
|
|
14458
|
-
|
|
14459
|
-
|
|
14460
|
-
|
|
14461
|
-
|
|
14462
|
-
|
|
14463
|
-
|
|
14464
|
-
|
|
14465
|
-
|
|
14466
|
-
|
|
14467
|
-
|
|
14468
|
-
|
|
14469
|
-
|
|
14470
|
-
|
|
14471
|
-
|
|
14472
|
-
|
|
14473
|
-
|
|
14474
|
-
|
|
14475
|
-
|
|
14476
|
-
|
|
14477
|
-
|
|
14478
|
-
|
|
14479
|
-
|
|
14480
|
-
|
|
14481
|
-
|
|
14482
|
-
|
|
14483
|
-
|
|
14484
|
-
|
|
14485
|
-
|
|
14486
|
-
|
|
14487
|
-
|
|
14488
|
-
|
|
14489
|
-
|
|
14490
|
-
|
|
14491
|
-
|
|
14492
|
-
|
|
14493
|
-
|
|
14494
|
-
|
|
14495
|
-
|
|
14496
|
-
|
|
14497
|
-
|
|
14498
|
-
|
|
14499
|
-
|
|
14500
|
-
|
|
14501
|
-
|
|
14502
|
-
|
|
14503
|
-
|
|
14504
|
-
|
|
14505
|
-
|
|
14506
|
-
|
|
14507
|
-
|
|
14508
|
-
|
|
14509
|
-
|
|
14510
|
-
|
|
14511
|
-
|
|
14512
|
-
|
|
14513
|
-
|
|
14514
|
-
|
|
14515
|
-
|
|
14516
|
-
|
|
14517
|
-
|
|
14518
|
-
|
|
14519
|
-
|
|
14520
|
-
|
|
14521
|
-
|
|
14522
|
-
|
|
14523
|
-
|
|
14524
|
-
|
|
14525
|
-
|
|
14526
|
-
|
|
14527
|
-
|
|
14528
|
-
|
|
14529
|
-
|
|
14530
|
-
|
|
14531
|
-
|
|
14532
|
-
|
|
14533
|
-
|
|
14534
|
-
|
|
14535
|
-
|
|
14536
|
-
|
|
14537
|
-
|
|
14538
|
-
|
|
14539
|
-
|
|
14540
|
-
|
|
14541
|
-
|
|
14542
|
-
|
|
14543
|
-
|
|
14544
|
-
|
|
14545
|
-
|
|
14546
|
-
|
|
14547
|
-
|
|
14548
|
-
|
|
14549
|
-
|
|
14550
|
-
|
|
14551
|
-
|
|
14552
|
-
|
|
14553
|
-
|
|
14554
|
-
|
|
14555
|
-
|
|
14556
|
-
|
|
14557
|
-
|
|
14558
|
-
|
|
14559
|
-
|
|
14560
|
-
|
|
14561
|
-
|
|
14562
|
-
|
|
14563
|
-
|
|
14564
|
-
|
|
14565
|
-
|
|
14566
|
-
|
|
14643
|
+
return (jsxRuntime.jsx(Sidebar, { isOpen: isOpen, onClose: handleClose, title: `${selectedEventType?.name}`, footer: footerNav, children: jsxRuntime.jsxs("div", { style: { padding: "20px 10px" }, children: [jsxRuntime.jsx(FlowProgress, { currentStep: "date", hasUpsellsStep: hasUpsellsStep }), jsxRuntime.jsx("div", { style: { display: "flex", flexDirection: "column", gap: "16px" }, children: monthYearGroups.map(({ key, label, events, minPrice, year }, idx) => {
|
|
14644
|
+
const monthPriceDisplayInfo = getMonthPriceDisplayInfo(minPrice);
|
|
14645
|
+
return (jsxRuntime.jsxs(React.Fragment, { children: [idx > 0 && monthYearGroups[idx - 1].year !== year && (jsxRuntime.jsx("div", { style: { height: "1px", backgroundColor: "var(--bw-border-color)", margin: "4px 0" } })), jsxRuntime.jsx(Accordion, { title: label, priceInfo: jsxRuntime.jsx("div", { style: {
|
|
14646
|
+
fontSize: "16px",
|
|
14647
|
+
fontWeight: 500,
|
|
14648
|
+
marginLeft: "auto",
|
|
14649
|
+
padding: "4px 8px",
|
|
14650
|
+
borderRadius: "var(--bw-border-radius-small)",
|
|
14651
|
+
backgroundColor: monthPriceDisplayInfo
|
|
14652
|
+
? monthPriceDisplayInfo.backgroundColor
|
|
14653
|
+
: "#14532d",
|
|
14654
|
+
color: monthPriceDisplayInfo
|
|
14655
|
+
? monthPriceDisplayInfo.textColor
|
|
14656
|
+
: "#4ade80",
|
|
14657
|
+
boxShadow: monthPriceDisplayInfo
|
|
14658
|
+
? "0 2px 4px rgba(0, 0, 0, 0.2)"
|
|
14659
|
+
: undefined,
|
|
14660
|
+
}, children: `${t("common.from")} ${formatCurrency(minPrice)}` }), isOpen: openGroups.has(key), onToggle: () => toggleGroup(key), children: jsxRuntime.jsx("div", { style: { display: "flex", flexDirection: "column", gap: "12px", paddingTop: "12px" }, children: events.map((event) => {
|
|
14661
|
+
const availableSpots = event.maxParticipants - event.participantCount;
|
|
14662
|
+
const isFullyBooked = availableSpots === 0;
|
|
14663
|
+
const startDate = new Date(event.startTime);
|
|
14664
|
+
const isPastEvent = today.toISOString() >= startDate.toISOString();
|
|
14665
|
+
const isDisabled = isFullyBooked || isPastEvent || !event.bookingOpen;
|
|
14666
|
+
return (jsxRuntime.jsxs("div", { style: {
|
|
14667
|
+
position: "relative",
|
|
14668
|
+
border: "1px solid var(--bw-border-color)",
|
|
14669
|
+
backgroundColor: "var(--bw-surface-color)",
|
|
14670
|
+
borderRadius: "var(--bw-border-radius)",
|
|
14671
|
+
padding: "16px 10px",
|
|
14672
|
+
transition: "all 0.2s ease",
|
|
14673
|
+
fontFamily: "var(--bw-font-family)",
|
|
14674
|
+
opacity: isDisabled ? 0.3 : 1,
|
|
14675
|
+
filter: isDisabled ? "grayscale(40%)" : "none",
|
|
14676
|
+
cursor: isDisabled ? "not-allowed" : "pointer",
|
|
14677
|
+
}, onClick: () => {
|
|
14678
|
+
if (!isDisabled) {
|
|
14679
|
+
handleEventInstanceSelect(event);
|
|
14680
|
+
}
|
|
14681
|
+
}, children: [selectedEventInstanceId === event.id && isLoadingEventDetails && (jsxRuntime.jsx("div", { style: {
|
|
14682
|
+
position: "absolute",
|
|
14683
|
+
inset: 0,
|
|
14684
|
+
backgroundColor: "rgba(15, 23, 42, 0.8)",
|
|
14685
|
+
borderRadius: "var(--bw-border-radius)",
|
|
14686
|
+
display: "flex",
|
|
14687
|
+
alignItems: "center",
|
|
14688
|
+
justifyContent: "center",
|
|
14689
|
+
}, children: jsxRuntime.jsx("div", { style: {
|
|
14690
|
+
width: "32px",
|
|
14691
|
+
height: "32px",
|
|
14692
|
+
color: "var(--bw-highlight-color)",
|
|
14693
|
+
opacity: 0.8,
|
|
14694
|
+
fontSize: "32px",
|
|
14695
|
+
}, children: spinner() }) })), jsxRuntime.jsx(SpecialPriceBadge, { price: event.price, yearPrices: yearPrices, t: t }), jsxRuntime.jsx(AllocationBadge, { availableSpots: availableSpots, maxParticipants: event.maxParticipants, t: t }), jsxRuntime.jsxs("div", { style: {
|
|
14696
|
+
display: "flex",
|
|
14697
|
+
justifyContent: "space-between",
|
|
14698
|
+
width: "100%",
|
|
14699
|
+
alignItems: "flex-start",
|
|
14700
|
+
gap: "12px",
|
|
14701
|
+
marginBottom: "4px",
|
|
14702
|
+
}, children: [jsxRuntime.jsxs("div", { style: { display: "flex", alignItems: "flex-start", gap: "12px" }, children: [jsxRuntime.jsx("div", { style: {
|
|
14703
|
+
fontSize: "16px",
|
|
14704
|
+
transition: "all 0.2s ease",
|
|
14705
|
+
borderRadius: "var(--bw-border-radius-small)",
|
|
14706
|
+
borderTop: "4px solid var(--bw-border-color)",
|
|
14707
|
+
border: "1px solid var(--bw-border-color)",
|
|
14708
|
+
width: "40px",
|
|
14709
|
+
height: "40px",
|
|
14710
|
+
display: "flex",
|
|
14711
|
+
alignItems: "center",
|
|
14712
|
+
justifyContent: "center",
|
|
14713
|
+
fontWeight: 700,
|
|
14714
|
+
color: "var(--bw-text-color)",
|
|
14715
|
+
backgroundColor: "var(--bw-background-color)",
|
|
14716
|
+
}, children: startDate.getDate() }), jsxRuntime.jsxs("div", { style: {
|
|
14717
|
+
fontSize: "16px",
|
|
14718
|
+
color: "var(--bw-text-color)",
|
|
14719
|
+
display: "flex",
|
|
14720
|
+
flexDirection: "column",
|
|
14721
|
+
alignItems: "flex-start",
|
|
14722
|
+
justifyContent: "flex-start",
|
|
14723
|
+
lineHeight: 1.25,
|
|
14724
|
+
}, children: [jsxRuntime.jsxs("div", { children: [jsxRuntime.jsx("span", { style: { fontWeight: 600, marginBottom: "2px", textTransform: "capitalize" }, children: formatWeekday(event.startTime, timezone, locale) }), formatWeekday(event.startTime, timezone, locale) !==
|
|
14725
|
+
formatWeekday(event.endTime, timezone, locale) && (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx("span", { style: { color: "var(--bw-text-muted)", fontSize: "14px" }, children: " - " }), jsxRuntime.jsx("span", { style: { fontWeight: 600, marginBottom: "2px", textTransform: "capitalize" }, children: formatWeekday(event.endTime, timezone, locale) })] }))] }), jsxRuntime.jsx("div", { children: formatWeekday(event.startTime, timezone, locale) ===
|
|
14726
|
+
formatWeekday(event.endTime, timezone, locale) ? (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx("span", { style: { color: "var(--bw-text-muted)", fontSize: "14px" }, children: formatTime(event.startTime, timezone, locale) }), jsxRuntime.jsx("span", { style: { color: "var(--bw-text-muted)", fontSize: "14px" }, children: " - " }), jsxRuntime.jsx("span", { style: { color: "var(--bw-text-muted)", fontSize: "14px" }, children: formatTime(event.endTime, timezone, locale) })] })) : (jsxRuntime.jsxs("span", { style: { color: "var(--bw-text-muted)", fontSize: "14px" }, children: [formatTime(event.startTime, timezone, locale), " ", t("instances.oclock")] })) })] }), jsxRuntime.jsxs("span", { style: {
|
|
14727
|
+
fontSize: "12px",
|
|
14728
|
+
fontWeight: 400,
|
|
14729
|
+
color: "var(--bw-text-muted)",
|
|
14730
|
+
marginLeft: "6px",
|
|
14731
|
+
backgroundColor: "rgba(0, 0, 0, 0.05)",
|
|
14732
|
+
whiteSpace: "nowrap",
|
|
14733
|
+
padding: "2px 6px",
|
|
14734
|
+
borderRadius: "var(--bw-border-radius-small)",
|
|
14735
|
+
}, children: [event.durationDays, " ", event.durationDays > 1 ? t("common.days") : t("common.day")] })] }), jsxRuntime.jsx("div", { style: {
|
|
14736
|
+
textAlign: "right",
|
|
14737
|
+
display: "flex",
|
|
14738
|
+
flexDirection: "column",
|
|
14739
|
+
alignItems: "flex-end",
|
|
14740
|
+
}, children: jsxRuntime.jsx(PriceDisplay, { price: event.price, yearPrices: yearPrices, t: t }) })] }), event.name !== selectedEventType?.name && (jsxRuntime.jsx("h4", { style: {
|
|
14741
|
+
fontSize: "16px",
|
|
14742
|
+
fontWeight: 600,
|
|
14743
|
+
color: "var(--bw-text-color)",
|
|
14744
|
+
lineHeight: 1.25,
|
|
14745
|
+
margin: "0 0 2px 0",
|
|
14746
|
+
display: "flex",
|
|
14747
|
+
alignItems: "center",
|
|
14748
|
+
gap: "8px",
|
|
14749
|
+
maxWidth: "230px",
|
|
14750
|
+
}, children: event.name }))] }, event.id));
|
|
14751
|
+
}) }) })] }, key));
|
|
14752
|
+
}) })] }) }));
|
|
14567
14753
|
}
|
|
14568
14754
|
|
|
14569
14755
|
function NextEventsPreview({ events, onEventSelect, onShowAll, showAllButtonText, showAllButton, isLoadingEventDetails = false, isLoadingShowAll = false, isLoading = false, }) {
|
|
@@ -14571,6 +14757,47 @@ function NextEventsPreview({ events, onEventSelect, onShowAll, showAllButtonText
|
|
|
14571
14757
|
const { locale } = useLocale();
|
|
14572
14758
|
const timezone = useTimezone();
|
|
14573
14759
|
const [selectedEventInstanceId, setSelectedEventInstanceId] = React.useState(null);
|
|
14760
|
+
const normalizedShowAllButtonText = showAllButtonText.trim() || t("nextEvents.showAll");
|
|
14761
|
+
function InfoBadge({ text }) {
|
|
14762
|
+
const [open, setOpen] = React.useState(false);
|
|
14763
|
+
return (jsxRuntime.jsxs("span", { onClick: (event) => {
|
|
14764
|
+
event.stopPropagation();
|
|
14765
|
+
setOpen((current) => !current);
|
|
14766
|
+
}, style: {
|
|
14767
|
+
position: "relative",
|
|
14768
|
+
display: "inline-flex",
|
|
14769
|
+
alignItems: "center",
|
|
14770
|
+
justifyContent: "center",
|
|
14771
|
+
width: "16px",
|
|
14772
|
+
height: "16px",
|
|
14773
|
+
borderRadius: "50%",
|
|
14774
|
+
border: "1px solid var(--bw-highlight-color)",
|
|
14775
|
+
color: "var(--bw-highlight-color)",
|
|
14776
|
+
fontSize: "9px",
|
|
14777
|
+
fontWeight: 700,
|
|
14778
|
+
cursor: "pointer",
|
|
14779
|
+
flexShrink: 0,
|
|
14780
|
+
userSelect: "none",
|
|
14781
|
+
}, children: ["i", open && (jsxRuntime.jsx("span", { style: {
|
|
14782
|
+
position: "absolute",
|
|
14783
|
+
bottom: "calc(100% + 6px)",
|
|
14784
|
+
right: 0,
|
|
14785
|
+
backgroundColor: "var(--bw-surface-color)",
|
|
14786
|
+
border: "1px solid var(--bw-border-color)",
|
|
14787
|
+
borderRadius: "var(--bw-border-radius-small)",
|
|
14788
|
+
boxShadow: "var(--bw-shadow-md)",
|
|
14789
|
+
padding: "6px 10px",
|
|
14790
|
+
fontSize: "13px",
|
|
14791
|
+
color: "var(--bw-text-color)",
|
|
14792
|
+
fontWeight: 400,
|
|
14793
|
+
whiteSpace: "normal",
|
|
14794
|
+
width: "180px",
|
|
14795
|
+
lineHeight: 1.4,
|
|
14796
|
+
zIndex: 100,
|
|
14797
|
+
textAlign: "left",
|
|
14798
|
+
pointerEvents: "none",
|
|
14799
|
+
}, children: text }))] }));
|
|
14800
|
+
}
|
|
14574
14801
|
const handleEventSelect = (eventInstanceId) => {
|
|
14575
14802
|
setSelectedEventInstanceId(eventInstanceId);
|
|
14576
14803
|
onEventSelect(eventInstanceId);
|
|
@@ -14636,20 +14863,9 @@ function NextEventsPreview({ events, onEventSelect, onShowAll, showAllButtonText
|
|
|
14636
14863
|
return (jsxRuntime.jsxs("div", { style: {
|
|
14637
14864
|
maxWidth: "500px",
|
|
14638
14865
|
margin: "0 auto",
|
|
14639
|
-
padding: "16px",
|
|
14866
|
+
padding: "12px 16px",
|
|
14640
14867
|
fontFamily: "var(--bw-font-family)",
|
|
14641
|
-
}, children: [jsxRuntime.
|
|
14642
|
-
fontWeight: 600,
|
|
14643
|
-
margin: "0 0 8px 0",
|
|
14644
|
-
fontSize: "18px",
|
|
14645
|
-
color: "var(--bw-text-color)",
|
|
14646
|
-
fontFamily: "var(--bw-font-family)",
|
|
14647
|
-
}, children: t("nextEvents.title") }), jsxRuntime.jsx("p", { style: {
|
|
14648
|
-
margin: 0,
|
|
14649
|
-
fontSize: "16px",
|
|
14650
|
-
color: "var(--bw-text-muted)",
|
|
14651
|
-
fontFamily: "var(--bw-font-family)",
|
|
14652
|
-
}, children: t("nextEvents.subtitle") })] }), jsxRuntime.jsx("div", { style: { display: "flex", flexDirection: "column", gap: "12px", marginBottom: "24px" }, children: events.map((event) => {
|
|
14868
|
+
}, children: [jsxRuntime.jsx("div", { style: { display: "flex", flexDirection: "column", gap: "4px", marginBottom: "10px" }, children: events.map((event) => {
|
|
14653
14869
|
const availableSpots = event.maxParticipants - event.participantCount;
|
|
14654
14870
|
const isFullyBooked = availableSpots === 0;
|
|
14655
14871
|
const startDate = new Date(event.startTime);
|
|
@@ -14673,11 +14889,10 @@ function NextEventsPreview({ events, onEventSelect, onShowAll, showAllButtonText
|
|
|
14673
14889
|
const isDisabled = isFullyBooked || isPastEvent || !event.bookingOpen;
|
|
14674
14890
|
return (jsxRuntime.jsxs("div", { style: {
|
|
14675
14891
|
position: "relative",
|
|
14676
|
-
|
|
14677
|
-
|
|
14678
|
-
padding: "8px 10px",
|
|
14892
|
+
borderRadius: "var(--bw-border-radius-small)",
|
|
14893
|
+
padding: "0 4px",
|
|
14679
14894
|
transition: "all 0.2s ease",
|
|
14680
|
-
border:
|
|
14895
|
+
border: "1px solid transparent",
|
|
14681
14896
|
fontFamily: "var(--bw-font-family)",
|
|
14682
14897
|
opacity: isDisabled ? 0.3 : 1,
|
|
14683
14898
|
filter: isDisabled ? "grayscale(100%)" : "none",
|
|
@@ -14686,6 +14901,14 @@ function NextEventsPreview({ events, onEventSelect, onShowAll, showAllButtonText
|
|
|
14686
14901
|
if (!isDisabled) {
|
|
14687
14902
|
handleEventSelect(event.id);
|
|
14688
14903
|
}
|
|
14904
|
+
}, onMouseEnter: (hoverEvent) => {
|
|
14905
|
+
if (!isDisabled) {
|
|
14906
|
+
hoverEvent.currentTarget.style.backgroundColor = "var(--bw-surface-color)";
|
|
14907
|
+
hoverEvent.currentTarget.style.borderColor = getAvailabilityColor();
|
|
14908
|
+
}
|
|
14909
|
+
}, onMouseLeave: (hoverEvent) => {
|
|
14910
|
+
hoverEvent.currentTarget.style.backgroundColor = "transparent";
|
|
14911
|
+
hoverEvent.currentTarget.style.borderColor = "transparent";
|
|
14689
14912
|
}, children: [selectedEventInstanceId === event.id && isLoadingEventDetails && (jsxRuntime.jsx("div", { style: {
|
|
14690
14913
|
position: "absolute",
|
|
14691
14914
|
inset: 0,
|
|
@@ -14701,80 +14924,41 @@ function NextEventsPreview({ events, onEventSelect, onShowAll, showAllButtonText
|
|
|
14701
14924
|
fontSize: "32px",
|
|
14702
14925
|
animation: "spin 1s linear infinite",
|
|
14703
14926
|
}, children: "\u27F3" }) })), jsxRuntime.jsxs("div", { style: {
|
|
14704
|
-
|
|
14705
|
-
|
|
14706
|
-
|
|
14707
|
-
alignItems: "flex-start",
|
|
14708
|
-
gap: "12px",
|
|
14709
|
-
marginBottom: "4px",
|
|
14710
|
-
}, children: [jsxRuntime.jsxs("div", { style: { display: "flex", alignItems: "flex-start", gap: "12px" }, children: [jsxRuntime.jsx("div", { style: {
|
|
14711
|
-
display: "flex",
|
|
14712
|
-
alignItems: "center",
|
|
14713
|
-
justifyContent: "center",
|
|
14714
|
-
fontWeight: 700,
|
|
14715
|
-
fontSize: "16px",
|
|
14716
|
-
borderRadius: "var(--bw-border-radius-small)",
|
|
14717
|
-
width: "40px",
|
|
14718
|
-
height: "40px",
|
|
14719
|
-
color: "var(--bw-text-color)",
|
|
14720
|
-
backgroundColor: "var(--bw-background-color)",
|
|
14721
|
-
border: "1px solid var(--bw-border-color)",
|
|
14722
|
-
borderTopWidth: "4px",
|
|
14723
|
-
borderTopColor: getAvailabilityColor(),
|
|
14724
|
-
transition: "all 0.2s ease",
|
|
14725
|
-
}, children: startDate.getDate() }), jsxRuntime.jsxs("div", { style: {
|
|
14726
|
-
display: "flex",
|
|
14727
|
-
flexDirection: "column",
|
|
14728
|
-
alignItems: "flex-start",
|
|
14729
|
-
justifyContent: "flex-start",
|
|
14730
|
-
fontSize: "16px",
|
|
14731
|
-
color: "var(--bw-text-color)",
|
|
14732
|
-
lineHeight: 1.25,
|
|
14733
|
-
}, children: [jsxRuntime.jsx("span", { style: { fontWeight: 600, marginBottom: "2px", textTransform: "capitalize" }, children: formatWeekday(event.startTime, timezone, locale) }), jsxRuntime.jsx("span", { style: { color: "var(--bw-text-muted)", fontSize: "14px" }, children: formatTime(event.startTime, timezone, locale) })] })] }), jsxRuntime.jsxs("div", { style: {
|
|
14734
|
-
display: "flex",
|
|
14735
|
-
flexDirection: "column",
|
|
14736
|
-
alignItems: "flex-end",
|
|
14737
|
-
textAlign: "right",
|
|
14738
|
-
}, children: [jsxRuntime.jsx("div", { style: {
|
|
14739
|
-
fontWeight: 700,
|
|
14740
|
-
color: "var(--bw-highlight-color)",
|
|
14741
|
-
fontSize: "18px",
|
|
14742
|
-
}, children: event.price !== null ? formatCurrency(event.price) : t("nextEvents.priceOnRequest") }), event.deposit && event.deposit > 0 && (jsxRuntime.jsxs("div", { style: { fontSize: "12px", color: "var(--bw-text-muted)" }, children: [t("common.from"), " ", formatCurrency(event.deposit)] }))] })] }), jsxRuntime.jsxs("h4", { style: {
|
|
14743
|
-
display: "flex",
|
|
14927
|
+
minHeight: "32px",
|
|
14928
|
+
display: "grid",
|
|
14929
|
+
gridTemplateColumns: "1fr auto 20px",
|
|
14744
14930
|
alignItems: "center",
|
|
14745
|
-
fontWeight: 600,
|
|
14746
|
-
margin: "0 0 2px 0",
|
|
14747
|
-
fontSize: "16px",
|
|
14748
|
-
color: "var(--bw-text-color)",
|
|
14749
|
-
lineHeight: 1.25,
|
|
14750
14931
|
gap: "8px",
|
|
14751
|
-
|
|
14752
|
-
|
|
14753
|
-
fontWeight: 400,
|
|
14754
|
-
color: "var(--bw-text-muted)",
|
|
14755
|
-
marginLeft: "6px",
|
|
14756
|
-
backgroundColor: "rgba(0, 0, 0, 0.05)",
|
|
14757
|
-
borderRadius: "16px",
|
|
14758
|
-
padding: "2px 8px",
|
|
14759
|
-
}, children: [event.durationDays, " ", event.durationDays > 1 ? t("common.days") : t("common.day")] })] }), event.notes && (jsxRuntime.jsx("p", { style: {
|
|
14760
|
-
margin: "8px 0 0 0",
|
|
14761
|
-
fontSize: "12px",
|
|
14932
|
+
width: "100%",
|
|
14933
|
+
fontSize: "13px",
|
|
14762
14934
|
color: "var(--bw-text-muted)",
|
|
14763
|
-
|
|
14764
|
-
|
|
14765
|
-
|
|
14766
|
-
|
|
14767
|
-
|
|
14768
|
-
|
|
14935
|
+
}, children: [jsxRuntime.jsxs("span", { style: {
|
|
14936
|
+
whiteSpace: "nowrap",
|
|
14937
|
+
display: "flex",
|
|
14938
|
+
alignItems: "center",
|
|
14939
|
+
gap: "3px",
|
|
14940
|
+
overflow: "hidden",
|
|
14941
|
+
textOverflow: "ellipsis",
|
|
14942
|
+
textTransform: "capitalize",
|
|
14943
|
+
}, children: [formatWeekday(event.startTime, timezone, locale), " ", formatDate(event.startTime, timezone, locale)] }), jsxRuntime.jsx("span", { style: {
|
|
14944
|
+
display: "flex",
|
|
14945
|
+
alignItems: "center",
|
|
14946
|
+
gap: "4px",
|
|
14947
|
+
whiteSpace: "nowrap",
|
|
14948
|
+
fontWeight: 700,
|
|
14949
|
+
color: "var(--bw-text-color)",
|
|
14950
|
+
}, children: event.price !== null ? formatCurrency(event.price) : t("nextEvents.priceOnRequest") }), event.notes ? jsxRuntime.jsx(InfoBadge, { text: event.notes }) : jsxRuntime.jsx("span", {})] })] }, event.id));
|
|
14769
14951
|
}) }), showAllButton && (jsxRuntime.jsx("div", { style: { textAlign: "center" }, children: jsxRuntime.jsx("button", { type: "button", disabled: isLoadingShowAll, style: {
|
|
14770
|
-
|
|
14952
|
+
display: "inline-flex",
|
|
14953
|
+
alignItems: "center",
|
|
14954
|
+
justifyContent: "center",
|
|
14771
14955
|
backgroundColor: "var(--bw-surface-color)",
|
|
14772
14956
|
color: "var(--bw-highlight-color)",
|
|
14773
14957
|
border: "1px solid var(--bw-highlight-color)",
|
|
14774
|
-
padding: "
|
|
14775
|
-
borderRadius: "var(--bw-border-radius)",
|
|
14776
|
-
fontSize: "
|
|
14777
|
-
fontWeight:
|
|
14958
|
+
padding: "6px 10px",
|
|
14959
|
+
borderRadius: "var(--bw-border-radius-small)",
|
|
14960
|
+
fontSize: "13px",
|
|
14961
|
+
fontWeight: 600,
|
|
14778
14962
|
fontFamily: "var(--bw-font-family)",
|
|
14779
14963
|
transition: "all 0.2s ease",
|
|
14780
14964
|
cursor: isLoadingShowAll ? "not-allowed" : "pointer",
|
|
@@ -14785,7 +14969,7 @@ function NextEventsPreview({ events, onEventSelect, onShowAll, showAllButtonText
|
|
|
14785
14969
|
color: "var(--bw-highlight-color)",
|
|
14786
14970
|
fontSize: "16px",
|
|
14787
14971
|
animation: "spin 1s linear infinite",
|
|
14788
|
-
}, children: "\u27F3" }), t("common.loading")] })) : (
|
|
14972
|
+
}, children: "\u27F3" }), t("common.loading")] })) : (normalizedShowAllButtonText) }) }))] }));
|
|
14789
14973
|
}
|
|
14790
14974
|
|
|
14791
14975
|
function SpecialsView({ specials, onEventSelect, isLoading = false, showSavingsAmount = true, showSavingsPercent = false, emptyStateText, isLoadingEventDetails = false, }) {
|
|
@@ -15422,7 +15606,7 @@ function UpsellsStep({ upsells, selectedUpsells, participantCount, isLoading, is
|
|
|
15422
15606
|
const isSelected = (upsellId) => selectedUpsells.some((s) => s.upsellPackageId === upsellId);
|
|
15423
15607
|
const selectedCount = selectedUpsells.length;
|
|
15424
15608
|
const footerContent = (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx("button", { type: "button", onClick: onBack, style: mergeStyles(buttonStyles.secondary, buttonStyles.fullWidth), className: buttonClassName, children: t("common.back") }), jsxRuntime.jsx("button", { type: "button", onClick: onContinue, style: mergeStyles(buttonStyles.primary, buttonStyles.fullWidth), className: buttonClassName, children: selectedCount === 0 ? t("button.continueWithout") : t("button.continue") })] }));
|
|
15425
|
-
return (jsxRuntime.jsx(Sidebar, { isOpen: isOpen, onClose: onClose, title: t("upsells.title"), footer: footerContent, children: jsxRuntime.jsxs("div", { style: { display: "flex", flexDirection: "column", height: "100%", padding: "16px 16px" }, children: [isLoading && (jsxRuntime.jsxs("div", { style: { display: "flex", flexDirection: "column", alignItems: "center", justifyContent: "center", gap: "12px", padding: "40px 20px", ...textStyles.muted }, children: [spinner(), jsxRuntime.jsx("span", { children: t("upsells.loading") })] })), !isLoading && upsells.length === 0 && (jsxRuntime.jsx("div", { style: { textAlign: "center", padding: "40px 20px", ...textStyles.muted }, children: jsxRuntime.jsx("p", { children: t("upsells.noExtras") }) })), !isLoading && upsells.length > 0 && (jsxRuntime.jsx("div", { style: { display: "flex", flexDirection: "column", gap: "12px", flex: 1, overflowY: "auto", paddingBottom: "16px" }, children: upsells.map((upsell) => (jsxRuntime.jsx(UpsellCard, { upsell: upsell, isSelected: isSelected(upsell.id), participantCount: participantCount, onSelect: () => selectUpsell(upsell.id) }, upsell.id))) })), selectedCount > 0 && (jsxRuntime.jsx("div", { style: { display: "flex", alignItems: "center", marginTop: "16px", paddingBottom: "16px", paddingTop: "16px", borderTop: "1px solid var(--bw-border-color)", fontSize: "14px" }, children: jsxRuntime.jsx("span", { style: textStyles.muted, children: selectedCount === 1 ? t("upsells.selected", { count: selectedCount }) : t("upsells.selectedPlural", { count: selectedCount }) }) }))] }) }));
|
|
15609
|
+
return (jsxRuntime.jsx(Sidebar, { isOpen: isOpen, onClose: onClose, title: t("upsells.title"), footer: footerContent, children: jsxRuntime.jsxs("div", { style: { display: "flex", flexDirection: "column", height: "100%", padding: "16px 16px" }, children: [jsxRuntime.jsx(FlowProgress, { currentStep: "upsells", hasUpsellsStep: true }), isLoading && (jsxRuntime.jsxs("div", { style: { display: "flex", flexDirection: "column", alignItems: "center", justifyContent: "center", gap: "12px", padding: "40px 20px", ...textStyles.muted }, children: [spinner(), jsxRuntime.jsx("span", { children: t("upsells.loading") })] })), !isLoading && upsells.length === 0 && (jsxRuntime.jsx("div", { style: { textAlign: "center", padding: "40px 20px", ...textStyles.muted }, children: jsxRuntime.jsx("p", { children: t("upsells.noExtras") }) })), !isLoading && upsells.length > 0 && (jsxRuntime.jsx("div", { style: { display: "flex", flexDirection: "column", gap: "12px", flex: 1, overflowY: "auto", paddingBottom: "16px" }, children: upsells.map((upsell) => (jsxRuntime.jsx(UpsellCard, { upsell: upsell, isSelected: isSelected(upsell.id), participantCount: participantCount, onSelect: () => selectUpsell(upsell.id) }, upsell.id))) })), selectedCount > 0 && (jsxRuntime.jsx("div", { style: { display: "flex", alignItems: "center", marginTop: "16px", paddingBottom: "16px", paddingTop: "16px", borderTop: "1px solid var(--bw-border-color)", fontSize: "14px" }, children: jsxRuntime.jsx("span", { style: textStyles.muted, children: selectedCount === 1 ? t("upsells.selected", { count: selectedCount }) : t("upsells.selectedPlural", { count: selectedCount }) }) }))] }) }));
|
|
15426
15610
|
}
|
|
15427
15611
|
|
|
15428
15612
|
/**
|
|
@@ -15563,6 +15747,7 @@ function UniversalBookingWidgetInner({ config: baseConfig, onWidgetLanguage, onT
|
|
|
15563
15747
|
const [bookingPersistedState, setBookingPersistedState] = React.useState(null);
|
|
15564
15748
|
const [isLoadingUpsells, setIsLoadingUpsells] = React.useState(false);
|
|
15565
15749
|
const [tempParticipantCount, setTempParticipantCount] = React.useState(1); // Used during upsell step
|
|
15750
|
+
const hasUpsellsFlowStep = upsells.length > 0 || currentStep === "upsells";
|
|
15566
15751
|
// State for upcoming events (next-events view mode)
|
|
15567
15752
|
const [upcomingEvents, setUpcomingEvents] = React.useState([]);
|
|
15568
15753
|
const [showingPreview, setShowingPreview] = React.useState(true);
|
|
@@ -15689,6 +15874,7 @@ function UniversalBookingWidgetInner({ config: baseConfig, onWidgetLanguage, onT
|
|
|
15689
15874
|
...(data.mollieProfileId ? { mollieProfileId: data.mollieProfileId } : {}),
|
|
15690
15875
|
...(data.mollieTestmode !== undefined ? { mollieTestmode: data.mollieTestmode } : {}),
|
|
15691
15876
|
roundPricesEnabled: data.roundPricesEnabled ?? true,
|
|
15877
|
+
widgetPaymentMode: data.widgetPaymentMode ?? "all",
|
|
15692
15878
|
});
|
|
15693
15879
|
}
|
|
15694
15880
|
}
|
|
@@ -16053,6 +16239,7 @@ function UniversalBookingWidgetInner({ config: baseConfig, onWidgetLanguage, onT
|
|
|
16053
16239
|
mollieProfileId: data.mollieProfileId,
|
|
16054
16240
|
mollieTestmode: data.mollieTestmode,
|
|
16055
16241
|
roundPricesEnabled: data.roundPricesEnabled ?? true,
|
|
16242
|
+
widgetPaymentMode: data.widgetPaymentMode ?? "all",
|
|
16056
16243
|
});
|
|
16057
16244
|
}
|
|
16058
16245
|
if (data.stripePublishableKey) {
|
|
@@ -16113,6 +16300,7 @@ function UniversalBookingWidgetInner({ config: baseConfig, onWidgetLanguage, onT
|
|
|
16113
16300
|
mollieProfileId: data.mollieProfileId,
|
|
16114
16301
|
mollieTestmode: data.mollieTestmode,
|
|
16115
16302
|
roundPricesEnabled: data.roundPricesEnabled ?? true,
|
|
16303
|
+
widgetPaymentMode: data.widgetPaymentMode ?? "all",
|
|
16116
16304
|
});
|
|
16117
16305
|
if (!stripePromise && data.stripePublishableKey) {
|
|
16118
16306
|
const stripeOptions = {
|
|
@@ -16621,7 +16809,7 @@ function UniversalBookingWidgetInner({ config: baseConfig, onWidgetLanguage, onT
|
|
|
16621
16809
|
}, isOpen: currentStep === "eventInstances", onClose: () => {
|
|
16622
16810
|
setShowingPreview(true);
|
|
16623
16811
|
setCurrentStep("eventTypes");
|
|
16624
|
-
}, isLoadingEventInstances: isLoadingEventInstances, isLoadingEventDetails: isLoadingEventDetails })), jsxRuntime.jsx(BookingSuccessModal, { isOpen: isSuccess, onClose: () => {
|
|
16812
|
+
}, isLoadingEventInstances: isLoadingEventInstances, isLoadingEventDetails: isLoadingEventDetails, hasUpsellsStep: hasUpsellsFlowStep })), jsxRuntime.jsx(BookingSuccessModal, { isOpen: isSuccess, onClose: () => {
|
|
16625
16813
|
setIsSuccess(false);
|
|
16626
16814
|
setCurrentStep("eventTypes");
|
|
16627
16815
|
setShowingPreview(true);
|
|
@@ -16660,11 +16848,12 @@ function UniversalBookingWidgetInner({ config: baseConfig, onWidgetLanguage, onT
|
|
|
16660
16848
|
setShouldRenderBookingForm(true);
|
|
16661
16849
|
}
|
|
16662
16850
|
else {
|
|
16851
|
+
setCurrentStep("eventInstances");
|
|
16663
16852
|
setSidebarOpen(true);
|
|
16664
16853
|
setShouldRenderInstanceSelection(true);
|
|
16665
16854
|
}
|
|
16666
16855
|
}, children: config.buttonText ||
|
|
16667
|
-
(isDirectInstanceMode ? t("button.bookNow") : t("button.
|
|
16856
|
+
(isDirectInstanceMode ? t("button.bookNow") : t("button.viewDates")) }), shouldRenderInstanceSelection && (jsxRuntime.jsx(EventInstanceSelection, { eventInstances: eventInstances, selectedEventType: selectedEventType, onEventInstanceSelect: handleEventInstanceSelect, onBackToEventTypes: () => setSidebarOpen(false), isOpen: sidebarOpen && currentStep === "eventInstances", onClose: () => setSidebarOpen(false), isLoadingEventInstances: isLoadingEventInstances, isLoadingEventDetails: isLoadingEventDetails, hasUpsellsStep: hasUpsellsFlowStep })), shouldRenderUpsells && (jsxRuntime.jsx(UpsellsStep, { upsells: upsells, selectedUpsells: selectedUpsells, participantCount: tempParticipantCount, isLoading: isLoadingUpsells, isOpen: currentStep === "upsells", onClose: () => setCurrentStep("eventInstances"), onSelect: handleUpsellsSelect, onContinue: handleUpsellsContinue, onBack: handleUpsellsBack })), shouldRenderBookingForm && eventDetails && (jsxRuntime.jsx(BookingForm, { config: config, eventDetails: eventDetails, stripePromise: stripePromise, onSuccess: handleBookingSuccess, onError: handleBookingError, isOpen: currentStep === "booking" && !!eventDetails, onClose: handleBackFromBooking, systemConfig: systemConfig, selectedUpsells: selectedUpsells, upsells: upsells, persistedState: bookingPersistedState, onPersistedStateChange: setBookingPersistedState })), jsxRuntime.jsx(BookingSuccessModal, { isOpen: isSuccess, onClose: () => {
|
|
16668
16857
|
setIsSuccess(false);
|
|
16669
16858
|
setCurrentStep("eventTypes");
|
|
16670
16859
|
setSidebarOpen(false);
|
|
@@ -16725,7 +16914,7 @@ function UniversalBookingWidgetInner({ config: baseConfig, onWidgetLanguage, onT
|
|
|
16725
16914
|
};
|
|
16726
16915
|
};
|
|
16727
16916
|
const backHandlers = getBackHandlers();
|
|
16728
|
-
return (jsxRuntime.jsxs(StyleProvider, { config: config, children: [jsxRuntime.jsxs("div", { ref: setWidgetContainerRef, children: [cardsView, shouldRenderInstanceSelection && (jsxRuntime.jsx(EventInstanceSelection, { eventInstances: eventInstances, selectedEventType: selectedEventType, onEventInstanceSelect: handleEventInstanceSelect, onBackToEventTypes: handleBackToEventTypes, isOpen: currentStep === "eventInstances", onClose: handleBackToEventTypes, isLoadingEventInstances: isLoadingEventInstances, isLoadingEventDetails: isLoadingEventDetails })), shouldRenderUpsells && (jsxRuntime.jsx(UpsellsStep, { upsells: upsells, selectedUpsells: selectedUpsells, participantCount: tempParticipantCount, isLoading: isLoadingUpsells, isOpen: currentStep === "upsells", onClose: () => setCurrentStep("eventInstances"), onSelect: handleUpsellsSelect, onContinue: handleUpsellsContinue, onBack: handleUpsellsBack })), shouldRenderBookingForm && eventDetails && (jsxRuntime.jsx(BookingForm, { config: config, eventDetails: eventDetails, stripePromise: stripePromise, onSuccess: handleBookingSuccess, onError: handleBookingError, isOpen: currentStep === "booking" && !!eventDetails, onClose: backHandlers.onClose, systemConfig: systemConfig, selectedUpsells: selectedUpsells, upsells: upsells, persistedState: bookingPersistedState, onPersistedStateChange: setBookingPersistedState })), jsxRuntime.jsx(BookingSuccessModal, { isOpen: isSuccess && !voucherPurchaseResult, onClose: () => {
|
|
16917
|
+
return (jsxRuntime.jsxs(StyleProvider, { config: config, children: [jsxRuntime.jsxs("div", { ref: setWidgetContainerRef, children: [cardsView, shouldRenderInstanceSelection && (jsxRuntime.jsx(EventInstanceSelection, { eventInstances: eventInstances, selectedEventType: selectedEventType, onEventInstanceSelect: handleEventInstanceSelect, onBackToEventTypes: handleBackToEventTypes, isOpen: currentStep === "eventInstances", onClose: handleBackToEventTypes, isLoadingEventInstances: isLoadingEventInstances, isLoadingEventDetails: isLoadingEventDetails, hasUpsellsStep: hasUpsellsFlowStep })), shouldRenderUpsells && (jsxRuntime.jsx(UpsellsStep, { upsells: upsells, selectedUpsells: selectedUpsells, participantCount: tempParticipantCount, isLoading: isLoadingUpsells, isOpen: currentStep === "upsells", onClose: () => setCurrentStep("eventInstances"), onSelect: handleUpsellsSelect, onContinue: handleUpsellsContinue, onBack: handleUpsellsBack })), shouldRenderBookingForm && eventDetails && (jsxRuntime.jsx(BookingForm, { config: config, eventDetails: eventDetails, stripePromise: stripePromise, onSuccess: handleBookingSuccess, onError: handleBookingError, isOpen: currentStep === "booking" && !!eventDetails, onClose: backHandlers.onClose, systemConfig: systemConfig, selectedUpsells: selectedUpsells, upsells: upsells, persistedState: bookingPersistedState, onPersistedStateChange: setBookingPersistedState })), jsxRuntime.jsx(BookingSuccessModal, { isOpen: isSuccess && !voucherPurchaseResult, onClose: () => {
|
|
16729
16918
|
setIsSuccess(false);
|
|
16730
16919
|
setCurrentStep("eventTypes");
|
|
16731
16920
|
setSuccessPaymentId(null);
|