@riverbankcms/sdk 0.144.0 → 0.146.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/CHANGELOG.md +17 -0
- package/dist/{PreviewEditorSidebar-CQZNnFiM.mjs → PreviewEditorSidebar-kg2r2Fyi.mjs} +4 -4
- package/dist/{PreviewEditorUI-DCNxnmI0.mjs → PreviewEditorUI-sWMLp5dT.mjs} +3 -3
- package/dist/{PreviewQueryProvider-BCYICImX.mjs → PreviewQueryProvider-Cg51xq1w.mjs} +1 -1
- package/dist/{SdkPreviewModeRuntime-BJolUbr1.mjs → SdkPreviewModeRuntime-h2ti3Hch.mjs} +688 -519
- package/dist/{SiteChromeCustomizeContext-CKgEpoxi.mjs → SiteChromeCustomizeContext-DEACFH9m.mjs} +3381 -2017
- package/dist/_dts/ai/src/contracts/proposals.d.ts +5643 -66
- package/dist/_dts/ai/src/contracts/siteStyleProposalSchemas.d.ts +513 -6
- package/dist/_dts/api/src/appointmentEndpointDefinitions.d.ts +49 -0
- package/dist/_dts/api/src/appointmentServiceCategoryEndpoints.d.ts +75 -0
- package/dist/_dts/api/src/appointmentServiceContracts.d.ts +80 -0
- package/dist/_dts/api/src/appointmentSetup.d.ts +8 -1
- package/dist/_dts/api/src/bookingConfig.d.ts +8 -1
- package/dist/_dts/api/src/bookingManagementEndpoints.d.ts +10 -26
- package/dist/_dts/api/src/bookingManagementEventEndpointTypes.d.ts +45 -1
- package/dist/_dts/api/src/clientErrorReporting.d.ts +50 -0
- package/dist/_dts/api/src/communications.d.ts +32 -24
- package/dist/_dts/api/src/contentRuntime.d.ts +3 -5
- package/dist/_dts/api/src/endpoints.d.ts +316 -134
- package/dist/_dts/api/src/event-visibility.d.ts +20 -0
- package/dist/_dts/api/src/eventManagementContracts.d.ts +56 -3
- package/dist/_dts/api/src/eventManagementEndpointDefinitions.d.ts +24 -0
- package/dist/_dts/api/src/eventPageWords.d.ts +19 -0
- package/dist/_dts/api/src/eventSeriesRegistrationEndpointDefinitions.d.ts +14 -0
- package/dist/_dts/api/src/index.d.ts +7 -1
- package/dist/_dts/api/src/indexCoreTypes.d.ts +1 -1
- package/dist/_dts/api/src/indexExtendedTypes.d.ts +1 -1
- package/dist/_dts/api/src/launchReadiness.d.ts +22 -2
- package/dist/_dts/api/src/launchRequirementPriority.d.ts +3 -0
- package/dist/_dts/api/src/newsletterCampaignCommandEndpoints.d.ts +13 -0
- package/dist/_dts/api/src/newsletterEndpointDefinitions.d.ts +30 -11
- package/dist/_dts/api/src/occurrenceScheduling.d.ts +10 -0
- package/dist/_dts/api/src/onboarding/confirmationResend.d.ts +3 -0
- package/dist/_dts/api/src/pageSurfaceEndpoints.d.ts +44 -0
- package/dist/_dts/api/src/participantMessaging.d.ts +11 -1
- package/dist/_dts/api/src/publicBookingService.d.ts +35 -1
- package/dist/_dts/api/src/publicExperience/newsletterEndpoints.d.ts +13 -0
- package/dist/_dts/api/src/publicNewsletterEndpointDefinitions.d.ts +58 -0
- package/dist/_dts/api/src/schemas/admin-observability-logs.d.ts +3 -3
- package/dist/_dts/api/src/sdk-event-upsert.d.ts +40 -1
- package/dist/_dts/api/src/sdkContracts.d.ts +3 -42
- package/dist/_dts/api/src/sdkCourseBooking.d.ts +30 -0
- package/dist/_dts/api/src/sdkEventEndpointDefinitions.d.ts +76 -0
- package/dist/_dts/api/src/sdkEventLifecycle.d.ts +37 -0
- package/dist/_dts/api/src/sdkManagedEventContracts.d.ts +18 -0
- package/dist/_dts/api/src/sdkPageDesign.d.ts +388 -0
- package/dist/_dts/api/src/sdkPageDesignEndpointDefinitions.d.ts +22 -0
- package/dist/_dts/api/src/sdkPullEventContracts.d.ts +46 -0
- package/dist/_dts/api/src/siteAddressEndpoints.d.ts +29 -0
- package/dist/_dts/api/src/siteManagementEndpointDefinitions.d.ts +49 -0
- package/dist/_dts/api/src/siteManagementEndpoints.d.ts +4 -38
- package/dist/_dts/api/src/siteOnboarding.d.ts +75 -9
- package/dist/_dts/api/src/sitePlatformEndpoints.d.ts +1 -1
- package/dist/_dts/api/src/types.d.ts +8 -1
- package/dist/_dts/api/src/wholeSeriesRuns.d.ts +14 -0
- package/dist/_dts/blocks/src/PageRenderer.d.ts +4 -4
- package/dist/_dts/blocks/src/bindings/index.d.ts +2 -2
- package/dist/_dts/blocks/src/contracts/proof-block-islands.d.ts +24 -0
- package/dist/_dts/blocks/src/index.d.ts +3 -1
- package/dist/_dts/blocks/src/pageRenderAdmission.d.ts +10 -0
- package/dist/_dts/blocks/src/pageRenderJoins.d.ts +68 -0
- package/dist/_dts/blocks/src/pageRenderPlan.d.ts +8 -27
- package/dist/_dts/blocks/src/pageRenderPreparation.d.ts +7 -4
- package/dist/_dts/blocks/src/pageRendererBoundaries.d.ts +40 -23
- package/dist/_dts/blocks/src/pageRendererContracts.d.ts +3 -1
- package/dist/_dts/blocks/src/server.d.ts +1 -1
- package/dist/_dts/blocks/src/system/blocks/appointment-services.d.ts +2 -0
- package/dist/_dts/blocks/src/system/blocks/events/eventSelectionFields.d.ts +2 -2
- package/dist/_dts/blocks/src/system/blocks/events/shared/calendarWindow.d.ts +1 -1
- package/dist/_dts/blocks/src/system/blocks/events/shared/schemas.d.ts +27 -5
- package/dist/_dts/blocks/src/system/blocks/events/shared/types.d.ts +14 -1
- package/dist/_dts/blocks/src/system/blocks/location-map.d.ts +2 -2
- package/dist/_dts/blocks/src/system/blocks/media-text.d.ts +47 -47
- package/dist/_dts/blocks/src/system/icons/social.d.ts +1 -1
- package/dist/_dts/blocks/src/system/manifest/schema.d.ts +29 -3
- package/dist/_dts/blocks/src/system/registry.d.ts +1 -1
- package/dist/_dts/blocks/src/system/runtime/hooks/useHeadlessBookingFlow.d.ts +8 -1
- package/dist/_dts/blocks/src/system/runtime/nodes/appointment-services.d.ts +22 -2
- package/dist/_dts/blocks/src/system/runtime/nodes/booking-form.headless.state.d.ts +3 -1
- package/dist/_dts/blocks/src/system/runtime/nodes/booking-form.interactive.d.ts +57 -2
- package/dist/_dts/blocks/src/system/runtime/nodes/booking-form.service-categories.d.ts +29 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/booking-form.service-choices.d.ts +13 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/booking-form.state.d.ts +3 -3
- package/dist/_dts/blocks/src/system/runtime/nodes/booking-runtime-sources.d.ts +13 -1
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/eventSourceRecovery.d.ts +2 -1
- package/dist/_dts/blocks/src/system/runtime/nodes/events/shared/eventCollectionContract.d.ts +23 -7
- package/dist/_dts/blocks/src/system/runtime/nodes/form.fields.d.ts +5 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/newsletter-form.block-submission.d.ts +36 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/newsletter-form.client.d.ts +1 -1
- package/dist/_dts/blocks/src/system/runtime/nodes/newsletter-form.interactive.d.ts +6 -1
- package/dist/_dts/blocks/src/system/runtime/nodes/newsletter-form.parts.d.ts +46 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/newsletter-form.submission.d.ts +20 -1
- package/dist/_dts/blocks/src/system/runtime/nodes/newsletter-form.types.d.ts +2 -1
- package/dist/_dts/blocks/src/system/runtime/resolver.d.ts +2 -1
- package/dist/_dts/blocks/src/system/runtime/shared/components/CheckboxChoice.d.ts +18 -0
- package/dist/_dts/blocks/src/system/runtime/shared/components/index.d.ts +1 -0
- package/dist/_dts/content-editor/src/index.d.ts +1 -0
- package/dist/_dts/content-editor/src/primitives/previewEditableOutline.d.ts +2 -0
- package/dist/_dts/content-editor/src/ui/editorBlockEquality.d.ts +3 -0
- package/dist/_dts/content-editor/src/ui/editorSnapshot.d.ts +3 -3
- package/dist/_dts/content-model/src/content-types/schema.d.ts +1 -1
- package/dist/_dts/core/src/appointment-service-categories.d.ts +108 -0
- package/dist/_dts/core/src/block-content-identity.d.ts +5 -0
- package/dist/_dts/core/src/editor-state.d.ts +2 -1
- package/dist/_dts/core/src/index.d.ts +2 -0
- package/dist/_dts/core/src/mailing-list-submission.d.ts +3 -1
- package/dist/_dts/core/src/public-event-booking-availability.d.ts +20 -1
- package/dist/_dts/core/src/public-profile.d.ts +12 -1
- package/dist/_dts/db/src/generated/supabase/database.types.d.ts +711 -242
- package/dist/_dts/editor-blocks/src/BlockEditor.d.ts +3 -0
- package/dist/_dts/editor-blocks/src/block-editor/EmptyState.d.ts +13 -1
- package/dist/_dts/editor-blocks/src/block-editor/types.d.ts +2 -2
- package/dist/_dts/editor-blocks/src/index.d.ts +1 -0
- package/dist/_dts/editor-blocks/src/widgets/site-option-picker/loaders.d.ts +16 -1
- package/dist/_dts/editor-blocks/src/widgets/site-option-picker/types.d.ts +13 -0
- package/dist/_dts/editor-blocks/src/widgets/site-option-picker/utils.d.ts +29 -0
- package/dist/_dts/preview-next/src/client/blocks/BoundaryControl.d.ts +7 -2
- package/dist/_dts/preview-next/src/client/blocks/composer/mergeDrafts.d.ts +1 -1
- package/dist/_dts/preview-next/src/client/blocks/composer/types.d.ts +3 -3
- package/dist/_dts/preview-next/src/client/blocks/previewProjection/applyPreviewProjections.d.ts +1 -3
- package/dist/_dts/preview-next/src/client/blocks/previewProjection/runtimeContentDecoration.d.ts +2 -2
- package/dist/_dts/preview-next/src/client/blocks/previewProjection/types.d.ts +2 -2
- package/dist/_dts/preview-next/src/client/preview/PreviewEntryControllerProvider.d.ts +1 -1
- package/dist/_dts/sdk/src/client/runtimeCacheKeys.d.ts +8 -0
- package/dist/_dts/sdk/src/client/types.d.ts +1 -1
- package/dist/_dts/sdk/src/contracts/index.d.ts +1 -1
- package/dist/_dts/sdk/src/contracts/page.d.ts +7 -2
- package/dist/_dts/sdk/src/contracts/system-block-content.d.ts +5 -0
- package/dist/_dts/sdk/src/manifest/passes/pass1-fields.d.ts +2 -2
- package/dist/_dts/sdk/src/next/renderSdkContent.d.ts +0 -1
- package/dist/_dts/sdk/src/public-api/contracts.d.ts +6 -8
- package/dist/_dts/sdk/src/rendering/blocks-page-renderer.d.ts +4 -4
- package/dist/_dts/sdk/src/rendering/components/pageShared.d.ts +4 -4
- package/dist/_dts/sdk/src/rendering/helpers/loadContent.d.ts +7 -2
- package/dist/_dts/sdk/src/rendering/helpers/loadPage.d.ts +5 -2
- package/dist/_dts/sdk/src/rendering/helpers/pageRuntimeSupport.d.ts +6 -1
- package/dist/_dts/sdk/src/rendering/helpers/templateContent.d.ts +2 -0
- package/dist/_dts/sdk/src/rendering/hooks/useContent.d.ts +6 -2
- package/dist/_dts/sdk/src/rendering/hooks/usePage.d.ts +5 -1
- package/dist/_dts/sdk/src/version.d.ts +1 -1
- package/dist/_dts/surfaces/src/index.d.ts +10 -0
- package/dist/_dts/theme-core/src/generated/containerResponsiveThemeCss.d.ts +1 -1
- package/dist/_dts/theme-core/src/inputs/checkable.d.ts +42 -0
- package/dist/_dts/theme-core/src/inputs/inputGroup.d.ts +19 -0
- package/dist/_dts/theme-core/src/layout/boundaryCss.d.ts +3 -0
- package/dist/_dts/theme-core/src/site-styles/compositionBudget.d.ts +8 -0
- package/dist/_dts/theme-core/src/site-styles/contentTemplateRuntimeCompiler.d.ts +3 -2
- package/dist/_dts/theme-core/src/site-styles/designState.d.ts +1 -3
- package/dist/_dts/theme-core/src/site-styles/generatedDesignPipeline.d.ts +3 -0
- package/dist/_dts/theme-core/src/site-styles/index.d.ts +3 -0
- package/dist/_dts/theme-core/src/site-styles/joinTreatment.d.ts +132 -0
- package/dist/_dts/theme-core/src/site-styles/pageDesignEditorBoundaries.d.ts +31 -0
- package/dist/_dts/theme-core/src/site-styles/pageDesignEditorModel.d.ts +33 -29
- package/dist/_dts/theme-core/src/site-styles/pageDesignIntent.d.ts +4 -4
- package/dist/_dts/theme-core/src/site-styles/pageFlowPresets.d.ts +36 -0
- package/dist/_dts/theme-core/src/site-styles/previewCompiler.d.ts +4 -10
- package/dist/_dts/theme-core/src/site-styles/rawStyleFields.d.ts +17 -4
- package/dist/_dts/theme-core/src/site-styles/runtimeCompiler.d.ts +20 -74
- package/dist/_dts/theme-core/src/site-styles/sectionBoundaryComposition.d.ts +95 -0
- package/dist/_dts/theme-core/src/site-styles/sectionTransitions.d.ts +80 -518
- package/dist/_dts/theme-core/src/site-styles/siteStyleBlockPolicies.d.ts +9 -4
- package/dist/_dts/theme-core/src/site-styles/transitionCatalogue.d.ts +320 -0
- package/dist/_dts/theme-core/src/site-styles/types.d.ts +3 -18
- package/dist/_dts/ui/src/navigation-tabs.d.ts +2 -1
- package/dist/client/{BookingConsentAgreement-DoAILrkN.mjs → BookingConsentAgreement-BQKL045f.mjs} +2 -2
- package/dist/client/CheckboxChoice--W2n6yKs.mjs +24 -0
- package/dist/client/{DiscountCodeDisclosure-X528hUTf.mjs → DiscountCodeDisclosure-CsOtjFY7.mjs} +1 -1
- package/dist/client/{EventCombined.client-DSBVwq5m.mjs → EventCombined.client-BdRjVbhH.mjs} +6 -6
- package/dist/client/{EventListing.client-DmFAX7Vb.mjs → EventListing.client-DBxC6xOU.mjs} +2 -2
- package/dist/client/{LeafletStaticMap-BAqXdfhq.mjs → LeafletStaticMap-mHEJKrTs.mjs} +1 -1
- package/dist/client/{ThemedButton-BwNFVwi4.mjs → ThemedButton-CE5KYT6z.mjs} +1 -1
- package/dist/client/{accordion-DRhMdkbd.mjs → accordion-BEQNSptH.mjs} +1 -1
- package/dist/client/{bookingForm-iJ_nCsNF.mjs → bookingForm-AMr-s5vw.mjs} +168 -95
- package/dist/client/bookings.mjs +239 -110
- package/dist/client/{carousel-D8zuffZr.mjs → carousel-Bbt_QgJy.mjs} +1 -1
- package/dist/client/{cart-DeMGJViN.mjs → cart-CnWi30zJ.mjs} +3 -3
- package/dist/client/{checkout-DXc06Km2.mjs → checkout-f3nkWgd4.mjs} +3 -3
- package/dist/client/client.mjs +3222 -1612
- package/dist/client/{context-CDLCfDep.mjs → context-Bc8T6pCe.mjs} +1 -1
- package/dist/client/{dates-ClFx7Epy.mjs → dates-DUsCEzLb.mjs} +2 -3
- package/dist/client/{eventCalendar-BaGpnOGN.mjs → eventCalendar-CKwgXui5.mjs} +9 -9
- package/dist/client/{eventCombined-ywONOx2m.mjs → eventCombined-CBAOSTGR.mjs} +4 -4
- package/dist/client/{eventDetails-B2LlOTYY.mjs → eventDetails-Dh-_WiBD.mjs} +4 -4
- package/dist/client/{eventListing-CMgxWpqP.mjs → eventListing-CA3frIH5.mjs} +4 -4
- package/dist/client/{eventRegistration-BarLDNHR.mjs → eventRegistration-BHtsgdcg.mjs} +21 -22
- package/dist/client/{form-BjqKaBJ7.mjs → form-C2h3YAcg.mjs} +135 -104
- package/dist/client/{headerSection-CP4XDwz1.mjs → headerSection-lwMuMTH9.mjs} +3 -3
- package/dist/client/hooks.mjs +1023 -148
- package/dist/client/{locationMap-C5gW-d-w.mjs → locationMap-DJ2bLODV.mjs} +3 -3
- package/dist/client/{newsletterForm-afXlVSA0.mjs → newsletterForm-8Pu5K32g.mjs} +225 -102
- package/dist/client/{pricing-Bl1CAl28.mjs → pricing-HHx3IgBz.mjs} +1 -1
- package/dist/client/{productDetail-CvQ3jWQe.mjs → productDetail-C_1odnAf.mjs} +3 -3
- package/dist/client/{productList-U874PGO7.mjs → productList-CtCv-Nmx.mjs} +3 -3
- package/dist/client/{propsDecoder-DPXtCZWP.mjs → propsDecoder-Dcgsncxb.mjs} +111 -55
- package/dist/client/rendering/client.mjs +1389 -722
- package/dist/client/rendering/islands.mjs +17 -17
- package/dist/client/rendering.mjs +3136 -1400
- package/dist/client/{routeIslandApiConfig-NGYiUWXu.mjs → routeIslandApiConfig-CWLP7wu3.mjs} +1 -1
- package/dist/client/{scrollToBlock-0-C3DVhK.mjs → scrollToBlock-BNgaEUpo.mjs} +1 -1
- package/dist/client/{shop-BXjXhM9P.mjs → shop-DQXrQ8kJ.mjs} +7 -7
- package/dist/client/{shop-commerce-BZ6UlWJ7.mjs → shop-commerce-B88zmWWo.mjs} +6 -6
- package/dist/client/{shop-commerce-store-DlSBXb3D.mjs → shop-commerce-store-DtSfkKuX.mjs} +1 -1
- package/dist/client/{shopShared-kkEOiLPA.mjs → shopShared-cuaONpkJ.mjs} +4 -4
- package/dist/client/{useEventFilters-zvnnE1ro.mjs → useEventFilters-Bukew6Gb.mjs} +6 -6
- package/dist/preview-next/before-render.mjs +500 -165
- package/dist/preview-next/client/runtime.mjs +4 -4
- package/dist/preview-next/editor-base.css +11 -0
- package/dist/preview-next/keepAlive.mjs +460 -165
- package/dist/preview-next/middleware.mjs +461 -165
- package/dist/{previewAuthStore-JA6-I_sL.mjs → previewAuthStore-h5IgbSp4.mjs} +485 -165
- package/dist/{sdk-runtime-DFJlQt3q.mjs → sdk-runtime-DTc1uIXn.mjs} +2 -2
- package/dist/{separator-o8GHb1xh.mjs → separator-BpHS1KZK.mjs} +1 -1
- package/dist/server/components.mjs +3088 -1307
- package/dist/server/config-validation.mjs +927 -109
- package/dist/server/config.mjs +927 -109
- package/dist/server/data.mjs +939 -110
- package/dist/server/index.mjs +513 -169
- package/dist/server/next.mjs +2874 -1195
- package/dist/server/page-converter.mjs +420 -79
- package/dist/server/prebuild.mjs +1 -1
- package/dist/server/rendering/server.mjs +3071 -1289
- package/dist/server/rendering.mjs +3169 -1350
- package/dist/server/routing.mjs +1085 -159
- package/dist/server/server.mjs +1042 -291
- package/dist/server/theme-bridge.mjs +1658 -137
- package/dist/server/theme.mjs +6 -4
- package/dist/styles/index.css +186 -65
- package/package.json +2 -1
package/dist/_dts/blocks/src/system/runtime/nodes/events/shared/eventCollectionContract.d.ts
CHANGED
|
@@ -94,8 +94,8 @@ export declare const eventCollectionFilterSourceSchemaShape: {
|
|
|
94
94
|
readonly showVenueFilter: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
|
|
95
95
|
readonly showStaffFilter: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
|
|
96
96
|
readonly eventSurface: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
|
|
97
|
-
custom: "custom";
|
|
98
97
|
all: "all";
|
|
98
|
+
custom: "custom";
|
|
99
99
|
regularClassSchedule: "regularClassSchedule";
|
|
100
100
|
specialDatedEvents: "specialDatedEvents";
|
|
101
101
|
}>>>;
|
|
@@ -140,8 +140,8 @@ export declare const eventCollectionSourceSchemaShape: {
|
|
|
140
140
|
readonly showVenueFilter: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
|
|
141
141
|
readonly showStaffFilter: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
|
|
142
142
|
readonly eventSurface: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
|
|
143
|
-
custom: "custom";
|
|
144
143
|
all: "all";
|
|
144
|
+
custom: "custom";
|
|
145
145
|
regularClassSchedule: "regularClassSchedule";
|
|
146
146
|
specialDatedEvents: "specialDatedEvents";
|
|
147
147
|
}>>>;
|
|
@@ -488,11 +488,15 @@ export declare const eventCollectionSourceSchemaShape: {
|
|
|
488
488
|
series_archived: "series_archived";
|
|
489
489
|
parent_archived: "parent_archived";
|
|
490
490
|
parent_inconsistent: "parent_inconsistent";
|
|
491
|
-
not_public: "not_public";
|
|
492
491
|
already_started: "already_started";
|
|
493
492
|
enrollment_closed: "enrollment_closed";
|
|
494
493
|
}>;
|
|
495
494
|
}, z.core.$strip>], "kind">;
|
|
495
|
+
bookingClosedDetail: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
496
|
+
kind: z.ZodLiteral<"opensSoon">;
|
|
497
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
498
|
+
kind: z.ZodLiteral<"paused">;
|
|
499
|
+
}, z.core.$strip>], "kind">>;
|
|
496
500
|
deliveryMode: z.ZodEnum<{
|
|
497
501
|
in_person: "in_person";
|
|
498
502
|
online: "online";
|
|
@@ -973,11 +977,15 @@ export declare const eventCollectionSourceSchemaShape: {
|
|
|
973
977
|
series_archived: "series_archived";
|
|
974
978
|
parent_archived: "parent_archived";
|
|
975
979
|
parent_inconsistent: "parent_inconsistent";
|
|
976
|
-
not_public: "not_public";
|
|
977
980
|
already_started: "already_started";
|
|
978
981
|
enrollment_closed: "enrollment_closed";
|
|
979
982
|
}>;
|
|
980
983
|
}, z.core.$strip>], "kind">;
|
|
984
|
+
bookingClosedDetail: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
985
|
+
kind: z.ZodLiteral<"opensSoon">;
|
|
986
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
987
|
+
kind: z.ZodLiteral<"paused">;
|
|
988
|
+
}, z.core.$strip>], "kind">>;
|
|
981
989
|
deliveryMode: z.ZodEnum<{
|
|
982
990
|
in_person: "in_person";
|
|
983
991
|
online: "online";
|
|
@@ -1519,11 +1527,15 @@ export declare const eventCollectionDisplaySchemaShape: {
|
|
|
1519
1527
|
series_archived: "series_archived";
|
|
1520
1528
|
parent_archived: "parent_archived";
|
|
1521
1529
|
parent_inconsistent: "parent_inconsistent";
|
|
1522
|
-
not_public: "not_public";
|
|
1523
1530
|
already_started: "already_started";
|
|
1524
1531
|
enrollment_closed: "enrollment_closed";
|
|
1525
1532
|
}>;
|
|
1526
1533
|
}, z.core.$strip>], "kind">;
|
|
1534
|
+
bookingClosedDetail: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
1535
|
+
kind: z.ZodLiteral<"opensSoon">;
|
|
1536
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1537
|
+
kind: z.ZodLiteral<"paused">;
|
|
1538
|
+
}, z.core.$strip>], "kind">>;
|
|
1527
1539
|
deliveryMode: z.ZodEnum<{
|
|
1528
1540
|
in_person: "in_person";
|
|
1529
1541
|
online: "online";
|
|
@@ -2004,11 +2016,15 @@ export declare const eventCollectionDisplaySchemaShape: {
|
|
|
2004
2016
|
series_archived: "series_archived";
|
|
2005
2017
|
parent_archived: "parent_archived";
|
|
2006
2018
|
parent_inconsistent: "parent_inconsistent";
|
|
2007
|
-
not_public: "not_public";
|
|
2008
2019
|
already_started: "already_started";
|
|
2009
2020
|
enrollment_closed: "enrollment_closed";
|
|
2010
2021
|
}>;
|
|
2011
2022
|
}, z.core.$strip>], "kind">;
|
|
2023
|
+
bookingClosedDetail: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
2024
|
+
kind: z.ZodLiteral<"opensSoon">;
|
|
2025
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
2026
|
+
kind: z.ZodLiteral<"paused">;
|
|
2027
|
+
}, z.core.$strip>], "kind">>;
|
|
2012
2028
|
deliveryMode: z.ZodEnum<{
|
|
2013
2029
|
in_person: "in_person";
|
|
2014
2030
|
online: "online";
|
|
@@ -2213,8 +2229,8 @@ export declare const eventCollectionDisplaySchemaShape: {
|
|
|
2213
2229
|
readonly showVenueFilter: z.ZodBoolean;
|
|
2214
2230
|
readonly showStaffFilter: z.ZodBoolean;
|
|
2215
2231
|
readonly eventSurface: z.ZodEnum<{
|
|
2216
|
-
custom: "custom";
|
|
2217
2232
|
all: "all";
|
|
2233
|
+
custom: "custom";
|
|
2218
2234
|
regularClassSchedule: "regularClassSchedule";
|
|
2219
2235
|
specialDatedEvents: "specialDatedEvents";
|
|
2220
2236
|
}>;
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { type MailingListSignupSourceRef } from '../../../../../core/src/index';
|
|
2
|
+
export type NewsletterBlockSubmission = Readonly<{
|
|
3
|
+
tag: 'ready';
|
|
4
|
+
sourceRef: Extract<MailingListSignupSourceRef, {
|
|
5
|
+
tag: 'block_ref';
|
|
6
|
+
}>;
|
|
7
|
+
}> | Readonly<{
|
|
8
|
+
tag: 'unpublished-form';
|
|
9
|
+
}> | Readonly<{
|
|
10
|
+
tag: 'unpublished-settings';
|
|
11
|
+
}> | Readonly<{
|
|
12
|
+
tag: 'unavailable';
|
|
13
|
+
}>;
|
|
14
|
+
type BlockPlacement = Readonly<{
|
|
15
|
+
blockId: string | null;
|
|
16
|
+
selectedContentVersionId: string | null;
|
|
17
|
+
publishedPlacement: Readonly<{
|
|
18
|
+
id: string;
|
|
19
|
+
content: Record<string, unknown>;
|
|
20
|
+
}> | null;
|
|
21
|
+
renderedContent: Record<string, unknown>;
|
|
22
|
+
stage: 'published' | 'preview' | undefined;
|
|
23
|
+
}>;
|
|
24
|
+
/** Authorise one block source for both public and preview rendering. */
|
|
25
|
+
export declare function planNewsletterBlockSubmission(placement: BlockPlacement): NewsletterBlockSubmission;
|
|
26
|
+
type PreviewPlacement = Readonly<{
|
|
27
|
+
blockId: string | null;
|
|
28
|
+
publishedContentId: string | null;
|
|
29
|
+
renderedContent: Record<string, unknown>;
|
|
30
|
+
publishedContent: Record<string, unknown> | null;
|
|
31
|
+
}>;
|
|
32
|
+
/** Decide whether the visible draft can safely cite the published placement. */
|
|
33
|
+
export declare function planNewsletterPreviewSubmission(placement: PreviewPlacement): Exclude<NewsletterBlockSubmission, {
|
|
34
|
+
tag: 'unavailable';
|
|
35
|
+
}>;
|
|
36
|
+
export {};
|
|
@@ -31,7 +31,12 @@ export type NewsletterFormHydrationTarget = Readonly<{
|
|
|
31
31
|
sourceRef: MailingListSignupSignedSourceRef;
|
|
32
32
|
}> | Readonly<{
|
|
33
33
|
tag: 'preview';
|
|
34
|
+
}> | Readonly<{
|
|
35
|
+
tag: 'unpublished-preview';
|
|
36
|
+
reason: 'unpublished-form' | 'unpublished-settings';
|
|
34
37
|
}>;
|
|
38
|
+
export declare const NEWSLETTER_SIGNUPS_PAUSED_MESSAGE = "We can\u2019t accept signups right now. Please try again later.";
|
|
39
|
+
export declare function newsletterBlockSubmissionMessage(target: NewsletterFormHydrationTarget): string | null;
|
|
35
40
|
type MailingListSignupBlockSourceRef = Extract<MailingListSignupSourceRef, {
|
|
36
41
|
tag: 'block_ref';
|
|
37
42
|
}>;
|
|
@@ -42,7 +47,7 @@ type NewsletterIslandMeta = Readonly<{
|
|
|
42
47
|
siteId?: string;
|
|
43
48
|
apiBaseUrl?: string;
|
|
44
49
|
}>;
|
|
45
|
-
export declare function buildNewsletterDisplay(source: NewsletterFormSourceProps): NewsletterFormDisplay;
|
|
50
|
+
export declare function buildNewsletterDisplay(source: Pick<NewsletterFormSourceProps, 'source' | 'mailingList' | 'targeting' | 'buttonVariant' | 'className'>): NewsletterFormDisplay;
|
|
46
51
|
export type NewsletterFormInteractiveIslandProps = InteractiveIslandProps<NewsletterIslandMeta, 'newsletter-form', typeof newsletterFormBlockRuntime>;
|
|
47
52
|
export declare const newsletterFormBlockRuntime: Readonly<{
|
|
48
53
|
kind: "progressive";
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { NewsletterButtonVariant, NewsletterFieldDef } from './newsletter-form.types';
|
|
3
|
+
/**
|
|
4
|
+
* Newsletter form pieces shared by the SSR render and the hydrated island, so
|
|
5
|
+
* both produce the same markup.
|
|
6
|
+
*
|
|
7
|
+
* Labels are visually hidden: every field has a placeholder, and a visible
|
|
8
|
+
* "Email *" label over a single field reads like a generic form. Screen
|
|
9
|
+
* readers still get the label.
|
|
10
|
+
*/
|
|
11
|
+
export declare const TOPIC_CHOICE_FIELD_ID = "mailingListChoice";
|
|
12
|
+
type FieldState = Readonly<{
|
|
13
|
+
disabled?: boolean;
|
|
14
|
+
error?: string | null;
|
|
15
|
+
}>;
|
|
16
|
+
/** Splits the preset's fields into the email (joined with the button) and the rest. */
|
|
17
|
+
export declare function partitionNewsletterFields(fields: readonly NewsletterFieldDef[]): Readonly<{
|
|
18
|
+
email: NewsletterFieldDef | null;
|
|
19
|
+
extra: readonly NewsletterFieldDef[];
|
|
20
|
+
}>;
|
|
21
|
+
export declare function NewsletterExtraField({ field, disabled, error, }: Readonly<{
|
|
22
|
+
field: NewsletterFieldDef;
|
|
23
|
+
}> & FieldState): React.ReactElement;
|
|
24
|
+
/** The email field and submit button sharing one input-styled shell. */
|
|
25
|
+
export declare function NewsletterEmailEntry({ field, buttonVariant, buttonLabel, disabled, error, }: Readonly<{
|
|
26
|
+
field: NewsletterFieldDef;
|
|
27
|
+
buttonVariant: NewsletterButtonVariant;
|
|
28
|
+
buttonLabel: string;
|
|
29
|
+
}> & FieldState): React.ReactElement;
|
|
30
|
+
/**
|
|
31
|
+
* The submit action: joined to the email field when the preset has one
|
|
32
|
+
* (every current preset does), otherwise a plain themed button.
|
|
33
|
+
*/
|
|
34
|
+
export declare function NewsletterSubmitRow({ emailField, buttonVariant, buttonLabel, disabled, error, }: Readonly<{
|
|
35
|
+
emailField: NewsletterFieldDef | null;
|
|
36
|
+
buttonVariant: NewsletterButtonVariant;
|
|
37
|
+
buttonLabel: string;
|
|
38
|
+
}> & FieldState): React.ReactElement;
|
|
39
|
+
/** Visitor-chosen topics as toggle chips. Real checkboxes underneath. */
|
|
40
|
+
export declare function NewsletterTopicChips({ choices, disabled, error, }: Readonly<{
|
|
41
|
+
choices: readonly Readonly<{
|
|
42
|
+
id: string;
|
|
43
|
+
label: string;
|
|
44
|
+
}>[];
|
|
45
|
+
}> & FieldState): React.ReactElement;
|
|
46
|
+
export {};
|
|
@@ -18,12 +18,31 @@ export type NewsletterFormSubmissionFields = Readonly<{
|
|
|
18
18
|
phone?: string;
|
|
19
19
|
honeypot: string;
|
|
20
20
|
}>;
|
|
21
|
+
/**
|
|
22
|
+
* Why the form refused to send, before any request was made. Visitors see one
|
|
23
|
+
* neutral message for all of these; the reason is for whoever is debugging.
|
|
24
|
+
*
|
|
25
|
+
* - `missing_block_source`: a page block hydrated without a content version
|
|
26
|
+
* to submit against, so the API could not verify the placement.
|
|
27
|
+
* - `preview_only_source`: the footer editor's live widget, which renders
|
|
28
|
+
* unsaved composition state and has nothing published to record against.
|
|
29
|
+
* - `setup_not_configured`: no mailing-list setup reached the block.
|
|
30
|
+
* - `destination_unavailable`: the setup is there but the placement's
|
|
31
|
+
* destination (default list, custom targeting) is not in it.
|
|
32
|
+
* - `choices_unusable`: the offered topic choices no longer fit the provider.
|
|
33
|
+
*/
|
|
34
|
+
export type NewsletterSignupRefusalReason = 'missing_block_source' | 'preview_only_source' | 'setup_not_configured' | 'destination_unavailable' | 'choices_unusable';
|
|
21
35
|
export type NewsletterSubmitTargetResolution = Readonly<{
|
|
22
36
|
tag: 'ready';
|
|
23
37
|
sourceRef: MailingListSignupSourceRef;
|
|
24
38
|
}> | Readonly<{
|
|
25
39
|
tag: 'unavailable';
|
|
26
|
-
reason: 'missing_block_source'
|
|
40
|
+
reason: Extract<NewsletterSignupRefusalReason, 'missing_block_source' | 'preview_only_source'>;
|
|
27
41
|
}>;
|
|
42
|
+
/**
|
|
43
|
+
* Logs a refusal with its reason so a QA session can tell the cases apart in
|
|
44
|
+
* the console, since the visitor-facing copy deliberately does not.
|
|
45
|
+
*/
|
|
46
|
+
export declare function reportNewsletterSignupRefusal(reason: NewsletterSignupRefusalReason, detail?: Readonly<Record<string, unknown>>): void;
|
|
28
47
|
export declare function mapNewsletterFormFieldsToSubscriberInput(fields: NewsletterFormRawSubmissionFields): NewsletterFormSubmissionFields;
|
|
29
48
|
export declare function resolveNewsletterSubmitTarget(input: NewsletterFormHydrationTarget): NewsletterSubmitTargetResolution;
|
|
@@ -5,6 +5,7 @@
|
|
|
5
5
|
*/
|
|
6
6
|
import type { MailingListGlobalForm, MailingListPlacementTargeting, MailingListRuntimeContext, MailingListSignupSourceRef } from '../../../../../core/src/index';
|
|
7
7
|
import type { BlockButtonRole } from '../../constants/buttonRoles';
|
|
8
|
+
import type { NewsletterBlockSubmission } from './newsletter-form.block-submission';
|
|
8
9
|
export type NewsletterPreset = MailingListGlobalForm['fields']['preset'];
|
|
9
10
|
export type NewsletterFieldDef = {
|
|
10
11
|
id: string;
|
|
@@ -33,7 +34,7 @@ type NewsletterFormCommonProps = {
|
|
|
33
34
|
type BlockNewsletterFormSource = Readonly<{
|
|
34
35
|
source: 'block';
|
|
35
36
|
blockId?: string | null;
|
|
36
|
-
|
|
37
|
+
newsletterBlockSubmission: NewsletterBlockSubmission;
|
|
37
38
|
}>;
|
|
38
39
|
type SignedFooterNewsletterFormSource = Readonly<{
|
|
39
40
|
source: 'signed-footer';
|
|
@@ -4,6 +4,7 @@ import { bindingSchema } from "../node";
|
|
|
4
4
|
import { type ThemeTokens } from "../theme";
|
|
5
5
|
import type { TransformRegistry, RouteMap, PageIdentifierMap, EntryIdentifierMap } from "../transforms";
|
|
6
6
|
import type { ResolveImageUrlContext } from "./nodes/media";
|
|
7
|
+
import type { NewsletterBlockSubmission } from './nodes/newsletter-form.block-submission';
|
|
7
8
|
export type ViewModel = Record<string, unknown>;
|
|
8
9
|
export type ComponentRegistry = Record<string, React.ElementType>;
|
|
9
10
|
export type PreviewTextFieldConstraints = Readonly<{
|
|
@@ -30,7 +31,7 @@ export type ResolverContext = {
|
|
|
30
31
|
entriesByIdentifier?: EntryIdentifierMap;
|
|
31
32
|
pathBase?: string;
|
|
32
33
|
blockId?: string | null;
|
|
33
|
-
|
|
34
|
+
newsletterBlockSubmission?: NewsletterBlockSubmission;
|
|
34
35
|
blockKind?: string;
|
|
35
36
|
blockContent?: unknown;
|
|
36
37
|
blockBindings?: Record<string, unknown>;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
type CheckboxChoiceProps = Omit<React.InputHTMLAttributes<HTMLInputElement>, 'type' | 'className'> & Readonly<{
|
|
3
|
+
label: React.ReactNode;
|
|
4
|
+
/**
|
|
5
|
+
* `row` for options and plain checkbox fields. `tile` for agreements the
|
|
6
|
+
* customer must accept (booking consent, consent fields): a bordered,
|
|
7
|
+
* fully clickable panel that tints when ticked.
|
|
8
|
+
*/
|
|
9
|
+
presentation?: 'row' | 'tile';
|
|
10
|
+
className?: string;
|
|
11
|
+
}>;
|
|
12
|
+
/**
|
|
13
|
+
* The customer-facing checkbox every block renders. Styling comes from the
|
|
14
|
+
* theme's input CSS (`.form-check`, `.form-checkbox`), so it follows each
|
|
15
|
+
* site's input colours, borders and corners.
|
|
16
|
+
*/
|
|
17
|
+
export declare function CheckboxChoice({ label, presentation, className, ...inputProps }: CheckboxChoiceProps): React.ReactElement;
|
|
18
|
+
export {};
|
|
@@ -21,6 +21,7 @@ export { useUISelector } from './ui/useUISelector';
|
|
|
21
21
|
export { EditorUiStoreProvider, useEditorUiStore, useEditorUiStoreInstance, useOptionalEditorUiStoreInstance, createEditorUiStore, } from './ui/editorUiStore';
|
|
22
22
|
export type { ActivePreviewField, EditorUiStoreInstance, EditorUiState, EditorPreviewInspectorStore, EditorLinkedEntrySnapshot, PreviewDesignRow, PreviewDesignOpenRequest, PreviewEditorOpenIntent, PreviewInspection, PreviewSidebarTab, ViewportMode, ViewportWidth, ViewportState, ZoomLevel, } from './ui/editorUiStore';
|
|
23
23
|
export { PreviewTextEditor } from './primitives/PreviewTextEditor';
|
|
24
|
+
export { PREVIEW_EDITABLE_OUTLINE, PREVIEW_EDITABLE_OUTLINE_OFFSET, } from './primitives/previewEditableOutline';
|
|
24
25
|
export { PreviewInlineTextEditor } from './primitives/PreviewInlineTextEditor';
|
|
25
26
|
export { PreviewRichTextEditor } from './primitives/PreviewRichTextEditor';
|
|
26
27
|
export { recordsEqual as editorValuesEqual } from './ui/stores/utils';
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import type { NormalizedEditorBlockItem } from './editorSnapshot';
|
|
2
|
+
export declare function normalizedBlockEqual(left: NormalizedEditorBlockItem, right: NormalizedEditorBlockItem): boolean;
|
|
3
|
+
export declare function normalizedBlocksEqual(left: readonly NormalizedEditorBlockItem[], right: readonly NormalizedEditorBlockItem[]): boolean;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { unsafeAsEditorBlockId, unsafeAsEditorBlockValues, unsafeAsEditorContentValues, unsafeAsEditorEntryId, unsafeAsEditorMetadataValues, unsafeAsEditorPageId, unsafeAsEditorSiteId, type EditorBlockBaselineInput, type EditorBlockId, type EditorBlockPublishedBaselineInput, type EditorDraftBlockBaselineUpdateMetaInput, type EditorDraftBlockInitMetaInput, type EditorBlockValues, type EditorContentValues, type EditorEntryId, type EditorMetadataValues, type EditorPageId, type EditorPersistedBlock, type EditorSiteId, type EditorStructuralCommand, type EditorStructuralDraftSnapshot, type EditorSyncState, type EditorValueRecord } from '../../../core/src/index';
|
|
1
|
+
import { unsafeAsEditorBlockId, unsafeAsEditorBlockValues, unsafeAsEditorContentValues, unsafeAsEditorEntryId, unsafeAsEditorMetadataValues, unsafeAsEditorPageId, unsafeAsEditorSiteId, type EditorBlockBaselineInput, type EditorBlockId, type EditorBlockPublishedBaselineInput, type EditorDraftBlockBaselineUpdateMetaInput, type EditorDraftBlockInitMetaInput, type EditorBlockValues, type EditorContentValues, type EditorEntryId, type EditorMetadataValues, type EditorPageId, type EditorPersistedBlock, type BlockContentIdentity, type EditorSiteId, type EditorStructuralCommand, type EditorStructuralDraftSnapshot, type EditorSyncState, type EditorValueRecord } from '../../../core/src/index';
|
|
2
2
|
import { type LinkedContentEntryId, type LinkedContentTypeKey } from '../linkedEntries/domain';
|
|
3
3
|
export { unsafeAsEditorBlockId, unsafeAsEditorBlockValues, unsafeAsEditorContentValues, unsafeAsEditorEntryId, unsafeAsEditorMetadataValues, unsafeAsEditorPageId, unsafeAsEditorSiteId, type EditorBlockId, type EditorBlockValues, type EditorContentValues, type EditorEntryId, type EditorMetadataValues, type EditorPageId, type EditorSiteId, };
|
|
4
4
|
export type EditorCommand = {
|
|
@@ -119,7 +119,7 @@ export type DraftBlockInitMetaInput = EditorDraftBlockInitMetaInput;
|
|
|
119
119
|
export type DraftBlockBaselineUpdateMetaInput = EditorDraftBlockBaselineUpdateMetaInput;
|
|
120
120
|
export type DraftBlockBaselineInput = EditorBlockBaselineInput;
|
|
121
121
|
export type BlockPublishedBaselineInput = EditorBlockPublishedBaselineInput;
|
|
122
|
-
export type EditorBlockItem = Readonly<{
|
|
122
|
+
export type EditorBlockItem = Partial<BlockContentIdentity> & Readonly<{
|
|
123
123
|
id?: string | null;
|
|
124
124
|
kind: string;
|
|
125
125
|
content?: EditorValueRecord | null;
|
|
@@ -130,7 +130,7 @@ export type EditorBlockItem = Readonly<{
|
|
|
130
130
|
purpose?: string | null;
|
|
131
131
|
optimisticHash?: string | null;
|
|
132
132
|
}>;
|
|
133
|
-
type NormalizedEditorBlockBase = Readonly<{
|
|
133
|
+
type NormalizedEditorBlockBase = BlockContentIdentity & Readonly<{
|
|
134
134
|
kind: string;
|
|
135
135
|
content: EditorBlockValues | null;
|
|
136
136
|
orderIndex: number | null;
|
|
@@ -10,6 +10,7 @@ declare const BaseContentFieldSchema: z.ZodObject<{
|
|
|
10
10
|
link: "link";
|
|
11
11
|
date: "date";
|
|
12
12
|
text: "text";
|
|
13
|
+
group: "group";
|
|
13
14
|
url: "url";
|
|
14
15
|
textarea: "textarea";
|
|
15
16
|
select: "select";
|
|
@@ -17,7 +18,6 @@ declare const BaseContentFieldSchema: z.ZodObject<{
|
|
|
17
18
|
reference: "reference";
|
|
18
19
|
repeater: "repeater";
|
|
19
20
|
file: "file";
|
|
20
|
-
group: "group";
|
|
21
21
|
datetime: "datetime";
|
|
22
22
|
button: "button";
|
|
23
23
|
richText: "richText";
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The one grouping authority for appointment-service categories (issue 1403).
|
|
3
|
+
*
|
|
4
|
+
* Every surface that shows services by category — the public services list,
|
|
5
|
+
* the booking selector, the dashboard Services page and the CSV export — goes
|
|
6
|
+
* through `layoutServicesByCategory` rather than deciding grouping itself.
|
|
7
|
+
*
|
|
8
|
+
* Ordering is not decided here. The database owns it (category `sort_order`,
|
|
9
|
+
* then service `sort_order` within its group, with title and id as
|
|
10
|
+
* tie-breakers) and the reads hand both lists over already ordered. This
|
|
11
|
+
* module only buckets, and it preserves input order inside every bucket, so a
|
|
12
|
+
* client never re-sorts into an order the reorder compare-and-swap would not
|
|
13
|
+
* recognise.
|
|
14
|
+
*/
|
|
15
|
+
/** What a visitor may know about a category: its heading and optional intro. */
|
|
16
|
+
export type ServiceCategorySummary = Readonly<{
|
|
17
|
+
id: string;
|
|
18
|
+
name: string;
|
|
19
|
+
description: string | null;
|
|
20
|
+
}>;
|
|
21
|
+
/** Anything carrying the category it belongs to; null is the "Other" group. */
|
|
22
|
+
export type CategorizedService = Readonly<{
|
|
23
|
+
categoryId: string | null;
|
|
24
|
+
}>;
|
|
25
|
+
export type ServiceCategoryGroup<TService, TCategory extends Readonly<{
|
|
26
|
+
id: string;
|
|
27
|
+
}> = ServiceCategorySummary> = Readonly<{
|
|
28
|
+
category: TCategory;
|
|
29
|
+
services: readonly TService[];
|
|
30
|
+
}>;
|
|
31
|
+
/**
|
|
32
|
+
* `uncategorized-site` means there is nothing to group by, so the list stays
|
|
33
|
+
* flat exactly as before categories existed. That is when the site has **no
|
|
34
|
+
* categories at all**, decided by the category list and never inferred from
|
|
35
|
+
* which categories the services happen to reference. On public surfaces
|
|
36
|
+
* (`keepEmptyGroups: false`) it is also when no category has any of the
|
|
37
|
+
* listed services, so visitors never see a lone "Other" heading (W20).
|
|
38
|
+
*
|
|
39
|
+
* `categorized-site` carries the groups in category order and `other`, the
|
|
40
|
+
* uncategorised services, which always sort last. `other` may be empty:
|
|
41
|
+
* whether an empty Other is shown is the caller's decision (the public list
|
|
42
|
+
* omits it, the dashboard always shows it).
|
|
43
|
+
*/
|
|
44
|
+
export type ServiceCategoryLayout<TService, TCategory extends Readonly<{
|
|
45
|
+
id: string;
|
|
46
|
+
}> = ServiceCategorySummary> = Readonly<{
|
|
47
|
+
kind: 'uncategorized-site';
|
|
48
|
+
services: readonly TService[];
|
|
49
|
+
}> | Readonly<{
|
|
50
|
+
kind: 'categorized-site';
|
|
51
|
+
groups: readonly ServiceCategoryGroup<TService, TCategory>[];
|
|
52
|
+
other: readonly TService[];
|
|
53
|
+
}>;
|
|
54
|
+
export type LayoutServicesByCategoryOptions = Readonly<{
|
|
55
|
+
/**
|
|
56
|
+
* Public surfaces drop categories with no services. The dashboard keeps
|
|
57
|
+
* them so it can show "No services in this category yet".
|
|
58
|
+
*/
|
|
59
|
+
keepEmptyGroups: boolean;
|
|
60
|
+
}>;
|
|
61
|
+
/**
|
|
62
|
+
* Groups services under their categories.
|
|
63
|
+
*
|
|
64
|
+
* A service whose `categoryId` names no category in `categories` lands in
|
|
65
|
+
* Other. The composite foreign key keeps that from happening with stored data,
|
|
66
|
+
* so this is only the total, safe answer for a caller holding a stale list.
|
|
67
|
+
*/
|
|
68
|
+
export declare function layoutServicesByCategory<TService extends CategorizedService, TCategory extends Readonly<{
|
|
69
|
+
id: string;
|
|
70
|
+
}>>(categories: readonly TCategory[], services: readonly TService[], options: LayoutServicesByCategoryOptions): ServiceCategoryLayout<TService, TCategory>;
|
|
71
|
+
/** The services in display order: each group in turn, then Other. */
|
|
72
|
+
export declare function flattenServiceCategoryLayout<TService, TCategory extends Readonly<{
|
|
73
|
+
id: string;
|
|
74
|
+
}>>(layout: ServiceCategoryLayout<TService, TCategory>): TService[];
|
|
75
|
+
/**
|
|
76
|
+
* What a block filtered to (at most) one category should show.
|
|
77
|
+
*
|
|
78
|
+
* - `all`: no filter is set, so every non-empty group shows, Other last.
|
|
79
|
+
* - `single`: the filter names one of the site's categories. The group can be
|
|
80
|
+
* empty, which the caller renders as its empty state.
|
|
81
|
+
* - `fallback-all`: the filter names a category the site no longer has (it was
|
|
82
|
+
* deleted), so everything shows, grouped. This is a first-class state rather
|
|
83
|
+
* than a null check so the editor can warn about it.
|
|
84
|
+
*/
|
|
85
|
+
export type ServiceCategoryView<TService, TCategory extends Readonly<{
|
|
86
|
+
id: string;
|
|
87
|
+
}> = ServiceCategorySummary> = Readonly<{
|
|
88
|
+
kind: 'all';
|
|
89
|
+
layout: ServiceCategoryLayout<TService, TCategory>;
|
|
90
|
+
}> | Readonly<{
|
|
91
|
+
kind: 'single';
|
|
92
|
+
group: ServiceCategoryGroup<TService, TCategory>;
|
|
93
|
+
}> | Readonly<{
|
|
94
|
+
kind: 'fallback-all';
|
|
95
|
+
missingCategoryId: string;
|
|
96
|
+
layout: ServiceCategoryLayout<TService, TCategory>;
|
|
97
|
+
}>;
|
|
98
|
+
/**
|
|
99
|
+
* Selects the public view for an optional category filter.
|
|
100
|
+
*
|
|
101
|
+
* It takes the category and service lists rather than a prebuilt layout
|
|
102
|
+
* because the public layout has already dropped empty categories, and then an
|
|
103
|
+
* empty category (`single` with no services) could not be told apart from a
|
|
104
|
+
* deleted one (`fallback-all`).
|
|
105
|
+
*/
|
|
106
|
+
export declare function selectCategoryView<TService extends CategorizedService, TCategory extends Readonly<{
|
|
107
|
+
id: string;
|
|
108
|
+
}>>(categories: readonly TCategory[], services: readonly TService[], filterCategoryId: string | null | undefined): ServiceCategoryView<TService, TCategory>;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { Brand } from './branded';
|
|
2
|
+
import type { BlockContentIdentity } from './block-content-identity';
|
|
2
3
|
export type EditorSiteId = Brand<string, 'EditorSiteId'>;
|
|
3
4
|
export type EditorPageId = Brand<string, 'EditorPageId'>;
|
|
4
5
|
export type EditorEntryId = Brand<string, 'EditorEntryId'>;
|
|
@@ -61,7 +62,7 @@ export type EditorBlockPublishedBaselineInput = Readonly<{
|
|
|
61
62
|
kind?: string;
|
|
62
63
|
publishedContent?: EditorBlockBaselineInput;
|
|
63
64
|
}>;
|
|
64
|
-
export type EditorPersistedBlock = Readonly<{
|
|
65
|
+
export type EditorPersistedBlock = BlockContentIdentity & Readonly<{
|
|
65
66
|
id: EditorBlockId;
|
|
66
67
|
kind: string;
|
|
67
68
|
content: EditorBlockValues | null;
|
|
@@ -18,6 +18,7 @@ export * from './booking-refunds';
|
|
|
18
18
|
export * from './booking-instalments';
|
|
19
19
|
export * from './booking-date-time';
|
|
20
20
|
export * from './booking-consent';
|
|
21
|
+
export * from './appointment-service-categories';
|
|
21
22
|
export * from './dated-offering-settlement';
|
|
22
23
|
export * from './person-records';
|
|
23
24
|
export * from './rectification';
|
|
@@ -29,6 +30,7 @@ export { tryAsync } from './try-async';
|
|
|
29
30
|
export * from './narrow-result';
|
|
30
31
|
export * from './non-empty-array';
|
|
31
32
|
export * from './editor-state';
|
|
33
|
+
export * from './block-content-identity';
|
|
32
34
|
export * from './sensitive-collection';
|
|
33
35
|
export * from './assertNever';
|
|
34
36
|
export * from './participants';
|
|
@@ -49,7 +49,9 @@ export type MailingListSignupTokenSource = Readonly<{
|
|
|
49
49
|
blockId: MailingListSdkFooterBlockId;
|
|
50
50
|
contentHash: MailingListSdkContentHash;
|
|
51
51
|
}>;
|
|
52
|
-
export declare function buildMailingListSignupBlockSourceRef(blockId: unknown, contentVersionId: unknown): MailingListSignupSourceRef
|
|
52
|
+
export declare function buildMailingListSignupBlockSourceRef(blockId: unknown, contentVersionId: unknown): Extract<MailingListSignupSourceRef, {
|
|
53
|
+
tag: 'block_ref';
|
|
54
|
+
}> | null;
|
|
53
55
|
type MailingListSignupProfileBase = Readonly<{
|
|
54
56
|
email: NormalizedSubscriberEmail;
|
|
55
57
|
phone: Readonly<{
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export type PublicEventBookingClosedReason = 'occurrence_cancelled' | 'occurrence_completed' | 'series_draft' | 'series_cancelled' | 'series_completed' | 'series_archived' | 'parent_archived' | 'parent_inconsistent' | '
|
|
1
|
+
export type PublicEventBookingClosedReason = 'occurrence_cancelled' | 'occurrence_completed' | 'series_draft' | 'series_cancelled' | 'series_completed' | 'series_archived' | 'parent_archived' | 'parent_inconsistent' | 'already_started' | 'enrollment_closed';
|
|
2
2
|
/** Public wire projection; persisted facts remain authoritative. */
|
|
3
3
|
export type PublicEventBookingAvailability = Readonly<{
|
|
4
4
|
kind: 'open';
|
|
@@ -6,3 +6,22 @@ export type PublicEventBookingAvailability = Readonly<{
|
|
|
6
6
|
kind: 'closed';
|
|
7
7
|
reason: PublicEventBookingClosedReason;
|
|
8
8
|
}>;
|
|
9
|
+
/**
|
|
10
|
+
* Why an event's own page is up while bookings are shut.
|
|
11
|
+
*
|
|
12
|
+
* `series_draft` is one reason from the booking decision's point of view, but a
|
|
13
|
+
* visitor standing on the page is owed two different sentences: an event that
|
|
14
|
+
* has never opened will open, and one that was open and was taken offline has
|
|
15
|
+
* closed. The difference is whether the unit has ever been live, which is a
|
|
16
|
+
* persisted fact the public wire deliberately does not carry as a timestamp.
|
|
17
|
+
*
|
|
18
|
+
* This refines `bookingAvailability` rather than replacing it. It is only ever
|
|
19
|
+
* present alongside a closed `series_draft`, so nothing that already reads the
|
|
20
|
+
* availability changes its mind because of it, and booking stays refused
|
|
21
|
+
* wherever it is refused today.
|
|
22
|
+
*/
|
|
23
|
+
export type PublicEventBookingClosedDetail = Readonly<{
|
|
24
|
+
kind: 'opensSoon';
|
|
25
|
+
}> | Readonly<{
|
|
26
|
+
kind: 'paused';
|
|
27
|
+
}>;
|
|
@@ -5,8 +5,10 @@ export type OpeningHoursTime = Brand<string, 'OpeningHoursTime'>;
|
|
|
5
5
|
export type PublicSocialLinkId = Brand<string, 'PublicSocialLinkId'>;
|
|
6
6
|
export declare const publicProfileWeekdays: readonly ["monday", "tuesday", "wednesday", "thursday", "friday", "saturday", "sunday"];
|
|
7
7
|
export type PublicProfileWeekday = (typeof publicProfileWeekdays)[number];
|
|
8
|
-
export declare const knownSocialPlatforms: readonly ["facebook", "instagram", "linkedin", "tiktok", "x", "youtube"];
|
|
8
|
+
export declare const knownSocialPlatforms: readonly ["facebook", "instagram", "linkedin", "tiktok", "whatsapp", "x", "youtube"];
|
|
9
9
|
export type KnownSocialPlatform = (typeof knownSocialPlatforms)[number];
|
|
10
|
+
/** How each platform is named wherever people see it (settings, composer, footer link labels). */
|
|
11
|
+
export declare const knownSocialPlatformLabels: Readonly<Record<KnownSocialPlatform, string>>;
|
|
10
12
|
export type PublicContactDetails = Readonly<{
|
|
11
13
|
kind: 'phone';
|
|
12
14
|
phone: string;
|
|
@@ -104,4 +106,13 @@ export declare function parsePublicProfile(value: unknown): Result<PublicProfile
|
|
|
104
106
|
* holds a business address for every profile saved before the switch existed.
|
|
105
107
|
*/
|
|
106
108
|
export declare function resolvePublicProfilePremises(profile: PublicProfile, hasBusinessAddress: boolean): boolean;
|
|
109
|
+
/**
|
|
110
|
+
* The contact details the site may publish: the stored contact with every
|
|
111
|
+
* hidden method removed, or null when nothing is left to show.
|
|
112
|
+
*
|
|
113
|
+
* Every public reader goes through this. The privacy policy identity is the
|
|
114
|
+
* one exception and reads the stored email directly, because a hidden email
|
|
115
|
+
* can still be the policy's contact.
|
|
116
|
+
*/
|
|
117
|
+
export declare function publishedContactDetails(profile: Pick<PublicProfile, 'contact' | 'contactVisibility'>): PublicContactDetails | null;
|
|
107
118
|
export declare function emptyPublicProfile(): PublicProfile;
|