@bigz-app/booking-widget 1.5.1 → 1.5.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.
Files changed (38) hide show
  1. package/dist/booking-widget.js +88 -41
  2. package/dist/booking-widget.js.map +1 -1
  3. package/dist/components/UniversalBookingWidget.d.ts +3 -105
  4. package/dist/components/UniversalBookingWidget.d.ts.map +1 -1
  5. package/dist/components/events/EventInstanceSelection.d.ts +3 -1
  6. package/dist/components/events/EventInstanceSelection.d.ts.map +1 -1
  7. package/dist/components/events/EventTypeSelection.d.ts +2 -1
  8. package/dist/components/events/EventTypeSelection.d.ts.map +1 -1
  9. package/dist/components/events/NextEventsPreview.d.ts +1 -1
  10. package/dist/components/events/NextEventsPreview.d.ts.map +1 -1
  11. package/dist/components/events/SpecialsView.d.ts +1 -1
  12. package/dist/components/events/SpecialsView.d.ts.map +1 -1
  13. package/dist/components/events/types.d.ts +42 -0
  14. package/dist/components/events/types.d.ts.map +1 -0
  15. package/dist/components/upsells/UpsellCard.d.ts +1 -1
  16. package/dist/components/upsells/UpsellCard.d.ts.map +1 -1
  17. package/dist/components/upsells/UpsellsStep.d.ts +2 -44
  18. package/dist/components/upsells/UpsellsStep.d.ts.map +1 -1
  19. package/dist/components/upsells/types.d.ts +44 -0
  20. package/dist/components/upsells/types.d.ts.map +1 -0
  21. package/dist/components/voucher/VoucherPurchaseForm.d.ts +2 -15
  22. package/dist/components/voucher/VoucherPurchaseForm.d.ts.map +1 -1
  23. package/dist/components/voucher/types.d.ts +15 -0
  24. package/dist/components/voucher/types.d.ts.map +1 -0
  25. package/dist/config.d.ts +66 -0
  26. package/dist/config.d.ts.map +1 -0
  27. package/dist/i18n/locales/es.d.ts.map +1 -1
  28. package/dist/i18n/locales/pt.d.ts.map +1 -1
  29. package/dist/i18n/locales/sv.d.ts.map +1 -1
  30. package/dist/index.cjs +88 -41
  31. package/dist/index.cjs.map +1 -1
  32. package/dist/index.esm.js +88 -41
  33. package/dist/index.esm.js.map +1 -1
  34. package/dist/styles/StyleProvider.d.ts +1 -1
  35. package/dist/styles/StyleProvider.d.ts.map +1 -1
  36. package/dist/utils.d.ts +1 -1
  37. package/dist/utils.d.ts.map +1 -1
  38. package/package.json +1 -1
@@ -779,6 +779,21 @@
779
779
  "instances.bestPrice": "¡¡¡mejor precio!!!",
780
780
  "instances.goodPrice": "buen precio",
781
781
  "instances.oclock": "",
782
+ // Lista de espera
783
+ "waitlist.joinCta": "Lista de espera",
784
+ "waitlist.title": "Apuntarse a la lista de espera",
785
+ "waitlist.subtitle": "{{name}} está agotado. Deja tus datos y te contactaremos si se libera un lugar.",
786
+ "waitlist.name": "Nombre",
787
+ "waitlist.email": "Correo electrónico",
788
+ "waitlist.phone": "Teléfono (opcional)",
789
+ "waitlist.requiredFields": "Por favor, introduce tu nombre y correo electrónico.",
790
+ "waitlist.join": "Apuntarse",
791
+ "waitlist.submitting": "Apuntando...",
792
+ "waitlist.cancel": "Cancelar",
793
+ "waitlist.submitError": "Algo salió mal. Por favor, inténtalo de nuevo.",
794
+ "waitlist.successTitle": "¡Estás en la lista!",
795
+ "waitlist.successMessage": "Eres el número {{position}} en la lista de espera. Te contactaremos si se libera un lugar.",
796
+ "waitlist.done": "Listo",
782
797
  // Next events preview
783
798
  "nextEvents.title": "Próximas fechas disponibles",
