@riverbankcms/sdk 0.130.0 → 0.130.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +85 -0
- package/README.md +1 -1
- package/dist/{PreviewEditorSidebar-DiEpbOdw.mjs → PreviewEditorSidebar-BY-1QdE2.mjs} +18 -15
- package/dist/{PreviewEditorUI-C6MvxnIa.mjs → PreviewEditorUI-BS34jI9_.mjs} +3 -3
- package/dist/{PreviewQueryProvider-C2rnoPz6.mjs → PreviewQueryProvider-BD0kOjtI.mjs} +1 -1
- package/dist/{SdkPreviewModeRuntime-DRXA_m5L.mjs → SdkPreviewModeRuntime-B1pWnhu-.mjs} +48 -21
- package/dist/{SiteChromeCustomizeContext-BTHdv5_-.mjs → SiteChromeCustomizeContext-BhUG_72i.mjs} +6180 -5076
- package/dist/_dts/ai/src/contracts/proposals.d.ts +309 -32
- package/dist/_dts/ai/src/contracts/siteStyleProposalSchemas.d.ts +969 -112
- package/dist/_dts/api/src/accountApi.d.ts +213 -0
- package/dist/_dts/api/src/accountEndpointDefinitions.d.ts +30 -0
- package/dist/_dts/api/src/accountEndpoints.d.ts +254 -0
- package/dist/_dts/api/src/apiCallParams.d.ts +60 -0
- package/dist/_dts/api/src/bookingConfig.d.ts +10 -20
- package/dist/_dts/api/src/bookingManagementEndpoints.d.ts +4 -5
- package/dist/_dts/api/src/bookingManagementEventEndpointTypes.d.ts +15 -0
- package/dist/_dts/api/src/bookingSettingsSections.d.ts +9 -0
- package/dist/_dts/api/src/bookingVerticals.d.ts +2 -2
- package/dist/_dts/api/src/commercePortalEndpoints.d.ts +2 -0
- package/dist/_dts/api/src/endpoints.d.ts +1253 -1209
- package/dist/_dts/api/src/event-destination-policy.d.ts +1 -1
- package/dist/_dts/api/src/eventManagementContracts.d.ts +83 -7
- package/dist/_dts/api/src/eventManagementEndpointDefinitions.d.ts +26 -0
- package/dist/_dts/api/src/eventSeriesPresentationPreset.d.ts +12 -0
- package/dist/_dts/api/src/index.d.ts +11 -3
- package/dist/_dts/api/src/indexCoreTypes.d.ts +1 -0
- package/dist/_dts/api/src/indexExtendedTypes.d.ts +1 -0
- package/dist/_dts/api/src/oauth.d.ts +8 -0
- package/dist/_dts/api/src/preview-auth.d.ts +26 -0
- package/dist/_dts/api/src/publicExperience/eventEndpoints.d.ts +5 -5
- package/dist/_dts/api/src/publicExperience/wholeSeriesEndpoints.d.ts +0 -1
- package/dist/_dts/api/src/sdk-event-upsert.d.ts +2 -0
- package/dist/_dts/api/src/sdkBlockUpsertContracts.d.ts +48 -0
- package/dist/_dts/api/src/sdkContracts.d.ts +5 -13
- package/dist/_dts/api/src/sdkEventCategoryContracts.d.ts +9 -0
- package/dist/_dts/api/src/sdkThemeWire.d.ts +40 -8
- package/dist/_dts/api/src/settings/permissions.d.ts +2 -2
- package/dist/_dts/api/src/siteApiKeyEndpointDefinitions.d.ts +66 -0
- package/dist/_dts/api/src/siteInfrastructure.d.ts +3 -3
- package/dist/_dts/api/src/siteOperations.d.ts +1 -1
- package/dist/_dts/api/src/sitePlatformEndpoints.d.ts +12 -4
- package/dist/_dts/api/src/types.d.ts +7 -59
- package/dist/_dts/block-form/src/client/index.d.ts +15 -23
- package/dist/_dts/block-form/src/index.d.ts +23 -22
- package/dist/_dts/blocks/src/primitives/layout/Grid.d.ts +18 -1
- package/dist/_dts/blocks/src/system/blocks/appointment-booking.d.ts +1 -0
- package/dist/_dts/blocks/src/system/blocks/events/shared/filtering.d.ts +1 -1
- package/dist/_dts/blocks/src/system/blocks/events/shared/schemas.d.ts +61 -0
- package/dist/_dts/blocks/src/system/blocks/events/shared/types.d.ts +24 -22
- package/dist/_dts/blocks/src/system/blocks/feature-cards.d.ts +25 -1
- package/dist/_dts/blocks/src/system/blocks/media-text.d.ts +7 -30
- package/dist/_dts/blocks/src/system/blocks/site-header.d.ts +0 -1
- package/dist/_dts/blocks/src/system/blocks/team-members.d.ts +4 -63
- package/dist/_dts/blocks/src/system/customize/backgrounds.d.ts +1 -3
- package/dist/_dts/blocks/src/system/fields/boxStyles.d.ts +13 -1
- package/dist/_dts/blocks/src/system/fields/gridLayout.d.ts +20 -0
- package/dist/_dts/blocks/src/system/node/fragments/classNameBinding.d.ts +6 -1
- package/dist/_dts/blocks/src/system/node/fragments/styledCard.d.ts +31 -0
- package/dist/_dts/blocks/src/system/runtime/api/endpoints.d.ts +4 -0
- package/dist/_dts/blocks/src/system/runtime/api/types/courses.d.ts +0 -1
- package/dist/_dts/blocks/src/system/runtime/api/types/events.d.ts +0 -1
- package/dist/_dts/blocks/src/system/runtime/hooks/useHeadlessBookingFlow.state.d.ts +4 -2
- package/dist/_dts/blocks/src/system/runtime/nodes/booking-form.headless.state.d.ts +24 -8
- package/dist/_dts/blocks/src/system/runtime/nodes/booking-form.server.d.ts +8 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/booking-form.validationErrors.d.ts +17 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/event-registration.headless.planning.d.ts +1 -1
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/eventScope.d.ts +1 -1
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration.server.d.ts +1 -1
- package/dist/_dts/blocks/src/system/runtime/nodes/events/shared/eventCollectionContract.d.ts +42 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/events/shared/utils.d.ts +4 -1
- package/dist/_dts/blocks/src/system/runtime/shared/components/FeedbackMessage.d.ts +17 -1
- package/dist/_dts/blocks/src/system/runtime/shared/components/index.d.ts +1 -1
- package/dist/_dts/blocks/src/system/spacing.d.ts +1 -1
- package/dist/_dts/blocks/src/system/transforms/registry/_utils/boxStyleClassNames.d.ts +90 -0
- package/dist/_dts/blocks/src/system/transforms/registry/_utils/surfaceForegroundStyles.d.ts +4 -0
- package/dist/_dts/blocks/src/system/transforms/registry/boxStyles.d.ts +26 -0
- package/dist/_dts/blocks/src/system/transforms/registry/layout.d.ts +4 -37
- package/dist/_dts/content-editor/src/components/ContentFieldsForm.d.ts +2 -2
- package/dist/_dts/content-model/src/content-types/builtin-schemas.d.ts +6 -6
- package/dist/_dts/content-model/src/content-types/builtins.d.ts +6 -6
- package/dist/_dts/core/src/branded.d.ts +4 -0
- package/dist/_dts/core/src/event-page-surface-subject.d.ts +25 -4
- package/dist/_dts/core/src/index.d.ts +3 -0
- package/dist/_dts/core/src/public-event-booking-availability.d.ts +8 -0
- package/dist/_dts/core/src/secret.d.ts +44 -0
- package/dist/_dts/db/src/generated/supabase/database.types.d.ts +341 -0
- package/dist/_dts/editor-blocks/src/BlockEditor.d.ts +2 -1
- package/dist/_dts/editor-blocks/src/BlockForm.d.ts +2 -2
- package/dist/_dts/editor-blocks/src/block-editor/BlockCard.d.ts +2 -2
- package/dist/_dts/editor-blocks/src/block-editor/BlockCardBody.d.ts +1 -1
- package/dist/_dts/editor-blocks/src/block-editor/BlockCardHeader.d.ts +1 -1
- package/dist/_dts/editor-blocks/src/block-editor/SortableBlockItem.d.ts +1 -1
- package/dist/_dts/editor-blocks/src/block-editor/hooks/useBlockValidationManifests.d.ts +1 -1
- package/dist/_dts/editor-blocks/src/block-editor/preparedManifest.d.ts +1 -1
- package/dist/_dts/editor-blocks/src/blockPayload.d.ts +1 -1
- package/dist/_dts/editor-blocks/src/index.d.ts +2 -2
- package/dist/_dts/editor-blocks/src/media/MediaField.d.ts +2 -2
- package/dist/_dts/editor-blocks/src/widgets/button/ButtonField.d.ts +1 -1
- package/dist/_dts/editor-blocks/src/widgets/button/ButtonVariantField.d.ts +1 -1
- package/dist/_dts/editor-blocks/src/widgets/button/index.d.ts +1 -1
- package/dist/_dts/editor-blocks/src/widgets/content-type-select/ContentTypeSelectField.d.ts +1 -1
- package/dist/_dts/editor-blocks/src/widgets/entry-picker/EntryPickerField.d.ts +1 -1
- package/dist/_dts/editor-blocks/src/widgets/entry-picker/index.d.ts +1 -1
- package/dist/_dts/editor-blocks/src/widgets/icon-picker/IconPickerField.d.ts +1 -1
- package/dist/_dts/editor-blocks/src/widgets/inline-text/InlineTextField.d.ts +1 -1
- package/dist/_dts/editor-blocks/src/widgets/link/LinkField.d.ts +2 -2
- package/dist/_dts/editor-blocks/src/widgets/offerings-preview/OfferingsPreviewGroupOrderField.d.ts +1 -1
- package/dist/_dts/editor-blocks/src/widgets/reference/ReferenceField.d.ts +2 -2
- package/dist/_dts/editor-blocks/src/widgets/rich-text/RichTextField.d.ts +2 -2
- package/dist/_dts/editor-blocks/src/widgets/site-option-picker/SiteOptionPickerField.d.ts +1 -1
- package/dist/_dts/editor-blocks/src/widgets/site-option-picker/utils.d.ts +1 -1
- package/dist/_dts/preview-next/src/client/blocks/useBlockCustomizeControls.d.ts +1 -1
- package/dist/_dts/preview-next/src/client/preview/EntryEditorPanel.d.ts +1 -1
- package/dist/_dts/preview-next/src/client/preview/EntrySlotBlockEditorPanel.d.ts +1 -1
- package/dist/_dts/preview-next/src/client/preview/PreviewShell.d.ts +2 -0
- package/dist/_dts/preview-next/src/client/preview/PreviewSiteFontStorageContext.d.ts +6 -0
- package/dist/_dts/preview-next/src/client/preview/siteFontPreview.d.ts +5 -0
- package/dist/_dts/preview-next/src/client/sdk/contentStorage.d.ts +10 -0
- package/dist/_dts/preview-next/src/client/widgets/widgetOverrides.d.ts +1 -1
- package/dist/_dts/preview-next/src/index.d.ts +1 -0
- package/dist/_dts/preview-next/src/keepAlive.d.ts +3 -5
- package/dist/_dts/preview-next/src/refresh-contract.d.ts +1 -0
- package/dist/_dts/preview-next/src/route-contract.d.ts +7 -0
- package/dist/_dts/sdk/src/contracts/index.d.ts +1 -1
- package/dist/_dts/sdk/src/contracts/system-block-content.d.ts +61 -39
- package/dist/_dts/sdk/src/preview-next/keep-alive.d.ts +1 -1
- package/dist/_dts/sdk/src/rendering/components/Layout.d.ts +1 -1
- package/dist/_dts/sdk/src/rendering/index.d.ts +1 -1
- package/dist/_dts/sdk/src/rendering/islands/types.d.ts +9 -1
- package/dist/_dts/sdk/src/theme-bridge/types.d.ts +4 -2
- package/dist/_dts/sdk/src/version.d.ts +1 -1
- package/dist/_dts/theme-core/src/cards/core.d.ts +54 -10
- package/dist/_dts/theme-core/src/cards/decorations.d.ts +33 -0
- package/dist/_dts/theme-core/src/cards/generateDefaultCardSystem.d.ts +7 -2
- package/dist/_dts/theme-core/src/cards/index.d.ts +3 -0
- package/dist/_dts/theme-core/src/cards/openCardVariant.d.ts +24 -0
- package/dist/_dts/theme-core/src/cards/roles.d.ts +38 -0
- package/dist/_dts/theme-core/src/cards/siteStyleDefaults.d.ts +53 -8
- package/dist/_dts/theme-core/src/cards/types.d.ts +489 -21
- package/dist/_dts/theme-core/src/generated/containerResponsiveThemeCss.d.ts +1 -1
- package/dist/_dts/theme-core/src/header/legacyHeaderVariant.d.ts +59 -0
- package/dist/_dts/theme-core/src/header/paintTargets.d.ts +2 -2
- package/dist/_dts/theme-core/src/header/scrollTreatment.d.ts +3 -2
- package/dist/_dts/theme-core/src/mock-themes/all.d.ts +12 -135
- package/dist/_dts/theme-core/src/palette/utils/contrast.d.ts +1 -0
- package/dist/_dts/theme-core/src/palette/utils/opaqueSurfaceColor.d.ts +6 -0
- package/dist/_dts/theme-core/src/runtime/buildThemeRuntimeFromBridge.d.ts +1 -1
- package/dist/_dts/theme-core/src/schema.d.ts +301 -94
- package/dist/_dts/theme-core/src/site-styles/appearancePresetCatalog.d.ts +84 -102
- package/dist/_dts/theme-core/src/site-styles/appearancePresetResolution.d.ts +12 -1
- package/dist/_dts/theme-core/src/site-styles/appearancePresetTypes.d.ts +9 -4
- package/dist/_dts/theme-core/src/site-styles/backgroundAppearance.d.ts +0 -20
- package/dist/_dts/theme-core/src/site-styles/blockAppearancePresets.d.ts +84 -102
- package/dist/_dts/theme-core/src/site-styles/cardRoleVocabulary.d.ts +48 -0
- package/dist/_dts/theme-core/src/site-styles/designState.d.ts +21 -385
- package/dist/_dts/theme-core/src/site-styles/generatedSchemas.d.ts +10 -18
- package/dist/_dts/theme-core/src/site-styles/headerLayoutTypes.d.ts +2 -4
- package/dist/_dts/theme-core/src/site-styles/headerOpeningForeground.d.ts +2 -9
- package/dist/_dts/theme-core/src/site-styles/headerOpeningSection.d.ts +0 -2
- package/dist/_dts/theme-core/src/site-styles/index.d.ts +5 -0
- package/dist/_dts/theme-core/src/site-styles/pageDesignAppearanceAvailability.d.ts +3 -0
- package/dist/_dts/theme-core/src/site-styles/pageDesignEditorCapabilities.d.ts +22 -0
- package/dist/_dts/theme-core/src/site-styles/pageDesignEditorModel.d.ts +9 -8
- package/dist/_dts/theme-core/src/site-styles/pageDesignIntentEquality.d.ts +3 -0
- package/dist/_dts/theme-core/src/site-styles/previewRuntimeCapabilities.d.ts +19 -0
- package/dist/_dts/theme-core/src/site-styles/runtimeBackgroundResolution.d.ts +9 -0
- package/dist/_dts/theme-core/src/site-styles/runtimeCompiler.d.ts +1 -62
- package/dist/_dts/theme-core/src/site-styles/sourceCatalogs.d.ts +13 -12
- package/dist/_dts/theme-core/src/site-styles/types.d.ts +50 -39
- package/dist/_dts/theme-core/src/siteChromePlanning.d.ts +9 -9
- package/dist/_dts/theme-core/src/status/generateStatusCss.d.ts +1 -0
- package/dist/_dts/theme-core/src/surfaces/index.d.ts +1 -0
- package/dist/_dts/theme-core/src/surfaces/resolveSurfaceForeground.d.ts +39 -0
- package/dist/_dts/ui/src/navigation-tabs.d.ts +3 -2
- package/dist/client/{CourseRegistrationWizard-Bvtz9G9g.mjs → CourseRegistrationWizard-DGW9F0SQ.mjs} +7 -7
- package/dist/client/{DiscountCodeDisclosure-Ur-Xx1U_.mjs → DiscountCodeDisclosure-BPZ-yfGI.mjs} +1 -1
- package/dist/client/{EventCombined.client-EhscD4U6.mjs → EventCombined.client-Cjt3kKYR.mjs} +4 -4
- package/dist/client/{EventListing.client-Bn26cFTY.mjs → EventListing.client-DY9dn6Fh.mjs} +2 -2
- package/dist/client/{FeedbackMessage-ByMrs3cr.mjs → FeedbackMessage-CtLvvS_d.mjs} +15 -3
- package/dist/client/{LeafletStaticMap-BUw9Ntzr.mjs → LeafletStaticMap--2c61XYn.mjs} +1 -1
- package/dist/client/{StepIndicator-BfbdiVQI.mjs → StepIndicator-CLjQhkDb.mjs} +3 -3
- package/dist/client/{accordion-CjIeof73.mjs → accordion-_boYwHHi.mjs} +1 -1
- package/dist/client/{bookingForm-DwEeovf_.mjs → bookingForm--AqEfyBX.mjs} +56 -39
- package/dist/client/bookings.mjs +393 -192
- package/dist/client/{carousel-BMrfgOba.mjs → carousel-CVI2dqZr.mjs} +2 -2
- package/dist/client/{carousel.client-CpwTUhIo.mjs → carousel.client-59G_WMr4.mjs} +1 -1
- package/dist/client/{cart-rXEdxTdb.mjs → cart-DR6IiPz9.mjs} +3 -3
- package/dist/client/{checkout-D3JlSzh3.mjs → checkout-CsrGAfQt.mjs} +3 -3
- package/dist/client/client.mjs +4524 -3512
- package/dist/client/{colorStyles-BWpj_h4C.mjs → colorStyles-CrxJrPjJ.mjs} +277 -1
- package/dist/client/{context-CJz1Vlsz.mjs → context-B83PiNzm.mjs} +6 -21
- package/dist/client/{courseRegistration-DO5XvMAA.mjs → courseRegistration-aNJVaLa3.mjs} +3 -3
- package/dist/client/{eventCalendar-DO6rTqCn.mjs → eventCalendar-OZ7h59VN.mjs} +6 -6
- package/dist/client/{eventCombined-bJ3i_ovU.mjs → eventCombined-BbJ6bFKz.mjs} +3 -3
- package/dist/client/{eventDetails-CCbrXE7o.mjs → eventDetails-BLyUBiCT.mjs} +3 -3
- package/dist/client/{eventListing-Bdlt9YTm.mjs → eventListing-DuP1yhBS.mjs} +3 -3
- package/dist/client/{eventRegistration-B02lt6iY.mjs → eventRegistration-BXyECPa-.mjs} +11 -12
- package/dist/client/{form-DrUBAAox.mjs → form-BA4t3kKU.mjs} +4 -4
- package/dist/client/{headerSection-MzqvHL6T.mjs → headerSection-CpNaJxhW.mjs} +2 -2
- package/dist/client/hooks.mjs +1967 -2059
- package/dist/client/{locationMap-DG8BxTBm.mjs → locationMap-3HGMCL7_.mjs} +3 -3
- package/dist/client/{media-CNE1Z-wb.mjs → media-BOHuueS5.mjs} +16 -4
- package/dist/client/{newsletterForm-BzO-Td3p.mjs → newsletterForm-C2s6Mw67.mjs} +4 -4
- package/dist/client/{pricing-NgK7ozkg.mjs → pricing-BiqIMgZk.mjs} +1 -1
- package/dist/client/{productDetail-CfQ7rhVK.mjs → productDetail-C9joWhdE.mjs} +3 -3
- package/dist/client/{productList-C23rOLUi.mjs → productList-CjzdU3pB.mjs} +3 -3
- package/dist/client/{propsDecoder-CAZdhwjs.mjs → propsDecoder-CBPGXEYX.mjs} +395 -402
- package/dist/client/rendering/client.mjs +2004 -2856
- package/dist/client/rendering/islands.mjs +20 -20
- package/dist/client/rendering.mjs +4605 -3496
- package/dist/client/{scrollToBlock-DSSqVQr1.mjs → scrollToBlock-DZ73aEX6.mjs} +1 -1
- package/dist/client/{shop-BMToKLK7.mjs → shop-CQRai7hj.mjs} +7 -7
- package/dist/client/{shop-commerce-DB4JRKmp.mjs → shop-commerce-hP9UboOx.mjs} +8 -8
- package/dist/client/{shop-commerce-store-BOqSIOuc.mjs → shop-commerce-store-DiD5a32e.mjs} +1 -1
- package/dist/client/{shopShared-B6SK9DZv.mjs → shopShared-DP8DXTkF.mjs} +5 -5
- package/dist/client/{useEventFilters-CULOa4nB.mjs → useEventFilters-pF_OJNQP.mjs} +137 -81
- package/dist/client/{usePolling-BGG_8-jl.mjs → usePolling-Cls91SD2.mjs} +2 -2
- package/dist/preview-next/before-render.mjs +192 -108
- package/dist/preview-next/client/runtime.mjs +4 -4
- package/dist/preview-next/keepAlive.mjs +7406 -29
- package/dist/preview-next/middleware.mjs +186 -107
- package/dist/{previewAuthStore-_GXFRg2W.mjs → previewAuthStore-CX1C_KJ4.mjs} +185 -107
- package/dist/{sdk-runtime-hhSOMShR.mjs → sdk-runtime-5CcPAI14.mjs} +2 -2
- package/dist/{separator-flRaFc14.mjs → separator-BXlYN_gr.mjs} +1 -1
- package/dist/server/components.mjs +6363 -4998
- package/dist/server/config-validation.mjs +1967 -2059
- package/dist/server/config.mjs +1967 -2059
- package/dist/server/data.mjs +1967 -2059
- package/dist/server/index.mjs +186 -108
- package/dist/server/next.mjs +6553 -5285
- package/dist/server/page-converter.mjs +1031 -1844
- package/dist/server/prebuild.mjs +1 -1
- package/dist/server/rendering/server.mjs +3352 -3006
- package/dist/server/rendering.mjs +6289 -4924
- package/dist/server/routing.mjs +1906 -1036
- package/dist/server/server.mjs +1976 -2165
- package/dist/server/theme-bridge.mjs +949 -670
- package/dist/server/theme.mjs +252 -51
- package/dist/styles/index.css +295 -334
- package/package.json +3 -2
- package/dist/_dts/block-form/src/client/blockDraftSaveability.d.ts +0 -1
- package/dist/_dts/block-form/src/widgets/index.d.ts +0 -20
- package/dist/_dts/blocks/src/system/runtime/api/requestBody.d.ts +0 -7
- package/dist/client/clsx-DgIEfj3H.mjs +0 -16
package/dist/client/bookings.mjs
CHANGED
|
@@ -2465,23 +2465,6 @@ function createDeduplicationCache(options = {}) {
|
|
|
2465
2465
|
};
|
|
2466
2466
|
}
|
|
2467
2467
|
//#endregion
|
|
2468
|
-
//#region ../blocks/src/system/runtime/api/requestBody.ts
|
|
2469
|
-
function omitUndefinedOverrides(overrides) {
|
|
2470
|
-
return Object.fromEntries(Object.entries(overrides).filter(([, value]) => value !== void 0));
|
|
2471
|
-
}
|
|
2472
|
-
/**
|
|
2473
|
-
* Forward a typed request body unchanged, then apply a small set of explicit overrides.
|
|
2474
|
-
*
|
|
2475
|
-
* Undefined override values are stripped before merging so callers do not accidentally
|
|
2476
|
-
* clobber an existing field when they mean "no override".
|
|
2477
|
-
*/
|
|
2478
|
-
function withRequestOverrides(body, overrides) {
|
|
2479
|
-
return {
|
|
2480
|
-
...body,
|
|
2481
|
-
...omitUndefinedOverrides(overrides)
|
|
2482
|
-
};
|
|
2483
|
-
}
|
|
2484
|
-
//#endregion
|
|
2485
2468
|
//#region ../blocks/src/system/runtime/api/endpoints.ts
|
|
2486
2469
|
/**
|
|
2487
2470
|
* Build endpoint path with parameter substitution
|
|
@@ -2567,7 +2550,8 @@ const EVENTS = {
|
|
|
2567
2550
|
register: {
|
|
2568
2551
|
path: "/public/sites/{siteId}/events/register",
|
|
2569
2552
|
method: "POST",
|
|
2570
|
-
authScope: "portal"
|
|
2553
|
+
authScope: "portal",
|
|
2554
|
+
skipPreviewStage: true
|
|
2571
2555
|
},
|
|
2572
2556
|
checkout: {
|
|
2573
2557
|
path: "/public/sites/{siteId}/events/checkout",
|
|
@@ -2591,7 +2575,8 @@ const WHOLE_SERIES = {
|
|
|
2591
2575
|
enroll: {
|
|
2592
2576
|
path: "/public/sites/{siteId}/dated-offerings/whole-series/enroll",
|
|
2593
2577
|
method: "POST",
|
|
2594
|
-
authScope: "portal"
|
|
2578
|
+
authScope: "portal",
|
|
2579
|
+
skipPreviewStage: true
|
|
2595
2580
|
},
|
|
2596
2581
|
checkout: {
|
|
2597
2582
|
path: "/public/sites/{siteId}/dated-offerings/whole-series/checkout",
|
|
@@ -3169,7 +3154,7 @@ function createBlockApi(config) {
|
|
|
3169
3154
|
const path = buildPath(EVENTS.register.path, { siteId: sid });
|
|
3170
3155
|
return request(EVENTS.register, {
|
|
3171
3156
|
path,
|
|
3172
|
-
body:
|
|
3157
|
+
body: data
|
|
3173
3158
|
});
|
|
3174
3159
|
},
|
|
3175
3160
|
async createEventCheckout(data) {
|
|
@@ -3202,7 +3187,7 @@ function createBlockApi(config) {
|
|
|
3202
3187
|
const path = buildPath(WHOLE_SERIES.enroll.path, { siteId: sid });
|
|
3203
3188
|
return request(WHOLE_SERIES.enroll, {
|
|
3204
3189
|
path,
|
|
3205
|
-
body:
|
|
3190
|
+
body: data
|
|
3206
3191
|
});
|
|
3207
3192
|
},
|
|
3208
3193
|
async checkWholeSeriesEligibility(data) {
|
|
@@ -3833,18 +3818,32 @@ function isFreePublicEventPriceDisplay(display) {
|
|
|
3833
3818
|
}
|
|
3834
3819
|
//#endregion
|
|
3835
3820
|
//#region ../core/src/event-page-surface-subject.ts
|
|
3821
|
+
function createEventSeriesPageSurfaceSubject(eventSeriesId, bookingScope) {
|
|
3822
|
+
return bookingScope === "whole_series" ? {
|
|
3823
|
+
kind: "eventSeries",
|
|
3824
|
+
eventSeriesId,
|
|
3825
|
+
bookingScope,
|
|
3826
|
+
isWholeSeriesBooking: true
|
|
3827
|
+
} : {
|
|
3828
|
+
kind: "eventSeries",
|
|
3829
|
+
eventSeriesId,
|
|
3830
|
+
bookingScope
|
|
3831
|
+
};
|
|
3832
|
+
}
|
|
3836
3833
|
function parseEventPageSurfaceSubject(value) {
|
|
3837
3834
|
if (!isRecord$6(value)) return err$1({ kind: "notObject" });
|
|
3838
3835
|
switch (value.kind) {
|
|
3839
3836
|
case "eventSeries": {
|
|
3840
3837
|
const eventSeriesId = parseEventSeriesId(value.eventSeriesId);
|
|
3841
|
-
|
|
3842
|
-
kind: "eventSeries",
|
|
3843
|
-
eventSeriesId: eventSeriesId.value
|
|
3844
|
-
}) : err$1({
|
|
3838
|
+
if (!eventSeriesId.ok) return err$1({
|
|
3845
3839
|
kind: "invalidEventSeriesId",
|
|
3846
3840
|
error: eventSeriesId.error
|
|
3847
3841
|
});
|
|
3842
|
+
if (value.bookingScope !== "single_occurrence" && value.bookingScope !== "whole_series") return err$1({
|
|
3843
|
+
kind: "invalidEventSeriesBookingScope",
|
|
3844
|
+
bookingScope: value.bookingScope
|
|
3845
|
+
});
|
|
3846
|
+
return ok(createEventSeriesPageSurfaceSubject(eventSeriesId.value, value.bookingScope));
|
|
3848
3847
|
}
|
|
3849
3848
|
case "eventOffering": {
|
|
3850
3849
|
const eventOfferingId = parseEventOfferingId(value.eventOfferingId);
|
|
@@ -5711,8 +5710,12 @@ function formatScheduleDate(isoString, locale) {
|
|
|
5711
5710
|
return new Intl.DateTimeFormat(locale, { dateStyle: "medium" }).format(date);
|
|
5712
5711
|
}
|
|
5713
5712
|
//#endregion
|
|
5714
|
-
//#region ../blocks/src/system/runtime/nodes/booking-form.
|
|
5715
|
-
|
|
5713
|
+
//#region ../blocks/src/system/runtime/nodes/booking-form.validationErrors.ts
|
|
5714
|
+
function omitRecordKey(record, key) {
|
|
5715
|
+
if (!(key in record)) return record;
|
|
5716
|
+
const { [key]: _removed, ...rest } = record;
|
|
5717
|
+
return rest;
|
|
5718
|
+
}
|
|
5716
5719
|
function createEmptyBookingValidationErrors() {
|
|
5717
5720
|
return {
|
|
5718
5721
|
formError: null,
|
|
@@ -5747,6 +5750,9 @@ function clearBookingFieldError(errors, fieldId) {
|
|
|
5747
5750
|
fieldErrors: omitRecordKey(errors.fieldErrors, fieldId)
|
|
5748
5751
|
};
|
|
5749
5752
|
}
|
|
5753
|
+
//#endregion
|
|
5754
|
+
//#region ../blocks/src/system/runtime/nodes/booking-form.headless.state.ts
|
|
5755
|
+
const unsafeAsBookingFieldId = (id) => id;
|
|
5750
5756
|
function createInitialBookingFlowReducerState(input) {
|
|
5751
5757
|
const initialData = input.initialData ?? {};
|
|
5752
5758
|
return {
|
|
@@ -5758,6 +5764,7 @@ function createInitialBookingFlowReducerState(input) {
|
|
|
5758
5764
|
selectedSlot: null,
|
|
5759
5765
|
fieldValues: collectInitialFieldValues(initialData),
|
|
5760
5766
|
touchedFields: {},
|
|
5767
|
+
attemptedStepIds: {},
|
|
5761
5768
|
discountCode: toOptionalString(initialData.discountCode) ?? "",
|
|
5762
5769
|
selectedSlidingAmountInput: toOptionalString(initialData.selectedSlidingAmountInput) ?? "",
|
|
5763
5770
|
selectedCollectionOptionKind: toSelectedCollectionOptionKind(initialData.selectedCollectionOptionKind),
|
|
@@ -5799,6 +5806,25 @@ function toOptionalCustomerPassId(value) {
|
|
|
5799
5806
|
function isBookingFieldValue(value) {
|
|
5800
5807
|
return value === null || typeof value === "string" || typeof value === "number" || typeof value === "boolean" || Array.isArray(value) && value.every((item) => typeof item === "string");
|
|
5801
5808
|
}
|
|
5809
|
+
/**
|
|
5810
|
+
* Send the flow back to the date step when the slot it was holding went away,
|
|
5811
|
+
* leaving a scoped feedback message. A completed booking is left alone.
|
|
5812
|
+
*/
|
|
5813
|
+
function applyAvailabilitySelectionInvalidation(state, invalidation) {
|
|
5814
|
+
if (state.phase !== "editing") return state;
|
|
5815
|
+
return {
|
|
5816
|
+
...state,
|
|
5817
|
+
currentStepId: "datetime-selection",
|
|
5818
|
+
selectedDate: invalidation.kind === "date_unavailable" ? void 0 : state.selectedDate,
|
|
5819
|
+
selectedSlot: null,
|
|
5820
|
+
feedback: {
|
|
5821
|
+
kind: "error",
|
|
5822
|
+
scope: "availability",
|
|
5823
|
+
message: invalidation.message
|
|
5824
|
+
},
|
|
5825
|
+
validationErrors: clearBookingFormError(state.validationErrors)
|
|
5826
|
+
};
|
|
5827
|
+
}
|
|
5802
5828
|
function bookingFlowReducer(state, event) {
|
|
5803
5829
|
switch (event.type) {
|
|
5804
5830
|
case "service-selected": return {
|
|
@@ -5847,6 +5873,13 @@ function bookingFlowReducer(state, event) {
|
|
|
5847
5873
|
[event.fieldId]: true
|
|
5848
5874
|
}
|
|
5849
5875
|
};
|
|
5876
|
+
case "step-advance-attempted": return state.attemptedStepIds[event.stepId] ? state : {
|
|
5877
|
+
...state,
|
|
5878
|
+
attemptedStepIds: {
|
|
5879
|
+
...state.attemptedStepIds,
|
|
5880
|
+
[event.stepId]: true
|
|
5881
|
+
}
|
|
5882
|
+
};
|
|
5850
5883
|
case "payment-option-selected": return {
|
|
5851
5884
|
...state,
|
|
5852
5885
|
selectedCollectionOptionKind: event.kind ?? void 0,
|
|
@@ -5893,20 +5926,7 @@ function bookingFlowReducer(state, event) {
|
|
|
5893
5926
|
phase: event.feedback.kind === "success" ? "completed" : "editing",
|
|
5894
5927
|
feedback: event.feedback
|
|
5895
5928
|
};
|
|
5896
|
-
case "availability-selection-invalidated":
|
|
5897
|
-
if (state.phase !== "editing") return state;
|
|
5898
|
-
return {
|
|
5899
|
-
...state,
|
|
5900
|
-
currentStepId: "datetime-selection",
|
|
5901
|
-
selectedDate: event.invalidation.kind === "date_unavailable" ? void 0 : state.selectedDate,
|
|
5902
|
-
selectedSlot: null,
|
|
5903
|
-
feedback: {
|
|
5904
|
-
kind: "error",
|
|
5905
|
-
scope: "availability",
|
|
5906
|
-
message: event.invalidation.message
|
|
5907
|
-
},
|
|
5908
|
-
validationErrors: clearBookingFormError(state.validationErrors)
|
|
5909
|
-
};
|
|
5929
|
+
case "availability-selection-invalidated": return applyAvailabilitySelectionInvalidation(state, event.invalidation);
|
|
5910
5930
|
case "feedback-cleared": return {
|
|
5911
5931
|
...state,
|
|
5912
5932
|
phase: "editing",
|
|
@@ -6137,6 +6157,7 @@ function deriveBookingFlowSteps(input) {
|
|
|
6137
6157
|
requiresResourceSelection: input.requiresResourceSelection,
|
|
6138
6158
|
paymentResolution: stepResolution.paymentResolution
|
|
6139
6159
|
}));
|
|
6160
|
+
const attemptedStepIds = input.attemptedStepIds ?? {};
|
|
6140
6161
|
const steps = stepPlan.map((step, index) => {
|
|
6141
6162
|
const validation = validations.get(step.id) ?? { ok: true };
|
|
6142
6163
|
const state = index < currentStepIndex ? "complete" : index === currentStepIndex ? "active" : "available";
|
|
@@ -6146,7 +6167,7 @@ function deriveBookingFlowSteps(input) {
|
|
|
6146
6167
|
state,
|
|
6147
6168
|
index,
|
|
6148
6169
|
visibleIndex: index,
|
|
6149
|
-
errors: validation.ok ? createEmptyBookingValidationErrors() : validation.errors,
|
|
6170
|
+
errors: validation.ok || !attemptedStepIds[step.id] ? createEmptyBookingValidationErrors() : validation.errors,
|
|
6150
6171
|
canEnter: index <= currentStepIndex,
|
|
6151
6172
|
canLeave: validation.ok
|
|
6152
6173
|
};
|
|
@@ -6415,11 +6436,6 @@ function isBlankFieldValue(value) {
|
|
|
6415
6436
|
if (Array.isArray(value)) return value.length === 0;
|
|
6416
6437
|
return false;
|
|
6417
6438
|
}
|
|
6418
|
-
function omitRecordKey(record, key) {
|
|
6419
|
-
if (!(key in record)) return record;
|
|
6420
|
-
const { [key]: _removed, ...rest } = record;
|
|
6421
|
-
return rest;
|
|
6422
|
-
}
|
|
6423
6439
|
function readAppointmentBookingOverrideData(value) {
|
|
6424
6440
|
if (!isRecord$4(value)) return null;
|
|
6425
6441
|
const services = normalizeBookingServices(value.services);
|
|
@@ -6518,9 +6534,11 @@ function useHeadlessBookingFlow(options) {
|
|
|
6518
6534
|
currentStepId: state.currentStepId,
|
|
6519
6535
|
requiresServiceSelection: options.requiresServiceSelection,
|
|
6520
6536
|
requiresResourceSelection: options.requiresResourceSelection,
|
|
6521
|
-
enableAppointmentPackages: options.enableAppointmentPackages
|
|
6537
|
+
enableAppointmentPackages: options.enableAppointmentPackages,
|
|
6538
|
+
attemptedStepIds: state.attemptedStepIds
|
|
6522
6539
|
}), [
|
|
6523
6540
|
data,
|
|
6541
|
+
state.attemptedStepIds,
|
|
6524
6542
|
defaultServiceId,
|
|
6525
6543
|
defaultResourceId,
|
|
6526
6544
|
options.enableAppointmentPackages,
|
|
@@ -6872,6 +6890,10 @@ function useHeadlessBookingFlow(options) {
|
|
|
6872
6890
|
if (!latest.currentStep) return { ok: true };
|
|
6873
6891
|
const validation = latest.validations.get(latest.currentStep.id) ?? { ok: true };
|
|
6874
6892
|
if (!validation.ok) {
|
|
6893
|
+
dispatch({
|
|
6894
|
+
type: "step-advance-attempted",
|
|
6895
|
+
stepId: latest.currentStep.id
|
|
6896
|
+
});
|
|
6875
6897
|
dispatch({
|
|
6876
6898
|
type: "validation-errors-set",
|
|
6877
6899
|
errors: validation.errors
|
|
@@ -8125,6 +8147,26 @@ const paletteSchema = z.object({
|
|
|
8125
8147
|
//#region ../theme-core/src/cards/types.ts
|
|
8126
8148
|
const cardVariantRoleValues = ["default", "alternative"];
|
|
8127
8149
|
const boxlessCardVariantValue = "none";
|
|
8150
|
+
const openCardRoleValue = "open";
|
|
8151
|
+
/**
|
|
8152
|
+
* The roles a site style implements with an actual card variant. `none` is
|
|
8153
|
+
* deliberately absent: it is a role value only, never a variant.
|
|
8154
|
+
*/
|
|
8155
|
+
const surfaceCardRoleValues = [...cardVariantRoleValues, openCardRoleValue];
|
|
8156
|
+
/**
|
|
8157
|
+
* The closed card-role vocabulary Looks and blocks address cards by — this is
|
|
8158
|
+
* `BoxStylesCardVariant` widened with `open`, not a parallel enum.
|
|
8159
|
+
*
|
|
8160
|
+
* - `none` — no site-style card surface; the block's own composition and
|
|
8161
|
+
* the author's own card fields govern the item. This is *not*
|
|
8162
|
+
* a promise of visible boxlessness: a block whose base class
|
|
8163
|
+
* draws a border still draws one. It says the Look is not
|
|
8164
|
+
* asking the site style for a card.
|
|
8165
|
+
* - `open` — boxless but marked (a rule or accent edge, no enclosing box)
|
|
8166
|
+
* - `default` — the site's quiet everyday card
|
|
8167
|
+
* - `alternative` — the statement card carrying the site's personality
|
|
8168
|
+
*/
|
|
8169
|
+
const cardRoleValues = [...surfaceCardRoleValues, boxlessCardVariantValue];
|
|
8128
8170
|
const cardSpacingSchema = z.enum([
|
|
8129
8171
|
"none",
|
|
8130
8172
|
"compact",
|
|
@@ -8133,6 +8175,17 @@ const cardSpacingSchema = z.enum([
|
|
|
8133
8175
|
"comfortable",
|
|
8134
8176
|
"spacious"
|
|
8135
8177
|
]);
|
|
8178
|
+
/** Per-axis padding, for boxless cards whose inline padding differs from block. */
|
|
8179
|
+
const cardSpacingAxesSchema = z.object({
|
|
8180
|
+
block: cardSpacingSchema,
|
|
8181
|
+
inline: cardSpacingSchema
|
|
8182
|
+
});
|
|
8183
|
+
/**
|
|
8184
|
+
* A card's content padding: one value for both axes, or one per axis. Two
|
|
8185
|
+
* fields would let a variant say both and leave the reader to guess, so this is
|
|
8186
|
+
* a union — the legacy `spacingAxes` key is lifted into it on parse.
|
|
8187
|
+
*/
|
|
8188
|
+
const cardSpacingValueSchema = z.union([cardSpacingSchema, cardSpacingAxesSchema]);
|
|
8136
8189
|
const gradientDirectionSchema = z.enum([
|
|
8137
8190
|
"to-r",
|
|
8138
8191
|
"to-l",
|
|
@@ -8144,7 +8197,26 @@ const gradientDirectionSchema = z.enum([
|
|
|
8144
8197
|
"to-bl"
|
|
8145
8198
|
]);
|
|
8146
8199
|
z.enum(cardVariantRoleValues);
|
|
8147
|
-
const
|
|
8200
|
+
const surfaceCardRoleSchema = z.enum(surfaceCardRoleValues);
|
|
8201
|
+
const cardRoleSchema = z.enum(cardRoleValues);
|
|
8202
|
+
/**
|
|
8203
|
+
* Historical name for the role vocabulary as it reaches box styles. Widened to
|
|
8204
|
+
* the full `CardRole` set — old values keep parsing, `open` now parses too.
|
|
8205
|
+
*/
|
|
8206
|
+
const boxStylesCardVariantSchema = cardRoleSchema;
|
|
8207
|
+
const PRIORITY_ROLE_INFERENCE = {
|
|
8208
|
+
1: "default",
|
|
8209
|
+
2: "alternative"
|
|
8210
|
+
};
|
|
8211
|
+
/**
|
|
8212
|
+
* Role inference for legacy card systems authored before variants carried a
|
|
8213
|
+
* `role`. Priority 1 is the everyday card, priority 2 the statement card —
|
|
8214
|
+
* which is how variants are surfaced today. `open` is never inferred: a site
|
|
8215
|
+
* style has to opt into it.
|
|
8216
|
+
*/
|
|
8217
|
+
function inferCardVariantRoleFromPriority(priority) {
|
|
8218
|
+
return PRIORITY_ROLE_INFERENCE[priority] ?? null;
|
|
8219
|
+
}
|
|
8148
8220
|
const cardBackgroundSchema = z.discriminatedUnion("type", [
|
|
8149
8221
|
z.object({
|
|
8150
8222
|
type: z.literal("solid"),
|
|
@@ -8170,17 +8242,19 @@ const cardCornerValueSchema = z.enum([
|
|
|
8170
8242
|
"pill",
|
|
8171
8243
|
"expressive"
|
|
8172
8244
|
]);
|
|
8245
|
+
const cardEdgeSchema = z.enum([
|
|
8246
|
+
"left",
|
|
8247
|
+
"top",
|
|
8248
|
+
"right",
|
|
8249
|
+
"bottom"
|
|
8250
|
+
]);
|
|
8173
8251
|
/**
|
|
8174
|
-
*
|
|
8175
|
-
*
|
|
8252
|
+
* Legacy single accented card edge (e.g. a left accent bar). Persisted and
|
|
8253
|
+
* curated data may still carry it; it lifts into a one-element `decorations`
|
|
8254
|
+
* list at the parse boundary and has no representation after that.
|
|
8176
8255
|
*/
|
|
8177
8256
|
const cardAccentEdgeSchema = z.object({
|
|
8178
|
-
edge:
|
|
8179
|
-
"left",
|
|
8180
|
-
"top",
|
|
8181
|
-
"right",
|
|
8182
|
-
"bottom"
|
|
8183
|
-
]),
|
|
8257
|
+
edge: cardEdgeSchema,
|
|
8184
8258
|
colorToken: themeColorTokenSchema,
|
|
8185
8259
|
width: z.enum([
|
|
8186
8260
|
"thin",
|
|
@@ -8189,13 +8263,43 @@ const cardAccentEdgeSchema = z.object({
|
|
|
8189
8263
|
"heavy"
|
|
8190
8264
|
])
|
|
8191
8265
|
});
|
|
8266
|
+
/** `hairline` (1px) is the widening the boxless `open` role needs. */
|
|
8267
|
+
const cardEdgeRuleWidthSchema = z.enum([
|
|
8268
|
+
"hairline",
|
|
8269
|
+
"thin",
|
|
8270
|
+
"medium",
|
|
8271
|
+
"thick",
|
|
8272
|
+
"heavy"
|
|
8273
|
+
]);
|
|
8274
|
+
const cardEdgeRuleLengthSchema = z.enum(["full", "short"]);
|
|
8275
|
+
const cardEdgeRuleAlignSchema = z.enum([
|
|
8276
|
+
"start",
|
|
8277
|
+
"center",
|
|
8278
|
+
"end"
|
|
8279
|
+
]);
|
|
8280
|
+
/**
|
|
8281
|
+
* Decorations are edge rules today. The alias exists so the list can grow into
|
|
8282
|
+
* a discriminated union without every call site changing.
|
|
8283
|
+
*/
|
|
8284
|
+
const cardDecorationSchema = z.object({
|
|
8285
|
+
edge: cardEdgeSchema,
|
|
8286
|
+
colorToken: themeColorTokenSchema,
|
|
8287
|
+
width: cardEdgeRuleWidthSchema,
|
|
8288
|
+
/** Defaults to `full`. */
|
|
8289
|
+
length: cardEdgeRuleLengthSchema.optional(),
|
|
8290
|
+
/** Where a `short` rule sits along its edge. Defaults to `start`. */
|
|
8291
|
+
align: cardEdgeRuleAlignSchema.optional(),
|
|
8292
|
+
/** Opacity applied to `colorToken`, 0–1. Scoped here, not on the token. */
|
|
8293
|
+
alpha: z.number().min(0).max(1).optional()
|
|
8294
|
+
});
|
|
8295
|
+
const cardDecorationsSchema = z.array(cardDecorationSchema).max(2);
|
|
8192
8296
|
const cardCornerRadiiSchema = z.object({
|
|
8193
8297
|
topLeft: cardCornerValueSchema.optional(),
|
|
8194
8298
|
topRight: cardCornerValueSchema.optional(),
|
|
8195
8299
|
bottomLeft: cardCornerValueSchema.optional(),
|
|
8196
8300
|
bottomRight: cardCornerValueSchema.optional()
|
|
8197
8301
|
});
|
|
8198
|
-
const
|
|
8302
|
+
const cardVariantInputSchema = z.object({
|
|
8199
8303
|
id: z.string(),
|
|
8200
8304
|
name: z.string().min(1).max(20),
|
|
8201
8305
|
enabled: z.boolean(),
|
|
@@ -8204,8 +8308,10 @@ const cardVariantSchema = z.object({
|
|
|
8204
8308
|
z.literal(2),
|
|
8205
8309
|
z.literal(3)
|
|
8206
8310
|
]),
|
|
8311
|
+
role: surfaceCardRoleSchema.optional(),
|
|
8207
8312
|
background: cardBackgroundSchema,
|
|
8208
|
-
spacing:
|
|
8313
|
+
spacing: cardSpacingValueSchema,
|
|
8314
|
+
spacingAxes: cardSpacingAxesSchema.optional(),
|
|
8209
8315
|
foregroundToken: themeColorTokenSchema.optional(),
|
|
8210
8316
|
shadow: z.object({
|
|
8211
8317
|
elevation: z.enum([
|
|
@@ -8229,9 +8335,91 @@ const cardVariantSchema = z.object({
|
|
|
8229
8335
|
]).optional(),
|
|
8230
8336
|
cornerRadii: cardCornerRadiiSchema.optional(),
|
|
8231
8337
|
border: cardBorderSchema.optional(),
|
|
8338
|
+
decorations: cardDecorationsSchema.optional(),
|
|
8232
8339
|
accentEdge: cardAccentEdgeSchema.optional()
|
|
8233
8340
|
});
|
|
8234
|
-
|
|
8341
|
+
/**
|
|
8342
|
+
* Lift a legacy `accentEdge` into the decoration list. The old emitter reset
|
|
8343
|
+
* `border: 0` implicitly whenever an accent edge was present; conversion drops
|
|
8344
|
+
* the border instead, so the output is unchanged and the data says so.
|
|
8345
|
+
*/
|
|
8346
|
+
function normalizeLegacyAccentEdge(variant) {
|
|
8347
|
+
const { accentEdge, ...rest } = normalizeLegacySpacingAxes(variant);
|
|
8348
|
+
if (!accentEdge) return rest;
|
|
8349
|
+
const { border: _droppedByAccentEdgeReset, ...withoutBorder } = rest;
|
|
8350
|
+
return {
|
|
8351
|
+
...withoutBorder,
|
|
8352
|
+
decorations: [{
|
|
8353
|
+
...accentEdge,
|
|
8354
|
+
length: "full"
|
|
8355
|
+
}]
|
|
8356
|
+
};
|
|
8357
|
+
}
|
|
8358
|
+
/**
|
|
8359
|
+
* Lift a legacy `spacingAxes` into `spacing`. It always won over the flat value
|
|
8360
|
+
* when both were set, so the lift preserves the emitted padding exactly.
|
|
8361
|
+
*/
|
|
8362
|
+
function normalizeLegacySpacingAxes(variant) {
|
|
8363
|
+
const { spacingAxes, ...rest } = variant;
|
|
8364
|
+
return spacingAxes ? {
|
|
8365
|
+
...rest,
|
|
8366
|
+
spacing: spacingAxes
|
|
8367
|
+
} : variant;
|
|
8368
|
+
}
|
|
8369
|
+
function validateSingleDecorationSource(variant, ctx) {
|
|
8370
|
+
if (!variant.accentEdge || !variant.decorations) return;
|
|
8371
|
+
ctx.addIssue({
|
|
8372
|
+
code: "custom",
|
|
8373
|
+
path: ["decorations"],
|
|
8374
|
+
message: "A card variant carries either the legacy `accentEdge` or `decorations`, never both."
|
|
8375
|
+
});
|
|
8376
|
+
}
|
|
8377
|
+
const cardVariantSchema = cardVariantInputSchema.superRefine(validateSingleDecorationSource).transform(normalizeLegacyAccentEdge);
|
|
8378
|
+
/**
|
|
8379
|
+
* Fill in roles for legacy systems whose variants declare none. Inference is
|
|
8380
|
+
* collision-tolerant on purpose: first claimant wins and a later variant that
|
|
8381
|
+
* would infer a taken role simply gets no role. Legacy data is not obliged to
|
|
8382
|
+
* be well-formed, and a card system that fails to parse takes the whole theme
|
|
8383
|
+
* down with it.
|
|
8384
|
+
*/
|
|
8385
|
+
function withInferredRoles(variants) {
|
|
8386
|
+
const claimed = new Set(variants.flatMap((variant) => variant.role ? [variant.role] : []));
|
|
8387
|
+
return variants.map((variant) => {
|
|
8388
|
+
if (variant.role) return variant;
|
|
8389
|
+
const inferred = inferCardVariantRoleFromPriority(variant.priority);
|
|
8390
|
+
if (!inferred || claimed.has(inferred)) return variant;
|
|
8391
|
+
claimed.add(inferred);
|
|
8392
|
+
return {
|
|
8393
|
+
...variant,
|
|
8394
|
+
role: inferred
|
|
8395
|
+
};
|
|
8396
|
+
});
|
|
8397
|
+
}
|
|
8398
|
+
/**
|
|
8399
|
+
* Only *declared* roles are validated — a site style saying "these two
|
|
8400
|
+
* variants are both the default card" is an authoring error worth rejecting.
|
|
8401
|
+
*/
|
|
8402
|
+
function validateUniqueDeclaredCardVariantRoles(system, ctx) {
|
|
8403
|
+
const declared = /* @__PURE__ */ new Set();
|
|
8404
|
+
system.variants.forEach((variant, index) => {
|
|
8405
|
+
const role = variant.role;
|
|
8406
|
+
if (!role) return;
|
|
8407
|
+
if (declared.has(role)) {
|
|
8408
|
+
ctx.addIssue({
|
|
8409
|
+
code: "custom",
|
|
8410
|
+
path: [
|
|
8411
|
+
"variants",
|
|
8412
|
+
index,
|
|
8413
|
+
"role"
|
|
8414
|
+
],
|
|
8415
|
+
message: `Card role "${role}" is already implemented by another variant.`
|
|
8416
|
+
});
|
|
8417
|
+
return;
|
|
8418
|
+
}
|
|
8419
|
+
declared.add(role);
|
|
8420
|
+
});
|
|
8421
|
+
}
|
|
8422
|
+
const cardSystemSchema = z.object({ variants: z.array(cardVariantSchema).min(1).max(3) }).superRefine(validateUniqueDeclaredCardVariantRoles).transform((system) => ({ variants: withInferredRoles(system.variants) }));
|
|
8235
8423
|
//#endregion
|
|
8236
8424
|
//#region ../theme-core/src/accordions/types.ts
|
|
8237
8425
|
/**
|
|
@@ -9052,6 +9240,58 @@ const siteChromeBackgroundOverrideOwner = "site-chrome-editor";
|
|
|
9052
9240
|
* palette context and happens in `parseThemeColorReference`.
|
|
9053
9241
|
*/
|
|
9054
9242
|
const tokenOrCssColorValueSchema = z.string();
|
|
9243
|
+
//#endregion
|
|
9244
|
+
//#region ../theme-core/src/header/legacyHeaderVariant.ts
|
|
9245
|
+
/**
|
|
9246
|
+
* The header variants the system actually renders.
|
|
9247
|
+
*
|
|
9248
|
+
* Each one has a layout row in the site-header block and a paint target in
|
|
9249
|
+
* `paintTargets.ts`. This is the canonical list: the block transform's variant
|
|
9250
|
+
* class allowlist and the AI theme generator's enum both derive from it, so
|
|
9251
|
+
* they cannot drift.
|
|
9252
|
+
*/
|
|
9253
|
+
const headerVariantValues = [
|
|
9254
|
+
"classic",
|
|
9255
|
+
"centered",
|
|
9256
|
+
"floating"
|
|
9257
|
+
];
|
|
9258
|
+
z.enum(headerVariantValues);
|
|
9259
|
+
/**
|
|
9260
|
+
* Header variant spellings that were once authorable but no longer name a
|
|
9261
|
+
* layout of their own, and the variant they read as now.
|
|
9262
|
+
*
|
|
9263
|
+
* `transparent` was an overlay header with no CSS of its own: everything it
|
|
9264
|
+
* did (transparent root background, overlay content flow) is what `floating`
|
|
9265
|
+
* already does, and it had zero persisted usage in production or locally when
|
|
9266
|
+
* it was retired. It survives here as a one-boundary alias so a theme authored
|
|
9267
|
+
* against the old vocabulary still parses.
|
|
9268
|
+
*
|
|
9269
|
+
* This matters because the theme schema is strict and has no per-field
|
|
9270
|
+
* `.catch()`: an out-of-enum variant fails `themeSchema.safeParse` for the
|
|
9271
|
+
* *whole* theme, which silently swaps the site's theme for
|
|
9272
|
+
* `modernMinimalTheme`. Aliasing here keeps that from happening.
|
|
9273
|
+
*/
|
|
9274
|
+
const legacyHeaderVariants = { transparent: "floating" };
|
|
9275
|
+
const legacyHeaderVariantValues = Object.keys(legacyHeaderVariants);
|
|
9276
|
+
/**
|
|
9277
|
+
* The header variant boundary for themes that go through `themeSchema`:
|
|
9278
|
+
* canonical variants pass through, legacy spellings normalize to the variant
|
|
9279
|
+
* they meant, everything else fails the parse.
|
|
9280
|
+
*
|
|
9281
|
+
* Deliberately an enum plus a transform rather than a `z.preprocess`, so the
|
|
9282
|
+
* schema's *input* type stays an accurate union (the legacy spelling is still
|
|
9283
|
+
* accepted on the wire) instead of widening to `unknown`. `SdkThemeWire` in
|
|
9284
|
+
* `@riverbankcms/api` is `z.input<typeof themeSchema>`, so a widened input here
|
|
9285
|
+
* would leak straight into a public type.
|
|
9286
|
+
*
|
|
9287
|
+
* Not every read of a persisted theme goes through the schema:
|
|
9288
|
+
* `resolveRuntimeTheme` in
|
|
9289
|
+
* `apps/dashboard/src/server/services/sites/runtimeSiteResponse.ts` returns the
|
|
9290
|
+
* raw database JSON asserted as `Theme` with no parse, so a theme still
|
|
9291
|
+
* carrying a legacy spelling reaches the theme editor un-aliased. That gap
|
|
9292
|
+
* predates this alias and is harmless while persisted usage is zero.
|
|
9293
|
+
*/
|
|
9294
|
+
const headerVariantWithLegacyAliasSchema = z.enum([...headerVariantValues, ...legacyHeaderVariantValues]).transform((value) => value in legacyHeaderVariants ? legacyHeaderVariants[value] : value);
|
|
9055
9295
|
const BREAKPOINT_LG = 1024;
|
|
9056
9296
|
const BREAKPOINT_XL = 1280;
|
|
9057
9297
|
const BREAKPOINT_LG_DOWN = BREAKPOINT_LG - 1;
|
|
@@ -9368,14 +9608,7 @@ const cardStylesOverrideSchema = z.object({
|
|
|
9368
9608
|
spacing: semanticSpacingSchema.nullable().optional(),
|
|
9369
9609
|
raised: z.boolean().nullable().optional(),
|
|
9370
9610
|
rounded: boxRoundedSchema.nullable().optional(),
|
|
9371
|
-
|
|
9372
|
-
"accent-quote",
|
|
9373
|
-
"editorial-rule",
|
|
9374
|
-
"soft-panel",
|
|
9375
|
-
"editorial-serif-quote",
|
|
9376
|
-
"editorial-open",
|
|
9377
|
-
"color-blocked"
|
|
9378
|
-
]).nullable().optional(),
|
|
9611
|
+
role: cardRoleSchema.nullable().optional(),
|
|
9379
9612
|
cardVariant: boxStylesCardVariantSchema.nullable().optional()
|
|
9380
9613
|
});
|
|
9381
9614
|
const blockStyleOverridesSchema = z.object({
|
|
@@ -9481,30 +9714,6 @@ const motion = z.object({
|
|
|
9481
9714
|
]).nullable()
|
|
9482
9715
|
});
|
|
9483
9716
|
z.object({ shape: corners });
|
|
9484
|
-
z.object({
|
|
9485
|
-
elevation: z.enum([
|
|
9486
|
-
"none",
|
|
9487
|
-
"low",
|
|
9488
|
-
"medium",
|
|
9489
|
-
"high"
|
|
9490
|
-
]),
|
|
9491
|
-
border: z.enum([
|
|
9492
|
-
"none",
|
|
9493
|
-
"subtle",
|
|
9494
|
-
"defined"
|
|
9495
|
-
]),
|
|
9496
|
-
shape: corners,
|
|
9497
|
-
headerStyle: z.enum([
|
|
9498
|
-
"plain",
|
|
9499
|
-
"accentBar",
|
|
9500
|
-
"subtleBg"
|
|
9501
|
-
]).nullable(),
|
|
9502
|
-
mediaTreatment: z.enum([
|
|
9503
|
-
"square",
|
|
9504
|
-
"rounded",
|
|
9505
|
-
"bleed"
|
|
9506
|
-
]).nullable()
|
|
9507
|
-
});
|
|
9508
9717
|
const inputStyle = z.object({
|
|
9509
9718
|
shape: corners,
|
|
9510
9719
|
border: z.enum([
|
|
@@ -9519,12 +9728,6 @@ const inputStyle = z.object({
|
|
|
9519
9728
|
]),
|
|
9520
9729
|
label: z.enum(["inside", "above"])
|
|
9521
9730
|
});
|
|
9522
|
-
const headerVariant = z.enum([
|
|
9523
|
-
"classic",
|
|
9524
|
-
"centered",
|
|
9525
|
-
"transparent",
|
|
9526
|
-
"floating"
|
|
9527
|
-
]);
|
|
9528
9731
|
const headerPositioning = z.enum([
|
|
9529
9732
|
"static",
|
|
9530
9733
|
"sticky",
|
|
@@ -9668,7 +9871,7 @@ const headerBackgroundSchema = z.object({
|
|
|
9668
9871
|
textColor: tokenOrCssColorValueSchema.nullable().optional()
|
|
9669
9872
|
});
|
|
9670
9873
|
const headerSchema = z.object({
|
|
9671
|
-
variant:
|
|
9874
|
+
variant: headerVariantWithLegacyAliasSchema,
|
|
9672
9875
|
positioning: headerPositioning,
|
|
9673
9876
|
shrinkOnScroll: z.boolean(),
|
|
9674
9877
|
maxWidth: headerMaxWidth,
|
|
@@ -11656,13 +11859,25 @@ function presetCategory(recipe) {
|
|
|
11656
11859
|
function joinClasses(...parts) {
|
|
11657
11860
|
return parts.filter((part) => typeof part === "string" && part.length > 0).join(" ");
|
|
11658
11861
|
}
|
|
11659
|
-
|
|
11862
|
+
/**
|
|
11863
|
+
* The class each treatment contributes on top of whatever the caller passed.
|
|
11864
|
+
*
|
|
11865
|
+
* `panel` contributes nothing: its callers already pass `alert alert-*`, so
|
|
11866
|
+
* adopting the vocabulary changes no existing rendering. `field-note` needs a
|
|
11867
|
+
* single hook — its tone styling keys off `data-feedback-tone` in the
|
|
11868
|
+
* theme-generated CSS rather than off a second class.
|
|
11869
|
+
*/
|
|
11870
|
+
function treatmentClass(treatment) {
|
|
11871
|
+
return treatment === "field-note" ? "feedback-note" : void 0;
|
|
11872
|
+
}
|
|
11873
|
+
function FeedbackMessage({ tone, treatment = "panel", children, className, id, title, titleClassName, bodyClassName, role = "status", live }) {
|
|
11660
11874
|
const resolvedLive = live ?? (role === "alert" ? "assertive" : "polite");
|
|
11661
|
-
const shouldWrapBody = Boolean(title || bodyClassName);
|
|
11875
|
+
const shouldWrapBody = Boolean(title || bodyClassName) || treatment === "field-note";
|
|
11662
11876
|
return /* @__PURE__ */ jsxs("div", {
|
|
11663
11877
|
id,
|
|
11664
|
-
className,
|
|
11878
|
+
className: joinClasses(className, treatmentClass(treatment)) || void 0,
|
|
11665
11879
|
"data-feedback-tone": tone,
|
|
11880
|
+
"data-feedback-treatment": treatment,
|
|
11666
11881
|
role,
|
|
11667
11882
|
"aria-live": resolvedLive === "off" ? void 0 : resolvedLive,
|
|
11668
11883
|
children: [title ? /* @__PURE__ */ jsx("p", {
|
|
@@ -12841,16 +13056,10 @@ function DefaultBookingErrorSummary({ errors, id }) {
|
|
|
12841
13056
|
if (!hasBookingValidationErrors(errors)) return null;
|
|
12842
13057
|
return /* @__PURE__ */ jsxs(FeedbackMessage, {
|
|
12843
13058
|
tone: "error",
|
|
12844
|
-
|
|
13059
|
+
treatment: "field-note",
|
|
12845
13060
|
id,
|
|
12846
13061
|
role: "alert",
|
|
12847
|
-
children: [errors.formError ? /* @__PURE__ */ jsx("p", {
|
|
12848
|
-
className: "rb-caption",
|
|
12849
|
-
children: /* @__PURE__ */ jsx("strong", { children: errors.formError })
|
|
12850
|
-
}) : null, Object.entries(errors.fieldErrors).map(([key, message]) => /* @__PURE__ */ jsx("p", {
|
|
12851
|
-
className: "rb-caption",
|
|
12852
|
-
children: message
|
|
12853
|
-
}, key))]
|
|
13062
|
+
children: [errors.formError ? /* @__PURE__ */ jsx("p", { children: /* @__PURE__ */ jsx("strong", { children: errors.formError }) }) : null, Object.entries(errors.fieldErrors).map(([key, message]) => /* @__PURE__ */ jsx("p", { children: message }, key))]
|
|
12854
13063
|
});
|
|
12855
13064
|
}
|
|
12856
13065
|
function SelectedCheck() {
|
|
@@ -14657,6 +14866,7 @@ const eventPresetSchema = z.enum([
|
|
|
14657
14866
|
"event",
|
|
14658
14867
|
"class",
|
|
14659
14868
|
"course",
|
|
14869
|
+
"term",
|
|
14660
14870
|
"workshop",
|
|
14661
14871
|
"retreat",
|
|
14662
14872
|
"performance"
|
|
@@ -14715,57 +14925,49 @@ z.enum([
|
|
|
14715
14925
|
*/
|
|
14716
14926
|
const accessRestrictionSchema = z.enum(["none", "category"]);
|
|
14717
14927
|
z.enum(["single", "ticket_types"]);
|
|
14928
|
+
const freePriceDisplaySchema = z.object({
|
|
14929
|
+
kind: z.literal("free"),
|
|
14930
|
+
currency: z.string()
|
|
14931
|
+
});
|
|
14932
|
+
const exactPriceDisplaySchema = z.object({
|
|
14933
|
+
kind: z.literal("exact"),
|
|
14934
|
+
amount: z.number(),
|
|
14935
|
+
currency: z.string()
|
|
14936
|
+
});
|
|
14937
|
+
const fromPriceDisplaySchema = z.object({
|
|
14938
|
+
kind: z.literal("from"),
|
|
14939
|
+
amount: z.number(),
|
|
14940
|
+
currency: z.string()
|
|
14941
|
+
});
|
|
14942
|
+
const unavailablePriceDisplaySchema = z.object({
|
|
14943
|
+
kind: z.literal("unavailable"),
|
|
14944
|
+
currency: z.string()
|
|
14945
|
+
});
|
|
14946
|
+
const rangePriceDisplaySchema = z.object({
|
|
14947
|
+
kind: z.literal("range"),
|
|
14948
|
+
minAmount: z.number(),
|
|
14949
|
+
maxAmount: z.number(),
|
|
14950
|
+
currency: z.string()
|
|
14951
|
+
});
|
|
14952
|
+
const mixedPriceDisplaySchema = z.object({
|
|
14953
|
+
kind: z.literal("mixed"),
|
|
14954
|
+
paidFromAmount: z.number(),
|
|
14955
|
+
paidToAmount: z.number(),
|
|
14956
|
+
currency: z.string()
|
|
14957
|
+
});
|
|
14718
14958
|
const publicCoursePriceDisplaySchema = z.discriminatedUnion("kind", [
|
|
14719
|
-
|
|
14720
|
-
|
|
14721
|
-
|
|
14722
|
-
|
|
14723
|
-
z.object({
|
|
14724
|
-
kind: z.literal("exact"),
|
|
14725
|
-
amount: z.number(),
|
|
14726
|
-
currency: z.string()
|
|
14727
|
-
}),
|
|
14728
|
-
z.object({
|
|
14729
|
-
kind: z.literal("from"),
|
|
14730
|
-
amount: z.number(),
|
|
14731
|
-
currency: z.string()
|
|
14732
|
-
}),
|
|
14733
|
-
z.object({
|
|
14734
|
-
kind: z.literal("unavailable"),
|
|
14735
|
-
currency: z.string()
|
|
14736
|
-
})
|
|
14959
|
+
freePriceDisplaySchema,
|
|
14960
|
+
exactPriceDisplaySchema,
|
|
14961
|
+
fromPriceDisplaySchema,
|
|
14962
|
+
unavailablePriceDisplaySchema
|
|
14737
14963
|
]);
|
|
14738
14964
|
z.discriminatedUnion("kind", [
|
|
14739
|
-
|
|
14740
|
-
|
|
14741
|
-
|
|
14742
|
-
|
|
14743
|
-
|
|
14744
|
-
|
|
14745
|
-
amount: z.number(),
|
|
14746
|
-
currency: z.string()
|
|
14747
|
-
}),
|
|
14748
|
-
z.object({
|
|
14749
|
-
kind: z.literal("from"),
|
|
14750
|
-
amount: z.number(),
|
|
14751
|
-
currency: z.string()
|
|
14752
|
-
}),
|
|
14753
|
-
z.object({
|
|
14754
|
-
kind: z.literal("range"),
|
|
14755
|
-
minAmount: z.number(),
|
|
14756
|
-
maxAmount: z.number(),
|
|
14757
|
-
currency: z.string()
|
|
14758
|
-
}),
|
|
14759
|
-
z.object({
|
|
14760
|
-
kind: z.literal("mixed"),
|
|
14761
|
-
paidFromAmount: z.number(),
|
|
14762
|
-
paidToAmount: z.number(),
|
|
14763
|
-
currency: z.string()
|
|
14764
|
-
}),
|
|
14765
|
-
z.object({
|
|
14766
|
-
kind: z.literal("unavailable"),
|
|
14767
|
-
currency: z.string()
|
|
14768
|
-
}),
|
|
14965
|
+
freePriceDisplaySchema,
|
|
14966
|
+
exactPriceDisplaySchema,
|
|
14967
|
+
fromPriceDisplaySchema,
|
|
14968
|
+
rangePriceDisplaySchema,
|
|
14969
|
+
mixedPriceDisplaySchema,
|
|
14970
|
+
unavailablePriceDisplaySchema,
|
|
14769
14971
|
z.object({
|
|
14770
14972
|
kind: z.literal("external"),
|
|
14771
14973
|
label: z.string()
|
|
@@ -14776,36 +14978,12 @@ z.discriminatedUnion("kind", [
|
|
|
14776
14978
|
})
|
|
14777
14979
|
]);
|
|
14778
14980
|
const publicEventTicketTypePriceDisplaySchema = z.union([
|
|
14779
|
-
|
|
14780
|
-
|
|
14781
|
-
|
|
14782
|
-
|
|
14783
|
-
|
|
14784
|
-
|
|
14785
|
-
amount: z.number(),
|
|
14786
|
-
currency: z.string()
|
|
14787
|
-
}),
|
|
14788
|
-
z.object({
|
|
14789
|
-
kind: z.literal("from"),
|
|
14790
|
-
amount: z.number(),
|
|
14791
|
-
currency: z.string()
|
|
14792
|
-
}),
|
|
14793
|
-
z.object({
|
|
14794
|
-
kind: z.literal("range"),
|
|
14795
|
-
minAmount: z.number(),
|
|
14796
|
-
maxAmount: z.number(),
|
|
14797
|
-
currency: z.string()
|
|
14798
|
-
}),
|
|
14799
|
-
z.object({
|
|
14800
|
-
kind: z.literal("mixed"),
|
|
14801
|
-
paidFromAmount: z.number(),
|
|
14802
|
-
paidToAmount: z.number(),
|
|
14803
|
-
currency: z.string()
|
|
14804
|
-
}),
|
|
14805
|
-
z.object({
|
|
14806
|
-
kind: z.literal("unavailable"),
|
|
14807
|
-
currency: z.string()
|
|
14808
|
-
})
|
|
14981
|
+
freePriceDisplaySchema,
|
|
14982
|
+
exactPriceDisplaySchema,
|
|
14983
|
+
fromPriceDisplaySchema,
|
|
14984
|
+
rangePriceDisplaySchema,
|
|
14985
|
+
mixedPriceDisplaySchema,
|
|
14986
|
+
unavailablePriceDisplaySchema
|
|
14809
14987
|
]);
|
|
14810
14988
|
const publicEventAttendanceModeSchema = z.enum(["in_person", "online"]);
|
|
14811
14989
|
const publicEventAttendanceModeAvailabilitySchema = z.object({
|
|
@@ -14919,6 +15097,22 @@ const publicTeamMemberSummarySchema = z.object({
|
|
|
14919
15097
|
summary: z.string().nullable(),
|
|
14920
15098
|
profilePath: z.string().nullable()
|
|
14921
15099
|
});
|
|
15100
|
+
const publicEventBookingAvailabilitySchema = z.discriminatedUnion("kind", [z.object({ kind: z.literal("open") }), z.object({
|
|
15101
|
+
kind: z.literal("closed"),
|
|
15102
|
+
reason: z.enum([
|
|
15103
|
+
"occurrence_cancelled",
|
|
15104
|
+
"occurrence_completed",
|
|
15105
|
+
"series_draft",
|
|
15106
|
+
"series_cancelled",
|
|
15107
|
+
"series_completed",
|
|
15108
|
+
"series_archived",
|
|
15109
|
+
"parent_archived",
|
|
15110
|
+
"parent_inconsistent",
|
|
15111
|
+
"not_public",
|
|
15112
|
+
"already_started",
|
|
15113
|
+
"enrollment_closed"
|
|
15114
|
+
])
|
|
15115
|
+
})]);
|
|
14922
15116
|
/**
|
|
14923
15117
|
* Zod schema for public event data
|
|
14924
15118
|
*/
|
|
@@ -14943,6 +15137,7 @@ const publicEventSchema = z.object({
|
|
|
14943
15137
|
path: z.string().nullable(),
|
|
14944
15138
|
destination: publicEventDestinationSchema,
|
|
14945
15139
|
requiresRegistration: z.boolean(),
|
|
15140
|
+
bookingAvailability: publicEventBookingAvailabilitySchema,
|
|
14946
15141
|
deliveryMode: z.enum([
|
|
14947
15142
|
"in_person",
|
|
14948
15143
|
"online",
|
|
@@ -14961,6 +15156,8 @@ const publicEventSchema = z.object({
|
|
|
14961
15156
|
status: z.enum([
|
|
14962
15157
|
"active",
|
|
14963
15158
|
"draft",
|
|
15159
|
+
"cancelled",
|
|
15160
|
+
"completed",
|
|
14964
15161
|
"archived"
|
|
14965
15162
|
]).optional(),
|
|
14966
15163
|
timeZone: z.string(),
|
|
@@ -14984,6 +15181,7 @@ const unsupportedEventRegistrationPageSurfaceSubjectSchema = z.object({
|
|
|
14984
15181
|
reason: z.enum([
|
|
14985
15182
|
"unsupportedSubject",
|
|
14986
15183
|
"invalidEventSeriesId",
|
|
15184
|
+
"invalidEventSeriesBookingScope",
|
|
14987
15185
|
"invalidEventOfferingId"
|
|
14988
15186
|
])
|
|
14989
15187
|
});
|
|
@@ -15014,6 +15212,10 @@ function normalizeEventRegistrationPageSurfaceSubject(value) {
|
|
|
15014
15212
|
kind: "unsupported",
|
|
15015
15213
|
reason: "invalidEventSeriesId"
|
|
15016
15214
|
};
|
|
15215
|
+
case "invalidEventSeriesBookingScope": return {
|
|
15216
|
+
kind: "unsupported",
|
|
15217
|
+
reason: "invalidEventSeriesBookingScope"
|
|
15218
|
+
};
|
|
15017
15219
|
case "invalidEventOfferingId": return {
|
|
15018
15220
|
kind: "unsupported",
|
|
15019
15221
|
reason: "invalidEventOfferingId"
|
|
@@ -15126,8 +15328,8 @@ function normalizePublicEventLike(value) {
|
|
|
15126
15328
|
}
|
|
15127
15329
|
//#endregion
|
|
15128
15330
|
//#region ../blocks/src/system/runtime/nodes/event-registration/event-registration.headless.planning.ts
|
|
15129
|
-
function
|
|
15130
|
-
return
|
|
15331
|
+
function isEventRegistrationAvailable(event) {
|
|
15332
|
+
return event.bookingAvailability.kind === "open";
|
|
15131
15333
|
}
|
|
15132
15334
|
function normalizeEventRegistrationMaxTickets(value) {
|
|
15133
15335
|
if (typeof value === "number" && Number.isFinite(value) && value > 0) return Math.floor(value);
|
|
@@ -15283,8 +15485,7 @@ function resolveHeadlessEventRegistrationView(wizard) {
|
|
|
15283
15485
|
kind: "empty",
|
|
15284
15486
|
message: "No events available for registration."
|
|
15285
15487
|
};
|
|
15286
|
-
|
|
15287
|
-
if (!wizard.scopedEvents.some((event) => !event.status || allowedStatuses.includes(event.status)) && !wizard.occurrenceContext) return {
|
|
15488
|
+
if (!wizard.scopedEvents.some(isEventRegistrationAvailable) && !wizard.occurrenceContext) return {
|
|
15288
15489
|
kind: "unavailable",
|
|
15289
15490
|
message: "Registration is not currently available for this event."
|
|
15290
15491
|
};
|