@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
|
@@ -179,6 +179,8 @@ function publicEventPricingType(pricing) {
|
|
|
179
179
|
case "ticket_types":
|
|
180
180
|
case "course":
|
|
181
181
|
return isFreePublicEventPriceDisplay(pricing.display) ? "free" : "paid";
|
|
182
|
+
case "external":
|
|
183
|
+
return "external";
|
|
182
184
|
}
|
|
183
185
|
}
|
|
184
186
|
function publicEventPricingCurrency(pricing) {
|
|
@@ -190,6 +192,8 @@ function publicEventPricingCurrency(pricing) {
|
|
|
190
192
|
return pricing.currency;
|
|
191
193
|
case "course":
|
|
192
194
|
return pricing.display.display.currency;
|
|
195
|
+
case "external":
|
|
196
|
+
return null;
|
|
193
197
|
}
|
|
194
198
|
}
|
|
195
199
|
function isFreePublicEventPriceDisplay(display) {
|
|
@@ -203,6 +207,7 @@ function isFreePublicEventPriceDisplay(display) {
|
|
|
203
207
|
case "range":
|
|
204
208
|
case "mixed":
|
|
205
209
|
case "unavailable":
|
|
210
|
+
case "external":
|
|
206
211
|
return false;
|
|
207
212
|
}
|
|
208
213
|
}
|
|
@@ -233,6 +238,8 @@ function formatBookingPriceDisplay(display, options = {}) {
|
|
|
233
238
|
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)}`;
|
|
234
239
|
case "unavailable":
|
|
235
240
|
return "Pricing unavailable";
|
|
241
|
+
case "external":
|
|
242
|
+
return display.label;
|
|
236
243
|
case "course":
|
|
237
244
|
return formatCoursePriceDisplayLabel(display.display, options);
|
|
238
245
|
default:
|
|
@@ -256,11 +263,11 @@ function isValidTimeZone(timeZone) {
|
|
|
256
263
|
}
|
|
257
264
|
function getSafeTimeZone(timeZone) {
|
|
258
265
|
const normalized = typeof timeZone === "string" ? timeZone.trim() : "";
|
|
259
|
-
return normalized && isValidTimeZone(normalized) ? normalized : FALLBACK_TIMEZONE;
|
|
266
|
+
return normalized.length > 0 && isValidTimeZone(normalized) ? normalized : FALLBACK_TIMEZONE;
|
|
260
267
|
}
|
|
261
268
|
function parseStrictBookingTimeZone(timeZone) {
|
|
262
269
|
const normalized = timeZone.trim();
|
|
263
|
-
if (
|
|
270
|
+
if (normalized.length === 0 || !isValidTimeZone(normalized)) {
|
|
264
271
|
return null;
|
|
265
272
|
}
|
|
266
273
|
return normalized;
|
|
@@ -337,7 +344,7 @@ function parseScheduledBookingDateTime(input) {
|
|
|
337
344
|
try {
|
|
338
345
|
const startsAt = toUtcIsoDateTimeString(input.startsAt);
|
|
339
346
|
const timeZone = parseStrictBookingTimeZone(input.timeZone);
|
|
340
|
-
if (
|
|
347
|
+
if (timeZone === null) {
|
|
341
348
|
return {
|
|
342
349
|
ok: false,
|
|
343
350
|
field: "timeZone",
|
|
@@ -472,10 +479,10 @@ function normalizeLocationAddressText(value) {
|
|
|
472
479
|
return null;
|
|
473
480
|
}
|
|
474
481
|
const trimmed = value.trim();
|
|
475
|
-
return trimmed ? trimmed : null;
|
|
482
|
+
return trimmed.length > 0 ? trimmed : null;
|
|
476
483
|
}
|
|
477
484
|
function hasLocationCoordinates(value) {
|
|
478
|
-
return typeof value
|
|
485
|
+
return value != null && typeof value.lat === "number" && typeof value.lng === "number";
|
|
479
486
|
}
|
|
480
487
|
function toLocationCoordinates(value) {
|
|
481
488
|
if (!hasLocationCoordinates(value)) {
|
|
@@ -26350,6 +26357,18 @@ var publicCoursesArraySchema = z43.array(publicCourseSchema);
|
|
|
26350
26357
|
var eventPresetSchema = z44.enum(["event", "class", "workshop", "retreat", "performance"]);
|
|
26351
26358
|
var eventScheduleScopeSchema = z44.enum(["recurring", "oneOff"]);
|
|
26352
26359
|
var eventDestinationModeSchema = z44.enum(["cms-managed", "system-managed"]);
|
|
26360
|
+
var publicEventDestinationSchema = z44.discriminatedUnion("kind", [
|
|
26361
|
+
z44.object({
|
|
26362
|
+
kind: z44.literal("native"),
|
|
26363
|
+
mode: eventDestinationModeSchema,
|
|
26364
|
+
path: z44.string()
|
|
26365
|
+
}),
|
|
26366
|
+
z44.object({
|
|
26367
|
+
kind: z44.literal("external"),
|
|
26368
|
+
url: z44.string(),
|
|
26369
|
+
label: z44.string()
|
|
26370
|
+
})
|
|
26371
|
+
]);
|
|
26353
26372
|
var eventVenueSchema = z44.object({
|
|
26354
26373
|
id: z44.string(),
|
|
26355
26374
|
name: z44.string(),
|
|
@@ -26364,7 +26383,7 @@ var eventCategorySchema = z44.object({
|
|
|
26364
26383
|
name: z44.string(),
|
|
26365
26384
|
color: z44.string().nullable()
|
|
26366
26385
|
});
|
|
26367
|
-
var pricingTypeSchema = z44.enum(["free", "paid"]);
|
|
26386
|
+
var pricingTypeSchema = z44.enum(["free", "paid", "external"]);
|
|
26368
26387
|
var accessRestrictionSchema = z44.enum(["none", "category"]);
|
|
26369
26388
|
var eventPricingModeSchema = z44.enum(["single", "ticket_types"]);
|
|
26370
26389
|
var publicCoursePriceDisplaySchema = z44.discriminatedUnion("kind", [
|
|
@@ -26385,6 +26404,7 @@ var publicEventPriceDisplaySchema = z44.discriminatedUnion("kind", [
|
|
|
26385
26404
|
currency: z44.string()
|
|
26386
26405
|
}),
|
|
26387
26406
|
z44.object({ kind: z44.literal("unavailable"), currency: z44.string() }),
|
|
26407
|
+
z44.object({ kind: z44.literal("external"), label: z44.string() }),
|
|
26388
26408
|
z44.object({ kind: z44.literal("course"), display: publicCoursePriceDisplaySchema })
|
|
26389
26409
|
]);
|
|
26390
26410
|
var publicEventTicketTypePriceDisplaySchema = z44.union([
|
|
@@ -26463,6 +26483,10 @@ var publicEventPricingSchema = z44.discriminatedUnion("kind", [
|
|
|
26463
26483
|
z44.object({
|
|
26464
26484
|
kind: z44.literal("course"),
|
|
26465
26485
|
display: z44.object({ kind: z44.literal("course"), display: publicCoursePriceDisplaySchema })
|
|
26486
|
+
}),
|
|
26487
|
+
z44.object({
|
|
26488
|
+
kind: z44.literal("external"),
|
|
26489
|
+
display: z44.object({ kind: z44.literal("external"), label: z44.string() })
|
|
26466
26490
|
})
|
|
26467
26491
|
]);
|
|
26468
26492
|
var publicTeamMemberSummarySchema = z44.object({
|
|
@@ -26491,7 +26515,8 @@ var publicEventSchema = z44.object({
|
|
|
26491
26515
|
image: mediaSchema2.nullable().optional()
|
|
26492
26516
|
}).optional(),
|
|
26493
26517
|
slug: z44.string(),
|
|
26494
|
-
path: z44.string(),
|
|
26518
|
+
path: z44.string().nullable(),
|
|
26519
|
+
destination: publicEventDestinationSchema,
|
|
26495
26520
|
requiresRegistration: z44.boolean(),
|
|
26496
26521
|
deliveryMode: z44.enum(["in_person", "online", "hybrid"]),
|
|
26497
26522
|
attendanceModes: z44.array(publicEventAttendanceModeAvailabilitySchema),
|
|
@@ -26795,12 +26820,41 @@ function isEventContentType(slug) {
|
|
|
26795
26820
|
return EVENT_CONTENT_TYPE_SLUGS.includes(slug);
|
|
26796
26821
|
}
|
|
26797
26822
|
|
|
26823
|
+
// ../blocks/src/system/runtime/nodes/events/shared/destination.ts
|
|
26824
|
+
function isRecord5(value) {
|
|
26825
|
+
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
26826
|
+
}
|
|
26827
|
+
function isRuntimeEventDestination(value) {
|
|
26828
|
+
if (!isRecord5(value) || typeof value.kind !== "string") return false;
|
|
26829
|
+
if (value.kind === "native") {
|
|
26830
|
+
return (value.mode === "cms-managed" || value.mode === "system-managed") && typeof value.path === "string";
|
|
26831
|
+
}
|
|
26832
|
+
return value.kind === "external" && typeof value.url === "string" && typeof value.label === "string";
|
|
26833
|
+
}
|
|
26834
|
+
function resolveRuntimeEventDestination(event) {
|
|
26835
|
+
if (isRuntimeEventDestination(event.destination)) {
|
|
26836
|
+
return event.destination;
|
|
26837
|
+
}
|
|
26838
|
+
return {
|
|
26839
|
+
kind: "native",
|
|
26840
|
+
mode: event.eventDestinationMode === "system-managed" ? "system-managed" : "cms-managed",
|
|
26841
|
+
path: typeof event.path === "string" ? event.path : ""
|
|
26842
|
+
};
|
|
26843
|
+
}
|
|
26844
|
+
|
|
26798
26845
|
// ../blocks/src/system/runtime/nodes/events/shared/pricing.ts
|
|
26799
26846
|
var DEFAULT_EVENT_CURRENCY = "USD";
|
|
26800
26847
|
function resolveRuntimeEventPricing(event) {
|
|
26801
26848
|
if (isPublicEventPricing(event.pricing)) {
|
|
26802
26849
|
return event.pricing;
|
|
26803
26850
|
}
|
|
26851
|
+
const destination = resolveRuntimeEventDestination(event);
|
|
26852
|
+
if (destination.kind === "external") {
|
|
26853
|
+
return {
|
|
26854
|
+
kind: "external",
|
|
26855
|
+
display: { kind: "external", label: "External registration" }
|
|
26856
|
+
};
|
|
26857
|
+
}
|
|
26804
26858
|
const legacy = event;
|
|
26805
26859
|
const currency = readCurrency(legacy.currency);
|
|
26806
26860
|
if (event.requiresRegistration === false) {
|
|
@@ -26837,22 +26891,22 @@ function resolveRuntimeEventPricing(event) {
|
|
|
26837
26891
|
function readCurrency(value) {
|
|
26838
26892
|
return typeof value === "string" && value.trim().length > 0 ? value : DEFAULT_EVENT_CURRENCY;
|
|
26839
26893
|
}
|
|
26840
|
-
function
|
|
26894
|
+
function isRecord6(value) {
|
|
26841
26895
|
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
26842
26896
|
}
|
|
26843
26897
|
function isPublicEventPricing(value) {
|
|
26844
|
-
if (!
|
|
26845
|
-
return value.kind === "drop_in" || value.kind === "free_registration" || value.kind === "single_paid" || value.kind === "ticket_types" || value.kind === "course";
|
|
26898
|
+
if (!isRecord6(value) || typeof value.kind !== "string") return false;
|
|
26899
|
+
return value.kind === "drop_in" || value.kind === "free_registration" || value.kind === "single_paid" || value.kind === "ticket_types" || value.kind === "course" || value.kind === "external";
|
|
26846
26900
|
}
|
|
26847
26901
|
function isPublicEventTicketType(value) {
|
|
26848
|
-
return
|
|
26902
|
+
return isRecord6(value) && typeof value.id === "string";
|
|
26849
26903
|
}
|
|
26850
26904
|
function readTicketTypePriceDisplay(value, currency) {
|
|
26851
26905
|
const display = readLegacyPriceDisplay(value, currency);
|
|
26852
|
-
return display.kind === "course" ? { kind: "unavailable", currency } : display;
|
|
26906
|
+
return display.kind === "course" || display.kind === "external" ? { kind: "unavailable", currency } : display;
|
|
26853
26907
|
}
|
|
26854
26908
|
function readLegacyPriceDisplay(value, currency) {
|
|
26855
|
-
if (!
|
|
26909
|
+
if (!isRecord6(value) || typeof value.kind !== "string") {
|
|
26856
26910
|
return { kind: "unavailable", currency };
|
|
26857
26911
|
}
|
|
26858
26912
|
const displayCurrency = readCurrency(value.currency);
|
|
@@ -26891,7 +26945,7 @@ function readLegacyPriceDisplay(value, currency) {
|
|
|
26891
26945
|
case "unavailable":
|
|
26892
26946
|
return { kind: "unavailable", currency: displayCurrency };
|
|
26893
26947
|
case "course":
|
|
26894
|
-
return
|
|
26948
|
+
return isRecord6(value.display) ? {
|
|
26895
26949
|
kind: "course",
|
|
26896
26950
|
display: readCoursePriceDisplay(value.display, displayCurrency)
|
|
26897
26951
|
} : {
|
|
@@ -26978,7 +27032,7 @@ function resolveEventRequiresPayment(input) {
|
|
|
26978
27032
|
if (!input.event) {
|
|
26979
27033
|
return false;
|
|
26980
27034
|
}
|
|
26981
|
-
return publicEventPricingType(resolveRuntimeEventPricing(input.event))
|
|
27035
|
+
return publicEventPricingType(resolveRuntimeEventPricing(input.event)) === "paid";
|
|
26982
27036
|
}
|
|
26983
27037
|
|
|
26984
27038
|
// ../blocks/src/system/runtime/nodes/event-registration/registrationEventAdapter.ts
|
|
@@ -27175,15 +27229,16 @@ var eventRegistrationBlockRuntime = defineClientOwnedBlockRuntime({
|
|
|
27175
27229
|
})
|
|
27176
27230
|
});
|
|
27177
27231
|
function normalizeEventRegistrationEventInput(value) {
|
|
27178
|
-
if (!
|
|
27232
|
+
if (!isRecord7(value)) {
|
|
27179
27233
|
return value;
|
|
27180
27234
|
}
|
|
27181
27235
|
return {
|
|
27182
27236
|
...value,
|
|
27237
|
+
destination: resolveRuntimeEventDestination(value),
|
|
27183
27238
|
pricing: resolveRuntimeEventPricing(value)
|
|
27184
27239
|
};
|
|
27185
27240
|
}
|
|
27186
|
-
function
|
|
27241
|
+
function isRecord7(value) {
|
|
27187
27242
|
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
27188
27243
|
}
|
|
27189
27244
|
var eventRegistrationInteractiveIslandPropsCodec = createInteractiveIslandCodec({
|
|
@@ -28452,7 +28507,7 @@ function formatCalendarTitle(viewDate, view, days, monthNames = MONTH_NAMES) {
|
|
|
28452
28507
|
if (view === "week") {
|
|
28453
28508
|
const weekStart = days[0];
|
|
28454
28509
|
const weekEnd = days[6];
|
|
28455
|
-
if (
|
|
28510
|
+
if (weekStart === void 0 || weekEnd === void 0) {
|
|
28456
28511
|
return `${monthNames[viewDate.getMonth()] ?? ""} ${viewDate.getFullYear()}`;
|
|
28457
28512
|
}
|
|
28458
28513
|
const startMonth = monthNames[weekStart.getMonth()] ?? "";
|
|
@@ -28558,7 +28613,9 @@ function getLocalDateKey(isoTimestamp, timeZone) {
|
|
|
28558
28613
|
const year = parts.find((part) => part.type === "year")?.value;
|
|
28559
28614
|
const month = parts.find((part) => part.type === "month")?.value;
|
|
28560
28615
|
const day = parts.find((part) => part.type === "day")?.value;
|
|
28561
|
-
if (
|
|
28616
|
+
if (year === void 0 || year.length === 0) return null;
|
|
28617
|
+
if (month === void 0 || month.length === 0) return null;
|
|
28618
|
+
if (day === void 0 || day.length === 0) return null;
|
|
28562
28619
|
return `${year}-${month}-${day}`;
|
|
28563
28620
|
}
|
|
28564
28621
|
var validTimeZoneCache = /* @__PURE__ */ new Map();
|
|
@@ -28815,7 +28872,7 @@ function enumerateDateKeys(startDateKey, endDateKey) {
|
|
|
28815
28872
|
}
|
|
28816
28873
|
function parseDateKey(dateKey) {
|
|
28817
28874
|
const match = /^(\d{4})-(\d{2})-(\d{2})$/.exec(dateKey);
|
|
28818
|
-
if (
|
|
28875
|
+
if (match === null) {
|
|
28819
28876
|
throw new Error(`Invalid timetable date key: ${dateKey}`);
|
|
28820
28877
|
}
|
|
28821
28878
|
const [, year, month, day] = match;
|
|
@@ -28835,7 +28892,7 @@ function groupItemsByDate(items, accessors) {
|
|
|
28835
28892
|
const dateKey = getLocalDateKey(startsAt, timeZone);
|
|
28836
28893
|
if (dateKey == null) continue;
|
|
28837
28894
|
const existing = grouped.get(dateKey);
|
|
28838
|
-
if (existing) {
|
|
28895
|
+
if (existing !== void 0) {
|
|
28839
28896
|
existing.push(item);
|
|
28840
28897
|
} else {
|
|
28841
28898
|
grouped.set(dateKey, [item]);
|
|
@@ -28976,16 +29033,28 @@ function groupEventsByDate(events) {
|
|
|
28976
29033
|
function formatEventPrice(event) {
|
|
28977
29034
|
return formatEventPricing(resolveRuntimeEventPricing(event), { decimals: "auto" });
|
|
28978
29035
|
}
|
|
29036
|
+
function resolveEventHref(event) {
|
|
29037
|
+
const destination = resolveRuntimeEventDestination(event);
|
|
29038
|
+
return destination.kind === "external" ? destination.url : destination.path;
|
|
29039
|
+
}
|
|
29040
|
+
function resolveEventLinkProps(event) {
|
|
29041
|
+
const href = resolveEventHref(event);
|
|
29042
|
+
const destination = resolveRuntimeEventDestination(event);
|
|
29043
|
+
return destination.kind === "external" ? { href, target: "_blank", rel: "noopener noreferrer" } : { href };
|
|
29044
|
+
}
|
|
28979
29045
|
function resolveEventCta(event, buttonText) {
|
|
28980
29046
|
const { isFull: isSoldOut } = getEventAvailability(event);
|
|
28981
|
-
const
|
|
29047
|
+
const destination = resolveRuntimeEventDestination(event);
|
|
29048
|
+
const isExternal = destination.kind === "external";
|
|
29049
|
+
const defaultButtonText = isExternal ? destination.label : event.kind === "course_session" ? "Book course" : "Book";
|
|
28982
29050
|
const effectiveButtonText = buttonText ?? defaultButtonText;
|
|
28983
|
-
|
|
28984
|
-
|
|
29051
|
+
const href = resolveEventHref(event);
|
|
29052
|
+
if (!isExternal && isSoldOut) {
|
|
29053
|
+
return { label: "Sold out", href, external: false, hidden: true };
|
|
28985
29054
|
}
|
|
28986
29055
|
const enrollmentOpen = event.kind === "course_session" ? event.course?.enrollmentOpen !== false : true;
|
|
28987
29056
|
const label = !enrollmentOpen ? "Registration closed" : effectiveButtonText;
|
|
28988
|
-
return { label, href:
|
|
29057
|
+
return { label, href, external: isExternal, hidden: false };
|
|
28989
29058
|
}
|
|
28990
29059
|
|
|
28991
29060
|
// ../../node_modules/.pnpm/clsx@2.1.1/node_modules/clsx/dist/clsx.mjs
|
|
@@ -30420,6 +30489,8 @@ var EventCard = ({
|
|
|
30420
30489
|
"a",
|
|
30421
30490
|
{
|
|
30422
30491
|
href: cta.href,
|
|
30492
|
+
target: cta.external ? "_blank" : void 0,
|
|
30493
|
+
rel: cta.external ? "noopener noreferrer" : void 0,
|
|
30423
30494
|
className: `${buttonClass} event-card-cta`,
|
|
30424
30495
|
children: cta.label
|
|
30425
30496
|
}
|
|
@@ -30509,10 +30580,19 @@ var EventCompactRow = ({
|
|
|
30509
30580
|
formattedTime,
|
|
30510
30581
|
/* @__PURE__ */ jsx8("span", { className: "event-compact-row-action-price", children: price })
|
|
30511
30582
|
] }),
|
|
30512
|
-
cta.hidden ? /* @__PURE__ */ jsx8("span", { className: "event-compact-row-status", children: cta.label }) : /* @__PURE__ */ jsxs6(
|
|
30513
|
-
|
|
30514
|
-
|
|
30515
|
-
|
|
30583
|
+
cta.hidden ? /* @__PURE__ */ jsx8("span", { className: "event-compact-row-status", children: cta.label }) : /* @__PURE__ */ jsxs6(
|
|
30584
|
+
"a",
|
|
30585
|
+
{
|
|
30586
|
+
href: cta.href,
|
|
30587
|
+
target: cta.external ? "_blank" : void 0,
|
|
30588
|
+
rel: cta.external ? "noopener noreferrer" : void 0,
|
|
30589
|
+
className: `${buttonClass} event-compact-row-cta`,
|
|
30590
|
+
children: [
|
|
30591
|
+
/* @__PURE__ */ jsx8("span", { children: cta.label }),
|
|
30592
|
+
/* @__PURE__ */ jsx8(ArrowRightIcon, { "aria-hidden": "true" })
|
|
30593
|
+
]
|
|
30594
|
+
}
|
|
30595
|
+
)
|
|
30516
30596
|
] })
|
|
30517
30597
|
] })
|
|
30518
30598
|
] });
|
|
@@ -32102,7 +32182,7 @@ function inferLegacyOfferingsPreviewGroupOrder(overrides) {
|
|
|
32102
32182
|
return keys.length >= 2 ? keys : [];
|
|
32103
32183
|
}
|
|
32104
32184
|
function normalizeOfferingsPreviewContentForWrite(value) {
|
|
32105
|
-
if (!
|
|
32185
|
+
if (!isRecord8(value)) return null;
|
|
32106
32186
|
const groupOrderValue = value.groupOrder;
|
|
32107
32187
|
if (Array.isArray(groupOrderValue)) {
|
|
32108
32188
|
const normalized = normalizeOfferingsPreviewGroupOrder(groupOrderValue);
|
|
@@ -32115,7 +32195,7 @@ function normalizeOfferingsPreviewContentForWrite(value) {
|
|
|
32115
32195
|
return { ...value, groupOrder: [] };
|
|
32116
32196
|
}
|
|
32117
32197
|
const legacyOrder = inferLegacyOfferingsPreviewGroupOrder(
|
|
32118
|
-
Array.isArray(value.groupOverrides) ? value.groupOverrides.filter(
|
|
32198
|
+
Array.isArray(value.groupOverrides) ? value.groupOverrides.filter(isRecord8) : []
|
|
32119
32199
|
);
|
|
32120
32200
|
return legacyOrder.length > 0 ? { ...value, groupOrder: legacyOrder } : value;
|
|
32121
32201
|
}
|
|
@@ -32169,7 +32249,7 @@ function uniqueOfferingsPreviewSourceKeys(values) {
|
|
|
32169
32249
|
}
|
|
32170
32250
|
return keys;
|
|
32171
32251
|
}
|
|
32172
|
-
function
|
|
32252
|
+
function isRecord8(value) {
|
|
32173
32253
|
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
32174
32254
|
}
|
|
32175
32255
|
function mergeOrderedKeysWithDefaults(orderedKeys, defaultKeys) {
|
|
@@ -32631,7 +32711,7 @@ function isOfferingsPreviewItemLimit(value) {
|
|
|
32631
32711
|
return value === "1" || value === "2" || value === "3" || value === "4" || value === "5" || value === "6" || value === null;
|
|
32632
32712
|
}
|
|
32633
32713
|
function normalizeOfferingsPreviewGroupOverride(value) {
|
|
32634
|
-
if (!
|
|
32714
|
+
if (!isRecord9(value)) return [];
|
|
32635
32715
|
const override = {};
|
|
32636
32716
|
if (isOfferingsPreviewSourceKey(value.sourceKey) || value.sourceKey === null) {
|
|
32637
32717
|
override.sourceKey = value.sourceKey;
|
|
@@ -32663,12 +32743,12 @@ function isButtonVariant(value) {
|
|
|
32663
32743
|
return value === "primary" || value === "secondary" || value === "outline" || value === "link" || value === null;
|
|
32664
32744
|
}
|
|
32665
32745
|
function normalizeCardStylesContent(value) {
|
|
32666
|
-
return
|
|
32746
|
+
return isRecord9(value) || value === null ? value : void 0;
|
|
32667
32747
|
}
|
|
32668
32748
|
function normalizeSectionStylesContent(value) {
|
|
32669
|
-
return
|
|
32749
|
+
return isRecord9(value) || value === null ? value : void 0;
|
|
32670
32750
|
}
|
|
32671
|
-
function
|
|
32751
|
+
function isRecord9(value) {
|
|
32672
32752
|
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
32673
32753
|
}
|
|
32674
32754
|
|
|
@@ -37880,11 +37960,11 @@ function extractRouteUpdatedAt(candidate) {
|
|
|
37880
37960
|
}
|
|
37881
37961
|
function resolveRouteTargetForStage(routeIdValue, routes, stageInput) {
|
|
37882
37962
|
const routeId = typeof routeIdValue === "string" ? routeIdValue : null;
|
|
37883
|
-
if (
|
|
37963
|
+
if (routeId === null || routeId.length === 0 || routes === void 0) return null;
|
|
37884
37964
|
const routeEntry = routes[routeId];
|
|
37885
37965
|
if (!isRouteVisibleInStage(routeEntry, stageInput)) return null;
|
|
37886
37966
|
const href = extractRouteHref(routeEntry, stageInput);
|
|
37887
|
-
if (
|
|
37967
|
+
if (href === null) return null;
|
|
37888
37968
|
return {
|
|
37889
37969
|
routeId,
|
|
37890
37970
|
href,
|
|
@@ -38036,7 +38116,7 @@ import React4 from "react";
|
|
|
38036
38116
|
// ../blocks/src/system/data/linkedContentEntries.ts
|
|
38037
38117
|
var LINKED_CONTENT_ENTRY_META_KEY = "__rbLinkedContentEntry";
|
|
38038
38118
|
function coerceLinkedContentEntriesPayload(payload) {
|
|
38039
|
-
if (!
|
|
38119
|
+
if (!isRecord10(payload)) return payload;
|
|
38040
38120
|
const response = payload;
|
|
38041
38121
|
if (!Array.isArray(response.entries)) return payload;
|
|
38042
38122
|
const contentType = parsePublicContentTypeMeta(response.contentType);
|
|
@@ -38044,16 +38124,16 @@ function coerceLinkedContentEntriesPayload(payload) {
|
|
|
38044
38124
|
return response.entries.map((entry) => enrichLinkedContentEntry(entry, contentType));
|
|
38045
38125
|
}
|
|
38046
38126
|
function getLinkedContentEntryMeta(value) {
|
|
38047
|
-
if (!
|
|
38127
|
+
if (!isRecord10(value)) return null;
|
|
38048
38128
|
const candidate = value[LINKED_CONTENT_ENTRY_META_KEY];
|
|
38049
38129
|
return isLinkedContentEntryMeta(candidate) ? candidate : null;
|
|
38050
38130
|
}
|
|
38051
38131
|
function buildLinkedContentEditTarget(input) {
|
|
38052
38132
|
const { entry, sourceBlockId, sourceBlockKind, itemIndex } = input;
|
|
38053
|
-
if (!
|
|
38133
|
+
if (!isRecord10(entry)) return null;
|
|
38054
38134
|
const meta = getLinkedContentEntryMeta(entry);
|
|
38055
38135
|
if (!meta || meta.support.kind !== "supported") return null;
|
|
38056
|
-
const content =
|
|
38136
|
+
const content = isRecord10(entry.content) ? entry.content : {};
|
|
38057
38137
|
return {
|
|
38058
38138
|
kind: "linked-content-entry",
|
|
38059
38139
|
entryId: meta.entryId,
|
|
@@ -38103,12 +38183,12 @@ function resolveLinkedEntryInlineFieldEligibility(input) {
|
|
|
38103
38183
|
};
|
|
38104
38184
|
}
|
|
38105
38185
|
function enrichLinkedContentEntry(entry, contentType) {
|
|
38106
|
-
if (!
|
|
38186
|
+
if (!isRecord10(entry)) return entry;
|
|
38107
38187
|
const entryId = typeof entry.id === "string" ? entry.id : null;
|
|
38108
38188
|
if (!entryId) return entry;
|
|
38109
38189
|
const title = typeof entry.title === "string" && entry.title.trim().length > 0 ? entry.title : entryId;
|
|
38110
38190
|
const optimisticHash = typeof entry.optimisticHash === "string" && entry.optimisticHash.length > 0 ? entry.optimisticHash : null;
|
|
38111
|
-
const content =
|
|
38191
|
+
const content = isRecord10(entry.content) ? entry.content : {};
|
|
38112
38192
|
const meta = {
|
|
38113
38193
|
kind: "linked-content-entry",
|
|
38114
38194
|
entryId,
|
|
@@ -38204,7 +38284,7 @@ function capitalize(value) {
|
|
|
38204
38284
|
return value.charAt(0).toUpperCase() + value.slice(1).toLowerCase();
|
|
38205
38285
|
}
|
|
38206
38286
|
function parsePublicContentTypeMeta(value) {
|
|
38207
|
-
if (!
|
|
38287
|
+
if (!isRecord10(value)) return null;
|
|
38208
38288
|
if (typeof value.key !== "string" || value.key.trim().length === 0) return null;
|
|
38209
38289
|
return {
|
|
38210
38290
|
key: value.key,
|
|
@@ -38214,7 +38294,7 @@ function parsePublicContentTypeMeta(value) {
|
|
|
38214
38294
|
};
|
|
38215
38295
|
}
|
|
38216
38296
|
function parsePublicContentTypeLinkedEntryEditing(value) {
|
|
38217
|
-
if (!
|
|
38297
|
+
if (!isRecord10(value) || typeof value.kind !== "string") return null;
|
|
38218
38298
|
switch (value.kind) {
|
|
38219
38299
|
case "generic":
|
|
38220
38300
|
return { kind: "generic" };
|
|
@@ -38228,7 +38308,7 @@ function parsePublicContentTypeLinkedEntryEditing(value) {
|
|
|
38228
38308
|
}
|
|
38229
38309
|
}
|
|
38230
38310
|
function parsePublicContentTypeFieldMeta(value) {
|
|
38231
|
-
if (!
|
|
38311
|
+
if (!isRecord10(value)) return [];
|
|
38232
38312
|
if (typeof value.id !== "string" || typeof value.type !== "string") return [];
|
|
38233
38313
|
return [{
|
|
38234
38314
|
id: value.id,
|
|
@@ -38243,14 +38323,14 @@ function parseStringArray(value) {
|
|
|
38243
38323
|
return value.filter((item) => typeof item === "string");
|
|
38244
38324
|
}
|
|
38245
38325
|
function isLinkedContentEntryMeta(value) {
|
|
38246
|
-
if (!
|
|
38326
|
+
if (!isRecord10(value)) return false;
|
|
38247
38327
|
if (value.kind !== "linked-content-entry") return false;
|
|
38248
38328
|
if (typeof value.entryId !== "string") return false;
|
|
38249
38329
|
if (typeof value.contentTypeKey !== "string") return false;
|
|
38250
38330
|
if (typeof value.contentTypeLabel !== "string") return false;
|
|
38251
38331
|
if (typeof value.title !== "string") return false;
|
|
38252
38332
|
if (!(value.optimisticHash === null || typeof value.optimisticHash === "string")) return false;
|
|
38253
|
-
if (!
|
|
38333
|
+
if (!isRecord10(value.contentType)) return false;
|
|
38254
38334
|
if (!isLinkedEntryFieldSourceArray(value.fieldSources)) return false;
|
|
38255
38335
|
return isLinkedContentEditSupport(value.support);
|
|
38256
38336
|
}
|
|
@@ -38258,7 +38338,7 @@ function isLinkedEntryFieldSourceArray(value) {
|
|
|
38258
38338
|
return Array.isArray(value) && value.every(isLinkedEntryFieldSource);
|
|
38259
38339
|
}
|
|
38260
38340
|
function isLinkedEntryFieldSource(value) {
|
|
38261
|
-
if (!
|
|
38341
|
+
if (!isRecord10(value)) return false;
|
|
38262
38342
|
if (typeof value.displayPath !== "string") return false;
|
|
38263
38343
|
switch (value.kind) {
|
|
38264
38344
|
case "content-field":
|
|
@@ -38284,7 +38364,7 @@ function isLinkedEntryInlineFieldReadOnlyReason(value) {
|
|
|
38284
38364
|
}
|
|
38285
38365
|
}
|
|
38286
38366
|
function isLinkedContentEditSupport(value) {
|
|
38287
|
-
if (!
|
|
38367
|
+
if (!isRecord10(value) || typeof value.kind !== "string") return false;
|
|
38288
38368
|
switch (value.kind) {
|
|
38289
38369
|
case "supported":
|
|
38290
38370
|
return true;
|
|
@@ -38296,7 +38376,7 @@ function isLinkedContentEditSupport(value) {
|
|
|
38296
38376
|
return false;
|
|
38297
38377
|
}
|
|
38298
38378
|
}
|
|
38299
|
-
function
|
|
38379
|
+
function isRecord10(value) {
|
|
38300
38380
|
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
38301
38381
|
}
|
|
38302
38382
|
|
|
@@ -39752,12 +39832,12 @@ function toTrimmedString(value) {
|
|
|
39752
39832
|
return trimmed ? trimmed : void 0;
|
|
39753
39833
|
}
|
|
39754
39834
|
function normalizeBookingFormConfig(form2) {
|
|
39755
|
-
if (!
|
|
39835
|
+
if (!isRecord11(form2)) return null;
|
|
39756
39836
|
const id = readNonEmptyString(form2.id);
|
|
39757
39837
|
const name = readNonEmptyString(form2.name);
|
|
39758
39838
|
if (!id || !name) return null;
|
|
39759
|
-
const schemaSource =
|
|
39760
|
-
const settingsSource =
|
|
39839
|
+
const schemaSource = isRecord11(form2.schema) ? form2.schema : isRecord11(form2.schemaJson) ? form2.schemaJson : null;
|
|
39840
|
+
const settingsSource = isRecord11(form2.settings) ? form2.settings : isRecord11(form2.settingsJson) ? form2.settingsJson : null;
|
|
39761
39841
|
return {
|
|
39762
39842
|
id,
|
|
39763
39843
|
name,
|
|
@@ -39781,10 +39861,10 @@ function normalizeBookingServices(services) {
|
|
|
39781
39861
|
if (Array.isArray(services)) {
|
|
39782
39862
|
return services.filter(isBookingFormService).map(normalizeService);
|
|
39783
39863
|
}
|
|
39784
|
-
if (
|
|
39864
|
+
if (isRecord11(services) && "services" in services) {
|
|
39785
39865
|
return Array.isArray(services.services) ? services.services.filter(isBookingFormService).map(normalizeService) : [];
|
|
39786
39866
|
}
|
|
39787
|
-
return
|
|
39867
|
+
return isRecord11(services) ? Object.values(services).filter(isBookingFormService).map(normalizeService) : [];
|
|
39788
39868
|
}
|
|
39789
39869
|
function normalizeBookingSchema(value) {
|
|
39790
39870
|
if (!value) return void 0;
|
|
@@ -39796,7 +39876,7 @@ function normalizeBookingSchema(value) {
|
|
|
39796
39876
|
};
|
|
39797
39877
|
}
|
|
39798
39878
|
function readBookingFormField(value) {
|
|
39799
|
-
if (!
|
|
39879
|
+
if (!isRecord11(value)) return null;
|
|
39800
39880
|
const id = readNonEmptyString(value.id);
|
|
39801
39881
|
const label = readNonEmptyString(value.label);
|
|
39802
39882
|
const type = readBookingFieldType(value.type);
|
|
@@ -39842,7 +39922,7 @@ function readBookingFieldOptions(value) {
|
|
|
39842
39922
|
return options.length > 0 ? options : void 0;
|
|
39843
39923
|
}
|
|
39844
39924
|
function readBookingFieldOption(value) {
|
|
39845
|
-
if (!
|
|
39925
|
+
if (!isRecord11(value)) return null;
|
|
39846
39926
|
const optionValue = readNonEmptyString(value.value);
|
|
39847
39927
|
const label = readNonEmptyString(value.label);
|
|
39848
39928
|
return optionValue && label ? { value: optionValue, label } : null;
|
|
@@ -39859,7 +39939,7 @@ function normalizeBookingSettings(value) {
|
|
|
39859
39939
|
};
|
|
39860
39940
|
}
|
|
39861
39941
|
function isBookingFormService(value) {
|
|
39862
|
-
return
|
|
39942
|
+
return isRecord11(value) && typeof value.id === "string" && typeof value.siteId === "string" && typeof value.title === "string";
|
|
39863
39943
|
}
|
|
39864
39944
|
function readNonEmptyString(value) {
|
|
39865
39945
|
if (typeof value !== "string") return null;
|
|
@@ -39877,7 +39957,7 @@ function readStringArray(value) {
|
|
|
39877
39957
|
const strings = value.filter((item) => typeof item === "string");
|
|
39878
39958
|
return strings.length > 0 ? strings : void 0;
|
|
39879
39959
|
}
|
|
39880
|
-
function
|
|
39960
|
+
function isRecord11(value) {
|
|
39881
39961
|
return typeof value === "object" && value !== null;
|
|
39882
39962
|
}
|
|
39883
39963
|
|
|
@@ -40435,7 +40515,7 @@ function EventDetailsView({
|
|
|
40435
40515
|
"a",
|
|
40436
40516
|
{
|
|
40437
40517
|
className: "rb-tile rb-tile--interactive",
|
|
40438
|
-
|
|
40518
|
+
...resolveEventLinkProps(e),
|
|
40439
40519
|
children: /* @__PURE__ */ jsx30(
|
|
40440
40520
|
DateTimeTile,
|
|
40441
40521
|
{
|
|
@@ -42119,7 +42199,7 @@ var AgendaEventCard = ({
|
|
|
42119
42199
|
showCapacity,
|
|
42120
42200
|
onClick
|
|
42121
42201
|
}) => {
|
|
42122
|
-
const
|
|
42202
|
+
const eventLinkProps = resolveEventLinkProps(event);
|
|
42123
42203
|
const categoryColor = event.eventCategory?.color || "rgb(var(--tb-accent))";
|
|
42124
42204
|
const price = formatEventPrice(event);
|
|
42125
42205
|
const { available, isFull } = getEventAvailability(event);
|
|
@@ -42180,7 +42260,7 @@ var AgendaEventCard = ({
|
|
|
42180
42260
|
}
|
|
42181
42261
|
);
|
|
42182
42262
|
}
|
|
42183
|
-
return /* @__PURE__ */ jsx47("a", {
|
|
42263
|
+
return /* @__PURE__ */ jsx47("a", { ...eventLinkProps, className: "event-agenda-card", children: cardContent });
|
|
42184
42264
|
};
|
|
42185
42265
|
|
|
42186
42266
|
// ../blocks/src/system/runtime/nodes/events/shared/WeekAgendaView.tsx
|
|
@@ -42423,7 +42503,7 @@ function renderCalendarSsr(display) {
|
|
|
42423
42503
|
dayEvents.slice(0, MAX_EVENTS_PER_DAY).map((event) => /* @__PURE__ */ jsxs35(
|
|
42424
42504
|
"a",
|
|
42425
42505
|
{
|
|
42426
|
-
|
|
42506
|
+
...resolveEventLinkProps(event),
|
|
42427
42507
|
className: "event-calendar-event",
|
|
42428
42508
|
title: `${event.title} at ${formatTime(event.startsAt, { timeZone: getEventTimeZone(event) })}`,
|
|
42429
42509
|
children: [
|
|
@@ -42551,7 +42631,7 @@ function renderTimetableSsr(display) {
|
|
|
42551
42631
|
day.events.length === 0 ? /* @__PURE__ */ jsx49("p", { className: "event-timetable-day-empty", children: "No classes" }) : day.events.map((cell) => /* @__PURE__ */ jsxs35(
|
|
42552
42632
|
"a",
|
|
42553
42633
|
{
|
|
42554
|
-
|
|
42634
|
+
...resolveEventLinkProps(cell.event),
|
|
42555
42635
|
className: "event-timetable-event",
|
|
42556
42636
|
title: `${cell.event.title}, ${cell.timeLabel}`,
|
|
42557
42637
|
style: {
|
|
@@ -43358,14 +43438,14 @@ function isDecoratedHeadingBlockKind(blockKind) {
|
|
|
43358
43438
|
return blockKind === "block.intro" || blockKind === "block.feature-cards" || blockKind === "block.testimonials" || blockKind === "block.faq";
|
|
43359
43439
|
}
|
|
43360
43440
|
function readVariant(blockContent) {
|
|
43361
|
-
if (!
|
|
43441
|
+
if (!isRecord12(blockContent)) return void 0;
|
|
43362
43442
|
const variant = blockContent.variant;
|
|
43363
43443
|
return typeof variant === "string" ? variant : void 0;
|
|
43364
43444
|
}
|
|
43365
43445
|
function isFaqDecoratedVariant(variant) {
|
|
43366
43446
|
return variant === "default" || variant === "question-columns";
|
|
43367
43447
|
}
|
|
43368
|
-
function
|
|
43448
|
+
function isRecord12(value) {
|
|
43369
43449
|
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
43370
43450
|
}
|
|
43371
43451
|
function buildHeadingDecorationWrapperClassName(className) {
|
|
@@ -68378,7 +68458,7 @@ function preset(id, verticalId, canonicalBehaviour, label, pluralLabel, descript
|
|
|
68378
68458
|
}
|
|
68379
68459
|
|
|
68380
68460
|
// ../api/src/utils/isRecord.ts
|
|
68381
|
-
function
|
|
68461
|
+
function isRecord13(value) {
|
|
68382
68462
|
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
68383
68463
|
}
|
|
68384
68464
|
|
|
@@ -68685,7 +68765,7 @@ function sanitizeMarks(marks) {
|
|
|
68685
68765
|
if (mark.type === "bold" || mark.type === "strong" || mark.type === "italic" || mark.type === "em") {
|
|
68686
68766
|
return [{ type: mark.type }];
|
|
68687
68767
|
}
|
|
68688
|
-
if (mark.type === "link" &&
|
|
68768
|
+
if (mark.type === "link" && isRecord13(mark.attrs) && typeof mark.attrs.href === "string") {
|
|
68689
68769
|
const attrs = { href: mark.attrs.href };
|
|
68690
68770
|
if (typeof mark.attrs.target === "string" && mark.attrs.target.trim().length > 0) {
|
|
68691
68771
|
attrs.target = mark.attrs.target;
|
|
@@ -68700,10 +68780,10 @@ function sanitizeMarks(marks) {
|
|
|
68700
68780
|
return sanitized.length > 0 ? sanitized : void 0;
|
|
68701
68781
|
}
|
|
68702
68782
|
function unwrapRichTextValue(value) {
|
|
68703
|
-
if (
|
|
68783
|
+
if (isRecord13(value) && isRecord13(value.doc)) {
|
|
68704
68784
|
return unwrapRichTextValue(value.doc);
|
|
68705
68785
|
}
|
|
68706
|
-
if (
|
|
68786
|
+
if (isRecord13(value) && value.type === "doc") {
|
|
68707
68787
|
return {
|
|
68708
68788
|
type: "doc",
|
|
68709
68789
|
content: Array.isArray(value.content) ? value.content.filter(isTipTapNodeLike).map(coerceTipTapNode) : []
|
|
@@ -68712,7 +68792,7 @@ function unwrapRichTextValue(value) {
|
|
|
68712
68792
|
return EMPTY_SITE_BANNER_BODY;
|
|
68713
68793
|
}
|
|
68714
68794
|
function isTipTapNodeLike(value) {
|
|
68715
|
-
return
|
|
68795
|
+
return isRecord13(value) && typeof value.type === "string";
|
|
68716
68796
|
}
|
|
68717
68797
|
function coerceTipTapNode(value) {
|
|
68718
68798
|
return {
|
|
@@ -68720,9 +68800,9 @@ function coerceTipTapNode(value) {
|
|
|
68720
68800
|
...Array.isArray(value.content) ? { content: value.content.filter(isTipTapNodeLike).map(coerceTipTapNode) } : {},
|
|
68721
68801
|
...typeof value.text === "string" ? { text: value.text } : {},
|
|
68722
68802
|
...Array.isArray(value.marks) ? {
|
|
68723
|
-
marks: value.marks.filter((mark) =>
|
|
68803
|
+
marks: value.marks.filter((mark) => isRecord13(mark) && typeof mark.type === "string").map((mark) => ({
|
|
68724
68804
|
type: mark.type,
|
|
68725
|
-
...
|
|
68805
|
+
...isRecord13(mark.attrs) ? { attrs: mark.attrs } : {}
|
|
68726
68806
|
}))
|
|
68727
68807
|
} : {}
|
|
68728
68808
|
};
|
|
@@ -68892,7 +68972,7 @@ var ENTRY_REF_KEYS = [
|
|
|
68892
68972
|
"entryId",
|
|
68893
68973
|
"slug"
|
|
68894
68974
|
];
|
|
68895
|
-
function
|
|
68975
|
+
function isRecord14(value) {
|
|
68896
68976
|
return Boolean(value) && typeof value === "object" && !Array.isArray(value);
|
|
68897
68977
|
}
|
|
68898
68978
|
function extractManualEntryRef(item) {
|
|
@@ -68900,7 +68980,7 @@ function extractManualEntryRef(item) {
|
|
|
68900
68980
|
const trimmed = item.trim();
|
|
68901
68981
|
return trimmed.length > 0 ? trimmed : null;
|
|
68902
68982
|
}
|
|
68903
|
-
if (!
|
|
68983
|
+
if (!isRecord14(item)) return null;
|
|
68904
68984
|
for (const key of ENTRY_REF_KEYS) {
|
|
68905
68985
|
const raw = item[key];
|
|
68906
68986
|
if (typeof raw === "string" && raw.trim().length > 0) {
|
|
@@ -69346,15 +69426,15 @@ function defineBlockOverrideRegistrations(registrations) {
|
|
|
69346
69426
|
}
|
|
69347
69427
|
|
|
69348
69428
|
// src/rendering/overrideResolution.ts
|
|
69349
|
-
function
|
|
69429
|
+
function isRecord15(value) {
|
|
69350
69430
|
return typeof value === "object" && value !== null;
|
|
69351
69431
|
}
|
|
69352
69432
|
function isBlockOutlineLike(value) {
|
|
69353
69433
|
const id = value.id;
|
|
69354
|
-
return typeof value.kind === "string" && (typeof id === "string" || id === null) && (typeof value.purpose === "string" ||
|
|
69434
|
+
return typeof value.kind === "string" && (typeof id === "string" || id === null) && (typeof value.purpose === "string" || isRecord15(value.content) || isRecord15(value.draftContent) || isRecord15(value.bindings));
|
|
69355
69435
|
}
|
|
69356
69436
|
function collectBlockKindsFromValue(value, usedKinds, seen) {
|
|
69357
|
-
if (!
|
|
69437
|
+
if (!isRecord15(value)) return;
|
|
69358
69438
|
if (seen.has(value)) return;
|
|
69359
69439
|
seen.add(value);
|
|
69360
69440
|
if (isBlockOutlineLike(value)) {
|
|
@@ -69403,7 +69483,7 @@ function selectOverrideKeysForUsedKinds(usedKinds, entries) {
|
|
|
69403
69483
|
return selectedKeys;
|
|
69404
69484
|
}
|
|
69405
69485
|
function isLazyRegistration(registration) {
|
|
69406
|
-
return
|
|
69486
|
+
return isRecord15(registration) && registration[lazyBlockOverrideSymbol] === true;
|
|
69407
69487
|
}
|
|
69408
69488
|
async function resolveOverrideComponent(registration) {
|
|
69409
69489
|
if (isLazyRegistration(registration)) {
|