784
799
  "nextEvents.subtitle": "Selecciona una fecha o consulta todas las fechas disponibles",
@@ -1076,6 +1091,21 @@
1076
1091
  "instances.bestPrice": "melhor preço !!!",
1077
1092
  "instances.goodPrice": "bom preço",
1078
1093
  "instances.oclock": "",
1094
+ // Lista de espera
1095
+ "waitlist.joinCta": "Lista de espera",
1096
+ "waitlist.title": "Entrar na lista de espera",
1097
+ "waitlist.subtitle": "{{name}} está esgotado. Deixe os seus dados e entraremos em contacto se surgir uma vaga.",
1098
+ "waitlist.name": "Nome",
1099
+ "waitlist.email": "E-mail",
1100
+ "waitlist.phone": "Telefone (opcional)",
1101
+ "waitlist.requiredFields": "Por favor, introduza o seu nome e e-mail.",
1102
+ "waitlist.join": "Inscrever-se",
1103
+ "waitlist.submitting": "A inscrever...",
1104
+ "waitlist.cancel": "Cancelar",
1105
+ "waitlist.submitError": "Algo correu mal. Por favor, tente novamente.",
1106
+ "waitlist.successTitle": "Está na lista!",
1107
+ "waitlist.successMessage": "É o número {{position}} na lista de espera. Entraremos em contacto se surgir uma vaga.",
1108
+ "waitlist.done": "Concluído",
1079
1109
  // Next events preview
1080
1110
  "nextEvents.title": "Próximas datas disponíveis",
1081
1111
  "nextEvents.subtitle": "Selecione uma data ou veja todas as datas disponíveis",
@@ -1373,6 +1403,21 @@
1373
1403
  "instances.bestPrice": "bästa pris !!!",
1374
1404
  "instances.goodPrice": "bra pris",
1375
1405
  "instances.oclock": "",
1406
+ // Väntelista
1407
+ "waitlist.joinCta": "Ställ dig i kö",
1408
+ "waitlist.title": "Ställ dig i kö",
1409
+ "waitlist.subtitle": "{{name}} är fullbokat. Lämna dina uppgifter så kontaktar vi dig om en plats blir ledig.",
1410
+ "waitlist.name": "Namn",
1411
+ "waitlist.email": "E-post",
1412
+ "waitlist.phone": "Telefon (valfritt)",
1413
+ "waitlist.requiredFields": "Ange ditt namn och din e-postadress.",
1414
+ "waitlist.join": "Ställ dig i kö",
1415
+ "waitlist.submitting": "Anmäler...",
1416
+ "waitlist.cancel": "Avbryt",
1417
+ "waitlist.submitError": "Något gick fel. Försök igen.",
1418
+ "waitlist.successTitle": "Du står i kön!",
1419
+ "waitlist.successMessage": "Du är nummer {{position}} på väntelistan. Vi hör av oss om en plats blir ledig.",
1420
+ "waitlist.done": "Klar",
1376
1421
  // Next events preview
1377
1422
  "nextEvents.title": "Nästa tillgängliga datum",
1378
1423
  "nextEvents.subtitle": "Välj ett datum eller visa alla tillgängliga datum",
@@ -14518,7 +14563,7 @@
14518
14563
  pointerEvents: "none",
14519
14564
  }, children: text }))] }));
14520
14565
  }
