@bigz-app/booking-widget 0.1.21 → 0.1.23
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 +144 -29
- package/dist/booking-widget.js.map +1 -1
- package/dist/components/EventTypeDetailsDialog.d.ts +7 -3
- package/dist/components/EventTypeDetailsDialog.d.ts.map +1 -1
- package/dist/components/EventTypeSelection.d.ts +7 -3
- package/dist/components/EventTypeSelection.d.ts.map +1 -1
- package/dist/components/PaymentForm.d.ts.map +1 -1
- package/dist/components/UniversalBookingWidget.d.ts +7 -3
- package/dist/components/UniversalBookingWidget.d.ts.map +1 -1
- package/dist/index.cjs +144 -29
- package/dist/index.cjs.map +1 -1
- package/dist/index.esm.js +144 -29
- package/dist/index.esm.js.map +1 -1
- package/package.json +1 -1
|
@@ -10,9 +10,13 @@ interface EventType {
|
|
|
10
10
|
color: string;
|
|
11
11
|
};
|
|
12
12
|
nextAvailableDate: string | null;
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
13
|
+
minPrice: number;
|
|
14
|
+
maxPrice: number;
|
|
15
|
+
minDuration: number;
|
|
16
|
+
maxDuration: number;
|
|
17
|
+
groupedDurations: string;
|
|
18
|
+
cheapestDurationDays: number;
|
|
19
|
+
cheapestDurationPerDay: number;
|
|
16
20
|
maxParticipants: number;
|
|
17
21
|
availableInstancesCount: number;
|
|
18
22
|
hasAvailableInstances: boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"EventTypeDetailsDialog.d.ts","sourceRoot":"","sources":["../../src/components/EventTypeDetailsDialog.tsx"],"names":[],"mappings":"AAWA,UAAU,SAAS;IAClB,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,CAAC;IACjC,
|
|
1
|
+
{"version":3,"file":"EventTypeDetailsDialog.d.ts","sourceRoot":"","sources":["../../src/components/EventTypeDetailsDialog.tsx"],"names":[],"mappings":"AAWA,UAAU,SAAS;IAClB,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,CAAC;IACjC,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,EAAE,MAAM,CAAC;IACjB,WAAW,EAAE,MAAM,CAAC;IACpB,WAAW,EAAE,MAAM,CAAC;IACpB,gBAAgB,EAAE,MAAM,CAAC;IACzB,oBAAoB,EAAE,MAAM,CAAC;IAC7B,sBAAsB,EAAE,MAAM,CAAC;IAC/B,eAAe,EAAE,MAAM,CAAC;IACxB,uBAAuB,EAAE,MAAM,CAAC;IAChC,qBAAqB,EAAE,OAAO,CAAC;CAC/B;AAED,UAAU,2BAA2B;IACpC,MAAM,EAAE,OAAO,CAAC;IAChB,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,SAAS,EAAE,SAAS,GAAG,IAAI,CAAC;IAC5B,iBAAiB,EAAE,CAAC,SAAS,EAAE,SAAS,KAAK,IAAI,CAAC;CAClD;AAmKD,wBAAgB,sBAAsB,CAAC,EACtC,MAAM,EACN,OAAO,EACP,SAAS,EACT,iBAAiB,GACjB,EAAE,2BAA2B,kDA8Z7B"}
|
|
@@ -10,9 +10,13 @@ interface EventType {
|
|
|
10
10
|
color: string;
|
|
11
11
|
};
|
|
12
12
|
nextAvailableDate: string | null;
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
13
|
+
minPrice: number;
|
|
14
|
+
maxPrice: number;
|
|
15
|
+
minDuration: number;
|
|
16
|
+
maxDuration: number;
|
|
17
|
+
groupedDurations: string;
|
|
18
|
+
cheapestDurationDays: number;
|
|
19
|
+
cheapestDurationPerDay: number;
|
|
16
20
|
maxParticipants: number;
|
|
17
21
|
availableInstancesCount: number;
|
|
18
22
|
hasAvailableInstances: boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"EventTypeSelection.d.ts","sourceRoot":"","sources":["../../src/components/EventTypeSelection.tsx"],"names":[],"mappings":"AAMA,UAAU,SAAS;IAClB,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,CAAC;IACjC,
|
|
1
|
+
{"version":3,"file":"EventTypeSelection.d.ts","sourceRoot":"","sources":["../../src/components/EventTypeSelection.tsx"],"names":[],"mappings":"AAMA,UAAU,SAAS;IAClB,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,E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C,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACjC,YAAY,CAAC,EAAE;QACd,UAAU,EAAE,MAAM,CAAC;QACnB,oBAAoB,EAAE,MAAM,CAAC;QAC7B,kBAAkB,CAAC,EAAE,MAAM,CAAC;KAC5B,GAAG,IAAI,CAAC;IACT,aAAa,EAAE,GAAG,CAAC;IACnB,gBAAgB,CAAC,EAAE,GAAG,CAAC;CACvB;
|
|
1
|
+
{"version":3,"file":"PaymentForm.d.ts","sourceRoot":"","sources":["../../src/components/PaymentForm.tsx"],"names":[],"mappings":"AAIA,UAAU,gBAAgB;IACzB,MAAM,EAAE,GAAG,CAAC;IACZ,YAAY,EAAE,GAAG,CAAC;IAClB,QAAQ,EAAE,GAAG,CAAC;IACd,WAAW,EAAE,MAAM,CAAC;IACpB,YAAY,EAAE,GAAG,CAAC;IAClB,SAAS,EAAE,CAAC,MAAM,EAAE,GAAG,KAAK,IAAI,CAAC;IACjC,OAAO,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACjC,YAAY,CAAC,EAAE;QACd,UAAU,EAAE,MAAM,CAAC;QACnB,oBAAoB,EAAE,MAAM,CAAC;QAC7B,kBAAkB,CAAC,EAAE,MAAM,CAAC;KAC5B,GAAG,IAAI,CAAC;IACT,aAAa,EAAE,GAAG,CAAC;IACnB,gBAAgB,CAAC,EAAE,GAAG,CAAC;CACvB;AAyUD,wBAAgB,WAAW,CAAC,EAC3B,MAAM,EACN,YAAY,EACZ,QAAQ,EACR,WAAW,EACX,YAAY,EACZ,SAAS,EACT,OAAO,EACP,YAAY,EACZ,aAAa,EACb,gBAAgB,GAChB,EAAE,gBAAgB,2CA2MlB"}
|
|
@@ -10,9 +10,13 @@ export interface EventType {
|
|
|
10
10
|
color: string;
|
|
11
11
|
};
|
|
12
12
|
nextAvailableDate: string | null;
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
13
|
+
minPrice: number;
|
|
14
|
+
maxPrice: number;
|
|
15
|
+
minDuration: number;
|
|
16
|
+
maxDuration: number;
|
|
17
|
+
groupedDurations: string;
|
|
18
|
+
cheapestDurationDays: number;
|
|
19
|
+
cheapestDurationPerDay: number;
|
|
16
20
|
maxParticipants: number;
|
|
17
21
|
availableInstancesCount: number;
|
|
18
22
|
hasAvailableInstances: boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"UniversalBookingWidget.d.ts","sourceRoot":"","sources":["../../src/components/UniversalBookingWidget.tsx"],"names":[],"mappings":"AAmBA,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,CAAC;IACjC,
|
|
1
|
+
{"version":3,"file":"UniversalBookingWidget.d.ts","sourceRoot":"","sources":["../../src/components/UniversalBookingWidget.tsx"],"names":[],"mappings":"AAmBA,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,CAAC;IACjC,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,EAAE,MAAM,CAAC;IACjB,WAAW,EAAE,MAAM,CAAC;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CAAC;QACpC,SAAS,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;KACnC,CAAC;IAGF,KAAK,CAAC,EACH,aAAa,GACb,eAAe,GACf,eAAe,GACf,oBAAoB,GACpB,YAAY,GACZ,aAAa,GACb,aAAa,GACb,aAAa,GACb,aAAa,GACb,gBAAgB,CAAC;IACpB,MAAM,CAAC,EAAE;QAER,SAAS,CAAC,EAAE,MAAM,CAAC;QACnB,UAAU,CAAC,EAAE,MAAM,CAAC;QACpB,OAAO,CAAC,EAAE,MAAM,CAAC;QACjB,IAAI,CAAC,EAAE,MAAM,CAAC;QACd,MAAM,CAAC,EAAE,MAAM,CAAC;QAChB,OAAO,CAAC,EAAE,MAAM,CAAC;QACjB,OAAO,CAAC,EAAE,MAAM,CAAC;QACjB,KAAK,CAAC,EAAE,MAAM,CAAC;KACf,CAAC;IACF,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,UAAU,CAAC,EAAE,MAAM,CAAC;IAGpB,UAAU,CAAC,EAAE,MAAM,CAAC;IAEpB,MAAM,CAAC,EAAE,MAAM,CAAC;IAGhB,SAAS,CAAC,EAAE,CAAC,MAAM,EAAE,GAAG,KAAK,IAAI,CAAC;IAClC,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;CAClC;AA0bD,wBAAgB,sBAAsB,CAAC,EAAE,MAAM,EAAE,UAAU,EAAE,EAAE;IAAE,MAAM,EAAE,sBAAsB,CAAA;CAAE,2CAg3BhG"}
|
package/dist/index.cjs
CHANGED
|
@@ -7004,17 +7004,18 @@ function EventTypeDetailsDialog({ isOpen, onClose, eventType, onEventTypeSelect,
|
|
|
7004
7004
|
backgroundColor: "var(--bw-background-color)",
|
|
7005
7005
|
borderRadius: "var(--bw-border-radius)",
|
|
7006
7006
|
border: `1px solid var(--bw-border-color)`,
|
|
7007
|
-
}, children: [jsxRuntime.jsxs("div", { children: [jsxRuntime.jsx("div", { style: {
|
|
7008
|
-
|
|
7009
|
-
color: "var(--bw-text-
|
|
7007
|
+
}, children: [jsxRuntime.jsxs("div", { children: [jsxRuntime.jsx("div", { className: "bw-event-type-price", style: {
|
|
7008
|
+
fontWeight: "700",
|
|
7009
|
+
color: "var(--bw-text-color)",
|
|
7010
7010
|
fontFamily: "var(--bw-font-family)",
|
|
7011
|
-
|
|
7012
|
-
}, children:
|
|
7013
|
-
fontSize: "32px",
|
|
7011
|
+
textAlign: "left",
|
|
7012
|
+
}, children: eventType.groupedDurations && jsxRuntime.jsx("span", { children: eventType.groupedDurations }) }), jsxRuntime.jsx("div", { className: "bw-event-type-price", style: {
|
|
7013
|
+
fontSize: "clamp(1.72rem, 4vw, 32px)",
|
|
7014
7014
|
fontWeight: "700",
|
|
7015
7015
|
color: "var(--bw-text-color)",
|
|
7016
7016
|
fontFamily: "var(--bw-font-family)",
|
|
7017
|
-
|
|
7017
|
+
textAlign: "right",
|
|
7018
|
+
}, children: jsxRuntime.jsxs("span", { children: ["ab ", formatCurrency(eventType.minPrice)] }) })] }), isAvailable && (jsxRuntime.jsxs("button", { onClick: handleBookingClick, style: {
|
|
7018
7019
|
backgroundColor: "var(--bw-highlight-color)",
|
|
7019
7020
|
color: "white",
|
|
7020
7021
|
padding: "14px 28px",
|
|
@@ -7589,10 +7590,10 @@ function EventTypeSelection({ eventTypes, onEventTypeSelect, isLoading = false,
|
|
|
7589
7590
|
e.currentTarget.style.color = "var(--bw-highlight-color)";
|
|
7590
7591
|
e.currentTarget.style.transform = "translateY(0)";
|
|
7591
7592
|
}, children: [jsxRuntime.jsx("span", { style: { fontSize: "16px" }, children: "\uD83D\uDD04" }), "Seite neu laden"] })] }) })) : (jsxRuntime.jsx("div", { className: "bw-event-type-list", style: { padding: "0px 0px" }, children: jsxRuntime.jsx("div", { style: {
|
|
7592
|
-
display: "
|
|
7593
|
-
|
|
7594
|
-
justifyContent: "center",
|
|
7593
|
+
display: "grid",
|
|
7594
|
+
gridTemplateColumns: "repeat(auto-fill, minmax(350px, 1fr))",
|
|
7595
7595
|
gap: "24px",
|
|
7596
|
+
gridAutoRows: "1fr",
|
|
7596
7597
|
}, children: eventTypes.map((eventType) => {
|
|
7597
7598
|
const isAvailable = eventType.hasAvailableInstances;
|
|
7598
7599
|
return (jsxRuntime.jsxs("div", { className: "bw-event-type-card", style: {
|
|
@@ -7600,16 +7601,11 @@ function EventTypeSelection({ eventTypes, onEventTypeSelect, isLoading = false,
|
|
|
7600
7601
|
backgroundColor: "var(--bw-surface-color)",
|
|
7601
7602
|
border: `1px solid var(--bw-border-color)`,
|
|
7602
7603
|
borderRadius: "var(--bw-border-radius)",
|
|
7603
|
-
overflow: "hidden",
|
|
7604
7604
|
transition: "all 0.3s ease",
|
|
7605
7605
|
cursor: isAvailable ? "pointer" : "not-allowed",
|
|
7606
7606
|
opacity: isAvailable ? 1 : 0.6,
|
|
7607
7607
|
boxShadow: "var(--bw-shadow-md)",
|
|
7608
7608
|
fontFamily: "var(--bw-font-family)",
|
|
7609
|
-
maxWidth: "500px",
|
|
7610
|
-
flex: "1 1 350px",
|
|
7611
|
-
display: "flex",
|
|
7612
|
-
flexDirection: "column",
|
|
7613
7609
|
}, onClick: () => isAvailable && onEventTypeSelect(eventType), onMouseEnter: (e) => {
|
|
7614
7610
|
if (isAvailable) {
|
|
7615
7611
|
e.currentTarget.style.boxShadow = "var(--bw-shadow-lg)";
|
|
@@ -7636,7 +7632,12 @@ function EventTypeSelection({ eventTypes, onEventTypeSelect, isLoading = false,
|
|
|
7636
7632
|
padding: "3px 8px",
|
|
7637
7633
|
borderRadius: "var(--bw-border-radius)",
|
|
7638
7634
|
fontFamily: "var(--bw-font-family)",
|
|
7639
|
-
}, children: eventType.category.name }) }), jsxRuntime.jsx("div", { className: "bw-event-type-img", style: { position: "relative", width: "100%", height: "300px" }, children: jsxRuntime.jsx(ImageCarousel, { images: eventType.images, eventName: eventType.name }) }), jsxRuntime.jsxs("div", { className: "bw-event-type-content", style: {
|
|
7635
|
+
}, children: eventType.category.name }) }), jsxRuntime.jsx("div", { className: "bw-event-type-img", style: { position: "relative", width: "100%", height: "300px" }, children: jsxRuntime.jsx(ImageCarousel, { images: eventType.images, eventName: eventType.name }) }), jsxRuntime.jsxs("div", { className: "bw-event-type-content", style: {
|
|
7636
|
+
padding: "12px 18px",
|
|
7637
|
+
display: "flex",
|
|
7638
|
+
flexDirection: "column",
|
|
7639
|
+
justifyContent: "space-between",
|
|
7640
|
+
}, children: [jsxRuntime.jsx("h2", { className: "bw-event-type-title", style: {
|
|
7640
7641
|
fontSize: "clamp(1.1rem, 2.5vw, 24px)",
|
|
7641
7642
|
fontWeight: "700",
|
|
7642
7643
|
color: "var(--bw-text-color)",
|
|
@@ -7689,9 +7690,7 @@ function EventTypeSelection({ eventTypes, onEventTypeSelect, isLoading = false,
|
|
|
7689
7690
|
overflow: "hidden",
|
|
7690
7691
|
whiteSpace: "nowrap",
|
|
7691
7692
|
flex: "1",
|
|
7692
|
-
}, children: highlight.trim() })] }, index))) }) })) : (
|
|
7693
|
-
// Fallback to description with React Markdown
|
|
7694
|
-
eventType.description && (jsxRuntime.jsx("div", { className: "bw-event-type-desc", style: {
|
|
7693
|
+
}, children: highlight.trim() })] }, index))) }) })) : eventType.description ? (jsxRuntime.jsx("div", { className: "bw-event-type-desc", style: {
|
|
7695
7694
|
color: "var(--bw-text-muted)",
|
|
7696
7695
|
fontSize: "clamp(0.95rem, 2vw, 16px)",
|
|
7697
7696
|
lineHeight: "1.6",
|
|
@@ -7708,13 +7707,30 @@ function EventTypeSelection({ eventTypes, onEventTypeSelect, isLoading = false,
|
|
|
7708
7707
|
overflow: "hidden",
|
|
7709
7708
|
}, children: Markdown({
|
|
7710
7709
|
children: preprocessMarkdown(eventType.description),
|
|
7711
|
-
}) }) }))
|
|
7710
|
+
}) }) })) : (jsxRuntime.jsx("div", { className: "bw-event-type-desc", style: {
|
|
7711
|
+
color: "var(--bw-text-muted)",
|
|
7712
|
+
fontSize: "clamp(0.95rem, 2vw, 16px)",
|
|
7713
|
+
lineHeight: "1.6",
|
|
7714
|
+
fontFamily: "var(--bw-font-family)",
|
|
7715
|
+
margin: "10px 0 10px 0",
|
|
7716
|
+
minHeight: "128px",
|
|
7717
|
+
maxHeight: "128px",
|
|
7718
|
+
overflow: "hidden",
|
|
7719
|
+
textAlign: "left",
|
|
7720
|
+
}, children: "\u00A0" })) }), jsxRuntime.jsxs("div", { children: [jsxRuntime.jsx("div", { className: "bw-event-type-price", style: {
|
|
7721
|
+
fontWeight: "700",
|
|
7722
|
+
color: "var(--bw-text-color)",
|
|
7723
|
+
fontFamily: "var(--bw-font-family)",
|
|
7724
|
+
textAlign: "right",
|
|
7725
|
+
}, children: eventType.groupedDurations.length > 1 ? (jsxRuntime.jsx("span", { children: eventType.groupedDurations })) : (jsxRuntime.jsx("span", { children: eventType.cheapestDurationPerDay % 60 === 0
|
|
7726
|
+
? `${eventType.cheapestDurationPerDay / 60} Stunde${eventType.cheapestDurationPerDay / 60 > 1 ? "n" : ""}`
|
|
7727
|
+
: `${eventType.cheapestDurationPerDay} Minuten` })) }), jsxRuntime.jsx("div", { className: "bw-event-type-price", style: {
|
|
7712
7728
|
fontSize: "clamp(1.72rem, 4vw, 32px)",
|
|
7713
7729
|
fontWeight: "700",
|
|
7714
7730
|
color: "var(--bw-text-color)",
|
|
7715
7731
|
fontFamily: "var(--bw-font-family)",
|
|
7716
7732
|
textAlign: "right",
|
|
7717
|
-
}, children: formatCurrency(eventType.
|
|
7733
|
+
}, children: jsxRuntime.jsxs("span", { children: ["ab ", formatCurrency(eventType.minPrice)] }) })] }), jsxRuntime.jsxs("div", { style: {
|
|
7718
7734
|
display: "flex",
|
|
7719
7735
|
justifyContent: "flex-end",
|
|
7720
7736
|
alignItems: "center",
|
|
@@ -9114,14 +9130,39 @@ function PaymentFormInner({ config, eventDetails, formData, totalAmount, discoun
|
|
|
9114
9130
|
return;
|
|
9115
9131
|
}
|
|
9116
9132
|
// First, confirm the payment with Stripe
|
|
9133
|
+
const confirmParams = {
|
|
9134
|
+
return_url: "https://bigz.surfschule-zingst.de/booking/success",
|
|
9135
|
+
};
|
|
9136
|
+
// Ensure return_url is properly formatted and doesn't contain fragment identifiers
|
|
9137
|
+
try {
|
|
9138
|
+
const url = new URL(confirmParams.return_url);
|
|
9139
|
+
// Remove any fragment identifiers that might cause issues
|
|
9140
|
+
url.hash = "";
|
|
9141
|
+
confirmParams.return_url = url.toString();
|
|
9142
|
+
}
|
|
9143
|
+
catch (e) {
|
|
9144
|
+
console.warn("[PAYMENT_FORM] Invalid return_url, using fallback:", confirmParams.return_url);
|
|
9145
|
+
// Fallback to current origin if URL parsing fails
|
|
9146
|
+
confirmParams.return_url = window.location.origin + window.location.pathname;
|
|
9147
|
+
}
|
|
9148
|
+
console.log("[PAYMENT_FORM] Confirming payment with params:", {
|
|
9149
|
+
paymentIntentId: clientSecret.split("_secret_")[0],
|
|
9150
|
+
return_url: confirmParams.return_url,
|
|
9151
|
+
redirect: "if_required",
|
|
9152
|
+
});
|
|
9117
9153
|
const { error, paymentIntent } = await stripe.confirmPayment({
|
|
9118
9154
|
elements,
|
|
9119
|
-
confirmParams
|
|
9120
|
-
return_url: window.location.href,
|
|
9121
|
-
},
|
|
9155
|
+
confirmParams,
|
|
9122
9156
|
redirect: "if_required",
|
|
9123
9157
|
});
|
|
9124
9158
|
if (error) {
|
|
9159
|
+
console.error("[PAYMENT_FORM] Payment confirmation error:", {
|
|
9160
|
+
type: error.type,
|
|
9161
|
+
code: error.code,
|
|
9162
|
+
message: error.message,
|
|
9163
|
+
decline_code: error.decline_code,
|
|
9164
|
+
payment_intent: error.payment_intent,
|
|
9165
|
+
});
|
|
9125
9166
|
if (error.type === "card_error" || error.type === "validation_error") {
|
|
9126
9167
|
setPaymentError(error.message || "Zahlungsfehler");
|
|
9127
9168
|
}
|
|
@@ -9318,16 +9359,41 @@ function PaymentForm({ config, eventDetails, formData, totalAmount, discountCode
|
|
|
9318
9359
|
const endpoint = isConnectMode
|
|
9319
9360
|
? "/booking/create-payment-intent"
|
|
9320
9361
|
: "/booking-proxy/create-payment-intent";
|
|
9321
|
-
// Build request data
|
|
9362
|
+
// Build request data with validation
|
|
9322
9363
|
const requestData = {
|
|
9323
9364
|
eventInstanceId: config.eventInstanceId || eventDetails.id,
|
|
9324
9365
|
organizationId: config.organizationId, // Required for payment intent creation
|
|
9325
|
-
amount: totalAmount,
|
|
9366
|
+
amount: Math.round(totalAmount), // Ensure integer (should already be in cents)
|
|
9326
9367
|
currency: "eur",
|
|
9327
|
-
participants: formData.participants.filter((p) => p.name
|
|
9368
|
+
participants: formData.participants.filter((p) => p.name?.trim()),
|
|
9328
9369
|
discountCode: discountCode?.code,
|
|
9329
|
-
customerEmail: formData.customerEmail,
|
|
9370
|
+
customerEmail: formData.customerEmail?.trim(),
|
|
9330
9371
|
};
|
|
9372
|
+
// Validate required fields
|
|
9373
|
+
if (!requestData.eventInstanceId) {
|
|
9374
|
+
throw new Error("Event instance ID is required");
|
|
9375
|
+
}
|
|
9376
|
+
if (!requestData.organizationId) {
|
|
9377
|
+
throw new Error("Organization ID is required");
|
|
9378
|
+
}
|
|
9379
|
+
if (!requestData.amount || requestData.amount <= 0) {
|
|
9380
|
+
throw new Error("Valid amount is required");
|
|
9381
|
+
}
|
|
9382
|
+
if (!requestData.participants || requestData.participants.length === 0) {
|
|
9383
|
+
throw new Error("At least one participant is required");
|
|
9384
|
+
}
|
|
9385
|
+
if (!requestData.customerEmail) {
|
|
9386
|
+
throw new Error("Customer email is required");
|
|
9387
|
+
}
|
|
9388
|
+
console.log("[PAYMENT_FORM] Creating payment intent:", {
|
|
9389
|
+
endpoint,
|
|
9390
|
+
mode: isConnectMode ? "connect" : "apikey",
|
|
9391
|
+
amount: requestData.amount,
|
|
9392
|
+
currency: requestData.currency,
|
|
9393
|
+
participantCount: requestData.participants.length,
|
|
9394
|
+
organizationId: requestData.organizationId,
|
|
9395
|
+
eventInstanceId: requestData.eventInstanceId,
|
|
9396
|
+
});
|
|
9331
9397
|
// Add mode-specific fields
|
|
9332
9398
|
if (!isConnectMode) {
|
|
9333
9399
|
// ApiKey mode needs additional fields
|
|
@@ -9343,14 +9409,25 @@ function PaymentForm({ config, eventDetails, formData, totalAmount, discountCode
|
|
|
9343
9409
|
});
|
|
9344
9410
|
const data = await response.json();
|
|
9345
9411
|
if (response.ok) {
|
|
9412
|
+
console.log("[PAYMENT_FORM] Payment intent created successfully:", {
|
|
9413
|
+
hasClientSecret: !!data.clientSecret,
|
|
9414
|
+
clientSecretPrefix: `${data.clientSecret?.substring(0, 20)}...`,
|
|
9415
|
+
});
|
|
9346
9416
|
setClientSecret(data.clientSecret);
|
|
9347
9417
|
}
|
|
9348
9418
|
else {
|
|
9419
|
+
console.error("[PAYMENT_FORM] Payment intent creation failed:", {
|
|
9420
|
+
status: response.status,
|
|
9421
|
+
error: data.error,
|
|
9422
|
+
details: data.details,
|
|
9423
|
+
requestData: { ...requestData, customerEmail: "[redacted]" },
|
|
9424
|
+
});
|
|
9349
9425
|
setPaymentError(data.error || "Fehler beim Erstellen der Zahlungsabsicht");
|
|
9350
9426
|
}
|
|
9351
9427
|
}
|
|
9352
9428
|
catch (err) {
|
|
9353
|
-
|
|
9429
|
+
console.error("[PAYMENT_FORM] Payment intent creation error:", err);
|
|
9430
|
+
setPaymentError(err.message || "Fehler beim Erstellen der Zahlungsabsicht");
|
|
9354
9431
|
}
|
|
9355
9432
|
finally {
|
|
9356
9433
|
setIsCreatingPaymentIntent(false);
|
|
@@ -11613,6 +11690,25 @@ function UniversalBookingWidget({ config: baseConfig }) {
|
|
|
11613
11690
|
if (data.connectedAccountId) {
|
|
11614
11691
|
stripeOptions.stripeAccount = data.connectedAccountId;
|
|
11615
11692
|
}
|
|
11693
|
+
// Add options to prevent sandbox warnings in vanilla JS environments
|
|
11694
|
+
if (typeof window !== "undefined" && window.document) {
|
|
11695
|
+
// Check if we're in a potential iframe or restricted environment
|
|
11696
|
+
try {
|
|
11697
|
+
// Test if we can access parent window (this will throw in sandbox)
|
|
11698
|
+
const hasParentAccess = window.parent === window || window.parent.location.href;
|
|
11699
|
+
// Add apiVersion to ensure compatibility
|
|
11700
|
+
stripeOptions.apiVersion = "2025-02-24.acacia";
|
|
11701
|
+
// For vanilla JS builds, explicitly set betas to empty array to avoid issues
|
|
11702
|
+
if (!stripeOptions.betas) {
|
|
11703
|
+
stripeOptions.betas = [];
|
|
11704
|
+
}
|
|
11705
|
+
}
|
|
11706
|
+
catch (e) {
|
|
11707
|
+
// We're likely in a sandboxed environment, add specific options
|
|
11708
|
+
console.warn("[WIDGET] Detected restricted environment, adjusting Stripe options");
|
|
11709
|
+
stripeOptions.betas = [];
|
|
11710
|
+
}
|
|
11711
|
+
}
|
|
11616
11712
|
setStripePromise(loadStripe(data.stripePublishableKey, stripeOptions));
|
|
11617
11713
|
}
|
|
11618
11714
|
// If only one instance, skip to booking
|
|
@@ -11654,6 +11750,25 @@ function UniversalBookingWidget({ config: baseConfig }) {
|
|
|
11654
11750
|
if (data.connectedAccountId) {
|
|
11655
11751
|
stripeOptions.stripeAccount = data.connectedAccountId;
|
|
11656
11752
|
}
|
|
11753
|
+
// Add options to prevent sandbox warnings in vanilla JS environments
|
|
11754
|
+
if (typeof window !== "undefined" && window.document) {
|
|
11755
|
+
// Check if we're in a potential iframe or restricted environment
|
|
11756
|
+
try {
|
|
11757
|
+
// Test if we can access parent window (this will throw in sandbox)
|
|
11758
|
+
const hasParentAccess = window.parent === window || window.parent.location.href;
|
|
11759
|
+
// Add apiVersion to ensure compatibility
|
|
11760
|
+
stripeOptions.apiVersion = "2025-02-24.acacia";
|
|
11761
|
+
// For vanilla JS builds, explicitly set betas to empty array to avoid issues
|
|
11762
|
+
if (!stripeOptions.betas) {
|
|
11763
|
+
stripeOptions.betas = [];
|
|
11764
|
+
}
|
|
11765
|
+
}
|
|
11766
|
+
catch (e) {
|
|
11767
|
+
// We're likely in a sandboxed environment, add specific options
|
|
11768
|
+
console.warn("[WIDGET] Detected restricted environment, adjusting Stripe options");
|
|
11769
|
+
stripeOptions.betas = [];
|
|
11770
|
+
}
|
|
11771
|
+
}
|
|
11657
11772
|
setStripePromise(loadStripe(data.stripePublishableKey, stripeOptions));
|
|
11658
11773
|
}
|
|
11659
11774
|
}
|