@riverbankcms/sdk 0.90.0 → 0.91.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-KVXNF3VW.mjs → PreviewEditorSidebar-3TT47WCF.mjs} +3 -3
- package/dist/{PreviewEditorUI-J3JN5Z7T.mjs → PreviewEditorUI-ORCLLUNZ.mjs} +3 -3
- package/dist/SdkPreviewModeRuntime-GMCDQPZZ.mjs +8 -0
- package/dist/_dts/api/src/bookingConfig.d.ts +3 -0
- package/dist/_dts/api/src/event-listing-destination.d.ts +59 -0
- package/dist/_dts/api/src/index.d.ts +4 -0
- package/dist/_dts/api/src/navigation/dashboardSettingsNav.d.ts +0 -1
- package/dist/_dts/api/src/navigation.d.ts +2 -0
- package/dist/_dts/api/src/publicExperienceEndpoints.d.ts +3 -1
- package/dist/_dts/api/src/settings/permissions.d.ts +273 -0
- package/dist/_dts/api/src/types.d.ts +1 -0
- package/dist/_dts/blocks/src/system/blocks/events/shared/schemas.d.ts +60 -2
- package/dist/_dts/blocks/src/system/blocks/events/shared/types.d.ts +12 -1
- package/dist/_dts/blocks/src/system/blocks/media-text.d.ts +9 -9
- package/dist/_dts/blocks/src/system/blocks/team-members.d.ts +1 -1
- package/dist/_dts/blocks/src/system/manifest/fieldValidation/index.d.ts +17 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/event-registration.headless.contract.d.ts +5 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/eventPaymentOptions.d.ts +24 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/events/shared/destination.d.ts +8 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/events/shared/pricing.d.ts +3 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/events/shared/utils.d.ts +7 -0
- package/dist/_dts/core/src/event-pricing.d.ts +12 -2
- package/dist/_dts/core/src/string.d.ts +12 -0
- package/dist/_dts/sdk/src/cli/sync/validation.d.ts +2 -2
- package/dist/_dts/sdk/src/public-api/contracts.d.ts +11 -1
- package/dist/_dts/sdk/src/rendering/islands/types.d.ts +11 -1
- package/dist/_dts/sdk/src/version.d.ts +1 -1
- package/dist/{chunk-GSPFFUVB.mjs → chunk-AFPMCLS7.mjs} +2 -2
- package/dist/{chunk-RQ3XZ4SJ.mjs → chunk-GDT2QGIL.mjs} +1 -1
- package/dist/{chunk-PMBB6MQ7.mjs → chunk-RQUZYSES.mjs} +345 -153
- package/dist/{chunk-AEOYWPE4.mjs → chunk-S3YHJWEU.mjs} +7 -7
- package/dist/{chunk-UG7I7S7W.mjs → chunk-U5YM4AWE.mjs} +1 -1
- package/dist/{chunk-BOQXMCSP.mjs → chunk-ZA2S7H34.mjs} +3 -3
- package/dist/cli/index.mjs +363 -437
- package/dist/cli/init-docs/content/workflow-add-block.md +48 -0
- package/dist/cli/init-docs/content/workflow-custom-block.md +10 -0
- package/dist/client/{accordion-GXQNWQ6O.mjs → accordion-AFX37652.mjs} +2 -2
- package/dist/client/{bookingForm-STLUJ36H.mjs → bookingForm-32V5QCOW.mjs} +6 -6
- package/dist/client/bookings.mjs +1170 -571
- package/dist/client/{carousel-CVRN6EPP.mjs → carousel-TJGQJ7ER.mjs} +3 -3
- package/dist/client/{cart-IYIBA5CL.mjs → cart-JUU2JEW4.mjs} +6 -6
- package/dist/client/{checkout-O3BGM4GS.mjs → checkout-RD6BTFX4.mjs} +6 -6
- package/dist/client/{chunk-DAS5CIER.mjs → chunk-6QZIBNGV.mjs} +119 -21
- package/dist/client/{chunk-VFHZLZAC.mjs → chunk-6RN62XBV.mjs} +1 -1
- package/dist/client/{chunk-D3ETC2SU.mjs → chunk-C4LP6BPG.mjs} +1 -1
- package/dist/client/{chunk-NBFRJ5NB.mjs → chunk-CKXEUWWA.mjs} +2 -2
- package/dist/client/{chunk-4RTFGHZN.mjs → chunk-E6VIWZUG.mjs} +6 -3
- package/dist/client/{chunk-Z62JYS5O.mjs → chunk-FMZZHAIR.mjs} +2 -2
- package/dist/client/{chunk-FHU6PFPM.mjs → chunk-ISAUXU5R.mjs} +1 -1
- package/dist/client/{chunk-HIHOQGIP.mjs → chunk-LJCX6V7Q.mjs} +9 -9
- package/dist/client/{chunk-6DPXDOIL.mjs → chunk-MLBNVN4H.mjs} +99 -26
- package/dist/client/{chunk-7DH35FGA.mjs → chunk-PMNAV6LO.mjs} +1 -1
- package/dist/client/{chunk-MFPKS6QS.mjs → chunk-RMOFBBNA.mjs} +5 -5
- package/dist/client/{chunk-25W2EQUN.mjs → chunk-RWYFG625.mjs} +17 -8
- package/dist/client/client.mjs +305 -113
- package/dist/client/{courseRegistration-2D3ACMJR.mjs → courseRegistration-X63QAIVV.mjs} +6 -6
- package/dist/client/{eventCalendar-QY4UZUFF.mjs → eventCalendar-5T24GCZL.mjs} +9 -9
- package/dist/client/{eventCombined-RRCDKJC2.mjs → eventCombined-AZVTF22X.mjs} +9 -9
- package/dist/client/{eventDetails-YO335BUT.mjs → eventDetails-7GPFNLGF.mjs} +9 -9
- package/dist/client/{eventListing-PXA6GFQ3.mjs → eventListing-QEUMTMUM.mjs} +9 -9
- package/dist/client/{eventRegistration-2ZHEDDXO.mjs → eventRegistration-P2EDKCQZ.mjs} +9 -9
- package/dist/client/{form-ZS6KX4U2.mjs → form-NUJ7H4IN.mjs} +3 -3
- package/dist/client/{headerSection-QK5SLIIB.mjs → headerSection-JB7LECPL.mjs} +3 -3
- package/dist/client/hooks.mjs +93 -42
- package/dist/client/{locationMap-GFNIUD2X.mjs → locationMap-UEYWUCSW.mjs} +3 -3
- package/dist/client/{newsletterForm-PGLTTCUG.mjs → newsletterForm-S2YZQ2X7.mjs} +3 -3
- package/dist/client/{productDetail-OPBE5ZPI.mjs → productDetail-H5MADGG7.mjs} +6 -6
- package/dist/client/{productList-NI72Q62Z.mjs → productList-DK7YON7H.mjs} +6 -6
- package/dist/client/rendering/client.mjs +262 -70
- package/dist/client/rendering/islands.mjs +19 -19
- package/dist/client/rendering.mjs +306 -114
- package/dist/client/{shop-3ZQPEWYI.mjs → shop-6PA7RDRJ.mjs} +6 -6
- package/dist/client/spam-protection.mjs +10 -10
- package/dist/preview-next/client/runtime.mjs +5 -5
- package/dist/{sdk-runtime-FSHXCWDS.mjs → sdk-runtime-JP5347OB.mjs} +6 -6
- package/dist/server/components.mjs +149 -69
- package/dist/server/config-validation.mjs +85 -34
- package/dist/server/config.mjs +85 -34
- package/dist/server/data.mjs +93 -42
- package/dist/server/index.mjs +1 -1
- package/dist/server/navigation.mjs +2 -2
- package/dist/server/next.mjs +170 -90
- package/dist/server/page-converter.mjs +77 -26
- package/dist/server/prebuild.mjs +1 -1
- package/dist/server/rendering/server.mjs +161 -81
- package/dist/server/rendering.mjs +165 -85
- package/dist/server/routing.mjs +135 -58
- package/dist/server/server.mjs +102 -51
- package/package.json +2 -2
- package/dist/SdkPreviewModeRuntime-UBL6MSNP.mjs +0 -8
|
@@ -182,6 +182,8 @@ function publicEventPricingType(pricing) {
|
|
|
182
182
|
case "ticket_types":
|
|
183
183
|
case "course":
|
|
184
184
|
return isFreePublicEventPriceDisplay(pricing.display) ? "free" : "paid";
|
|
185
|
+
case "external":
|
|
186
|
+
return "external";
|
|
185
187
|
}
|
|
186
188
|
}
|
|
187
189
|
function publicEventPricingCurrency(pricing) {
|
|
@@ -193,6 +195,8 @@ function publicEventPricingCurrency(pricing) {
|
|
|
193
195
|
return pricing.currency;
|
|
194
196
|
case "course":
|
|
195
197
|
return pricing.display.display.currency;
|
|
198
|
+
case "external":
|
|
199
|
+
return null;
|
|
196
200
|
}
|
|
197
201
|
}
|
|
198
202
|
function isFreePublicEventPriceDisplay(display) {
|
|
@@ -206,6 +210,7 @@ function isFreePublicEventPriceDisplay(display) {
|
|
|
206
210
|
case "range":
|
|
207
211
|
case "mixed":
|
|
208
212
|
case "unavailable":
|
|
213
|
+
case "external":
|
|
209
214
|
return false;
|
|
210
215
|
}
|
|
211
216
|
}
|
|
@@ -236,6 +241,8 @@ function formatBookingPriceDisplay(display, options = {}) {
|
|
|
236
241
|
return display.paidToAmount > display.paidFromAmount ? `Free / ${formatCurrencyAmount(display.paidFromAmount, display.currency, options)} - ${formatCurrencyAmount(display.paidToAmount, display.currency, options)}` : `Free / ${formatCurrencyAmount(display.paidFromAmount, display.currency, options)}`;
|
|
237
242
|
case "unavailable":
|
|
238
243
|
return "Pricing unavailable";
|
|
244
|
+
case "external":
|
|
245
|
+
return display.label;
|
|
239
246
|
case "course":
|
|
240
247
|
return formatCoursePriceDisplayLabel(display.display, options);
|
|
241
248
|
default:
|
|
@@ -259,11 +266,11 @@ function isValidTimeZone(timeZone) {
|
|
|
259
266
|
}
|
|
260
267
|
function getSafeTimeZone(timeZone) {
|
|
261
268
|
const normalized = typeof timeZone === "string" ? timeZone.trim() : "";
|
|
262
|
-
return normalized && isValidTimeZone(normalized) ? normalized : FALLBACK_TIMEZONE;
|
|
269
|
+
return normalized.length > 0 && isValidTimeZone(normalized) ? normalized : FALLBACK_TIMEZONE;
|
|
263
270
|
}
|
|
264
271
|
function parseStrictBookingTimeZone(timeZone) {
|
|
265
272
|
const normalized = timeZone.trim();
|
|
266
|
-
if (
|
|
273
|
+
if (normalized.length === 0 || !isValidTimeZone(normalized)) {
|
|
267
274
|
return null;
|
|
268
275
|
}
|
|
269
276
|
return normalized;
|
|
@@ -340,7 +347,7 @@ function parseScheduledBookingDateTime(input) {
|
|
|
340
347
|
try {
|
|
341
348
|
const startsAt = toUtcIsoDateTimeString(input.startsAt);
|
|
342
349
|
const timeZone = parseStrictBookingTimeZone(input.timeZone);
|
|
343
|
-
if (
|
|
350
|
+
if (timeZone === null) {
|
|
344
351
|
return {
|
|
345
352
|
ok: false,
|
|
346
353
|
field: "timeZone",
|
|
@@ -475,10 +482,10 @@ function normalizeLocationAddressText(value) {
|
|
|
475
482
|
return null;
|
|
476
483
|
}
|
|
477
484
|
const trimmed = value.trim();
|
|
478
|
-
return trimmed ? trimmed : null;
|
|
485
|
+
return trimmed.length > 0 ? trimmed : null;
|
|
479
486
|
}
|
|
480
487
|
function hasLocationCoordinates(value) {
|
|
481
|
-
return typeof value
|
|
488
|
+
return value != null && typeof value.lat === "number" && typeof value.lng === "number";
|
|
482
489
|
}
|
|
483
490
|
function toLocationCoordinates(value) {
|
|
484
491
|
if (!hasLocationCoordinates(value)) {
|
|
@@ -26353,6 +26360,18 @@ var publicCoursesArraySchema = z43.array(publicCourseSchema);
|
|
|
26353
26360
|
var eventPresetSchema = z44.enum(["event", "class", "workshop", "retreat", "performance"]);
|
|
26354
26361
|
var eventScheduleScopeSchema = z44.enum(["recurring", "oneOff"]);
|
|
26355
26362
|
var eventDestinationModeSchema = z44.enum(["cms-managed", "system-managed"]);
|
|
26363
|
+
var publicEventDestinationSchema = z44.discriminatedUnion("kind", [
|
|
26364
|
+
z44.object({
|
|
26365
|
+
kind: z44.literal("native"),
|
|
26366
|
+
mode: eventDestinationModeSchema,
|
|
26367
|
+
path: z44.string()
|
|
26368
|
+
}),
|
|
26369
|
+
z44.object({
|
|
26370
|
+
kind: z44.literal("external"),
|
|
26371
|
+
url: z44.string(),
|
|
26372
|
+
label: z44.string()
|
|
26373
|
+
})
|
|
26374
|
+
]);
|
|
26356
26375
|
var eventVenueSchema = z44.object({
|
|
26357
26376
|
id: z44.string(),
|
|
26358
26377
|
name: z44.string(),
|
|
@@ -26367,7 +26386,7 @@ var eventCategorySchema = z44.object({
|
|
|
26367
26386
|
name: z44.string(),
|
|
26368
26387
|
color: z44.string().nullable()
|
|
26369
26388
|
});
|
|
26370
|
-
var pricingTypeSchema = z44.enum(["free", "paid"]);
|
|
26389
|
+
var pricingTypeSchema = z44.enum(["free", "paid", "external"]);
|
|
26371
26390
|
var accessRestrictionSchema = z44.enum(["none", "category"]);
|
|
26372
26391
|
var eventPricingModeSchema = z44.enum(["single", "ticket_types"]);
|
|
26373
26392
|
var publicCoursePriceDisplaySchema = z44.discriminatedUnion("kind", [
|
|
@@ -26388,6 +26407,7 @@ var publicEventPriceDisplaySchema = z44.discriminatedUnion("kind", [
|
|
|
26388
26407
|
currency: z44.string()
|
|
26389
26408
|
}),
|
|
26390
26409
|
z44.object({ kind: z44.literal("unavailable"), currency: z44.string() }),
|
|
26410
|
+
z44.object({ kind: z44.literal("external"), label: z44.string() }),
|
|
26391
26411
|
z44.object({ kind: z44.literal("course"), display: publicCoursePriceDisplaySchema })
|
|
26392
26412
|
]);
|
|
26393
26413
|
var publicEventTicketTypePriceDisplaySchema = z44.union([
|
|
@@ -26466,6 +26486,10 @@ var publicEventPricingSchema = z44.discriminatedUnion("kind", [
|
|
|
26466
26486
|
z44.object({
|
|
26467
26487
|
kind: z44.literal("course"),
|
|
26468
26488
|
display: z44.object({ kind: z44.literal("course"), display: publicCoursePriceDisplaySchema })
|
|
26489
|
+
}),
|
|
26490
|
+
z44.object({
|
|
26491
|
+
kind: z44.literal("external"),
|
|
26492
|
+
display: z44.object({ kind: z44.literal("external"), label: z44.string() })
|
|
26469
26493
|
})
|
|
26470
26494
|
]);
|
|
26471
26495
|
var publicTeamMemberSummarySchema = z44.object({
|
|
@@ -26494,7 +26518,8 @@ var publicEventSchema = z44.object({
|
|
|
26494
26518
|
image: mediaSchema2.nullable().optional()
|
|
26495
26519
|
}).optional(),
|
|
26496
26520
|
slug: z44.string(),
|
|
26497
|
-
path: z44.string(),
|
|
26521
|
+
path: z44.string().nullable(),
|
|
26522
|
+
destination: publicEventDestinationSchema,
|
|
26498
26523
|
requiresRegistration: z44.boolean(),
|
|
26499
26524
|
deliveryMode: z44.enum(["in_person", "online", "hybrid"]),
|
|
26500
26525
|
attendanceModes: z44.array(publicEventAttendanceModeAvailabilitySchema),
|
|
@@ -26798,12 +26823,41 @@ function isEventContentType(slug) {
|
|
|
26798
26823
|
return EVENT_CONTENT_TYPE_SLUGS.includes(slug);
|
|
26799
26824
|
}
|
|
26800
26825
|
|
|
26826
|
+
// ../blocks/src/system/runtime/nodes/events/shared/destination.ts
|
|
26827
|
+
function isRecord5(value) {
|
|
26828
|
+
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
26829
|
+
}
|
|
26830
|
+
function isRuntimeEventDestination(value) {
|
|
26831
|
+
if (!isRecord5(value) || typeof value.kind !== "string") return false;
|
|
26832
|
+
if (value.kind === "native") {
|
|
26833
|
+
return (value.mode === "cms-managed" || value.mode === "system-managed") && typeof value.path === "string";
|
|
26834
|
+
}
|
|
26835
|
+
return value.kind === "external" && typeof value.url === "string" && typeof value.label === "string";
|
|
26836
|
+
}
|
|
26837
|
+
function resolveRuntimeEventDestination(event) {
|
|
26838
|
+
if (isRuntimeEventDestination(event.destination)) {
|
|
26839
|
+
return event.destination;
|
|
26840
|
+
}
|
|
26841
|
+
return {
|
|
26842
|
+
kind: "native",
|
|
26843
|
+
mode: event.eventDestinationMode === "system-managed" ? "system-managed" : "cms-managed",
|
|
26844
|
+
path: typeof event.path === "string" ? event.path : ""
|
|
26845
|
+
};
|
|
26846
|
+
}
|
|
26847
|
+
|
|
26801
26848
|
// ../blocks/src/system/runtime/nodes/events/shared/pricing.ts
|
|
26802
26849
|
var DEFAULT_EVENT_CURRENCY = "USD";
|
|
26803
26850
|
function resolveRuntimeEventPricing(event) {
|
|
26804
26851
|
if (isPublicEventPricing(event.pricing)) {
|
|
26805
26852
|
return event.pricing;
|
|
26806
26853
|
}
|
|
26854
|
+
const destination = resolveRuntimeEventDestination(event);
|
|
26855
|
+
if (destination.kind === "external") {
|
|
26856
|
+
return {
|
|
26857
|
+
kind: "external",
|
|
26858
|
+
display: { kind: "external", label: "External registration" }
|
|
26859
|
+
};
|
|
26860
|
+
}
|
|
26807
26861
|
const legacy = event;
|
|
26808
26862
|
const currency = readCurrency(legacy.currency);
|
|
26809
26863
|
if (event.requiresRegistration === false) {
|
|
@@ -26840,22 +26894,22 @@ function resolveRuntimeEventPricing(event) {
|
|
|
26840
26894
|
function readCurrency(value) {
|
|
26841
26895
|
return typeof value === "string" && value.trim().length > 0 ? value : DEFAULT_EVENT_CURRENCY;
|
|
26842
26896
|
}
|
|
26843
|
-
function
|
|
26897
|
+
function isRecord6(value) {
|
|
26844
26898
|
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
26845
26899
|
}
|
|
26846
26900
|
function isPublicEventPricing(value) {
|
|
26847
|
-
if (!
|
|
26848
|
-
return value.kind === "drop_in" || value.kind === "free_registration" || value.kind === "single_paid" || value.kind === "ticket_types" || value.kind === "course";
|
|
26901
|
+
if (!isRecord6(value) || typeof value.kind !== "string") return false;
|
|
26902
|
+
return value.kind === "drop_in" || value.kind === "free_registration" || value.kind === "single_paid" || value.kind === "ticket_types" || value.kind === "course" || value.kind === "external";
|
|
26849
26903
|
}
|
|
26850
26904
|
function isPublicEventTicketType(value) {
|
|
26851
|
-
return
|
|
26905
|
+
return isRecord6(value) && typeof value.id === "string";
|
|
26852
26906
|
}
|
|
26853
26907
|
function readTicketTypePriceDisplay(value, currency) {
|
|
26854
26908
|
const display = readLegacyPriceDisplay(value, currency);
|
|
26855
|
-
return display.kind === "course" ? { kind: "unavailable", currency } : display;
|
|
26909
|
+
return display.kind === "course" || display.kind === "external" ? { kind: "unavailable", currency } : display;
|
|
26856
26910
|
}
|
|
26857
26911
|
function readLegacyPriceDisplay(value, currency) {
|
|
26858
|
-
if (!
|
|
26912
|
+
if (!isRecord6(value) || typeof value.kind !== "string") {
|
|
26859
26913
|
return { kind: "unavailable", currency };
|
|
26860
26914
|
}
|
|
26861
26915
|
const displayCurrency = readCurrency(value.currency);
|
|
@@ -26894,7 +26948,7 @@ function readLegacyPriceDisplay(value, currency) {
|
|
|
26894
26948
|
case "unavailable":
|
|
26895
26949
|
return { kind: "unavailable", currency: displayCurrency };
|
|
26896
26950
|
case "course":
|
|
26897
|
-
return
|
|
26951
|
+
return isRecord6(value.display) ? {
|
|
26898
26952
|
kind: "course",
|
|
26899
26953
|
display: readCoursePriceDisplay(value.display, displayCurrency)
|
|
26900
26954
|
} : {
|
|
@@ -26981,7 +27035,7 @@ function resolveEventRequiresPayment(input) {
|
|
|
26981
27035
|
if (!input.event) {
|
|
26982
27036
|
return false;
|
|
26983
27037
|
}
|
|
26984
|
-
return publicEventPricingType(resolveRuntimeEventPricing(input.event))
|
|
27038
|
+
return publicEventPricingType(resolveRuntimeEventPricing(input.event)) === "paid";
|
|
26985
27039
|
}
|
|
26986
27040
|
|
|
26987
27041
|
// ../blocks/src/system/runtime/nodes/event-registration/registrationEventAdapter.ts
|
|
@@ -27178,15 +27232,16 @@ var eventRegistrationBlockRuntime = defineClientOwnedBlockRuntime({
|
|
|
27178
27232
|
})
|
|
27179
27233
|
});
|
|
27180
27234
|
function normalizeEventRegistrationEventInput(value) {
|
|
27181
|
-
if (!
|
|
27235
|
+
if (!isRecord7(value)) {
|
|
27182
27236
|
return value;
|
|
27183
27237
|
}
|
|
27184
27238
|
return {
|
|
27185
27239
|
...value,
|
|
27240
|
+
destination: resolveRuntimeEventDestination(value),
|
|
27186
27241
|
pricing: resolveRuntimeEventPricing(value)
|
|
27187
27242
|
};
|
|
27188
27243
|
}
|
|
27189
|
-
function
|
|
27244
|
+
function isRecord7(value) {
|
|
27190
27245
|
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
27191
27246
|
}
|
|
27192
27247
|
var eventRegistrationInteractiveIslandPropsCodec = createInteractiveIslandCodec({
|
|
@@ -28455,7 +28510,7 @@ function formatCalendarTitle(viewDate, view, days, monthNames = MONTH_NAMES) {
|
|
|
28455
28510
|
if (view === "week") {
|
|
28456
28511
|
const weekStart = days[0];
|
|
28457
28512
|
const weekEnd = days[6];
|
|
28458
|
-
if (
|
|
28513
|
+
if (weekStart === void 0 || weekEnd === void 0) {
|
|
28459
28514
|
return `${monthNames[viewDate.getMonth()] ?? ""} ${viewDate.getFullYear()}`;
|
|
28460
28515
|
}
|
|
28461
28516
|
const startMonth = monthNames[weekStart.getMonth()] ?? "";
|
|
@@ -28561,7 +28616,9 @@ function getLocalDateKey(isoTimestamp, timeZone) {
|
|
|
28561
28616
|
const year = parts.find((part) => part.type === "year")?.value;
|
|
28562
28617
|
const month = parts.find((part) => part.type === "month")?.value;
|
|
28563
28618
|
const day = parts.find((part) => part.type === "day")?.value;
|
|
28564
|
-
if (
|
|
28619
|
+
if (year === void 0 || year.length === 0) return null;
|
|
28620
|
+
if (month === void 0 || month.length === 0) return null;
|
|
28621
|
+
if (day === void 0 || day.length === 0) return null;
|
|
28565
28622
|
return `${year}-${month}-${day}`;
|
|
28566
28623
|
}
|
|
28567
28624
|
var validTimeZoneCache = /* @__PURE__ */ new Map();
|
|
@@ -28818,7 +28875,7 @@ function enumerateDateKeys(startDateKey, endDateKey) {
|
|
|
28818
28875
|
}
|
|
28819
28876
|
function parseDateKey(dateKey) {
|
|
28820
28877
|
const match = /^(\d{4})-(\d{2})-(\d{2})$/.exec(dateKey);
|
|
28821
|
-
if (
|
|
28878
|
+
if (match === null) {
|
|
28822
28879
|
throw new Error(`Invalid timetable date key: ${dateKey}`);
|
|
28823
28880
|
}
|
|
28824
28881
|
const [, year, month, day] = match;
|
|
@@ -28838,7 +28895,7 @@ function groupItemsByDate(items, accessors) {
|
|
|
28838
28895
|
const dateKey = getLocalDateKey(startsAt, timeZone);
|
|
28839
28896
|
if (dateKey == null) continue;
|
|
28840
28897
|
const existing = grouped.get(dateKey);
|
|
28841
|
-
if (existing) {
|
|
28898
|
+
if (existing !== void 0) {
|
|
28842
28899
|
existing.push(item);
|
|
28843
28900
|
} else {
|
|
28844
28901
|
grouped.set(dateKey, [item]);
|
|
@@ -28979,16 +29036,28 @@ function groupEventsByDate(events) {
|
|
|
28979
29036
|
function formatEventPrice(event) {
|
|
28980
29037
|
return formatEventPricing(resolveRuntimeEventPricing(event), { decimals: "auto" });
|
|
28981
29038
|
}
|
|
29039
|
+
function resolveEventHref(event) {
|
|
29040
|
+
const destination = resolveRuntimeEventDestination(event);
|
|
29041
|
+
return destination.kind === "external" ? destination.url : destination.path;
|
|
29042
|
+
}
|
|
29043
|
+
function resolveEventLinkProps(event) {
|
|
29044
|
+
const href = resolveEventHref(event);
|
|
29045
|
+
const destination = resolveRuntimeEventDestination(event);
|
|
29046
|
+
return destination.kind === "external" ? { href, target: "_blank", rel: "noopener noreferrer" } : { href };
|
|
29047
|
+
}
|
|
28982
29048
|
function resolveEventCta(event, buttonText) {
|
|
28983
29049
|
const { isFull: isSoldOut } = getEventAvailability(event);
|
|
28984
|
-
const
|
|
29050
|
+
const destination = resolveRuntimeEventDestination(event);
|
|
29051
|
+
const isExternal = destination.kind === "external";
|
|
29052
|
+
const defaultButtonText = isExternal ? destination.label : event.kind === "course_session" ? "Book course" : "Book";
|
|
28985
29053
|
const effectiveButtonText = buttonText ?? defaultButtonText;
|
|
28986
|
-
|
|
28987
|
-
|
|
29054
|
+
const href = resolveEventHref(event);
|
|
29055
|
+
if (!isExternal && isSoldOut) {
|
|
29056
|
+
return { label: "Sold out", href, external: false, hidden: true };
|
|
28988
29057
|
}
|
|
28989
29058
|
const enrollmentOpen = event.kind === "course_session" ? event.course?.enrollmentOpen !== false : true;
|
|
28990
29059
|
const label = !enrollmentOpen ? "Registration closed" : effectiveButtonText;
|
|
28991
|
-
return { label, href:
|
|
29060
|
+
return { label, href, external: isExternal, hidden: false };
|
|
28992
29061
|
}
|
|
28993
29062
|
|
|
28994
29063
|
// ../../node_modules/.pnpm/clsx@2.1.1/node_modules/clsx/dist/clsx.mjs
|
|
@@ -30426,6 +30495,8 @@ var EventCard = ({
|
|
|
30426
30495
|
"a",
|
|
30427
30496
|
{
|
|
30428
30497
|
href: cta.href,
|
|
30498
|
+
target: cta.external ? "_blank" : void 0,
|
|
30499
|
+
rel: cta.external ? "noopener noreferrer" : void 0,
|
|
30429
30500
|
className: `${buttonClass} event-card-cta`,
|
|
30430
30501
|
children: cta.label
|
|
30431
30502
|
}
|
|
@@ -30515,10 +30586,19 @@ var EventCompactRow = ({
|
|
|
30515
30586
|
formattedTime,
|
|
30516
30587
|
/* @__PURE__ */ jsx8("span", { className: "event-compact-row-action-price", children: price })
|
|
30517
30588
|
] }),
|
|
30518
|
-
cta.hidden ? /* @__PURE__ */ jsx8("span", { className: "event-compact-row-status", children: cta.label }) : /* @__PURE__ */ jsxs6(
|
|
30519
|
-
|
|
30520
|
-
|
|
30521
|
-
|
|
30589
|
+
cta.hidden ? /* @__PURE__ */ jsx8("span", { className: "event-compact-row-status", children: cta.label }) : /* @__PURE__ */ jsxs6(
|
|
30590
|
+
"a",
|
|
30591
|
+
{
|
|
30592
|
+
href: cta.href,
|
|
30593
|
+
target: cta.external ? "_blank" : void 0,
|
|
30594
|
+
rel: cta.external ? "noopener noreferrer" : void 0,
|
|
30595
|
+
className: `${buttonClass} event-compact-row-cta`,
|
|
30596
|
+
children: [
|
|
30597
|
+
/* @__PURE__ */ jsx8("span", { children: cta.label }),
|
|
30598
|
+
/* @__PURE__ */ jsx8(ArrowRightIcon, { "aria-hidden": "true" })
|
|
30599
|
+
]
|
|
30600
|
+
}
|
|
30601
|
+
)
|
|
30522
30602
|
] })
|
|
30523
30603
|
] })
|
|
30524
30604
|
] });
|
|
@@ -32108,7 +32188,7 @@ function inferLegacyOfferingsPreviewGroupOrder(overrides) {
|
|
|
32108
32188
|
return keys.length >= 2 ? keys : [];
|
|
32109
32189
|
}
|
|
32110
32190
|
function normalizeOfferingsPreviewContentForWrite(value) {
|
|
32111
|
-
if (!
|
|
32191
|
+
if (!isRecord8(value)) return null;
|
|
32112
32192
|
const groupOrderValue = value.groupOrder;
|
|
32113
32193
|
if (Array.isArray(groupOrderValue)) {
|
|
32114
32194
|
const normalized = normalizeOfferingsPreviewGroupOrder(groupOrderValue);
|
|
@@ -32121,7 +32201,7 @@ function normalizeOfferingsPreviewContentForWrite(value) {
|
|
|
32121
32201
|
return { ...value, groupOrder: [] };
|
|
32122
32202
|
}
|
|
32123
32203
|
const legacyOrder = inferLegacyOfferingsPreviewGroupOrder(
|
|
32124
|
-
Array.isArray(value.groupOverrides) ? value.groupOverrides.filter(
|
|
32204
|
+
Array.isArray(value.groupOverrides) ? value.groupOverrides.filter(isRecord8) : []
|
|
32125
32205
|
);
|
|
32126
32206
|
return legacyOrder.length > 0 ? { ...value, groupOrder: legacyOrder } : value;
|
|
32127
32207
|
}
|
|
@@ -32175,7 +32255,7 @@ function uniqueOfferingsPreviewSourceKeys(values) {
|
|
|
32175
32255
|
}
|
|
32176
32256
|
return keys;
|
|
32177
32257
|
}
|
|
32178
|
-
function
|
|
32258
|
+
function isRecord8(value) {
|
|
32179
32259
|
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
32180
32260
|
}
|
|
32181
32261
|
function mergeOrderedKeysWithDefaults(orderedKeys, defaultKeys) {
|
|
@@ -32637,7 +32717,7 @@ function isOfferingsPreviewItemLimit(value) {
|
|
|
32637
32717
|
return value === "1" || value === "2" || value === "3" || value === "4" || value === "5" || value === "6" || value === null;
|
|
32638
32718
|
}
|
|
32639
32719
|
function normalizeOfferingsPreviewGroupOverride(value) {
|
|
32640
|
-
if (!
|
|
32720
|
+
if (!isRecord9(value)) return [];
|
|
32641
32721
|
const override = {};
|
|
32642
32722
|
if (isOfferingsPreviewSourceKey(value.sourceKey) || value.sourceKey === null) {
|
|
32643
32723
|
override.sourceKey = value.sourceKey;
|
|
@@ -32669,12 +32749,12 @@ function isButtonVariant(value) {
|
|
|
32669
32749
|
return value === "primary" || value === "secondary" || value === "outline" || value === "link" || value === null;
|
|
32670
32750
|
}
|
|
32671
32751
|
function normalizeCardStylesContent(value) {
|
|
32672
|
-
return
|
|
32752
|
+
return isRecord9(value) || value === null ? value : void 0;
|
|
32673
32753
|
}
|
|
32674
32754
|
function normalizeSectionStylesContent(value) {
|
|
32675
|
-
return
|
|
32755
|
+
return isRecord9(value) || value === null ? value : void 0;
|
|
32676
32756
|
}
|
|
32677
|
-
function
|
|
32757
|
+
function isRecord9(value) {
|
|
32678
32758
|
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
32679
32759
|
}
|
|
32680
32760
|
|
|
@@ -35840,7 +35920,7 @@ function deriveNewsletterSignupRuntimeSource(values) {
|
|
|
35840
35920
|
};
|
|
35841
35921
|
}
|
|
35842
35922
|
function sanitizeNewsletterSignupPublicContent(content) {
|
|
35843
|
-
if (!
|
|
35923
|
+
if (!isRecord10(content)) return content;
|
|
35844
35924
|
const provider = parseNewsletterSignupDestinationProvider(content.destinationProvider) ?? getProviderFromExplicitDestination(content.destination);
|
|
35845
35925
|
const {
|
|
35846
35926
|
destination: _destination,
|
|
@@ -35859,7 +35939,7 @@ function sanitizeNewsletterSignupPublicContent(content) {
|
|
|
35859
35939
|
return mutablePublicContent;
|
|
35860
35940
|
}
|
|
35861
35941
|
function getProviderFromExplicitDestination(destination) {
|
|
35862
|
-
if (!
|
|
35942
|
+
if (!isRecord10(destination) || typeof destination.tag !== "string") return null;
|
|
35863
35943
|
if (destination.tag === "riverbank_list") return "riverbank";
|
|
35864
35944
|
if (destination.tag === "mailchimp_audience") return "mailchimp";
|
|
35865
35945
|
return null;
|
|
@@ -35871,7 +35951,7 @@ function parseTrimmedString(value) {
|
|
|
35871
35951
|
const trimmed = value.trim();
|
|
35872
35952
|
return trimmed.length > 0 ? trimmed : null;
|
|
35873
35953
|
}
|
|
35874
|
-
function
|
|
35954
|
+
function isRecord10(value) {
|
|
35875
35955
|
return typeof value === "object" && value !== null;
|
|
35876
35956
|
}
|
|
35877
35957
|
|
|
@@ -37914,11 +37994,11 @@ function extractRouteUpdatedAt(candidate) {
|
|
|
37914
37994
|
}
|
|
37915
37995
|
function resolveRouteTargetForStage(routeIdValue, routes, stageInput) {
|
|
37916
37996
|
const routeId = typeof routeIdValue === "string" ? routeIdValue : null;
|
|
37917
|
-
if (
|
|
37997
|
+
if (routeId === null || routeId.length === 0 || routes === void 0) return null;
|
|
37918
37998
|
const routeEntry = routes[routeId];
|
|
37919
37999
|
if (!isRouteVisibleInStage(routeEntry, stageInput)) return null;
|
|
37920
38000
|
const href = extractRouteHref(routeEntry, stageInput);
|
|
37921
|
-
if (
|
|
38001
|
+
if (href === null) return null;
|
|
37922
38002
|
return {
|
|
37923
38003
|
routeId,
|
|
37924
38004
|
href,
|
|
@@ -38070,7 +38150,7 @@ import React4 from "react";
|
|
|
38070
38150
|
// ../blocks/src/system/data/linkedContentEntries.ts
|
|
38071
38151
|
var LINKED_CONTENT_ENTRY_META_KEY = "__rbLinkedContentEntry";
|
|
38072
38152
|
function coerceLinkedContentEntriesPayload(payload) {
|
|
38073
|
-
if (!
|
|
38153
|
+
if (!isRecord11(payload)) return payload;
|
|
38074
38154
|
const response = payload;
|
|
38075
38155
|
if (!Array.isArray(response.entries)) return payload;
|
|
38076
38156
|
const contentType = parsePublicContentTypeMeta(response.contentType);
|
|
@@ -38078,16 +38158,16 @@ function coerceLinkedContentEntriesPayload(payload) {
|
|
|
38078
38158
|
return response.entries.map((entry) => enrichLinkedContentEntry(entry, contentType));
|
|
38079
38159
|
}
|
|
38080
38160
|
function getLinkedContentEntryMeta(value) {
|
|
38081
|
-
if (!
|
|
38161
|
+
if (!isRecord11(value)) return null;
|
|
38082
38162
|
const candidate = value[LINKED_CONTENT_ENTRY_META_KEY];
|
|
38083
38163
|
return isLinkedContentEntryMeta(candidate) ? candidate : null;
|
|
38084
38164
|
}
|
|
38085
38165
|
function buildLinkedContentEditTarget(input) {
|
|
38086
38166
|
const { entry, sourceBlockId, sourceBlockKind, itemIndex } = input;
|
|
38087
|
-
if (!
|
|
38167
|
+
if (!isRecord11(entry)) return null;
|
|
38088
38168
|
const meta = getLinkedContentEntryMeta(entry);
|
|
38089
38169
|
if (!meta || meta.support.kind !== "supported") return null;
|
|
38090
|
-
const content =
|
|
38170
|
+
const content = isRecord11(entry.content) ? entry.content : {};
|
|
38091
38171
|
return {
|
|
38092
38172
|
kind: "linked-content-entry",
|
|
38093
38173
|
entryId: meta.entryId,
|
|
@@ -38137,12 +38217,12 @@ function resolveLinkedEntryInlineFieldEligibility(input) {
|
|
|
38137
38217
|
};
|
|
38138
38218
|
}
|
|
38139
38219
|
function enrichLinkedContentEntry(entry, contentType) {
|
|
38140
|
-
if (!
|
|
38220
|
+
if (!isRecord11(entry)) return entry;
|
|
38141
38221
|
const entryId = typeof entry.id === "string" ? entry.id : null;
|
|
38142
38222
|
if (!entryId) return entry;
|
|
38143
38223
|
const title = typeof entry.title === "string" && entry.title.trim().length > 0 ? entry.title : entryId;
|
|
38144
38224
|
const optimisticHash = typeof entry.optimisticHash === "string" && entry.optimisticHash.length > 0 ? entry.optimisticHash : null;
|
|
38145
|
-
const content =
|
|
38225
|
+
const content = isRecord11(entry.content) ? entry.content : {};
|
|
38146
38226
|
const meta = {
|
|
38147
38227
|
kind: "linked-content-entry",
|
|
38148
38228
|
entryId,
|
|
@@ -38238,7 +38318,7 @@ function capitalize(value) {
|
|
|
38238
38318
|
return value.charAt(0).toUpperCase() + value.slice(1).toLowerCase();
|
|
38239
38319
|
}
|
|
38240
38320
|
function parsePublicContentTypeMeta(value) {
|
|
38241
|
-
if (!
|
|
38321
|
+
if (!isRecord11(value)) return null;
|
|
38242
38322
|
if (typeof value.key !== "string" || value.key.trim().length === 0) return null;
|
|
38243
38323
|
return {
|
|
38244
38324
|
key: value.key,
|
|
@@ -38248,7 +38328,7 @@ function parsePublicContentTypeMeta(value) {
|
|
|
38248
38328
|
};
|
|
38249
38329
|
}
|
|
38250
38330
|
function parsePublicContentTypeLinkedEntryEditing(value) {
|
|
38251
|
-
if (!
|
|
38331
|
+
if (!isRecord11(value) || typeof value.kind !== "string") return null;
|
|
38252
38332
|
switch (value.kind) {
|
|
38253
38333
|
case "generic":
|
|
38254
38334
|
return { kind: "generic" };
|
|
@@ -38262,7 +38342,7 @@ function parsePublicContentTypeLinkedEntryEditing(value) {
|
|
|
38262
38342
|
}
|
|
38263
38343
|
}
|
|
38264
38344
|
function parsePublicContentTypeFieldMeta(value) {
|
|
38265
|
-
if (!
|
|
38345
|
+
if (!isRecord11(value)) return [];
|
|
38266
38346
|
if (typeof value.id !== "string" || typeof value.type !== "string") return [];
|
|
38267
38347
|
return [{
|
|
38268
38348
|
id: value.id,
|
|
@@ -38277,14 +38357,14 @@ function parseStringArray(value) {
|
|
|
38277
38357
|
return value.filter((item) => typeof item === "string");
|
|
38278
38358
|
}
|
|
38279
38359
|
function isLinkedContentEntryMeta(value) {
|
|
38280
|
-
if (!
|
|
38360
|
+
if (!isRecord11(value)) return false;
|
|
38281
38361
|
if (value.kind !== "linked-content-entry") return false;
|
|
38282
38362
|
if (typeof value.entryId !== "string") return false;
|
|
38283
38363
|
if (typeof value.contentTypeKey !== "string") return false;
|
|
38284
38364
|
if (typeof value.contentTypeLabel !== "string") return false;
|
|
38285
38365
|
if (typeof value.title !== "string") return false;
|
|
38286
38366
|
if (!(value.optimisticHash === null || typeof value.optimisticHash === "string")) return false;
|
|
38287
|
-
if (!
|
|
38367
|
+
if (!isRecord11(value.contentType)) return false;
|
|
38288
38368
|
if (!isLinkedEntryFieldSourceArray(value.fieldSources)) return false;
|
|
38289
38369
|
return isLinkedContentEditSupport(value.support);
|
|
38290
38370
|
}
|
|
@@ -38292,7 +38372,7 @@ function isLinkedEntryFieldSourceArray(value) {
|
|
|
38292
38372
|
return Array.isArray(value) && value.every(isLinkedEntryFieldSource);
|
|
38293
38373
|
}
|
|
38294
38374
|
function isLinkedEntryFieldSource(value) {
|
|
38295
|
-
if (!
|
|
38375
|
+
if (!isRecord11(value)) return false;
|
|
38296
38376
|
if (typeof value.displayPath !== "string") return false;
|
|
38297
38377
|
switch (value.kind) {
|
|
38298
38378
|
case "content-field":
|
|
@@ -38318,7 +38398,7 @@ function isLinkedEntryInlineFieldReadOnlyReason(value) {
|
|
|
38318
38398
|
}
|
|
38319
38399
|
}
|
|
38320
38400
|
function isLinkedContentEditSupport(value) {
|
|
38321
|
-
if (!
|
|
38401
|
+
if (!isRecord11(value) || typeof value.kind !== "string") return false;
|
|
38322
38402
|
switch (value.kind) {
|
|
38323
38403
|
case "supported":
|
|
38324
38404
|
return true;
|
|
@@ -38330,7 +38410,7 @@ function isLinkedContentEditSupport(value) {
|
|
|
38330
38410
|
return false;
|
|
38331
38411
|
}
|
|
38332
38412
|
}
|
|
38333
|
-
function
|
|
38413
|
+
function isRecord11(value) {
|
|
38334
38414
|
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
38335
38415
|
}
|
|
38336
38416
|
|
|
@@ -39786,12 +39866,12 @@ function toTrimmedString(value) {
|
|
|
39786
39866
|
return trimmed ? trimmed : void 0;
|
|
39787
39867
|
}
|
|
39788
39868
|
function normalizeBookingFormConfig(form2) {
|
|
39789
|
-
if (!
|
|
39869
|
+
if (!isRecord12(form2)) return null;
|
|
39790
39870
|
const id = readNonEmptyString(form2.id);
|
|
39791
39871
|
const name = readNonEmptyString(form2.name);
|
|
39792
39872
|
if (!id || !name) return null;
|
|
39793
|
-
const schemaSource =
|
|
39794
|
-
const settingsSource =
|
|
39873
|
+
const schemaSource = isRecord12(form2.schema) ? form2.schema : isRecord12(form2.schemaJson) ? form2.schemaJson : null;
|
|
39874
|
+
const settingsSource = isRecord12(form2.settings) ? form2.settings : isRecord12(form2.settingsJson) ? form2.settingsJson : null;
|
|
39795
39875
|
return {
|
|
39796
39876
|
id,
|
|
39797
39877
|
name,
|
|
@@ -39815,10 +39895,10 @@ function normalizeBookingServices(services) {
|
|
|
39815
39895
|
if (Array.isArray(services)) {
|
|
39816
39896
|
return services.filter(isBookingFormService).map(normalizeService);
|
|
39817
39897
|
}
|
|
39818
|
-
if (
|
|
39898
|
+
if (isRecord12(services) && "services" in services) {
|
|
39819
39899
|
return Array.isArray(services.services) ? services.services.filter(isBookingFormService).map(normalizeService) : [];
|
|
39820
39900
|
}
|
|
39821
|
-
return
|
|
39901
|
+
return isRecord12(services) ? Object.values(services).filter(isBookingFormService).map(normalizeService) : [];
|
|
39822
39902
|
}
|
|
39823
39903
|
function normalizeBookingSchema(value) {
|
|
39824
39904
|
if (!value) return void 0;
|
|
@@ -39830,7 +39910,7 @@ function normalizeBookingSchema(value) {
|
|
|
39830
39910
|
};
|
|
39831
39911
|
}
|
|
39832
39912
|
function readBookingFormField(value) {
|
|
39833
|
-
if (!
|
|
39913
|
+
if (!isRecord12(value)) return null;
|
|
39834
39914
|
const id = readNonEmptyString(value.id);
|
|
39835
39915
|
const label = readNonEmptyString(value.label);
|
|
39836
39916
|
const type = readBookingFieldType(value.type);
|
|
@@ -39876,7 +39956,7 @@ function readBookingFieldOptions(value) {
|
|
|
39876
39956
|
return options.length > 0 ? options : void 0;
|
|
39877
39957
|
}
|
|
39878
39958
|
function readBookingFieldOption(value) {
|
|
39879
|
-
if (!
|
|
39959
|
+
if (!isRecord12(value)) return null;
|
|
39880
39960
|
const optionValue = readNonEmptyString(value.value);
|
|
39881
39961
|
const label = readNonEmptyString(value.label);
|
|
39882
39962
|
return optionValue && label ? { value: optionValue, label } : null;
|
|
@@ -39893,7 +39973,7 @@ function normalizeBookingSettings(value) {
|
|
|
39893
39973
|
};
|
|
39894
39974
|
}
|
|
39895
39975
|
function isBookingFormService(value) {
|
|
39896
|
-
return
|
|
39976
|
+
return isRecord12(value) && typeof value.id === "string" && typeof value.siteId === "string" && typeof value.title === "string";
|
|
39897
39977
|
}
|
|
39898
39978
|
function readNonEmptyString(value) {
|
|
39899
39979
|
if (typeof value !== "string") return null;
|
|
@@ -39911,7 +39991,7 @@ function readStringArray(value) {
|
|
|
39911
39991
|
const strings = value.filter((item) => typeof item === "string");
|
|
39912
39992
|
return strings.length > 0 ? strings : void 0;
|
|
39913
39993
|
}
|
|
39914
|
-
function
|
|
39994
|
+
function isRecord12(value) {
|
|
39915
39995
|
return typeof value === "object" && value !== null;
|
|
39916
39996
|
}
|
|
39917
39997
|
|
|
@@ -40469,7 +40549,7 @@ function EventDetailsView({
|
|
|
40469
40549
|
"a",
|
|
40470
40550
|
{
|
|
40471
40551
|
className: "rb-tile rb-tile--interactive",
|
|
40472
|
-
|
|
40552
|
+
...resolveEventLinkProps(e),
|
|
40473
40553
|
children: /* @__PURE__ */ jsx30(
|
|
40474
40554
|
DateTimeTile,
|
|
40475
40555
|
{
|
|
@@ -42153,7 +42233,7 @@ var AgendaEventCard = ({
|
|
|
42153
42233
|
showCapacity,
|
|
42154
42234
|
onClick
|
|
42155
42235
|
}) => {
|
|
42156
|
-
const
|
|
42236
|
+
const eventLinkProps = resolveEventLinkProps(event);
|
|
42157
42237
|
const categoryColor = event.eventCategory?.color || "rgb(var(--tb-accent))";
|
|
42158
42238
|
const price = formatEventPrice(event);
|
|
42159
42239
|
const { available, isFull } = getEventAvailability(event);
|
|
@@ -42214,7 +42294,7 @@ var AgendaEventCard = ({
|
|
|
42214
42294
|
}
|
|
42215
42295
|
);
|
|
42216
42296
|
}
|
|
42217
|
-
return /* @__PURE__ */ jsx47("a", {
|
|
42297
|
+
return /* @__PURE__ */ jsx47("a", { ...eventLinkProps, className: "event-agenda-card", children: cardContent });
|
|
42218
42298
|
};
|
|
42219
42299
|
|
|
42220
42300
|
// ../blocks/src/system/runtime/nodes/events/shared/WeekAgendaView.tsx
|
|
@@ -42457,7 +42537,7 @@ function renderCalendarSsr(display) {
|
|
|
42457
42537
|
dayEvents.slice(0, MAX_EVENTS_PER_DAY).map((event) => /* @__PURE__ */ jsxs35(
|
|
42458
42538
|
"a",
|
|
42459
42539
|
{
|
|
42460
|
-
|
|
42540
|
+
...resolveEventLinkProps(event),
|
|
42461
42541
|
className: "event-calendar-event",
|
|
42462
42542
|
title: `${event.title} at ${formatTime(event.startsAt, { timeZone: getEventTimeZone(event) })}`,
|
|
42463
42543
|
children: [
|
|
@@ -42585,7 +42665,7 @@ function renderTimetableSsr(display) {
|
|
|
42585
42665
|
day.events.length === 0 ? /* @__PURE__ */ jsx49("p", { className: "event-timetable-day-empty", children: "No classes" }) : day.events.map((cell) => /* @__PURE__ */ jsxs35(
|
|
42586
42666
|
"a",
|
|
42587
42667
|
{
|
|
42588
|
-
|
|
42668
|
+
...resolveEventLinkProps(cell.event),
|
|
42589
42669
|
className: "event-timetable-event",
|
|
42590
42670
|
title: `${cell.event.title}, ${cell.timeLabel}`,
|
|
42591
42671
|
style: {
|
|
@@ -43392,14 +43472,14 @@ function isDecoratedHeadingBlockKind(blockKind) {
|
|
|
43392
43472
|
return blockKind === "block.intro" || blockKind === "block.feature-cards" || blockKind === "block.testimonials" || blockKind === "block.faq";
|
|
43393
43473
|
}
|
|
43394
43474
|
function readVariant(blockContent) {
|
|
43395
|
-
if (!
|
|
43475
|
+
if (!isRecord13(blockContent)) return void 0;
|
|
43396
43476
|
const variant = blockContent.variant;
|
|
43397
43477
|
return typeof variant === "string" ? variant : void 0;
|
|
43398
43478
|
}
|
|
43399
43479
|
function isFaqDecoratedVariant(variant) {
|
|
43400
43480
|
return variant === "default" || variant === "question-columns";
|
|
43401
43481
|
}
|
|
43402
|
-
function
|
|
43482
|
+
function isRecord13(value) {
|
|
43403
43483
|
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
43404
43484
|
}
|
|
43405
43485
|
function buildHeadingDecorationWrapperClassName(className) {
|
|
@@ -68429,7 +68509,7 @@ function preset(id, verticalId, canonicalBehaviour, label, pluralLabel, descript
|
|
|
68429
68509
|
}
|
|
68430
68510
|
|
|
68431
68511
|
// ../api/src/utils/isRecord.ts
|
|
68432
|
-
function
|
|
68512
|
+
function isRecord14(value) {
|
|
68433
68513
|
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
68434
68514
|
}
|
|
68435
68515
|
|
|
@@ -68736,7 +68816,7 @@ function sanitizeMarks(marks) {
|
|
|
68736
68816
|
if (mark.type === "bold" || mark.type === "strong" || mark.type === "italic" || mark.type === "em") {
|
|
68737
68817
|
return [{ type: mark.type }];
|
|
68738
68818
|
}
|
|
68739
|
-
if (mark.type === "link" &&
|
|
68819
|
+
if (mark.type === "link" && isRecord14(mark.attrs) && typeof mark.attrs.href === "string") {
|
|
68740
68820
|
const attrs = { href: mark.attrs.href };
|
|
68741
68821
|
if (typeof mark.attrs.target === "string" && mark.attrs.target.trim().length > 0) {
|
|
68742
68822
|
attrs.target = mark.attrs.target;
|
|
@@ -68751,10 +68831,10 @@ function sanitizeMarks(marks) {
|
|
|
68751
68831
|
return sanitized.length > 0 ? sanitized : void 0;
|
|
68752
68832
|
}
|
|
68753
68833
|
function unwrapRichTextValue(value) {
|
|
68754
|
-
if (
|
|
68834
|
+
if (isRecord14(value) && isRecord14(value.doc)) {
|
|
68755
68835
|
return unwrapRichTextValue(value.doc);
|
|
68756
68836
|
}
|
|
68757
|
-
if (
|
|
68837
|
+
if (isRecord14(value) && value.type === "doc") {
|
|
68758
68838
|
return {
|
|
68759
68839
|
type: "doc",
|
|
68760
68840
|
content: Array.isArray(value.content) ? value.content.filter(isTipTapNodeLike).map(coerceTipTapNode) : []
|
|
@@ -68763,7 +68843,7 @@ function unwrapRichTextValue(value) {
|
|
|
68763
68843
|
return EMPTY_SITE_BANNER_BODY;
|
|
68764
68844
|
}
|
|
68765
68845
|
function isTipTapNodeLike(value) {
|
|
68766
|
-
return
|
|
68846
|
+
return isRecord14(value) && typeof value.type === "string";
|
|
68767
68847
|
}
|
|
68768
68848
|
function coerceTipTapNode(value) {
|
|
68769
68849
|
return {
|
|
@@ -68771,9 +68851,9 @@ function coerceTipTapNode(value) {
|
|
|
68771
68851
|
...Array.isArray(value.content) ? { content: value.content.filter(isTipTapNodeLike).map(coerceTipTapNode) } : {},
|
|
68772
68852
|
...typeof value.text === "string" ? { text: value.text } : {},
|
|
68773
68853
|
...Array.isArray(value.marks) ? {
|
|
68774
|
-
marks: value.marks.filter((mark) =>
|
|
68854
|
+
marks: value.marks.filter((mark) => isRecord14(mark) && typeof mark.type === "string").map((mark) => ({
|
|
68775
68855
|
type: mark.type,
|
|
68776
|
-
...
|
|
68856
|
+
...isRecord14(mark.attrs) ? { attrs: mark.attrs } : {}
|
|
68777
68857
|
}))
|
|
68778
68858
|
} : {}
|
|
68779
68859
|
};
|
|
@@ -68943,7 +69023,7 @@ var ENTRY_REF_KEYS = [
|
|
|
68943
69023
|
"entryId",
|
|
68944
69024
|
"slug"
|
|
68945
69025
|
];
|
|
68946
|
-
function
|
|
69026
|
+
function isRecord15(value) {
|
|
68947
69027
|
return Boolean(value) && typeof value === "object" && !Array.isArray(value);
|
|
68948
69028
|
}
|
|
68949
69029
|
function extractManualEntryRef(item) {
|
|
@@ -68951,7 +69031,7 @@ function extractManualEntryRef(item) {
|
|
|
68951
69031
|
const trimmed = item.trim();
|
|
68952
69032
|
return trimmed.length > 0 ? trimmed : null;
|
|
68953
69033
|
}
|
|
68954
|
-
if (!
|
|
69034
|
+
if (!isRecord15(item)) return null;
|
|
68955
69035
|
for (const key of ENTRY_REF_KEYS) {
|
|
68956
69036
|
const raw = item[key];
|
|
68957
69037
|
if (typeof raw === "string" && raw.trim().length > 0) {
|
|
@@ -69472,7 +69552,7 @@ function collectMediaAssetSidecar(mediaAssets) {
|
|
|
69472
69552
|
return Array.isArray(mediaAssets) && mediaAssets.length > 0 ? mediaAssets : void 0;
|
|
69473
69553
|
}
|
|
69474
69554
|
function convertPageResponseBlock(block) {
|
|
69475
|
-
if (!
|
|
69555
|
+
if (!isRecord16(block)) {
|
|
69476
69556
|
throw new Error("Invalid block format in page API response");
|
|
69477
69557
|
}
|
|
69478
69558
|
if (typeof block.id !== "string" && block.id !== null) {
|
|
@@ -69503,20 +69583,20 @@ function buildPageOutline(input) {
|
|
|
69503
69583
|
blocks: input.blocks.map(convertPageResponseBlock)
|
|
69504
69584
|
};
|
|
69505
69585
|
}
|
|
69506
|
-
function
|
|
69586
|
+
function isRecord16(value) {
|
|
69507
69587
|
return Boolean(value) && typeof value === "object" && !Array.isArray(value);
|
|
69508
69588
|
}
|
|
69509
69589
|
function readContentRecord(value) {
|
|
69510
|
-
return
|
|
69590
|
+
return isRecord16(value) ? value : void 0;
|
|
69511
69591
|
}
|
|
69512
69592
|
function readNestedContentRecord(value) {
|
|
69513
|
-
if (!
|
|
69593
|
+
if (!isRecord16(value)) return null;
|
|
69514
69594
|
return readContentRecord(value.data) ?? null;
|
|
69515
69595
|
}
|
|
69516
69596
|
function sanitizeSdkRuntimeBlockContent(blockKind, content) {
|
|
69517
69597
|
if (blockKind !== "block.newsletter-signup") return content;
|
|
69518
69598
|
const sanitized = sanitizeNewsletterSignupPublicContent(content);
|
|
69519
|
-
return
|
|
69599
|
+
return isRecord16(sanitized) ? sanitized : {};
|
|
69520
69600
|
}
|
|
69521
69601
|
function sanitizeNullableSdkRuntimeBlockContent(blockKind, content) {
|
|
69522
69602
|
return content ? sanitizeSdkRuntimeBlockContent(blockKind, content) : null;
|