@bigz-app/booking-widget 0.3.8 → 0.3.9
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 +407 -107
- package/dist/booking-widget.js.map +1 -1
- package/dist/components/PromoDialog.d.ts +7 -0
- package/dist/components/PromoDialog.d.ts.map +1 -0
- package/dist/components/UniversalBookingWidget.d.ts.map +1 -1
- package/dist/index.cjs +407 -107
- package/dist/index.cjs.map +1 -1
- package/dist/index.esm.js +407 -107
- package/dist/index.esm.js.map +1 -1
- package/package.json +8 -6
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PromoDialog.d.ts","sourceRoot":"","sources":["../../src/components/PromoDialog.tsx"],"names":[],"mappings":"AAIA,UAAU,gBAAgB;IACzB,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,UAAU,EAAE,MAAM,IAAI,CAAC;CACvB;AAED,wBAAgB,WAAW,CAAC,EAAE,OAAO,EAAE,UAAU,EAAE,EAAE,gBAAgB,2CA6apE"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"UniversalBookingWidget.d.ts","sourceRoot":"","sources":["../../src/components/UniversalBookingWidget.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"UniversalBookingWidget.d.ts","sourceRoot":"","sources":["../../src/components/UniversalBookingWidget.tsx"],"names":[],"mappings":"AAoBA,MAAM,WAAW,SAAS;IACzB,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,UAAU,CAAC,EAAE,MAAM,EAAE,CAAC;IACtB,MAAM,EAAE,MAAM,EAAE,CAAC;IACjB,QAAQ,EAAE;QACT,EAAE,EAAE,MAAM,CAAC;QACX,IAAI,EAAE,MAAM,CAAC;QACb,KAAK,EAAE,MAAM,CAAC;KACd,CAAC;IACF,iBAAiB,EAAE,MAAM,GAAG,IAAI,CAA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B,CAAA;CAAE,2CA2iChG"}
|
package/dist/index.cjs
CHANGED
|
@@ -12245,6 +12245,263 @@ function NextEventsPreview({ events, onEventSelect, onShowAll, showAllButtonText
|
|
|
12245
12245
|
` })] }));
|
|
12246
12246
|
}
|
|
12247
12247
|
|
|
12248
|
+
function PromoDialog({ onClose, onCtaClick }) {
|
|
12249
|
+
const [copied, setCopied] = React__default.useState(false);
|
|
12250
|
+
const [isVisible, setIsVisible] = React__default.useState(false);
|
|
12251
|
+
// Hardcoded Xmas surf school content
|
|
12252
|
+
const discountCode = "X-MAS";
|
|
12253
|
+
// Animate in on mount
|
|
12254
|
+
React__default.useEffect(() => {
|
|
12255
|
+
const timer = setTimeout(() => setIsVisible(true), 50);
|
|
12256
|
+
return () => clearTimeout(timer);
|
|
12257
|
+
}, []);
|
|
12258
|
+
const handleCopyCode = async () => {
|
|
12259
|
+
try {
|
|
12260
|
+
await navigator.clipboard.writeText(discountCode);
|
|
12261
|
+
setCopied(true);
|
|
12262
|
+
setTimeout(() => setCopied(false), 2000);
|
|
12263
|
+
}
|
|
12264
|
+
catch (err) {
|
|
12265
|
+
// Fallback for older browsers
|
|
12266
|
+
const textArea = document.createElement("textarea");
|
|
12267
|
+
textArea.value = discountCode;
|
|
12268
|
+
document.body.appendChild(textArea);
|
|
12269
|
+
textArea.select();
|
|
12270
|
+
document.execCommand("copy");
|
|
12271
|
+
document.body.removeChild(textArea);
|
|
12272
|
+
setCopied(true);
|
|
12273
|
+
setTimeout(() => setCopied(false), 2000);
|
|
12274
|
+
}
|
|
12275
|
+
};
|
|
12276
|
+
const handleClose = () => {
|
|
12277
|
+
setIsVisible(false);
|
|
12278
|
+
setTimeout(onClose, 200);
|
|
12279
|
+
};
|
|
12280
|
+
const handleCtaClick = () => {
|
|
12281
|
+
setIsVisible(false);
|
|
12282
|
+
setTimeout(onCtaClick, 200);
|
|
12283
|
+
};
|
|
12284
|
+
return (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx("style", { children: `
|
|
12285
|
+
@keyframes promo-wave {
|
|
12286
|
+
0%, 100% { transform: translateX(0) translateY(0); }
|
|
12287
|
+
25% { transform: translateX(5px) translateY(-3px); }
|
|
12288
|
+
50% { transform: translateX(0) translateY(-5px); }
|
|
12289
|
+
75% { transform: translateX(-5px) translateY(-3px); }
|
|
12290
|
+
}
|
|
12291
|
+
@keyframes promo-float {
|
|
12292
|
+
0%, 100% { transform: translateY(0); }
|
|
12293
|
+
50% { transform: translateY(-8px); }
|
|
12294
|
+
}
|
|
12295
|
+
@keyframes promo-shimmer {
|
|
12296
|
+
0% { background-position: -200% center; }
|
|
12297
|
+
100% { background-position: 200% center; }
|
|
12298
|
+
}
|
|
12299
|
+
@keyframes promo-sparkle {
|
|
12300
|
+
0%, 100% { opacity: 0.3; transform: scale(1); }
|
|
12301
|
+
50% { opacity: 1; transform: scale(1.2); }
|
|
12302
|
+
}
|
|
12303
|
+
@keyframes promo-snow {
|
|
12304
|
+
0% { transform: translateY(-10px) rotate(0deg); opacity: 0; }
|
|
12305
|
+
10% { opacity: 1; }
|
|
12306
|
+
90% { opacity: 1; }
|
|
12307
|
+
100% { transform: translateY(350px) rotate(360deg); opacity: 0; }
|
|
12308
|
+
}
|
|
12309
|
+
` }), jsxRuntime.jsx("div", { onClick: handleClose, style: {
|
|
12310
|
+
position: "fixed",
|
|
12311
|
+
inset: 0,
|
|
12312
|
+
backgroundColor: "rgba(0, 20, 40, 0.85)",
|
|
12313
|
+
backdropFilter: "blur(8px)",
|
|
12314
|
+
zIndex: 9998,
|
|
12315
|
+
opacity: isVisible ? 1 : 0,
|
|
12316
|
+
transition: "opacity 300ms ease-out",
|
|
12317
|
+
} }), jsxRuntime.jsx("div", { style: {
|
|
12318
|
+
position: "fixed",
|
|
12319
|
+
top: "50%",
|
|
12320
|
+
left: "50%",
|
|
12321
|
+
transform: `translate(-50%, -50%) scale(${isVisible ? 1 : 0.9})`,
|
|
12322
|
+
zIndex: 9999,
|
|
12323
|
+
width: "92%",
|
|
12324
|
+
maxWidth: "440px",
|
|
12325
|
+
opacity: isVisible ? 1 : 0,
|
|
12326
|
+
transition: "all 300ms cubic-bezier(0.34, 1.56, 0.64, 1)",
|
|
12327
|
+
}, children: jsxRuntime.jsxs("div", { style: {
|
|
12328
|
+
position: "relative",
|
|
12329
|
+
background: "linear-gradient(165deg, #0c4a6e 0%, #0e7490 40%, #0891b2 100%)",
|
|
12330
|
+
borderRadius: "28px",
|
|
12331
|
+
overflow: "hidden",
|
|
12332
|
+
boxShadow: "0 25px 60px -12px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255,255,255,0.1), inset 0 1px 0 rgba(255,255,255,0.2)",
|
|
12333
|
+
}, children: [Array.from({ length: 15 }).map((_, i) => (jsxRuntime.jsx("div", { style: {
|
|
12334
|
+
position: "absolute",
|
|
12335
|
+
left: `${5 + Math.random() * 90}%`,
|
|
12336
|
+
top: "-10px",
|
|
12337
|
+
fontSize: `${10 + Math.random() * 14}px`,
|
|
12338
|
+
color: "white",
|
|
12339
|
+
opacity: 0,
|
|
12340
|
+
animation: `promo-snow ${4 + Math.random() * 3}s linear infinite`,
|
|
12341
|
+
animationDelay: `${Math.random() * 4}s`,
|
|
12342
|
+
pointerEvents: "none",
|
|
12343
|
+
zIndex: 1,
|
|
12344
|
+
}, children: "\u2744" }, i))), jsxRuntime.jsxs("div", { style: {
|
|
12345
|
+
position: "relative",
|
|
12346
|
+
height: "180px",
|
|
12347
|
+
background: "linear-gradient(180deg, rgba(0,0,0,0) 0%, rgba(12,74,110,0.8) 100%)",
|
|
12348
|
+
display: "flex",
|
|
12349
|
+
alignItems: "center",
|
|
12350
|
+
justifyContent: "center",
|
|
12351
|
+
overflow: "hidden",
|
|
12352
|
+
}, children: [jsxRuntime.jsx("img", { src: "https://images.unsplash.com/photo-1502680390469-be75c86b636f?w=600&q=80", alt: "Surfer at sunset", style: {
|
|
12353
|
+
position: "absolute",
|
|
12354
|
+
inset: 0,
|
|
12355
|
+
width: "100%",
|
|
12356
|
+
height: "100%",
|
|
12357
|
+
objectFit: "cover",
|
|
12358
|
+
opacity: 0.6,
|
|
12359
|
+
} }), jsxRuntime.jsx("div", { style: {
|
|
12360
|
+
position: "absolute",
|
|
12361
|
+
inset: 0,
|
|
12362
|
+
background: "linear-gradient(180deg, rgba(12,74,110,0.3) 0%, rgba(12,74,110,0.95) 100%)",
|
|
12363
|
+
} }), jsxRuntime.jsx("div", { style: {
|
|
12364
|
+
position: "relative",
|
|
12365
|
+
zIndex: 2,
|
|
12366
|
+
fontSize: "64px",
|
|
12367
|
+
animation: "promo-float 3s ease-in-out infinite",
|
|
12368
|
+
filter: "drop-shadow(0 8px 16px rgba(0,0,0,0.4))",
|
|
12369
|
+
}, children: "\uD83C\uDFC4\u200D\u2642\uFE0F" }), jsxRuntime.jsx("div", { style: {
|
|
12370
|
+
position: "absolute",
|
|
12371
|
+
top: "16px",
|
|
12372
|
+
left: "20px",
|
|
12373
|
+
fontSize: "28px",
|
|
12374
|
+
animation: "promo-sparkle 2s ease-in-out infinite",
|
|
12375
|
+
}, children: "\uD83C\uDF84" }), jsxRuntime.jsx("div", { style: {
|
|
12376
|
+
position: "absolute",
|
|
12377
|
+
top: "20px",
|
|
12378
|
+
right: "20px",
|
|
12379
|
+
fontSize: "24px",
|
|
12380
|
+
animation: "promo-sparkle 2s ease-in-out infinite 0.5s",
|
|
12381
|
+
}, children: "\u2B50" })] }), jsxRuntime.jsx("button", { onClick: handleClose, style: {
|
|
12382
|
+
position: "absolute",
|
|
12383
|
+
top: "16px",
|
|
12384
|
+
right: "16px",
|
|
12385
|
+
width: "36px",
|
|
12386
|
+
height: "36px",
|
|
12387
|
+
borderRadius: "50%",
|
|
12388
|
+
border: "none",
|
|
12389
|
+
background: "rgba(0, 0, 0, 0.3)",
|
|
12390
|
+
backdropFilter: "blur(4px)",
|
|
12391
|
+
color: "white",
|
|
12392
|
+
fontSize: "22px",
|
|
12393
|
+
cursor: "pointer",
|
|
12394
|
+
display: "flex",
|
|
12395
|
+
alignItems: "center",
|
|
12396
|
+
justifyContent: "center",
|
|
12397
|
+
transition: "all 150ms ease",
|
|
12398
|
+
zIndex: 10,
|
|
12399
|
+
lineHeight: 1,
|
|
12400
|
+
}, onMouseEnter: (e) => {
|
|
12401
|
+
e.currentTarget.style.background = "rgba(0, 0, 0, 0.5)";
|
|
12402
|
+
e.currentTarget.style.transform = "scale(1.1)";
|
|
12403
|
+
}, onMouseLeave: (e) => {
|
|
12404
|
+
e.currentTarget.style.background = "rgba(0, 0, 0, 0.3)";
|
|
12405
|
+
e.currentTarget.style.transform = "scale(1)";
|
|
12406
|
+
}, children: "\u00D7" }), jsxRuntime.jsxs("div", { style: { padding: "28px 28px 32px", textAlign: "center", position: "relative", zIndex: 2 }, children: [jsxRuntime.jsx("h2", { style: {
|
|
12407
|
+
fontSize: "26px",
|
|
12408
|
+
fontWeight: "800",
|
|
12409
|
+
color: "white",
|
|
12410
|
+
marginBottom: "6px",
|
|
12411
|
+
textShadow: "0 2px 8px rgba(0,0,0,0.3)",
|
|
12412
|
+
letterSpacing: "-0.5px",
|
|
12413
|
+
}, children: "Frohe Weihnachten! \uD83C\uDF85" }), jsxRuntime.jsxs("p", { style: {
|
|
12414
|
+
fontSize: "17px",
|
|
12415
|
+
color: "rgba(255, 255, 255, 0.9)",
|
|
12416
|
+
marginBottom: "20px",
|
|
12417
|
+
lineHeight: 1.5,
|
|
12418
|
+
}, children: ["Schenk dir oder deinen Liebsten", jsxRuntime.jsx("br", {}), jsxRuntime.jsx("strong", { style: { color: "#fbbf24" }, children: "10% Rabatt" }), " auf alle Kurse!"] }), jsxRuntime.jsxs("div", { style: {
|
|
12419
|
+
background: "white",
|
|
12420
|
+
borderRadius: "16px",
|
|
12421
|
+
padding: "18px 20px",
|
|
12422
|
+
marginBottom: "20px",
|
|
12423
|
+
boxShadow: "0 8px 24px rgba(0,0,0,0.15), inset 0 -2px 0 rgba(0,0,0,0.05)",
|
|
12424
|
+
}, children: [jsxRuntime.jsx("p", { style: {
|
|
12425
|
+
fontSize: "11px",
|
|
12426
|
+
textTransform: "uppercase",
|
|
12427
|
+
letterSpacing: "1.5px",
|
|
12428
|
+
color: "#64748b",
|
|
12429
|
+
marginBottom: "10px",
|
|
12430
|
+
fontWeight: "600",
|
|
12431
|
+
}, children: "Dein Geschenk-Code" }), jsxRuntime.jsxs("div", { style: {
|
|
12432
|
+
display: "flex",
|
|
12433
|
+
alignItems: "center",
|
|
12434
|
+
justifyContent: "center",
|
|
12435
|
+
gap: "14px",
|
|
12436
|
+
}, children: [jsxRuntime.jsx("div", { style: {
|
|
12437
|
+
background: "linear-gradient(135deg, #dc2626 0%, #b91c1c 100%)",
|
|
12438
|
+
padding: "10px 20px",
|
|
12439
|
+
borderRadius: "10px",
|
|
12440
|
+
boxShadow: "0 4px 12px rgba(220, 38, 38, 0.3)",
|
|
12441
|
+
}, children: jsxRuntime.jsx("span", { style: {
|
|
12442
|
+
fontSize: "28px",
|
|
12443
|
+
fontWeight: "900",
|
|
12444
|
+
color: "white",
|
|
12445
|
+
letterSpacing: "6px",
|
|
12446
|
+
textShadow: "0 2px 4px rgba(0,0,0,0.2)",
|
|
12447
|
+
}, children: discountCode }) }), jsxRuntime.jsx("button", { onClick: handleCopyCode, style: {
|
|
12448
|
+
padding: "12px 16px",
|
|
12449
|
+
borderRadius: "10px",
|
|
12450
|
+
border: "2px solid",
|
|
12451
|
+
borderColor: copied ? "#22c55e" : "#e2e8f0",
|
|
12452
|
+
background: copied ? "#dcfce7" : "#f8fafc",
|
|
12453
|
+
color: copied ? "#15803d" : "#475569",
|
|
12454
|
+
fontSize: "13px",
|
|
12455
|
+
fontWeight: "600",
|
|
12456
|
+
cursor: "pointer",
|
|
12457
|
+
transition: "all 150ms ease",
|
|
12458
|
+
display: "flex",
|
|
12459
|
+
alignItems: "center",
|
|
12460
|
+
gap: "6px",
|
|
12461
|
+
whiteSpace: "nowrap",
|
|
12462
|
+
}, children: copied ? (jsxRuntime.jsx(jsxRuntime.Fragment, { children: "\u2713 Kopiert!" })) : (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsxs("svg", { width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2.5", children: [jsxRuntime.jsx("rect", { x: "9", y: "9", width: "13", height: "13", rx: "2", ry: "2" }), jsxRuntime.jsx("path", { d: "M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1" })] }), "Kopieren"] })) })] })] }), jsxRuntime.jsx("div", { style: {
|
|
12463
|
+
display: "flex",
|
|
12464
|
+
justifyContent: "center",
|
|
12465
|
+
gap: "8px",
|
|
12466
|
+
marginBottom: "20px",
|
|
12467
|
+
flexWrap: "wrap",
|
|
12468
|
+
}, children: ["🏄 Surfen", "🪁 Wingen", "🏄♀️ SUP", "💨 Windsurfen"].map((activity) => (jsxRuntime.jsx("span", { style: {
|
|
12469
|
+
background: "rgba(255,255,255,0.15)",
|
|
12470
|
+
backdropFilter: "blur(4px)",
|
|
12471
|
+
padding: "6px 12px",
|
|
12472
|
+
borderRadius: "20px",
|
|
12473
|
+
fontSize: "13px",
|
|
12474
|
+
color: "white",
|
|
12475
|
+
fontWeight: "500",
|
|
12476
|
+
}, children: activity }, activity))) }), jsxRuntime.jsxs("button", { onClick: handleCtaClick, style: {
|
|
12477
|
+
width: "100%",
|
|
12478
|
+
padding: "18px 24px",
|
|
12479
|
+
borderRadius: "14px",
|
|
12480
|
+
border: "none",
|
|
12481
|
+
background: "linear-gradient(135deg, #f59e0b 0%, #d97706 100%)",
|
|
12482
|
+
color: "white",
|
|
12483
|
+
fontSize: "18px",
|
|
12484
|
+
fontWeight: "700",
|
|
12485
|
+
cursor: "pointer",
|
|
12486
|
+
transition: "all 150ms ease",
|
|
12487
|
+
boxShadow: "0 8px 24px rgba(245, 158, 11, 0.4), inset 0 1px 0 rgba(255,255,255,0.2)",
|
|
12488
|
+
display: "flex",
|
|
12489
|
+
alignItems: "center",
|
|
12490
|
+
justifyContent: "center",
|
|
12491
|
+
gap: "10px",
|
|
12492
|
+
}, onMouseEnter: (e) => {
|
|
12493
|
+
e.currentTarget.style.transform = "translateY(-2px)";
|
|
12494
|
+
e.currentTarget.style.boxShadow = "0 12px 28px rgba(245, 158, 11, 0.5), inset 0 1px 0 rgba(255,255,255,0.2)";
|
|
12495
|
+
}, onMouseLeave: (e) => {
|
|
12496
|
+
e.currentTarget.style.transform = "translateY(0)";
|
|
12497
|
+
e.currentTarget.style.boxShadow = "0 8px 24px rgba(245, 158, 11, 0.4), inset 0 1px 0 rgba(255,255,255,0.2)";
|
|
12498
|
+
}, children: [jsxRuntime.jsx("span", { style: { animation: "promo-wave 2s ease-in-out infinite" }, children: "\uD83C\uDF81" }), "Jetzt Kurs buchen", jsxRuntime.jsx("span", { children: "\u2192" })] }), jsxRuntime.jsx("p", { style: {
|
|
12499
|
+
marginTop: "16px",
|
|
12500
|
+
fontSize: "12px",
|
|
12501
|
+
color: "rgba(255,255,255,0.6)",
|
|
12502
|
+
}, children: "G\u00FCltig f\u00FCr alle Buchungen bis 31. Dezember 2025" })] })] }) })] }));
|
|
12503
|
+
}
|
|
12504
|
+
|
|
12248
12505
|
// Predefined themes & Style Provider have been moved to ../styles/StyleProvider.tsx
|
|
12249
12506
|
// Main widget component
|
|
12250
12507
|
function UniversalBookingWidget({ config: baseConfig }) {
|
|
@@ -12287,6 +12544,9 @@ function UniversalBookingWidget({ config: baseConfig }) {
|
|
|
12287
12544
|
// PERFORMANCE OPTIMIZATION: Lazy component loading
|
|
12288
12545
|
const [shouldRenderInstanceSelection, setShouldRenderInstanceSelection] = React__default.useState(false);
|
|
12289
12546
|
const [shouldRenderBookingForm, setShouldRenderBookingForm] = React__default.useState(false);
|
|
12547
|
+
// Promo dialog state
|
|
12548
|
+
const [showPromoDialog, setShowPromoDialog] = React__default.useState(false);
|
|
12549
|
+
const [widgetContainerRef, setWidgetContainerRef] = React__default.useState(null);
|
|
12290
12550
|
// Determine initial step and load data
|
|
12291
12551
|
React__default.useEffect(() => {
|
|
12292
12552
|
const initializeWidget = async () => {
|
|
@@ -12361,6 +12621,46 @@ function UniversalBookingWidget({ config: baseConfig }) {
|
|
|
12361
12621
|
setShouldRenderBookingForm(true);
|
|
12362
12622
|
}
|
|
12363
12623
|
}, [currentStep, shouldRenderInstanceSelection, shouldRenderBookingForm]);
|
|
12624
|
+
// Promo dialog: show Xmas promo once per user during holiday season, prevent double-opening across multiple widgets
|
|
12625
|
+
React__default.useEffect(() => {
|
|
12626
|
+
// Only show during holiday season (December and January)
|
|
12627
|
+
const now = new Date();
|
|
12628
|
+
const month = now.getMonth(); // 0 = January, 11 = December
|
|
12629
|
+
const isHolidaySeason = month === 11 || month === 0; // December (11) or January (0)
|
|
12630
|
+
if (!isHolidaySeason) {
|
|
12631
|
+
return;
|
|
12632
|
+
}
|
|
12633
|
+
const promoId = "xmas-2024";
|
|
12634
|
+
const storageKey = `bigz-promo-${promoId}-shown`;
|
|
12635
|
+
const globalFlagKey = `__bigzPromoShown_${promoId}`;
|
|
12636
|
+
// Check if already shown in this session (localStorage) or claimed by another widget (global flag)
|
|
12637
|
+
const alreadyShown = localStorage.getItem(storageKey) === "true";
|
|
12638
|
+
const claimedByOtherWidget = window[globalFlagKey] === true;
|
|
12639
|
+
if (alreadyShown || claimedByOtherWidget) {
|
|
12640
|
+
return;
|
|
12641
|
+
}
|
|
12642
|
+
// Claim this promo for this widget instance (prevents other widgets from showing it)
|
|
12643
|
+
window[globalFlagKey] = true;
|
|
12644
|
+
// Show the dialog after a short delay for better UX
|
|
12645
|
+
const timer = setTimeout(() => {
|
|
12646
|
+
setShowPromoDialog(true);
|
|
12647
|
+
}, 1000);
|
|
12648
|
+
return () => clearTimeout(timer);
|
|
12649
|
+
}, []);
|
|
12650
|
+
// Handle promo dialog close
|
|
12651
|
+
const handlePromoDialogClose = () => {
|
|
12652
|
+
setShowPromoDialog(false);
|
|
12653
|
+
localStorage.setItem("bigz-promo-xmas-2024-shown", "true");
|
|
12654
|
+
};
|
|
12655
|
+
// Handle promo dialog CTA click - scroll to widget
|
|
12656
|
+
const handlePromoCtaClick = () => {
|
|
12657
|
+
setShowPromoDialog(false);
|
|
12658
|
+
localStorage.setItem("bigz-promo-xmas-2024-shown", "true");
|
|
12659
|
+
// Scroll to the widget container
|
|
12660
|
+
if (widgetContainerRef) {
|
|
12661
|
+
widgetContainerRef.scrollIntoView({ behavior: "smooth", block: "start" });
|
|
12662
|
+
}
|
|
12663
|
+
};
|
|
12364
12664
|
const loadEventTypes = async () => {
|
|
12365
12665
|
const requestBody = {
|
|
12366
12666
|
organizationId: config.organizationId,
|
|
@@ -12760,104 +13060,104 @@ function UniversalBookingWidget({ config: baseConfig }) {
|
|
|
12760
13060
|
// Main view based on view mode
|
|
12761
13061
|
if (viewMode === "next-events" && showingPreview) {
|
|
12762
13062
|
// Next events preview mode
|
|
12763
|
-
return (jsxRuntime.jsxs(StyleProvider, { config: config, children: [jsxRuntime.jsx(NextEventsPreview, { events: upcomingEvents, onEventSelect: handleUpcomingEventSelect, onShowAll: handleShowAllEvents, showAllButtonText: nextEventsSettings.showAllButtonText, showAllButton: nextEventsSettings.showAllButton, isLoadingEventDetails: isLoadingEventDetails, isLoadingShowAll: isLoadingShowAll, isLoading: isLoading }), shouldRenderBookingForm && eventDetails && (jsxRuntime.jsx(BookingForm, { config: config, eventDetails: eventDetails, stripePromise: stripePromise, onSuccess: handleBookingSuccess, onError: handleBookingError, onBackToEventInstances: () => {
|
|
12764
|
-
|
|
12765
|
-
|
|
12766
|
-
|
|
12767
|
-
|
|
12768
|
-
|
|
12769
|
-
|
|
12770
|
-
|
|
12771
|
-
|
|
12772
|
-
|
|
12773
|
-
|
|
12774
|
-
|
|
12775
|
-
|
|
12776
|
-
|
|
12777
|
-
|
|
12778
|
-
|
|
12779
|
-
|
|
12780
|
-
|
|
12781
|
-
|
|
12782
|
-
|
|
12783
|
-
|
|
12784
|
-
|
|
12785
|
-
|
|
12786
|
-
|
|
12787
|
-
|
|
12788
|
-
|
|
12789
|
-
|
|
12790
|
-
|
|
13063
|
+
return (jsxRuntime.jsxs(StyleProvider, { config: config, children: [jsxRuntime.jsxs("div", { ref: setWidgetContainerRef, children: [jsxRuntime.jsx(NextEventsPreview, { events: upcomingEvents, onEventSelect: handleUpcomingEventSelect, onShowAll: handleShowAllEvents, showAllButtonText: nextEventsSettings.showAllButtonText, showAllButton: nextEventsSettings.showAllButton, isLoadingEventDetails: isLoadingEventDetails, isLoadingShowAll: isLoadingShowAll, isLoading: isLoading }), shouldRenderBookingForm && eventDetails && (jsxRuntime.jsx(BookingForm, { config: config, eventDetails: eventDetails, stripePromise: stripePromise, onSuccess: handleBookingSuccess, onError: handleBookingError, onBackToEventInstances: () => {
|
|
13064
|
+
setCurrentStep("eventTypes");
|
|
13065
|
+
setShowingPreview(true);
|
|
13066
|
+
setEventDetails(null);
|
|
13067
|
+
}, onBackToEventTypes: () => {
|
|
13068
|
+
setCurrentStep("eventTypes");
|
|
13069
|
+
setShowingPreview(true);
|
|
13070
|
+
setEventDetails(null);
|
|
13071
|
+
}, selectedEventType: selectedEventType, selectedEventInstance: selectedEventInstance, isOpen: currentStep === "booking" && !!eventDetails, onClose: () => {
|
|
13072
|
+
setCurrentStep("eventTypes");
|
|
13073
|
+
setShowingPreview(true);
|
|
13074
|
+
setEventDetails(null);
|
|
13075
|
+
}, systemConfig: systemConfig })), jsxRuntime.jsx(BookingSuccessModal, { isOpen: isSuccess, onClose: () => {
|
|
13076
|
+
setIsSuccess(false);
|
|
13077
|
+
setCurrentStep("eventTypes");
|
|
13078
|
+
setShowingPreview(true);
|
|
13079
|
+
// Reset state
|
|
13080
|
+
setSuccessPaymentIntentId(null);
|
|
13081
|
+
// Reset lazy loading flags
|
|
13082
|
+
setShouldRenderInstanceSelection(false);
|
|
13083
|
+
setShouldRenderBookingForm(false);
|
|
13084
|
+
// Clean up URL to remove Stripe parameters
|
|
13085
|
+
const url = new URL(window.location.href);
|
|
13086
|
+
url.searchParams.delete("payment_intent");
|
|
13087
|
+
url.searchParams.delete("payment_intent_client_secret");
|
|
13088
|
+
url.searchParams.delete("redirect_status");
|
|
13089
|
+
window.history.replaceState({}, "", url.toString());
|
|
13090
|
+
}, config: config, onError: setError, paymentIntentId: successPaymentIntentId })] }), showPromoDialog && (jsxRuntime.jsx(PromoDialog, { onClose: handlePromoDialogClose, onCtaClick: handlePromoCtaClick }))] }));
|
|
12791
13091
|
}
|
|
12792
13092
|
if (viewMode === "next-events" && !showingPreview && currentStep === "eventInstances") {
|
|
12793
13093
|
// Show all events for the single event type
|
|
12794
|
-
return (jsxRuntime.jsxs(StyleProvider, { config: config, children: [shouldRenderInstanceSelection && (jsxRuntime.jsx(EventInstanceSelection, { eventInstances: eventInstances, selectedEventType: selectedEventType, onEventInstanceSelect: handleEventInstanceSelect, onBackToEventTypes: () => {
|
|
12795
|
-
|
|
12796
|
-
|
|
12797
|
-
|
|
12798
|
-
|
|
12799
|
-
|
|
12800
|
-
|
|
12801
|
-
|
|
12802
|
-
|
|
12803
|
-
|
|
12804
|
-
|
|
12805
|
-
|
|
12806
|
-
|
|
12807
|
-
|
|
12808
|
-
|
|
12809
|
-
|
|
12810
|
-
|
|
12811
|
-
|
|
12812
|
-
|
|
12813
|
-
|
|
12814
|
-
|
|
12815
|
-
|
|
13094
|
+
return (jsxRuntime.jsxs(StyleProvider, { config: config, children: [jsxRuntime.jsxs("div", { ref: setWidgetContainerRef, children: [shouldRenderInstanceSelection && (jsxRuntime.jsx(EventInstanceSelection, { eventInstances: eventInstances, selectedEventType: selectedEventType, onEventInstanceSelect: handleEventInstanceSelect, onBackToEventTypes: () => {
|
|
13095
|
+
setShowingPreview(true);
|
|
13096
|
+
setCurrentStep("eventTypes");
|
|
13097
|
+
}, isOpen: currentStep === "eventInstances", onClose: () => {
|
|
13098
|
+
setShowingPreview(true);
|
|
13099
|
+
setCurrentStep("eventTypes");
|
|
13100
|
+
}, isLoadingEventInstances: isLoadingEventInstances, isLoadingEventDetails: isLoadingEventDetails })), jsxRuntime.jsx(BookingSuccessModal, { isOpen: isSuccess, onClose: () => {
|
|
13101
|
+
setIsSuccess(false);
|
|
13102
|
+
setCurrentStep("eventTypes");
|
|
13103
|
+
setShowingPreview(true);
|
|
13104
|
+
// Reset state
|
|
13105
|
+
setSuccessPaymentIntentId(null);
|
|
13106
|
+
// Reset lazy loading flags
|
|
13107
|
+
setShouldRenderInstanceSelection(false);
|
|
13108
|
+
setShouldRenderBookingForm(false);
|
|
13109
|
+
// Clean up URL to remove Stripe parameters
|
|
13110
|
+
const url = new URL(window.location.href);
|
|
13111
|
+
url.searchParams.delete("payment_intent");
|
|
13112
|
+
url.searchParams.delete("payment_intent_client_secret");
|
|
13113
|
+
url.searchParams.delete("redirect_status");
|
|
13114
|
+
window.history.replaceState({}, "", url.toString());
|
|
13115
|
+
}, config: config, onError: setError, paymentIntentId: successPaymentIntentId })] }), showPromoDialog && (jsxRuntime.jsx(PromoDialog, { onClose: handlePromoDialogClose, onCtaClick: handlePromoCtaClick }))] }));
|
|
12816
13116
|
}
|
|
12817
13117
|
if (viewMode === "button" && (isSingleEventTypeMode || isDirectInstanceMode)) {
|
|
12818
13118
|
// Button mode - show button that opens sidebar/booking directly
|
|
12819
|
-
return (jsxRuntime.
|
|
12820
|
-
|
|
12821
|
-
|
|
12822
|
-
|
|
12823
|
-
|
|
12824
|
-
|
|
12825
|
-
|
|
12826
|
-
|
|
12827
|
-
|
|
12828
|
-
|
|
12829
|
-
|
|
12830
|
-
|
|
12831
|
-
|
|
12832
|
-
|
|
12833
|
-
|
|
12834
|
-
|
|
12835
|
-
|
|
12836
|
-
|
|
12837
|
-
|
|
12838
|
-
|
|
12839
|
-
|
|
12840
|
-
|
|
12841
|
-
|
|
12842
|
-
|
|
12843
|
-
|
|
12844
|
-
|
|
12845
|
-
|
|
12846
|
-
|
|
12847
|
-
|
|
12848
|
-
|
|
12849
|
-
|
|
12850
|
-
|
|
12851
|
-
|
|
12852
|
-
|
|
12853
|
-
|
|
12854
|
-
|
|
12855
|
-
|
|
12856
|
-
|
|
12857
|
-
|
|
12858
|
-
|
|
12859
|
-
|
|
12860
|
-
|
|
13119
|
+
return (jsxRuntime.jsxs(StyleProvider, { config: config, children: [jsxRuntime.jsxs("div", { ref: setWidgetContainerRef, style: {
|
|
13120
|
+
display: "flex",
|
|
13121
|
+
justifyContent: "center",
|
|
13122
|
+
alignItems: "center",
|
|
13123
|
+
minHeight: "120px",
|
|
13124
|
+
}, children: [jsxRuntime.jsx("button", { type: "button", style: {
|
|
13125
|
+
backgroundColor: "var(--bw-highlight-color)",
|
|
13126
|
+
color: "white",
|
|
13127
|
+
padding: "16px 32px",
|
|
13128
|
+
border: "none",
|
|
13129
|
+
borderRadius: "var(--bw-border-radius)",
|
|
13130
|
+
fontSize: "18px",
|
|
13131
|
+
fontWeight: 600,
|
|
13132
|
+
fontFamily: "var(--bw-font-family)",
|
|
13133
|
+
boxShadow: "var(--bw-shadow-md)",
|
|
13134
|
+
cursor: "pointer",
|
|
13135
|
+
}, onClick: () => {
|
|
13136
|
+
if (isDirectInstanceMode) {
|
|
13137
|
+
setCurrentStep("booking");
|
|
13138
|
+
setShouldRenderBookingForm(true);
|
|
13139
|
+
}
|
|
13140
|
+
else {
|
|
13141
|
+
setSidebarOpen(true);
|
|
13142
|
+
setShouldRenderInstanceSelection(true);
|
|
13143
|
+
}
|
|
13144
|
+
}, children: config.buttonText ||
|
|
13145
|
+
(isDirectInstanceMode ? "Jetzt buchen" : "Jetzt Termin auswählen") }), shouldRenderInstanceSelection && (jsxRuntime.jsx(EventInstanceSelection, { eventInstances: eventInstances, selectedEventType: selectedEventType, onEventInstanceSelect: handleEventInstanceSelect, onBackToEventTypes: () => setSidebarOpen(false), isOpen: sidebarOpen, onClose: () => setSidebarOpen(false), isLoadingEventInstances: isLoadingEventInstances, isLoadingEventDetails: isLoadingEventDetails })), shouldRenderBookingForm && eventDetails && (jsxRuntime.jsx(BookingForm, { config: config, eventDetails: eventDetails, stripePromise: stripePromise, onSuccess: handleBookingSuccess, onError: handleBookingError, onBackToEventInstances: () => setCurrentStep(isDirectInstanceMode ? "eventTypes" : "eventInstances"), onBackToEventTypes: () => setSidebarOpen(false), selectedEventType: selectedEventType, selectedEventInstance: selectedEventInstance, isOpen: currentStep === "booking" && !!eventDetails, onClose: () => setCurrentStep(isDirectInstanceMode ? "eventTypes" : "eventInstances"), systemConfig: systemConfig })), jsxRuntime.jsx(BookingSuccessModal, { isOpen: isSuccess, onClose: () => {
|
|
13146
|
+
setIsSuccess(false);
|
|
13147
|
+
setCurrentStep("eventTypes");
|
|
13148
|
+
setSidebarOpen(false);
|
|
13149
|
+
// Reset state
|
|
13150
|
+
setSuccessPaymentIntentId(null);
|
|
13151
|
+
// Reset lazy loading flags
|
|
13152
|
+
setShouldRenderInstanceSelection(false);
|
|
13153
|
+
setShouldRenderBookingForm(false);
|
|
13154
|
+
// Clean up URL to remove Stripe parameters
|
|
13155
|
+
const url = new URL(window.location.href);
|
|
13156
|
+
url.searchParams.delete("payment_intent");
|
|
13157
|
+
url.searchParams.delete("payment_intent_client_secret");
|
|
13158
|
+
url.searchParams.delete("redirect_status");
|
|
13159
|
+
window.history.replaceState({}, "", url.toString());
|
|
13160
|
+
}, config: config, onError: setError, paymentIntentId: successPaymentIntentId })] }), showPromoDialog && (jsxRuntime.jsx(PromoDialog, { onClose: handlePromoDialogClose, onCtaClick: handlePromoCtaClick }))] }));
|
|
12861
13161
|
}
|
|
12862
13162
|
// Cards mode (default) - show event type selection
|
|
12863
13163
|
const cardsView = (jsxRuntime.jsx(EventTypeSelection, { eventTypes: eventTypes, onEventTypeSelect: handleEventTypeSelect, isLoading: isLoading, skeletonCount: getSkeletonCount() }));
|
|
@@ -12890,21 +13190,21 @@ function UniversalBookingWidget({ config: baseConfig }) {
|
|
|
12890
13190
|
};
|
|
12891
13191
|
};
|
|
12892
13192
|
const backHandlers = getBackHandlers();
|
|
12893
|
-
return (jsxRuntime.jsxs(StyleProvider, { config: config, children: [cardsView, shouldRenderInstanceSelection && (jsxRuntime.jsx(EventInstanceSelection, { eventInstances: eventInstances, selectedEventType: selectedEventType, onEventInstanceSelect: handleEventInstanceSelect, onBackToEventTypes: handleBackToEventTypes, isOpen: currentStep === "eventInstances", onClose: handleBackToEventTypes, isLoadingEventInstances: isLoadingEventInstances, isLoadingEventDetails: isLoadingEventDetails })), shouldRenderBookingForm && eventDetails && (jsxRuntime.jsx(BookingForm, { config: config, eventDetails: eventDetails, stripePromise: stripePromise, onSuccess: handleBookingSuccess, onError: handleBookingError, onBackToEventInstances: backHandlers.onBackToEventInstances, onBackToEventTypes: backHandlers.onBackToEventTypes, selectedEventType: selectedEventType, selectedEventInstance: selectedEventInstance, isOpen: currentStep === "booking" && !!eventDetails, onClose: backHandlers.onClose, systemConfig: systemConfig })), jsxRuntime.jsx(BookingSuccessModal, { isOpen: isSuccess, onClose: () => {
|
|
12894
|
-
|
|
12895
|
-
|
|
12896
|
-
|
|
12897
|
-
|
|
12898
|
-
|
|
12899
|
-
|
|
12900
|
-
|
|
12901
|
-
|
|
12902
|
-
|
|
12903
|
-
|
|
12904
|
-
|
|
12905
|
-
|
|
12906
|
-
|
|
12907
|
-
|
|
13193
|
+
return (jsxRuntime.jsxs(StyleProvider, { config: config, children: [jsxRuntime.jsxs("div", { ref: setWidgetContainerRef, children: [cardsView, shouldRenderInstanceSelection && (jsxRuntime.jsx(EventInstanceSelection, { eventInstances: eventInstances, selectedEventType: selectedEventType, onEventInstanceSelect: handleEventInstanceSelect, onBackToEventTypes: handleBackToEventTypes, isOpen: currentStep === "eventInstances", onClose: handleBackToEventTypes, isLoadingEventInstances: isLoadingEventInstances, isLoadingEventDetails: isLoadingEventDetails })), shouldRenderBookingForm && eventDetails && (jsxRuntime.jsx(BookingForm, { config: config, eventDetails: eventDetails, stripePromise: stripePromise, onSuccess: handleBookingSuccess, onError: handleBookingError, onBackToEventInstances: backHandlers.onBackToEventInstances, onBackToEventTypes: backHandlers.onBackToEventTypes, selectedEventType: selectedEventType, selectedEventInstance: selectedEventInstance, isOpen: currentStep === "booking" && !!eventDetails, onClose: backHandlers.onClose, systemConfig: systemConfig })), jsxRuntime.jsx(BookingSuccessModal, { isOpen: isSuccess, onClose: () => {
|
|
13194
|
+
setIsSuccess(false);
|
|
13195
|
+
setCurrentStep("eventTypes");
|
|
13196
|
+
// Reset state
|
|
13197
|
+
setSuccessPaymentIntentId(null);
|
|
13198
|
+
// Reset lazy loading flags
|
|
13199
|
+
setShouldRenderInstanceSelection(false);
|
|
13200
|
+
setShouldRenderBookingForm(false);
|
|
13201
|
+
// Clean up URL to remove Stripe parameters
|
|
13202
|
+
const url = new URL(window.location.href);
|
|
13203
|
+
url.searchParams.delete("payment_intent");
|
|
13204
|
+
url.searchParams.delete("payment_intent_client_secret");
|
|
13205
|
+
url.searchParams.delete("redirect_status");
|
|
13206
|
+
window.history.replaceState({}, "", url.toString());
|
|
13207
|
+
}, config: config, onError: setError, paymentIntentId: successPaymentIntentId })] }), showPromoDialog && (jsxRuntime.jsx(PromoDialog, { onClose: handlePromoDialogClose, onCtaClick: handlePromoCtaClick }))] }));
|
|
12908
13208
|
}
|
|
12909
13209
|
|
|
12910
13210
|
// Export init function for vanilla JS usage
|