@bigz-app/booking-widget 1.4.0 → 1.4.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/booking-widget.js +413 -222
- 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/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/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 +413 -222
- package/dist/index.cjs.map +1 -1
- package/dist/index.esm.js +413 -222
- package/dist/index.esm.js.map +1 -1
- package/package.json +1 -1
package/dist/index.esm.js
CHANGED
|
@@ -236,6 +236,7 @@ const de$1 = {
|
|
|
236
236
|
"events.availableFrom": "Freie Plätze ab {{date}}",
|
|
237
237
|
"events.noAvailableDates": "Keine Termine frei",
|
|
238
238
|
"events.previewSectionTitle": "Specials & nächste Termine",
|
|
239
|
+
"events.seeMoreDates": "Weitere Termine ansehen...",
|
|
239
240
|
// Event instances
|
|
240
241
|
"instances.title": "Terminauswahl",
|
|
241
242
|
"instances.noAvailable": "Keine verfügbaren Termine",
|
|
@@ -289,6 +290,10 @@ const de$1 = {
|
|
|
289
290
|
"booking.maxSpotsReached": "Maximal {{count}} Plätze verfügbar.",
|
|
290
291
|
"booking.comment": "Kommentar (optional)",
|
|
291
292
|
"booking.commentPlaceholder": "Zusätzliche Anmerkungen zur Buchung...",
|
|
293
|
+
"booking.stepDate": "Termin",
|
|
294
|
+
"booking.stepUpsells": "Extras",
|
|
295
|
+
"booking.stepDetails": "Angaben",
|
|
296
|
+
"booking.stepPayment": "Zahlung",
|
|
292
297
|
// Booking summary
|
|
293
298
|
"summary.title": "Buchungszusammenfassung",
|
|
294
299
|
"summary.subtotal": "Zwischensumme:",
|
|
@@ -421,6 +426,7 @@ const de$1 = {
|
|
|
421
426
|
"upsells.selectedPlural": "{{count}} Extras ausgewählt",
|
|
422
427
|
"upsells.savePercent": "{{percent}}% sparen",
|
|
423
428
|
"booking.paymentUnavailable": "Online-Zahlung ist für diese Buchung nicht verfügbar. Bitte kontaktiere uns, um die Reservierung abzuschließen.",
|
|
429
|
+
"booking.depositNotConfigured": "Online-Anzahlung ist für dieses Event nicht verfügbar. Bitte kontaktiere uns, um die Reservierung abzuschließen.",
|
|
424
430
|
"upsells.spotsFree": "{{count}} Plätze frei",
|
|
425
431
|
"upsells.notAvailable": "Nicht verfügbar",
|
|
426
432
|
"upsells.reason.outOfStock": "{{productName}} ist nicht auf Lager",
|
|
@@ -446,6 +452,9 @@ const de$1 = {
|
|
|
446
452
|
"promo.giftCode": "Dein Geschenk-Code",
|
|
447
453
|
"promo.copied": "Kopiert!",
|
|
448
454
|
"promo.copy": "Kopieren",
|
|
455
|
+
"trust.securePayment": "Sichere Zahlung",
|
|
456
|
+
"trust.paypal": "PayPal",
|
|
457
|
+
"trust.stripe": "Stripe",
|
|
449
458
|
};
|
|
450
459
|
|
|
451
460
|
const en = {
|
|
@@ -516,6 +525,7 @@ const en = {
|
|
|
516
525
|
"events.availableFrom": "Available from {{date}}",
|
|
517
526
|
"events.noAvailableDates": "No dates available",
|
|
518
527
|
"events.previewSectionTitle": "Specials & upcoming dates",
|
|
528
|
+
"events.seeMoreDates": "See more dates...",
|
|
519
529
|
// Event instances
|
|
520
530
|
"instances.title": "Select a date",
|
|
521
531
|
"instances.noAvailable": "No available dates",
|
|
@@ -569,6 +579,10 @@ const en = {
|
|
|
569
579
|
"booking.maxSpotsReached": "Maximum {{count}} spots available.",
|
|
570
580
|
"booking.comment": "Comment (optional)",
|
|
571
581
|
"booking.commentPlaceholder": "Additional notes for the booking...",
|
|
582
|
+
"booking.stepDate": "Date",
|
|
583
|
+
"booking.stepUpsells": "Extras",
|
|
584
|
+
"booking.stepDetails": "Details",
|
|
585
|
+
"booking.stepPayment": "Payment",
|
|
572
586
|
// Booking summary
|
|
573
587
|
"summary.title": "Booking Summary",
|
|
574
588
|
"summary.subtotal": "Subtotal:",
|
|
@@ -701,6 +715,7 @@ const en = {
|
|
|
701
715
|
"upsells.selectedPlural": "{{count}} extras selected",
|
|
702
716
|
"upsells.savePercent": "Save {{percent}}%",
|
|
703
717
|
"booking.paymentUnavailable": "Online payment is not available for this booking. Please contact us to complete your reservation.",
|
|
718
|
+
"booking.depositNotConfigured": "Online deposit payment is not available for this event. Please contact us to complete your reservation.",
|
|
704
719
|
"upsells.spotsFree": "{{count}} spots available",
|
|
705
720
|
"upsells.notAvailable": "Not available",
|
|
706
721
|
"upsells.reason.outOfStock": "{{productName}} is out of stock",
|
|
@@ -726,6 +741,9 @@ const en = {
|
|
|
726
741
|
"promo.giftCode": "Your gift code",
|
|
727
742
|
"promo.copied": "Copied!",
|
|
728
743
|
"promo.copy": "Copy",
|
|
744
|
+
"trust.securePayment": "Secure payment",
|
|
745
|
+
"trust.paypal": "PayPal",
|
|
746
|
+
"trust.stripe": "Stripe",
|
|
729
747
|
};
|
|
730
748
|
|
|
731
749
|
const es = {
|
|
@@ -796,6 +814,7 @@ const es = {
|
|
|
796
814
|
"events.availableFrom": "Disponible desde {{date}}",
|
|
797
815
|
"events.noAvailableDates": "Sin fechas disponibles",
|
|
798
816
|
"events.previewSectionTitle": "Especiales & próximas fechas",
|
|
817
|
+
"events.seeMoreDates": "Ver más fechas...",
|
|
799
818
|
// Event instances
|
|
800
819
|
"instances.title": "Seleccionar fecha",
|
|
801
820
|
"instances.noAvailable": "Sin fechas disponibles",
|
|
@@ -849,6 +868,10 @@ const es = {
|
|
|
849
868
|
"booking.maxSpotsReached": "Máximo {{count}} plazas disponibles.",
|
|
850
869
|
"booking.comment": "Comentario (opcional)",
|
|
851
870
|
"booking.commentPlaceholder": "Notas adicionales para la reserva...",
|
|
871
|
+
"booking.stepDate": "Fecha",
|
|
872
|
+
"booking.stepUpsells": "Extras",
|
|
873
|
+
"booking.stepDetails": "Datos",
|
|
874
|
+
"booking.stepPayment": "Pago",
|
|
852
875
|
// Booking summary
|
|
853
876
|
"summary.title": "Resumen de la reserva",
|
|
854
877
|
"summary.subtotal": "Subtotal:",
|
|
@@ -981,6 +1004,7 @@ const es = {
|
|
|
981
1004
|
"upsells.selectedPlural": "{{count}} extras seleccionados",
|
|
982
1005
|
"upsells.savePercent": "Ahorra {{percent}}%",
|
|
983
1006
|
"booking.paymentUnavailable": "El pago en línea no está disponible para esta reserva. Contáctanos para completarla.",
|
|
1007
|
+
"booking.depositNotConfigured": "El pago de depósito en línea no está disponible para este evento. Contáctanos para completar la reserva.",
|
|
984
1008
|
"upsells.spotsFree": "{{count}} plazas disponibles",
|
|
985
1009
|
"upsells.notAvailable": "No disponible",
|
|
986
1010
|
"upsells.reason.outOfStock": "{{productName}} está agotado",
|
|
@@ -1006,6 +1030,9 @@ const es = {
|
|
|
1006
1030
|
"promo.giftCode": "Tu codigo de regalo",
|
|
1007
1031
|
"promo.copied": "Copiado!",
|
|
1008
1032
|
"promo.copy": "Copiar",
|
|
1033
|
+
"trust.securePayment": "Pago seguro",
|
|
1034
|
+
"trust.paypal": "PayPal",
|
|
1035
|
+
"trust.stripe": "Stripe",
|
|
1009
1036
|
};
|
|
1010
1037
|
|
|
1011
1038
|
const pt = {
|
|
@@ -1076,6 +1103,7 @@ const pt = {
|
|
|
1076
1103
|
"events.availableFrom": "Disponível a partir de {{date}}",
|
|
1077
1104
|
"events.noAvailableDates": "Sem datas disponíveis",
|
|
1078
1105
|
"events.previewSectionTitle": "Especiais & próximas datas",
|
|
1106
|
+
"events.seeMoreDates": "Ver mais datas...",
|
|
1079
1107
|
// Event instances
|
|
1080
1108
|
"instances.title": "Selecionar data",
|
|
1081
1109
|
"instances.noAvailable": "Sem datas disponíveis",
|
|
@@ -1129,6 +1157,10 @@ const pt = {
|
|
|
1129
1157
|
"booking.maxSpotsReached": "Máximo {{count}} lugares disponíveis.",
|
|
1130
1158
|
"booking.comment": "Comentário (opcional)",
|
|
1131
1159
|
"booking.commentPlaceholder": "Notas adicionais para a reserva...",
|
|
1160
|
+
"booking.stepDate": "Data",
|
|
1161
|
+
"booking.stepUpsells": "Extras",
|
|
1162
|
+
"booking.stepDetails": "Dados",
|
|
1163
|
+
"booking.stepPayment": "Pagamento",
|
|
1132
1164
|
// Booking summary
|
|
1133
1165
|
"summary.title": "Resumo da reserva",
|
|
1134
1166
|
"summary.subtotal": "Subtotal:",
|
|
@@ -1261,6 +1293,7 @@ const pt = {
|
|
|
1261
1293
|
"upsells.selectedPlural": "{{count}} extras selecionados",
|
|
1262
1294
|
"upsells.savePercent": "Poupa {{percent}}%",
|
|
1263
1295
|
"booking.paymentUnavailable": "O pagamento online não está disponível para esta reserva. Contacta-nos para concluir a reserva.",
|
|
1296
|
+
"booking.depositNotConfigured": "O pagamento de depósito online não está disponível para este evento. Contacta-nos para concluir a reserva.",
|
|
1264
1297
|
"upsells.spotsFree": "{{count}} lugares disponíveis",
|
|
1265
1298
|
"upsells.notAvailable": "Não disponível",
|
|
1266
1299
|
"upsells.reason.outOfStock": "{{productName}} está esgotado",
|
|
@@ -1286,6 +1319,9 @@ const pt = {
|
|
|
1286
1319
|
"promo.giftCode": "O teu codigo de oferta",
|
|
1287
1320
|
"promo.copied": "Copiado!",
|
|
1288
1321
|
"promo.copy": "Copiar",
|
|
1322
|
+
"trust.securePayment": "Pagamento seguro",
|
|
1323
|
+
"trust.paypal": "PayPal",
|
|
1324
|
+
"trust.stripe": "Stripe",
|
|
1289
1325
|
};
|
|
1290
1326
|
|
|
1291
1327
|
const sv = {
|
|
@@ -1356,6 +1392,7 @@ const sv = {
|
|
|
1356
1392
|
"events.availableFrom": "Lediga platser från {{date}}",
|
|
1357
1393
|
"events.noAvailableDates": "Inga datum lediga",
|
|
1358
1394
|
"events.previewSectionTitle": "Specials & kommande datum",
|
|
1395
|
+
"events.seeMoreDates": "Se fler datum...",
|
|
1359
1396
|
// Event instances
|
|
1360
1397
|
"instances.title": "Välj datum",
|
|
1361
1398
|
"instances.noAvailable": "Inga tillgängliga datum",
|
|
@@ -1409,6 +1446,10 @@ const sv = {
|
|
|
1409
1446
|
"booking.maxSpotsReached": "Maximalt {{count}} platser tillgängliga.",
|
|
1410
1447
|
"booking.comment": "Kommentar (valfritt)",
|
|
1411
1448
|
"booking.commentPlaceholder": "Ytterligare anteckningar för bokningen...",
|
|
1449
|
+
"booking.stepDate": "Datum",
|
|
1450
|
+
"booking.stepUpsells": "Tillägg",
|
|
1451
|
+
"booking.stepDetails": "Uppgifter",
|
|
1452
|
+
"booking.stepPayment": "Betalning",
|
|
1412
1453
|
// Booking summary
|
|
1413
1454
|
"summary.title": "Bokningssammanfattning",
|
|
1414
1455
|
"summary.subtotal": "Delsumma:",
|
|
@@ -1541,6 +1582,7 @@ const sv = {
|
|
|
1541
1582
|
"upsells.selectedPlural": "{{count}} tillägg valda",
|
|
1542
1583
|
"upsells.savePercent": "Spara {{percent}}%",
|
|
1543
1584
|
"booking.paymentUnavailable": "Onlinebetalning är inte tillgänglig för denna bokning. Kontakta oss för att slutföra bokningen.",
|
|
1585
|
+
"booking.depositNotConfigured": "Online deposition är inte tillgänglig för detta evenemang. Kontakta oss för att slutföra bokningen.",
|
|
1544
1586
|
"upsells.spotsFree": "{{count}} platser lediga",
|
|
1545
1587
|
"upsells.notAvailable": "Inte tillgängligt",
|
|
1546
1588
|
"upsells.reason.outOfStock": "{{productName}} är slut i lager",
|
|
@@ -1566,6 +1608,9 @@ const sv = {
|
|
|
1566
1608
|
"promo.giftCode": "Din presentkod",
|
|
1567
1609
|
"promo.copied": "Kopierad!",
|
|
1568
1610
|
"promo.copy": "Kopiera",
|
|
1611
|
+
"trust.securePayment": "Säker betalning",
|
|
1612
|
+
"trust.paypal": "PayPal",
|
|
1613
|
+
"trust.stripe": "Stripe",
|
|
1569
1614
|
};
|
|
1570
1615
|
|
|
1571
1616
|
const SUPPORTED_LOCALES = ["de", "en", "es", "sv", "pt"];
|
|
@@ -7264,6 +7309,55 @@ function Accordion({ title, priceInfo, children, isOpen, onToggle, }) {
|
|
|
7264
7309
|
}, children: children }))] }));
|
|
7265
7310
|
}
|
|
7266
7311
|
|
|
7312
|
+
function FlowProgress({ currentStep, hasUpsellsStep }) {
|
|
7313
|
+
const t = useTranslations();
|
|
7314
|
+
const steps = hasUpsellsStep
|
|
7315
|
+
? [
|
|
7316
|
+
{ key: "date", label: t("booking.stepDate") },
|
|
7317
|
+
{ key: "upsells", label: t("booking.stepUpsells") },
|
|
7318
|
+
{ key: "details", label: t("booking.stepDetails") },
|
|
7319
|
+
{ key: "payment", label: t("booking.stepPayment") },
|
|
7320
|
+
]
|
|
7321
|
+
: [
|
|
7322
|
+
{ key: "date", label: t("booking.stepDate") },
|
|
7323
|
+
{ key: "details", label: t("booking.stepDetails") },
|
|
7324
|
+
{ key: "payment", label: t("booking.stepPayment") },
|
|
7325
|
+
];
|
|
7326
|
+
const activeIndex = Math.max(steps.findIndex((step) => step.key === currentStep), 0);
|
|
7327
|
+
const progressPercent = steps.length > 1 ? (activeIndex / (steps.length - 1)) * 100 : 100;
|
|
7328
|
+
return (jsxs("div", { style: {
|
|
7329
|
+
backgroundColor: "var(--bw-surface-color)",
|
|
7330
|
+
border: "1px solid var(--bw-border-color)",
|
|
7331
|
+
borderRadius: "var(--bw-border-radius)",
|
|
7332
|
+
padding: "12px 14px",
|
|
7333
|
+
marginBottom: "16px",
|
|
7334
|
+
}, children: [jsx("div", { style: {
|
|
7335
|
+
display: "flex",
|
|
7336
|
+
justifyContent: "space-between",
|
|
7337
|
+
alignItems: "center",
|
|
7338
|
+
marginBottom: "10px",
|
|
7339
|
+
fontFamily: "var(--bw-font-family)",
|
|
7340
|
+
gap: "8px",
|
|
7341
|
+
}, children: steps.map((step, index) => (jsxs("span", { style: {
|
|
7342
|
+
fontSize: "12px",
|
|
7343
|
+
fontWeight: 700,
|
|
7344
|
+
color: index <= activeIndex ? "var(--bw-highlight-color)" : "var(--bw-text-muted)",
|
|
7345
|
+
whiteSpace: "nowrap",
|
|
7346
|
+
}, children: [index + 1, ". ", step.label] }, step.key))) }), jsx("div", { style: {
|
|
7347
|
+
width: "100%",
|
|
7348
|
+
height: "8px",
|
|
7349
|
+
borderRadius: "999px",
|
|
7350
|
+
backgroundColor: "var(--bw-background-color)",
|
|
7351
|
+
border: "1px solid var(--bw-border-color)",
|
|
7352
|
+
overflow: "hidden",
|
|
7353
|
+
}, children: jsx("div", { style: {
|
|
7354
|
+
width: `${progressPercent}%`,
|
|
7355
|
+
height: "100%",
|
|
7356
|
+
backgroundColor: "var(--bw-highlight-color)",
|
|
7357
|
+
transition: "width 0.25s ease",
|
|
7358
|
+
} }) })] }));
|
|
7359
|
+
}
|
|
7360
|
+
|
|
7267
7361
|
// Spinner icon (kept local as it has animation style)
|
|
7268
7362
|
const IconSpinner = ({ size = 16, color = "currentColor" }) => (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: jsx("path", { d: "M21 12a9 9 0 1 1-6.219-8.56" }) }));
|
|
7269
7363
|
function VoucherInput({ config, orderValue, eventInstanceId, customerEmail, onVoucherValidated, appliedVouchers, onRemoveVoucher, disabled = false, }) {
|
|
@@ -11478,6 +11572,7 @@ function BookingForm({ config, eventDetails, stripePromise, onSuccess, onError,
|
|
|
11478
11572
|
const { locale } = useLocale();
|
|
11479
11573
|
const timezone = useTimezone();
|
|
11480
11574
|
const roundEnabled = systemConfig?.roundPricesEnabled !== false;
|
|
11575
|
+
const widgetPaymentMode = systemConfig?.widgetPaymentMode ?? "all";
|
|
11481
11576
|
const participantFieldsConfig = eventDetails.participantFieldsConfig ?? DEFAULT_PARTICIPANT_FIELDS_CONFIG;
|
|
11482
11577
|
const participantLevelOptions = eventDetails.participantLevelOptions ?? ["beginner", "advanced"];
|
|
11483
11578
|
const roundDiscountUp = (minorUnits) => Math.ceil(minorUnits / 100) * 100;
|
|
@@ -11491,6 +11586,7 @@ function BookingForm({ config, eventDetails, stripePromise, onSuccess, onError,
|
|
|
11491
11586
|
const [paymentOption, setPaymentOption] = useState(() => persistedState?.paymentOption ?? "deposit");
|
|
11492
11587
|
// Per-participant upsell selections: participantIndex -> array of upsell package IDs
|
|
11493
11588
|
const [participantUpsells, setParticipantUpsells] = useState(() => persistedState?.participantUpsells ?? {});
|
|
11589
|
+
const [showPaymentValidationHint, setShowPaymentValidationHint] = useState(false);
|
|
11494
11590
|
const wasOpenRef = useRef(false);
|
|
11495
11591
|
const form = useForm({
|
|
11496
11592
|
resolver: t(createBookingFormSchema(t$1, participantFieldsConfig)),
|
|
@@ -11614,12 +11710,22 @@ function BookingForm({ config, eventDetails, stripePromise, onSuccess, onError,
|
|
|
11614
11710
|
const totalDiscount = calculateTotalDiscount();
|
|
11615
11711
|
const totalAmount = calculateTotal();
|
|
11616
11712
|
const depositAmount = calculateDeposit();
|
|
11617
|
-
|
|
11618
|
-
|
|
11619
|
-
const
|
|
11620
|
-
const
|
|
11621
|
-
|
|
11622
|
-
|
|
11713
|
+
const allowsDepositInWidget = widgetPaymentMode === "all" || widgetPaymentMode === "deposits_only";
|
|
11714
|
+
const allowsFullInWidget = widgetPaymentMode === "all" || widgetPaymentMode === "full_only";
|
|
11715
|
+
const hasConfiguredDeposit = depositAmount > 0;
|
|
11716
|
+
const hasDepositChoice = allowsDepositInWidget && hasConfiguredDeposit && depositAmount < totalAmount;
|
|
11717
|
+
const depositsOnlyBlocked = widgetPaymentMode === "deposits_only" && !hasConfiguredDeposit;
|
|
11718
|
+
useEffect(() => {
|
|
11719
|
+
if (widgetPaymentMode === "deposits_only") {
|
|
11720
|
+
setPaymentOption("deposit");
|
|
11721
|
+
}
|
|
11722
|
+
else if (widgetPaymentMode === "full_only") {
|
|
11723
|
+
setPaymentOption("full");
|
|
11724
|
+
}
|
|
11725
|
+
}, [widgetPaymentMode]);
|
|
11726
|
+
const paymentAmount = allowsFullInWidget && (!hasDepositChoice || paymentOption === "full" || !allowsDepositInWidget)
|
|
11727
|
+
? totalAmount
|
|
11728
|
+
: Math.min(depositAmount, totalAmount);
|
|
11623
11729
|
// Convert per-participant upsells to UpsellSelection[] format for API
|
|
11624
11730
|
// Includes participantIndices to track which participants selected each upsell
|
|
11625
11731
|
const aggregatedUpsellSelections = useCallback(() => {
|
|
@@ -11778,7 +11884,39 @@ function BookingForm({ config, eventDetails, stripePromise, onSuccess, onError,
|
|
|
11778
11884
|
onClose();
|
|
11779
11885
|
};
|
|
11780
11886
|
// Footer navigation
|
|
11781
|
-
const
|
|
11887
|
+
const canContinueToPayment = isReadyForPayment();
|
|
11888
|
+
const handleContinueToPayment = async () => {
|
|
11889
|
+
if (canContinueToPayment && hasPaymentProvider) {
|
|
11890
|
+
setShowPaymentValidationHint(false);
|
|
11891
|
+
setCheckoutStep("payment");
|
|
11892
|
+
return;
|
|
11893
|
+
}
|
|
11894
|
+
const participantErrors = await form.trigger("participants");
|
|
11895
|
+
const customerErrors = await form.trigger(["customerName", "customerEmail", "acceptTerms"]);
|
|
11896
|
+
if (!participantErrors || !customerErrors) {
|
|
11897
|
+
setShowPaymentValidationHint(true);
|
|
11898
|
+
}
|
|
11899
|
+
};
|
|
11900
|
+
useEffect(() => {
|
|
11901
|
+
if (showPaymentValidationHint && canContinueToPayment) {
|
|
11902
|
+
setShowPaymentValidationHint(false);
|
|
11903
|
+
}
|
|
11904
|
+
}, [showPaymentValidationHint, canContinueToPayment]);
|
|
11905
|
+
const footerContent = (jsxs("div", { style: { width: "100%", display: "flex", flexDirection: "column", gap: "6px" }, children: [checkoutStep === "details" && (jsx("div", { style: {
|
|
11906
|
+
minHeight: "14px",
|
|
11907
|
+
fontSize: "11px",
|
|
11908
|
+
color: "var(--bw-error-color)",
|
|
11909
|
+
textAlign: "center",
|
|
11910
|
+
fontFamily: "var(--bw-font-family)",
|
|
11911
|
+
opacity: showPaymentValidationHint ? 1 : 0,
|
|
11912
|
+
transition: "opacity 0.15s ease",
|
|
11913
|
+
pointerEvents: "none",
|
|
11914
|
+
}, children: t$1("payment.fillRequired") })), jsxs("div", { style: { display: "flex", gap: "12px", width: "100%" }, children: [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" && (jsx("button", { type: "button", onClick: handleContinueToPayment, disabled: !hasPaymentProvider, style: mergeStyles(buttonStyles.primary, buttonStyles.fullWidth, !canContinueToPayment
|
|
11915
|
+
? {
|
|
11916
|
+
opacity: 0.55,
|
|
11917
|
+
cursor: "pointer",
|
|
11918
|
+
}
|
|
11919
|
+
: undefined), children: t$1("button.continueToPayment") }))] })] }));
|
|
11782
11920
|
if (!eventDetails.bookingOpen) {
|
|
11783
11921
|
return (jsx(Sidebar, { isOpen: isOpen, onClose: handleClose, title: t$1("booking.notPossible"), children: jsx("div", { style: {
|
|
11784
11922
|
display: "flex",
|
|
@@ -11795,7 +11933,7 @@ function BookingForm({ config, eventDetails, stripePromise, onSuccess, onError,
|
|
|
11795
11933
|
fontFamily: "var(--bw-font-family)",
|
|
11796
11934
|
}, children: t$1("booking.notPossible") }), jsx("p", { style: { color: "var(--bw-text-muted)", fontFamily: "var(--bw-font-family)" }, children: t$1("booking.notPossibleMessage") })] }) }) }));
|
|
11797
11935
|
}
|
|
11798
|
-
return (jsx(Sidebar, { isOpen: isOpen, onClose: handleClose, title: t$1("booking.title", { name: eventDetails.name }), footer: footerContent, children: jsxs("div", { className: "booking-widget-container", style: { padding: "16px" }, children: [checkoutStep === "details" && (jsxs(Fragment, { children: [jsxs("div", { style: cardStyles$1, children: [jsx("h2", { style: sectionHeaderStyles$1, children: t$1("booking.eventDetails") }), jsxs("div", { style: {
|
|
11936
|
+
return (jsx(Sidebar, { isOpen: isOpen, onClose: handleClose, title: t$1("booking.title", { name: eventDetails.name }), footer: footerContent, children: jsxs("div", { className: "booking-widget-container", style: { padding: "16px" }, children: [jsx(FlowProgress, { currentStep: checkoutStep === "details" ? "details" : "payment", hasUpsellsStep: upsells.length > 0 }), checkoutStep === "details" && (jsxs(Fragment, { children: [jsxs("div", { style: cardStyles$1, children: [jsx("h2", { style: sectionHeaderStyles$1, children: t$1("booking.eventDetails") }), jsxs("div", { style: {
|
|
11799
11937
|
display: "grid",
|
|
11800
11938
|
gridTemplateColumns: "repeat(auto-fit, minmax(200px, 1fr))",
|
|
11801
11939
|
gap: "12px",
|
|
@@ -11921,7 +12059,7 @@ function BookingForm({ config, eventDetails, stripePromise, onSuccess, onError,
|
|
|
11921
12059
|
}, children: t$1("summary.giftCard", { code: giftCard.code }) }), jsxs("span", { style: { color: "var(--bw-success-color)", fontFamily: "var(--bw-font-family)" }, children: ["-", formatCurrency(giftCard.balanceToUse || giftCard.discountAmount)] })] }, giftCard.code)))] })), jsxs("div", { style: {
|
|
11922
12060
|
borderTop: "1px solid var(--bw-border-color)",
|
|
11923
12061
|
paddingTop: "12px",
|
|
11924
|
-
}, children: [
|
|
12062
|
+
}, children: [hasDepositChoice && (jsxs("div", { style: {
|
|
11925
12063
|
display: "flex",
|
|
11926
12064
|
justifyContent: "space-between",
|
|
11927
12065
|
alignItems: "center",
|
|
@@ -11931,7 +12069,7 @@ function BookingForm({ config, eventDetails, stripePromise, onSuccess, onError,
|
|
|
11931
12069
|
color: "var(--bw-text-muted)",
|
|
11932
12070
|
fontFamily: "var(--bw-font-family)",
|
|
11933
12071
|
fontWeight: 500,
|
|
11934
|
-
}, children: formatCurrency(totalAmount) })] })),
|
|
12072
|
+
}, children: formatCurrency(totalAmount) })] })), hasDepositChoice && widgetPaymentMode === "all" && (jsxs("div", { style: {
|
|
11935
12073
|
display: "flex",
|
|
11936
12074
|
gap: "8px",
|
|
11937
12075
|
marginBottom: "16px",
|
|
@@ -11987,19 +12125,19 @@ function BookingForm({ config, eventDetails, stripePromise, onSuccess, onError,
|
|
|
11987
12125
|
alignItems: "center",
|
|
11988
12126
|
fontSize: "18px",
|
|
11989
12127
|
fontWeight: 600,
|
|
11990
|
-
}, children: [jsx("span", { style: { color: "var(--bw-text-color)", fontFamily: "var(--bw-font-family)" }, children:
|
|
12128
|
+
}, children: [jsx("span", { style: { color: "var(--bw-text-color)", fontFamily: "var(--bw-font-family)" }, children: hasDepositChoice && paymentOption === "deposit"
|
|
11991
12129
|
? t$1("summary.payToday")
|
|
11992
12130
|
: t$1("summary.totalAmount") }), jsx("span", { style: {
|
|
11993
12131
|
color: "var(--bw-highlight-color)",
|
|
11994
12132
|
fontFamily: "var(--bw-font-family)",
|
|
11995
12133
|
fontWeight: 700,
|
|
11996
|
-
}, children: formatCurrency(paymentAmount) })] }),
|
|
12134
|
+
}, children: formatCurrency(paymentAmount) })] }), hasDepositChoice && paymentOption === "deposit" && (jsx("div", { style: {
|
|
11997
12135
|
fontSize: "12px",
|
|
11998
12136
|
color: "var(--bw-text-muted)",
|
|
11999
12137
|
fontFamily: "var(--bw-font-family)",
|
|
12000
12138
|
marginTop: "8px",
|
|
12001
12139
|
textAlign: "right",
|
|
12002
|
-
}, children: t$1("summary.remainingOnSite", { amount: formatCurrency(totalAmount - depositAmount) }) }))] })] })] }), !hasPaymentProvider && (jsx("div", { style: cardStyles$1, children: jsx("p", { style: { ...errorTextStyles$1, margin: 0 }, children: t$1("booking.paymentUnavailable") }) })), hasPaymentProvider && (systemConfig?.paymentProvider === "mollie" ? (jsxs("div", { style: cardStyles$1, children: [jsx("h2", { style: { ...sectionHeaderStyles$1 }, children: t$1("summary.payment") }), 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 })] })) : (jsxs("div", { style: cardStyles$1, children: [jsx("h2", { style: { ...sectionHeaderStyles$1 }, children: t$1("summary.payment") }), 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() })] })))] }))] }) }));
|
|
12140
|
+
}, children: t$1("summary.remainingOnSite", { amount: formatCurrency(totalAmount - depositAmount) }) }))] })] })] }), depositsOnlyBlocked && (jsx("div", { style: cardStyles$1, children: jsx("p", { style: { ...errorTextStyles$1, margin: 0 }, children: t$1("booking.depositNotConfigured") }) })), !hasPaymentProvider && !depositsOnlyBlocked && (jsx("div", { style: cardStyles$1, children: jsx("p", { style: { ...errorTextStyles$1, margin: 0 }, children: t$1("booking.paymentUnavailable") }) })), hasPaymentProvider && !depositsOnlyBlocked && (systemConfig?.paymentProvider === "mollie" ? (jsxs("div", { style: cardStyles$1, children: [jsx("h2", { style: { ...sectionHeaderStyles$1 }, children: t$1("summary.payment") }), 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 })] })) : (jsxs("div", { style: cardStyles$1, children: [jsx("h2", { style: { ...sectionHeaderStyles$1 }, children: t$1("summary.payment") }), 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() })] })))] }))] }) }));
|
|
12003
12141
|
}
|
|
12004
12142
|
|
|
12005
12143
|
/**
|
|
@@ -12847,6 +12985,40 @@ const ImageCarousel = ({ images, eventName }) => {
|
|
|
12847
12985
|
} }))] }));
|
|
12848
12986
|
};
|
|
12849
12987
|
|
|
12988
|
+
function PaymentLogosStrip() {
|
|
12989
|
+
const logoHeight = 20;
|
|
12990
|
+
const logoCellStyle = {
|
|
12991
|
+
display: "inline-flex",
|
|
12992
|
+
alignItems: "center",
|
|
12993
|
+
justifyContent: "center",
|
|
12994
|
+
padding: "0px 6px",
|
|
12995
|
+
minHeight: "29px", // +7px from previous 22px
|
|
12996
|
+
borderRadius: "6px",
|
|
12997
|
+
};
|
|
12998
|
+
return (jsxs("div", { style: {
|
|
12999
|
+
padding: "6px 14px 10px 14px",
|
|
13000
|
+
backgroundColor: "color-mix(in srgb, var(--bw-text-color) 100%, var(--bw-surface-color) 18%)",
|
|
13001
|
+
display: "flex",
|
|
13002
|
+
alignItems: "center",
|
|
13003
|
+
justifyContent: "center",
|
|
13004
|
+
borderRadius: "var(--bw-border-radius)",
|
|
13005
|
+
gap: "4px",
|
|
13006
|
+
flexWrap: "wrap",
|
|
13007
|
+
width: "fit-content",
|
|
13008
|
+
margin: "20px auto",
|
|
13009
|
+
}, children: [jsxs("span", { style: logoCellStyle, children: [jsx("span", { style: { color: "#003087", fontSize: "14px", fontWeight: 800, fontFamily: "Arial, sans-serif", lineHeight: 1 }, children: "Pay" }), jsx("span", { style: { color: "#009cde", fontSize: "14px", fontWeight: 800, fontFamily: "Arial, sans-serif", lineHeight: 1 }, children: "Pal" })] }), jsx("span", { style: logoCellStyle, children: jsxs("svg", { width: "34", height: logoHeight, viewBox: "0 0 34 20", "aria-label": "Maestro", children: [jsx("circle", { cx: "13", cy: "10", r: "8", fill: "#eb001b" }), jsx("circle", { cx: "21", cy: "10", r: "8", fill: "#00a2e5", fillOpacity: "0.92" })] }) }), jsx("span", { style: logoCellStyle, children: jsx("span", { style: { color: "#1434CB", fontSize: "14px", fontStyle: "italic", fontWeight: 800, fontFamily: "Arial, sans-serif", lineHeight: 1 }, children: "VISA" }) }), jsx("span", { style: logoCellStyle, children: jsx("span", { style: { color: "purple", fontSize: "14px", fontWeight: 800, fontFamily: "Arial, sans-serif", lineHeight: 1 }, children: "Klarna" }) }), jsx("span", { style: logoCellStyle, children: jsxs("svg", { width: "74", height: logoHeight, viewBox: "0 0 74 20", "aria-label": "Amazon Pay", children: [jsx("text", { x: "0", y: "14", fontSize: "12", fill: "#111827", fontFamily: "Arial, sans-serif", children: "amazon" }), jsx("text", { x: "45", y: "14", fontSize: "12", fill: "#111827", fontFamily: "Arial, sans-serif", children: "pay" }), jsx("path", { d: "M5 15 C17 20, 35 20, 48 15", stroke: "#f59e0b", strokeWidth: "1.6", fill: "none", strokeLinecap: "round" })] }) }), jsxs("span", { style: logoCellStyle, children: [jsx("span", { style: {
|
|
13010
|
+
fontSize: "16px",
|
|
13011
|
+
fontWeight: 800,
|
|
13012
|
+
fontFamily: "Arial, sans-serif",
|
|
13013
|
+
lineHeight: 1,
|
|
13014
|
+
background: "conic-gradient(from 25deg, #4285F4 0 24%, #DB4437 24% 48%, #F4B400 48% 73%, #0F9D58 73% 100%)",
|
|
13015
|
+
WebkitBackgroundClip: "text",
|
|
13016
|
+
backgroundClip: "text",
|
|
13017
|
+
color: "transparent",
|
|
13018
|
+
WebkitTextFillColor: "transparent",
|
|
13019
|
+
}, children: "G" }), jsx("span", { style: { color: "#5f6368", fontSize: "14px", fontWeight: 600, fontFamily: "Arial, sans-serif", marginLeft: "3px", lineHeight: 1 }, children: "Pay" })] }), jsx("span", { style: logoCellStyle, children: jsxs("svg", { width: "60", height: logoHeight, viewBox: "0 0 60 20", "aria-label": "Apple Pay", children: [jsx("text", { x: "0", y: "14.5", fontSize: "14.5", fill: "#111827", fontFamily: "-apple-system, BlinkMacSystemFont, Arial, sans-serif", children: "\uF8FF" }), jsx("text", { x: "14", y: "14.5", fontSize: "14.5", fill: "#111827", fontFamily: "-apple-system, BlinkMacSystemFont, Arial, sans-serif", children: "Pay" })] }) })] }));
|
|
13020
|
+
}
|
|
13021
|
+
|
|
12850
13022
|
function VoucherPurchaseCard({ config, minEventPrice, fallbackImages = [], onClick, standalone = false, }) {
|
|
12851
13023
|
const t = useTranslations();
|
|
12852
13024
|
const [activeSlideIndex, setActiveSlideIndex] = useState(0);
|
|
@@ -13966,7 +14138,7 @@ function EventTypeSelection({ eventTypes, onEventTypeSelect, onInstancePreview,
|
|
|
13966
14138
|
display: "flex",
|
|
13967
14139
|
flexDirection: "column",
|
|
13968
14140
|
justifyContent: "space-between",
|
|
13969
|
-
height: "
|
|
14141
|
+
height: "540px",
|
|
13970
14142
|
}, children: [jsxs("div", { children: [jsx("h2", { className: "event-type-title", style: {
|
|
13971
14143
|
fontSize: "clamp(1.1rem, 2.5vw, 24px)",
|
|
13972
14144
|
fontWeight: 700,
|
|
@@ -14036,19 +14208,9 @@ function EventTypeSelection({ eventTypes, onEventTypeSelect, onInstancePreview,
|
|
|
14036
14208
|
}) }) })) : (jsx("div", { className: "event-type-desc", style: {
|
|
14037
14209
|
margin: "10px 0",
|
|
14038
14210
|
height: "7.5em", // Same height as highlights
|
|
14039
|
-
}, children: "\u00A0" })) })] }), jsxs("div", { children: [
|
|
14040
|
-
fontWeight: 700,
|
|
14041
|
-
color: "var(--bw-text-color)",
|
|
14042
|
-
fontFamily: "var(--bw-font-family)",
|
|
14043
|
-
textAlign: "right",
|
|
14044
|
-
}, children: jsx("span", { children: formatDurationInfo(eventType.durationInfo, t) }) }), jsx("div", { className: "event-type-price", style: {
|
|
14045
|
-
fontSize: "clamp(1.72rem, 4vw, 32px)",
|
|
14046
|
-
fontWeight: 700,
|
|
14047
|
-
color: "var(--bw-text-color)",
|
|
14048
|
-
fontFamily: "var(--bw-font-family)",
|
|
14049
|
-
textAlign: "right",
|
|
14050
|
-
}, children: jsxs("span", { children: [t("common.from"), " ", formatCurrency(eventType.minPrice)] }) })] }), (() => {
|
|
14211
|
+
}, children: "\u00A0" })) })] }), jsxs("div", { children: [(() => {
|
|
14051
14212
|
const preview = eventType.cardPreview ?? [];
|
|
14213
|
+
const hasMoreDates = eventType.availableInstancesCount > preview.length;
|
|
14052
14214
|
return (jsxs("div", { style: {
|
|
14053
14215
|
marginTop: "12px",
|
|
14054
14216
|
borderTop: "1px solid var(--bw-border-color)",
|
|
@@ -14082,8 +14244,33 @@ function EventTypeSelection({ eventTypes, onEventTypeSelect, onInstancePreview,
|
|
|
14082
14244
|
transition: "background 0.15s",
|
|
14083
14245
|
boxSizing: "border-box",
|
|
14084
14246
|
}, children: [jsxs("span", { style: { whiteSpace: "nowrap", display: "flex", alignItems: "center", gap: "3px" }, children: [item.isSpecial && (jsx("span", { style: { color: "var(--bw-highlight-color)", fontSize: "11px", lineHeight: 1 }, children: "\u2605" })), formatWeekday(item.startTime, timezone, locale), " ", formatDate(item.startTime, timezone, locale)] }), jsx("span", { style: { overflow: "hidden", textOverflow: "ellipsis", whiteSpace: "nowrap", opacity: 0.75 }, children: item.name }), jsxs("span", { style: { display: "flex", alignItems: "center", gap: "4px", whiteSpace: "nowrap" }, children: [hasDiscount && (jsx("span", { style: { textDecoration: "line-through", opacity: 0.55, fontSize: "11px" }, children: formatCurrency(item.basePrice) })), jsx("span", { style: { fontWeight: 700, color: item.isSpecial ? "var(--bw-highlight-color)" : "var(--bw-text-color)" }, children: formatCurrency(item.price) })] }), item.specialDescription ? (jsx(InfoBadge, { text: item.specialDescription })) : (jsx("span", {}))] }, item.id));
|
|
14085
|
-
}) })
|
|
14086
|
-
|
|
14247
|
+
}) }), hasMoreDates && (jsx("button", { type: "button", onClick: (e) => {
|
|
14248
|
+
e.stopPropagation();
|
|
14249
|
+
onEventTypeSelect(eventType);
|
|
14250
|
+
}, style: {
|
|
14251
|
+
marginTop: "6px",
|
|
14252
|
+
padding: 0,
|
|
14253
|
+
border: "none",
|
|
14254
|
+
background: "none",
|
|
14255
|
+
color: "var(--bw-highlight-color)",
|
|
14256
|
+
fontFamily: "var(--bw-font-family)",
|
|
14257
|
+
fontSize: "13px",
|
|
14258
|
+
fontWeight: 600,
|
|
14259
|
+
cursor: "pointer",
|
|
14260
|
+
textDecoration: "underline",
|
|
14261
|
+
}, children: t("events.seeMoreDates") }))] }));
|
|
14262
|
+
})(), jsxs("div", { style: { marginBottom: "16px" }, children: [jsx("div", { className: "event-type-price", style: {
|
|
14263
|
+
fontWeight: 700,
|
|
14264
|
+
color: "var(--bw-text-color)",
|
|
14265
|
+
fontFamily: "var(--bw-font-family)",
|
|
14266
|
+
textAlign: "right",
|
|
14267
|
+
}, children: jsx("span", { children: formatDurationInfo(eventType.durationInfo, t) }) }), jsx("div", { className: "event-type-price", style: {
|
|
14268
|
+
fontSize: "clamp(1.72rem, 4vw, 32px)",
|
|
14269
|
+
fontWeight: 700,
|
|
14270
|
+
color: "var(--bw-text-color)",
|
|
14271
|
+
fontFamily: "var(--bw-font-family)",
|
|
14272
|
+
textAlign: "right",
|
|
14273
|
+
}, children: jsxs("span", { children: [t("common.from"), " ", formatCurrency(eventType.minPrice)] }) })] }), jsxs("div", { style: {
|
|
14087
14274
|
display: "flex",
|
|
14088
14275
|
justifyContent: "flex-end",
|
|
14089
14276
|
alignItems: "center",
|
|
@@ -14141,7 +14328,7 @@ function EventTypeSelection({ eventTypes, onEventTypeSelect, onInstancePreview,
|
|
|
14141
14328
|
fontFamily: "var(--bw-font-family)",
|
|
14142
14329
|
boxShadow: "var(--bw-shadow-md)",
|
|
14143
14330
|
}, children: t("events.soldOut") }) }))] }, eventType.id));
|
|
14144
|
-
}) }) })), jsx(EventTypeDetailsDialog, { isOpen: detailsDialogOpen, onClose: handleCloseDetails, eventType: selectedEventTypeForDetails, onEventTypeSelect: onEventTypeSelect })] }));
|
|
14331
|
+
}) }) })), jsx(PaymentLogosStrip, {}), jsx(EventTypeDetailsDialog, { isOpen: detailsDialogOpen, onClose: handleCloseDetails, eventType: selectedEventTypeForDetails, onEventTypeSelect: onEventTypeSelect })] }));
|
|
14145
14332
|
}
|
|
14146
14333
|
|
|
14147
14334
|
const getAllocationBadgeInfo = (availableSpots, maxParticipants, t) => {
|
|
@@ -14268,7 +14455,7 @@ const PriceDisplay = ({ price, yearPrices, t }) => {
|
|
|
14268
14455
|
boxShadow: displayInfo ? "0 2px 4px rgba(0, 0, 0, 0.2)" : "none",
|
|
14269
14456
|
}, children: formatCurrency(price) }));
|
|
14270
14457
|
};
|
|
14271
|
-
function EventInstanceSelection({ eventInstances, selectedEventType, onEventInstanceSelect, onBackToEventTypes, isOpen, onClose, isLoadingEventInstances = false, isLoadingEventDetails = false, }) {
|
|
14458
|
+
function EventInstanceSelection({ eventInstances, selectedEventType, onEventInstanceSelect, onBackToEventTypes, isOpen, onClose, isLoadingEventInstances = false, isLoadingEventDetails = false, hasUpsellsStep = false, }) {
|
|
14272
14459
|
const t = useTranslations();
|
|
14273
14460
|
const { locale } = useLocale();
|
|
14274
14461
|
const timezone = useTimezone();
|
|
@@ -14334,88 +14521,88 @@ function EventInstanceSelection({ eventInstances, selectedEventType, onEventInst
|
|
|
14334
14521
|
const footerNav = (jsx("button", { type: "button", onClick: handleClose, style: mergeStyles(buttonStyles.secondary, buttonStyles.fullWidth), children: t("common.back") }));
|
|
14335
14522
|
// Show loading state first if we're loading event instances
|
|
14336
14523
|
if (isLoadingEventInstances) {
|
|
14337
|
-
return (jsx(Sidebar, { isOpen: isOpen, onClose: handleClose, title: `${selectedEventType?.name}`, footer: footerNav, children:
|
|
14338
|
-
|
|
14339
|
-
|
|
14340
|
-
|
|
14341
|
-
|
|
14342
|
-
|
|
14343
|
-
|
|
14344
|
-
|
|
14345
|
-
|
|
14346
|
-
padding: "16px 20px",
|
|
14347
|
-
cursor: "pointer",
|
|
14348
|
-
borderBottom: "1px solid var(--bw-border-color)",
|
|
14349
|
-
}, children: [jsxs("div", { style: { display: "flex", alignItems: "center", gap: "12px" }, children: [jsx("div", { style: {
|
|
14350
|
-
width: "80px",
|
|
14351
|
-
height: "20px",
|
|
14352
|
-
backgroundColor: "var(--bw-border-color)",
|
|
14353
|
-
borderRadius: "var(--bw-border-radius-small)",
|
|
14354
|
-
} }), jsx("div", { style: {
|
|
14355
|
-
width: "16px",
|
|
14356
|
-
height: "16px",
|
|
14357
|
-
backgroundColor: "var(--bw-border-color)",
|
|
14358
|
-
borderRadius: "var(--bw-border-radius-small)",
|
|
14359
|
-
} })] }), jsx("div", { style: {
|
|
14360
|
-
width: "70px",
|
|
14361
|
-
height: "16px",
|
|
14362
|
-
backgroundColor: "var(--bw-highlight-color)",
|
|
14363
|
-
opacity: 0.3,
|
|
14364
|
-
borderRadius: "var(--bw-border-radius-small)",
|
|
14365
|
-
} })] }), jsx("div", { style: {
|
|
14366
|
-
display: "flex",
|
|
14367
|
-
flexDirection: "column",
|
|
14368
|
-
gap: "12px",
|
|
14369
|
-
paddingTop: "12px",
|
|
14370
|
-
padding: "12px 20px 20px 20px",
|
|
14371
|
-
}, children: Array.from({ length: 2 }).map((_, eventIdx) => (jsxs("div", { style: {
|
|
14372
|
-
position: "relative",
|
|
14373
|
-
border: "1px solid var(--bw-border-color)",
|
|
14374
|
-
backgroundColor: "var(--bw-surface-color)",
|
|
14375
|
-
borderRadius: "var(--bw-border-radius)",
|
|
14524
|
+
return (jsx(Sidebar, { isOpen: isOpen, onClose: handleClose, title: `${selectedEventType?.name}`, footer: footerNav, children: jsxs("div", { style: { padding: "24px" }, children: [jsx(FlowProgress, { currentStep: "date", hasUpsellsStep: hasUpsellsStep }), jsx("div", { style: { display: "flex", flexDirection: "column", gap: "20px" }, children: Array.from({ length: 3 }).map((_, idx) => (jsxs("div", { className: "skeleton-shimmer", style: {
|
|
14525
|
+
backgroundColor: "var(--bw-surface-color)",
|
|
14526
|
+
border: "1px solid var(--bw-border-color)",
|
|
14527
|
+
borderRadius: "var(--bw-border-radius)",
|
|
14528
|
+
overflow: "hidden",
|
|
14529
|
+
}, children: [jsxs("div", { style: {
|
|
14530
|
+
display: "flex",
|
|
14531
|
+
justifyContent: "space-between",
|
|
14532
|
+
alignItems: "center",
|
|
14376
14533
|
padding: "16px 20px",
|
|
14377
|
-
|
|
14378
|
-
|
|
14379
|
-
|
|
14380
|
-
|
|
14381
|
-
|
|
14382
|
-
alignItems: "flex-start",
|
|
14383
|
-
gap: "12px",
|
|
14384
|
-
marginBottom: "4px",
|
|
14385
|
-
}, children: [jsxs("div", { style: { display: "flex", alignItems: "flex-start", gap: "12px" }, children: [jsx("div", { style: {
|
|
14386
|
-
width: "40px",
|
|
14387
|
-
height: "40px",
|
|
14388
|
-
backgroundColor: "var(--bw-background-color)",
|
|
14389
|
-
border: "1px solid var(--bw-border-color)",
|
|
14390
|
-
borderTopWidth: "4px",
|
|
14391
|
-
borderRadius: "var(--bw-border-radius-small)",
|
|
14392
|
-
} }), jsxs("div", { style: { display: "flex", flexDirection: "column", gap: "4px" }, children: [jsx("div", { style: {
|
|
14393
|
-
width: "80px",
|
|
14394
|
-
height: "16px",
|
|
14395
|
-
backgroundColor: "var(--bw-border-color)",
|
|
14396
|
-
borderRadius: "var(--bw-border-radius)",
|
|
14397
|
-
} }), jsx("div", { style: {
|
|
14398
|
-
width: "60px",
|
|
14399
|
-
height: "14px",
|
|
14400
|
-
backgroundColor: "var(--bw-border-color)",
|
|
14401
|
-
borderRadius: "var(--bw-border-radius)",
|
|
14402
|
-
} })] })] }), jsx("div", { style: { display: "flex", flexDirection: "column", alignItems: "flex-end" }, children: jsx("div", { style: {
|
|
14403
|
-
width: "70px",
|
|
14404
|
-
height: "20px",
|
|
14405
|
-
backgroundColor: "var(--bw-highlight-color)",
|
|
14406
|
-
opacity: 0.3,
|
|
14407
|
-
borderRadius: "var(--bw-border-radius)",
|
|
14408
|
-
} }) })] }), jsxs("div", { style: { display: "flex", alignItems: "center", gap: "8px", marginBottom: "4px" }, children: [jsx("div", { style: {
|
|
14409
|
-
width: "120px",
|
|
14410
|
-
height: "16px",
|
|
14534
|
+
cursor: "pointer",
|
|
14535
|
+
borderBottom: "1px solid var(--bw-border-color)",
|
|
14536
|
+
}, children: [jsxs("div", { style: { display: "flex", alignItems: "center", gap: "12px" }, children: [jsx("div", { style: {
|
|
14537
|
+
width: "80px",
|
|
14538
|
+
height: "20px",
|
|
14411
14539
|
backgroundColor: "var(--bw-border-color)",
|
|
14412
|
-
borderRadius: "var(--bw-border-radius)",
|
|
14540
|
+
borderRadius: "var(--bw-border-radius-small)",
|
|
14413
14541
|
} }), jsx("div", { style: {
|
|
14414
|
-
width: "
|
|
14415
|
-
height: "
|
|
14542
|
+
width: "16px",
|
|
14543
|
+
height: "16px",
|
|
14416
14544
|
backgroundColor: "var(--bw-border-color)",
|
|
14417
|
-
borderRadius: "
|
|
14418
|
-
} })] })
|
|
14545
|
+
borderRadius: "var(--bw-border-radius-small)",
|
|
14546
|
+
} })] }), jsx("div", { style: {
|
|
14547
|
+
width: "70px",
|
|
14548
|
+
height: "16px",
|
|
14549
|
+
backgroundColor: "var(--bw-highlight-color)",
|
|
14550
|
+
opacity: 0.3,
|
|
14551
|
+
borderRadius: "var(--bw-border-radius-small)",
|
|
14552
|
+
} })] }), jsx("div", { style: {
|
|
14553
|
+
display: "flex",
|
|
14554
|
+
flexDirection: "column",
|
|
14555
|
+
gap: "12px",
|
|
14556
|
+
paddingTop: "12px",
|
|
14557
|
+
padding: "12px 20px 20px 20px",
|
|
14558
|
+
}, children: Array.from({ length: 2 }).map((_, eventIdx) => (jsxs("div", { style: {
|
|
14559
|
+
position: "relative",
|
|
14560
|
+
border: "1px solid var(--bw-border-color)",
|
|
14561
|
+
backgroundColor: "var(--bw-surface-color)",
|
|
14562
|
+
borderRadius: "var(--bw-border-radius)",
|
|
14563
|
+
padding: "16px 20px",
|
|
14564
|
+
fontFamily: "var(--bw-font-family)",
|
|
14565
|
+
}, children: [jsxs("div", { style: {
|
|
14566
|
+
display: "flex",
|
|
14567
|
+
justifyContent: "space-between",
|
|
14568
|
+
width: "100%",
|
|
14569
|
+
alignItems: "flex-start",
|
|
14570
|
+
gap: "12px",
|
|
14571
|
+
marginBottom: "4px",
|
|
14572
|
+
}, children: [jsxs("div", { style: { display: "flex", alignItems: "flex-start", gap: "12px" }, children: [jsx("div", { style: {
|
|
14573
|
+
width: "40px",
|
|
14574
|
+
height: "40px",
|
|
14575
|
+
backgroundColor: "var(--bw-background-color)",
|
|
14576
|
+
border: "1px solid var(--bw-border-color)",
|
|
14577
|
+
borderTopWidth: "4px",
|
|
14578
|
+
borderRadius: "var(--bw-border-radius-small)",
|
|
14579
|
+
} }), jsxs("div", { style: { display: "flex", flexDirection: "column", gap: "4px" }, children: [jsx("div", { style: {
|
|
14580
|
+
width: "80px",
|
|
14581
|
+
height: "16px",
|
|
14582
|
+
backgroundColor: "var(--bw-border-color)",
|
|
14583
|
+
borderRadius: "var(--bw-border-radius)",
|
|
14584
|
+
} }), jsx("div", { style: {
|
|
14585
|
+
width: "60px",
|
|
14586
|
+
height: "14px",
|
|
14587
|
+
backgroundColor: "var(--bw-border-color)",
|
|
14588
|
+
borderRadius: "var(--bw-border-radius)",
|
|
14589
|
+
} })] })] }), jsx("div", { style: { display: "flex", flexDirection: "column", alignItems: "flex-end" }, children: jsx("div", { style: {
|
|
14590
|
+
width: "70px",
|
|
14591
|
+
height: "20px",
|
|
14592
|
+
backgroundColor: "var(--bw-highlight-color)",
|
|
14593
|
+
opacity: 0.3,
|
|
14594
|
+
borderRadius: "var(--bw-border-radius)",
|
|
14595
|
+
} }) })] }), jsxs("div", { style: { display: "flex", alignItems: "center", gap: "8px", marginBottom: "4px" }, children: [jsx("div", { style: {
|
|
14596
|
+
width: "120px",
|
|
14597
|
+
height: "16px",
|
|
14598
|
+
backgroundColor: "var(--bw-border-color)",
|
|
14599
|
+
borderRadius: "var(--bw-border-radius)",
|
|
14600
|
+
} }), jsx("div", { style: {
|
|
14601
|
+
width: "50px",
|
|
14602
|
+
height: "20px",
|
|
14603
|
+
backgroundColor: "var(--bw-border-color)",
|
|
14604
|
+
borderRadius: "16px",
|
|
14605
|
+
} })] })] }, eventIdx))) })] }, idx))) })] }) }));
|
|
14419
14606
|
}
|
|
14420
14607
|
// Show empty state only if not loading and no event instances
|
|
14421
14608
|
if (eventInstances.length === 0) {
|
|
@@ -14434,116 +14621,116 @@ function EventInstanceSelection({ eventInstances, selectedEventType, onEventInst
|
|
|
14434
14621
|
fontFamily: "var(--bw-font-family)",
|
|
14435
14622
|
}, children: t("instances.noAvailable") }), jsx("p", { style: { color: "var(--bw-text-muted)", fontFamily: "var(--bw-font-family)" }, children: t("instances.noAvailableMessage") })] }) }) }));
|
|
14436
14623
|
}
|
|
14437
|
-
return (jsx(Sidebar, { isOpen: isOpen, onClose: handleClose, title: `${selectedEventType?.name}`, footer: footerNav, children:
|
|
14438
|
-
|
|
14439
|
-
|
|
14440
|
-
|
|
14441
|
-
|
|
14442
|
-
|
|
14443
|
-
|
|
14444
|
-
|
|
14445
|
-
|
|
14446
|
-
|
|
14447
|
-
|
|
14448
|
-
|
|
14449
|
-
|
|
14450
|
-
|
|
14451
|
-
|
|
14452
|
-
|
|
14453
|
-
|
|
14454
|
-
|
|
14455
|
-
|
|
14456
|
-
|
|
14457
|
-
|
|
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
|
-
|
|
14624
|
+
return (jsx(Sidebar, { isOpen: isOpen, onClose: handleClose, title: `${selectedEventType?.name}`, footer: footerNav, children: jsxs("div", { style: { padding: "20px 10px" }, children: [jsx(FlowProgress, { currentStep: "date", hasUpsellsStep: hasUpsellsStep }), jsx("div", { style: { display: "flex", flexDirection: "column", gap: "16px" }, children: monthYearGroups.map(({ key, label, events, minPrice, year }, idx) => {
|
|
14625
|
+
const monthPriceDisplayInfo = getMonthPriceDisplayInfo(minPrice);
|
|
14626
|
+
return (jsxs(Fragment$1, { children: [idx > 0 && monthYearGroups[idx - 1].year !== year && (jsx("div", { style: { height: "1px", backgroundColor: "var(--bw-border-color)", margin: "4px 0" } })), jsx(Accordion, { title: label, priceInfo: jsx("div", { style: {
|
|
14627
|
+
fontSize: "16px",
|
|
14628
|
+
fontWeight: 500,
|
|
14629
|
+
marginLeft: "auto",
|
|
14630
|
+
padding: "4px 8px",
|
|
14631
|
+
borderRadius: "var(--bw-border-radius-small)",
|
|
14632
|
+
backgroundColor: monthPriceDisplayInfo
|
|
14633
|
+
? monthPriceDisplayInfo.backgroundColor
|
|
14634
|
+
: "#14532d",
|
|
14635
|
+
color: monthPriceDisplayInfo
|
|
14636
|
+
? monthPriceDisplayInfo.textColor
|
|
14637
|
+
: "#4ade80",
|
|
14638
|
+
boxShadow: monthPriceDisplayInfo
|
|
14639
|
+
? "0 2px 4px rgba(0, 0, 0, 0.2)"
|
|
14640
|
+
: undefined,
|
|
14641
|
+
}, children: `${t("common.from")} ${formatCurrency(minPrice)}` }), isOpen: openGroups.has(key), onToggle: () => toggleGroup(key), children: jsx("div", { style: { display: "flex", flexDirection: "column", gap: "12px", paddingTop: "12px" }, children: events.map((event) => {
|
|
14642
|
+
const availableSpots = event.maxParticipants - event.participantCount;
|
|
14643
|
+
const isFullyBooked = availableSpots === 0;
|
|
14644
|
+
const startDate = new Date(event.startTime);
|
|
14645
|
+
const isPastEvent = today.toISOString() >= startDate.toISOString();
|
|
14646
|
+
const isDisabled = isFullyBooked || isPastEvent || !event.bookingOpen;
|
|
14647
|
+
return (jsxs("div", { style: {
|
|
14648
|
+
position: "relative",
|
|
14649
|
+
border: "1px solid var(--bw-border-color)",
|
|
14650
|
+
backgroundColor: "var(--bw-surface-color)",
|
|
14651
|
+
borderRadius: "var(--bw-border-radius)",
|
|
14652
|
+
padding: "16px 10px",
|
|
14653
|
+
transition: "all 0.2s ease",
|
|
14654
|
+
fontFamily: "var(--bw-font-family)",
|
|
14655
|
+
opacity: isDisabled ? 0.3 : 1,
|
|
14656
|
+
filter: isDisabled ? "grayscale(40%)" : "none",
|
|
14657
|
+
cursor: isDisabled ? "not-allowed" : "pointer",
|
|
14658
|
+
}, onClick: () => {
|
|
14659
|
+
if (!isDisabled) {
|
|
14660
|
+
handleEventInstanceSelect(event);
|
|
14661
|
+
}
|
|
14662
|
+
}, children: [selectedEventInstanceId === event.id && isLoadingEventDetails && (jsx("div", { style: {
|
|
14663
|
+
position: "absolute",
|
|
14664
|
+
inset: 0,
|
|
14665
|
+
backgroundColor: "rgba(15, 23, 42, 0.8)",
|
|
14666
|
+
borderRadius: "var(--bw-border-radius)",
|
|
14667
|
+
display: "flex",
|
|
14668
|
+
alignItems: "center",
|
|
14669
|
+
justifyContent: "center",
|
|
14670
|
+
}, children: jsx("div", { style: {
|
|
14671
|
+
width: "32px",
|
|
14672
|
+
height: "32px",
|
|
14673
|
+
color: "var(--bw-highlight-color)",
|
|
14674
|
+
opacity: 0.8,
|
|
14675
|
+
fontSize: "32px",
|
|
14676
|
+
}, children: spinner() }) })), jsx(SpecialPriceBadge, { price: event.price, yearPrices: yearPrices, t: t }), jsx(AllocationBadge, { availableSpots: availableSpots, maxParticipants: event.maxParticipants, t: t }), jsxs("div", { style: {
|
|
14677
|
+
display: "flex",
|
|
14678
|
+
justifyContent: "space-between",
|
|
14679
|
+
width: "100%",
|
|
14680
|
+
alignItems: "flex-start",
|
|
14681
|
+
gap: "12px",
|
|
14682
|
+
marginBottom: "4px",
|
|
14683
|
+
}, children: [jsxs("div", { style: { display: "flex", alignItems: "flex-start", gap: "12px" }, children: [jsx("div", { style: {
|
|
14684
|
+
fontSize: "16px",
|
|
14685
|
+
transition: "all 0.2s ease",
|
|
14686
|
+
borderRadius: "var(--bw-border-radius-small)",
|
|
14687
|
+
borderTop: "4px solid var(--bw-border-color)",
|
|
14688
|
+
border: "1px solid var(--bw-border-color)",
|
|
14689
|
+
width: "40px",
|
|
14690
|
+
height: "40px",
|
|
14691
|
+
display: "flex",
|
|
14692
|
+
alignItems: "center",
|
|
14693
|
+
justifyContent: "center",
|
|
14694
|
+
fontWeight: 700,
|
|
14695
|
+
color: "var(--bw-text-color)",
|
|
14696
|
+
backgroundColor: "var(--bw-background-color)",
|
|
14697
|
+
}, children: startDate.getDate() }), jsxs("div", { style: {
|
|
14698
|
+
fontSize: "16px",
|
|
14699
|
+
color: "var(--bw-text-color)",
|
|
14700
|
+
display: "flex",
|
|
14701
|
+
flexDirection: "column",
|
|
14702
|
+
alignItems: "flex-start",
|
|
14703
|
+
justifyContent: "flex-start",
|
|
14704
|
+
lineHeight: 1.25,
|
|
14705
|
+
}, children: [jsxs("div", { children: [jsx("span", { style: { fontWeight: 600, marginBottom: "2px", textTransform: "capitalize" }, children: formatWeekday(event.startTime, timezone, locale) }), formatWeekday(event.startTime, timezone, locale) !==
|
|
14706
|
+
formatWeekday(event.endTime, timezone, locale) && (jsxs(Fragment, { children: [jsx("span", { style: { color: "var(--bw-text-muted)", fontSize: "14px" }, children: " - " }), jsx("span", { style: { fontWeight: 600, marginBottom: "2px", textTransform: "capitalize" }, children: formatWeekday(event.endTime, timezone, locale) })] }))] }), jsx("div", { children: formatWeekday(event.startTime, timezone, locale) ===
|
|
14707
|
+
formatWeekday(event.endTime, timezone, locale) ? (jsxs(Fragment, { children: [jsx("span", { style: { color: "var(--bw-text-muted)", fontSize: "14px" }, children: formatTime(event.startTime, timezone, locale) }), jsx("span", { style: { color: "var(--bw-text-muted)", fontSize: "14px" }, children: " - " }), jsx("span", { style: { color: "var(--bw-text-muted)", fontSize: "14px" }, children: formatTime(event.endTime, timezone, locale) })] })) : (jsxs("span", { style: { color: "var(--bw-text-muted)", fontSize: "14px" }, children: [formatTime(event.startTime, timezone, locale), " ", t("instances.oclock")] })) })] }), jsxs("span", { style: {
|
|
14708
|
+
fontSize: "12px",
|
|
14709
|
+
fontWeight: 400,
|
|
14710
|
+
color: "var(--bw-text-muted)",
|
|
14711
|
+
marginLeft: "6px",
|
|
14712
|
+
backgroundColor: "rgba(0, 0, 0, 0.05)",
|
|
14713
|
+
whiteSpace: "nowrap",
|
|
14714
|
+
padding: "2px 6px",
|
|
14715
|
+
borderRadius: "var(--bw-border-radius-small)",
|
|
14716
|
+
}, children: [event.durationDays, " ", event.durationDays > 1 ? t("common.days") : t("common.day")] })] }), jsx("div", { style: {
|
|
14717
|
+
textAlign: "right",
|
|
14718
|
+
display: "flex",
|
|
14719
|
+
flexDirection: "column",
|
|
14720
|
+
alignItems: "flex-end",
|
|
14721
|
+
}, children: jsx(PriceDisplay, { price: event.price, yearPrices: yearPrices, t: t }) })] }), event.name !== selectedEventType?.name && (jsx("h4", { style: {
|
|
14722
|
+
fontSize: "16px",
|
|
14723
|
+
fontWeight: 600,
|
|
14724
|
+
color: "var(--bw-text-color)",
|
|
14725
|
+
lineHeight: 1.25,
|
|
14726
|
+
margin: "0 0 2px 0",
|
|
14727
|
+
display: "flex",
|
|
14728
|
+
alignItems: "center",
|
|
14729
|
+
gap: "8px",
|
|
14730
|
+
maxWidth: "230px",
|
|
14731
|
+
}, children: event.name }))] }, event.id));
|
|
14732
|
+
}) }) })] }, key));
|
|
14733
|
+
}) })] }) }));
|
|
14547
14734
|
}
|
|
14548
14735
|
|
|
14549
14736
|
function NextEventsPreview({ events, onEventSelect, onShowAll, showAllButtonText, showAllButton, isLoadingEventDetails = false, isLoadingShowAll = false, isLoading = false, }) {
|
|
@@ -15402,7 +15589,7 @@ function UpsellsStep({ upsells, selectedUpsells, participantCount, isLoading, is
|
|
|
15402
15589
|
const isSelected = (upsellId) => selectedUpsells.some((s) => s.upsellPackageId === upsellId);
|
|
15403
15590
|
const selectedCount = selectedUpsells.length;
|
|
15404
15591
|
const footerContent = (jsxs(Fragment, { children: [jsx("button", { type: "button", onClick: onBack, style: mergeStyles(buttonStyles.secondary, buttonStyles.fullWidth), className: buttonClassName, children: t("common.back") }), jsx("button", { type: "button", onClick: onContinue, style: mergeStyles(buttonStyles.primary, buttonStyles.fullWidth), className: buttonClassName, children: selectedCount === 0 ? t("button.continueWithout") : t("button.continue") })] }));
|
|
15405
|
-
return (jsx(Sidebar, { isOpen: isOpen, onClose: onClose, title: t("upsells.title"), footer: footerContent, children: jsxs("div", { style: { display: "flex", flexDirection: "column", height: "100%", padding: "16px 16px" }, children: [isLoading && (jsxs("div", { style: { display: "flex", flexDirection: "column", alignItems: "center", justifyContent: "center", gap: "12px", padding: "40px 20px", ...textStyles.muted }, children: [spinner(), jsx("span", { children: t("upsells.loading") })] })), !isLoading && upsells.length === 0 && (jsx("div", { style: { textAlign: "center", padding: "40px 20px", ...textStyles.muted }, children: jsx("p", { children: t("upsells.noExtras") }) })), !isLoading && upsells.length > 0 && (jsx("div", { style: { display: "flex", flexDirection: "column", gap: "12px", flex: 1, overflowY: "auto", paddingBottom: "16px" }, children: upsells.map((upsell) => (jsx(UpsellCard, { upsell: upsell, isSelected: isSelected(upsell.id), participantCount: participantCount, onSelect: () => selectUpsell(upsell.id) }, upsell.id))) })), selectedCount > 0 && (jsx("div", { style: { display: "flex", alignItems: "center", marginTop: "16px", paddingBottom: "16px", paddingTop: "16px", borderTop: "1px solid var(--bw-border-color)", fontSize: "14px" }, children: jsx("span", { style: textStyles.muted, children: selectedCount === 1 ? t("upsells.selected", { count: selectedCount }) : t("upsells.selectedPlural", { count: selectedCount }) }) }))] }) }));
|
|
15592
|
+
return (jsx(Sidebar, { isOpen: isOpen, onClose: onClose, title: t("upsells.title"), footer: footerContent, children: jsxs("div", { style: { display: "flex", flexDirection: "column", height: "100%", padding: "16px 16px" }, children: [jsx(FlowProgress, { currentStep: "upsells", hasUpsellsStep: true }), isLoading && (jsxs("div", { style: { display: "flex", flexDirection: "column", alignItems: "center", justifyContent: "center", gap: "12px", padding: "40px 20px", ...textStyles.muted }, children: [spinner(), jsx("span", { children: t("upsells.loading") })] })), !isLoading && upsells.length === 0 && (jsx("div", { style: { textAlign: "center", padding: "40px 20px", ...textStyles.muted }, children: jsx("p", { children: t("upsells.noExtras") }) })), !isLoading && upsells.length > 0 && (jsx("div", { style: { display: "flex", flexDirection: "column", gap: "12px", flex: 1, overflowY: "auto", paddingBottom: "16px" }, children: upsells.map((upsell) => (jsx(UpsellCard, { upsell: upsell, isSelected: isSelected(upsell.id), participantCount: participantCount, onSelect: () => selectUpsell(upsell.id) }, upsell.id))) })), selectedCount > 0 && (jsx("div", { style: { display: "flex", alignItems: "center", marginTop: "16px", paddingBottom: "16px", paddingTop: "16px", borderTop: "1px solid var(--bw-border-color)", fontSize: "14px" }, children: jsx("span", { style: textStyles.muted, children: selectedCount === 1 ? t("upsells.selected", { count: selectedCount }) : t("upsells.selectedPlural", { count: selectedCount }) }) }))] }) }));
|
|
15406
15593
|
}
|
|
15407
15594
|
|
|
15408
15595
|
/**
|
|
@@ -15543,6 +15730,7 @@ function UniversalBookingWidgetInner({ config: baseConfig, onWidgetLanguage, onT
|
|
|
15543
15730
|
const [bookingPersistedState, setBookingPersistedState] = useState(null);
|
|
15544
15731
|
const [isLoadingUpsells, setIsLoadingUpsells] = useState(false);
|
|
15545
15732
|
const [tempParticipantCount, setTempParticipantCount] = useState(1); // Used during upsell step
|
|
15733
|
+
const hasUpsellsFlowStep = upsells.length > 0 || currentStep === "upsells";
|
|
15546
15734
|
// State for upcoming events (next-events view mode)
|
|
15547
15735
|
const [upcomingEvents, setUpcomingEvents] = useState([]);
|
|
15548
15736
|
const [showingPreview, setShowingPreview] = useState(true);
|
|
@@ -15669,6 +15857,7 @@ function UniversalBookingWidgetInner({ config: baseConfig, onWidgetLanguage, onT
|
|
|
15669
15857
|
...(data.mollieProfileId ? { mollieProfileId: data.mollieProfileId } : {}),
|
|
15670
15858
|
...(data.mollieTestmode !== undefined ? { mollieTestmode: data.mollieTestmode } : {}),
|
|
15671
15859
|
roundPricesEnabled: data.roundPricesEnabled ?? true,
|
|
15860
|
+
widgetPaymentMode: data.widgetPaymentMode ?? "all",
|
|
15672
15861
|
});
|
|
15673
15862
|
}
|
|
15674
15863
|
}
|
|
@@ -16033,6 +16222,7 @@ function UniversalBookingWidgetInner({ config: baseConfig, onWidgetLanguage, onT
|
|
|
16033
16222
|
mollieProfileId: data.mollieProfileId,
|
|
16034
16223
|
mollieTestmode: data.mollieTestmode,
|
|
16035
16224
|
roundPricesEnabled: data.roundPricesEnabled ?? true,
|
|
16225
|
+
widgetPaymentMode: data.widgetPaymentMode ?? "all",
|
|
16036
16226
|
});
|
|
16037
16227
|
}
|
|
16038
16228
|
if (data.stripePublishableKey) {
|
|
@@ -16093,6 +16283,7 @@ function UniversalBookingWidgetInner({ config: baseConfig, onWidgetLanguage, onT
|
|
|
16093
16283
|
mollieProfileId: data.mollieProfileId,
|
|
16094
16284
|
mollieTestmode: data.mollieTestmode,
|
|
16095
16285
|
roundPricesEnabled: data.roundPricesEnabled ?? true,
|
|
16286
|
+
widgetPaymentMode: data.widgetPaymentMode ?? "all",
|
|
16096
16287
|
});
|
|
16097
16288
|
if (!stripePromise && data.stripePublishableKey) {
|
|
16098
16289
|
const stripeOptions = {
|
|
@@ -16601,7 +16792,7 @@ function UniversalBookingWidgetInner({ config: baseConfig, onWidgetLanguage, onT
|
|
|
16601
16792
|
}, isOpen: currentStep === "eventInstances", onClose: () => {
|
|
16602
16793
|
setShowingPreview(true);
|
|
16603
16794
|
setCurrentStep("eventTypes");
|
|
16604
|
-
}, isLoadingEventInstances: isLoadingEventInstances, isLoadingEventDetails: isLoadingEventDetails })), jsx(BookingSuccessModal, { isOpen: isSuccess, onClose: () => {
|
|
16795
|
+
}, isLoadingEventInstances: isLoadingEventInstances, isLoadingEventDetails: isLoadingEventDetails, hasUpsellsStep: hasUpsellsFlowStep })), jsx(BookingSuccessModal, { isOpen: isSuccess, onClose: () => {
|
|
16605
16796
|
setIsSuccess(false);
|
|
16606
16797
|
setCurrentStep("eventTypes");
|
|
16607
16798
|
setShowingPreview(true);
|
|
@@ -16644,7 +16835,7 @@ function UniversalBookingWidgetInner({ config: baseConfig, onWidgetLanguage, onT
|
|
|
16644
16835
|
setShouldRenderInstanceSelection(true);
|
|
16645
16836
|
}
|
|
16646
16837
|
}, children: config.buttonText ||
|
|
16647
|
-
(isDirectInstanceMode ? t("button.bookNow") : t("button.selectDate")) }), shouldRenderInstanceSelection && (jsx(EventInstanceSelection, { eventInstances: eventInstances, selectedEventType: selectedEventType, onEventInstanceSelect: handleEventInstanceSelect, onBackToEventTypes: () => setSidebarOpen(false), isOpen: sidebarOpen && currentStep === "eventInstances", onClose: () => setSidebarOpen(false), isLoadingEventInstances: isLoadingEventInstances, isLoadingEventDetails: isLoadingEventDetails })), shouldRenderUpsells && (jsx(UpsellsStep, { upsells: upsells, selectedUpsells: selectedUpsells, participantCount: tempParticipantCount, isLoading: isLoadingUpsells, isOpen: currentStep === "upsells", onClose: () => setCurrentStep("eventInstances"), onSelect: handleUpsellsSelect, onContinue: handleUpsellsContinue, onBack: handleUpsellsBack })), shouldRenderBookingForm && eventDetails && (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 })), jsx(BookingSuccessModal, { isOpen: isSuccess, onClose: () => {
|
|
16838
|
+
(isDirectInstanceMode ? t("button.bookNow") : t("button.selectDate")) }), shouldRenderInstanceSelection && (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 && (jsx(UpsellsStep, { upsells: upsells, selectedUpsells: selectedUpsells, participantCount: tempParticipantCount, isLoading: isLoadingUpsells, isOpen: currentStep === "upsells", onClose: () => setCurrentStep("eventInstances"), onSelect: handleUpsellsSelect, onContinue: handleUpsellsContinue, onBack: handleUpsellsBack })), shouldRenderBookingForm && eventDetails && (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 })), jsx(BookingSuccessModal, { isOpen: isSuccess, onClose: () => {
|
|
16648
16839
|
setIsSuccess(false);
|
|
16649
16840
|
setCurrentStep("eventTypes");
|
|
16650
16841
|
setSidebarOpen(false);
|
|
@@ -16705,7 +16896,7 @@ function UniversalBookingWidgetInner({ config: baseConfig, onWidgetLanguage, onT
|
|
|
16705
16896
|
};
|
|
16706
16897
|
};
|
|
16707
16898
|
const backHandlers = getBackHandlers();
|
|
16708
|
-
return (jsxs(StyleProvider, { config: config, children: [jsxs("div", { ref: setWidgetContainerRef, children: [cardsView, shouldRenderInstanceSelection && (jsx(EventInstanceSelection, { eventInstances: eventInstances, selectedEventType: selectedEventType, onEventInstanceSelect: handleEventInstanceSelect, onBackToEventTypes: handleBackToEventTypes, isOpen: currentStep === "eventInstances", onClose: handleBackToEventTypes, isLoadingEventInstances: isLoadingEventInstances, isLoadingEventDetails: isLoadingEventDetails })), shouldRenderUpsells && (jsx(UpsellsStep, { upsells: upsells, selectedUpsells: selectedUpsells, participantCount: tempParticipantCount, isLoading: isLoadingUpsells, isOpen: currentStep === "upsells", onClose: () => setCurrentStep("eventInstances"), onSelect: handleUpsellsSelect, onContinue: handleUpsellsContinue, onBack: handleUpsellsBack })), shouldRenderBookingForm && eventDetails && (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 })), jsx(BookingSuccessModal, { isOpen: isSuccess && !voucherPurchaseResult, onClose: () => {
|
|
16899
|
+
return (jsxs(StyleProvider, { config: config, children: [jsxs("div", { ref: setWidgetContainerRef, children: [cardsView, shouldRenderInstanceSelection && (jsx(EventInstanceSelection, { eventInstances: eventInstances, selectedEventType: selectedEventType, onEventInstanceSelect: handleEventInstanceSelect, onBackToEventTypes: handleBackToEventTypes, isOpen: currentStep === "eventInstances", onClose: handleBackToEventTypes, isLoadingEventInstances: isLoadingEventInstances, isLoadingEventDetails: isLoadingEventDetails, hasUpsellsStep: hasUpsellsFlowStep })), shouldRenderUpsells && (jsx(UpsellsStep, { upsells: upsells, selectedUpsells: selectedUpsells, participantCount: tempParticipantCount, isLoading: isLoadingUpsells, isOpen: currentStep === "upsells", onClose: () => setCurrentStep("eventInstances"), onSelect: handleUpsellsSelect, onContinue: handleUpsellsContinue, onBack: handleUpsellsBack })), shouldRenderBookingForm && eventDetails && (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 })), jsx(BookingSuccessModal, { isOpen: isSuccess && !voucherPurchaseResult, onClose: () => {
|
|
16709
16900
|
setIsSuccess(false);
|
|
16710
16901
|
setCurrentStep("eventTypes");
|
|
16711
16902
|
setSuccessPaymentId(null);
|