@bigz-app/booking-widget 1.1.5 → 1.1.6
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 +47 -17
- package/dist/booking-widget.js.map +1 -1
- package/dist/components/UniversalBookingWidget.d.ts.map +1 -1
- package/dist/components/booking/BookingForm.d.ts +2 -0
- package/dist/components/booking/BookingForm.d.ts.map +1 -1
- package/dist/components/booking/BookingSuccessModal.d.ts.map +1 -1
- package/dist/components/upsells/UpsellCard.d.ts +3 -2
- package/dist/components/upsells/UpsellCard.d.ts.map +1 -1
- package/dist/components/upsells/UpsellsStep.d.ts +4 -1
- package/dist/components/upsells/UpsellsStep.d.ts.map +1 -1
- package/dist/components/upsells/index.d.ts +1 -1
- package/dist/components/upsells/index.d.ts.map +1 -1
- package/dist/i18n/i18n-context.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 +47 -17
- package/dist/index.cjs.map +1 -1
- package/dist/index.esm.js +47 -17
- package/dist/index.esm.js.map +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"UniversalBookingWidget.d.ts","sourceRoot":"","sources":["../../src/components/UniversalBookingWidget.tsx"],"names":[],"mappings":"AA+BA,MAAM,WAAW,YAAY;IACzB,IAAI,EAAE,OAAO,GAAG,SAAS,GAAG,MAAM,CAAC;IACnC,MAAM,EAAE,MAAM,EAAE,CAAC;CACpB;AAED,MAAM,WAAW,SAAS;IACtB,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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ACtB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,kBAAkB,CAAC,EAAE,OAAO,CAAC;IAC7B,SAAS,CAAC,EAAE;QACR,KAAK,CAAC,EAAE,MAAM,CAAC;QACf,YAAY,CAAC,EAAE,MAAM,CAAC;QACtB,kBAAkB,CAAC,EAAE,MAAM,CAAC;QAC5B,YAAY,CAAC,EAAE,OAAO,CAAC;QACvB,OAAO,CAAC,EAAE,OAAO,CAAC;KACrB,CAAC;IACF,KAAK,CAAC,EAAE,iBAAiB,CAAC;IAC1B,SAAS,CAAC,EAAE,CAAC,MAAM,EAAE,GAAG,KAAK,IAAI,CAAC;IAClC,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;CACrC;
|
|
1
|
+
{"version":3,"file":"UniversalBookingWidget.d.ts","sourceRoot":"","sources":["../../src/components/UniversalBookingWidget.tsx"],"names":[],"mappings":"AA+BA,MAAM,WAAW,YAAY;IACzB,IAAI,EAAE,OAAO,GAAG,SAAS,GAAG,MAAM,CAAC;IACnC,MAAM,EAAE,MAAM,EAAE,CAAC;CACpB;AAED,MAAM,WAAW,SAAS;IACtB,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;QACN,EAAE,EAAE,MAAM,CAAC;QACX,IAAI,EAAE,MAAM,CAAC;QACb,KAAK,EAAE,MAAM,CAAC;KACjB,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,MA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AAC,EAAE,OAAO,CAAC;QACvB,OAAO,CAAC,EAAE,OAAO,CAAC;KACrB,CAAC;IACF,KAAK,CAAC,EAAE,iBAAiB,CAAC;IAC1B,SAAS,CAAC,EAAE,CAAC,MAAM,EAAE,GAAG,KAAK,IAAI,CAAC;IAClC,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;CACrC;AA6qCD,wBAAgB,sBAAsB,CAAC,KAAK,EAAE;IAAE,MAAM,EAAE,sBAAsB,CAAA;CAAE,2CA2B/E;AAGD,eAAO,MAAM,uCAAuC,GAAI,OAAO;IAAE,MAAM,EAAE,sBAAsB,CAAA;CAAE,4CAShG,CAAC"}
|
|
@@ -31,6 +31,7 @@ interface UpsellPackage {
|
|
|
31
31
|
description: string | null;
|
|
32
32
|
image: string | null;
|
|
33
33
|
price: number;
|
|
34
|
+
discountPercent?: number;
|
|
34
35
|
available: boolean;
|
|
35
36
|
}
|
|
36
37
|
interface UpsellSelection {
|
|
@@ -56,6 +57,7 @@ interface BookingFormProps {
|
|
|
56
57
|
connectedAccountId?: string;
|
|
57
58
|
mollieProfileId?: string;
|
|
58
59
|
mollieTestmode?: boolean;
|
|
60
|
+
roundPricesEnabled?: boolean;
|
|
59
61
|
} | null;
|
|
60
62
|
selectedUpsells?: UpsellSelection[];
|
|
61
63
|
upsells?: UpsellPackage[];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BookingForm.d.ts","sourceRoot":"","sources":["../../../src/components/booking/BookingForm.tsx"],"names":[],"mappings":"AA2BA,UAAU,YAAY;IAClB,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,SAAS,EAAE,MAAM,CAAC;IAClB,OAAO,EAAE,MAAM,CAAC;IAChB,KAAK,EAAE,MAAM,CAAC;IACd,eAAe,EAAE,MAAM,CAAC;IACxB,gBAAgB,EAAE,MAAM,CAAC;IACzB,cAAc,EAAE,MAAM,CAAC;IACvB,YAAY,EAAE,MAAM,CAAC;IACrB,cAAc,EAAE,MAAM,CAAC;IACvB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,MAAM,EAAE,MAAM,EAAE,CAAC;IACjB,QAAQ,EAAE;QACN,EAAE,EAAE,MAAM,CAAC;QACX,IAAI,EAAE,MAAM,CAAC;QACb,KAAK,EAAE,MAAM,CAAC;KACjB,CAAC;IACF,YAAY,EAAE;QACV,EAAE,EAAE,MAAM,CAAC;QACX,IAAI,EAAE,MAAM,CAAC;QACb,IAAI,CAAC,EAAE,MAAM,CAAC;KACjB,CAAC;IACF,WAAW,EAAE,OAAO,CAAC;IACrB,MAAM,CAAC,EAAE,MAAM,CAAC;CACnB;AAGD,UAAU,aAAa;IACnB,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3B,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IACrB,KAAK,EAAE,MAAM,CAAC;IACd,SAAS,EAAE,OAAO,CAAC;CACtB;
|
|
1
|
+
{"version":3,"file":"BookingForm.d.ts","sourceRoot":"","sources":["../../../src/components/booking/BookingForm.tsx"],"names":[],"mappings":"AA2BA,UAAU,YAAY;IAClB,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,SAAS,EAAE,MAAM,CAAC;IAClB,OAAO,EAAE,MAAM,CAAC;IAChB,KAAK,EAAE,MAAM,CAAC;IACd,eAAe,EAAE,MAAM,CAAC;IACxB,gBAAgB,EAAE,MAAM,CAAC;IACzB,cAAc,EAAE,MAAM,CAAC;IACvB,YAAY,EAAE,MAAM,CAAC;IACrB,cAAc,EAAE,MAAM,CAAC;IACvB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,MAAM,EAAE,MAAM,EAAE,CAAC;IACjB,QAAQ,EAA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CAAC;QAC9B,kBAAkB,CAAC,EAAE,MAAM,CAAC;QAC5B,eAAe,CAAC,EAAE,MAAM,CAAC;QACzB,cAAc,CAAC,EAAE,OAAO,CAAC;QACzB,kBAAkB,CAAC,EAAE,OAAO,CAAC;KAChC,GAAG,IAAI,CAAC;IACT,eAAe,CAAC,EAAE,eAAe,EAAE,CAAC;IACpC,OAAO,CAAC,EAAE,aAAa,EAAE,CAAC;CAC7B;AASD,wBAAgB,WAAW,CAAC,EACxB,MAAM,EACN,YAAY,EACZ,aAAa,EACb,SAAS,EACT,OAAO,EACP,sBAAsB,EACtB,kBAAkB,EAClB,iBAAiB,EACjB,qBAAqB,EACrB,MAAM,EACN,OAAO,EACP,YAAY,EACZ,eAAoB,EACpB,OAAY,GACf,EAAE,gBAAgB,2CAyjClB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BookingSuccessModal.d.ts","sourceRoot":"","sources":["../../../src/components/booking/BookingSuccessModal.tsx"],"names":[],"mappings":"AAcA,UAAU,wBAAwB;IAC9B,MAAM,EAAE,OAAO,CAAC;IAChB,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,MAAM,EAAE,GAAG,CAAC;IACZ,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IAClC,eAAe,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CACnC;AAED,eAAO,MAAM,mBAAmB,GAAI,wDAMjC,wBAAwB,
|
|
1
|
+
{"version":3,"file":"BookingSuccessModal.d.ts","sourceRoot":"","sources":["../../../src/components/booking/BookingSuccessModal.tsx"],"names":[],"mappings":"AAcA,UAAU,wBAAwB;IAC9B,MAAM,EAAE,OAAO,CAAC;IAChB,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,MAAM,EAAE,GAAG,CAAC;IACZ,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IAClC,eAAe,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CACnC;AAED,eAAO,MAAM,mBAAmB,GAAI,wDAMjC,wBAAwB,mDA2zB1B,CAAC"}
|
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
import type
|
|
1
|
+
import { type UpsellPackage } from "./UpsellsStep";
|
|
2
2
|
interface UpsellCardProps {
|
|
3
3
|
upsell: UpsellPackage;
|
|
4
4
|
isSelected: boolean;
|
|
5
5
|
participantCount: number;
|
|
6
6
|
onSelect: () => void;
|
|
7
|
+
roundPricesEnabled?: boolean;
|
|
7
8
|
}
|
|
8
|
-
export declare function UpsellCard({ upsell, isSelected, participantCount, onSelect, }: UpsellCardProps): import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
export declare function UpsellCard({ upsell, isSelected, participantCount, onSelect, roundPricesEnabled, }: UpsellCardProps): import("react/jsx-runtime").JSX.Element;
|
|
9
10
|
export {};
|
|
10
11
|
//# sourceMappingURL=UpsellCard.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"UpsellCard.d.ts","sourceRoot":"","sources":["../../../src/components/upsells/UpsellCard.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"UpsellCard.d.ts","sourceRoot":"","sources":["../../../src/components/upsells/UpsellCard.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAmD,KAAK,aAAa,EAAE,MAAM,eAAe,CAAC;AAGpG,UAAU,eAAe;IACrB,MAAM,EAAE,aAAa,CAAC;IACtB,UAAU,EAAE,OAAO,CAAC;IACpB,gBAAgB,EAAE,MAAM,CAAC;IACzB,QAAQ,EAAE,MAAM,IAAI,CAAC;IACrB,kBAAkB,CAAC,EAAE,OAAO,CAAC;CAChC;AAuLD,wBAAgB,UAAU,CAAC,EACvB,MAAM,EACN,UAAU,EACV,gBAAgB,EAChB,QAAQ,EACR,kBAAyB,GAC5B,EAAE,eAAe,2CAoHjB"}
|
|
@@ -23,6 +23,7 @@ export interface UpsellPackage {
|
|
|
23
23
|
description: string | null;
|
|
24
24
|
image: string | null;
|
|
25
25
|
price: number;
|
|
26
|
+
discountPercent?: number;
|
|
26
27
|
available: boolean;
|
|
27
28
|
availableQuantity?: number;
|
|
28
29
|
unavailableReason?: UnavailableReason;
|
|
@@ -33,6 +34,7 @@ export interface UpsellPackage {
|
|
|
33
34
|
availableSpots: number;
|
|
34
35
|
};
|
|
35
36
|
}
|
|
37
|
+
export declare function getEffectiveUpsellPrice(upsell: UpsellPackage, round?: boolean): number;
|
|
36
38
|
export interface UpsellSelection {
|
|
37
39
|
upsellPackageId: number;
|
|
38
40
|
quantity: number;
|
|
@@ -47,7 +49,8 @@ interface UpsellsStepProps {
|
|
|
47
49
|
onSelect: (selections: UpsellSelection[]) => void;
|
|
48
50
|
onContinue: () => void;
|
|
49
51
|
onBack: () => void;
|
|
52
|
+
roundPricesEnabled?: boolean;
|
|
50
53
|
}
|
|
51
|
-
export declare function UpsellsStep({ upsells, selectedUpsells, participantCount, isLoading, isOpen, onClose, onSelect, onContinue, onBack, }: UpsellsStepProps): import("react/jsx-runtime").JSX.Element;
|
|
54
|
+
export declare function UpsellsStep({ upsells, selectedUpsells, participantCount, isLoading, isOpen, onClose, onSelect, onContinue, onBack, roundPricesEnabled, }: UpsellsStepProps): import("react/jsx-runtime").JSX.Element;
|
|
52
55
|
export {};
|
|
53
56
|
//# sourceMappingURL=UpsellsStep.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"UpsellsStep.d.ts","sourceRoot":"","sources":["../../../src/components/upsells/UpsellsStep.tsx"],"names":[],"mappings":"AAOA,MAAM,WAAW,UAAU;IACvB,IAAI,EAAE,SAAS,GAAG,OAAO,CAAC;IAC1B,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,MAAM,CAAC;CACpB;AAED,MAAM,MAAM,iBAAiB,GACvB;IAAE,MAAM,EAAE,cAAc,CAAC;IAAC,WAAW,EAAE,MAAM,CAAA;CAAE,GAC/C;IAAE,MAA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gBAAgB;IACtB,OAAO,EAAE,aAAa,EAAE,CAAC;IACzB,eAAe,EAAE,eAAe,EAAE,CAAC;IACnC,gBAAgB,EAAE,MAAM,CAAC;IACzB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,MAAM,EAAE,OAAO,CAAC;IAChB,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,QAAQ,EAAE,CAAC,UAAU,EAAE,eAAe,EAAE,KAAK,IAAI,CAAC;IAClD,UAAU,EAAE,MAAM,IAAI,CAAC;IACvB,MAAM,EAAE,MAAM,IAAI,CAAC;IACnB,kBAAkB,CAAC,EAAE,OAAO,CAAC;CAChC;AAED,wBAAgB,WAAW,CAAC,EACxB,OAAO,EACP,eAAe,EACf,gBAAgB,EAChB,SAAS,EACT,MAAM,EACN,OAAO,EACP,QAAQ,EACR,UAAU,EACV,MAAM,EACN,kBAAyB,GAC5B,EAAE,gBAAgB,2CAuGlB"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { UpsellsStep } from "./UpsellsStep";
|
|
1
|
+
export { UpsellsStep, getEffectiveUpsellPrice } from "./UpsellsStep";
|
|
2
2
|
export { UpsellCard } from "./UpsellCard";
|
|
3
3
|
export type { UpsellPackage, UpsellSelection, UpsellItem } from "./UpsellsStep";
|
|
4
4
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/upsells/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/upsells/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,uBAAuB,EAAE,MAAM,eAAe,CAAC;AACrE,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,YAAY,EAAE,aAAa,EAAE,eAAe,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"i18n-context.d.ts","sourceRoot":"","sources":["../../src/i18n/i18n-context.tsx"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,eAAe,EAAyB,MAAM,SAAS,CAAC;AAyCtE,UAAU,iBAAiB;
|
|
1
|
+
{"version":3,"file":"i18n-context.d.ts","sourceRoot":"","sources":["../../src/i18n/i18n-context.tsx"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,eAAe,EAAyB,MAAM,SAAS,CAAC;AAyCtE,UAAU,iBAAiB;IACvB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;CAC7B;AAED,wBAAgB,YAAY,CAAC,EAAE,YAAY,EAAE,QAAQ,EAAE,EAAE,iBAAiB,2CA2CzE;AAED,wBAAgB,eAAe,UAvDlB,MAAM,WAAW,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAAC,KAAK,MAAM,CA6DvE;AAED,wBAAgB,SAAS;;wBAhED,eAAe,KAAK,IAAI;EAsE/C"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"de.d.ts","sourceRoot":"","sources":["../../../src/i18n/locales/de.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,UAAU,CAAC;AAEtD,eAAO,MAAM,EAAE,EAAE,
|
|
1
|
+
{"version":3,"file":"de.d.ts","sourceRoot":"","sources":["../../../src/i18n/locales/de.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,UAAU,CAAC;AAEtD,eAAO,MAAM,EAAE,EAAE,qBA6NhB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"en.d.ts","sourceRoot":"","sources":["../../../src/i18n/locales/en.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,UAAU,CAAC;AAEtD,eAAO,MAAM,EAAE,EAAE,
|
|
1
|
+
{"version":3,"file":"en.d.ts","sourceRoot":"","sources":["../../../src/i18n/locales/en.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,UAAU,CAAC;AAEtD,eAAO,MAAM,EAAE,EAAE,qBA6NhB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"es.d.ts","sourceRoot":"","sources":["../../../src/i18n/locales/es.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,UAAU,CAAC;AAEtD,eAAO,MAAM,EAAE,EAAE,
|
|
1
|
+
{"version":3,"file":"es.d.ts","sourceRoot":"","sources":["../../../src/i18n/locales/es.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,UAAU,CAAC;AAEtD,eAAO,MAAM,EAAE,EAAE,qBA6NhB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pt.d.ts","sourceRoot":"","sources":["../../../src/i18n/locales/pt.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,UAAU,CAAC;AAEtD,eAAO,MAAM,EAAE,EAAE,
|
|
1
|
+
{"version":3,"file":"pt.d.ts","sourceRoot":"","sources":["../../../src/i18n/locales/pt.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,UAAU,CAAC;AAEtD,eAAO,MAAM,EAAE,EAAE,qBA6NhB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sv.d.ts","sourceRoot":"","sources":["../../../src/i18n/locales/sv.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,UAAU,CAAC;AAEtD,eAAO,MAAM,EAAE,EAAE,
|
|
1
|
+
{"version":3,"file":"sv.d.ts","sourceRoot":"","sources":["../../../src/i18n/locales/sv.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,UAAU,CAAC;AAEtD,eAAO,MAAM,EAAE,EAAE,qBA6NhB,CAAC"}
|
package/dist/index.cjs
CHANGED
|
@@ -354,6 +354,7 @@ const de$1 = {
|
|
|
354
354
|
"success.age": "{{age}} Jahre",
|
|
355
355
|
"success.paymentSummary": "Zahlungsübersicht",
|
|
356
356
|
"success.total": "Gesamtbetrag",
|
|
357
|
+
"success.discount": "Rabatt",
|
|
357
358
|
"success.product": "Produkt",
|
|
358
359
|
"success.contactInfo": "Kontaktdaten",
|
|
359
360
|
"success.name": "Name:",
|
|
@@ -562,6 +563,7 @@ const en = {
|
|
|
562
563
|
"success.age": "{{age}} years",
|
|
563
564
|
"success.paymentSummary": "Payment Summary",
|
|
564
565
|
"success.total": "Total",
|
|
566
|
+
"success.discount": "Discount",
|
|
565
567
|
"success.product": "Product",
|
|
566
568
|
"success.contactInfo": "Contact Information",
|
|
567
569
|
"success.name": "Name:",
|
|
@@ -770,6 +772,7 @@ const es = {
|
|
|
770
772
|
"success.age": "{{age}} años",
|
|
771
773
|
"success.paymentSummary": "Resumen del pago",
|
|
772
774
|
"success.total": "Total",
|
|
775
|
+
"success.discount": "Descuento",
|
|
773
776
|
"success.product": "Producto",
|
|
774
777
|
"success.contactInfo": "Datos de contacto",
|
|
775
778
|
"success.name": "Nombre:",
|
|
@@ -978,6 +981,7 @@ const pt = {
|
|
|
978
981
|
"success.age": "{{age}} anos",
|
|
979
982
|
"success.paymentSummary": "Resumo do pagamento",
|
|
980
983
|
"success.total": "Total",
|
|
984
|
+
"success.discount": "Desconto",
|
|
981
985
|
"success.product": "Produto",
|
|
982
986
|
"success.contactInfo": "Dados de contacto",
|
|
983
987
|
"success.name": "Nome:",
|
|
@@ -1186,6 +1190,7 @@ const sv = {
|
|
|
1186
1190
|
"success.age": "{{age}} år",
|
|
1187
1191
|
"success.paymentSummary": "Betalningssammanfattning",
|
|
1188
1192
|
"success.total": "Totalt",
|
|
1193
|
+
"success.discount": "Rabatt",
|
|
1189
1194
|
"success.product": "Produkt",
|
|
1190
1195
|
"success.contactInfo": "Kontaktuppgifter",
|
|
1191
1196
|
"success.name": "Namn:",
|
|
@@ -1312,7 +1317,7 @@ function persistLocale(locale) {
|
|
|
1312
1317
|
const I18nContext = React.createContext(null);
|
|
1313
1318
|
function I18nProvider({ configLocale, children }) {
|
|
1314
1319
|
// Priority: configLocale (site owner) > persisted user choice > browser language > "de"
|
|
1315
|
-
// If configLocale is set, the site owner has locked the language
|
|
1320
|
+
// If configLocale is set, the site owner has locked the language - don't restore user choice.
|
|
1316
1321
|
const [overrideLocale, setOverrideLocale] = React.useState(() => {
|
|
1317
1322
|
if (configLocale)
|
|
1318
1323
|
return null;
|
|
@@ -11021,6 +11026,13 @@ function mergeStyles(...styles) {
|
|
|
11021
11026
|
return Object.assign({}, ...styles.filter(Boolean));
|
|
11022
11027
|
}
|
|
11023
11028
|
|
|
11029
|
+
function getEffectivePrice(upsell, round) {
|
|
11030
|
+
const dp = upsell.discountPercent ?? 0;
|
|
11031
|
+
if (dp <= 0)
|
|
11032
|
+
return upsell.price;
|
|
11033
|
+
const raw = Math.round(upsell.price * (100 - dp) / 100);
|
|
11034
|
+
return round ? Math.floor(raw / 100) * 100 : raw;
|
|
11035
|
+
}
|
|
11024
11036
|
// Local style aliases from shared styles
|
|
11025
11037
|
const cardStyles = cardStyles$1.base;
|
|
11026
11038
|
const sectionHeaderStyles = sectionStyles.header;
|
|
@@ -11031,6 +11043,7 @@ function BookingForm({ config, eventDetails, stripePromise, onSuccess, onError,
|
|
|
11031
11043
|
const t$1 = useTranslations();
|
|
11032
11044
|
const { locale } = useLocale();
|
|
11033
11045
|
const timezone = useTimezone();
|
|
11046
|
+
const roundEnabled = systemConfig?.roundPricesEnabled !== false;
|
|
11034
11047
|
const [appliedVouchers, setAppliedVouchers] = React.useState([]);
|
|
11035
11048
|
const paymentSectionRef = React.useRef(null);
|
|
11036
11049
|
// Payment option: "deposit" or "full" - only relevant when deposit is available
|
|
@@ -11101,7 +11114,7 @@ function BookingForm({ config, eventDetails, stripePromise, onSuccess, onError,
|
|
|
11101
11114
|
participantUpsellIds.forEach(upsellId => {
|
|
11102
11115
|
const upsell = upsells.find(u => u.id === upsellId);
|
|
11103
11116
|
if (upsell) {
|
|
11104
|
-
total += upsell
|
|
11117
|
+
total += getEffectivePrice(upsell, roundEnabled);
|
|
11105
11118
|
}
|
|
11106
11119
|
});
|
|
11107
11120
|
}
|
|
@@ -11377,7 +11390,7 @@ function BookingForm({ config, eventDetails, stripePromise, onSuccess, onError,
|
|
|
11377
11390
|
padding: 0,
|
|
11378
11391
|
}, children: "\u00D7" })] }))] }), upsells.length > 0 && (jsxRuntime.jsx("div", { style: participantUpsellStyles.container, children: upsells.map((upsell) => {
|
|
11379
11392
|
const isSelected = (participantUpsells[index] || []).includes(upsell.id);
|
|
11380
|
-
return (jsxRuntime.jsxs("label", { htmlFor: `upsell-${index}-${upsell.id}`, style: isSelected ? participantUpsellStyles.labelSelected : participantUpsellStyles.label, children: [jsxRuntime.jsx("input", { id: `upsell-${index}-${upsell.id}`, type: "checkbox", style: participantUpsellStyles.checkbox, checked: isSelected, onChange: () => toggleParticipantUpsell(index, upsell.id) }), jsxRuntime.jsx("span", { style: { fontWeight: 500 }, children: upsell.name }), jsxRuntime.jsxs("span", { style: { fontSize: "12px", opacity: 0.8 }, children: ["(+", formatCurrency(upsell
|
|
11393
|
+
return (jsxRuntime.jsxs("label", { htmlFor: `upsell-${index}-${upsell.id}`, style: isSelected ? participantUpsellStyles.labelSelected : participantUpsellStyles.label, children: [jsxRuntime.jsx("input", { id: `upsell-${index}-${upsell.id}`, type: "checkbox", style: participantUpsellStyles.checkbox, checked: isSelected, onChange: () => toggleParticipantUpsell(index, upsell.id) }), jsxRuntime.jsx("span", { style: { fontWeight: 500 }, children: upsell.name }), jsxRuntime.jsxs("span", { style: { fontSize: "12px", opacity: 0.8 }, children: ["(+", formatCurrency(getEffectivePrice(upsell, roundEnabled)), ")"] })] }, upsell.id));
|
|
11381
11394
|
}) }))] }, index))), watchedParticipants.length < eventDetails.availableSpots ? (jsxRuntime.jsx("div", { style: {
|
|
11382
11395
|
display: "flex",
|
|
11383
11396
|
flexDirection: "column",
|
|
@@ -11409,7 +11422,7 @@ function BookingForm({ config, eventDetails, stripePromise, onSuccess, onError,
|
|
|
11409
11422
|
const countWithUpsell = watchedParticipants.filter((p, idx) => p.name.trim() && (participantUpsells[idx] || []).includes(upsell.id)).length;
|
|
11410
11423
|
if (countWithUpsell === 0)
|
|
11411
11424
|
return null;
|
|
11412
|
-
const upsellLineTotal = upsell
|
|
11425
|
+
const upsellLineTotal = getEffectivePrice(upsell, roundEnabled) * countWithUpsell;
|
|
11413
11426
|
return (jsxRuntime.jsxs("div", { style: { display: "flex", justifyContent: "space-between", alignItems: "center", fontSize: "13px" }, children: [jsxRuntime.jsxs("span", { style: { color: "var(--bw-highlight-color)", fontFamily: "var(--bw-font-family)" }, children: ["+ ", upsell.name, " (", countWithUpsell, "\u00D7)"] }), jsxRuntime.jsx("span", { style: { color: "var(--bw-highlight-color)", fontFamily: "var(--bw-font-family)" }, children: formatCurrency(upsellLineTotal) })] }, upsell.id));
|
|
11414
11427
|
})] })), appliedVouchers.length > 0 && (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsxs("div", { style: { display: "flex", justifyContent: "space-between", alignItems: "center" }, children: [jsxRuntime.jsx("span", { style: { color: "var(--bw-text-muted)", fontFamily: "var(--bw-font-family)" }, children: t$1("summary.subtotal") }), jsxRuntime.jsx("span", { style: {
|
|
11415
11428
|
fontFamily: "var(--bw-font-family)",
|
|
@@ -11534,7 +11547,7 @@ function BookingForm({ config, eventDetails, stripePromise, onSuccess, onError,
|
|
|
11534
11547
|
: t$1("payment.fillRequired");
|
|
11535
11548
|
return (jsxRuntime.jsx("div", { style: {
|
|
11536
11549
|
...cardStyles,
|
|
11537
|
-
|
|
11550
|
+
border: "1px solid var(--bw-warning-color)",
|
|
11538
11551
|
color: "var(--bw-warning-color)",
|
|
11539
11552
|
fontFamily: "var(--bw-font-family)",
|
|
11540
11553
|
textAlign: "center",
|
|
@@ -11703,6 +11716,7 @@ const BookingSuccessModal = ({ isOpen, onClose, config, onError, paymentIntentId
|
|
|
11703
11716
|
payments: data.payments,
|
|
11704
11717
|
orderItems: data.orderItems,
|
|
11705
11718
|
purchases: data.purchases || [],
|
|
11719
|
+
discount: data.discount || null,
|
|
11706
11720
|
stripePaymentIntent: data.stripePaymentIntent,
|
|
11707
11721
|
});
|
|
11708
11722
|
setEventDetails({
|
|
@@ -11952,7 +11966,7 @@ const BookingSuccessModal = ({ isOpen, onClose, config, onError, paymentIntentId
|
|
|
11952
11966
|
color: "var(--bw-text-color)",
|
|
11953
11967
|
margin: "0",
|
|
11954
11968
|
fontFamily: "var(--bw-font-family)",
|
|
11955
|
-
}, children: t("success.paymentSummary") }) }), jsxRuntime.jsx("div", { className: "print-only", children: jsxRuntime.jsx("div", { className: "print-section-title", children: t("success.paymentSummary") }) }), jsxRuntime.jsxs("div", { style: { display: "flex", flexDirection: "column", gap: "8px" }, children: [jsxRuntime.jsxs("div", { className: "print-hidden", style: { display: "flex", flexDirection: "column", gap: "var(--bw-spacing-small)" }, children: [jsxRuntime.jsxs("div", { style: { display: "flex", justifyContent: "space-between", alignItems: "center" }, children: [jsxRuntime.jsxs("span", { style: { color: "var(--bw-text-muted)", fontFamily: "var(--bw-font-family)", fontSize: "var(--bw-font-size-small)" }, children: [eventDetails.name, " (", booking.participantCount, "x ", formatCurrency(eventDetails.price), ")"] }), jsxRuntime.jsx("span", { style: { color: "var(--bw-text-color)", fontFamily: "var(--bw-font-family)" }, children: formatCurrency(eventDetails.price * booking.participantCount) })] }), bookingData.purchases && bookingData.purchases.length > 0 && (jsxRuntime.jsx(jsxRuntime.Fragment, { children: bookingData.purchases.map((purchase) => (jsxRuntime.jsxs("div", { style: { display: "flex", justifyContent: "space-between", alignItems: "center" }, children: [jsxRuntime.jsxs("span", { style: { color: "var(--bw-text-muted)", fontFamily: "var(--bw-font-family)", fontSize: "var(--bw-font-size-small)" }, children: [purchase.product?.name || t("success.product"), " (", purchase.quantity, "x ", formatCurrency(purchase.unitPrice), ")"] }), jsxRuntime.jsx("span", { style: { color: "var(--bw-text-color)", fontFamily: "var(--bw-font-family)" }, children: formatCurrency(purchase.totalPrice) })] }, purchase.id))) })), jsxRuntime.jsxs("div", { style: {
|
|
11969
|
+
}, children: t("success.paymentSummary") }) }), jsxRuntime.jsx("div", { className: "print-only", children: jsxRuntime.jsx("div", { className: "print-section-title", children: t("success.paymentSummary") }) }), jsxRuntime.jsxs("div", { style: { display: "flex", flexDirection: "column", gap: "8px" }, children: [jsxRuntime.jsxs("div", { className: "print-hidden", style: { display: "flex", flexDirection: "column", gap: "var(--bw-spacing-small)" }, children: [jsxRuntime.jsxs("div", { style: { display: "flex", justifyContent: "space-between", alignItems: "center" }, children: [jsxRuntime.jsxs("span", { style: { color: "var(--bw-text-muted)", fontFamily: "var(--bw-font-family)", fontSize: "var(--bw-font-size-small)" }, children: [eventDetails.name, " (", booking.participantCount, "x ", formatCurrency(eventDetails.price), ")"] }), jsxRuntime.jsx("span", { style: { color: "var(--bw-text-color)", fontFamily: "var(--bw-font-family)" }, children: formatCurrency(eventDetails.price * booking.participantCount) })] }), bookingData.discount && bookingData.discount.amount > 0 && (jsxRuntime.jsxs("div", { style: { display: "flex", justifyContent: "space-between", alignItems: "center" }, children: [jsxRuntime.jsxs("span", { style: { color: "var(--bw-success-color, #10B981)", fontFamily: "var(--bw-font-family)", fontSize: "var(--bw-font-size-small)" }, children: [t("success.discount"), " (", bookingData.discount.code, ")"] }), jsxRuntime.jsxs("span", { style: { color: "var(--bw-success-color, #10B981)", fontFamily: "var(--bw-font-family)" }, children: ["-", formatCurrency(bookingData.discount.amount)] })] })), bookingData.purchases && bookingData.purchases.length > 0 && (jsxRuntime.jsx(jsxRuntime.Fragment, { children: bookingData.purchases.map((purchase) => (jsxRuntime.jsxs("div", { style: { display: "flex", justifyContent: "space-between", alignItems: "center" }, children: [jsxRuntime.jsxs("span", { style: { color: "var(--bw-text-muted)", fontFamily: "var(--bw-font-family)", fontSize: "var(--bw-font-size-small)" }, children: [purchase.product?.name || t("success.product"), " (", purchase.quantity, "x ", formatCurrency(purchase.unitPrice), ")"] }), jsxRuntime.jsx("span", { style: { color: "var(--bw-text-color)", fontFamily: "var(--bw-font-family)" }, children: formatCurrency(purchase.totalPrice) })] }, purchase.id))) })), jsxRuntime.jsxs("div", { style: {
|
|
11956
11970
|
display: "flex",
|
|
11957
11971
|
justifyContent: "space-between",
|
|
11958
11972
|
alignItems: "center",
|
|
@@ -13431,7 +13445,7 @@ function PromoDialog({ config, onClose, onCtaClick }) {
|
|
|
13431
13445
|
color: "rgba(255, 255, 255, 0.85)",
|
|
13432
13446
|
lineHeight: 1.5,
|
|
13433
13447
|
margin: "0 0 16px 0",
|
|
13434
|
-
}, children: [config.subtitle, config.discountAmount && (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: ["
|
|
13448
|
+
}, children: [config.subtitle, config.discountAmount && (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [" - ", jsxRuntime.jsxs("strong", { style: { color: "white" }, children: [config.discountAmount, " ", t("promo.discount")] })] }))] }), config.discountCode && (jsxRuntime.jsxs("div", { style: {
|
|
13435
13449
|
marginBottom: "16px",
|
|
13436
13450
|
backgroundColor: "rgba(255,255,255,0.12)",
|
|
13437
13451
|
borderRadius: "12px",
|
|
@@ -13516,7 +13530,9 @@ const cardBaseStyles = {
|
|
|
13516
13530
|
flexDirection: "column",
|
|
13517
13531
|
padding: "16px",
|
|
13518
13532
|
backgroundColor: "var(--bw-surface-color)",
|
|
13519
|
-
|
|
13533
|
+
borderWidth: "2px",
|
|
13534
|
+
borderStyle: "solid",
|
|
13535
|
+
borderColor: "var(--bw-border-color)",
|
|
13520
13536
|
borderRadius: "var(--bw-border-radius)",
|
|
13521
13537
|
cursor: "pointer",
|
|
13522
13538
|
transition: "all 0.2s ease",
|
|
@@ -13541,7 +13557,9 @@ const checkboxContainerStyles = {
|
|
|
13541
13557
|
const checkboxInnerStyles = {
|
|
13542
13558
|
width: "24px",
|
|
13543
13559
|
height: "24px",
|
|
13544
|
-
|
|
13560
|
+
borderWidth: "2px",
|
|
13561
|
+
borderStyle: "solid",
|
|
13562
|
+
borderColor: "var(--bw-border-color)",
|
|
13545
13563
|
borderRadius: "6px",
|
|
13546
13564
|
display: "flex",
|
|
13547
13565
|
alignItems: "center",
|
|
@@ -13667,10 +13685,11 @@ function formatUnavailableReason(reason, t) {
|
|
|
13667
13685
|
return t("upsells.reason.notEnoughSpots", { eventTypeName: reason.eventTypeName });
|
|
13668
13686
|
}
|
|
13669
13687
|
}
|
|
13670
|
-
function UpsellCard({ upsell, isSelected, participantCount, onSelect, }) {
|
|
13688
|
+
function UpsellCard({ upsell, isSelected, participantCount, onSelect, roundPricesEnabled = true, }) {
|
|
13671
13689
|
const t = useTranslations();
|
|
13672
13690
|
const { locale } = useLocale();
|
|
13673
|
-
const
|
|
13691
|
+
const effectivePrice = getEffectiveUpsellPrice(upsell, roundPricesEnabled);
|
|
13692
|
+
const totalPrice = effectivePrice * participantCount;
|
|
13674
13693
|
const isDisabled = !upsell.available;
|
|
13675
13694
|
const getCardStyles = () => {
|
|
13676
13695
|
if (isDisabled)
|
|
@@ -13688,12 +13707,19 @@ function UpsellCard({ upsell, isSelected, participantCount, onSelect, }) {
|
|
|
13688
13707
|
weekday: "short",
|
|
13689
13708
|
day: "numeric",
|
|
13690
13709
|
month: "short",
|
|
13691
|
-
})] }), jsxRuntime.jsx("span", { style: { color: "var(--bw-text-muted)" }, children: t("upsells.spotsFree", { count: upsell.suggestedEventInstance.availableSpots }) })] }))] }), jsxRuntime.jsxs("div", { style: priceContainerStyles, children: [jsxRuntime.jsxs("span", { style: pricePerPersonStyles, children: [formatCurrency(
|
|
13710
|
+
})] }), jsxRuntime.jsx("span", { style: { color: "var(--bw-text-muted)" }, children: t("upsells.spotsFree", { count: upsell.suggestedEventInstance.availableSpots }) })] }))] }), jsxRuntime.jsxs("div", { style: priceContainerStyles, children: [jsxRuntime.jsxs("span", { style: pricePerPersonStyles, children: [formatCurrency(effectivePrice), "/", t("common.perPerson")] }), participantCount > 1 && (jsxRuntime.jsxs("span", { style: priceTotalStyles, children: ["= ", formatCurrency(totalPrice)] }))] }), isDisabled && (jsxRuntime.jsx("div", { style: unavailableOverlayStyles, children: jsxRuntime.jsx("span", { children: upsell.unavailableReason
|
|
13692
13711
|
? formatUnavailableReason(upsell.unavailableReason, t)
|
|
13693
13712
|
: t("upsells.notAvailable") }) }))] }));
|
|
13694
13713
|
}
|
|
13695
13714
|
|
|
13696
|
-
function
|
|
13715
|
+
function getEffectiveUpsellPrice(upsell, round = true) {
|
|
13716
|
+
const dp = upsell.discountPercent ?? 0;
|
|
13717
|
+
if (dp <= 0)
|
|
13718
|
+
return upsell.price;
|
|
13719
|
+
const raw = Math.round(upsell.price * (100 - dp) / 100);
|
|
13720
|
+
return round ? Math.floor(raw / 100) * 100 : raw;
|
|
13721
|
+
}
|
|
13722
|
+
function UpsellsStep({ upsells, selectedUpsells, participantCount, isLoading, isOpen, onClose, onSelect, onContinue, onBack, roundPricesEnabled = true, }) {
|
|
13697
13723
|
const t = useTranslations();
|
|
13698
13724
|
const selectUpsell = (upsellId) => {
|
|
13699
13725
|
const exists = selectedUpsells.find((s) => s.upsellPackageId === upsellId);
|
|
@@ -13712,7 +13738,7 @@ function UpsellsStep({ upsells, selectedUpsells, participantCount, isLoading, is
|
|
|
13712
13738
|
return selectedUpsells.reduce((total, selection) => {
|
|
13713
13739
|
const upsell = upsells.find((u) => u.id === selection.upsellPackageId);
|
|
13714
13740
|
if (upsell) {
|
|
13715
|
-
return total + upsell
|
|
13741
|
+
return total + getEffectiveUpsellPrice(upsell, roundPricesEnabled) * selection.quantity;
|
|
13716
13742
|
}
|
|
13717
13743
|
return total;
|
|
13718
13744
|
}, 0);
|
|
@@ -13720,7 +13746,7 @@ function UpsellsStep({ upsells, selectedUpsells, participantCount, isLoading, is
|
|
|
13720
13746
|
const selectedTotal = calculateTotal();
|
|
13721
13747
|
const selectedCount = selectedUpsells.length;
|
|
13722
13748
|
const footerContent = (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx("button", { type: "button", onClick: onBack, style: mergeStyles(buttonStyles.secondary, buttonStyles.fullWidth), children: t("common.back") }), jsxRuntime.jsx("button", { type: "button", onClick: onContinue, style: mergeStyles(buttonStyles.primary, buttonStyles.fullWidth), children: selectedCount === 0 ? t("button.continueWithout") : t("button.continue") })] }));
|
|
13723
|
-
return (jsxRuntime.jsx(Sidebar, { isOpen: isOpen, onClose: onClose, title: t("upsells.title"), footer: footerContent, children: jsxRuntime.jsxs("div", { style: { display: "flex", flexDirection: "column", height: "100%", padding: "16px 16px" }, children: [isLoading && (jsxRuntime.jsxs("div", { style: { display: "flex", flexDirection: "column", alignItems: "center", justifyContent: "center", gap: "12px", padding: "40px 20px", ...textStyles.muted }, children: [spinner(), jsxRuntime.jsx("span", { children: t("upsells.loading") })] })), !isLoading && upsells.length === 0 && (jsxRuntime.jsx("div", { style: { textAlign: "center", padding: "40px 20px", ...textStyles.muted }, children: jsxRuntime.jsx("p", { children: t("upsells.noExtras") }) })), !isLoading && upsells.length > 0 && (jsxRuntime.jsx("div", { style: { display: "flex", flexDirection: "column", gap: "12px", flex: 1, overflowY: "auto", paddingBottom: "16px" }, children: upsells.map((upsell) => (jsxRuntime.jsx(UpsellCard, { upsell: upsell, isSelected: isSelected(upsell.id), participantCount: participantCount, onSelect: () => selectUpsell(upsell.id) }, upsell.id))) })), selectedCount > 0 && (jsxRuntime.jsxs("div", { style: { display: "flex", justifyContent: "space-between", alignItems: "center", marginTop: "16px", paddingBottom: "16px", paddingTop: "16px", borderTop: "1px solid var(--bw-border-color)", fontSize: "14px" }, children: [jsxRuntime.jsx("span", { style: textStyles.muted, children: selectedCount === 1 ? t("upsells.selected", { count: selectedCount }) : t("upsells.selectedPlural", { count: selectedCount }) }), jsxRuntime.jsxs("span", { style: { fontWeight: 600, color: "var(--bw-highlight-color)", fontFamily: "var(--bw-font-family)" }, children: ["+", formatCurrency(selectedTotal)] })] }))] }) }));
|
|
13749
|
+
return (jsxRuntime.jsx(Sidebar, { isOpen: isOpen, onClose: onClose, title: t("upsells.title"), footer: footerContent, children: jsxRuntime.jsxs("div", { style: { display: "flex", flexDirection: "column", height: "100%", padding: "16px 16px" }, children: [isLoading && (jsxRuntime.jsxs("div", { style: { display: "flex", flexDirection: "column", alignItems: "center", justifyContent: "center", gap: "12px", padding: "40px 20px", ...textStyles.muted }, children: [spinner(), jsxRuntime.jsx("span", { children: t("upsells.loading") })] })), !isLoading && upsells.length === 0 && (jsxRuntime.jsx("div", { style: { textAlign: "center", padding: "40px 20px", ...textStyles.muted }, children: jsxRuntime.jsx("p", { children: t("upsells.noExtras") }) })), !isLoading && upsells.length > 0 && (jsxRuntime.jsx("div", { style: { display: "flex", flexDirection: "column", gap: "12px", flex: 1, overflowY: "auto", paddingBottom: "16px" }, children: upsells.map((upsell) => (jsxRuntime.jsx(UpsellCard, { upsell: upsell, isSelected: isSelected(upsell.id), participantCount: participantCount, onSelect: () => selectUpsell(upsell.id), roundPricesEnabled: roundPricesEnabled }, upsell.id))) })), selectedCount > 0 && (jsxRuntime.jsxs("div", { style: { display: "flex", justifyContent: "space-between", alignItems: "center", marginTop: "16px", paddingBottom: "16px", paddingTop: "16px", borderTop: "1px solid var(--bw-border-color)", fontSize: "14px" }, children: [jsxRuntime.jsx("span", { style: textStyles.muted, children: selectedCount === 1 ? t("upsells.selected", { count: selectedCount }) : t("upsells.selectedPlural", { count: selectedCount }) }), jsxRuntime.jsxs("span", { style: { fontWeight: 600, color: "var(--bw-highlight-color)", fontFamily: "var(--bw-font-family)" }, children: ["+", formatCurrency(selectedTotal)] })] }))] }) }));
|
|
13724
13750
|
}
|
|
13725
13751
|
|
|
13726
13752
|
// Main widget component
|
|
@@ -13980,6 +14006,7 @@ function UniversalBookingWidgetInner({ config: baseConfig, onWidgetLanguage, onT
|
|
|
13980
14006
|
connectedAccountId: data.connectedAccountId,
|
|
13981
14007
|
mollieProfileId: data.mollieProfileId,
|
|
13982
14008
|
mollieTestmode: data.mollieTestmode,
|
|
14009
|
+
roundPricesEnabled: data.roundPricesEnabled ?? true,
|
|
13983
14010
|
});
|
|
13984
14011
|
}
|
|
13985
14012
|
if (data.stripePublishableKey) {
|
|
@@ -14038,6 +14065,7 @@ function UniversalBookingWidgetInner({ config: baseConfig, onWidgetLanguage, onT
|
|
|
14038
14065
|
connectedAccountId: data.connectedAccountId,
|
|
14039
14066
|
mollieProfileId: data.mollieProfileId,
|
|
14040
14067
|
mollieTestmode: data.mollieTestmode,
|
|
14068
|
+
roundPricesEnabled: data.roundPricesEnabled ?? true,
|
|
14041
14069
|
});
|
|
14042
14070
|
if (!stripePromise && data.stripePublishableKey) {
|
|
14043
14071
|
const stripeOptions = {
|
|
@@ -14186,6 +14214,8 @@ function UniversalBookingWidgetInner({ config: baseConfig, onWidgetLanguage, onT
|
|
|
14186
14214
|
const handleBookingSuccess = (result) => {
|
|
14187
14215
|
setIsSuccess(true);
|
|
14188
14216
|
setSuccessPaymentIntentId(result.paymentIntent.id);
|
|
14217
|
+
setSidebarOpen(false);
|
|
14218
|
+
setShouldRenderBookingForm(false);
|
|
14189
14219
|
config.onSuccess?.(result);
|
|
14190
14220
|
};
|
|
14191
14221
|
const handleBookingError = (errorMessage) => {
|
|
@@ -14442,7 +14472,7 @@ function UniversalBookingWidgetInner({ config: baseConfig, onWidgetLanguage, onT
|
|
|
14442
14472
|
setShouldRenderInstanceSelection(true);
|
|
14443
14473
|
}
|
|
14444
14474
|
}, children: config.buttonText ||
|
|
14445
|
-
(isDirectInstanceMode ? t("button.bookNow") : t("button.selectDate")) }), shouldRenderInstanceSelection && (jsxRuntime.jsx(EventInstanceSelection, { eventInstances: eventInstances, selectedEventType: selectedEventType, onEventInstanceSelect: handleEventInstanceSelect, onBackToEventTypes: () => setSidebarOpen(false), isOpen: sidebarOpen && currentStep === "eventInstances", onClose: () => setSidebarOpen(false), isLoadingEventInstances: isLoadingEventInstances, isLoadingEventDetails: isLoadingEventDetails })), shouldRenderUpsells && (jsxRuntime.jsx(UpsellsStep, { upsells: upsells, selectedUpsells: selectedUpsells, participantCount: tempParticipantCount, isLoading: isLoadingUpsells, isOpen: currentStep === "upsells", onClose: () => setCurrentStep("eventInstances"), onSelect: handleUpsellsSelect, onContinue: handleUpsellsContinue, onBack: handleUpsellsBack })), shouldRenderBookingForm && eventDetails && (jsxRuntime.jsx(BookingForm, { config: config, eventDetails: eventDetails, stripePromise: stripePromise, onSuccess: handleBookingSuccess, onError: handleBookingError, onBackToEventInstances: () => setCurrentStep(isDirectInstanceMode ? "eventTypes" : "eventInstances"), onBackToEventTypes: () => setSidebarOpen(false), selectedEventType: selectedEventType, selectedEventInstance: selectedEventInstance, isOpen: currentStep === "booking" && !!eventDetails, onClose: () => setCurrentStep(isDirectInstanceMode ? "eventTypes" : "eventInstances"), systemConfig: systemConfig, selectedUpsells: selectedUpsells, upsells: upsells })), jsxRuntime.jsx(BookingSuccessModal, { isOpen: isSuccess, onClose: () => {
|
|
14475
|
+
(isDirectInstanceMode ? t("button.bookNow") : t("button.selectDate")) }), shouldRenderInstanceSelection && (jsxRuntime.jsx(EventInstanceSelection, { eventInstances: eventInstances, selectedEventType: selectedEventType, onEventInstanceSelect: handleEventInstanceSelect, onBackToEventTypes: () => setSidebarOpen(false), isOpen: sidebarOpen && currentStep === "eventInstances", onClose: () => setSidebarOpen(false), isLoadingEventInstances: isLoadingEventInstances, isLoadingEventDetails: isLoadingEventDetails })), shouldRenderUpsells && (jsxRuntime.jsx(UpsellsStep, { upsells: upsells, selectedUpsells: selectedUpsells, participantCount: tempParticipantCount, isLoading: isLoadingUpsells, isOpen: currentStep === "upsells", onClose: () => setCurrentStep("eventInstances"), onSelect: handleUpsellsSelect, onContinue: handleUpsellsContinue, onBack: handleUpsellsBack, roundPricesEnabled: systemConfig?.roundPricesEnabled !== false })), 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, selectedUpsells: selectedUpsells, upsells: upsells })), jsxRuntime.jsx(BookingSuccessModal, { isOpen: isSuccess, onClose: () => {
|
|
14446
14476
|
setIsSuccess(false);
|
|
14447
14477
|
setCurrentStep("eventTypes");
|
|
14448
14478
|
setSidebarOpen(false);
|
|
@@ -14489,7 +14519,7 @@ function UniversalBookingWidgetInner({ config: baseConfig, onWidgetLanguage, onT
|
|
|
14489
14519
|
};
|
|
14490
14520
|
};
|
|
14491
14521
|
const backHandlers = getBackHandlers();
|
|
14492
|
-
return (jsxRuntime.jsxs(StyleProvider, { config: config, children: [jsxRuntime.jsxs("div", { ref: setWidgetContainerRef, children: [cardsView, shouldRenderInstanceSelection && (jsxRuntime.jsx(EventInstanceSelection, { eventInstances: eventInstances, selectedEventType: selectedEventType, onEventInstanceSelect: handleEventInstanceSelect, onBackToEventTypes: handleBackToEventTypes, isOpen: currentStep === "eventInstances", onClose: handleBackToEventTypes, isLoadingEventInstances: isLoadingEventInstances, isLoadingEventDetails: isLoadingEventDetails })), shouldRenderUpsells && (jsxRuntime.jsx(UpsellsStep, { upsells: upsells, selectedUpsells: selectedUpsells, participantCount: tempParticipantCount, isLoading: isLoadingUpsells, isOpen: currentStep === "upsells", onClose: () => setCurrentStep("eventInstances"), onSelect: handleUpsellsSelect, onContinue: handleUpsellsContinue, onBack: handleUpsellsBack })), shouldRenderBookingForm && eventDetails && (jsxRuntime.jsx(BookingForm, { config: config, eventDetails: eventDetails, stripePromise: stripePromise, onSuccess: handleBookingSuccess, onError: handleBookingError, onBackToEventInstances: backHandlers.onBackToEventInstances, onBackToEventTypes: backHandlers.onBackToEventTypes, selectedEventType: selectedEventType, selectedEventInstance: selectedEventInstance, isOpen: currentStep === "booking" && !!eventDetails, onClose: backHandlers.onClose, systemConfig: systemConfig, selectedUpsells: selectedUpsells, upsells: upsells })), jsxRuntime.jsx(BookingSuccessModal, { isOpen: isSuccess, onClose: () => {
|
|
14522
|
+
return (jsxRuntime.jsxs(StyleProvider, { config: config, children: [jsxRuntime.jsxs("div", { ref: setWidgetContainerRef, children: [cardsView, shouldRenderInstanceSelection && (jsxRuntime.jsx(EventInstanceSelection, { eventInstances: eventInstances, selectedEventType: selectedEventType, onEventInstanceSelect: handleEventInstanceSelect, onBackToEventTypes: handleBackToEventTypes, isOpen: currentStep === "eventInstances", onClose: handleBackToEventTypes, isLoadingEventInstances: isLoadingEventInstances, isLoadingEventDetails: isLoadingEventDetails })), shouldRenderUpsells && (jsxRuntime.jsx(UpsellsStep, { upsells: upsells, selectedUpsells: selectedUpsells, participantCount: tempParticipantCount, isLoading: isLoadingUpsells, isOpen: currentStep === "upsells", onClose: () => setCurrentStep("eventInstances"), onSelect: handleUpsellsSelect, onContinue: handleUpsellsContinue, onBack: handleUpsellsBack, roundPricesEnabled: systemConfig?.roundPricesEnabled !== false })), 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, selectedUpsells: selectedUpsells, upsells: upsells })), jsxRuntime.jsx(BookingSuccessModal, { isOpen: isSuccess, onClose: () => {
|
|
14493
14523
|
setIsSuccess(false);
|
|
14494
14524
|
setCurrentStep("eventTypes");
|
|
14495
14525
|
setSuccessPaymentIntentId(null);
|