14521
- function EventTypeSelection({ eventTypes, onEventTypeSelect, onInstancePreview, isLoading = false, skeletonCount = 4, showVoucherAttachment = false, onVoucherClick, }) {
14566
+ function EventTypeSelection({ eventTypes, onEventTypeSelect, onInstancePreview, isLoading = false, skeletonCount = 4, showVoucherAttachment = false, onVoucherClick, showImages = true, }) {
14522
14567
  const t = useTranslations();
14523
14568
  const { locale } = useLocale();
14524
14569
  const timezone = useTimezone();
@@ -14597,6 +14642,18 @@
14597
14642
  gridAutoRows: "1fr",
14598
14643
  }, children: eventTypes.map((eventType) => {
14599
14644
  const isAvailable = eventType.hasAvailableInstances;
14645
+ const hasImage = showImages && eventType.images && eventType.images.length > 0;
14646
+ const availabilityBadge = (u$2("div", { style: {
14647
+ padding: "4px 8px",
14648
+ borderRadius: "var(--bw-border-radius-small)",
14649
+ fontSize: "12px",
14650
+ fontWeight: 600,
14651
+ color: "#ffffff",
14652
+ fontFamily: "var(--bw-font-family)",
14653
+ backgroundColor: isAvailable
14654
+ ? "var(--bw-success-color)"
14655
+ : "var(--bw-error-color)",
14656
+ }, children: isAvailable ? t("events.spotsAvailable") : t("events.soldOut") }));
14600
14657
  return (u$2("div", { className: "event-type-card", style: {
14601
14658
  position: "relative",
14602
14659
  backgroundColor: "var(--bw-surface-color)",
@@ -14608,17 +14665,7 @@
14608
14665
  fontFamily: "var(--bw-font-family)",
14609
14666
  cursor: isAvailable ? "pointer" : "not-allowed",
14610
14667
  opacity: isAvailable ? 1 : 0.6,
14611
- }, onClick: () => isAvailable && onEventTypeSelect(eventType), children: [u$2("div", { style: { position: "absolute", top: "16px", right: "16px", zIndex: 10 }, children: u$2("div", { style: {
14612
- padding: "4px 8px",
14613
- borderRadius: "var(--bw-border-radius-small)",
14614
- fontSize: "12px",
14615
- fontWeight: 600,
14616
- color: "#ffffff",
14617
- fontFamily: "var(--bw-font-family)",
14618
- backgroundColor: isAvailable
14619
- ? "var(--bw-success-color)"
14620
- : "var(--bw-error-color)",
14621
- }, children: isAvailable ? t("events.spotsAvailable") : t("events.soldOut") }) }), eventType.images && eventType.images.length > 0 && (u$2(k$3, { children: [u$2("div", { style: { position: "absolute", top: "16px", left: "16px", zIndex: 10 }, children: u$2("div", { style: {
14668
+ }, onClick: () => isAvailable && onEventTypeSelect(eventType), children: [hasImage && (u$2("div", { style: { position: "absolute", top: "16px", right: "16px", zIndex: 10 }, children: availabilityBadge })), hasImage && (u$2(k$3, { children: [u$2("div", { style: { position: "absolute", top: "16px", left: "16px", zIndex: 10 }, children: u$2("div", { style: {
14622
14669
  fontSize: "13px",
14623
14670
  color: "var(--bw-surface-color)",
14624
14671
  fontWeight: 600,
@@ -14632,7 +14679,7 @@
14632
14679
  flexDirection: "column",
14633
14680
  justifyContent: "space-between",
14634
14681
  height: "540px",
14635
- }, children: [u$2("div", { children: [u$2("h2", { className: "event-type-title", style: {
14682
+ }, children: [u$2("div", { children: [!hasImage && (u$2("div", { style: { display: "flex", justifyContent: "flex-end", margin: "0 0 8px 0" }, children: availabilityBadge })), u$2("h2", { className: "event-type-title", style: {
14636
14683
  fontSize: "clamp(1.1rem, 2.5vw, 24px)",
14637
14684
  fontWeight: 700,
14638
14685
  color: "var(--bw-text-color)",
@@ -14904,16 +14951,16 @@
14904
14951
  }
14905
14952
 
14906
14953
  const getAllocationBadgeInfo = (availableSpots, maxParticipants, t) => {
14907
- const availabilityRatio = availableSpots / maxParticipants;
14908
- if (availabilityRatio >= 0.6)
14909
- return null;
14910
- if (availabilityRatio === 0) {
14954
+ if (maxParticipants <= 0 || availableSpots <= 0) {
14911
14955
  return {
14912
14956
  text: t("events.soldOut"),
14913
14957
  backgroundColor: "#7f1d1d",
14914
14958
  textColor: "#fca5a5",
14915
14959
  };
14916
14960
  }
14961
+ const availabilityRatio = availableSpots / maxParticipants;
14962
+ if (availabilityRatio >= 0.6)
14963
+ return null;
14917
14964
  if (availabilityRatio <= 0.3) {
14918
14965
  return {
14919
14966
  text: t("instances.almostSoldOut"),
@@ -15027,7 +15074,7 @@
15027
15074
  boxShadow: displayInfo ? "0 2px 4px rgba(0, 0, 0, 0.2)" : "none",
15028
15075
  }, children: formatCurrency(price) }));
15029
15076
  };
15030
- function EventInstanceSelection({ eventInstances, selectedEventType, onEventInstanceSelect, onBackToEventTypes, isOpen, onClose, isLoadingEventInstances = false, isLoadingEventDetails = false, hasUpsellsStep = false, apiBaseUrl, organizationId, }) {
15077
+ function EventInstanceSelection({ eventInstances, selectedEventType, onEventInstanceSelect, onBackToEventTypes, isOpen, onClose, isLoadingEventInstances = false, isLoadingEventDetails = false, hasUpsellsStep = false, apiBaseUrl, organizationId, waitlistEnabled = false, }) {
15031
15078
  const t = useTranslations();
15032
15079
  const { locale } = useLocale();
15033
15080
  const timezone = useTimezone();
@@ -15212,12 +15259,13 @@
15212
15259
  ? "0 2px 4px rgba(0, 0, 0, 0.2)"
15213
15260
  : undefined,
15214
15261
  }, children: `${t("common.from")} ${formatCurrency(minPrice)}` }), isOpen: openGroups.has(key), onToggle: () => toggleGroup(key), children: u$2("div", { style: { display: "flex", flexDirection: "column", gap: "12px", paddingTop: "12px" }, children: events.map((event) => {
15215
- const availableSpots = event.maxParticipants - event.participantCount;
15216
- const isFullyBooked = availableSpots === 0;
15262
+ const availableSpots = event.availableSpots;
15217
15263
  const startDate = new Date(event.startTime);
15218
15264
  const isPastEvent = today.toISOString() >= startDate.toISOString();
15219
- const isDisabled = isFullyBooked || isPastEvent || !event.bookingOpen;
15220
- const canWaitlist = isFullyBooked &&
15265
+ const isUnavailable = availableSpots <= 0 || !event.bookingOpen;
15266
+ const isDisabled = isUnavailable || isPastEvent;
15267
+ const canWaitlist = waitlistEnabled &&
15268
+ isUnavailable &&
15221
15269
  !isPastEvent &&
15222
15270
  !!apiBaseUrl &&
15223
15271
  !!organizationId;
@@ -15254,7 +15302,7 @@
15254
15302
  color: "var(--bw-highlight-color)",
15255
15303
  opacity: 0.8,
15256
15304
  fontSize: "32px",
15257
- }, children: spinner() }) })), u$2(SpecialPriceBadge, { price: event.price, yearPrices: yearPrices, t: t }), u$2(AllocationBadge, { availableSpots: availableSpots, maxParticipants: event.maxParticipants, t: t }), u$2("div", { style: {
15305
+ }, children: spinner() }) })), u$2(SpecialPriceBadge, { price: event.price, yearPrices: yearPrices, t: t }), u$2(AllocationBadge, { availableSpots: availableSpots, maxParticipants: event.effectiveMaxParticipants ?? event.maxParticipants, t: t }), u$2("div", { style: {
15258
15306
  display: "flex",
15259
15307
  justifyContent: "space-between",
15260
15308
  width: "100%",
@@ -15431,18 +15479,19 @@
15431
15479
  margin: "0 auto",
15432
15480
  padding: "12px 16px",
15433
15481
  fontFamily: "var(--bw-font-family)",
15434
- }, children: [u$2("div", { style: { display: "flex", flexDirection: "column", gap: "12px", marginBottom: "10px" }, children: events.map((event) => {
15435
- const availableSpots = event.maxParticipants - event.participantCount;
15436
- const isFullyBooked = availableSpots === 0;
15482
+ }, children: [u$2("div", { style: { display: "flex", flexDirection: "column", gap: "12px", marginBottom: "10px" }, children: events
15483
+ .filter((event) => {
15437
15484
  const startDate = new Date(event.startTime);
15438
15485
  const isPastEvent = today.toISOString() >= startDate.toISOString();
15439
- const isDisabled = isFullyBooked || isPastEvent || !event.bookingOpen;
15440
- const availabilityRatio = availableSpots / event.maxParticipants;
15486
+ return !isPastEvent && event.availableSpots > 0 && event.bookingOpen;
15487
+ })
15488
+ .map((event) => {
15489
+ const availableSpots = event.availableSpots;
15490
+ const startDate = new Date(event.startTime);
15441
15491
  const allocationBadge = (() => {
15492
+ const availabilityRatio = availableSpots / event.maxParticipants;
15442
15493
  if (availabilityRatio >= 0.6)
15443
15494
  return null;
15444
- if (availabilityRatio === 0)
15445
- return { text: t("events.soldOut"), backgroundColor: "#7f1d1d", textColor: "#fca5a5" };
15446
15495
  if (availabilityRatio <= 0.3)
15447
15496
  return { text: t("instances.almostSoldOut"), backgroundColor: "#7f1d1d", textColor: "#fca5a5" };
15448
15497
  return { text: t("instances.popularDate"), backgroundColor: "#b45309", textColor: "#fbbf24" };
@@ -15456,13 +15505,9 @@
15456
15505
  padding: "16px 10px",
15457
15506
  transition: "all 0.2s ease",
15458
15507
  fontFamily: "var(--bw-font-family)",
15459
- opacity: isDisabled ? 0.3 : 1,
15460
- filter: isDisabled ? "grayscale(40%)" : "none",
15461
- cursor: isDisabled ? "not-allowed" : "pointer",
15508
+ cursor: "pointer",
15462
15509
  }, onClick: () => {
15463
- if (!isDisabled) {
15464
- handleEventSelect(event.id);
15465
- }
15510
+ handleEventSelect(event.id);
15466
15511
  }, children: [selectedEventInstanceId === event.id && isLoadingEventDetails && (u$2("div", { style: {
15467
15512
  position: "absolute",
15468
15513
  inset: 0,
@@ -15717,7 +15762,7 @@
15717
15762
  alignItems: "center",
15718
15763
  backgroundColor: "var(--bw-background-color)",
15719
15764
  }, children: [u$2("span", { style: { fontSize: "12px", color: "var(--bw-text-muted)" }, children: isFullyBooked
15720
- ? t("common.fullyBooked")
15765
+ ? t("events.soldOut")
15721
15766
  : t("specials.spotsLeft").replace("{{count}}", String(special.availableSpots)) }), u$2("span", { style: {
15722
15767
  fontSize: "13px",
15723
15768
  fontWeight: 600,
@@ -16666,6 +16711,7 @@
16666
16711
  const [isSuccess, setIsSuccess] = d$1(false);
16667
16712
  const [successPaymentId, setSuccessPaymentId] = d$1(null);
16668
16713
  const [systemConfig, setSystemConfig] = d$1(null);
16714
+ const [waitlistEnabled, setWaitlistEnabled] = d$1(false);
16669
16715
  // When true, loadEventInstances skips the single-instance auto-select (used by handleShowAllEvents)
16670
16716
  const skipInstanceAutoSelectRef = A$2(false);
16671
16717
  // PERFORMANCE OPTIMIZATION: Lazy component loading
@@ -17159,6 +17205,7 @@
17159
17205
  }
17160
17206
  extractGoogleAdsConfig(data);
17161
17207
  setEventInstances(data.eventInstances);
17208
+ setWaitlistEnabled(data.waitlistEnabled ?? false);
17162
17209
  if (data.paymentProvider) {
17163
17210
  setSystemConfig({
17164
17211
  paymentProvider: data.paymentProvider,
@@ -17727,7 +17774,7 @@
17727
17774
  }, isOpen: currentStep === "eventInstances", onClose: () => {
17728
17775
  setShowingPreview(true);
17729
17776
  setCurrentStep("eventTypes");
17730
- }, isLoadingEventInstances: isLoadingEventInstances, isLoadingEventDetails: isLoadingEventDetails, hasUpsellsStep: hasUpsellsFlowStep, apiBaseUrl: config.apiBaseUrl, organizationId: config.organizationId })), u$2(BookingSuccessModal, { isOpen: isSuccess, onClose: () => {
17777
+ }, isLoadingEventInstances: isLoadingEventInstances, isLoadingEventDetails: isLoadingEventDetails, hasUpsellsStep: hasUpsellsFlowStep, apiBaseUrl: config.apiBaseUrl, organizationId: config.organizationId, waitlistEnabled: waitlistEnabled })), u$2(BookingSuccessModal, { isOpen: isSuccess, onClose: () => {
17731
17778
  setIsSuccess(false);
17732
17779
  setCurrentStep("eventTypes");
17733
17780
  setShowingPreview(true);
@@ -17790,7 +17837,7 @@
17790
17837
  }, children: [isButtonBusy && u$2(Spinner, { size: 20, borderColor: "var(--bw-button-text-color, #ffffff)" }), config.buttonText ||
17791
17838
  (isDirectInstanceMode || selectedEventType?.bookingMode === "freeform"
17792
17839
  ? t("button.bookNow")
17793
- : t("button.viewDates"))] }), shouldRenderInstanceSelection && (u$2(EventInstanceSelection, { eventInstances: eventInstances, selectedEventType: selectedEventType, onEventInstanceSelect: handleEventInstanceSelect, onBackToEventTypes: () => setSidebarOpen(false), isOpen: sidebarOpen && currentStep === "eventInstances", onClose: () => setSidebarOpen(false), isLoadingEventInstances: isLoadingEventInstances, isLoadingEventDetails: isLoadingEventDetails, hasUpsellsStep: hasUpsellsFlowStep, apiBaseUrl: config.apiBaseUrl, organizationId: config.organizationId })), shouldRenderUpsells && (u$2(UpsellsStep, { upsells: upsells, selectedUpsells: selectedUpsells, participantCount: tempParticipantCount, isLoading: isLoadingUpsells, isOpen: currentStep === "upsells", onClose: () => setCurrentStep("eventInstances"), onSelect: handleUpsellsSelect, onContinue: handleUpsellsContinue, onBack: handleUpsellsBack })), shouldRenderBookingForm && eventDetails && (u$2(BookingForm, { config: config, eventDetails: eventDetails, onSuccess: handleBookingSuccess, onError: handleBookingError, isOpen: currentStep === "booking" && !!eventDetails, onClose: handleBackFromBooking, systemConfig: systemConfig, selectedUpsells: selectedUpsells, upsells: upsells, persistedState: bookingPersistedState, onPersistedStateChange: setBookingPersistedState })), shouldRenderFreeformSelection && selectedEventType?.bookingMode === "freeform" && (u$2(FreeformSelection, { config: config, eventType: selectedEventType, isOpen: currentStep === "freeform", onClose: () => {
17840
+ : t("button.viewDates"))] }), shouldRenderInstanceSelection && (u$2(EventInstanceSelection, { eventInstances: eventInstances, selectedEventType: selectedEventType, onEventInstanceSelect: handleEventInstanceSelect, onBackToEventTypes: () => setSidebarOpen(false), isOpen: sidebarOpen && currentStep === "eventInstances", onClose: () => setSidebarOpen(false), isLoadingEventInstances: isLoadingEventInstances, isLoadingEventDetails: isLoadingEventDetails, hasUpsellsStep: hasUpsellsFlowStep, apiBaseUrl: config.apiBaseUrl, organizationId: config.organizationId, waitlistEnabled: waitlistEnabled })), shouldRenderUpsells && (u$2(UpsellsStep, { upsells: upsells, selectedUpsells: selectedUpsells, participantCount: tempParticipantCount, isLoading: isLoadingUpsells, isOpen: currentStep === "upsells", onClose: () => setCurrentStep("eventInstances"), onSelect: handleUpsellsSelect, onContinue: handleUpsellsContinue, onBack: handleUpsellsBack })), shouldRenderBookingForm && eventDetails && (u$2(BookingForm, { config: config, eventDetails: eventDetails, onSuccess: handleBookingSuccess, onError: handleBookingError, isOpen: currentStep === "booking" && !!eventDetails, onClose: handleBackFromBooking, systemConfig: systemConfig, selectedUpsells: selectedUpsells, upsells: upsells, persistedState: bookingPersistedState, onPersistedStateChange: setBookingPersistedState })), shouldRenderFreeformSelection && selectedEventType?.bookingMode === "freeform" && (u$2(FreeformSelection, { config: config, eventType: selectedEventType, isOpen: currentStep === "freeform", onClose: () => {
17794
17841
  setCurrentStep("eventTypes");
17795
17842
  setSidebarOpen(false);
17796
17843
  setShouldRenderFreeformSelection(false);
@@ -17815,7 +17862,7 @@
17815
17862
  }, config: config, googleAdsConfig: googleAdsConfig, onError: setError, paymentIntentId: successPaymentId })] }), showPromoDialog && config.promo && (u$2(PromoDialog, { config: config.promo, onClose: handlePromoDialogClose, onCtaClick: handlePromoCtaClick }))] }));
17816
17863
  }
17817
17864
  // Cards mode (default) - show event type selection with optional voucher card
17818
- const cardsView = (u$2(k$3, { children: [hasEventSelection && (u$2(EventTypeSelection, { eventTypes: eventTypes, onEventTypeSelect: handleEventTypeSelect, onInstancePreview: (instanceId, eventTypeId) => void handleUpcomingEventSelect(instanceId, eventTypeId), isLoading: isLoading, skeletonCount: getSkeletonCount(), showVoucherAttachment: Boolean(voucherConfig?.enabled && voucherCardIntegrationEnabled && !isStandaloneVoucherMode), onVoucherClick: handleVoucherAttachmentClick })), isStandaloneVoucherMode && (u$2(VoucherIntegration, { config: config, voucherConfig: voucherConfig, eventTypes: voucherEventTypes, categories: voucherCategories, systemConfig: systemConfig, isFormOpen: false, isLoadingConfig: isLoadingVoucherConfig, preselectedEventTypeId: null, voucherPurchaseResult: null, isSuccess: false, showStandaloneCard: Boolean(voucherConfig?.enabled && voucherCardIntegrationEnabled), onCardClick: handleVoucherCardClick, onFormClose: handleVoucherFormClose, onSuccess: handleVoucherSuccess, onError: handleVoucherError, onSuccessModalClose: () => { } })), isStandaloneVoucherMode && isLoading && !voucherConfig && (u$2("div", { style: { padding: "24px", textAlign: "center" }, children: u$2("div", { style: {
17865
+ const cardsView = (u$2(k$3, { children: [hasEventSelection && (u$2(EventTypeSelection, { eventTypes: eventTypes, onEventTypeSelect: handleEventTypeSelect, onInstancePreview: (instanceId, eventTypeId) => void handleUpcomingEventSelect(instanceId, eventTypeId), isLoading: isLoading, skeletonCount: getSkeletonCount(), showVoucherAttachment: Boolean(voucherConfig?.enabled && voucherCardIntegrationEnabled && !isStandaloneVoucherMode), onVoucherClick: handleVoucherAttachmentClick, showImages: config.showEventImages !== false })), isStandaloneVoucherMode && (u$2(VoucherIntegration, { config: config, voucherConfig: voucherConfig, eventTypes: voucherEventTypes, categories: voucherCategories, systemConfig: systemConfig, isFormOpen: false, isLoadingConfig: isLoadingVoucherConfig, preselectedEventTypeId: null, voucherPurchaseResult: null, isSuccess: false, showStandaloneCard: Boolean(voucherConfig?.enabled && voucherCardIntegrationEnabled), onCardClick: handleVoucherCardClick, onFormClose: handleVoucherFormClose, onSuccess: handleVoucherSuccess, onError: handleVoucherError, onSuccessModalClose: () => { } })), isStandaloneVoucherMode && isLoading && !voucherConfig && (u$2("div", { style: { padding: "24px", textAlign: "center" }, children: u$2("div", { style: {
17819
17866
  display: "inline-block",
17820
17867
  width: "32px",
17821
17868
  height: "32px",
@@ -17856,7 +17903,7 @@
17856
17903
  };
17857
17904
  };
17858
17905
  const backHandlers = getBackHandlers();
17859
- return (u$2(StyleProvider, { config: config, children: [u$2("div", { ref: setWidgetContainerRef, children: [cardsView, shouldRenderInstanceSelection && (u$2(EventInstanceSelection, { eventInstances: eventInstances, selectedEventType: selectedEventType, onEventInstanceSelect: handleEventInstanceSelect, onBackToEventTypes: handleBackToEventTypes, isOpen: currentStep === "eventInstances", onClose: handleBackToEventTypes, isLoadingEventInstances: isLoadingEventInstances, isLoadingEventDetails: isLoadingEventDetails, hasUpsellsStep: hasUpsellsFlowStep, apiBaseUrl: config.apiBaseUrl, organizationId: config.organizationId })), shouldRenderUpsells && (u$2(UpsellsStep, { upsells: upsells, selectedUpsells: selectedUpsells, participantCount: tempParticipantCount, isLoading: isLoadingUpsells, isOpen: currentStep === "upsells", onClose: () => setCurrentStep("eventInstances"), onSelect: handleUpsellsSelect, onContinue: handleUpsellsContinue, onBack: handleUpsellsBack })), shouldRenderBookingForm && eventDetails && (u$2(BookingForm, { config: config, eventDetails: eventDetails, onSuccess: handleBookingSuccess, onError: handleBookingError, isOpen: currentStep === "booking" && !!eventDetails, onClose: backHandlers.onClose, systemConfig: systemConfig, selectedUpsells: selectedUpsells, upsells: upsells, persistedState: bookingPersistedState, onPersistedStateChange: setBookingPersistedState })), shouldRenderFreeformSelection && selectedEventType?.bookingMode === "freeform" && (u$2(FreeformSelection, { config: config, eventType: selectedEventType, isOpen: currentStep === "freeform", onClose: () => {
17906
+ return (u$2(StyleProvider, { config: config, children: [u$2("div", { ref: setWidgetContainerRef, children: [cardsView, shouldRenderInstanceSelection && (u$2(EventInstanceSelection, { eventInstances: eventInstances, selectedEventType: selectedEventType, onEventInstanceSelect: handleEventInstanceSelect, onBackToEventTypes: handleBackToEventTypes, isOpen: currentStep === "eventInstances", onClose: handleBackToEventTypes, isLoadingEventInstances: isLoadingEventInstances, isLoadingEventDetails: isLoadingEventDetails, hasUpsellsStep: hasUpsellsFlowStep, apiBaseUrl: config.apiBaseUrl, organizationId: config.organizationId, waitlistEnabled: waitlistEnabled })), shouldRenderUpsells && (u$2(UpsellsStep, { upsells: upsells, selectedUpsells: selectedUpsells, participantCount: tempParticipantCount, isLoading: isLoadingUpsells, isOpen: currentStep === "upsells", onClose: () => setCurrentStep("eventInstances"), onSelect: handleUpsellsSelect, onContinue: handleUpsellsContinue, onBack: handleUpsellsBack })), shouldRenderBookingForm && eventDetails && (u$2(BookingForm, { config: config, eventDetails: eventDetails, onSuccess: handleBookingSuccess, onError: handleBookingError, isOpen: currentStep === "booking" && !!eventDetails, onClose: backHandlers.onClose, systemConfig: systemConfig, selectedUpsells: selectedUpsells, upsells: upsells, persistedState: bookingPersistedState, onPersistedStateChange: setBookingPersistedState })), shouldRenderFreeformSelection && selectedEventType?.bookingMode === "freeform" && (u$2(FreeformSelection, { config: config, eventType: selectedEventType, isOpen: currentStep === "freeform", onClose: () => {
17860
17907
  setCurrentStep("eventTypes");
17861
17908
  setShouldRenderFreeformSelection(false);
17862
17909
  }, onSuccess: handleBookingSuccess, onError: handleBookingError, systemConfig: systemConfig })), u$2(BookingSuccessModal, { isOpen: isSuccess && !voucherPurchaseResult, onClose: () => {