@riverbankcms/sdk 0.88.0 → 0.90.0
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/README.md +27 -4
- package/dist/{PreviewEditorSidebar-EVRS3C7T.mjs → PreviewEditorSidebar-KVXNF3VW.mjs} +3 -3
- package/dist/{PreviewEditorUI-54WD4IGE.mjs → PreviewEditorUI-J3JN5Z7T.mjs} +3 -3
- package/dist/SdkPreviewModeRuntime-UBL6MSNP.mjs +8 -0
- package/dist/_dts/ai/src/contracts/proposals.d.ts +216 -0
- package/dist/_dts/altcha/src/AltchaWidget.d.ts +1 -1
- package/dist/_dts/api/src/accessAdmin.d.ts +7 -0
- package/dist/_dts/api/src/bookingOperations.d.ts +2 -0
- package/dist/_dts/api/src/bookingRecords.d.ts +4 -2
- package/dist/_dts/api/src/bookings.d.ts +3 -1
- package/dist/_dts/api/src/endpoints.d.ts +8 -0
- package/dist/_dts/api/src/index.d.ts +7 -6
- package/dist/_dts/api/src/publicExperienceEndpoints.d.ts +15 -5
- package/dist/_dts/api/src/request.d.ts +21 -0
- package/dist/_dts/api/src/sdk-event-upsert.d.ts +3 -1
- package/dist/_dts/api/src/sdkContracts.d.ts +2 -0
- package/dist/_dts/api/src/siteManagementEndpoints.d.ts +5 -1
- package/dist/_dts/api/src/siteMembers.d.ts +6 -1
- package/dist/_dts/api/src/types.d.ts +4 -2
- package/dist/_dts/api/src/url.d.ts +6 -3
- package/dist/_dts/block-form/src/utils/visibleWhen.d.ts +1 -0
- package/dist/_dts/block-form/src/widgets/RepeaterField/components/RepeaterThumbnailCard.d.ts +5 -1
- package/dist/_dts/block-form/src/widgets/RepeaterField/components/RepeaterThumbnailGrid.d.ts +9 -1
- package/dist/_dts/block-form/src/widgets/RepeaterField/components/index.d.ts +1 -0
- package/dist/_dts/blocks/src/contracts/non-block-islands.d.ts +7 -11
- package/dist/_dts/blocks/src/contracts/proof-block-islands.d.ts +6 -0
- package/dist/_dts/blocks/src/index.d.ts +2 -1
- package/dist/_dts/blocks/src/system/blocks/events/event-calendar.d.ts +14 -6
- package/dist/_dts/blocks/src/system/blocks/events/shared/types.d.ts +4 -4
- package/dist/_dts/blocks/src/system/blocks/hero.d.ts +0 -2
- package/dist/_dts/blocks/src/system/blocks/shop.d.ts +3 -3
- package/dist/_dts/blocks/src/system/blocks/shop.shared.d.ts +8 -0
- package/dist/_dts/blocks/src/system/constants/events.d.ts +4 -1
- package/dist/_dts/blocks/src/system/icons/cta.d.ts +3 -3
- package/dist/_dts/blocks/src/system/icons/index.d.ts +1 -0
- package/dist/_dts/blocks/src/system/icons/registry.d.ts +2 -2
- package/dist/_dts/blocks/src/system/icons/semantic.d.ts +3 -3
- package/dist/_dts/blocks/src/system/icons/svg.d.ts +72 -0
- package/dist/_dts/blocks/src/system/manifest/schema.d.ts +3 -1
- package/dist/_dts/blocks/src/system/runtime/api/index.d.ts +1 -0
- package/dist/_dts/blocks/src/system/runtime/api/types.d.ts +18 -5
- package/dist/_dts/blocks/src/system/runtime/components/registry.client.d.ts +51 -6
- package/dist/_dts/blocks/src/system/runtime/components/runtime-backed-blocks.d.ts +24 -0
- package/dist/_dts/blocks/src/system/runtime/hooks/loadStateError.d.ts +1 -0
- package/dist/_dts/blocks/src/system/runtime/hooks/useAvailableDates.d.ts +1 -1
- package/dist/_dts/blocks/src/system/runtime/hooks/useAvailableDates.state.d.ts +55 -0
- package/dist/_dts/blocks/src/system/runtime/hooks/useAvailableSlots.state.d.ts +39 -0
- package/dist/_dts/blocks/src/system/runtime/hooks/useBookingFormConfig.d.ts +4 -27
- package/dist/_dts/blocks/src/system/runtime/hooks/useBookingFormConfig.state.d.ts +40 -0
- package/dist/_dts/blocks/src/system/runtime/hooks/useCalendarEvents.state.d.ts +20 -0
- package/dist/_dts/blocks/src/system/runtime/hooks/useEventFilters.state.d.ts +31 -0
- package/dist/_dts/blocks/src/system/runtime/hooks/useEventPagination.d.ts +3 -3
- package/dist/_dts/blocks/src/system/runtime/hooks/useEventPagination.state.d.ts +39 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/course-registration/useCourseRegistrationWizard.d.ts +2 -2
- package/dist/_dts/blocks/src/system/runtime/nodes/event-details/logic.d.ts +1 -17
- package/dist/_dts/blocks/src/system/runtime/nodes/event-details.client.d.ts +5 -9
- package/dist/_dts/blocks/src/system/runtime/nodes/event-details.server.d.ts +5 -9
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/event-registration.headless.contract.d.ts +2 -1
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/eventPaymentOptions.d.ts +24 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/types.d.ts +5 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/useDiscountCodeUi.d.ts +4 -4
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/useDiscountCodeUi.state.d.ts +50 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/useEventRegistrationWizard.d.ts +2 -2
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration.interactive.d.ts +21 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration.server.d.ts +1 -1
- package/dist/_dts/blocks/src/system/runtime/nodes/events/EventCalendar.interactive.d.ts +11 -1
- package/dist/_dts/blocks/src/system/runtime/nodes/events/EventCombined.client.d.ts +2 -1
- package/dist/_dts/blocks/src/system/runtime/nodes/events/EventCombined.interactive.d.ts +11 -1
- package/dist/_dts/blocks/src/system/runtime/nodes/events/shared/EventPaginatedListView.client.d.ts +1 -1
- package/dist/_dts/blocks/src/system/runtime/nodes/events/shared/calendarViewOptions.d.ts +10 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/events/shared/eventProductEligibility.d.ts +24 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/newsletter-form.client.state.d.ts +24 -2
- package/dist/_dts/blocks/src/system/runtime/nodes/shared/MagicLinkForm.state.d.ts +24 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/shared/contract-schemas.d.ts +5 -2
- package/dist/_dts/blocks/src/system/runtime/nodes/shop-checkout-form.d.ts +2 -2
- package/dist/_dts/blocks/src/system/runtime/shared/useWaitlistClaim.state.d.ts +35 -0
- package/dist/_dts/content-model/src/entry-slots/index.d.ts +1 -0
- package/dist/_dts/content-model/src/entry-slots/sdkBlocks.d.ts +21 -0
- package/dist/_dts/content-model/src/entry-slots/types.d.ts +61 -0
- package/dist/_dts/core/src/branded.d.ts +7 -0
- package/dist/_dts/core/src/index.d.ts +1 -0
- package/dist/_dts/core/src/money-input.d.ts +18 -0
- package/dist/_dts/core/src/site-route-target.d.ts +40 -0
- package/dist/_dts/db/src/generated/supabase/database.types.d.ts +209 -2
- package/dist/_dts/media-core/src/fileDomain.d.ts +4 -0
- package/dist/_dts/media-editor/src/MediaEditor.d.ts +2 -1
- package/dist/_dts/media-editor/src/fieldUi.d.ts +6 -0
- package/dist/_dts/media-editor/src/index.d.ts +1 -1
- package/dist/_dts/preview-next/src/client/index.d.ts +1 -0
- package/dist/_dts/preview-next/src/client/preview/PreviewShell.d.ts +3 -2
- package/dist/_dts/preview-next/src/client/preview/PreviewShellLayout.d.ts +3 -2
- package/dist/_dts/preview-next/src/client/preview/PreviewThemedSiteDocument.d.ts +3 -2
- package/dist/_dts/preview-next/src/client/preview/SiteChromeEditableSurface.d.ts +2 -2
- package/dist/_dts/preview-next/src/client/preview/themeRuntime.d.ts +6 -0
- package/dist/_dts/preview-next/src/client/sdk/SdkPreviewMode.d.ts +2 -1
- package/dist/_dts/sdk/src/cli/commands/pull-dated-offering-scope.d.ts +10 -0
- package/dist/_dts/sdk/src/cli/content/reader.d.ts +12 -5
- package/dist/_dts/sdk/src/client/management/types.d.ts +6 -55
- package/dist/_dts/sdk/src/client/runtimeCachePolicy.d.ts +160 -0
- package/dist/_dts/sdk/src/client/types.d.ts +26 -1
- package/dist/_dts/sdk/src/components.d.ts +1 -0
- package/dist/_dts/sdk/src/config/field-definitions.d.ts +3 -1
- package/dist/_dts/sdk/src/contracts/system-block-content.d.ts +3 -1
- package/dist/_dts/sdk/src/index.d.ts +3 -1
- package/dist/_dts/sdk/src/next/types.d.ts +8 -11
- package/dist/_dts/sdk/src/preview-next/client/index.d.ts +1 -1
- package/dist/_dts/sdk/src/rendering/blocks-theme-scope.d.ts +2 -1
- package/dist/_dts/sdk/src/rendering/components/Layout.d.ts +8 -7
- package/dist/_dts/sdk/src/rendering/components/pageShared.d.ts +5 -6
- package/dist/_dts/sdk/src/rendering/index.d.ts +1 -0
- package/dist/_dts/sdk/src/rendering/server.d.ts +1 -0
- package/dist/_dts/sdk/src/rendering/themeRuntime.d.ts +26 -0
- package/dist/_dts/sdk/src/version.d.ts +1 -1
- package/dist/_dts/site-commands/src/commands.d.ts +18 -0
- package/dist/_dts/theme-core/src/ResponsiveScope.d.ts +12 -0
- package/dist/_dts/theme-core/src/accordions/types.d.ts +1 -1
- package/dist/_dts/theme-core/src/buttons/personalities/types.d.ts +2 -2
- package/dist/_dts/theme-core/src/buttons/types.d.ts +5 -5
- package/dist/_dts/theme-core/src/cards/types.d.ts +2 -2
- package/dist/_dts/theme-core/src/generated/containerResponsiveThemeCss.d.ts +1 -1
- package/dist/_dts/theme-core/src/index.d.ts +2 -0
- package/dist/_dts/theme-core/src/mock-themes/all.d.ts +21 -21
- package/dist/_dts/theme-core/src/schema.d.ts +18 -18
- package/dist/_dts/theme-core/src/site-styles/designState.d.ts +2 -2
- package/dist/_dts/theme-core/src/site-styles/generatedSchemas.d.ts +2 -2
- package/dist/_dts/theme-core/src/site-styles/logoBranding.d.ts +4 -4
- package/dist/_dts/theme-core/src/themeRuntime.d.ts +11 -0
- package/dist/{chunk-ER4UIW4X.mjs → chunk-AEOYWPE4.mjs} +91 -55
- package/dist/{chunk-O4LVYUVH.mjs → chunk-BOQXMCSP.mjs} +147 -101
- package/dist/{chunk-HVOBXA3Y.mjs → chunk-GSPFFUVB.mjs} +2 -2
- package/dist/{chunk-7KOO7RPP.mjs → chunk-PMBB6MQ7.mjs} +2273 -1113
- package/dist/{chunk-K3JWH6HE.mjs → chunk-RQ3XZ4SJ.mjs} +9 -1
- package/dist/{chunk-YDMBIIS5.mjs → chunk-UG7I7S7W.mjs} +1 -1
- package/dist/cli/index.mjs +1564 -546
- package/dist/cli/init-docs/content/cli-reference.md +6 -1
- package/dist/cli/init-docs/content/content-management.md +27 -0
- package/dist/client/{accordion-PT5CGW5N.mjs → accordion-GXQNWQ6O.mjs} +2 -2
- package/dist/client/{bookingForm-2HLRTEYS.mjs → bookingForm-STLUJ36H.mjs} +206 -335
- package/dist/client/bookings.mjs +821 -413
- package/dist/client/{carousel-Z2LKYSWA.mjs → carousel-CVRN6EPP.mjs} +4 -3
- package/dist/client/{cart-ND5IK4A6.mjs → cart-IYIBA5CL.mjs} +8 -8
- package/dist/client/{checkout-EYUSGAY7.mjs → checkout-O3BGM4GS.mjs} +8 -8
- package/dist/client/chunk-4RTFGHZN.mjs +433 -0
- package/dist/client/{chunk-DIRW2LNG.mjs → chunk-6DPXDOIL.mjs} +336 -225
- package/dist/client/chunk-6N7YRNYU.mjs +183 -0
- package/dist/client/{chunk-O5JNI3E4.mjs → chunk-7DH35FGA.mjs} +2 -2
- package/dist/client/{chunk-S4G65LGR.mjs → chunk-D3ETC2SU.mjs} +1 -1
- package/dist/client/{chunk-BAWHZ5GM.mjs → chunk-DAS5CIER.mjs} +460 -157
- package/dist/client/{chunk-6DVPO44G.mjs → chunk-FHU6PFPM.mjs} +1 -1
- package/dist/client/{chunk-SDIYSQAY.mjs → chunk-HIHOQGIP.mjs} +2 -3
- package/dist/client/{chunk-BL66UWGD.mjs → chunk-MFPKS6QS.mjs} +13 -16
- package/dist/client/{chunk-X7GVFB7Y.mjs → chunk-NBFRJ5NB.mjs} +157 -5
- package/dist/client/{chunk-WCVK4MBJ.mjs → chunk-VFHZLZAC.mjs} +1 -1
- package/dist/client/{chunk-GOFO7HRH.mjs → chunk-WHZQDPBZ.mjs} +19 -1
- package/dist/client/{chunk-MHBEWDT7.mjs → chunk-Z62JYS5O.mjs} +122 -50
- package/dist/client/client.mjs +5979 -5198
- package/dist/client/{courseRegistration-H3AZBUEG.mjs → courseRegistration-2D3ACMJR.mjs} +20 -58
- package/dist/client/{eventCalendar-FPKJGLGS.mjs → eventCalendar-QY4UZUFF.mjs} +11 -11
- package/dist/client/{eventCombined-QCGIZBUY.mjs → eventCombined-RRCDKJC2.mjs} +11 -11
- package/dist/client/{eventDetails-HIT3BJWU.mjs → eventDetails-YO335BUT.mjs} +11 -11
- package/dist/client/{eventListing-R4HNWJDN.mjs → eventListing-PXA6GFQ3.mjs} +11 -11
- package/dist/client/{eventRegistration-Q7BYY5HF.mjs → eventRegistration-2ZHEDDXO.mjs} +11 -11
- package/dist/client/{form-NI6YOG6S.mjs → form-ZS6KX4U2.mjs} +7 -7
- package/dist/client/{headerSection-SDYGII36.mjs → headerSection-QK5SLIIB.mjs} +3 -3
- package/dist/client/hooks.mjs +1102 -1029
- package/dist/client/{locationMap-BDETEUQD.mjs → locationMap-GFNIUD2X.mjs} +3 -3
- package/dist/client/{newsletterForm-EKYIU67X.mjs → newsletterForm-PGLTTCUG.mjs} +61 -25
- package/dist/client/{productDetail-5UTGNN76.mjs → productDetail-OPBE5ZPI.mjs} +8 -8
- package/dist/client/{productList-7YA5KXZQ.mjs → productList-NI72Q62Z.mjs} +8 -8
- package/dist/client/rendering/client.mjs +4390 -4245
- package/dist/client/rendering/islands.mjs +19 -19
- package/dist/client/rendering.mjs +3327 -3181
- package/dist/client/{shop-AIMUMZYC.mjs → shop-3ZQPEWYI.mjs} +8 -8
- package/dist/client/spam-protection.mjs +4 -5
- package/dist/preview-next/before-render.mjs +20 -2
- package/dist/preview-next/client/runtime.mjs +5 -5
- package/dist/preview-next/middleware.mjs +18 -0
- package/dist/{sdk-runtime-NW472WNT.mjs → sdk-runtime-FSHXCWDS.mjs} +6 -6
- package/dist/server/components.mjs +2580 -2783
- package/dist/server/config-validation.mjs +1334 -1261
- package/dist/server/config.mjs +1334 -1261
- package/dist/server/data.mjs +1102 -1029
- package/dist/server/index.mjs +1097 -476
- package/dist/server/navigation.mjs +20 -30
- package/dist/server/next.mjs +3282 -2847
- package/dist/server/page-converter.mjs +1009 -946
- package/dist/server/prebuild.mjs +1 -1
- package/dist/server/rendering/server.mjs +2580 -2783
- package/dist/server/rendering.mjs +2586 -2789
- package/dist/server/routing.mjs +1440 -1053
- package/dist/server/server.mjs +1886 -1153
- package/dist/server/theme-bridge.mjs +34 -5
- package/dist/styles/index.css +26 -0
- package/package.json +3 -2
- package/dist/SdkPreviewModeRuntime-ZALZDJEK.mjs +0 -8
- package/dist/client/chunk-H4MHEXYS.mjs +0 -184
- package/dist/client/chunk-ZFHRN6W2.mjs +0 -66
- /package/dist/client/{chunk-LI2C6M5O.mjs → chunk-25W2EQUN.mjs} +0 -0
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { useWaitlistClaim, resolveCoursePricingState, formatCoursePriceDisplay, formatCoursePriceAmount, MagicLinkForm } from './chunk-
|
|
3
|
-
import { SpinnerNode } from './chunk-
|
|
2
|
+
import { useWaitlistClaim, resolveCoursePricingState, formatCoursePriceDisplay, formatCoursePriceAmount, MagicLinkForm } from './chunk-Z62JYS5O.mjs';
|
|
3
|
+
import { SpinnerNode } from './chunk-FHU6PFPM.mjs';
|
|
4
4
|
import { buildRouteIslandApiConfig } from './chunk-L4J5Y62O.mjs';
|
|
5
|
-
import { DiscountCodeDisclosure, getStepNumber, logoutPortal, StepIndicator, LoggedInAsUser, CheckIcon, formatPrice, TerminalPanel, StateIcon, ClockIcon, CrossIcon, scrollToBlock, buildCheckoutReturnUrls, MembershipHero, validateFormData } from './chunk-
|
|
5
|
+
import { DiscountCodeDisclosure, useDiscountCodeUi, getStepNumber, logoutPortal, StepIndicator, LoggedInAsUser, CheckIcon, formatPrice, TerminalPanel, StateIcon, ClockIcon, CrossIcon, scrollToBlock, buildCheckoutReturnUrls, MembershipHero, validateFormData } from './chunk-NBFRJ5NB.mjs';
|
|
6
6
|
import { getFieldValidationControlProps, FieldValidationMessage } from './chunk-3DCJ45Z2.mjs';
|
|
7
7
|
import { ModalShell } from './chunk-WBQG7VJA.mjs';
|
|
8
|
-
import { AltchaWidget, getChallengeUrl, isSpamProtectionEnabled } from './chunk-
|
|
9
|
-
import { BlockApiProvider, useBlockApi } from './chunk-
|
|
8
|
+
import { AltchaWidget, getChallengeUrl, isSpamProtectionEnabled } from './chunk-HIHOQGIP.mjs';
|
|
9
|
+
import { BlockApiProvider, useBlockApi } from './chunk-WHZQDPBZ.mjs';
|
|
10
10
|
import { mountReactIsland } from './chunk-N7PBWBWQ.mjs';
|
|
11
|
-
import { defineIslandPropsDecoder, themeButtonClassName } from './chunk-
|
|
12
|
-
import { formatBookingDate, toScheduledBookingDateTime, toBookingTimeZone, formatBookingTime } from './chunk-
|
|
11
|
+
import { defineIslandPropsDecoder, themeButtonClassName } from './chunk-6DPXDOIL.mjs';
|
|
12
|
+
import { formatBookingDate, toScheduledBookingDateTime, toBookingTimeZone, formatBookingTime } from './chunk-25W2EQUN.mjs';
|
|
13
13
|
import React2, { Component, useMemo, useState, useEffect } from 'react';
|
|
14
14
|
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
15
15
|
|
|
@@ -709,11 +709,6 @@ function useCourseRegistrationWizard(props) {
|
|
|
709
709
|
const [eligibleMemberships, setEligibleMemberships] = useState([]);
|
|
710
710
|
const [paymentChoice, setPaymentChoice] = useState("checkout");
|
|
711
711
|
const [selectedMembershipId, setSelectedMembershipId] = useState(null);
|
|
712
|
-
const [discountUiOpen, setDiscountUiOpen] = useState(false);
|
|
713
|
-
const [discountCode, setDiscountCode] = useState("");
|
|
714
|
-
const [discountsAvailable, setDiscountsAvailable] = useState(false);
|
|
715
|
-
const [manualCodeEntryAllowed, setManualCodeEntryAllowed] = useState(false);
|
|
716
|
-
const [discountsAvailableLoading, setDiscountsAvailableLoading] = useState(false);
|
|
717
712
|
const [bookingMode, setBookingMode] = useState(null);
|
|
718
713
|
const waitlistClaim = useWaitlistClaim();
|
|
719
714
|
const selectedCoursePricing = useMemo(
|
|
@@ -1134,45 +1129,12 @@ function useCourseRegistrationWizard(props) {
|
|
|
1134
1129
|
if (paymentChoice !== "checkout") return null;
|
|
1135
1130
|
return { type: "course", courseId: selectedCourse.id };
|
|
1136
1131
|
}, [selectedCourse, selectedCoursePricing?.selectedRequiresPayment, paymentChoice]);
|
|
1137
|
-
|
|
1138
|
-
|
|
1139
|
-
|
|
1140
|
-
|
|
1141
|
-
|
|
1142
|
-
|
|
1143
|
-
setDiscountsAvailableLoading(false);
|
|
1144
|
-
setDiscountUiOpen(false);
|
|
1145
|
-
setDiscountCode("");
|
|
1146
|
-
return;
|
|
1147
|
-
}
|
|
1148
|
-
setDiscountsAvailableLoading(true);
|
|
1149
|
-
try {
|
|
1150
|
-
const res = await api.getDiscountsAvailable({
|
|
1151
|
-
context: courseDiscountContext,
|
|
1152
|
-
subtotalCents: selectedCoursePricing?.selectedPriceAmount ?? void 0
|
|
1153
|
-
});
|
|
1154
|
-
if (cancelled) return;
|
|
1155
|
-
setDiscountsAvailable(res.hasDiscounts);
|
|
1156
|
-
setManualCodeEntryAllowed(res.manualCodeEntryAllowed);
|
|
1157
|
-
if (!res.hasDiscounts || !res.manualCodeEntryAllowed) {
|
|
1158
|
-
setDiscountUiOpen(false);
|
|
1159
|
-
setDiscountCode("");
|
|
1160
|
-
}
|
|
1161
|
-
} catch {
|
|
1162
|
-
if (cancelled) return;
|
|
1163
|
-
setDiscountsAvailable(false);
|
|
1164
|
-
setManualCodeEntryAllowed(false);
|
|
1165
|
-
setDiscountUiOpen(false);
|
|
1166
|
-
setDiscountCode("");
|
|
1167
|
-
} finally {
|
|
1168
|
-
if (!cancelled) setDiscountsAvailableLoading(false);
|
|
1169
|
-
}
|
|
1170
|
-
}
|
|
1171
|
-
void checkDiscountAvailability();
|
|
1172
|
-
return () => {
|
|
1173
|
-
cancelled = true;
|
|
1174
|
-
};
|
|
1175
|
-
}, [api, courseDiscountContext, selectedCoursePricing?.selectedPriceAmount]);
|
|
1132
|
+
const discountUi = useDiscountCodeUi({
|
|
1133
|
+
api,
|
|
1134
|
+
discountContext: courseDiscountContext,
|
|
1135
|
+
subtotalCents: selectedCoursePricing?.selectedPriceAmount ?? void 0
|
|
1136
|
+
});
|
|
1137
|
+
const discountCode = discountUi.discountCode;
|
|
1176
1138
|
const hasCoursePayment = resolveHasCoursePayment(selectedCoursePricing);
|
|
1177
1139
|
const canUseMembership = hasCoursePayment && selectedCourse?.acceptsMemberships === true && portalAuthState === "authenticated" && eligibleMemberships.length > 0;
|
|
1178
1140
|
const hasPreSelectedCourse = scopedCourses.length === 1;
|
|
@@ -1221,13 +1183,13 @@ function useCourseRegistrationWizard(props) {
|
|
|
1221
1183
|
setPaymentChoice,
|
|
1222
1184
|
selectedMembershipId,
|
|
1223
1185
|
setSelectedMembershipId,
|
|
1224
|
-
discountUiOpen,
|
|
1225
|
-
setDiscountUiOpen,
|
|
1226
|
-
discountCode,
|
|
1227
|
-
setDiscountCode,
|
|
1228
|
-
discountsAvailable,
|
|
1229
|
-
manualCodeEntryAllowed,
|
|
1230
|
-
discountsAvailableLoading,
|
|
1186
|
+
discountUiOpen: discountUi.discountUiOpen,
|
|
1187
|
+
setDiscountUiOpen: discountUi.setDiscountUiOpen,
|
|
1188
|
+
discountCode: discountUi.discountCode,
|
|
1189
|
+
setDiscountCode: discountUi.setDiscountCode,
|
|
1190
|
+
discountsAvailable: discountUi.discountsAvailable,
|
|
1191
|
+
manualCodeEntryAllowed: discountUi.manualCodeEntryAllowed,
|
|
1192
|
+
discountsAvailableLoading: discountUi.discountsAvailableLoading,
|
|
1231
1193
|
canUseMembership,
|
|
1232
1194
|
waitlistClaim,
|
|
1233
1195
|
// New booking mode state
|
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
import { EventCalendarClient } from './chunk-
|
|
2
|
-
import './chunk-
|
|
3
|
-
import './chunk-
|
|
4
|
-
import './chunk-
|
|
5
|
-
import './chunk-
|
|
6
|
-
import './chunk-
|
|
1
|
+
import { EventCalendarClient } from './chunk-DAS5CIER.mjs';
|
|
2
|
+
import './chunk-D3ETC2SU.mjs';
|
|
3
|
+
import './chunk-Z62JYS5O.mjs';
|
|
4
|
+
import './chunk-6N7YRNYU.mjs';
|
|
5
|
+
import './chunk-4RTFGHZN.mjs';
|
|
6
|
+
import './chunk-FHU6PFPM.mjs';
|
|
7
7
|
import { buildRouteIslandApiConfig } from './chunk-L4J5Y62O.mjs';
|
|
8
|
-
import './chunk-
|
|
8
|
+
import './chunk-NBFRJ5NB.mjs';
|
|
9
9
|
import './chunk-3DCJ45Z2.mjs';
|
|
10
10
|
import './chunk-WBQG7VJA.mjs';
|
|
11
|
-
import './chunk-
|
|
12
|
-
import { BlockApiProvider } from './chunk-
|
|
11
|
+
import './chunk-HIHOQGIP.mjs';
|
|
12
|
+
import { BlockApiProvider } from './chunk-WHZQDPBZ.mjs';
|
|
13
13
|
import { mountReactIsland } from './chunk-N7PBWBWQ.mjs';
|
|
14
|
-
import { defineIslandPropsDecoder } from './chunk-
|
|
15
|
-
import './chunk-
|
|
14
|
+
import { defineIslandPropsDecoder } from './chunk-6DPXDOIL.mjs';
|
|
15
|
+
import './chunk-25W2EQUN.mjs';
|
|
16
16
|
import { jsx } from 'react/jsx-runtime';
|
|
17
17
|
|
|
18
18
|
var decode = defineIslandPropsDecoder("event-calendar");
|
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
import { EventCombinedIslandClient } from './chunk-
|
|
2
|
-
import './chunk-
|
|
3
|
-
import './chunk-
|
|
4
|
-
import './chunk-
|
|
5
|
-
import './chunk-
|
|
6
|
-
import './chunk-
|
|
1
|
+
import { EventCombinedIslandClient } from './chunk-DAS5CIER.mjs';
|
|
2
|
+
import './chunk-D3ETC2SU.mjs';
|
|
3
|
+
import './chunk-Z62JYS5O.mjs';
|
|
4
|
+
import './chunk-6N7YRNYU.mjs';
|
|
5
|
+
import './chunk-4RTFGHZN.mjs';
|
|
6
|
+
import './chunk-FHU6PFPM.mjs';
|
|
7
7
|
import { buildRouteIslandApiConfig } from './chunk-L4J5Y62O.mjs';
|
|
8
|
-
import './chunk-
|
|
8
|
+
import './chunk-NBFRJ5NB.mjs';
|
|
9
9
|
import './chunk-3DCJ45Z2.mjs';
|
|
10
10
|
import './chunk-WBQG7VJA.mjs';
|
|
11
|
-
import './chunk-
|
|
12
|
-
import { BlockApiProvider } from './chunk-
|
|
11
|
+
import './chunk-HIHOQGIP.mjs';
|
|
12
|
+
import { BlockApiProvider } from './chunk-WHZQDPBZ.mjs';
|
|
13
13
|
import { mountReactIsland } from './chunk-N7PBWBWQ.mjs';
|
|
14
|
-
import { defineIslandPropsDecoder } from './chunk-
|
|
15
|
-
import './chunk-
|
|
14
|
+
import { defineIslandPropsDecoder } from './chunk-6DPXDOIL.mjs';
|
|
15
|
+
import './chunk-25W2EQUN.mjs';
|
|
16
16
|
import { jsx } from 'react/jsx-runtime';
|
|
17
17
|
|
|
18
18
|
var decode = defineIslandPropsDecoder("event-combined");
|
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import { EventDetailsIslandClient } from './chunk-
|
|
2
|
-
import './chunk-
|
|
3
|
-
import './chunk-
|
|
4
|
-
import './chunk-
|
|
5
|
-
import './chunk-
|
|
6
|
-
import './chunk-
|
|
7
|
-
import './chunk-
|
|
1
|
+
import { EventDetailsIslandClient } from './chunk-DAS5CIER.mjs';
|
|
2
|
+
import './chunk-D3ETC2SU.mjs';
|
|
3
|
+
import './chunk-Z62JYS5O.mjs';
|
|
4
|
+
import './chunk-6N7YRNYU.mjs';
|
|
5
|
+
import './chunk-4RTFGHZN.mjs';
|
|
6
|
+
import './chunk-FHU6PFPM.mjs';
|
|
7
|
+
import './chunk-NBFRJ5NB.mjs';
|
|
8
8
|
import './chunk-3DCJ45Z2.mjs';
|
|
9
9
|
import './chunk-WBQG7VJA.mjs';
|
|
10
|
-
import './chunk-
|
|
11
|
-
import './chunk-
|
|
10
|
+
import './chunk-HIHOQGIP.mjs';
|
|
11
|
+
import './chunk-WHZQDPBZ.mjs';
|
|
12
12
|
import { mountReactIsland } from './chunk-N7PBWBWQ.mjs';
|
|
13
|
-
import { defineIslandPropsDecoder } from './chunk-
|
|
14
|
-
import './chunk-
|
|
13
|
+
import { defineIslandPropsDecoder } from './chunk-6DPXDOIL.mjs';
|
|
14
|
+
import './chunk-25W2EQUN.mjs';
|
|
15
15
|
import { jsx } from 'react/jsx-runtime';
|
|
16
16
|
|
|
17
17
|
var decode = defineIslandPropsDecoder("event-details");
|
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
import { EventListingClient } from './chunk-
|
|
2
|
-
import './chunk-
|
|
3
|
-
import './chunk-
|
|
4
|
-
import './chunk-
|
|
5
|
-
import './chunk-
|
|
6
|
-
import './chunk-
|
|
1
|
+
import { EventListingClient } from './chunk-DAS5CIER.mjs';
|
|
2
|
+
import './chunk-D3ETC2SU.mjs';
|
|
3
|
+
import './chunk-Z62JYS5O.mjs';
|
|
4
|
+
import './chunk-6N7YRNYU.mjs';
|
|
5
|
+
import './chunk-4RTFGHZN.mjs';
|
|
6
|
+
import './chunk-FHU6PFPM.mjs';
|
|
7
7
|
import { buildRouteIslandApiConfig } from './chunk-L4J5Y62O.mjs';
|
|
8
|
-
import './chunk-
|
|
8
|
+
import './chunk-NBFRJ5NB.mjs';
|
|
9
9
|
import './chunk-3DCJ45Z2.mjs';
|
|
10
10
|
import './chunk-WBQG7VJA.mjs';
|
|
11
|
-
import './chunk-
|
|
12
|
-
import { BlockApiProvider } from './chunk-
|
|
11
|
+
import './chunk-HIHOQGIP.mjs';
|
|
12
|
+
import { BlockApiProvider } from './chunk-WHZQDPBZ.mjs';
|
|
13
13
|
import { mountReactIsland } from './chunk-N7PBWBWQ.mjs';
|
|
14
|
-
import { defineIslandPropsDecoder } from './chunk-
|
|
15
|
-
import './chunk-
|
|
14
|
+
import { defineIslandPropsDecoder } from './chunk-6DPXDOIL.mjs';
|
|
15
|
+
import './chunk-25W2EQUN.mjs';
|
|
16
16
|
import { jsx } from 'react/jsx-runtime';
|
|
17
17
|
|
|
18
18
|
var decode = defineIslandPropsDecoder("event-listing");
|
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
import { EventRegistrationIslandClient } from './chunk-
|
|
2
|
-
import './chunk-
|
|
3
|
-
import './chunk-
|
|
4
|
-
import './chunk-
|
|
5
|
-
import './chunk-
|
|
6
|
-
import './chunk-
|
|
1
|
+
import { EventRegistrationIslandClient } from './chunk-DAS5CIER.mjs';
|
|
2
|
+
import './chunk-D3ETC2SU.mjs';
|
|
3
|
+
import './chunk-Z62JYS5O.mjs';
|
|
4
|
+
import './chunk-6N7YRNYU.mjs';
|
|
5
|
+
import './chunk-4RTFGHZN.mjs';
|
|
6
|
+
import './chunk-FHU6PFPM.mjs';
|
|
7
7
|
import { buildRouteIslandApiConfig } from './chunk-L4J5Y62O.mjs';
|
|
8
|
-
import './chunk-
|
|
8
|
+
import './chunk-NBFRJ5NB.mjs';
|
|
9
9
|
import './chunk-3DCJ45Z2.mjs';
|
|
10
10
|
import './chunk-WBQG7VJA.mjs';
|
|
11
|
-
import './chunk-
|
|
12
|
-
import { BlockApiProvider } from './chunk-
|
|
11
|
+
import './chunk-HIHOQGIP.mjs';
|
|
12
|
+
import { BlockApiProvider } from './chunk-WHZQDPBZ.mjs';
|
|
13
13
|
import { mountReactIsland } from './chunk-N7PBWBWQ.mjs';
|
|
14
|
-
import { defineIslandPropsDecoder } from './chunk-
|
|
15
|
-
import './chunk-
|
|
14
|
+
import { defineIslandPropsDecoder } from './chunk-6DPXDOIL.mjs';
|
|
15
|
+
import './chunk-25W2EQUN.mjs';
|
|
16
16
|
import { jsx } from 'react/jsx-runtime';
|
|
17
17
|
|
|
18
18
|
var decode = defineIslandPropsDecoder("event-registration");
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { isSpamProtectionEnabled, AltchaWidget, getChallengeUrl } from './chunk-
|
|
3
|
-
import { BlockApiProvider, FeedbackMessage, useBlockApi } from './chunk-
|
|
2
|
+
import { isSpamProtectionEnabled, AltchaWidget, getChallengeUrl } from './chunk-HIHOQGIP.mjs';
|
|
3
|
+
import { BlockApiProvider, FeedbackMessage, useBlockApi } from './chunk-WHZQDPBZ.mjs';
|
|
4
4
|
import { mountReactIsland } from './chunk-N7PBWBWQ.mjs';
|
|
5
|
-
import { defineIslandPropsDecoder, themeButtonClassName,
|
|
6
|
-
import { clsx_default } from './chunk-
|
|
5
|
+
import { defineIslandPropsDecoder, themeButtonClassName, assertNever, err, ok } from './chunk-6DPXDOIL.mjs';
|
|
6
|
+
import { clsx_default } from './chunk-25W2EQUN.mjs';
|
|
7
7
|
import { useState, useReducer, useRef } from 'react';
|
|
8
8
|
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
9
9
|
|
|
@@ -18,7 +18,7 @@ function formSubmissionReducer(_state, action) {
|
|
|
18
18
|
case "submission-failed":
|
|
19
19
|
return { tag: "failed", message: action.message };
|
|
20
20
|
default:
|
|
21
|
-
return
|
|
21
|
+
return assertNever(action);
|
|
22
22
|
}
|
|
23
23
|
}
|
|
24
24
|
|
|
@@ -33,7 +33,7 @@ function useFormSubmission() {
|
|
|
33
33
|
stateRef.current = state;
|
|
34
34
|
const submit = async (data) => {
|
|
35
35
|
if (stateRef.current.tag === "submitting") {
|
|
36
|
-
return
|
|
36
|
+
return err("Already submitting");
|
|
37
37
|
}
|
|
38
38
|
stateRef.current = { tag: "submitting" };
|
|
39
39
|
dispatch({ type: "submission-started" });
|
|
@@ -46,7 +46,7 @@ function useFormSubmission() {
|
|
|
46
46
|
const message = error instanceof Error ? error.message : "Failed to submit form";
|
|
47
47
|
stateRef.current = { tag: "failed", message };
|
|
48
48
|
dispatch({ type: "submission-failed", message });
|
|
49
|
-
return
|
|
49
|
+
return err(message);
|
|
50
50
|
}
|
|
51
51
|
};
|
|
52
52
|
return { submit, state };
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { useCommerceCart } from './chunk-
|
|
2
|
+
import { useCommerceCart } from './chunk-VFHZLZAC.mjs';
|
|
3
3
|
import { resolveDedicatedCheckoutPath, ModalShell } from './chunk-WBQG7VJA.mjs';
|
|
4
|
-
import { defineIslandPropsDecoder, buildCartDisplay, themeButtonClassName } from './chunk-
|
|
5
|
-
import './chunk-
|
|
4
|
+
import { defineIslandPropsDecoder, buildCartDisplay, themeButtonClassName } from './chunk-6DPXDOIL.mjs';
|
|
5
|
+
import './chunk-25W2EQUN.mjs';
|
|
6
6
|
import * as React2 from 'react';
|
|
7
7
|
import { createPortal } from 'react-dom';
|
|
8
8
|
import { createRoot } from 'react-dom/client';
|