@riverbankcms/sdk 0.140.0 → 0.142.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/dist/{PreviewEditorSidebar-CUyTzd5z.mjs → PreviewEditorSidebar-Dk6Dt11f.mjs} +24 -15
- package/dist/{PreviewEditorUI-Agkw4v5i.mjs → PreviewEditorUI-D6EQTsCA.mjs} +3 -3
- package/dist/{PreviewQueryProvider-CN0ewic5.mjs → PreviewQueryProvider-CC-EPkyQ.mjs} +1 -1
- package/dist/{SdkPreviewModeRuntime-DdbeAdS8.mjs → SdkPreviewModeRuntime-DH1n4ytY.mjs} +85 -54
- package/dist/{SiteChromeCustomizeContext-CqGOz-Kv.mjs → SiteChromeCustomizeContext-DunIzY0K.mjs} +797 -216
- package/dist/_dts/api/src/billing.d.ts +6 -1
- package/dist/_dts/api/src/bookingConfig.d.ts +1 -1
- package/dist/_dts/api/src/commercePortalEndpoints.d.ts +2 -2
- package/dist/_dts/api/src/contentRuntime.d.ts +12 -31
- package/dist/_dts/api/src/domainConnection.d.ts +4 -0
- package/dist/_dts/api/src/endpoints.d.ts +0 -27
- package/dist/_dts/api/src/footerCompositionContracts.d.ts +25 -0
- package/dist/_dts/api/src/index.d.ts +2 -2
- package/dist/_dts/api/src/launchReadiness.d.ts +1 -0
- package/dist/_dts/api/src/navigation/dashboardSiteNav.d.ts +2 -1
- package/dist/_dts/api/src/publicBookingService.d.ts +1 -0
- package/dist/_dts/api/src/sdkConfig/layout.d.ts +13 -0
- package/dist/_dts/api/src/sdkContracts.d.ts +3 -8
- package/dist/_dts/api/src/siteManagementEndpoints.d.ts +3 -26
- package/dist/_dts/api/src/siteOnboarding.d.ts +7 -0
- package/dist/_dts/api/src/sitePlatformEndpoints.d.ts +1 -31
- package/dist/_dts/api/src/siteRuntimeEndpoints.d.ts +6 -1
- package/dist/_dts/billing/src/site-arrangements.d.ts +18 -5
- package/dist/_dts/blocks/src/contracts/proof-block-islands.d.ts +4 -0
- package/dist/_dts/blocks/src/pageRendererContracts.d.ts +2 -0
- package/dist/_dts/blocks/src/system/blocks/events/event-calendar.d.ts +2 -0
- package/dist/_dts/blocks/src/system/blocks/events/eventSelectionFields.d.ts +122 -0
- package/dist/_dts/blocks/src/system/blocks/events/shared/calendarWindow.d.ts +2 -1
- package/dist/_dts/blocks/src/system/blocks/events/shared/eventSelection.d.ts +11 -0
- package/dist/_dts/blocks/src/system/blocks/events/shared/schemas.d.ts +56 -0
- package/dist/_dts/blocks/src/system/blocks/events/shared/types.d.ts +8 -0
- 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/data/prefetchBlockData.d.ts +5 -0
- package/dist/_dts/blocks/src/system/data/utils.d.ts +1 -1
- package/dist/_dts/blocks/src/system/manifest/schema.d.ts +27 -1
- package/dist/_dts/blocks/src/system/runtime/components/registry.client.d.ts +12 -180
- package/dist/_dts/blocks/src/system/runtime/components/runtime-backed-blocks.d.ts +6 -90
- package/dist/_dts/blocks/src/system/runtime/hooks/useEventFilters.d.ts +2 -1
- package/dist/_dts/blocks/src/system/runtime/nodes/appointment-services.d.ts +5 -1
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/hooks.d.ts +4 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/hooks.state.d.ts +5 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/useDiscountCodeUi.d.ts +3 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/useDiscountCodeUi.state.d.ts +10 -3
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/useEventCheckoutHandoffRestore.d.ts +9 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/useEventRegistrationWizard.d.ts +4 -5
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/useSettledCommerceView.d.ts +37 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/events/EventCombined.client.d.ts +4 -3
- package/dist/_dts/blocks/src/system/runtime/nodes/events/EventCombined.interactive.d.ts +3 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/events/EventListing.interactive.d.ts +11 -101
- package/dist/_dts/blocks/src/system/runtime/nodes/events/shared/eventCollectionContract.d.ts +63 -2
- package/dist/_dts/blocks/src/system/runtime/nodes/events/shared/listOptions.d.ts +2 -0
- package/dist/_dts/blocks/src/system/transforms/registry/eventCalendar.d.ts +12 -0
- package/dist/_dts/commerce/src/purchase/bookingInstalmentSchedule.d.ts +4 -0
- package/dist/_dts/commerce/src/purchase/stripeCommissionMetadata.d.ts +1 -2
- package/dist/_dts/db/src/generated/supabase/database.types.d.ts +3102 -3122
- package/dist/_dts/editor-blocks/src/block-editor/ColourFieldOptionsProvider.d.ts +7 -0
- package/dist/_dts/editor-blocks/src/block-editor/colourFieldVisibility.d.ts +7 -0
- package/dist/_dts/editor-blocks/src/block-editor/preparedManifest.d.ts +2 -0
- package/dist/_dts/editor-blocks/src/index.d.ts +1 -0
- package/dist/_dts/editor-blocks/src/widgets/site-option-picker/loaders.d.ts +27 -1
- package/dist/_dts/preview-next/src/client/preview/PreviewEditorSidebar.d.ts +2 -2
- package/dist/_dts/preview-next/src/client/preview/PreviewFooterEditorPanel.d.ts +3 -6
- package/dist/_dts/preview-next/src/client/preview/PreviewShell.d.ts +2 -2
- package/dist/_dts/preview-next/src/client/preview/PreviewShellLayout.d.ts +2 -2
- package/dist/_dts/preview-next/src/client/preview/footerInspection.d.ts +16 -0
- package/dist/_dts/preview-next/src/client/preview/sdkConfig.d.ts +6 -0
- package/dist/_dts/sdk/src/config/types.d.ts +2 -18
- package/dist/_dts/sdk/src/config/validation.d.ts +6 -0
- package/dist/_dts/sdk/src/public-api/contracts.d.ts +4 -1
- package/dist/_dts/sdk/src/version.d.ts +1 -1
- package/dist/_dts/theme-core/src/ThemeFontLoader.d.ts +17 -1
- package/dist/_dts/theme-core/src/buttons/affordanceSuppression.d.ts +17 -0
- package/dist/_dts/theme-core/src/buttons/buttonColourContract.d.ts +1 -1
- package/dist/_dts/theme-core/src/buttons/classNames.d.ts +16 -0
- package/dist/_dts/theme-core/src/buttons/generateButtonCss.d.ts +0 -6
- package/dist/_dts/theme-core/src/buttons/resolvedButtonCss.d.ts +4 -4
- package/dist/_dts/theme-core/src/footer/mode.d.ts +10 -1
- package/dist/_dts/theme-core/src/generated/containerResponsiveThemeCss.d.ts +1 -1
- package/dist/_dts/theme-core/src/hosted-booking-appearance.d.ts +54 -12
- package/dist/_dts/theme-core/src/index.d.ts +1 -1
- package/dist/_dts/theme-core/src/schema.d.ts +1 -7
- package/dist/_dts/theme-core/src/site-styles/effectivePageDesign.d.ts +32 -0
- package/dist/_dts/theme-core/src/site-styles/index.d.ts +1 -0
- package/dist/client/{BookingConsentAgreement-CuKa82V4.mjs → BookingConsentAgreement-CnJeq3_r.mjs} +2 -2
- package/dist/client/{DiscountCodeDisclosure-BbYieKWB.mjs → DiscountCodeDisclosure-BINEO6J9.mjs} +1 -1
- package/dist/client/{EventCombined.client-LTfR1Aby.mjs → EventCombined.client-srxNQ6sZ.mjs} +11 -15
- package/dist/client/{EventListing.client-DUHpYSuo.mjs → EventListing.client-DbyVyGkX.mjs} +4 -17
- package/dist/client/{LeafletStaticMap-CHRupL6m.mjs → LeafletStaticMap-B-wpijzL.mjs} +1 -1
- package/dist/client/{accordion-6HiIFxNL.mjs → accordion-B-iUXU7n.mjs} +1 -1
- package/dist/client/{bookingForm-Dlmid43H.mjs → bookingForm-BXYPke5q.mjs} +5 -5
- package/dist/client/bookings.mjs +194 -102
- package/dist/client/{carousel-DmkZRRq_.mjs → carousel-Cr4aj63H.mjs} +1 -1
- package/dist/client/{cart-CIC24330.mjs → cart-DibP9WWa.mjs} +3 -3
- package/dist/client/{checkout-D1Zw9imo.mjs → checkout-CrSBVnL8.mjs} +3 -3
- package/dist/client/client.mjs +643 -192
- package/dist/client/{context-Cy1OayHx.mjs → context-Ces-AgdR.mjs} +1 -1
- package/dist/client/{dates-aDcfoLHr.mjs → dates-BXyNeNhB.mjs} +2 -2
- package/dist/client/{eventCalendar-FQxMPAjf.mjs → eventCalendar-HwpPeqrH.mjs} +11 -7
- package/dist/client/{eventCombined-Dr3ac6Hb.mjs → eventCombined-BpFUkuEI.mjs} +3 -3
- package/dist/client/{eventDetails-D-AzUHFQ.mjs → eventDetails-DK_agiWy.mjs} +4 -4
- package/dist/client/{eventListing-B3XxBf3i.mjs → eventListing-DhzHqP1c.mjs} +3 -3
- package/dist/client/{eventRegistration-I6EaokFD.mjs → eventRegistration-BdQ_Dn2d.mjs} +124 -32
- package/dist/client/{form-BbWckVWY.mjs → form-B1frcuzy.mjs} +2 -2
- package/dist/client/{headerSection-C9qU4Y7x.mjs → headerSection-CT5z460s.mjs} +2 -2
- package/dist/client/hooks.mjs +274 -45
- package/dist/client/{locationMap-CLCShvlG.mjs → locationMap-CIQXB9i2.mjs} +2 -2
- package/dist/client/{newsletterForm-Briukxzi.mjs → newsletterForm-BYNYZSes.mjs} +23 -10
- package/dist/client/{pricing-Copadu-2.mjs → pricing-CbTlAsmt.mjs} +1 -1
- package/dist/client/{productDetail-oujlRd-r.mjs → productDetail-CR7Z3yjS.mjs} +3 -3
- package/dist/client/{productList-BRiIRUcd.mjs → productList-DXj00vzR.mjs} +3 -3
- package/dist/client/{propsDecoder-CB2KS_ko.mjs → propsDecoder-DiLiBdek.mjs} +57 -16
- package/dist/client/rendering/client.mjs +476 -132
- package/dist/client/rendering/islands.mjs +17 -17
- package/dist/client/rendering.mjs +686 -195
- package/dist/client/{scrollToBlock-B1IS1_ua.mjs → scrollToBlock-CrcbBf0h.mjs} +28 -11
- package/dist/client/{shop-Vn6yNFED.mjs → shop-DgqiB_1b.mjs} +6 -6
- package/dist/client/{shop-commerce-BVTqipYp.mjs → shop-commerce-D_J781in.mjs} +5 -5
- package/dist/client/{shop-commerce-store-BVnJVy7v.mjs → shop-commerce-store-PGUbDwqe.mjs} +1 -1
- package/dist/client/{shopShared-COIeK77T.mjs → shopShared-C_Bb2zwG.mjs} +3 -3
- package/dist/client/{useEventFilters-DzIUcS9n.mjs → useEventFilters-CM17Xpr1.mjs} +17 -11
- package/dist/preview-next/before-render.mjs +0 -37
- package/dist/preview-next/client/runtime.mjs +4 -4
- package/dist/preview-next/editor-chrome.css +4 -8
- package/dist/preview-next/keepAlive.mjs +0 -37
- package/dist/preview-next/middleware.mjs +0 -37
- package/dist/{previewAuthStore-Gjb6r6vz.mjs → previewAuthStore-oVttoRDO.mjs} +0 -37
- package/dist/{sdk-runtime-CnCLvZRv.mjs → sdk-runtime-DhmuRhIX.mjs} +2 -2
- package/dist/{separator-DKDRJ1oH.mjs → separator-C3hlg9LH.mjs} +1 -1
- package/dist/server/components.mjs +452 -111
- package/dist/server/config-validation.mjs +263 -40
- package/dist/server/config.mjs +263 -40
- package/dist/server/data.mjs +274 -45
- package/dist/server/index.mjs +1 -38
- package/dist/server/next.mjs +427 -119
- package/dist/server/page-converter.mjs +208 -33
- package/dist/server/prebuild.mjs +1 -1
- package/dist/server/rendering/server.mjs +467 -119
- package/dist/server/rendering.mjs +467 -117
- package/dist/server/routing.mjs +301 -50
- package/dist/server/server.mjs +275 -83
- package/dist/server/theme-bridge.mjs +57 -23
- package/dist/server/theme.mjs +11 -9
- package/dist/styles/index.css +28 -2
- package/package.json +1 -1
|
@@ -1650,30 +1650,30 @@ function parseMailingListPlacementTargeting(value) {
|
|
|
1650
1650
|
}
|
|
1651
1651
|
}
|
|
1652
1652
|
function parseMailingListVisitorSelection(value) {
|
|
1653
|
-
if (!isRecord$26(value)) return visitorSelectionError("shape");
|
|
1653
|
+
if (!isRecord$26(value)) return visitorSelectionError$1("shape");
|
|
1654
1654
|
switch (value.provider) {
|
|
1655
1655
|
case "native": {
|
|
1656
1656
|
const topicIds = parseVisitorIds(value.topicIds, parseNewsletterListId);
|
|
1657
|
-
return topicIds === null ? visitorSelectionError("targets") : ok$2({
|
|
1657
|
+
return topicIds === null ? visitorSelectionError$1("targets") : ok$2({
|
|
1658
1658
|
provider: "native",
|
|
1659
1659
|
topicIds
|
|
1660
1660
|
});
|
|
1661
1661
|
}
|
|
1662
1662
|
case "brevo": {
|
|
1663
1663
|
const listIds = parseVisitorIds(value.listIds, parseBrevoListId);
|
|
1664
|
-
return listIds === null ? visitorSelectionError("targets") : ok$2({
|
|
1664
|
+
return listIds === null ? visitorSelectionError$1("targets") : ok$2({
|
|
1665
1665
|
provider: "brevo",
|
|
1666
1666
|
listIds
|
|
1667
1667
|
});
|
|
1668
1668
|
}
|
|
1669
1669
|
case "mailchimp": {
|
|
1670
1670
|
const interestIds = parseVisitorIds(value.interestIds, parseMailchimpInterestId);
|
|
1671
|
-
return interestIds === null ? visitorSelectionError("targets") : ok$2({
|
|
1671
|
+
return interestIds === null ? visitorSelectionError$1("targets") : ok$2({
|
|
1672
1672
|
provider: "mailchimp",
|
|
1673
1673
|
interestIds
|
|
1674
1674
|
});
|
|
1675
1675
|
}
|
|
1676
|
-
default: return visitorSelectionError("provider");
|
|
1676
|
+
default: return visitorSelectionError$1("provider");
|
|
1677
1677
|
}
|
|
1678
1678
|
}
|
|
1679
1679
|
function parseNativeTargeting(selection) {
|
|
@@ -1792,7 +1792,7 @@ function targetingError(field) {
|
|
|
1792
1792
|
field
|
|
1793
1793
|
});
|
|
1794
1794
|
}
|
|
1795
|
-
function visitorSelectionError(field) {
|
|
1795
|
+
function visitorSelectionError$1(field) {
|
|
1796
1796
|
return err$2({
|
|
1797
1797
|
tag: "invalid_mailing_list_visitor_selection",
|
|
1798
1798
|
field
|
|
@@ -3327,7 +3327,10 @@ var init_contentMediaSnapshotAudit = __esmMin((() => {
|
|
|
3327
3327
|
init_contentMediaAudit();
|
|
3328
3328
|
init_contentMediaAuditFieldAdapter();
|
|
3329
3329
|
init_identifiers();
|
|
3330
|
-
}))
|
|
3330
|
+
}));
|
|
3331
|
+
//#endregion
|
|
3332
|
+
//#region ../media-core/src/index.ts
|
|
3333
|
+
var init_src$1 = __esmMin((() => {
|
|
3331
3334
|
init_types$15();
|
|
3332
3335
|
init_fileDomain();
|
|
3333
3336
|
init_fileStorage();
|
|
@@ -3378,6 +3381,14 @@ var init_contentMediaSnapshotAudit = __esmMin((() => {
|
|
|
3378
3381
|
init_contentMediaAudit();
|
|
3379
3382
|
init_contentMediaAuditFieldAdapter();
|
|
3380
3383
|
init_contentMediaSnapshotAudit();
|
|
3384
|
+
}));
|
|
3385
|
+
var footerModeSchema, init_mode = __esmMin((() => {
|
|
3386
|
+
footerModeSchema = z.enum([
|
|
3387
|
+
"default",
|
|
3388
|
+
"blocks",
|
|
3389
|
+
"default+blocks",
|
|
3390
|
+
"none"
|
|
3391
|
+
]);
|
|
3381
3392
|
})), hotspotSchema, rotationSchema, rectSchema, aspectCropSchema, transformSchema, mediaPosterSchema, mediaBaseSchema, mediaIdentifierSchema, imageMediaSchema, videoMediaSchema, audioMediaSchema, documentMediaSchema, spreadsheetMediaSchema, archiveMediaSchema, mediaSchema, persistableMediaBaseSchema;
|
|
3382
3393
|
var init_media$2 = __esmMin((() => {
|
|
3383
3394
|
hotspotSchema = z.object({
|
|
@@ -4466,6 +4477,12 @@ var init_parseThemeForPersistence = __esmMin((() => {
|
|
|
4466
4477
|
init_types$14();
|
|
4467
4478
|
}));
|
|
4468
4479
|
//#endregion
|
|
4480
|
+
//#region ../theme-core/src/buttons/affordanceSuppression.ts
|
|
4481
|
+
var AFFORDANCE_SUPPRESS_CLASS;
|
|
4482
|
+
var init_affordanceSuppression = __esmMin((() => {
|
|
4483
|
+
AFFORDANCE_SUPPRESS_CLASS = "rb-affordance-off";
|
|
4484
|
+
}));
|
|
4485
|
+
//#endregion
|
|
4469
4486
|
//#region ../theme-core/src/buttons/classNames.ts
|
|
4470
4487
|
/**
|
|
4471
4488
|
* Parse content/runtime variant identifiers into the closed theme-button class
|
|
@@ -4493,7 +4510,29 @@ function themeButtonClassName(spec) {
|
|
|
4493
4510
|
spec.extraClassName
|
|
4494
4511
|
].filter(Boolean).join(" ");
|
|
4495
4512
|
}
|
|
4513
|
+
/**
|
|
4514
|
+
* Button classes for an authored button that renders its own trailing icon.
|
|
4515
|
+
*
|
|
4516
|
+
* A separate function rather than a flag on `themeButtonClassName`, because
|
|
4517
|
+
* there is exactly one caller and it should stay visible in a diff. The name
|
|
4518
|
+
* states what the caller knows to be true of its own markup — that it renders a
|
|
4519
|
+
* trailing icon — rather than what the theme does about it. The consequence is
|
|
4520
|
+
* the theme's to decide and to change; a caller naming the consequence would be
|
|
4521
|
+
* asserting a policy it does not own, and would quietly become a lie the moment
|
|
4522
|
+
* that policy moved.
|
|
4523
|
+
*
|
|
4524
|
+
* Do not reach for this to remove an arrow you simply do not want. A trailing
|
|
4525
|
+
* affordance is declared by the button style, and a block overriding that is the
|
|
4526
|
+
* defect this replaced.
|
|
4527
|
+
*/
|
|
4528
|
+
function themeButtonClassNameWithTrailingIcon(spec) {
|
|
4529
|
+
return themeButtonClassName({
|
|
4530
|
+
...spec,
|
|
4531
|
+
extraClassName: [spec.extraClassName, AFFORDANCE_SUPPRESS_CLASS].filter(Boolean).join(" ")
|
|
4532
|
+
});
|
|
4533
|
+
}
|
|
4496
4534
|
var init_classNames = __esmMin((() => {
|
|
4535
|
+
init_affordanceSuppression();
|
|
4497
4536
|
init_types$14();
|
|
4498
4537
|
}));
|
|
4499
4538
|
var init_tokens$1 = __esmMin((() => {}));
|
|
@@ -4992,7 +5031,7 @@ var init_buttonSurfaceContext = __esmMin((() => {
|
|
|
4992
5031
|
init_types$14();
|
|
4993
5032
|
})), init_resolvedButtonCss = __esmMin((() => {
|
|
4994
5033
|
init_buttonSurfaceContext();
|
|
4995
|
-
}))
|
|
5034
|
+
}));
|
|
4996
5035
|
var init_generateButtonCss = __esmMin((() => {
|
|
4997
5036
|
init_types$14();
|
|
4998
5037
|
init_classNames();
|
|
@@ -5007,7 +5046,7 @@ var init_generateButtonCss = __esmMin((() => {
|
|
|
5007
5046
|
init_resolveButtonColourStates();
|
|
5008
5047
|
init_resolvedButtonCss();
|
|
5009
5048
|
init_buttonSurfaceContext();
|
|
5010
|
-
|
|
5049
|
+
init_affordanceSuppression();
|
|
5011
5050
|
buttonSizeNameSchema.options;
|
|
5012
5051
|
}));
|
|
5013
5052
|
//#endregion
|
|
@@ -8007,8 +8046,9 @@ var init_boxBackgroundSchema = __esmMin((() => {
|
|
|
8007
8046
|
showVideoOnMobile: z.boolean().nullable().optional()
|
|
8008
8047
|
})
|
|
8009
8048
|
]);
|
|
8010
|
-
})), axesSchema, typographyStyleSchema, bodyTypographyStyleSchema, headingSizeSchema, headingTypographyOverridesSchema, headingTypographyStyleSchema, proseLinkUnderlineStyleSchema, proseLinkUnderlineThicknessSchema, proseLinkUnderlineOffsetSchema, proseLinkStyleSchema, semanticSpacingSchema, boxRoundedSchema, noHeadingDecorationSchema, visibleHeadingDecorationSchema, headingDecorationSchema, headingDecorationOverrideSchema, accordionIconTreatmentSchema, sectionStylesOverrideSchema, containerStylesOverrideSchema, cardBorderOverrideSchema, cardStylesOverrideSchema, blockStyleOverridesSchema, blockThemeOverrideSchema, typographyScaleSchema, eyebrowTypographyStyleSchema, typographySchema, spaceSchema, corners, shadow, border, motion, inputStyle$1, headerPositioningValues, headerPositioning, headerNavStyle, navFontWeight, headerMaxWidth, headerBorderSchema, logoStyleSchema, headerLogoTextSchema, dropdownStyleSchema, headerCtaGapSchema, headerCtaTreatmentSchema, navContainerSchema, headerBackgroundSchema, headerSchema, footerVariant, footerMaxWidth,
|
|
8049
|
+
})), axesSchema, typographyStyleSchema, bodyTypographyStyleSchema, headingSizeSchema, headingTypographyOverridesSchema, headingTypographyStyleSchema, proseLinkUnderlineStyleSchema, proseLinkUnderlineThicknessSchema, proseLinkUnderlineOffsetSchema, proseLinkStyleSchema, semanticSpacingSchema, boxRoundedSchema, noHeadingDecorationSchema, visibleHeadingDecorationSchema, headingDecorationSchema, headingDecorationOverrideSchema, accordionIconTreatmentSchema, sectionStylesOverrideSchema, containerStylesOverrideSchema, cardBorderOverrideSchema, cardStylesOverrideSchema, blockStyleOverridesSchema, blockThemeOverrideSchema, typographyScaleSchema, eyebrowTypographyStyleSchema, typographySchema, spaceSchema, corners, shadow, border, motion, inputStyle$1, headerPositioningValues, headerPositioning, headerNavStyle, navFontWeight, headerMaxWidth, headerBorderSchema, logoStyleSchema, headerLogoTextSchema, dropdownStyleSchema, headerCtaGapSchema, headerCtaTreatmentSchema, navContainerSchema, headerBackgroundSchema, headerSchema, footerVariant, footerMaxWidth, footerNavLayoutMode, footerNavLayoutAlign, footerSpacing, footerLogoPlacement, footerLogoSize, footerLogoMaxHeight, footerBottomTextLinkStyleSchema, footerBottomBarSchema, footerNavLayoutSchema, footerLogoSchema, footerSchema, containerPaddingPresetSchema, layoutSchema, heroTypographySizeSchema, heroTypographyLineHeightSchema, heroResponsiveTypographySchema, heroTypographySchema, heroSchema, bodyTextIntroTypographySizeSchema, bodyTextSchema, testimonialQuoteTreatmentSchema, themeSchema;
|
|
8011
8050
|
var init_schema$2 = __esmMin((() => {
|
|
8051
|
+
init_mode();
|
|
8012
8052
|
init_media$2();
|
|
8013
8053
|
init_schema$3();
|
|
8014
8054
|
init_buttons();
|
|
@@ -8507,12 +8547,6 @@ var init_schema$2 = __esmMin((() => {
|
|
|
8507
8547
|
"split"
|
|
8508
8548
|
]);
|
|
8509
8549
|
footerMaxWidth = z.enum(["container", "full"]);
|
|
8510
|
-
footerMode = z.enum([
|
|
8511
|
-
"default",
|
|
8512
|
-
"blocks",
|
|
8513
|
-
"default+blocks",
|
|
8514
|
-
"none"
|
|
8515
|
-
]);
|
|
8516
8550
|
footerNavLayoutMode = z.enum([
|
|
8517
8551
|
"stack",
|
|
8518
8552
|
"inline",
|
|
@@ -8601,9 +8635,9 @@ var init_schema$2 = __esmMin((() => {
|
|
|
8601
8635
|
/**
|
|
8602
8636
|
* SDK-only footer rendering mode.
|
|
8603
8637
|
*
|
|
8604
|
-
*
|
|
8638
|
+
* Historical persisted field; SDK rendering mode now lives in layout.footerMode.
|
|
8605
8639
|
*/
|
|
8606
|
-
mode:
|
|
8640
|
+
mode: footerModeSchema.optional(),
|
|
8607
8641
|
variant: footerVariant,
|
|
8608
8642
|
maxWidth: footerMaxWidth,
|
|
8609
8643
|
showLogoText: z.boolean().optional(),
|
|
@@ -9171,6 +9205,15 @@ var init_schemas = __esmMin((() => {
|
|
|
9171
9205
|
timeZone: z.string(),
|
|
9172
9206
|
pricing: publicEventPricingSchema,
|
|
9173
9207
|
paymentTerms: blockBookingPaymentTermsSchema,
|
|
9208
|
+
cancellationPolicy: z.object({ refunds: z.object({
|
|
9209
|
+
mode: z.enum([
|
|
9210
|
+
"never",
|
|
9211
|
+
"always",
|
|
9212
|
+
"cutoff"
|
|
9213
|
+
]),
|
|
9214
|
+
cutoffHours: z.number(),
|
|
9215
|
+
method: z.enum(["original_payment_method", "site_credit"])
|
|
9216
|
+
}) }),
|
|
9174
9217
|
consent: blockBookingConsentSchema.nullable(),
|
|
9175
9218
|
accessRestriction: accessRestrictionSchema,
|
|
9176
9219
|
allowedCategoryIds: z.array(z.string()),
|
|
@@ -9335,6 +9378,7 @@ function calendarQueryKey(siteId, stage, filters) {
|
|
|
9335
9378
|
filters.eventSurface ?? "all",
|
|
9336
9379
|
normalizedCsv(filters.eventPresets),
|
|
9337
9380
|
filters.scheduleScope ?? "any",
|
|
9381
|
+
...filters.seriesIds === void 0 ? [] : [normalizedCsv(filters.seriesIds)],
|
|
9338
9382
|
normalizedCsv(filters.categoryIds),
|
|
9339
9383
|
normalizeCalendarFilterId(filters.venueId) ?? "",
|
|
9340
9384
|
normalizeCalendarFilterId(filters.staffMemberId) ?? "",
|
|
@@ -9412,6 +9456,7 @@ var init_calendarWindow = __esmMin((() => {
|
|
|
9412
9456
|
eventSurface: z.enum(eventSurfaceScopeValues).optional(),
|
|
9413
9457
|
eventPresets: z.string().optional(),
|
|
9414
9458
|
scheduleScope: z.enum(eventScheduleScopeValues).optional(),
|
|
9459
|
+
seriesIds: z.string().optional(),
|
|
9415
9460
|
categoryIds: z.string().optional(),
|
|
9416
9461
|
venueId: z.string().transform(normalizeCalendarFilterId).optional(),
|
|
9417
9462
|
staffMemberId: z.string().transform(normalizeCalendarFilterId).optional()
|
|
@@ -13582,17 +13627,16 @@ const ButtonNode = ({ value, children, href, variantId = "primary", size = "md",
|
|
|
13582
13627
|
console.warn("[ButtonNode] Missing href for link-required button");
|
|
13583
13628
|
return null;
|
|
13584
13629
|
}
|
|
13585
|
-
const extraClassName = affordanceIcon ? [className, AFFORDANCE_SUPPRESS_CLASS].filter(Boolean).join(" ") : className;
|
|
13586
13630
|
const resolvedVariantId = parseThemeButtonVariantId(variantId);
|
|
13587
13631
|
if (variantId && !resolvedVariantId) {
|
|
13588
13632
|
console.error("[ButtonNode] Invalid button variant", { variantId });
|
|
13589
13633
|
return null;
|
|
13590
13634
|
}
|
|
13591
|
-
const combinedClassName = resolvedVariantId ? themeButtonClassName({
|
|
13635
|
+
const combinedClassName = resolvedVariantId ? (affordanceIcon ? themeButtonClassNameWithTrailingIcon : themeButtonClassName)({
|
|
13592
13636
|
variant: resolvedVariantId,
|
|
13593
13637
|
size,
|
|
13594
|
-
extraClassName
|
|
13595
|
-
}) :
|
|
13638
|
+
extraClassName: className
|
|
13639
|
+
}) : className;
|
|
13596
13640
|
if (resolvedHref) return /* @__PURE__ */ jsxs("a", {
|
|
13597
13641
|
href: resolvedHref,
|
|
13598
13642
|
target,
|
|
@@ -15192,6 +15236,7 @@ const publicPricingSchema = z.object({
|
|
|
15192
15236
|
});
|
|
15193
15237
|
const publicAppointmentServiceSchema = z.object({
|
|
15194
15238
|
id: z.string().min(1),
|
|
15239
|
+
slug: z.string().min(1).optional(),
|
|
15195
15240
|
title: z.string(),
|
|
15196
15241
|
description: z.string().nullable().optional(),
|
|
15197
15242
|
durationMinutes: z.number().int().positive(),
|
|
@@ -15268,7 +15313,7 @@ function formatAmountOrFree(amount, currency) {
|
|
|
15268
15313
|
currency
|
|
15269
15314
|
}, { decimals: "auto" });
|
|
15270
15315
|
}
|
|
15271
|
-
function buildRows(services, pathname) {
|
|
15316
|
+
function buildRows(services, pathname, servicePathPrefix) {
|
|
15272
15317
|
return services.map((service) => ({
|
|
15273
15318
|
id: service.id,
|
|
15274
15319
|
title: service.title,
|
|
@@ -15279,7 +15324,8 @@ function buildRows(services, pathname) {
|
|
|
15279
15324
|
href: resolveDedicatedBookingHref(pathname, {
|
|
15280
15325
|
kind: "appointment_service",
|
|
15281
15326
|
serviceId: service.id
|
|
15282
|
-
})
|
|
15327
|
+
}),
|
|
15328
|
+
detailsHref: servicePathPrefix && service.slug ? `${servicePathPrefix.replace(/\/$/, "")}/${encodeURIComponent(service.slug)}` : null
|
|
15283
15329
|
}));
|
|
15284
15330
|
}
|
|
15285
15331
|
function buildAppointmentServicesView(input) {
|
|
@@ -15298,13 +15344,14 @@ function buildAppointmentServicesView(input) {
|
|
|
15298
15344
|
};
|
|
15299
15345
|
return {
|
|
15300
15346
|
kind: "items",
|
|
15301
|
-
rows: buildRows(parsed.services, input.pathname)
|
|
15347
|
+
rows: buildRows(parsed.services, input.pathname, input.servicePathPrefix ?? null)
|
|
15302
15348
|
};
|
|
15303
15349
|
}
|
|
15304
|
-
function AppointmentServicesNode({ sectionHeading, services, pathname, className }) {
|
|
15350
|
+
function AppointmentServicesNode({ sectionHeading, services, pathname, servicePathPrefix, className }) {
|
|
15305
15351
|
const view = buildAppointmentServicesView({
|
|
15306
15352
|
services,
|
|
15307
|
-
pathname: typeof pathname === "string" ? pathname : void 0
|
|
15353
|
+
pathname: typeof pathname === "string" ? pathname : void 0,
|
|
15354
|
+
servicePathPrefix: typeof servicePathPrefix === "string" ? servicePathPrefix : null
|
|
15308
15355
|
});
|
|
15309
15356
|
const rootClassName = `appointment-services ${className ?? ""}`.trim();
|
|
15310
15357
|
const RowTitle = sectionHeading ? "h3" : "h2";
|
|
@@ -15335,7 +15382,10 @@ function AppointmentServicesNode({ sectionHeading, services, pathname, className
|
|
|
15335
15382
|
children: [
|
|
15336
15383
|
/* @__PURE__ */ jsx(RowTitle, {
|
|
15337
15384
|
className: "appointment-services-row-title rb-text-lg rb-font-medium rb-leading-tight",
|
|
15338
|
-
children: row.
|
|
15385
|
+
children: row.detailsHref ? /* @__PURE__ */ jsx("a", {
|
|
15386
|
+
href: row.detailsHref,
|
|
15387
|
+
children: row.title
|
|
15388
|
+
}) : row.title
|
|
15339
15389
|
}),
|
|
15340
15390
|
row.description ? /* @__PURE__ */ jsx("p", {
|
|
15341
15391
|
className: "appointment-services-row-description rb-text-sm rb-leading-6 status-muted",
|
|
@@ -18458,12 +18508,12 @@ var init_EventCompactRow = __esmMin((() => {
|
|
|
18458
18508
|
}), cta.hidden ? /* @__PURE__ */ jsx("span", {
|
|
18459
18509
|
className: "event-compact-row-status",
|
|
18460
18510
|
children: cta.label
|
|
18461
|
-
}) : /* @__PURE__ */
|
|
18511
|
+
}) : /* @__PURE__ */ jsx("a", {
|
|
18462
18512
|
href: cta.href,
|
|
18463
18513
|
target: cta.external ? "_blank" : void 0,
|
|
18464
18514
|
rel: cta.external ? "noopener noreferrer" : void 0,
|
|
18465
18515
|
className: `${buttonClass} event-compact-row-cta`,
|
|
18466
|
-
children:
|
|
18516
|
+
children: /* @__PURE__ */ jsx("span", { children: cta.label })
|
|
18467
18517
|
})]
|
|
18468
18518
|
})]
|
|
18469
18519
|
})]
|
|
@@ -18698,6 +18748,14 @@ var init_contract_schemas = __esmMin((() => {
|
|
|
18698
18748
|
"week"
|
|
18699
18749
|
]);
|
|
18700
18750
|
}));
|
|
18751
|
+
/** Undefined means discovery; an empty string is an explicitly empty selection. */
|
|
18752
|
+
function eventSeriesScopeCsv(value) {
|
|
18753
|
+
if (value == null) return void 0;
|
|
18754
|
+
return typeof value === "string" ? value : value.join(",");
|
|
18755
|
+
}
|
|
18756
|
+
var init_eventSelection = __esmMin((() => {
|
|
18757
|
+
init_src$2();
|
|
18758
|
+
}));
|
|
18701
18759
|
//#endregion
|
|
18702
18760
|
//#region ../blocks/src/system/blocks/events/shared/types.ts
|
|
18703
18761
|
var init_types$6 = __esmMin((() => {}));
|
|
@@ -20011,6 +20069,7 @@ function normalizeFilterId(value) {
|
|
|
20011
20069
|
return id === "all" ? void 0 : id;
|
|
20012
20070
|
}
|
|
20013
20071
|
function buildEventRuntimeFilters(input) {
|
|
20072
|
+
if (input.seriesIds != null) return { seriesIds: input.seriesIds };
|
|
20014
20073
|
const params = {};
|
|
20015
20074
|
if (input.eventSurface && input.eventSurface !== "all") params.eventSurface = input.eventSurface;
|
|
20016
20075
|
const eventPresets = normalizeCsvString(input.filterEventPresets);
|
|
@@ -20026,6 +20085,7 @@ function buildEventRuntimeFilters(input) {
|
|
|
20026
20085
|
}
|
|
20027
20086
|
function getEventRuntimeFiltersKey(filters) {
|
|
20028
20087
|
return JSON.stringify({
|
|
20088
|
+
seriesIds: filters?.seriesIds == null ? null : [...new Set(filters.seriesIds.split(",").filter(Boolean))].sort().join(","),
|
|
20029
20089
|
categoryIds: normalizeCsvString(filters?.categoryIds),
|
|
20030
20090
|
staffMemberId: normalizeOptionalId(filters?.staffMemberId),
|
|
20031
20091
|
venueId: normalizeOptionalId(filters?.venueId),
|
|
@@ -20086,11 +20146,15 @@ function buildEventCollectionDisplay(source) {
|
|
|
20086
20146
|
};
|
|
20087
20147
|
}
|
|
20088
20148
|
function buildEventCollectionFilterDisplay(source) {
|
|
20089
|
-
|
|
20090
|
-
|
|
20091
|
-
|
|
20092
|
-
|
|
20093
|
-
|
|
20149
|
+
const selected = source.seriesIds != null;
|
|
20150
|
+
const matchingFilters = selected ? {
|
|
20151
|
+
eventSurface: "all",
|
|
20152
|
+
filterEventPresets: null,
|
|
20153
|
+
scheduleScope: "any",
|
|
20154
|
+
filterCategoryIds: null,
|
|
20155
|
+
filterStaffMemberId: null,
|
|
20156
|
+
filterVenueId: null
|
|
20157
|
+
} : {
|
|
20094
20158
|
eventSurface: normalizeEventSurfaceScope(source.eventSurface),
|
|
20095
20159
|
filterEventPresets: normalizeEventSurfacePresetsCsv(source.filterEventPresets),
|
|
20096
20160
|
scheduleScope: normalizeEventScheduleScope(source.scheduleScope),
|
|
@@ -20098,6 +20162,14 @@ function buildEventCollectionFilterDisplay(source) {
|
|
|
20098
20162
|
filterStaffMemberId: normalizeEventStaffMemberId(source.filterStaffMemberId),
|
|
20099
20163
|
filterVenueId: normalizeEventVenueId(source.filterVenueId)
|
|
20100
20164
|
};
|
|
20165
|
+
return {
|
|
20166
|
+
seriesIds: eventSeriesScopeCsv(source.seriesIds),
|
|
20167
|
+
showFilters: selected ? false : source.showFilters ?? true,
|
|
20168
|
+
showCategoryFilter: source.showCategoryFilter ?? "auto",
|
|
20169
|
+
showVenueFilter: source.showVenueFilter ?? false,
|
|
20170
|
+
showStaffFilter: source.showStaffFilter ?? true,
|
|
20171
|
+
...matchingFilters
|
|
20172
|
+
};
|
|
20101
20173
|
}
|
|
20102
20174
|
function buildEventCollectionPresentationDisplay(source) {
|
|
20103
20175
|
return {
|
|
@@ -20112,14 +20184,15 @@ function buildEventCollectionPresentationDisplay(source) {
|
|
|
20112
20184
|
}
|
|
20113
20185
|
function buildEventCollectionHydration(source, now = /* @__PURE__ */ new Date()) {
|
|
20114
20186
|
const timeZone = source.calendarWindow?.scope.timeZone ?? toBookingTimeZone(source.bookingTimeZone);
|
|
20187
|
+
const selected = source.seriesIds != null;
|
|
20115
20188
|
return {
|
|
20116
20189
|
calendarWindow: source.calendarWindow ?? void 0,
|
|
20117
20190
|
siteId: source.siteId,
|
|
20118
20191
|
stage: source.stage,
|
|
20119
20192
|
prefetchedEvents: source.events != null,
|
|
20120
|
-
eventSurface: normalizeEventSurfaceScope(source.eventSurface),
|
|
20121
|
-
filterEventPresets: normalizeEventSurfacePresetsCsv(source.filterEventPresets),
|
|
20122
|
-
scheduleScope: normalizeEventScheduleScope(source.scheduleScope),
|
|
20193
|
+
eventSurface: selected ? "all" : normalizeEventSurfaceScope(source.eventSurface),
|
|
20194
|
+
filterEventPresets: selected ? null : normalizeEventSurfacePresetsCsv(source.filterEventPresets),
|
|
20195
|
+
scheduleScope: selected ? "any" : normalizeEventScheduleScope(source.scheduleScope),
|
|
20123
20196
|
calendarContext: {
|
|
20124
20197
|
timeZone,
|
|
20125
20198
|
initialToday: source.calendarWindow?.initialToday ?? getLocalScheduleDate(now, timeZone)
|
|
@@ -20148,6 +20221,7 @@ function buildEventCollectionListingDisplay(display, prefetchedEvents, className
|
|
|
20148
20221
|
}
|
|
20149
20222
|
var eventSurfaceScopeSchema$1, eventScheduleScopeSchema$1, eventCollectionFilterSourceSchemaShape, eventCollectionSourceSchemaShape, eventCollectionDisplaySchemaShape, eventCollectionHydrationSchema;
|
|
20150
20223
|
var init_eventCollectionContract = __esmMin((() => {
|
|
20224
|
+
init_eventSelection();
|
|
20151
20225
|
init_calendarWindow();
|
|
20152
20226
|
init_cards();
|
|
20153
20227
|
init_src$2();
|
|
@@ -20166,6 +20240,7 @@ var init_eventCollectionContract = __esmMin((() => {
|
|
|
20166
20240
|
eventSurface: eventSurfaceScopeSchema$1.nullable().optional(),
|
|
20167
20241
|
filterEventPresets: z.union([z.string(), z.array(z.string())]).nullable().optional(),
|
|
20168
20242
|
scheduleScope: eventScheduleScopeSchema$1.nullable().optional(),
|
|
20243
|
+
seriesIds: z.union([z.string(), z.array(z.string())]).nullable().optional(),
|
|
20169
20244
|
filterCategoryIds: z.union([z.string(), z.array(z.string())]).nullable().optional(),
|
|
20170
20245
|
filterStaffMemberId: z.string().nullable().optional(),
|
|
20171
20246
|
filterVenueId: z.string().nullable().optional()
|
|
@@ -20212,6 +20287,7 @@ var init_eventCollectionContract = __esmMin((() => {
|
|
|
20212
20287
|
eventSurface: eventSurfaceScopeSchema$1,
|
|
20213
20288
|
filterEventPresets: z.string().nullable(),
|
|
20214
20289
|
scheduleScope: eventScheduleScopeSchema$1,
|
|
20290
|
+
seriesIds: z.string().nullable().optional(),
|
|
20215
20291
|
filterCategoryIds: z.string().nullable(),
|
|
20216
20292
|
filterStaffMemberId: z.string().nullable(),
|
|
20217
20293
|
filterVenueId: z.string().nullable(),
|
|
@@ -20743,7 +20819,6 @@ function OfferingsCatalogue(props) {
|
|
|
20743
20819
|
//#endregion
|
|
20744
20820
|
//#region ../blocks/src/system/runtime/nodes/offerings-preview-content.tsx
|
|
20745
20821
|
init_buttons();
|
|
20746
|
-
init_svg();
|
|
20747
20822
|
init_shared$3();
|
|
20748
20823
|
function OfferingsPreviewContent(props) {
|
|
20749
20824
|
const groupLinkClass = themeButtonClassName({
|
|
@@ -20790,13 +20865,10 @@ function OfferingsPreviewContent(props) {
|
|
|
20790
20865
|
}),
|
|
20791
20866
|
groupCta ? /* @__PURE__ */ jsx("footer", {
|
|
20792
20867
|
className: "offerings-preview-card-footer rb-mt-auto rb-flex",
|
|
20793
|
-
children: /* @__PURE__ */
|
|
20868
|
+
children: /* @__PURE__ */ jsx("a", {
|
|
20794
20869
|
className: groupLinkClass,
|
|
20795
20870
|
href: groupCta.href,
|
|
20796
|
-
children:
|
|
20797
|
-
"aria-hidden": "true",
|
|
20798
|
-
className: "offerings-preview-link-icon rb-h-4 rb-w-4"
|
|
20799
|
-
})]
|
|
20871
|
+
children: /* @__PURE__ */ jsx("span", { children: groupCta.label })
|
|
20800
20872
|
})
|
|
20801
20873
|
}) : null
|
|
20802
20874
|
]
|
|
@@ -28129,6 +28201,10 @@ var init_headerOpeningForeground = __esmMin((() => {
|
|
|
28129
28201
|
init_colorTokenParts();
|
|
28130
28202
|
init_types$8();
|
|
28131
28203
|
}));
|
|
28204
|
+
var init_effectivePageDesign = __esmMin((() => {
|
|
28205
|
+
init_pageDesignIntent();
|
|
28206
|
+
init_siteStyleBlockPolicies();
|
|
28207
|
+
}));
|
|
28132
28208
|
function validateBlockSequence(snapshots, ctx) {
|
|
28133
28209
|
for (const issue of collectBlockSequenceIssues(snapshots)) ctx.addIssue(issue);
|
|
28134
28210
|
}
|
|
@@ -28405,6 +28481,7 @@ var init_site_styles = __esmMin((() => {
|
|
|
28405
28481
|
init_lookResolution();
|
|
28406
28482
|
init_lookOptionGroups();
|
|
28407
28483
|
init_logoBranding();
|
|
28484
|
+
init_effectivePageDesign();
|
|
28408
28485
|
init_pageDesignAuthority();
|
|
28409
28486
|
init_pageDesignEditorErrors();
|
|
28410
28487
|
init_pageDesignEditorCapabilities();
|
|
@@ -28906,6 +28983,7 @@ var init_schema = __esmMin((() => {
|
|
|
28906
28983
|
];
|
|
28907
28984
|
siteOptionSources = [
|
|
28908
28985
|
"eventCategories",
|
|
28986
|
+
"eventSeries",
|
|
28909
28987
|
"venues",
|
|
28910
28988
|
"staffMembers"
|
|
28911
28989
|
];
|
|
@@ -34465,6 +34543,66 @@ const formBlockDefinition = {
|
|
|
34465
34543
|
runtime: formBlockRuntime
|
|
34466
34544
|
};
|
|
34467
34545
|
//#endregion
|
|
34546
|
+
//#region ../blocks/src/system/blocks/events/eventSelectionFields.ts
|
|
34547
|
+
init_schema();
|
|
34548
|
+
const eventSelectionFields = [{
|
|
34549
|
+
id: "eventSelection",
|
|
34550
|
+
type: "select",
|
|
34551
|
+
label: "Events to show",
|
|
34552
|
+
required: false,
|
|
34553
|
+
multiple: false,
|
|
34554
|
+
defaultValue: "matching",
|
|
34555
|
+
options: [{
|
|
34556
|
+
value: "matching",
|
|
34557
|
+
label: "All matching events"
|
|
34558
|
+
}, {
|
|
34559
|
+
value: "selected",
|
|
34560
|
+
label: "Selected events"
|
|
34561
|
+
}],
|
|
34562
|
+
ui: { intent: "behavior" }
|
|
34563
|
+
}, createSiteOptionSelectField({
|
|
34564
|
+
id: "selectedEventSeriesIds",
|
|
34565
|
+
label: "Selected events",
|
|
34566
|
+
description: "Show upcoming dates for these events. Other event filters do not apply.",
|
|
34567
|
+
required: false,
|
|
34568
|
+
multiple: true,
|
|
34569
|
+
defaultValue: [],
|
|
34570
|
+
optionSource: "eventSeries",
|
|
34571
|
+
ui: {
|
|
34572
|
+
intent: "behavior",
|
|
34573
|
+
searchThreshold: 1,
|
|
34574
|
+
visibleWhen: {
|
|
34575
|
+
field: "eventSelection",
|
|
34576
|
+
equals: "selected"
|
|
34577
|
+
}
|
|
34578
|
+
}
|
|
34579
|
+
})];
|
|
34580
|
+
function withEventSelectionVisibility(field) {
|
|
34581
|
+
if (![
|
|
34582
|
+
"eventSurface",
|
|
34583
|
+
"filterEventPresets",
|
|
34584
|
+
"scheduleScope",
|
|
34585
|
+
"filterCategoryIds",
|
|
34586
|
+
"filterStaffMemberId",
|
|
34587
|
+
"filterVenueId",
|
|
34588
|
+
"showFilters",
|
|
34589
|
+
"showCategoryFilter",
|
|
34590
|
+
"showVenueFilter",
|
|
34591
|
+
"showStaffFilter"
|
|
34592
|
+
].includes(field.id)) return field;
|
|
34593
|
+
const visibleWhen = field.ui?.visibleWhen;
|
|
34594
|
+
return {
|
|
34595
|
+
...field,
|
|
34596
|
+
ui: {
|
|
34597
|
+
...field.ui,
|
|
34598
|
+
visibleWhen: { allOf: [{
|
|
34599
|
+
field: "eventSelection",
|
|
34600
|
+
notEquals: "selected"
|
|
34601
|
+
}, ...visibleWhen ? [visibleWhen] : []] }
|
|
34602
|
+
}
|
|
34603
|
+
};
|
|
34604
|
+
}
|
|
34605
|
+
//#endregion
|
|
34468
34606
|
//#region ../blocks/src/system/runtime/nodes/events/EventCalendar.interactive.ts
|
|
34469
34607
|
/**
|
|
34470
34608
|
* Collapse an optional/blank string to `undefined` so downstream week-board
|
|
@@ -34516,6 +34654,7 @@ function buildEventCalendarListingRender(render, className = render.display.clas
|
|
|
34516
34654
|
eventSurface: display.eventSurface,
|
|
34517
34655
|
filterEventPresets: display.filterEventPresets,
|
|
34518
34656
|
scheduleScope: display.scheduleScope,
|
|
34657
|
+
seriesIds: display.seriesIds,
|
|
34519
34658
|
filterCategoryIds: display.filterCategoryIds,
|
|
34520
34659
|
filterStaffMemberId: display.filterStaffMemberId,
|
|
34521
34660
|
filterVenueId: display.filterVenueId,
|
|
@@ -34608,19 +34747,59 @@ init_EventCalendar_interactive();
|
|
|
34608
34747
|
init_calendarWindow();
|
|
34609
34748
|
const scopeParams = {
|
|
34610
34749
|
siteId: { $bind: { from: "$root.siteId" } },
|
|
34750
|
+
seriesIds: { $bind: {
|
|
34751
|
+
from: "content",
|
|
34752
|
+
transforms: [{
|
|
34753
|
+
id: "events.calendarSelectionParam",
|
|
34754
|
+
options: { key: "seriesIds" }
|
|
34755
|
+
}]
|
|
34756
|
+
} },
|
|
34611
34757
|
stage: { $bind: {
|
|
34612
34758
|
from: "$root.previewStage",
|
|
34613
34759
|
fallback: "published"
|
|
34614
34760
|
} },
|
|
34615
|
-
eventSurface: { $bind: {
|
|
34761
|
+
eventSurface: { $bind: {
|
|
34762
|
+
from: "content",
|
|
34763
|
+
transforms: [{
|
|
34764
|
+
id: "events.calendarSelectionParam",
|
|
34765
|
+
options: { key: "eventSurface" }
|
|
34766
|
+
}, { id: "value.csv" }]
|
|
34767
|
+
} },
|
|
34616
34768
|
eventPresets: { $bind: {
|
|
34617
|
-
from: "content
|
|
34618
|
-
transforms: [{
|
|
34769
|
+
from: "content",
|
|
34770
|
+
transforms: [{
|
|
34771
|
+
id: "events.calendarSelectionParam",
|
|
34772
|
+
options: { key: "filterEventPresets" }
|
|
34773
|
+
}, { id: "value.csv" }]
|
|
34619
34774
|
} },
|
|
34620
|
-
scheduleScope: { $bind: {
|
|
34621
|
-
|
|
34622
|
-
|
|
34623
|
-
|
|
34775
|
+
scheduleScope: { $bind: {
|
|
34776
|
+
from: "content",
|
|
34777
|
+
transforms: [{
|
|
34778
|
+
id: "events.calendarSelectionParam",
|
|
34779
|
+
options: { key: "scheduleScope" }
|
|
34780
|
+
}, { id: "value.csv" }]
|
|
34781
|
+
} },
|
|
34782
|
+
categoryIds: { $bind: {
|
|
34783
|
+
from: "content",
|
|
34784
|
+
transforms: [{
|
|
34785
|
+
id: "events.calendarSelectionParam",
|
|
34786
|
+
options: { key: "filterCategoryIds" }
|
|
34787
|
+
}, { id: "value.csv" }]
|
|
34788
|
+
} },
|
|
34789
|
+
staffMemberId: { $bind: {
|
|
34790
|
+
from: "content",
|
|
34791
|
+
transforms: [{
|
|
34792
|
+
id: "events.calendarSelectionParam",
|
|
34793
|
+
options: { key: "filterStaffMemberId" }
|
|
34794
|
+
}, { id: "value.csv" }]
|
|
34795
|
+
} },
|
|
34796
|
+
venueId: { $bind: {
|
|
34797
|
+
from: "content",
|
|
34798
|
+
transforms: [{
|
|
34799
|
+
id: "events.calendarSelectionParam",
|
|
34800
|
+
options: { key: "filterVenueId" }
|
|
34801
|
+
}, { id: "value.csv" }]
|
|
34802
|
+
} }
|
|
34624
34803
|
};
|
|
34625
34804
|
/** Combined renders two jobs; calendar-only variants never pay for the list seed. */
|
|
34626
34805
|
const eventCalendarDataLoaders = {
|
|
@@ -34760,6 +34939,13 @@ const eventCalendarLayout = [styledSection({
|
|
|
34760
34939
|
from: "content.defaultCalendarView",
|
|
34761
34940
|
fallback: "month"
|
|
34762
34941
|
} },
|
|
34942
|
+
seriesIds: { $bind: {
|
|
34943
|
+
from: "content",
|
|
34944
|
+
transforms: [{
|
|
34945
|
+
id: "events.calendarSelectionParam",
|
|
34946
|
+
options: { key: "seriesIds" }
|
|
34947
|
+
}]
|
|
34948
|
+
} },
|
|
34763
34949
|
showFilters: { $bind: {
|
|
34764
34950
|
from: "content.showFilters",
|
|
34765
34951
|
fallback: true
|
|
@@ -34781,17 +34967,47 @@ const eventCalendarLayout = [styledSection({
|
|
|
34781
34967
|
fallback: true
|
|
34782
34968
|
} },
|
|
34783
34969
|
eventSurface: { $bind: {
|
|
34784
|
-
from: "content
|
|
34785
|
-
|
|
34970
|
+
from: "content",
|
|
34971
|
+
transforms: [{
|
|
34972
|
+
id: "events.calendarSelectionParam",
|
|
34973
|
+
options: { key: "eventSurface" }
|
|
34974
|
+
}]
|
|
34975
|
+
} },
|
|
34976
|
+
filterEventPresets: { $bind: {
|
|
34977
|
+
from: "content",
|
|
34978
|
+
transforms: [{
|
|
34979
|
+
id: "events.calendarSelectionParam",
|
|
34980
|
+
options: { key: "filterEventPresets" }
|
|
34981
|
+
}]
|
|
34786
34982
|
} },
|
|
34787
|
-
filterEventPresets: { $bind: { from: "content.filterEventPresets" } },
|
|
34788
34983
|
scheduleScope: { $bind: {
|
|
34789
|
-
from: "content
|
|
34790
|
-
|
|
34984
|
+
from: "content",
|
|
34985
|
+
transforms: [{
|
|
34986
|
+
id: "events.calendarSelectionParam",
|
|
34987
|
+
options: { key: "scheduleScope" }
|
|
34988
|
+
}]
|
|
34989
|
+
} },
|
|
34990
|
+
filterCategoryIds: { $bind: {
|
|
34991
|
+
from: "content",
|
|
34992
|
+
transforms: [{
|
|
34993
|
+
id: "events.calendarSelectionParam",
|
|
34994
|
+
options: { key: "filterCategoryIds" }
|
|
34995
|
+
}]
|
|
34996
|
+
} },
|
|
34997
|
+
filterStaffMemberId: { $bind: {
|
|
34998
|
+
from: "content",
|
|
34999
|
+
transforms: [{
|
|
35000
|
+
id: "events.calendarSelectionParam",
|
|
35001
|
+
options: { key: "filterStaffMemberId" }
|
|
35002
|
+
}]
|
|
35003
|
+
} },
|
|
35004
|
+
filterVenueId: { $bind: {
|
|
35005
|
+
from: "content",
|
|
35006
|
+
transforms: [{
|
|
35007
|
+
id: "events.calendarSelectionParam",
|
|
35008
|
+
options: { key: "filterVenueId" }
|
|
35009
|
+
}]
|
|
34791
35010
|
} },
|
|
34792
|
-
filterCategoryIds: { $bind: { from: "content.filterCategoryIds" } },
|
|
34793
|
-
filterStaffMemberId: { $bind: { from: "content.filterStaffMemberId" } },
|
|
34794
|
-
filterVenueId: { $bind: { from: "content.filterVenueId" } },
|
|
34795
35011
|
cardRole: { $bind: {
|
|
34796
35012
|
from: "content._cardStyles.role",
|
|
34797
35013
|
fallback: "default"
|
|
@@ -35295,6 +35511,7 @@ const eventCalendarAdditionalFields = [
|
|
|
35295
35511
|
}
|
|
35296
35512
|
}
|
|
35297
35513
|
},
|
|
35514
|
+
...eventSelectionFields,
|
|
35298
35515
|
{
|
|
35299
35516
|
id: "eventSurface",
|
|
35300
35517
|
type: "select",
|
|
@@ -35504,7 +35721,7 @@ const eventCalendarBlockDefinition = {
|
|
|
35504
35721
|
titleSource: "heading",
|
|
35505
35722
|
description: "Display events with calendar, list, or combined views with filtering",
|
|
35506
35723
|
skipSectionStyles: true,
|
|
35507
|
-
additionalFields: eventCalendarAdditionalFields,
|
|
35724
|
+
additionalFields: eventCalendarAdditionalFields.map(withEventSelectionVisibility),
|
|
35508
35725
|
styleTokens: {
|
|
35509
35726
|
background: "surface",
|
|
35510
35727
|
typography: "body",
|
|
@@ -35570,6 +35787,7 @@ function buildEventListingInteractiveIslandProps(props) {
|
|
|
35570
35787
|
}
|
|
35571
35788
|
var cardOrientationSchema, eventSurfaceScopeSchema, eventScheduleScopeSchema, eventListingSourceSchema, eventListingDisplaySchema, eventListingHydrationSchema, eventListingRenderSchema, eventListingIslandMetaCodec, eventListingBlockRuntime, eventListingIslandMetaKeys, eventListingInteractiveIslandPropsCodec;
|
|
35572
35789
|
var init_EventListing_interactive = __esmMin((() => {
|
|
35790
|
+
init_eventSelection();
|
|
35573
35791
|
init_cards();
|
|
35574
35792
|
init_schemas();
|
|
35575
35793
|
init_shared$2();
|
|
@@ -35636,6 +35854,7 @@ var init_EventListing_interactive = __esmMin((() => {
|
|
|
35636
35854
|
eventSurface: eventSurfaceScopeSchema,
|
|
35637
35855
|
filterEventPresets: z.string().nullable(),
|
|
35638
35856
|
scheduleScope: eventScheduleScopeSchema,
|
|
35857
|
+
seriesIds: z.string().nullable().optional(),
|
|
35639
35858
|
filterCategoryIds: z.string().nullable().optional(),
|
|
35640
35859
|
filterStaffMemberId: z.string().nullable().optional(),
|
|
35641
35860
|
filterVenueId: z.string().nullable().optional(),
|
|
@@ -35696,6 +35915,7 @@ var init_EventListing_interactive = __esmMin((() => {
|
|
|
35696
35915
|
eventSurface: normalizeEventSurfaceScope(source.eventSurface),
|
|
35697
35916
|
filterEventPresets: normalizeEventSurfacePresetsCsv(source.filterEventPresets),
|
|
35698
35917
|
scheduleScope: normalizeEventScheduleScope(source.scheduleScope),
|
|
35918
|
+
seriesIds: eventSeriesScopeCsv(source.seriesIds),
|
|
35699
35919
|
filterCategoryIds: normalizeEventCategoryIdsCsv(source.filterCategoryIds),
|
|
35700
35920
|
filterStaffMemberId: normalizeEventStaffMemberId(source.filterStaffMemberId),
|
|
35701
35921
|
filterVenueId: normalizeEventVenueId(source.filterVenueId),
|
|
@@ -42610,10 +42830,14 @@ function buildDiscountAvailabilityRequestPlan(options) {
|
|
|
42610
42830
|
}
|
|
42611
42831
|
};
|
|
42612
42832
|
}
|
|
42613
|
-
function discountAvailabilityStateFromResponse(response) {
|
|
42614
|
-
if (!discountAvailabilityHasDiscounts(response)) return {
|
|
42833
|
+
function discountAvailabilityStateFromResponse(requestKey, response) {
|
|
42834
|
+
if (!discountAvailabilityHasDiscounts(response)) return {
|
|
42835
|
+
tag: "unavailable",
|
|
42836
|
+
requestKey
|
|
42837
|
+
};
|
|
42615
42838
|
return {
|
|
42616
42839
|
tag: "available",
|
|
42840
|
+
requestKey,
|
|
42617
42841
|
manualCodeEntryAllowed: discountAvailabilityAllowsManualEntry(response),
|
|
42618
42842
|
autoAppliedDiscount: getAutoAppliedDiscountPreview(response)
|
|
42619
42843
|
};
|
|
@@ -42623,10 +42847,13 @@ function discountCodeUiReducer(state, event) {
|
|
|
42623
42847
|
case "availability-disabled": return initialDiscountCodeUiState;
|
|
42624
42848
|
case "availability-loading": return {
|
|
42625
42849
|
...state,
|
|
42626
|
-
availability: {
|
|
42850
|
+
availability: {
|
|
42851
|
+
tag: "loading",
|
|
42852
|
+
previous: state.availability.tag === "available" || state.availability.tag === "unavailable" ? state.availability : state.availability.tag === "loading" ? state.availability.previous : null
|
|
42853
|
+
}
|
|
42627
42854
|
};
|
|
42628
42855
|
case "availability-loaded": {
|
|
42629
|
-
const availability = discountAvailabilityStateFromResponse(event.response);
|
|
42856
|
+
const availability = discountAvailabilityStateFromResponse(event.requestKey, event.response);
|
|
42630
42857
|
if (availability.tag !== "available" || !availability.manualCodeEntryAllowed) return {
|
|
42631
42858
|
...state,
|
|
42632
42859
|
discountUiOpen: false,
|
|
@@ -42642,7 +42869,10 @@ function discountCodeUiReducer(state, event) {
|
|
|
42642
42869
|
...state,
|
|
42643
42870
|
discountUiOpen: false,
|
|
42644
42871
|
discountCode: "",
|
|
42645
|
-
availability: {
|
|
42872
|
+
availability: {
|
|
42873
|
+
tag: "error",
|
|
42874
|
+
requestKey: event.requestKey
|
|
42875
|
+
}
|
|
42646
42876
|
};
|
|
42647
42877
|
case "discount-code-changed": return {
|
|
42648
42878
|
...state,
|
|
@@ -42687,11 +42917,15 @@ function useDiscountCodeUi(options) {
|
|
|
42687
42917
|
if (cancelled) return;
|
|
42688
42918
|
dispatch({
|
|
42689
42919
|
type: "availability-loaded",
|
|
42920
|
+
requestKey: requestPlan.key,
|
|
42690
42921
|
response: res
|
|
42691
42922
|
});
|
|
42692
42923
|
} catch {
|
|
42693
42924
|
if (cancelled) return;
|
|
42694
|
-
dispatch({
|
|
42925
|
+
dispatch({
|
|
42926
|
+
type: "availability-failed",
|
|
42927
|
+
requestKey: requestPlan.key
|
|
42928
|
+
});
|
|
42695
42929
|
}
|
|
42696
42930
|
}
|
|
42697
42931
|
checkDiscountAvailability();
|
|
@@ -42700,8 +42934,9 @@ function useDiscountCodeUi(options) {
|
|
|
42700
42934
|
};
|
|
42701
42935
|
}, [options.api, requestPlan]);
|
|
42702
42936
|
const availability = state.availability;
|
|
42703
|
-
const
|
|
42704
|
-
const
|
|
42937
|
+
const settledAvailability = availability.tag === "loading" ? availability.previous : availability.tag === "available" || availability.tag === "unavailable" ? availability : null;
|
|
42938
|
+
const isAvailable = settledAvailability?.tag === "available";
|
|
42939
|
+
const manualCodeEntryAllowed = isAvailable ? settledAvailability.manualCodeEntryAllowed : false;
|
|
42705
42940
|
return {
|
|
42706
42941
|
discountUiOpen: state.discountUiOpen,
|
|
42707
42942
|
setDiscountUiOpen: (isOpen) => dispatch({
|
|
@@ -42715,8 +42950,10 @@ function useDiscountCodeUi(options) {
|
|
|
42715
42950
|
}),
|
|
42716
42951
|
discountsAvailable: isAvailable,
|
|
42717
42952
|
manualCodeEntryAllowed,
|
|
42718
|
-
autoAppliedDiscount: isAvailable ?
|
|
42719
|
-
discountsAvailableLoading: availability.tag === "loading"
|
|
42953
|
+
autoAppliedDiscount: isAvailable ? settledAvailability.autoAppliedDiscount : null,
|
|
42954
|
+
discountsAvailableLoading: availability.tag === "loading",
|
|
42955
|
+
discountAvailabilityRequestKey: requestPlan.key,
|
|
42956
|
+
settledDiscountAvailabilityRequestKey: availability.tag === "error" ? availability.requestKey : settledAvailability?.requestKey ?? null
|
|
42720
42957
|
};
|
|
42721
42958
|
}
|
|
42722
42959
|
var init_useDiscountCodeUi = __esmMin((() => {
|
|
@@ -47314,16 +47551,19 @@ function eligibilityLookupReducer(state, action) {
|
|
|
47314
47551
|
case "loading-started": return {
|
|
47315
47552
|
tag: "loading",
|
|
47316
47553
|
eligibility: state.eligibility,
|
|
47554
|
+
settledRequestKey: state.settledRequestKey,
|
|
47317
47555
|
error: null
|
|
47318
47556
|
};
|
|
47319
47557
|
case "resolved": return {
|
|
47320
47558
|
tag: "resolved",
|
|
47321
47559
|
eligibility: action.eligibility,
|
|
47560
|
+
settledRequestKey: action.requestKey,
|
|
47322
47561
|
error: null
|
|
47323
47562
|
};
|
|
47324
47563
|
case "failed": return {
|
|
47325
47564
|
tag: "failed",
|
|
47326
47565
|
eligibility: null,
|
|
47566
|
+
settledRequestKey: null,
|
|
47327
47567
|
error: action.message
|
|
47328
47568
|
};
|
|
47329
47569
|
default: return assertNever$11(action);
|
|
@@ -47349,6 +47589,7 @@ var init_hooks_state = __esmMin((() => {
|
|
|
47349
47589
|
initialEligibilityLookupState = {
|
|
47350
47590
|
tag: "idle",
|
|
47351
47591
|
eligibility: null,
|
|
47592
|
+
settledRequestKey: null,
|
|
47352
47593
|
error: null
|
|
47353
47594
|
};
|
|
47354
47595
|
initialExistingRegistrationLookupState = {
|
|
@@ -47428,9 +47669,23 @@ function toRegistrationOptionsSubject(subject, attendanceMode) {
|
|
|
47428
47669
|
function useEligibility(params) {
|
|
47429
47670
|
return useEligibilityWithDeps(params, eventRegistrationHooksDeps);
|
|
47430
47671
|
}
|
|
47672
|
+
function eligibilityRequestKey(params) {
|
|
47673
|
+
return JSON.stringify({
|
|
47674
|
+
enabled: params.enabled,
|
|
47675
|
+
refreshKey: params.refreshKey ?? 0,
|
|
47676
|
+
subject: params.subject,
|
|
47677
|
+
attendanceMode: params.attendanceMode ?? null,
|
|
47678
|
+
ticketSelections: params.ticketSelectionsKey,
|
|
47679
|
+
selectedSlidingAmount: params.selectedSlidingAmount ?? null
|
|
47680
|
+
});
|
|
47681
|
+
}
|
|
47431
47682
|
function useEligibilityWithDeps(params, deps) {
|
|
47432
47683
|
const api = deps.useBlockApi();
|
|
47433
47684
|
const ticketSelectionsKey = JSON.stringify(normalizeTicketSelectionLines(params.ticketSelections));
|
|
47685
|
+
const requestKey = eligibilityRequestKey({
|
|
47686
|
+
...params,
|
|
47687
|
+
ticketSelectionsKey
|
|
47688
|
+
});
|
|
47434
47689
|
const [state, dispatch] = useReducer(eligibilityLookupReducer, initialEligibilityLookupState);
|
|
47435
47690
|
const requestIdRef = useRef(0);
|
|
47436
47691
|
useEffect(() => {
|
|
@@ -47463,7 +47718,8 @@ function useEligibilityWithDeps(params, deps) {
|
|
|
47463
47718
|
if (cancelled || requestIdRef.current !== requestId) return;
|
|
47464
47719
|
dispatch({
|
|
47465
47720
|
type: "resolved",
|
|
47466
|
-
eligibility: transformRegistrationOptionsResponse(result)
|
|
47721
|
+
eligibility: transformRegistrationOptionsResponse(result),
|
|
47722
|
+
requestKey
|
|
47467
47723
|
});
|
|
47468
47724
|
} catch {
|
|
47469
47725
|
if (cancelled || requestIdRef.current !== requestId) return;
|
|
@@ -47492,6 +47748,8 @@ function useEligibilityWithDeps(params, deps) {
|
|
|
47492
47748
|
return {
|
|
47493
47749
|
state,
|
|
47494
47750
|
eligibility: state.eligibility,
|
|
47751
|
+
settledRequestKey: state.settledRequestKey,
|
|
47752
|
+
requestKey,
|
|
47495
47753
|
isLoading: state.tag === "loading",
|
|
47496
47754
|
error: state.error,
|
|
47497
47755
|
creditState
|
|
@@ -47913,7 +48171,6 @@ var init_stripeCommissionMetadata = __esmMin((() => {
|
|
|
47913
48171
|
"no_commission_plan",
|
|
47914
48172
|
"billing_evidence_invalid",
|
|
47915
48173
|
"fee_rounds_to_zero",
|
|
47916
|
-
"non_commissionable_scope",
|
|
47917
48174
|
"payment_not_stripe"
|
|
47918
48175
|
];
|
|
47919
48176
|
historicalContext = {
|
|
@@ -49086,6 +49343,71 @@ var init_useEventRegistrationSubmit = __esmMin((() => {
|
|
|
49086
49343
|
};
|
|
49087
49344
|
}));
|
|
49088
49345
|
//#endregion
|
|
49346
|
+
//#region ../blocks/src/system/runtime/nodes/event-registration/useSettledCommerceView.ts
|
|
49347
|
+
function buildCandidate(input) {
|
|
49348
|
+
if (!input.eligibilityIsSettled || !input.eligibility || !input.currentEvent) return null;
|
|
49349
|
+
return {
|
|
49350
|
+
eventSelectionId: input.currentEvent.selectionId,
|
|
49351
|
+
discountContext: resolveDiscountContext({
|
|
49352
|
+
paymentSelection: input.paymentSelection,
|
|
49353
|
+
event: input.currentEvent,
|
|
49354
|
+
eventRequiresPayment: input.eventRequiresPayment,
|
|
49355
|
+
ticketsCount: input.ticketsCount
|
|
49356
|
+
}),
|
|
49357
|
+
subtotalCents: input.eligibility.price,
|
|
49358
|
+
summaryLines: input.eligibility.ticketLines.map((line) => ({
|
|
49359
|
+
pricingOptionId: line.pricingOptionId,
|
|
49360
|
+
label: line.label,
|
|
49361
|
+
quantity: line.quantity,
|
|
49362
|
+
unitPriceCents: line.unitPriceCents,
|
|
49363
|
+
subtotalCents: line.subtotalCents
|
|
49364
|
+
}))
|
|
49365
|
+
};
|
|
49366
|
+
}
|
|
49367
|
+
function eligibilityIsSettled(result) {
|
|
49368
|
+
return result.settledRequestKey === result.requestKey;
|
|
49369
|
+
}
|
|
49370
|
+
function viewIsStale(view, currentEvent, eligibilityState) {
|
|
49371
|
+
return view.eventSelectionId !== currentEvent?.selectionId || eligibilityState?.tag === "failed" || eligibilityState?.tag === "idle";
|
|
49372
|
+
}
|
|
49373
|
+
function requestIsSettled(discountUi) {
|
|
49374
|
+
return discountUi.discountAvailabilityRequestKey === "disabled" || discountUi.settledDiscountAvailabilityRequestKey === discountUi.discountAvailabilityRequestKey;
|
|
49375
|
+
}
|
|
49376
|
+
function discountRequest(view) {
|
|
49377
|
+
const discountContext = view?.discountContext ?? null;
|
|
49378
|
+
return {
|
|
49379
|
+
discountContext,
|
|
49380
|
+
subtotalCents: discountContext?.type === "event" && view?.subtotalCents !== null ? view?.subtotalCents : void 0
|
|
49381
|
+
};
|
|
49382
|
+
}
|
|
49383
|
+
function useSettledCommerceView(input) {
|
|
49384
|
+
const candidate = buildCandidate({
|
|
49385
|
+
eligibilityIsSettled: eligibilityIsSettled(input.eligibilityResult),
|
|
49386
|
+
eligibility: input.eligibility,
|
|
49387
|
+
currentEvent: input.currentEvent,
|
|
49388
|
+
paymentSelection: input.paymentSelection,
|
|
49389
|
+
eventRequiresPayment: input.eventRequiresPayment,
|
|
49390
|
+
ticketsCount: input.ticketsCount
|
|
49391
|
+
});
|
|
49392
|
+
const settledRef = useRef(candidate);
|
|
49393
|
+
if (settledRef.current && viewIsStale(settledRef.current, input.currentEvent, input.eligibilityResult.state)) settledRef.current = null;
|
|
49394
|
+
const requestView = candidate ?? settledRef.current;
|
|
49395
|
+
const discountUi = input.useDiscountCodeUi({
|
|
49396
|
+
api: input.api,
|
|
49397
|
+
...discountRequest(requestView)
|
|
49398
|
+
});
|
|
49399
|
+
if (candidate && requestIsSettled(discountUi)) settledRef.current = candidate;
|
|
49400
|
+
return {
|
|
49401
|
+
discountUi,
|
|
49402
|
+
discountContext: settledRef.current?.discountContext ?? null,
|
|
49403
|
+
ticketSelectionSubtotalCents: settledRef.current?.subtotalCents ?? null,
|
|
49404
|
+
ticketSelectionSummaryLines: settledRef.current?.summaryLines ?? []
|
|
49405
|
+
};
|
|
49406
|
+
}
|
|
49407
|
+
var init_useSettledCommerceView = __esmMin((() => {
|
|
49408
|
+
init_registrationDerivations();
|
|
49409
|
+
}));
|
|
49410
|
+
//#endregion
|
|
49089
49411
|
//#region ../blocks/src/system/runtime/nodes/event-registration/registrationWizardContext.ts
|
|
49090
49412
|
function getEventSelectionDefaults(event) {
|
|
49091
49413
|
const suggestedAmount = getSlidingScaleForEvent(event)?.suggestedAmount;
|
|
@@ -49248,10 +49570,6 @@ function isSoldOutWithoutWaitlist(input) {
|
|
|
49248
49570
|
var init_registrationCompletion = __esmMin((() => {}));
|
|
49249
49571
|
//#endregion
|
|
49250
49572
|
//#region ../blocks/src/system/runtime/nodes/event-registration/useEventRegistrationWizard.ts
|
|
49251
|
-
function resolveDiscountSubtotalCents(context, subtotalCents) {
|
|
49252
|
-
if (context?.type !== "event" || subtotalCents === null) return void 0;
|
|
49253
|
-
return subtotalCents;
|
|
49254
|
-
}
|
|
49255
49573
|
function usesTieredPricing(event) {
|
|
49256
49574
|
return event !== null && event !== void 0 ? publicEventPricingStrategy(event.pricing) === "tiered" : false;
|
|
49257
49575
|
}
|
|
@@ -49694,30 +50012,15 @@ function useEventRegistrationWizardWithDeps(options, deps) {
|
|
|
49694
50012
|
}
|
|
49695
50013
|
setStep("select-tickets");
|
|
49696
50014
|
};
|
|
49697
|
-
const discountContext
|
|
49698
|
-
|
|
49699
|
-
|
|
49700
|
-
|
|
49701
|
-
|
|
49702
|
-
}), [
|
|
50015
|
+
const { discountUi, discountContext, ticketSelectionSubtotalCents, ticketSelectionSummaryLines } = useSettledCommerceView({
|
|
50016
|
+
api,
|
|
50017
|
+
useDiscountCodeUi: deps.useDiscountCodeUi,
|
|
50018
|
+
eligibilityResult,
|
|
50019
|
+
eligibility,
|
|
49703
50020
|
currentEvent,
|
|
49704
50021
|
eventRequiresPayment,
|
|
49705
50022
|
paymentSelection,
|
|
49706
50023
|
ticketsCount
|
|
49707
|
-
]);
|
|
49708
|
-
const ticketSelectionSubtotalCents = eligibility?.price ?? null;
|
|
49709
|
-
const ticketSelectionSummaryLines = useMemo(() => eligibility?.ticketLines.map((line) => ({
|
|
49710
|
-
pricingOptionId: line.pricingOptionId,
|
|
49711
|
-
label: line.label,
|
|
49712
|
-
quantity: line.quantity,
|
|
49713
|
-
unitPriceCents: line.unitPriceCents,
|
|
49714
|
-
subtotalCents: line.subtotalCents
|
|
49715
|
-
})) ?? [], [eligibility]);
|
|
49716
|
-
const discountSubtotalCents = resolveDiscountSubtotalCents(discountContext, ticketSelectionSubtotalCents);
|
|
49717
|
-
const discountUi = deps.useDiscountCodeUi({
|
|
49718
|
-
api,
|
|
49719
|
-
discountContext,
|
|
49720
|
-
subtotalCents: discountSubtotalCents
|
|
49721
50024
|
});
|
|
49722
50025
|
const selectionMethod = paymentSelection.method;
|
|
49723
50026
|
const shouldShowDiscountToggle = discountContext !== null && discountUi.manualCodeEntryAllowed && (selectionMethod === "stripe" || selectionMethod === "pass_bundle" || selectionMethod === "membership_bundle");
|
|
@@ -49896,6 +50199,7 @@ var init_useEventRegistrationWizard = __esmMin((() => {
|
|
|
49896
50199
|
init_useEventRegistrationStripeReturn();
|
|
49897
50200
|
init_useEventRegistrationSubmit();
|
|
49898
50201
|
init_useDiscountCodeUi();
|
|
50202
|
+
init_useSettledCommerceView();
|
|
49899
50203
|
init_utils();
|
|
49900
50204
|
init_ticketSelectionLines();
|
|
49901
50205
|
init_registrationStateMachine();
|
|
@@ -49918,6 +50222,38 @@ var init_useEventRegistrationWizard = __esmMin((() => {
|
|
|
49918
50222
|
};
|
|
49919
50223
|
}));
|
|
49920
50224
|
//#endregion
|
|
50225
|
+
//#region ../blocks/src/system/runtime/nodes/event-registration/useEventCheckoutHandoffRestore.ts
|
|
50226
|
+
function eventRegistrationReloadTarget(location) {
|
|
50227
|
+
return `${location.pathname}${location.search}#${EVENT_REGISTRATION_ANCHOR_ID}`;
|
|
50228
|
+
}
|
|
50229
|
+
function reloadAtEventRegistration() {
|
|
50230
|
+
const target = eventRegistrationReloadTarget(window.location);
|
|
50231
|
+
window.history.replaceState(window.history.state, "", target);
|
|
50232
|
+
window.location.reload();
|
|
50233
|
+
}
|
|
50234
|
+
function useEventCheckoutHandoffRestore(active) {
|
|
50235
|
+
useEventCheckoutHandoffRestoreWithDeps(active, browserCheckoutHandoffRestoreDeps);
|
|
50236
|
+
}
|
|
50237
|
+
function useEventCheckoutHandoffRestoreWithDeps(active, deps) {
|
|
50238
|
+
useEffect(() => {
|
|
50239
|
+
if (!active) return;
|
|
50240
|
+
const handlePageShow = (event) => {
|
|
50241
|
+
if (event.persisted) deps.reloadAtRegistration();
|
|
50242
|
+
};
|
|
50243
|
+
deps.addPageShowListener(handlePageShow);
|
|
50244
|
+
return () => deps.removePageShowListener(handlePageShow);
|
|
50245
|
+
}, [active, deps]);
|
|
50246
|
+
}
|
|
50247
|
+
var browserCheckoutHandoffRestoreDeps;
|
|
50248
|
+
var init_useEventCheckoutHandoffRestore = __esmMin((() => {
|
|
50249
|
+
init_constants();
|
|
50250
|
+
browserCheckoutHandoffRestoreDeps = {
|
|
50251
|
+
addPageShowListener: (listener) => window.addEventListener("pageshow", listener),
|
|
50252
|
+
removePageShowListener: (listener) => window.removeEventListener("pageshow", listener),
|
|
50253
|
+
reloadAtRegistration: reloadAtEventRegistration
|
|
50254
|
+
};
|
|
50255
|
+
}));
|
|
50256
|
+
//#endregion
|
|
49921
50257
|
//#region ../blocks/src/system/runtime/nodes/shared/MagicLinkForm.state.ts
|
|
49922
50258
|
function magicLinkSubmissionReducer(state, action) {
|
|
49923
50259
|
switch (action.type) {
|
|
@@ -106935,6 +107271,7 @@ function EventRegistrationWizard(props) {
|
|
|
106935
107271
|
events: events ?? [],
|
|
106936
107272
|
maxTicketsNum
|
|
106937
107273
|
});
|
|
107274
|
+
useEventCheckoutHandoffRestore(wizard.step === "redirecting");
|
|
106938
107275
|
const [bookingOverlayOpen, setBookingOverlayOpen] = useState(false);
|
|
106939
107276
|
const [floatingPortalRoot, setFloatingPortalRoot] = useState(null);
|
|
106940
107277
|
useEffect(() => {
|
|
@@ -107067,6 +107404,7 @@ var init_EventRegistrationWizard = __esmMin((() => {
|
|
|
107067
107404
|
init_themePortalRoot();
|
|
107068
107405
|
init_buttons();
|
|
107069
107406
|
init_constants();
|
|
107407
|
+
init_useEventCheckoutHandoffRestore();
|
|
107070
107408
|
init_EventRegistrationSurface();
|
|
107071
107409
|
init_EventRegistrationBookingLayer();
|
|
107072
107410
|
EVENT_PORTAL_AUTH_COPY = {
|
|
@@ -113536,6 +113874,7 @@ function useEventPagination({ siteId: _siteId, initialEvents = [], fetchInitialO
|
|
|
113536
113874
|
const eventSurface = filters?.eventSurface;
|
|
113537
113875
|
const eventPresets = normalizeCsvString(filters?.eventPresets);
|
|
113538
113876
|
const scheduleScope = filters?.scheduleScope;
|
|
113877
|
+
const seriesIds = filters?.seriesIds;
|
|
113539
113878
|
const eventsRef = useRef(events);
|
|
113540
113879
|
const loadingRef = useRef(loading);
|
|
113541
113880
|
const hasMoreRef = useRef(hasMore);
|
|
@@ -113563,6 +113902,7 @@ function useEventPagination({ siteId: _siteId, initialEvents = [], fetchInitialO
|
|
|
113563
113902
|
const currentEvents = eventsRef.current;
|
|
113564
113903
|
const lastEvent = options.reset ? void 0 : currentEvents[currentEvents.length - 1];
|
|
113565
113904
|
const newEvents = await getPublicEvents({
|
|
113905
|
+
seriesIds,
|
|
113566
113906
|
afterStartsAt: lastEvent ? lastEvent.startsAt : void 0,
|
|
113567
113907
|
afterId: lastEvent ? lastEvent.occurrenceId : void 0,
|
|
113568
113908
|
limit: pageSize,
|
|
@@ -113601,6 +113941,7 @@ function useEventPagination({ siteId: _siteId, initialEvents = [], fetchInitialO
|
|
|
113601
113941
|
eventSurface,
|
|
113602
113942
|
eventPresets,
|
|
113603
113943
|
scheduleScope,
|
|
113944
|
+
seriesIds,
|
|
113604
113945
|
normalizedCategoryIds,
|
|
113605
113946
|
normalizedStaffMemberId,
|
|
113606
113947
|
normalizedVenueId
|
|
@@ -113610,7 +113951,7 @@ function useEventPagination({ siteId: _siteId, initialEvents = [], fetchInitialO
|
|
|
113610
113951
|
}, [fetchPage]);
|
|
113611
113952
|
const initialFetchAttemptKeyRef = useRef(null);
|
|
113612
113953
|
useEffect(() => {
|
|
113613
|
-
if (!fetchInitialOnMount) return;
|
|
113954
|
+
if (!fetchInitialOnMount || seriesIds === "") return;
|
|
113614
113955
|
if (!filtersMatchInitial) return;
|
|
113615
113956
|
if (initialEventsRef.current.length > 0) return;
|
|
113616
113957
|
if (eventsRef.current.length > 0) return;
|
|
@@ -113624,7 +113965,8 @@ function useEventPagination({ siteId: _siteId, initialEvents = [], fetchInitialO
|
|
|
113624
113965
|
fetchPage,
|
|
113625
113966
|
filtersKey,
|
|
113626
113967
|
filtersMatchInitial,
|
|
113627
|
-
stage
|
|
113968
|
+
stage,
|
|
113969
|
+
seriesIds
|
|
113628
113970
|
]);
|
|
113629
113971
|
const prevFiltersMatchInitialRef = useRef(filtersMatchInitial);
|
|
113630
113972
|
const prevInitialEventsKeyRef = useRef(initialEventsKey);
|
|
@@ -113759,7 +114101,7 @@ var init_useEventFilters_state = __esmMin((() => {
|
|
|
113759
114101
|
* const events = await api.getPublicEvents(params);
|
|
113760
114102
|
* ```
|
|
113761
114103
|
*/
|
|
113762
|
-
function useEventFilters({ showCategoryFilter = "auto", showVenueFilter = false, showStaffFilter = false, preFilterCategoryIds, preFilterStaffMemberId, preFilterVenueId, preFilterEventSurface, preFilterEventPresets, preFilterScheduleScope } = {}) {
|
|
114104
|
+
function useEventFilters({ showCategoryFilter = "auto", showVenueFilter = false, showStaffFilter = false, preFilterSeriesIds, preFilterCategoryIds, preFilterStaffMemberId, preFilterVenueId, preFilterEventSurface, preFilterEventPresets, preFilterScheduleScope } = {}) {
|
|
113763
114105
|
const api = useBlockApi();
|
|
113764
114106
|
const [loadState, dispatchLoadState] = useReducer(eventFiltersLoadReducer, void 0, createInitialEventFiltersLoadState);
|
|
113765
114107
|
const filters = getEventFiltersData(loadState);
|
|
@@ -113908,6 +114250,7 @@ function useEventFilters({ showCategoryFilter = "auto", showVenueFilter = false,
|
|
|
113908
114250
|
setSelectedVenueId("all");
|
|
113909
114251
|
}, []),
|
|
113910
114252
|
getFilterParams: useCallback(() => {
|
|
114253
|
+
if (preFilterSeriesIds != null) return { seriesIds: preFilterSeriesIds };
|
|
113911
114254
|
const params = {};
|
|
113912
114255
|
if (fixedEventSurface) params.eventSurface = fixedEventSurface;
|
|
113913
114256
|
if (fixedEventPresets) params.eventPresets = fixedEventPresets;
|
|
@@ -113921,6 +114264,7 @@ function useEventFilters({ showCategoryFilter = "auto", showVenueFilter = false,
|
|
|
113921
114264
|
params.staffMemberId = fixedStaffMemberId ?? (selectedStaffMemberId !== "all" ? selectedStaffMemberId : void 0);
|
|
113922
114265
|
return params;
|
|
113923
114266
|
}, [
|
|
114267
|
+
preFilterSeriesIds,
|
|
113924
114268
|
allowedCategoryIds,
|
|
113925
114269
|
allowedCategorySet,
|
|
113926
114270
|
fixedEventPresets,
|
|
@@ -113956,25 +114300,12 @@ var init_EventListing_client = __esmMin((() => {
|
|
|
113956
114300
|
const hydration = render.hydration;
|
|
113957
114301
|
const filtersIdBase = useId();
|
|
113958
114302
|
const initialListEvents = useMemo(() => [...display.events], [display.events]);
|
|
113959
|
-
const initialListFilters =
|
|
113960
|
-
eventSurface: hydration.eventSurface,
|
|
113961
|
-
filterEventPresets: hydration.filterEventPresets,
|
|
113962
|
-
scheduleScope: hydration.scheduleScope,
|
|
113963
|
-
filterCategoryIds: hydration.filterCategoryIds,
|
|
113964
|
-
filterStaffMemberId: hydration.filterStaffMemberId,
|
|
113965
|
-
filterVenueId: hydration.filterVenueId
|
|
113966
|
-
}), [
|
|
113967
|
-
hydration.eventSurface,
|
|
113968
|
-
hydration.filterEventPresets,
|
|
113969
|
-
hydration.scheduleScope,
|
|
113970
|
-
hydration.filterCategoryIds,
|
|
113971
|
-
hydration.filterStaffMemberId,
|
|
113972
|
-
hydration.filterVenueId
|
|
113973
|
-
]);
|
|
114303
|
+
const initialListFilters = buildEventRuntimeFilters(hydration);
|
|
113974
114304
|
const { categories, venues, staffMembers, selectedCategoryId, selectedStaffMemberId, selectedVenueId, loading: filtersLoading, shouldShowCategoryFilter, shouldShowVenueFilter, shouldShowStaffFilter, hasActiveFilters, setSelectedCategoryId, setSelectedStaffMemberId, setSelectedVenueId, resetFilters, getFilterParams } = useEventFilters({
|
|
113975
114305
|
showCategoryFilter: hydration.showFilters ? hydration.showCategoryFilter : "never",
|
|
113976
114306
|
showVenueFilter: hydration.showFilters ? hydration.showVenueFilter : false,
|
|
113977
114307
|
showStaffFilter: hydration.showFilters ? hydration.showStaffFilter : false,
|
|
114308
|
+
preFilterSeriesIds: hydration.seriesIds,
|
|
113978
114309
|
preFilterCategoryIds: hydration.filterCategoryIds ?? void 0,
|
|
113979
114310
|
preFilterStaffMemberId: hydration.filterStaffMemberId ?? void 0,
|
|
113980
114311
|
preFilterVenueId: hydration.filterVenueId ?? void 0,
|
|
@@ -114791,6 +115122,7 @@ function toEventCombinedControllerProps(props) {
|
|
|
114791
115122
|
eventSurface: props.render.display.eventSurface,
|
|
114792
115123
|
filterEventPresets: props.render.display.filterEventPresets,
|
|
114793
115124
|
scheduleScope: props.render.display.scheduleScope,
|
|
115125
|
+
seriesIds: props.render.display.seriesIds,
|
|
114794
115126
|
filterCategoryIds: props.render.display.filterCategoryIds,
|
|
114795
115127
|
filterStaffMemberId: props.render.display.filterStaffMemberId,
|
|
114796
115128
|
filterVenueId: props.render.display.filterVenueId,
|
|
@@ -114926,7 +115258,7 @@ var init_EventCombined_client = __esmMin((() => {
|
|
|
114926
115258
|
EventCombinedClient = ({ events: initialEvents, siteId, stage, listLayout = "stack", listColumns = "3", eventsPerPage = 12, paginationAction = {
|
|
114927
115259
|
kind: "loadMore",
|
|
114928
115260
|
label: "Load more events"
|
|
114929
|
-
}, startOfWeek = "monday", calendarTabViews = "both", defaultCalendarView, showFilters, showCategoryFilter = "auto", showVenueFilter, showStaffFilter, eventSurface, filterEventPresets, scheduleScope, filterCategoryIds, filterStaffMemberId, filterVenueId, showVenue, showMap, showCapacity, cardRole, buttonVariant = "primary", buttonText = "Book", emptyMessage = "No upcoming events scheduled.", className, calendarContext, calendarWindow }) => {
|
|
115261
|
+
}, startOfWeek = "monday", calendarTabViews = "both", defaultCalendarView, showFilters, showCategoryFilter = "auto", showVenueFilter, showStaffFilter, eventSurface, filterEventPresets, scheduleScope, seriesIds, filterCategoryIds, filterStaffMemberId, filterVenueId, showVenue, showMap, showCapacity, cardRole, buttonVariant = "primary", buttonText = "Book", emptyMessage = "No upcoming events scheduled.", className, calendarContext, calendarWindow }) => {
|
|
114930
115262
|
const hydrationReady = useHydrationReady();
|
|
114931
115263
|
const fetchInitialEventsOnMount = initialEvents == null;
|
|
114932
115264
|
const resolvedShowFilters = showFilters ?? true;
|
|
@@ -114952,6 +115284,7 @@ var init_EventCombined_client = __esmMin((() => {
|
|
|
114952
115284
|
showCategoryFilter: resolvedShowFilters ? showCategoryFilter : "never",
|
|
114953
115285
|
showVenueFilter: resolvedShowFilters ? resolvedShowVenueFilter : false,
|
|
114954
115286
|
showStaffFilter: resolvedShowFilters ? resolvedShowStaffFilter : false,
|
|
115287
|
+
preFilterSeriesIds: seriesIds,
|
|
114955
115288
|
preFilterCategoryIds: filterCategoryIds,
|
|
114956
115289
|
preFilterStaffMemberId: filterStaffMemberId,
|
|
114957
115290
|
preFilterVenueId: filterVenueId,
|
|
@@ -114959,21 +115292,15 @@ var init_EventCombined_client = __esmMin((() => {
|
|
|
114959
115292
|
preFilterEventPresets: filterEventPresets,
|
|
114960
115293
|
preFilterScheduleScope: resolvedScheduleScope
|
|
114961
115294
|
});
|
|
114962
|
-
const initialListFilters =
|
|
115295
|
+
const initialListFilters = buildEventRuntimeFilters({
|
|
114963
115296
|
eventSurface: resolvedEventSurface,
|
|
114964
115297
|
filterEventPresets,
|
|
114965
115298
|
scheduleScope: resolvedScheduleScope,
|
|
115299
|
+
seriesIds,
|
|
114966
115300
|
filterCategoryIds,
|
|
114967
115301
|
filterStaffMemberId,
|
|
114968
115302
|
filterVenueId
|
|
114969
|
-
})
|
|
114970
|
-
resolvedEventSurface,
|
|
114971
|
-
filterCategoryIds,
|
|
114972
|
-
filterEventPresets,
|
|
114973
|
-
filterStaffMemberId,
|
|
114974
|
-
filterVenueId,
|
|
114975
|
-
resolvedScheduleScope
|
|
114976
|
-
]);
|
|
115303
|
+
});
|
|
114977
115304
|
const listFilters = useMemo(() => getFilterParams(), [getFilterParams]);
|
|
114978
115305
|
const pageSize = eventsPerPage;
|
|
114979
115306
|
const { events: paginatedEvents, loading: eventsLoading, error: eventsError, hasMore, loadMore } = useEventPagination({
|
|
@@ -115242,6 +115569,7 @@ function useEventCalendarFilterState(display) {
|
|
|
115242
115569
|
showCategoryFilter: display.showFilters ? display.showCategoryFilter : "never",
|
|
115243
115570
|
showVenueFilter: display.showFilters ? display.showVenueFilter : false,
|
|
115244
115571
|
showStaffFilter: display.showFilters ? display.showStaffFilter : false,
|
|
115572
|
+
preFilterSeriesIds: display.seriesIds,
|
|
115245
115573
|
preFilterCategoryIds: display.filterCategoryIds,
|
|
115246
115574
|
preFilterStaffMemberId: display.filterStaffMemberId,
|
|
115247
115575
|
preFilterVenueId: display.filterVenueId,
|
|
@@ -115275,6 +115603,7 @@ function buildDisplayFilterParams(display) {
|
|
|
115275
115603
|
eventSurface: display.eventSurface,
|
|
115276
115604
|
filterEventPresets: display.filterEventPresets,
|
|
115277
115605
|
scheduleScope: display.scheduleScope,
|
|
115606
|
+
seriesIds: display.seriesIds,
|
|
115278
115607
|
filterCategoryIds: display.filterCategoryIds,
|
|
115279
115608
|
filterStaffMemberId: display.filterStaffMemberId,
|
|
115280
115609
|
filterVenueId: display.filterVenueId
|
|
@@ -115321,6 +115650,7 @@ var init_EventCalendar_client = __esmMin((() => {
|
|
|
115321
115650
|
eventSurface: display.eventSurface,
|
|
115322
115651
|
filterEventPresets: display.filterEventPresets,
|
|
115323
115652
|
scheduleScope: display.scheduleScope,
|
|
115653
|
+
seriesIds: display.seriesIds,
|
|
115324
115654
|
filterCategoryIds: display.filterCategoryIds,
|
|
115325
115655
|
filterStaffMemberId: display.filterStaffMemberId,
|
|
115326
115656
|
filterVenueId: display.filterVenueId,
|
|
@@ -115344,6 +115674,7 @@ var init_EventCalendar_client = __esmMin((() => {
|
|
|
115344
115674
|
const { display, hydration } = render;
|
|
115345
115675
|
const filters = useMemo(() => buildDisplayFilterParams(display), [
|
|
115346
115676
|
display.eventSurface,
|
|
115677
|
+
display.seriesIds,
|
|
115347
115678
|
display.filterCategoryIds,
|
|
115348
115679
|
display.filterEventPresets,
|
|
115349
115680
|
display.filterStaffMemberId,
|
|
@@ -116129,7 +116460,7 @@ function NewsletterFormClient({ render }) {
|
|
|
116129
116460
|
if (submitTarget.tag === "unavailable") {
|
|
116130
116461
|
dispatchSubmission({
|
|
116131
116462
|
type: "failed",
|
|
116132
|
-
error: newsletterFormError(
|
|
116463
|
+
error: newsletterFormError(SIGNUPS_PAUSED_MESSAGE)
|
|
116133
116464
|
});
|
|
116134
116465
|
return;
|
|
116135
116466
|
}
|
|
@@ -116140,14 +116471,16 @@ function NewsletterFormClient({ render }) {
|
|
|
116140
116471
|
});
|
|
116141
116472
|
return;
|
|
116142
116473
|
}
|
|
116143
|
-
const
|
|
116144
|
-
|
|
116474
|
+
const selection = readVisitorSelection(formData, render.hydration);
|
|
116475
|
+
const selectionError = visitorSelectionError(selection);
|
|
116476
|
+
if (selectionError) {
|
|
116145
116477
|
dispatchSubmission({
|
|
116146
116478
|
type: "failed",
|
|
116147
|
-
error:
|
|
116479
|
+
error: selectionError
|
|
116148
116480
|
});
|
|
116149
116481
|
return;
|
|
116150
116482
|
}
|
|
116483
|
+
const visitorSelection = selection.tag === "chosen" ? selection.value : void 0;
|
|
116151
116484
|
dispatchSubmission({ type: "submitted" });
|
|
116152
116485
|
try {
|
|
116153
116486
|
const result = await api.subscribeNewsletter({
|
|
@@ -116341,10 +116674,18 @@ function transportFailureMessage(err) {
|
|
|
116341
116674
|
}
|
|
116342
116675
|
return RETRY_SHORTLY_MESSAGE;
|
|
116343
116676
|
}
|
|
116677
|
+
function visitorSelectionError(selection) {
|
|
116678
|
+
switch (selection.tag) {
|
|
116679
|
+
case "nothing_chosen": return newsletterFieldError(TOPIC_CHOICE_FIELD_ID, "Choose at least one email topic.");
|
|
116680
|
+
case "unusable": return newsletterFormError(SIGNUPS_PAUSED_MESSAGE);
|
|
116681
|
+
case "not_offered":
|
|
116682
|
+
case "chosen": return null;
|
|
116683
|
+
}
|
|
116684
|
+
}
|
|
116344
116685
|
function readVisitorSelection(formData, hydration) {
|
|
116345
|
-
if (hydration.choicePresentation !== "visitor_choice") return
|
|
116686
|
+
if (hydration.choicePresentation !== "visitor_choice") return { tag: "not_offered" };
|
|
116346
116687
|
const ids = formData.getAll(TOPIC_CHOICE_FIELD_ID).flatMap((value) => typeof value === "string" ? [value] : []);
|
|
116347
|
-
if (ids.length === 0) return
|
|
116688
|
+
if (ids.length === 0) return { tag: "nothing_chosen" };
|
|
116348
116689
|
const raw = hydration.choiceProvider === "native" ? {
|
|
116349
116690
|
provider: "native",
|
|
116350
116691
|
topicIds: ids
|
|
@@ -116355,9 +116696,12 @@ function readVisitorSelection(formData, hydration) {
|
|
|
116355
116696
|
provider: "mailchimp",
|
|
116356
116697
|
interestIds: ids
|
|
116357
116698
|
} : null;
|
|
116358
|
-
if (raw === null) return
|
|
116699
|
+
if (raw === null) return { tag: "unusable" };
|
|
116359
116700
|
const parsed = parseMailingListVisitorSelection(raw);
|
|
116360
|
-
return parsed.ok ?
|
|
116701
|
+
return parsed.ok ? {
|
|
116702
|
+
tag: "chosen",
|
|
116703
|
+
value: parsed.value
|
|
116704
|
+
} : { tag: "unusable" };
|
|
116361
116705
|
}
|
|
116362
116706
|
function publicSignupError(outcome) {
|
|
116363
116707
|
switch (outcome.tag) {
|