@riverbankcms/sdk 0.140.0 → 0.141.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-Q-fy9GYw.mjs} +3 -3
- package/dist/{PreviewEditorUI-Agkw4v5i.mjs → PreviewEditorUI-LYGzgk85.mjs} +2 -2
- package/dist/{SdkPreviewModeRuntime-DdbeAdS8.mjs → SdkPreviewModeRuntime-CoPYI5Jq.mjs} +72 -46
- package/dist/{SiteChromeCustomizeContext-CqGOz-Kv.mjs → SiteChromeCustomizeContext-D8LePX8x.mjs} +681 -196
- 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/footerCompositionContracts.d.ts +25 -0
- package/dist/_dts/api/src/index.d.ts +1 -1
- 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/siteManagementEndpoints.d.ts +3 -26
- package/dist/_dts/api/src/siteOnboarding.d.ts +7 -0
- package/dist/_dts/billing/src/site-arrangements.d.ts +12 -3
- 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/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 +7 -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/db/src/generated/supabase/database.types.d.ts +3 -0
- package/dist/_dts/editor-blocks/src/widgets/site-option-picker/loaders.d.ts +27 -1
- package/dist/_dts/sdk/src/public-api/contracts.d.ts +1 -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/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/client/{BookingConsentAgreement-CuKa82V4.mjs → BookingConsentAgreement-xJeYNdnb.mjs} +2 -2
- package/dist/client/{DiscountCodeDisclosure-BbYieKWB.mjs → DiscountCodeDisclosure-DdT6uzl9.mjs} +1 -1
- package/dist/client/{EventCombined.client-LTfR1Aby.mjs → EventCombined.client-Cp28uYuM.mjs} +11 -15
- package/dist/client/{EventListing.client-DUHpYSuo.mjs → EventListing.client-CD6AJsMr.mjs} +4 -17
- package/dist/client/{LeafletStaticMap-CHRupL6m.mjs → LeafletStaticMap-DBsAi9-e.mjs} +1 -1
- package/dist/client/{accordion-6HiIFxNL.mjs → accordion-6dwbOKYR.mjs} +1 -1
- package/dist/client/{bookingForm-Dlmid43H.mjs → bookingForm-CZE9_qPQ.mjs} +5 -5
- package/dist/client/bookings.mjs +175 -93
- package/dist/client/{carousel-DmkZRRq_.mjs → carousel-7VHGQARz.mjs} +1 -1
- package/dist/client/{cart-CIC24330.mjs → cart-Qg_mvQhh.mjs} +3 -3
- package/dist/client/{checkout-D1Zw9imo.mjs → checkout-D84rpgdr.mjs} +3 -3
- package/dist/client/client.mjs +602 -139
- package/dist/client/{context-Cy1OayHx.mjs → context-Ctp3T0Wr.mjs} +1 -1
- package/dist/client/{dates-aDcfoLHr.mjs → dates-DJKFcI_N.mjs} +2 -2
- package/dist/client/{eventCalendar-FQxMPAjf.mjs → eventCalendar-CK31z3vs.mjs} +11 -7
- package/dist/client/{eventCombined-Dr3ac6Hb.mjs → eventCombined-DiXd-ewn.mjs} +3 -3
- package/dist/client/{eventDetails-D-AzUHFQ.mjs → eventDetails-CTRgt2DK.mjs} +4 -4
- package/dist/client/{eventListing-B3XxBf3i.mjs → eventListing-Dy9vi_j_.mjs} +3 -3
- package/dist/client/{eventRegistration-I6EaokFD.mjs → eventRegistration-CnalYMr2.mjs} +124 -31
- package/dist/client/{form-BbWckVWY.mjs → form-eUiMveTT.mjs} +2 -2
- package/dist/client/{headerSection-C9qU4Y7x.mjs → headerSection-Dy9kQpB1.mjs} +2 -2
- package/dist/client/hooks.mjs +247 -32
- package/dist/client/{locationMap-CLCShvlG.mjs → locationMap-DalCmWU0.mjs} +2 -2
- package/dist/client/{newsletterForm-Briukxzi.mjs → newsletterForm-SDDPvhS0.mjs} +23 -10
- package/dist/client/{pricing-Copadu-2.mjs → pricing-OcMz4SnX.mjs} +1 -1
- package/dist/client/{productDetail-oujlRd-r.mjs → productDetail-BQrgHElM.mjs} +3 -3
- package/dist/client/{productList-BRiIRUcd.mjs → productList-OnPn_UJj.mjs} +3 -3
- package/dist/client/{propsDecoder-CB2KS_ko.mjs → propsDecoder-zBdsnS-N.mjs} +38 -8
- package/dist/client/rendering/client.mjs +446 -121
- package/dist/client/rendering/islands.mjs +17 -17
- package/dist/client/rendering.mjs +601 -138
- package/dist/client/{scrollToBlock-B1IS1_ua.mjs → scrollToBlock-BNM4Ob2Y.mjs} +28 -11
- package/dist/client/{shop-Vn6yNFED.mjs → shop-Bv1fPTwQ.mjs} +6 -6
- package/dist/client/{shop-commerce-BVTqipYp.mjs → shop-commerce-D4KNGaW8.mjs} +5 -5
- package/dist/client/{shop-commerce-store-BVnJVy7v.mjs → shop-commerce-store-2N5EV0Rc.mjs} +1 -1
- package/dist/client/{shopShared-COIeK77T.mjs → shopShared-DvJGdHTV.mjs} +3 -3
- package/dist/client/{useEventFilters-DzIUcS9n.mjs → useEventFilters-BBBvGDHQ.mjs} +17 -11
- package/dist/preview-next/client/runtime.mjs +3 -3
- package/dist/preview-next/editor-chrome.css +4 -8
- package/dist/{sdk-runtime-CnCLvZRv.mjs → sdk-runtime-Defnbfzw.mjs} +1 -1
- package/dist/{separator-DKDRJ1oH.mjs → separator-CZXO3Sb0.mjs} +1 -1
- package/dist/server/components.mjs +384 -62
- package/dist/server/config-validation.mjs +232 -26
- package/dist/server/config.mjs +232 -26
- package/dist/server/data.mjs +247 -32
- package/dist/server/index.mjs +1 -1
- package/dist/server/next.mjs +400 -69
- package/dist/server/page-converter.mjs +189 -25
- package/dist/server/prebuild.mjs +1 -1
- package/dist/server/rendering/server.mjs +399 -68
- package/dist/server/rendering.mjs +399 -68
- package/dist/server/routing.mjs +261 -33
- package/dist/server/server.mjs +248 -33
- package/dist/server/theme-bridge.mjs +47 -15
- package/dist/server/theme.mjs +1 -1
- 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
|
|
@@ -4466,6 +4466,12 @@ var init_parseThemeForPersistence = __esmMin((() => {
|
|
|
4466
4466
|
init_types$14();
|
|
4467
4467
|
}));
|
|
4468
4468
|
//#endregion
|
|
4469
|
+
//#region ../theme-core/src/buttons/affordanceSuppression.ts
|
|
4470
|
+
var AFFORDANCE_SUPPRESS_CLASS;
|
|
4471
|
+
var init_affordanceSuppression = __esmMin((() => {
|
|
4472
|
+
AFFORDANCE_SUPPRESS_CLASS = "rb-affordance-off";
|
|
4473
|
+
}));
|
|
4474
|
+
//#endregion
|
|
4469
4475
|
//#region ../theme-core/src/buttons/classNames.ts
|
|
4470
4476
|
/**
|
|
4471
4477
|
* Parse content/runtime variant identifiers into the closed theme-button class
|
|
@@ -4493,7 +4499,29 @@ function themeButtonClassName(spec) {
|
|
|
4493
4499
|
spec.extraClassName
|
|
4494
4500
|
].filter(Boolean).join(" ");
|
|
4495
4501
|
}
|
|
4502
|
+
/**
|
|
4503
|
+
* Button classes for an authored button that renders its own trailing icon.
|
|
4504
|
+
*
|
|
4505
|
+
* A separate function rather than a flag on `themeButtonClassName`, because
|
|
4506
|
+
* there is exactly one caller and it should stay visible in a diff. The name
|
|
4507
|
+
* states what the caller knows to be true of its own markup — that it renders a
|
|
4508
|
+
* trailing icon — rather than what the theme does about it. The consequence is
|
|
4509
|
+
* the theme's to decide and to change; a caller naming the consequence would be
|
|
4510
|
+
* asserting a policy it does not own, and would quietly become a lie the moment
|
|
4511
|
+
* that policy moved.
|
|
4512
|
+
*
|
|
4513
|
+
* Do not reach for this to remove an arrow you simply do not want. A trailing
|
|
4514
|
+
* affordance is declared by the button style, and a block overriding that is the
|
|
4515
|
+
* defect this replaced.
|
|
4516
|
+
*/
|
|
4517
|
+
function themeButtonClassNameWithTrailingIcon(spec) {
|
|
4518
|
+
return themeButtonClassName({
|
|
4519
|
+
...spec,
|
|
4520
|
+
extraClassName: [spec.extraClassName, AFFORDANCE_SUPPRESS_CLASS].filter(Boolean).join(" ")
|
|
4521
|
+
});
|
|
4522
|
+
}
|
|
4496
4523
|
var init_classNames = __esmMin((() => {
|
|
4524
|
+
init_affordanceSuppression();
|
|
4497
4525
|
init_types$14();
|
|
4498
4526
|
}));
|
|
4499
4527
|
var init_tokens$1 = __esmMin((() => {}));
|
|
@@ -4992,7 +5020,7 @@ var init_buttonSurfaceContext = __esmMin((() => {
|
|
|
4992
5020
|
init_types$14();
|
|
4993
5021
|
})), init_resolvedButtonCss = __esmMin((() => {
|
|
4994
5022
|
init_buttonSurfaceContext();
|
|
4995
|
-
}))
|
|
5023
|
+
}));
|
|
4996
5024
|
var init_generateButtonCss = __esmMin((() => {
|
|
4997
5025
|
init_types$14();
|
|
4998
5026
|
init_classNames();
|
|
@@ -5007,7 +5035,7 @@ var init_generateButtonCss = __esmMin((() => {
|
|
|
5007
5035
|
init_resolveButtonColourStates();
|
|
5008
5036
|
init_resolvedButtonCss();
|
|
5009
5037
|
init_buttonSurfaceContext();
|
|
5010
|
-
|
|
5038
|
+
init_affordanceSuppression();
|
|
5011
5039
|
buttonSizeNameSchema.options;
|
|
5012
5040
|
}));
|
|
5013
5041
|
//#endregion
|
|
@@ -9335,6 +9363,7 @@ function calendarQueryKey(siteId, stage, filters) {
|
|
|
9335
9363
|
filters.eventSurface ?? "all",
|
|
9336
9364
|
normalizedCsv(filters.eventPresets),
|
|
9337
9365
|
filters.scheduleScope ?? "any",
|
|
9366
|
+
...filters.seriesIds === void 0 ? [] : [normalizedCsv(filters.seriesIds)],
|
|
9338
9367
|
normalizedCsv(filters.categoryIds),
|
|
9339
9368
|
normalizeCalendarFilterId(filters.venueId) ?? "",
|
|
9340
9369
|
normalizeCalendarFilterId(filters.staffMemberId) ?? "",
|
|
@@ -9412,6 +9441,7 @@ var init_calendarWindow = __esmMin((() => {
|
|
|
9412
9441
|
eventSurface: z.enum(eventSurfaceScopeValues).optional(),
|
|
9413
9442
|
eventPresets: z.string().optional(),
|
|
9414
9443
|
scheduleScope: z.enum(eventScheduleScopeValues).optional(),
|
|
9444
|
+
seriesIds: z.string().optional(),
|
|
9415
9445
|
categoryIds: z.string().optional(),
|
|
9416
9446
|
venueId: z.string().transform(normalizeCalendarFilterId).optional(),
|
|
9417
9447
|
staffMemberId: z.string().transform(normalizeCalendarFilterId).optional()
|
|
@@ -13582,17 +13612,16 @@ const ButtonNode = ({ value, children, href, variantId = "primary", size = "md",
|
|
|
13582
13612
|
console.warn("[ButtonNode] Missing href for link-required button");
|
|
13583
13613
|
return null;
|
|
13584
13614
|
}
|
|
13585
|
-
const extraClassName = affordanceIcon ? [className, AFFORDANCE_SUPPRESS_CLASS].filter(Boolean).join(" ") : className;
|
|
13586
13615
|
const resolvedVariantId = parseThemeButtonVariantId(variantId);
|
|
13587
13616
|
if (variantId && !resolvedVariantId) {
|
|
13588
13617
|
console.error("[ButtonNode] Invalid button variant", { variantId });
|
|
13589
13618
|
return null;
|
|
13590
13619
|
}
|
|
13591
|
-
const combinedClassName = resolvedVariantId ? themeButtonClassName({
|
|
13620
|
+
const combinedClassName = resolvedVariantId ? (affordanceIcon ? themeButtonClassNameWithTrailingIcon : themeButtonClassName)({
|
|
13592
13621
|
variant: resolvedVariantId,
|
|
13593
13622
|
size,
|
|
13594
|
-
extraClassName
|
|
13595
|
-
}) :
|
|
13623
|
+
extraClassName: className
|
|
13624
|
+
}) : className;
|
|
13596
13625
|
if (resolvedHref) return /* @__PURE__ */ jsxs("a", {
|
|
13597
13626
|
href: resolvedHref,
|
|
13598
13627
|
target,
|
|
@@ -15192,6 +15221,7 @@ const publicPricingSchema = z.object({
|
|
|
15192
15221
|
});
|
|
15193
15222
|
const publicAppointmentServiceSchema = z.object({
|
|
15194
15223
|
id: z.string().min(1),
|
|
15224
|
+
slug: z.string().min(1).optional(),
|
|
15195
15225
|
title: z.string(),
|
|
15196
15226
|
description: z.string().nullable().optional(),
|
|
15197
15227
|
durationMinutes: z.number().int().positive(),
|
|
@@ -15268,7 +15298,7 @@ function formatAmountOrFree(amount, currency) {
|
|
|
15268
15298
|
currency
|
|
15269
15299
|
}, { decimals: "auto" });
|
|
15270
15300
|
}
|
|
15271
|
-
function buildRows(services, pathname) {
|
|
15301
|
+
function buildRows(services, pathname, servicePathPrefix) {
|
|
15272
15302
|
return services.map((service) => ({
|
|
15273
15303
|
id: service.id,
|
|
15274
15304
|
title: service.title,
|
|
@@ -15279,7 +15309,8 @@ function buildRows(services, pathname) {
|
|
|
15279
15309
|
href: resolveDedicatedBookingHref(pathname, {
|
|
15280
15310
|
kind: "appointment_service",
|
|
15281
15311
|
serviceId: service.id
|
|
15282
|
-
})
|
|
15312
|
+
}),
|
|
15313
|
+
detailsHref: servicePathPrefix && service.slug ? `${servicePathPrefix.replace(/\/$/, "")}/${encodeURIComponent(service.slug)}` : null
|
|
15283
15314
|
}));
|
|
15284
15315
|
}
|
|
15285
15316
|
function buildAppointmentServicesView(input) {
|
|
@@ -15298,13 +15329,14 @@ function buildAppointmentServicesView(input) {
|
|
|
15298
15329
|
};
|
|
15299
15330
|
return {
|
|
15300
15331
|
kind: "items",
|
|
15301
|
-
rows: buildRows(parsed.services, input.pathname)
|
|
15332
|
+
rows: buildRows(parsed.services, input.pathname, input.servicePathPrefix ?? null)
|
|
15302
15333
|
};
|
|
15303
15334
|
}
|
|
15304
|
-
function AppointmentServicesNode({ sectionHeading, services, pathname, className }) {
|
|
15335
|
+
function AppointmentServicesNode({ sectionHeading, services, pathname, servicePathPrefix, className }) {
|
|
15305
15336
|
const view = buildAppointmentServicesView({
|
|
15306
15337
|
services,
|
|
15307
|
-
pathname: typeof pathname === "string" ? pathname : void 0
|
|
15338
|
+
pathname: typeof pathname === "string" ? pathname : void 0,
|
|
15339
|
+
servicePathPrefix: typeof servicePathPrefix === "string" ? servicePathPrefix : null
|
|
15308
15340
|
});
|
|
15309
15341
|
const rootClassName = `appointment-services ${className ?? ""}`.trim();
|
|
15310
15342
|
const RowTitle = sectionHeading ? "h3" : "h2";
|
|
@@ -15335,7 +15367,10 @@ function AppointmentServicesNode({ sectionHeading, services, pathname, className
|
|
|
15335
15367
|
children: [
|
|
15336
15368
|
/* @__PURE__ */ jsx(RowTitle, {
|
|
15337
15369
|
className: "appointment-services-row-title rb-text-lg rb-font-medium rb-leading-tight",
|
|
15338
|
-
children: row.
|
|
15370
|
+
children: row.detailsHref ? /* @__PURE__ */ jsx("a", {
|
|
15371
|
+
href: row.detailsHref,
|
|
15372
|
+
children: row.title
|
|
15373
|
+
}) : row.title
|
|
15339
15374
|
}),
|
|
15340
15375
|
row.description ? /* @__PURE__ */ jsx("p", {
|
|
15341
15376
|
className: "appointment-services-row-description rb-text-sm rb-leading-6 status-muted",
|
|
@@ -18458,12 +18493,12 @@ var init_EventCompactRow = __esmMin((() => {
|
|
|
18458
18493
|
}), cta.hidden ? /* @__PURE__ */ jsx("span", {
|
|
18459
18494
|
className: "event-compact-row-status",
|
|
18460
18495
|
children: cta.label
|
|
18461
|
-
}) : /* @__PURE__ */
|
|
18496
|
+
}) : /* @__PURE__ */ jsx("a", {
|
|
18462
18497
|
href: cta.href,
|
|
18463
18498
|
target: cta.external ? "_blank" : void 0,
|
|
18464
18499
|
rel: cta.external ? "noopener noreferrer" : void 0,
|
|
18465
18500
|
className: `${buttonClass} event-compact-row-cta`,
|
|
18466
|
-
children:
|
|
18501
|
+
children: /* @__PURE__ */ jsx("span", { children: cta.label })
|
|
18467
18502
|
})]
|
|
18468
18503
|
})]
|
|
18469
18504
|
})]
|
|
@@ -18698,6 +18733,14 @@ var init_contract_schemas = __esmMin((() => {
|
|
|
18698
18733
|
"week"
|
|
18699
18734
|
]);
|
|
18700
18735
|
}));
|
|
18736
|
+
/** Undefined means discovery; an empty string is an explicitly empty selection. */
|
|
18737
|
+
function eventSeriesScopeCsv(value) {
|
|
18738
|
+
if (value == null) return void 0;
|
|
18739
|
+
return typeof value === "string" ? value : value.join(",");
|
|
18740
|
+
}
|
|
18741
|
+
var init_eventSelection = __esmMin((() => {
|
|
18742
|
+
init_src$2();
|
|
18743
|
+
}));
|
|
18701
18744
|
//#endregion
|
|
18702
18745
|
//#region ../blocks/src/system/blocks/events/shared/types.ts
|
|
18703
18746
|
var init_types$6 = __esmMin((() => {}));
|
|
@@ -20011,6 +20054,7 @@ function normalizeFilterId(value) {
|
|
|
20011
20054
|
return id === "all" ? void 0 : id;
|
|
20012
20055
|
}
|
|
20013
20056
|
function buildEventRuntimeFilters(input) {
|
|
20057
|
+
if (input.seriesIds != null) return { seriesIds: input.seriesIds };
|
|
20014
20058
|
const params = {};
|
|
20015
20059
|
if (input.eventSurface && input.eventSurface !== "all") params.eventSurface = input.eventSurface;
|
|
20016
20060
|
const eventPresets = normalizeCsvString(input.filterEventPresets);
|
|
@@ -20026,6 +20070,7 @@ function buildEventRuntimeFilters(input) {
|
|
|
20026
20070
|
}
|
|
20027
20071
|
function getEventRuntimeFiltersKey(filters) {
|
|
20028
20072
|
return JSON.stringify({
|
|
20073
|
+
seriesIds: filters?.seriesIds == null ? null : [...new Set(filters.seriesIds.split(",").filter(Boolean))].sort().join(","),
|
|
20029
20074
|
categoryIds: normalizeCsvString(filters?.categoryIds),
|
|
20030
20075
|
staffMemberId: normalizeOptionalId(filters?.staffMemberId),
|
|
20031
20076
|
venueId: normalizeOptionalId(filters?.venueId),
|
|
@@ -20086,11 +20131,15 @@ function buildEventCollectionDisplay(source) {
|
|
|
20086
20131
|
};
|
|
20087
20132
|
}
|
|
20088
20133
|
function buildEventCollectionFilterDisplay(source) {
|
|
20089
|
-
|
|
20090
|
-
|
|
20091
|
-
|
|
20092
|
-
|
|
20093
|
-
|
|
20134
|
+
const selected = source.seriesIds != null;
|
|
20135
|
+
const matchingFilters = selected ? {
|
|
20136
|
+
eventSurface: "all",
|
|
20137
|
+
filterEventPresets: null,
|
|
20138
|
+
scheduleScope: "any",
|
|
20139
|
+
filterCategoryIds: null,
|
|
20140
|
+
filterStaffMemberId: null,
|
|
20141
|
+
filterVenueId: null
|
|
20142
|
+
} : {
|
|
20094
20143
|
eventSurface: normalizeEventSurfaceScope(source.eventSurface),
|
|
20095
20144
|
filterEventPresets: normalizeEventSurfacePresetsCsv(source.filterEventPresets),
|
|
20096
20145
|
scheduleScope: normalizeEventScheduleScope(source.scheduleScope),
|
|
@@ -20098,6 +20147,14 @@ function buildEventCollectionFilterDisplay(source) {
|
|
|
20098
20147
|
filterStaffMemberId: normalizeEventStaffMemberId(source.filterStaffMemberId),
|
|
20099
20148
|
filterVenueId: normalizeEventVenueId(source.filterVenueId)
|
|
20100
20149
|
};
|
|
20150
|
+
return {
|
|
20151
|
+
seriesIds: eventSeriesScopeCsv(source.seriesIds),
|
|
20152
|
+
showFilters: selected ? false : source.showFilters ?? true,
|
|
20153
|
+
showCategoryFilter: source.showCategoryFilter ?? "auto",
|
|
20154
|
+
showVenueFilter: source.showVenueFilter ?? false,
|
|
20155
|
+
showStaffFilter: source.showStaffFilter ?? true,
|
|
20156
|
+
...matchingFilters
|
|
20157
|
+
};
|
|
20101
20158
|
}
|
|
20102
20159
|
function buildEventCollectionPresentationDisplay(source) {
|
|
20103
20160
|
return {
|
|
@@ -20112,14 +20169,15 @@ function buildEventCollectionPresentationDisplay(source) {
|
|
|
20112
20169
|
}
|
|
20113
20170
|
function buildEventCollectionHydration(source, now = /* @__PURE__ */ new Date()) {
|
|
20114
20171
|
const timeZone = source.calendarWindow?.scope.timeZone ?? toBookingTimeZone(source.bookingTimeZone);
|
|
20172
|
+
const selected = source.seriesIds != null;
|
|
20115
20173
|
return {
|
|
20116
20174
|
calendarWindow: source.calendarWindow ?? void 0,
|
|
20117
20175
|
siteId: source.siteId,
|
|
20118
20176
|
stage: source.stage,
|
|
20119
20177
|
prefetchedEvents: source.events != null,
|
|
20120
|
-
eventSurface: normalizeEventSurfaceScope(source.eventSurface),
|
|
20121
|
-
filterEventPresets: normalizeEventSurfacePresetsCsv(source.filterEventPresets),
|
|
20122
|
-
scheduleScope: normalizeEventScheduleScope(source.scheduleScope),
|
|
20178
|
+
eventSurface: selected ? "all" : normalizeEventSurfaceScope(source.eventSurface),
|
|
20179
|
+
filterEventPresets: selected ? null : normalizeEventSurfacePresetsCsv(source.filterEventPresets),
|
|
20180
|
+
scheduleScope: selected ? "any" : normalizeEventScheduleScope(source.scheduleScope),
|
|
20123
20181
|
calendarContext: {
|
|
20124
20182
|
timeZone,
|
|
20125
20183
|
initialToday: source.calendarWindow?.initialToday ?? getLocalScheduleDate(now, timeZone)
|
|
@@ -20148,6 +20206,7 @@ function buildEventCollectionListingDisplay(display, prefetchedEvents, className
|
|
|
20148
20206
|
}
|
|
20149
20207
|
var eventSurfaceScopeSchema$1, eventScheduleScopeSchema$1, eventCollectionFilterSourceSchemaShape, eventCollectionSourceSchemaShape, eventCollectionDisplaySchemaShape, eventCollectionHydrationSchema;
|
|
20150
20208
|
var init_eventCollectionContract = __esmMin((() => {
|
|
20209
|
+
init_eventSelection();
|
|
20151
20210
|
init_calendarWindow();
|
|
20152
20211
|
init_cards();
|
|
20153
20212
|
init_src$2();
|
|
@@ -20166,6 +20225,7 @@ var init_eventCollectionContract = __esmMin((() => {
|
|
|
20166
20225
|
eventSurface: eventSurfaceScopeSchema$1.nullable().optional(),
|
|
20167
20226
|
filterEventPresets: z.union([z.string(), z.array(z.string())]).nullable().optional(),
|
|
20168
20227
|
scheduleScope: eventScheduleScopeSchema$1.nullable().optional(),
|
|
20228
|
+
seriesIds: z.union([z.string(), z.array(z.string())]).nullable().optional(),
|
|
20169
20229
|
filterCategoryIds: z.union([z.string(), z.array(z.string())]).nullable().optional(),
|
|
20170
20230
|
filterStaffMemberId: z.string().nullable().optional(),
|
|
20171
20231
|
filterVenueId: z.string().nullable().optional()
|
|
@@ -20212,6 +20272,7 @@ var init_eventCollectionContract = __esmMin((() => {
|
|
|
20212
20272
|
eventSurface: eventSurfaceScopeSchema$1,
|
|
20213
20273
|
filterEventPresets: z.string().nullable(),
|
|
20214
20274
|
scheduleScope: eventScheduleScopeSchema$1,
|
|
20275
|
+
seriesIds: z.string().nullable().optional(),
|
|
20215
20276
|
filterCategoryIds: z.string().nullable(),
|
|
20216
20277
|
filterStaffMemberId: z.string().nullable(),
|
|
20217
20278
|
filterVenueId: z.string().nullable(),
|
|
@@ -20743,7 +20804,6 @@ function OfferingsCatalogue(props) {
|
|
|
20743
20804
|
//#endregion
|
|
20744
20805
|
//#region ../blocks/src/system/runtime/nodes/offerings-preview-content.tsx
|
|
20745
20806
|
init_buttons();
|
|
20746
|
-
init_svg();
|
|
20747
20807
|
init_shared$3();
|
|
20748
20808
|
function OfferingsPreviewContent(props) {
|
|
20749
20809
|
const groupLinkClass = themeButtonClassName({
|
|
@@ -20790,13 +20850,10 @@ function OfferingsPreviewContent(props) {
|
|
|
20790
20850
|
}),
|
|
20791
20851
|
groupCta ? /* @__PURE__ */ jsx("footer", {
|
|
20792
20852
|
className: "offerings-preview-card-footer rb-mt-auto rb-flex",
|
|
20793
|
-
children: /* @__PURE__ */
|
|
20853
|
+
children: /* @__PURE__ */ jsx("a", {
|
|
20794
20854
|
className: groupLinkClass,
|
|
20795
20855
|
href: groupCta.href,
|
|
20796
|
-
children:
|
|
20797
|
-
"aria-hidden": "true",
|
|
20798
|
-
className: "offerings-preview-link-icon rb-h-4 rb-w-4"
|
|
20799
|
-
})]
|
|
20856
|
+
children: /* @__PURE__ */ jsx("span", { children: groupCta.label })
|
|
20800
20857
|
})
|
|
20801
20858
|
}) : null
|
|
20802
20859
|
]
|
|
@@ -28906,6 +28963,7 @@ var init_schema = __esmMin((() => {
|
|
|
28906
28963
|
];
|
|
28907
28964
|
siteOptionSources = [
|
|
28908
28965
|
"eventCategories",
|
|
28966
|
+
"eventSeries",
|
|
28909
28967
|
"venues",
|
|
28910
28968
|
"staffMembers"
|
|
28911
28969
|
];
|
|
@@ -34465,6 +34523,66 @@ const formBlockDefinition = {
|
|
|
34465
34523
|
runtime: formBlockRuntime
|
|
34466
34524
|
};
|
|
34467
34525
|
//#endregion
|
|
34526
|
+
//#region ../blocks/src/system/blocks/events/eventSelectionFields.ts
|
|
34527
|
+
init_schema();
|
|
34528
|
+
const eventSelectionFields = [{
|
|
34529
|
+
id: "eventSelection",
|
|
34530
|
+
type: "select",
|
|
34531
|
+
label: "Events to show",
|
|
34532
|
+
required: false,
|
|
34533
|
+
multiple: false,
|
|
34534
|
+
defaultValue: "matching",
|
|
34535
|
+
options: [{
|
|
34536
|
+
value: "matching",
|
|
34537
|
+
label: "All matching events"
|
|
34538
|
+
}, {
|
|
34539
|
+
value: "selected",
|
|
34540
|
+
label: "Selected events"
|
|
34541
|
+
}],
|
|
34542
|
+
ui: { intent: "behavior" }
|
|
34543
|
+
}, createSiteOptionSelectField({
|
|
34544
|
+
id: "selectedEventSeriesIds",
|
|
34545
|
+
label: "Selected events",
|
|
34546
|
+
description: "Show upcoming dates for these events. Other event filters do not apply.",
|
|
34547
|
+
required: false,
|
|
34548
|
+
multiple: true,
|
|
34549
|
+
defaultValue: [],
|
|
34550
|
+
optionSource: "eventSeries",
|
|
34551
|
+
ui: {
|
|
34552
|
+
intent: "behavior",
|
|
34553
|
+
searchThreshold: 1,
|
|
34554
|
+
visibleWhen: {
|
|
34555
|
+
field: "eventSelection",
|
|
34556
|
+
equals: "selected"
|
|
34557
|
+
}
|
|
34558
|
+
}
|
|
34559
|
+
})];
|
|
34560
|
+
function withEventSelectionVisibility(field) {
|
|
34561
|
+
if (![
|
|
34562
|
+
"eventSurface",
|
|
34563
|
+
"filterEventPresets",
|
|
34564
|
+
"scheduleScope",
|
|
34565
|
+
"filterCategoryIds",
|
|
34566
|
+
"filterStaffMemberId",
|
|
34567
|
+
"filterVenueId",
|
|
34568
|
+
"showFilters",
|
|
34569
|
+
"showCategoryFilter",
|
|
34570
|
+
"showVenueFilter",
|
|
34571
|
+
"showStaffFilter"
|
|
34572
|
+
].includes(field.id)) return field;
|
|
34573
|
+
const visibleWhen = field.ui?.visibleWhen;
|
|
34574
|
+
return {
|
|
34575
|
+
...field,
|
|
34576
|
+
ui: {
|
|
34577
|
+
...field.ui,
|
|
34578
|
+
visibleWhen: { allOf: [{
|
|
34579
|
+
field: "eventSelection",
|
|
34580
|
+
notEquals: "selected"
|
|
34581
|
+
}, ...visibleWhen ? [visibleWhen] : []] }
|
|
34582
|
+
}
|
|
34583
|
+
};
|
|
34584
|
+
}
|
|
34585
|
+
//#endregion
|
|
34468
34586
|
//#region ../blocks/src/system/runtime/nodes/events/EventCalendar.interactive.ts
|
|
34469
34587
|
/**
|
|
34470
34588
|
* Collapse an optional/blank string to `undefined` so downstream week-board
|
|
@@ -34516,6 +34634,7 @@ function buildEventCalendarListingRender(render, className = render.display.clas
|
|
|
34516
34634
|
eventSurface: display.eventSurface,
|
|
34517
34635
|
filterEventPresets: display.filterEventPresets,
|
|
34518
34636
|
scheduleScope: display.scheduleScope,
|
|
34637
|
+
seriesIds: display.seriesIds,
|
|
34519
34638
|
filterCategoryIds: display.filterCategoryIds,
|
|
34520
34639
|
filterStaffMemberId: display.filterStaffMemberId,
|
|
34521
34640
|
filterVenueId: display.filterVenueId,
|
|
@@ -34608,19 +34727,59 @@ init_EventCalendar_interactive();
|
|
|
34608
34727
|
init_calendarWindow();
|
|
34609
34728
|
const scopeParams = {
|
|
34610
34729
|
siteId: { $bind: { from: "$root.siteId" } },
|
|
34730
|
+
seriesIds: { $bind: {
|
|
34731
|
+
from: "content",
|
|
34732
|
+
transforms: [{
|
|
34733
|
+
id: "events.calendarSelectionParam",
|
|
34734
|
+
options: { key: "seriesIds" }
|
|
34735
|
+
}]
|
|
34736
|
+
} },
|
|
34611
34737
|
stage: { $bind: {
|
|
34612
34738
|
from: "$root.previewStage",
|
|
34613
34739
|
fallback: "published"
|
|
34614
34740
|
} },
|
|
34615
|
-
eventSurface: { $bind: {
|
|
34741
|
+
eventSurface: { $bind: {
|
|
34742
|
+
from: "content",
|
|
34743
|
+
transforms: [{
|
|
34744
|
+
id: "events.calendarSelectionParam",
|
|
34745
|
+
options: { key: "eventSurface" }
|
|
34746
|
+
}, { id: "value.csv" }]
|
|
34747
|
+
} },
|
|
34616
34748
|
eventPresets: { $bind: {
|
|
34617
|
-
from: "content
|
|
34618
|
-
transforms: [{
|
|
34749
|
+
from: "content",
|
|
34750
|
+
transforms: [{
|
|
34751
|
+
id: "events.calendarSelectionParam",
|
|
34752
|
+
options: { key: "filterEventPresets" }
|
|
34753
|
+
}, { id: "value.csv" }]
|
|
34754
|
+
} },
|
|
34755
|
+
scheduleScope: { $bind: {
|
|
34756
|
+
from: "content",
|
|
34757
|
+
transforms: [{
|
|
34758
|
+
id: "events.calendarSelectionParam",
|
|
34759
|
+
options: { key: "scheduleScope" }
|
|
34760
|
+
}, { id: "value.csv" }]
|
|
34619
34761
|
} },
|
|
34620
|
-
|
|
34621
|
-
|
|
34622
|
-
|
|
34623
|
-
|
|
34762
|
+
categoryIds: { $bind: {
|
|
34763
|
+
from: "content",
|
|
34764
|
+
transforms: [{
|
|
34765
|
+
id: "events.calendarSelectionParam",
|
|
34766
|
+
options: { key: "filterCategoryIds" }
|
|
34767
|
+
}, { id: "value.csv" }]
|
|
34768
|
+
} },
|
|
34769
|
+
staffMemberId: { $bind: {
|
|
34770
|
+
from: "content",
|
|
34771
|
+
transforms: [{
|
|
34772
|
+
id: "events.calendarSelectionParam",
|
|
34773
|
+
options: { key: "filterStaffMemberId" }
|
|
34774
|
+
}, { id: "value.csv" }]
|
|
34775
|
+
} },
|
|
34776
|
+
venueId: { $bind: {
|
|
34777
|
+
from: "content",
|
|
34778
|
+
transforms: [{
|
|
34779
|
+
id: "events.calendarSelectionParam",
|
|
34780
|
+
options: { key: "filterVenueId" }
|
|
34781
|
+
}, { id: "value.csv" }]
|
|
34782
|
+
} }
|
|
34624
34783
|
};
|
|
34625
34784
|
/** Combined renders two jobs; calendar-only variants never pay for the list seed. */
|
|
34626
34785
|
const eventCalendarDataLoaders = {
|
|
@@ -34760,6 +34919,13 @@ const eventCalendarLayout = [styledSection({
|
|
|
34760
34919
|
from: "content.defaultCalendarView",
|
|
34761
34920
|
fallback: "month"
|
|
34762
34921
|
} },
|
|
34922
|
+
seriesIds: { $bind: {
|
|
34923
|
+
from: "content",
|
|
34924
|
+
transforms: [{
|
|
34925
|
+
id: "events.calendarSelectionParam",
|
|
34926
|
+
options: { key: "seriesIds" }
|
|
34927
|
+
}]
|
|
34928
|
+
} },
|
|
34763
34929
|
showFilters: { $bind: {
|
|
34764
34930
|
from: "content.showFilters",
|
|
34765
34931
|
fallback: true
|
|
@@ -34781,17 +34947,47 @@ const eventCalendarLayout = [styledSection({
|
|
|
34781
34947
|
fallback: true
|
|
34782
34948
|
} },
|
|
34783
34949
|
eventSurface: { $bind: {
|
|
34784
|
-
from: "content
|
|
34785
|
-
|
|
34950
|
+
from: "content",
|
|
34951
|
+
transforms: [{
|
|
34952
|
+
id: "events.calendarSelectionParam",
|
|
34953
|
+
options: { key: "eventSurface" }
|
|
34954
|
+
}]
|
|
34955
|
+
} },
|
|
34956
|
+
filterEventPresets: { $bind: {
|
|
34957
|
+
from: "content",
|
|
34958
|
+
transforms: [{
|
|
34959
|
+
id: "events.calendarSelectionParam",
|
|
34960
|
+
options: { key: "filterEventPresets" }
|
|
34961
|
+
}]
|
|
34786
34962
|
} },
|
|
34787
|
-
filterEventPresets: { $bind: { from: "content.filterEventPresets" } },
|
|
34788
34963
|
scheduleScope: { $bind: {
|
|
34789
|
-
from: "content
|
|
34790
|
-
|
|
34964
|
+
from: "content",
|
|
34965
|
+
transforms: [{
|
|
34966
|
+
id: "events.calendarSelectionParam",
|
|
34967
|
+
options: { key: "scheduleScope" }
|
|
34968
|
+
}]
|
|
34969
|
+
} },
|
|
34970
|
+
filterCategoryIds: { $bind: {
|
|
34971
|
+
from: "content",
|
|
34972
|
+
transforms: [{
|
|
34973
|
+
id: "events.calendarSelectionParam",
|
|
34974
|
+
options: { key: "filterCategoryIds" }
|
|
34975
|
+
}]
|
|
34976
|
+
} },
|
|
34977
|
+
filterStaffMemberId: { $bind: {
|
|
34978
|
+
from: "content",
|
|
34979
|
+
transforms: [{
|
|
34980
|
+
id: "events.calendarSelectionParam",
|
|
34981
|
+
options: { key: "filterStaffMemberId" }
|
|
34982
|
+
}]
|
|
34983
|
+
} },
|
|
34984
|
+
filterVenueId: { $bind: {
|
|
34985
|
+
from: "content",
|
|
34986
|
+
transforms: [{
|
|
34987
|
+
id: "events.calendarSelectionParam",
|
|
34988
|
+
options: { key: "filterVenueId" }
|
|
34989
|
+
}]
|
|
34791
34990
|
} },
|
|
34792
|
-
filterCategoryIds: { $bind: { from: "content.filterCategoryIds" } },
|
|
34793
|
-
filterStaffMemberId: { $bind: { from: "content.filterStaffMemberId" } },
|
|
34794
|
-
filterVenueId: { $bind: { from: "content.filterVenueId" } },
|
|
34795
34991
|
cardRole: { $bind: {
|
|
34796
34992
|
from: "content._cardStyles.role",
|
|
34797
34993
|
fallback: "default"
|
|
@@ -35295,6 +35491,7 @@ const eventCalendarAdditionalFields = [
|
|
|
35295
35491
|
}
|
|
35296
35492
|
}
|
|
35297
35493
|
},
|
|
35494
|
+
...eventSelectionFields,
|
|
35298
35495
|
{
|
|
35299
35496
|
id: "eventSurface",
|
|
35300
35497
|
type: "select",
|
|
@@ -35504,7 +35701,7 @@ const eventCalendarBlockDefinition = {
|
|
|
35504
35701
|
titleSource: "heading",
|
|
35505
35702
|
description: "Display events with calendar, list, or combined views with filtering",
|
|
35506
35703
|
skipSectionStyles: true,
|
|
35507
|
-
additionalFields: eventCalendarAdditionalFields,
|
|
35704
|
+
additionalFields: eventCalendarAdditionalFields.map(withEventSelectionVisibility),
|
|
35508
35705
|
styleTokens: {
|
|
35509
35706
|
background: "surface",
|
|
35510
35707
|
typography: "body",
|
|
@@ -35570,6 +35767,7 @@ function buildEventListingInteractiveIslandProps(props) {
|
|
|
35570
35767
|
}
|
|
35571
35768
|
var cardOrientationSchema, eventSurfaceScopeSchema, eventScheduleScopeSchema, eventListingSourceSchema, eventListingDisplaySchema, eventListingHydrationSchema, eventListingRenderSchema, eventListingIslandMetaCodec, eventListingBlockRuntime, eventListingIslandMetaKeys, eventListingInteractiveIslandPropsCodec;
|
|
35572
35769
|
var init_EventListing_interactive = __esmMin((() => {
|
|
35770
|
+
init_eventSelection();
|
|
35573
35771
|
init_cards();
|
|
35574
35772
|
init_schemas();
|
|
35575
35773
|
init_shared$2();
|
|
@@ -35636,6 +35834,7 @@ var init_EventListing_interactive = __esmMin((() => {
|
|
|
35636
35834
|
eventSurface: eventSurfaceScopeSchema,
|
|
35637
35835
|
filterEventPresets: z.string().nullable(),
|
|
35638
35836
|
scheduleScope: eventScheduleScopeSchema,
|
|
35837
|
+
seriesIds: z.string().nullable().optional(),
|
|
35639
35838
|
filterCategoryIds: z.string().nullable().optional(),
|
|
35640
35839
|
filterStaffMemberId: z.string().nullable().optional(),
|
|
35641
35840
|
filterVenueId: z.string().nullable().optional(),
|
|
@@ -35696,6 +35895,7 @@ var init_EventListing_interactive = __esmMin((() => {
|
|
|
35696
35895
|
eventSurface: normalizeEventSurfaceScope(source.eventSurface),
|
|
35697
35896
|
filterEventPresets: normalizeEventSurfacePresetsCsv(source.filterEventPresets),
|
|
35698
35897
|
scheduleScope: normalizeEventScheduleScope(source.scheduleScope),
|
|
35898
|
+
seriesIds: eventSeriesScopeCsv(source.seriesIds),
|
|
35699
35899
|
filterCategoryIds: normalizeEventCategoryIdsCsv(source.filterCategoryIds),
|
|
35700
35900
|
filterStaffMemberId: normalizeEventStaffMemberId(source.filterStaffMemberId),
|
|
35701
35901
|
filterVenueId: normalizeEventVenueId(source.filterVenueId),
|
|
@@ -42610,10 +42810,14 @@ function buildDiscountAvailabilityRequestPlan(options) {
|
|
|
42610
42810
|
}
|
|
42611
42811
|
};
|
|
42612
42812
|
}
|
|
42613
|
-
function discountAvailabilityStateFromResponse(response) {
|
|
42614
|
-
if (!discountAvailabilityHasDiscounts(response)) return {
|
|
42813
|
+
function discountAvailabilityStateFromResponse(requestKey, response) {
|
|
42814
|
+
if (!discountAvailabilityHasDiscounts(response)) return {
|
|
42815
|
+
tag: "unavailable",
|
|
42816
|
+
requestKey
|
|
42817
|
+
};
|
|
42615
42818
|
return {
|
|
42616
42819
|
tag: "available",
|
|
42820
|
+
requestKey,
|
|
42617
42821
|
manualCodeEntryAllowed: discountAvailabilityAllowsManualEntry(response),
|
|
42618
42822
|
autoAppliedDiscount: getAutoAppliedDiscountPreview(response)
|
|
42619
42823
|
};
|
|
@@ -42623,10 +42827,13 @@ function discountCodeUiReducer(state, event) {
|
|
|
42623
42827
|
case "availability-disabled": return initialDiscountCodeUiState;
|
|
42624
42828
|
case "availability-loading": return {
|
|
42625
42829
|
...state,
|
|
42626
|
-
availability: {
|
|
42830
|
+
availability: {
|
|
42831
|
+
tag: "loading",
|
|
42832
|
+
previous: state.availability.tag === "available" || state.availability.tag === "unavailable" ? state.availability : state.availability.tag === "loading" ? state.availability.previous : null
|
|
42833
|
+
}
|
|
42627
42834
|
};
|
|
42628
42835
|
case "availability-loaded": {
|
|
42629
|
-
const availability = discountAvailabilityStateFromResponse(event.response);
|
|
42836
|
+
const availability = discountAvailabilityStateFromResponse(event.requestKey, event.response);
|
|
42630
42837
|
if (availability.tag !== "available" || !availability.manualCodeEntryAllowed) return {
|
|
42631
42838
|
...state,
|
|
42632
42839
|
discountUiOpen: false,
|
|
@@ -42642,7 +42849,10 @@ function discountCodeUiReducer(state, event) {
|
|
|
42642
42849
|
...state,
|
|
42643
42850
|
discountUiOpen: false,
|
|
42644
42851
|
discountCode: "",
|
|
42645
|
-
availability: {
|
|
42852
|
+
availability: {
|
|
42853
|
+
tag: "error",
|
|
42854
|
+
requestKey: event.requestKey
|
|
42855
|
+
}
|
|
42646
42856
|
};
|
|
42647
42857
|
case "discount-code-changed": return {
|
|
42648
42858
|
...state,
|
|
@@ -42687,11 +42897,15 @@ function useDiscountCodeUi(options) {
|
|
|
42687
42897
|
if (cancelled) return;
|
|
42688
42898
|
dispatch({
|
|
42689
42899
|
type: "availability-loaded",
|
|
42900
|
+
requestKey: requestPlan.key,
|
|
42690
42901
|
response: res
|
|
42691
42902
|
});
|
|
42692
42903
|
} catch {
|
|
42693
42904
|
if (cancelled) return;
|
|
42694
|
-
dispatch({
|
|
42905
|
+
dispatch({
|
|
42906
|
+
type: "availability-failed",
|
|
42907
|
+
requestKey: requestPlan.key
|
|
42908
|
+
});
|
|
42695
42909
|
}
|
|
42696
42910
|
}
|
|
42697
42911
|
checkDiscountAvailability();
|
|
@@ -42700,8 +42914,9 @@ function useDiscountCodeUi(options) {
|
|
|
42700
42914
|
};
|
|
42701
42915
|
}, [options.api, requestPlan]);
|
|
42702
42916
|
const availability = state.availability;
|
|
42703
|
-
const
|
|
42704
|
-
const
|
|
42917
|
+
const settledAvailability = availability.tag === "loading" ? availability.previous : availability.tag === "available" || availability.tag === "unavailable" ? availability : null;
|
|
42918
|
+
const isAvailable = settledAvailability?.tag === "available";
|
|
42919
|
+
const manualCodeEntryAllowed = isAvailable ? settledAvailability.manualCodeEntryAllowed : false;
|
|
42705
42920
|
return {
|
|
42706
42921
|
discountUiOpen: state.discountUiOpen,
|
|
42707
42922
|
setDiscountUiOpen: (isOpen) => dispatch({
|
|
@@ -42715,8 +42930,10 @@ function useDiscountCodeUi(options) {
|
|
|
42715
42930
|
}),
|
|
42716
42931
|
discountsAvailable: isAvailable,
|
|
42717
42932
|
manualCodeEntryAllowed,
|
|
42718
|
-
autoAppliedDiscount: isAvailable ?
|
|
42719
|
-
discountsAvailableLoading: availability.tag === "loading"
|
|
42933
|
+
autoAppliedDiscount: isAvailable ? settledAvailability.autoAppliedDiscount : null,
|
|
42934
|
+
discountsAvailableLoading: availability.tag === "loading",
|
|
42935
|
+
discountAvailabilityRequestKey: requestPlan.key,
|
|
42936
|
+
settledDiscountAvailabilityRequestKey: availability.tag === "error" ? availability.requestKey : settledAvailability?.requestKey ?? null
|
|
42720
42937
|
};
|
|
42721
42938
|
}
|
|
42722
42939
|
var init_useDiscountCodeUi = __esmMin((() => {
|
|
@@ -47314,16 +47531,19 @@ function eligibilityLookupReducer(state, action) {
|
|
|
47314
47531
|
case "loading-started": return {
|
|
47315
47532
|
tag: "loading",
|
|
47316
47533
|
eligibility: state.eligibility,
|
|
47534
|
+
settledRequestKey: state.settledRequestKey,
|
|
47317
47535
|
error: null
|
|
47318
47536
|
};
|
|
47319
47537
|
case "resolved": return {
|
|
47320
47538
|
tag: "resolved",
|
|
47321
47539
|
eligibility: action.eligibility,
|
|
47540
|
+
settledRequestKey: action.requestKey,
|
|
47322
47541
|
error: null
|
|
47323
47542
|
};
|
|
47324
47543
|
case "failed": return {
|
|
47325
47544
|
tag: "failed",
|
|
47326
47545
|
eligibility: null,
|
|
47546
|
+
settledRequestKey: null,
|
|
47327
47547
|
error: action.message
|
|
47328
47548
|
};
|
|
47329
47549
|
default: return assertNever$11(action);
|
|
@@ -47349,6 +47569,7 @@ var init_hooks_state = __esmMin((() => {
|
|
|
47349
47569
|
initialEligibilityLookupState = {
|
|
47350
47570
|
tag: "idle",
|
|
47351
47571
|
eligibility: null,
|
|
47572
|
+
settledRequestKey: null,
|
|
47352
47573
|
error: null
|
|
47353
47574
|
};
|
|
47354
47575
|
initialExistingRegistrationLookupState = {
|
|
@@ -47428,9 +47649,23 @@ function toRegistrationOptionsSubject(subject, attendanceMode) {
|
|
|
47428
47649
|
function useEligibility(params) {
|
|
47429
47650
|
return useEligibilityWithDeps(params, eventRegistrationHooksDeps);
|
|
47430
47651
|
}
|
|
47652
|
+
function eligibilityRequestKey(params) {
|
|
47653
|
+
return JSON.stringify({
|
|
47654
|
+
enabled: params.enabled,
|
|
47655
|
+
refreshKey: params.refreshKey ?? 0,
|
|
47656
|
+
subject: params.subject,
|
|
47657
|
+
attendanceMode: params.attendanceMode ?? null,
|
|
47658
|
+
ticketSelections: params.ticketSelectionsKey,
|
|
47659
|
+
selectedSlidingAmount: params.selectedSlidingAmount ?? null
|
|
47660
|
+
});
|
|
47661
|
+
}
|
|
47431
47662
|
function useEligibilityWithDeps(params, deps) {
|
|
47432
47663
|
const api = deps.useBlockApi();
|
|
47433
47664
|
const ticketSelectionsKey = JSON.stringify(normalizeTicketSelectionLines(params.ticketSelections));
|
|
47665
|
+
const requestKey = eligibilityRequestKey({
|
|
47666
|
+
...params,
|
|
47667
|
+
ticketSelectionsKey
|
|
47668
|
+
});
|
|
47434
47669
|
const [state, dispatch] = useReducer(eligibilityLookupReducer, initialEligibilityLookupState);
|
|
47435
47670
|
const requestIdRef = useRef(0);
|
|
47436
47671
|
useEffect(() => {
|
|
@@ -47463,7 +47698,8 @@ function useEligibilityWithDeps(params, deps) {
|
|
|
47463
47698
|
if (cancelled || requestIdRef.current !== requestId) return;
|
|
47464
47699
|
dispatch({
|
|
47465
47700
|
type: "resolved",
|
|
47466
|
-
eligibility: transformRegistrationOptionsResponse(result)
|
|
47701
|
+
eligibility: transformRegistrationOptionsResponse(result),
|
|
47702
|
+
requestKey
|
|
47467
47703
|
});
|
|
47468
47704
|
} catch {
|
|
47469
47705
|
if (cancelled || requestIdRef.current !== requestId) return;
|
|
@@ -47492,6 +47728,8 @@ function useEligibilityWithDeps(params, deps) {
|
|
|
47492
47728
|
return {
|
|
47493
47729
|
state,
|
|
47494
47730
|
eligibility: state.eligibility,
|
|
47731
|
+
settledRequestKey: state.settledRequestKey,
|
|
47732
|
+
requestKey,
|
|
47495
47733
|
isLoading: state.tag === "loading",
|
|
47496
47734
|
error: state.error,
|
|
47497
47735
|
creditState
|
|
@@ -49086,6 +49324,71 @@ var init_useEventRegistrationSubmit = __esmMin((() => {
|
|
|
49086
49324
|
};
|
|
49087
49325
|
}));
|
|
49088
49326
|
//#endregion
|
|
49327
|
+
//#region ../blocks/src/system/runtime/nodes/event-registration/useSettledCommerceView.ts
|
|
49328
|
+
function buildCandidate(input) {
|
|
49329
|
+
if (!input.eligibilityIsSettled || !input.eligibility || !input.currentEvent) return null;
|
|
49330
|
+
return {
|
|
49331
|
+
eventSelectionId: input.currentEvent.selectionId,
|
|
49332
|
+
discountContext: resolveDiscountContext({
|
|
49333
|
+
paymentSelection: input.paymentSelection,
|
|
49334
|
+
event: input.currentEvent,
|
|
49335
|
+
eventRequiresPayment: input.eventRequiresPayment,
|
|
49336
|
+
ticketsCount: input.ticketsCount
|
|
49337
|
+
}),
|
|
49338
|
+
subtotalCents: input.eligibility.price,
|
|
49339
|
+
summaryLines: input.eligibility.ticketLines.map((line) => ({
|
|
49340
|
+
pricingOptionId: line.pricingOptionId,
|
|
49341
|
+
label: line.label,
|
|
49342
|
+
quantity: line.quantity,
|
|
49343
|
+
unitPriceCents: line.unitPriceCents,
|
|
49344
|
+
subtotalCents: line.subtotalCents
|
|
49345
|
+
}))
|
|
49346
|
+
};
|
|
49347
|
+
}
|
|
49348
|
+
function eligibilityIsSettled(result) {
|
|
49349
|
+
return result.settledRequestKey === result.requestKey;
|
|
49350
|
+
}
|
|
49351
|
+
function viewIsStale(view, currentEvent, eligibilityState) {
|
|
49352
|
+
return view.eventSelectionId !== currentEvent?.selectionId || eligibilityState?.tag === "failed" || eligibilityState?.tag === "idle";
|
|
49353
|
+
}
|
|
49354
|
+
function requestIsSettled(discountUi) {
|
|
49355
|
+
return discountUi.discountAvailabilityRequestKey === "disabled" || discountUi.settledDiscountAvailabilityRequestKey === discountUi.discountAvailabilityRequestKey;
|
|
49356
|
+
}
|
|
49357
|
+
function discountRequest(view) {
|
|
49358
|
+
const discountContext = view?.discountContext ?? null;
|
|
49359
|
+
return {
|
|
49360
|
+
discountContext,
|
|
49361
|
+
subtotalCents: discountContext?.type === "event" && view?.subtotalCents !== null ? view?.subtotalCents : void 0
|
|
49362
|
+
};
|
|
49363
|
+
}
|
|
49364
|
+
function useSettledCommerceView(input) {
|
|
49365
|
+
const candidate = buildCandidate({
|
|
49366
|
+
eligibilityIsSettled: eligibilityIsSettled(input.eligibilityResult),
|
|
49367
|
+
eligibility: input.eligibility,
|
|
49368
|
+
currentEvent: input.currentEvent,
|
|
49369
|
+
paymentSelection: input.paymentSelection,
|
|
49370
|
+
eventRequiresPayment: input.eventRequiresPayment,
|
|
49371
|
+
ticketsCount: input.ticketsCount
|
|
49372
|
+
});
|
|
49373
|
+
const settledRef = useRef(candidate);
|
|
49374
|
+
if (settledRef.current && viewIsStale(settledRef.current, input.currentEvent, input.eligibilityResult.state)) settledRef.current = null;
|
|
49375
|
+
const requestView = candidate ?? settledRef.current;
|
|
49376
|
+
const discountUi = input.useDiscountCodeUi({
|
|
49377
|
+
api: input.api,
|
|
49378
|
+
...discountRequest(requestView)
|
|
49379
|
+
});
|
|
49380
|
+
if (candidate && requestIsSettled(discountUi)) settledRef.current = candidate;
|
|
49381
|
+
return {
|
|
49382
|
+
discountUi,
|
|
49383
|
+
discountContext: settledRef.current?.discountContext ?? null,
|
|
49384
|
+
ticketSelectionSubtotalCents: settledRef.current?.subtotalCents ?? null,
|
|
49385
|
+
ticketSelectionSummaryLines: settledRef.current?.summaryLines ?? []
|
|
49386
|
+
};
|
|
49387
|
+
}
|
|
49388
|
+
var init_useSettledCommerceView = __esmMin((() => {
|
|
49389
|
+
init_registrationDerivations();
|
|
49390
|
+
}));
|
|
49391
|
+
//#endregion
|
|
49089
49392
|
//#region ../blocks/src/system/runtime/nodes/event-registration/registrationWizardContext.ts
|
|
49090
49393
|
function getEventSelectionDefaults(event) {
|
|
49091
49394
|
const suggestedAmount = getSlidingScaleForEvent(event)?.suggestedAmount;
|
|
@@ -49248,10 +49551,6 @@ function isSoldOutWithoutWaitlist(input) {
|
|
|
49248
49551
|
var init_registrationCompletion = __esmMin((() => {}));
|
|
49249
49552
|
//#endregion
|
|
49250
49553
|
//#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
49554
|
function usesTieredPricing(event) {
|
|
49256
49555
|
return event !== null && event !== void 0 ? publicEventPricingStrategy(event.pricing) === "tiered" : false;
|
|
49257
49556
|
}
|
|
@@ -49694,30 +49993,15 @@ function useEventRegistrationWizardWithDeps(options, deps) {
|
|
|
49694
49993
|
}
|
|
49695
49994
|
setStep("select-tickets");
|
|
49696
49995
|
};
|
|
49697
|
-
const discountContext
|
|
49698
|
-
|
|
49699
|
-
|
|
49700
|
-
|
|
49701
|
-
|
|
49702
|
-
}), [
|
|
49996
|
+
const { discountUi, discountContext, ticketSelectionSubtotalCents, ticketSelectionSummaryLines } = useSettledCommerceView({
|
|
49997
|
+
api,
|
|
49998
|
+
useDiscountCodeUi: deps.useDiscountCodeUi,
|
|
49999
|
+
eligibilityResult,
|
|
50000
|
+
eligibility,
|
|
49703
50001
|
currentEvent,
|
|
49704
50002
|
eventRequiresPayment,
|
|
49705
50003
|
paymentSelection,
|
|
49706
50004
|
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
50005
|
});
|
|
49722
50006
|
const selectionMethod = paymentSelection.method;
|
|
49723
50007
|
const shouldShowDiscountToggle = discountContext !== null && discountUi.manualCodeEntryAllowed && (selectionMethod === "stripe" || selectionMethod === "pass_bundle" || selectionMethod === "membership_bundle");
|
|
@@ -49896,6 +50180,7 @@ var init_useEventRegistrationWizard = __esmMin((() => {
|
|
|
49896
50180
|
init_useEventRegistrationStripeReturn();
|
|
49897
50181
|
init_useEventRegistrationSubmit();
|
|
49898
50182
|
init_useDiscountCodeUi();
|
|
50183
|
+
init_useSettledCommerceView();
|
|
49899
50184
|
init_utils();
|
|
49900
50185
|
init_ticketSelectionLines();
|
|
49901
50186
|
init_registrationStateMachine();
|
|
@@ -49918,6 +50203,38 @@ var init_useEventRegistrationWizard = __esmMin((() => {
|
|
|
49918
50203
|
};
|
|
49919
50204
|
}));
|
|
49920
50205
|
//#endregion
|
|
50206
|
+
//#region ../blocks/src/system/runtime/nodes/event-registration/useEventCheckoutHandoffRestore.ts
|
|
50207
|
+
function eventRegistrationReloadTarget(location) {
|
|
50208
|
+
return `${location.pathname}${location.search}#${EVENT_REGISTRATION_ANCHOR_ID}`;
|
|
50209
|
+
}
|
|
50210
|
+
function reloadAtEventRegistration() {
|
|
50211
|
+
const target = eventRegistrationReloadTarget(window.location);
|
|
50212
|
+
window.history.replaceState(window.history.state, "", target);
|
|
50213
|
+
window.location.reload();
|
|
50214
|
+
}
|
|
50215
|
+
function useEventCheckoutHandoffRestore(active) {
|
|
50216
|
+
useEventCheckoutHandoffRestoreWithDeps(active, browserCheckoutHandoffRestoreDeps);
|
|
50217
|
+
}
|
|
50218
|
+
function useEventCheckoutHandoffRestoreWithDeps(active, deps) {
|
|
50219
|
+
useEffect(() => {
|
|
50220
|
+
if (!active) return;
|
|
50221
|
+
const handlePageShow = (event) => {
|
|
50222
|
+
if (event.persisted) deps.reloadAtRegistration();
|
|
50223
|
+
};
|
|
50224
|
+
deps.addPageShowListener(handlePageShow);
|
|
50225
|
+
return () => deps.removePageShowListener(handlePageShow);
|
|
50226
|
+
}, [active, deps]);
|
|
50227
|
+
}
|
|
50228
|
+
var browserCheckoutHandoffRestoreDeps;
|
|
50229
|
+
var init_useEventCheckoutHandoffRestore = __esmMin((() => {
|
|
50230
|
+
init_constants();
|
|
50231
|
+
browserCheckoutHandoffRestoreDeps = {
|
|
50232
|
+
addPageShowListener: (listener) => window.addEventListener("pageshow", listener),
|
|
50233
|
+
removePageShowListener: (listener) => window.removeEventListener("pageshow", listener),
|
|
50234
|
+
reloadAtRegistration: reloadAtEventRegistration
|
|
50235
|
+
};
|
|
50236
|
+
}));
|
|
50237
|
+
//#endregion
|
|
49921
50238
|
//#region ../blocks/src/system/runtime/nodes/shared/MagicLinkForm.state.ts
|
|
49922
50239
|
function magicLinkSubmissionReducer(state, action) {
|
|
49923
50240
|
switch (action.type) {
|
|
@@ -106935,6 +107252,7 @@ function EventRegistrationWizard(props) {
|
|
|
106935
107252
|
events: events ?? [],
|
|
106936
107253
|
maxTicketsNum
|
|
106937
107254
|
});
|
|
107255
|
+
useEventCheckoutHandoffRestore(wizard.step === "redirecting");
|
|
106938
107256
|
const [bookingOverlayOpen, setBookingOverlayOpen] = useState(false);
|
|
106939
107257
|
const [floatingPortalRoot, setFloatingPortalRoot] = useState(null);
|
|
106940
107258
|
useEffect(() => {
|
|
@@ -107067,6 +107385,7 @@ var init_EventRegistrationWizard = __esmMin((() => {
|
|
|
107067
107385
|
init_themePortalRoot();
|
|
107068
107386
|
init_buttons();
|
|
107069
107387
|
init_constants();
|
|
107388
|
+
init_useEventCheckoutHandoffRestore();
|
|
107070
107389
|
init_EventRegistrationSurface();
|
|
107071
107390
|
init_EventRegistrationBookingLayer();
|
|
107072
107391
|
EVENT_PORTAL_AUTH_COPY = {
|
|
@@ -113536,6 +113855,7 @@ function useEventPagination({ siteId: _siteId, initialEvents = [], fetchInitialO
|
|
|
113536
113855
|
const eventSurface = filters?.eventSurface;
|
|
113537
113856
|
const eventPresets = normalizeCsvString(filters?.eventPresets);
|
|
113538
113857
|
const scheduleScope = filters?.scheduleScope;
|
|
113858
|
+
const seriesIds = filters?.seriesIds;
|
|
113539
113859
|
const eventsRef = useRef(events);
|
|
113540
113860
|
const loadingRef = useRef(loading);
|
|
113541
113861
|
const hasMoreRef = useRef(hasMore);
|
|
@@ -113563,6 +113883,7 @@ function useEventPagination({ siteId: _siteId, initialEvents = [], fetchInitialO
|
|
|
113563
113883
|
const currentEvents = eventsRef.current;
|
|
113564
113884
|
const lastEvent = options.reset ? void 0 : currentEvents[currentEvents.length - 1];
|
|
113565
113885
|
const newEvents = await getPublicEvents({
|
|
113886
|
+
seriesIds,
|
|
113566
113887
|
afterStartsAt: lastEvent ? lastEvent.startsAt : void 0,
|
|
113567
113888
|
afterId: lastEvent ? lastEvent.occurrenceId : void 0,
|
|
113568
113889
|
limit: pageSize,
|
|
@@ -113601,6 +113922,7 @@ function useEventPagination({ siteId: _siteId, initialEvents = [], fetchInitialO
|
|
|
113601
113922
|
eventSurface,
|
|
113602
113923
|
eventPresets,
|
|
113603
113924
|
scheduleScope,
|
|
113925
|
+
seriesIds,
|
|
113604
113926
|
normalizedCategoryIds,
|
|
113605
113927
|
normalizedStaffMemberId,
|
|
113606
113928
|
normalizedVenueId
|
|
@@ -113610,7 +113932,7 @@ function useEventPagination({ siteId: _siteId, initialEvents = [], fetchInitialO
|
|
|
113610
113932
|
}, [fetchPage]);
|
|
113611
113933
|
const initialFetchAttemptKeyRef = useRef(null);
|
|
113612
113934
|
useEffect(() => {
|
|
113613
|
-
if (!fetchInitialOnMount) return;
|
|
113935
|
+
if (!fetchInitialOnMount || seriesIds === "") return;
|
|
113614
113936
|
if (!filtersMatchInitial) return;
|
|
113615
113937
|
if (initialEventsRef.current.length > 0) return;
|
|
113616
113938
|
if (eventsRef.current.length > 0) return;
|
|
@@ -113624,7 +113946,8 @@ function useEventPagination({ siteId: _siteId, initialEvents = [], fetchInitialO
|
|
|
113624
113946
|
fetchPage,
|
|
113625
113947
|
filtersKey,
|
|
113626
113948
|
filtersMatchInitial,
|
|
113627
|
-
stage
|
|
113949
|
+
stage,
|
|
113950
|
+
seriesIds
|
|
113628
113951
|
]);
|
|
113629
113952
|
const prevFiltersMatchInitialRef = useRef(filtersMatchInitial);
|
|
113630
113953
|
const prevInitialEventsKeyRef = useRef(initialEventsKey);
|
|
@@ -113759,7 +114082,7 @@ var init_useEventFilters_state = __esmMin((() => {
|
|
|
113759
114082
|
* const events = await api.getPublicEvents(params);
|
|
113760
114083
|
* ```
|
|
113761
114084
|
*/
|
|
113762
|
-
function useEventFilters({ showCategoryFilter = "auto", showVenueFilter = false, showStaffFilter = false, preFilterCategoryIds, preFilterStaffMemberId, preFilterVenueId, preFilterEventSurface, preFilterEventPresets, preFilterScheduleScope } = {}) {
|
|
114085
|
+
function useEventFilters({ showCategoryFilter = "auto", showVenueFilter = false, showStaffFilter = false, preFilterSeriesIds, preFilterCategoryIds, preFilterStaffMemberId, preFilterVenueId, preFilterEventSurface, preFilterEventPresets, preFilterScheduleScope } = {}) {
|
|
113763
114086
|
const api = useBlockApi();
|
|
113764
114087
|
const [loadState, dispatchLoadState] = useReducer(eventFiltersLoadReducer, void 0, createInitialEventFiltersLoadState);
|
|
113765
114088
|
const filters = getEventFiltersData(loadState);
|
|
@@ -113908,6 +114231,7 @@ function useEventFilters({ showCategoryFilter = "auto", showVenueFilter = false,
|
|
|
113908
114231
|
setSelectedVenueId("all");
|
|
113909
114232
|
}, []),
|
|
113910
114233
|
getFilterParams: useCallback(() => {
|
|
114234
|
+
if (preFilterSeriesIds != null) return { seriesIds: preFilterSeriesIds };
|
|
113911
114235
|
const params = {};
|
|
113912
114236
|
if (fixedEventSurface) params.eventSurface = fixedEventSurface;
|
|
113913
114237
|
if (fixedEventPresets) params.eventPresets = fixedEventPresets;
|
|
@@ -113921,6 +114245,7 @@ function useEventFilters({ showCategoryFilter = "auto", showVenueFilter = false,
|
|
|
113921
114245
|
params.staffMemberId = fixedStaffMemberId ?? (selectedStaffMemberId !== "all" ? selectedStaffMemberId : void 0);
|
|
113922
114246
|
return params;
|
|
113923
114247
|
}, [
|
|
114248
|
+
preFilterSeriesIds,
|
|
113924
114249
|
allowedCategoryIds,
|
|
113925
114250
|
allowedCategorySet,
|
|
113926
114251
|
fixedEventPresets,
|
|
@@ -113956,25 +114281,12 @@ var init_EventListing_client = __esmMin((() => {
|
|
|
113956
114281
|
const hydration = render.hydration;
|
|
113957
114282
|
const filtersIdBase = useId();
|
|
113958
114283
|
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
|
-
]);
|
|
114284
|
+
const initialListFilters = buildEventRuntimeFilters(hydration);
|
|
113974
114285
|
const { categories, venues, staffMembers, selectedCategoryId, selectedStaffMemberId, selectedVenueId, loading: filtersLoading, shouldShowCategoryFilter, shouldShowVenueFilter, shouldShowStaffFilter, hasActiveFilters, setSelectedCategoryId, setSelectedStaffMemberId, setSelectedVenueId, resetFilters, getFilterParams } = useEventFilters({
|
|
113975
114286
|
showCategoryFilter: hydration.showFilters ? hydration.showCategoryFilter : "never",
|
|
113976
114287
|
showVenueFilter: hydration.showFilters ? hydration.showVenueFilter : false,
|
|
113977
114288
|
showStaffFilter: hydration.showFilters ? hydration.showStaffFilter : false,
|
|
114289
|
+
preFilterSeriesIds: hydration.seriesIds,
|
|
113978
114290
|
preFilterCategoryIds: hydration.filterCategoryIds ?? void 0,
|
|
113979
114291
|
preFilterStaffMemberId: hydration.filterStaffMemberId ?? void 0,
|
|
113980
114292
|
preFilterVenueId: hydration.filterVenueId ?? void 0,
|
|
@@ -114791,6 +115103,7 @@ function toEventCombinedControllerProps(props) {
|
|
|
114791
115103
|
eventSurface: props.render.display.eventSurface,
|
|
114792
115104
|
filterEventPresets: props.render.display.filterEventPresets,
|
|
114793
115105
|
scheduleScope: props.render.display.scheduleScope,
|
|
115106
|
+
seriesIds: props.render.display.seriesIds,
|
|
114794
115107
|
filterCategoryIds: props.render.display.filterCategoryIds,
|
|
114795
115108
|
filterStaffMemberId: props.render.display.filterStaffMemberId,
|
|
114796
115109
|
filterVenueId: props.render.display.filterVenueId,
|
|
@@ -114926,7 +115239,7 @@ var init_EventCombined_client = __esmMin((() => {
|
|
|
114926
115239
|
EventCombinedClient = ({ events: initialEvents, siteId, stage, listLayout = "stack", listColumns = "3", eventsPerPage = 12, paginationAction = {
|
|
114927
115240
|
kind: "loadMore",
|
|
114928
115241
|
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 }) => {
|
|
115242
|
+
}, 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
115243
|
const hydrationReady = useHydrationReady();
|
|
114931
115244
|
const fetchInitialEventsOnMount = initialEvents == null;
|
|
114932
115245
|
const resolvedShowFilters = showFilters ?? true;
|
|
@@ -114952,6 +115265,7 @@ var init_EventCombined_client = __esmMin((() => {
|
|
|
114952
115265
|
showCategoryFilter: resolvedShowFilters ? showCategoryFilter : "never",
|
|
114953
115266
|
showVenueFilter: resolvedShowFilters ? resolvedShowVenueFilter : false,
|
|
114954
115267
|
showStaffFilter: resolvedShowFilters ? resolvedShowStaffFilter : false,
|
|
115268
|
+
preFilterSeriesIds: seriesIds,
|
|
114955
115269
|
preFilterCategoryIds: filterCategoryIds,
|
|
114956
115270
|
preFilterStaffMemberId: filterStaffMemberId,
|
|
114957
115271
|
preFilterVenueId: filterVenueId,
|
|
@@ -114959,21 +115273,15 @@ var init_EventCombined_client = __esmMin((() => {
|
|
|
114959
115273
|
preFilterEventPresets: filterEventPresets,
|
|
114960
115274
|
preFilterScheduleScope: resolvedScheduleScope
|
|
114961
115275
|
});
|
|
114962
|
-
const initialListFilters =
|
|
115276
|
+
const initialListFilters = buildEventRuntimeFilters({
|
|
114963
115277
|
eventSurface: resolvedEventSurface,
|
|
114964
115278
|
filterEventPresets,
|
|
114965
115279
|
scheduleScope: resolvedScheduleScope,
|
|
115280
|
+
seriesIds,
|
|
114966
115281
|
filterCategoryIds,
|
|
114967
115282
|
filterStaffMemberId,
|
|
114968
115283
|
filterVenueId
|
|
114969
|
-
})
|
|
114970
|
-
resolvedEventSurface,
|
|
114971
|
-
filterCategoryIds,
|
|
114972
|
-
filterEventPresets,
|
|
114973
|
-
filterStaffMemberId,
|
|
114974
|
-
filterVenueId,
|
|
114975
|
-
resolvedScheduleScope
|
|
114976
|
-
]);
|
|
115284
|
+
});
|
|
114977
115285
|
const listFilters = useMemo(() => getFilterParams(), [getFilterParams]);
|
|
114978
115286
|
const pageSize = eventsPerPage;
|
|
114979
115287
|
const { events: paginatedEvents, loading: eventsLoading, error: eventsError, hasMore, loadMore } = useEventPagination({
|
|
@@ -115242,6 +115550,7 @@ function useEventCalendarFilterState(display) {
|
|
|
115242
115550
|
showCategoryFilter: display.showFilters ? display.showCategoryFilter : "never",
|
|
115243
115551
|
showVenueFilter: display.showFilters ? display.showVenueFilter : false,
|
|
115244
115552
|
showStaffFilter: display.showFilters ? display.showStaffFilter : false,
|
|
115553
|
+
preFilterSeriesIds: display.seriesIds,
|
|
115245
115554
|
preFilterCategoryIds: display.filterCategoryIds,
|
|
115246
115555
|
preFilterStaffMemberId: display.filterStaffMemberId,
|
|
115247
115556
|
preFilterVenueId: display.filterVenueId,
|
|
@@ -115275,6 +115584,7 @@ function buildDisplayFilterParams(display) {
|
|
|
115275
115584
|
eventSurface: display.eventSurface,
|
|
115276
115585
|
filterEventPresets: display.filterEventPresets,
|
|
115277
115586
|
scheduleScope: display.scheduleScope,
|
|
115587
|
+
seriesIds: display.seriesIds,
|
|
115278
115588
|
filterCategoryIds: display.filterCategoryIds,
|
|
115279
115589
|
filterStaffMemberId: display.filterStaffMemberId,
|
|
115280
115590
|
filterVenueId: display.filterVenueId
|
|
@@ -115321,6 +115631,7 @@ var init_EventCalendar_client = __esmMin((() => {
|
|
|
115321
115631
|
eventSurface: display.eventSurface,
|
|
115322
115632
|
filterEventPresets: display.filterEventPresets,
|
|
115323
115633
|
scheduleScope: display.scheduleScope,
|
|
115634
|
+
seriesIds: display.seriesIds,
|
|
115324
115635
|
filterCategoryIds: display.filterCategoryIds,
|
|
115325
115636
|
filterStaffMemberId: display.filterStaffMemberId,
|
|
115326
115637
|
filterVenueId: display.filterVenueId,
|
|
@@ -115344,6 +115655,7 @@ var init_EventCalendar_client = __esmMin((() => {
|
|
|
115344
115655
|
const { display, hydration } = render;
|
|
115345
115656
|
const filters = useMemo(() => buildDisplayFilterParams(display), [
|
|
115346
115657
|
display.eventSurface,
|
|
115658
|
+
display.seriesIds,
|
|
115347
115659
|
display.filterCategoryIds,
|
|
115348
115660
|
display.filterEventPresets,
|
|
115349
115661
|
display.filterStaffMemberId,
|
|
@@ -116129,7 +116441,7 @@ function NewsletterFormClient({ render }) {
|
|
|
116129
116441
|
if (submitTarget.tag === "unavailable") {
|
|
116130
116442
|
dispatchSubmission({
|
|
116131
116443
|
type: "failed",
|
|
116132
|
-
error: newsletterFormError(
|
|
116444
|
+
error: newsletterFormError(SIGNUPS_PAUSED_MESSAGE)
|
|
116133
116445
|
});
|
|
116134
116446
|
return;
|
|
116135
116447
|
}
|
|
@@ -116140,14 +116452,16 @@ function NewsletterFormClient({ render }) {
|
|
|
116140
116452
|
});
|
|
116141
116453
|
return;
|
|
116142
116454
|
}
|
|
116143
|
-
const
|
|
116144
|
-
|
|
116455
|
+
const selection = readVisitorSelection(formData, render.hydration);
|
|
116456
|
+
const selectionError = visitorSelectionError(selection);
|
|
116457
|
+
if (selectionError) {
|
|
116145
116458
|
dispatchSubmission({
|
|
116146
116459
|
type: "failed",
|
|
116147
|
-
error:
|
|
116460
|
+
error: selectionError
|
|
116148
116461
|
});
|
|
116149
116462
|
return;
|
|
116150
116463
|
}
|
|
116464
|
+
const visitorSelection = selection.tag === "chosen" ? selection.value : void 0;
|
|
116151
116465
|
dispatchSubmission({ type: "submitted" });
|
|
116152
116466
|
try {
|
|
116153
116467
|
const result = await api.subscribeNewsletter({
|
|
@@ -116341,10 +116655,18 @@ function transportFailureMessage(err) {
|
|
|
116341
116655
|
}
|
|
116342
116656
|
return RETRY_SHORTLY_MESSAGE;
|
|
116343
116657
|
}
|
|
116658
|
+
function visitorSelectionError(selection) {
|
|
116659
|
+
switch (selection.tag) {
|
|
116660
|
+
case "nothing_chosen": return newsletterFieldError(TOPIC_CHOICE_FIELD_ID, "Choose at least one email topic.");
|
|
116661
|
+
case "unusable": return newsletterFormError(SIGNUPS_PAUSED_MESSAGE);
|
|
116662
|
+
case "not_offered":
|
|
116663
|
+
case "chosen": return null;
|
|
116664
|
+
}
|
|
116665
|
+
}
|
|
116344
116666
|
function readVisitorSelection(formData, hydration) {
|
|
116345
|
-
if (hydration.choicePresentation !== "visitor_choice") return
|
|
116667
|
+
if (hydration.choicePresentation !== "visitor_choice") return { tag: "not_offered" };
|
|
116346
116668
|
const ids = formData.getAll(TOPIC_CHOICE_FIELD_ID).flatMap((value) => typeof value === "string" ? [value] : []);
|
|
116347
|
-
if (ids.length === 0) return
|
|
116669
|
+
if (ids.length === 0) return { tag: "nothing_chosen" };
|
|
116348
116670
|
const raw = hydration.choiceProvider === "native" ? {
|
|
116349
116671
|
provider: "native",
|
|
116350
116672
|
topicIds: ids
|
|
@@ -116355,9 +116677,12 @@ function readVisitorSelection(formData, hydration) {
|
|
|
116355
116677
|
provider: "mailchimp",
|
|
116356
116678
|
interestIds: ids
|
|
116357
116679
|
} : null;
|
|
116358
|
-
if (raw === null) return
|
|
116680
|
+
if (raw === null) return { tag: "unusable" };
|
|
116359
116681
|
const parsed = parseMailingListVisitorSelection(raw);
|
|
116360
|
-
return parsed.ok ?
|
|
116682
|
+
return parsed.ok ? {
|
|
116683
|
+
tag: "chosen",
|
|
116684
|
+
value: parsed.value
|
|
116685
|
+
} : { tag: "unusable" };
|
|
116361
116686
|
}
|
|
116362
116687
|
function publicSignupError(outcome) {
|
|
116363
116688
|
switch (outcome.tag) {
|