@riverbankcms/sdk 0.78.0 → 0.78.2
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/README.md +45 -43
- package/dist/{PreviewEditorSidebar-RIKFQ72L.mjs → PreviewEditorSidebar-4DXLYX2V.mjs} +29 -21
- package/dist/{PreviewEditorUI-XO7TUWKK.mjs → PreviewEditorUI-CS5P4N3P.mjs} +4 -4
- package/dist/SdkPreviewModeRuntime-IJDHTW4W.mjs +8 -0
- package/dist/_dts/ai/src/contracts/proposals.d.ts +36 -0
- package/dist/_dts/api/src/contentRuntime.d.ts +1 -0
- package/dist/_dts/api/src/endpoints.d.ts +9 -0
- package/dist/_dts/api/src/index.d.ts +3 -3
- package/dist/_dts/api/src/public/types.d.ts +1 -1
- package/dist/_dts/api/src/request.d.ts +3 -11
- package/dist/_dts/api/src/sdkConfig/contracts.d.ts +1 -0
- package/dist/_dts/api/src/sdkContracts.d.ts +7 -1
- package/dist/_dts/api/src/siteManagementEndpoints.d.ts +10 -0
- package/dist/_dts/api/src/sitePlatformEndpoints.d.ts +1 -0
- package/dist/_dts/api/src/siteRuntimeEndpoints.d.ts +15 -19
- package/dist/_dts/api/src/types.d.ts +11 -26
- package/dist/_dts/block-form/src/fields/types.d.ts +6 -0
- package/dist/_dts/block-form/src/widgets/RepeaterField/components/RepeaterList.d.ts +3 -2
- package/dist/_dts/block-form/src/widgets/RepeaterField/components/RepeaterRow.d.ts +6 -3
- package/dist/_dts/block-form/src/widgets/RepeaterField/components/RepeaterRowActions.d.ts +8 -3
- package/dist/_dts/block-form/src/widgets/RepeaterField/hooks/index.d.ts +1 -1
- package/dist/_dts/block-form/src/widgets/RepeaterField/hooks/useLinearRepeaterDnd.d.ts +1 -0
- package/dist/_dts/block-form/src/widgets/RepeaterField/hooks/useRepeaterPointerDragCapability.d.ts +1 -0
- package/dist/_dts/block-form/src/widgets/RepeaterField/hooks/useResolvedItemLabel.d.ts +7 -0
- package/dist/_dts/block-form/src/widgets/RepeaterField/utils/buildSummary.d.ts +1 -0
- package/dist/_dts/block-form/src/widgets/RepeaterField/utils/index.d.ts +3 -1
- package/dist/_dts/block-form/src/widgets/RepeaterField/utils/repeaterDndDomain.d.ts +1 -1
- package/dist/_dts/block-form/src/widgets/RepeaterField/utils/repeaterLabelSource.d.ts +15 -0
- package/dist/_dts/block-form/src/widgets/RepeaterField/utils/repeaterRowActionsDomain.d.ts +50 -0
- package/dist/_dts/blocks/src/system/blocks/appointment-booking.d.ts +591 -0
- package/dist/_dts/blocks/src/system/blocks/blog-listing.d.ts +591 -0
- package/dist/_dts/blocks/src/system/blocks/cart.d.ts +591 -0
- package/dist/_dts/blocks/src/system/blocks/checkout.d.ts +591 -0
- package/dist/_dts/blocks/src/system/blocks/collection.d.ts +591 -0
- package/dist/_dts/blocks/src/system/blocks/faq.d.ts +591 -0
- package/dist/_dts/blocks/src/system/blocks/gifting.d.ts +591 -0
- package/dist/_dts/blocks/src/system/blocks/location-map.d.ts +2 -0
- package/dist/_dts/blocks/src/system/blocks/media-text.d.ts +47 -0
- package/dist/_dts/blocks/src/system/blocks/product-detail.d.ts +591 -0
- package/dist/_dts/blocks/src/system/blocks/product-list.d.ts +591 -0
- package/dist/_dts/blocks/src/system/blocks/shop.d.ts +591 -0
- package/dist/_dts/blocks/src/system/blocks/team-members.d.ts +3 -0
- package/dist/_dts/blocks/src/system/manifest/schema.d.ts +164 -0
- package/dist/_dts/blocks/src/system/runtime/hooks/useHeadlessBookingFlow.state.d.ts +1 -1
- package/dist/_dts/blocks/src/system/runtime/nodes/booking-form.headless.state.d.ts +1 -1
- package/dist/_dts/content-editor/src/index.d.ts +1 -1
- package/dist/_dts/content-editor/src/ui/editorSnapshot.d.ts +2 -2
- package/dist/_dts/content-model/src/content-types/schema.d.ts +14 -0
- package/dist/_dts/content-model/src/templates/bindingTypeCompatibility.d.ts +3 -1
- package/dist/_dts/content-model/src/templates/bindingValidation.d.ts +10 -4
- package/dist/_dts/content-model/src/templates/fieldPaths.d.ts +20 -0
- package/dist/_dts/content-model/src/templates/manifestAdapter.d.ts +5 -2
- package/dist/_dts/core/src/branded.d.ts +108 -85
- package/dist/_dts/core/src/csv-types.d.ts +2 -2
- package/dist/_dts/core/src/editor-state.d.ts +7 -7
- package/dist/_dts/core/src/participants.d.ts +2 -2
- package/dist/_dts/db/src/generated/supabase/database.types.d.ts +11 -0
- package/dist/_dts/editor-blocks/src/blockPayload.d.ts +1 -1
- package/dist/_dts/media-editor/src/MediaEditor.d.ts +3 -1
- package/dist/_dts/media-editor/src/MediaPreview.d.ts +3 -1
- package/dist/_dts/media-editor/src/fieldUi.d.ts +5 -0
- package/dist/_dts/media-editor/src/index.d.ts +1 -1
- package/dist/_dts/sdk/src/cli/commands/push/consts.d.ts +1 -1
- package/dist/_dts/sdk/src/cli/commands/push/metadata.d.ts +2 -0
- package/dist/_dts/sdk/src/cli/commands/push/stale.d.ts +3 -3
- package/dist/_dts/sdk/src/cli/commands/push-execute.d.ts +7 -0
- package/dist/_dts/sdk/src/cli/commands/push.d.ts +2 -0
- package/dist/_dts/sdk/src/cli/content/reader.d.ts +13 -0
- package/dist/_dts/sdk/src/cli/content/writer.d.ts +2 -1
- package/dist/_dts/sdk/src/cli/helpers.d.ts +2 -0
- package/dist/_dts/sdk/src/cli/site-commands/commandKeys.d.ts +6 -6
- package/dist/_dts/sdk/src/cli/site-commands/commandRuntime.d.ts +5 -0
- package/dist/_dts/sdk/src/cli/site-commands/commandSurfaceDispatch.d.ts +4 -0
- package/dist/_dts/sdk/src/cli/site-commands/pageCommands.d.ts +5 -2
- package/dist/_dts/sdk/src/cli/site-commands/pushExecution.d.ts +10 -1
- package/dist/_dts/sdk/src/cli/site-commands/pushExecutionTypes.d.ts +1 -1
- package/dist/_dts/sdk/src/client/management/types.d.ts +6 -0
- package/dist/_dts/sdk/src/client/types.d.ts +2 -2
- package/dist/_dts/sdk/src/config/content-types.d.ts +7 -0
- package/dist/_dts/sdk/src/config/field-definitions.d.ts +2 -0
- package/dist/_dts/sdk/src/version.d.ts +1 -1
- package/dist/_dts/site-commands/src/commands.d.ts +3 -0
- package/dist/{altcha-B5XGSXP5.mjs → altcha-EKUEQ4RP.mjs} +1 -1
- package/dist/{chunk-NIDXI46P.mjs → chunk-4QEGTLK6.mjs} +1 -1
- package/dist/{chunk-TXDES5P2.mjs → chunk-6HYXHRAI.mjs} +5 -5
- package/dist/{chunk-SVMMM2NA.mjs → chunk-CR5HKAGU.mjs} +24 -5
- package/dist/{chunk-OECWLDHN.mjs → chunk-MCRQMPET.mjs} +1030 -588
- package/dist/{chunk-SXOLGNMX.mjs → chunk-OKMBEAXY.mjs} +1 -1
- package/dist/{chunk-XGB3TDIC.mjs → chunk-R7POPVJR.mjs} +2 -8
- package/dist/{chunk-F7RTCZYN.mjs → chunk-RGTOD4AJ.mjs} +20 -14
- package/dist/cli/index.mjs +681 -225
- package/dist/cli/init-docs/content/cli-reference.md +3 -2
- package/dist/cli/init-docs/content/content-management.md +2 -2
- package/dist/cli/init-docs/content/workflow-preview-mode.md +68 -2
- package/dist/client/{accordion-EVDEOUPR.mjs → accordion-PLYNJIIM.mjs} +2 -2
- package/dist/client/analytics.mjs +1 -1
- package/dist/client/{bookingForm-DIHBLC64.mjs → bookingForm-BXAP6AO7.mjs} +55 -48
- package/dist/client/bookings.mjs +62 -55
- package/dist/client/{carousel-FEBQHIWI.mjs → carousel-TRBXDHGF.mjs} +3 -3
- package/dist/client/{cart-7CKSXAE4.mjs → cart-Z7H3HJRS.mjs} +7 -7
- package/dist/client/{checkout-WKYCANLV.mjs → checkout-WAFCUBIX.mjs} +7 -7
- package/dist/client/{chunk-OFMSCGNY.mjs → chunk-75OUS5MT.mjs} +2 -2
- package/dist/client/{chunk-IVNCUVAV.mjs → chunk-AUJ5DBZJ.mjs} +18 -18
- package/dist/client/{chunk-36WJCERQ.mjs → chunk-CE7IBGVW.mjs} +3 -1
- package/dist/client/{chunk-RZDWX7QW.mjs → chunk-CWGTG37I.mjs} +1 -1
- package/dist/client/{chunk-YDSEG6GZ.mjs → chunk-DNRGY432.mjs} +2 -2
- package/dist/client/{chunk-RV6FX7UH.mjs → chunk-FUXW6VW2.mjs} +9 -9
- package/dist/client/{chunk-65F47D7Y.mjs → chunk-JGXPTEI2.mjs} +43 -36
- package/dist/client/{chunk-GUK2FPXQ.mjs → chunk-JRDUHZCT.mjs} +37 -15
- package/dist/client/{chunk-VPPMNXCF.mjs → chunk-UVQEJJTN.mjs} +2 -2
- package/dist/client/{chunk-F7LHOKEH.mjs → chunk-XSV6KW4D.mjs} +1 -1
- package/dist/client/{chunk-PD6NBCEY.mjs → chunk-ZFHRN6W2.mjs} +1 -1
- package/dist/client/{chunk-2SAVKN2M.mjs → chunk-ZI3LLBPZ.mjs} +2 -2
- package/dist/client/client.mjs +249 -160
- package/dist/client/{courseRegistration-5QF2PHKM.mjs → courseRegistration-AHFQHWIJ.mjs} +10 -10
- package/dist/client/{eventCalendar-4ZOSETDU.mjs → eventCalendar-LDXTV5R7.mjs} +9 -9
- package/dist/client/{eventCombined-WQGU7JUX.mjs → eventCombined-A4JGTNJO.mjs} +9 -9
- package/dist/client/{eventDetails-AYWVUJ5Y.mjs → eventDetails-4YXTZ7EG.mjs} +9 -9
- package/dist/client/{eventListing-NT7C6UT5.mjs → eventListing-P72TPFFM.mjs} +9 -9
- package/dist/client/{eventRegistration-OH24F4ZJ.mjs → eventRegistration-LSYJHGMT.mjs} +9 -9
- package/dist/client/{form-7L42SRBB.mjs → form-AOPYOKOW.mjs} +6 -3
- package/dist/client/{headerSection-OZRZNZ52.mjs → headerSection-5TFYDFVQ.mjs} +3 -3
- package/dist/client/hooks.mjs +78 -48
- package/dist/client/{locationMap-ZBXRPQ7C.mjs → locationMap-QSZ3ZVAZ.mjs} +3 -3
- package/dist/client/{newsletterForm-SNAGFF2I.mjs → newsletterForm-KTRHZY52.mjs} +2 -2
- package/dist/client/{productDetail-I46BOFGV.mjs → productDetail-N4E775RG.mjs} +7 -7
- package/dist/client/{productList-BOYHTYI6.mjs → productList-UGUQ2S45.mjs} +7 -7
- package/dist/client/rendering/client.mjs +173 -131
- package/dist/client/rendering/islands.mjs +19 -19
- package/dist/client/rendering.mjs +230 -150
- package/dist/client/{shop-XTXPZTKR.mjs → shop-VHSZEEQ2.mjs} +7 -7
- package/dist/preview-next/before-render.mjs +10 -1
- package/dist/preview-next/client/runtime.mjs +6 -6
- package/dist/preview-next/middleware.mjs +10 -1
- package/dist/preview-next/tailwind-sources.css +1 -0
- package/dist/sdk-runtime-WHPJEF5G.mjs +8 -0
- package/dist/server/components.mjs +101 -54
- package/dist/server/config-template-validation.mjs +221 -15
- package/dist/server/config-validation.mjs +76 -42
- package/dist/server/config.mjs +76 -42
- package/dist/server/data.mjs +77 -47
- package/dist/server/index.mjs +31 -10
- package/dist/server/next.mjs +133 -71
- package/dist/server/page-converter.mjs +60 -40
- package/dist/server/prebuild.mjs +1 -1
- package/dist/server/rendering/server.mjs +107 -60
- package/dist/server/rendering.mjs +111 -61
- package/dist/server/routing.mjs +93 -63
- package/dist/server/server.mjs +102 -57
- package/package.json +1 -1
- package/dist/SdkPreviewModeRuntime-LAGYMPNF.mjs +0 -8
- package/dist/sdk-runtime-ZJLKC6DR.mjs +0 -8
|
@@ -97,20 +97,33 @@ var init_types = __esm({
|
|
|
97
97
|
}
|
|
98
98
|
});
|
|
99
99
|
|
|
100
|
+
// ../core/src/result.ts
|
|
101
|
+
function ok(value) {
|
|
102
|
+
return { ok: true, value };
|
|
103
|
+
}
|
|
104
|
+
function err(error) {
|
|
105
|
+
return { ok: false, error };
|
|
106
|
+
}
|
|
107
|
+
var init_result = __esm({
|
|
108
|
+
"../core/src/result.ts"() {
|
|
109
|
+
"use strict";
|
|
110
|
+
}
|
|
111
|
+
});
|
|
112
|
+
|
|
100
113
|
// ../core/src/branded.ts
|
|
101
|
-
var
|
|
114
|
+
var unsafeAsMediaAssetId, unsafeAsStorageBucketName, unsafeAsPositiveByteCount, unsafeAsPositiveSeconds, unsafeAsFormId, unsafeAsPassId, unsafeAsCustomerPassId, unsafeAsAppointmentServiceId, unsafeAsAppointmentResourceId;
|
|
102
115
|
var init_branded = __esm({
|
|
103
116
|
"../core/src/branded.ts"() {
|
|
104
117
|
"use strict";
|
|
105
|
-
|
|
106
|
-
|
|
118
|
+
unsafeAsMediaAssetId = (id) => id;
|
|
119
|
+
unsafeAsStorageBucketName = (value) => value;
|
|
107
120
|
unsafeAsPositiveByteCount = (value) => value;
|
|
108
121
|
unsafeAsPositiveSeconds = (value) => value;
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
122
|
+
unsafeAsFormId = (id) => id;
|
|
123
|
+
unsafeAsPassId = (id) => id;
|
|
124
|
+
unsafeAsCustomerPassId = (id) => id;
|
|
125
|
+
unsafeAsAppointmentServiceId = (id) => id;
|
|
126
|
+
unsafeAsAppointmentResourceId = (id) => id;
|
|
114
127
|
}
|
|
115
128
|
});
|
|
116
129
|
|
|
@@ -335,19 +348,6 @@ var init_booking_instalments = __esm({
|
|
|
335
348
|
}
|
|
336
349
|
});
|
|
337
350
|
|
|
338
|
-
// ../core/src/result.ts
|
|
339
|
-
function ok(value) {
|
|
340
|
-
return { ok: true, value };
|
|
341
|
-
}
|
|
342
|
-
function err(error) {
|
|
343
|
-
return { ok: false, error };
|
|
344
|
-
}
|
|
345
|
-
var init_result = __esm({
|
|
346
|
-
"../core/src/result.ts"() {
|
|
347
|
-
"use strict";
|
|
348
|
-
}
|
|
349
|
-
});
|
|
350
|
-
|
|
351
351
|
// ../core/src/booking-date-time.ts
|
|
352
352
|
function isValidTimeZone(timeZone) {
|
|
353
353
|
try {
|
|
@@ -948,15 +948,15 @@ var init_fileStorage = __esm({
|
|
|
948
948
|
"use strict";
|
|
949
949
|
init_src();
|
|
950
950
|
FILE_STORAGE_BUCKETS = {
|
|
951
|
-
publicSite:
|
|
952
|
-
privateSite:
|
|
953
|
-
temporary:
|
|
951
|
+
publicSite: unsafeAsStorageBucketName("media"),
|
|
952
|
+
privateSite: unsafeAsStorageBucketName("site-files-private"),
|
|
953
|
+
temporary: unsafeAsStorageBucketName("temp-uploads")
|
|
954
954
|
};
|
|
955
955
|
PUBLIC_SITE_FILE_STORAGE_BUCKETS = [
|
|
956
956
|
FILE_STORAGE_BUCKETS.publicSite,
|
|
957
957
|
// Existing site logo and font uploads predate the unified file buckets.
|
|
958
|
-
|
|
959
|
-
|
|
958
|
+
unsafeAsStorageBucketName("site-assets"),
|
|
959
|
+
unsafeAsStorageBucketName("site-fonts")
|
|
960
960
|
];
|
|
961
961
|
PRIVATE_SITE_FILE_BUCKET_MIME_TYPES = [
|
|
962
962
|
"application/pdf",
|
|
@@ -1457,14 +1457,14 @@ function rotateNormalizedPoint(point, rotation) {
|
|
|
1457
1457
|
const x = point.x;
|
|
1458
1458
|
const y = point.y;
|
|
1459
1459
|
switch (rotation) {
|
|
1460
|
+
case 0:
|
|
1461
|
+
return { x, y };
|
|
1460
1462
|
case 90:
|
|
1461
1463
|
return { x: 1 - y, y: x };
|
|
1462
1464
|
case 180:
|
|
1463
1465
|
return { x: 1 - x, y: 1 - y };
|
|
1464
1466
|
case 270:
|
|
1465
1467
|
return { x: y, y: 1 - x };
|
|
1466
|
-
default:
|
|
1467
|
-
return { x, y };
|
|
1468
1468
|
}
|
|
1469
1469
|
}
|
|
1470
1470
|
var init_rotation = __esm({
|
|
@@ -7001,13 +7001,13 @@ function generateShadowValue(elevation, softness, position = "bottom") {
|
|
|
7001
7001
|
const xOffset = position === "bottom-right" ? config.offset : 0;
|
|
7002
7002
|
const yOffset = config.offset;
|
|
7003
7003
|
switch (softness) {
|
|
7004
|
+
case null:
|
|
7005
|
+
case "soft":
|
|
7006
|
+
return `${xOffset}px ${yOffset}px ${config.blur}px ${config.spread}px rgb(0 0 0 / 0.3)`;
|
|
7004
7007
|
case "hard":
|
|
7005
7008
|
return `${xOffset}px ${yOffset}px 0 0 rgb(0 0 0 / 1)`;
|
|
7006
7009
|
case "crisp":
|
|
7007
7010
|
return `${xOffset}px ${yOffset}px ${config.offset}px ${config.spread}px rgb(0 0 0 / 0.4)`;
|
|
7008
|
-
case "soft":
|
|
7009
|
-
default:
|
|
7010
|
-
return `${xOffset}px ${yOffset}px ${config.blur}px ${config.spread}px rgb(0 0 0 / 0.3)`;
|
|
7011
7011
|
}
|
|
7012
7012
|
}
|
|
7013
7013
|
var GRADIENT_DIRECTION_MAP, BORDER_RADIUS_MAP, BORDER_WIDTH_MAP, FONT_SIZE_MAP, DEFAULT_BUTTON_SIZES;
|
|
@@ -13850,10 +13850,10 @@ function normalizeEventCategoryIds(value) {
|
|
|
13850
13850
|
if (Array.isArray(value)) {
|
|
13851
13851
|
return normalizeIdList(
|
|
13852
13852
|
value.filter((entry) => typeof entry === "string")
|
|
13853
|
-
).map(
|
|
13853
|
+
).map(unsafeAsEventCategoryId);
|
|
13854
13854
|
}
|
|
13855
13855
|
if (typeof value === "string") {
|
|
13856
|
-
return normalizeIdList(value.split(",")).map(
|
|
13856
|
+
return normalizeIdList(value.split(",")).map(unsafeAsEventCategoryId);
|
|
13857
13857
|
}
|
|
13858
13858
|
return [];
|
|
13859
13859
|
}
|
|
@@ -13866,7 +13866,7 @@ function normalizeEventVenueId(value) {
|
|
|
13866
13866
|
return null;
|
|
13867
13867
|
}
|
|
13868
13868
|
const trimmed = value.trim();
|
|
13869
|
-
return trimmed ?
|
|
13869
|
+
return trimmed ? unsafeAsVenueId(trimmed) : null;
|
|
13870
13870
|
}
|
|
13871
13871
|
function normalizeEventStaffMemberId(value) {
|
|
13872
13872
|
if (typeof value !== "string") {
|
|
@@ -13875,7 +13875,7 @@ function normalizeEventStaffMemberId(value) {
|
|
|
13875
13875
|
const trimmed = value.trim();
|
|
13876
13876
|
return trimmed ? trimmed : null;
|
|
13877
13877
|
}
|
|
13878
|
-
var eventBlockKindValues, eventSurfacePresetValues, eventSurfaceScopeValues, eventScheduleScopeValues,
|
|
13878
|
+
var eventBlockKindValues, eventSurfacePresetValues, eventSurfaceScopeValues, eventScheduleScopeValues, unsafeAsEventCategoryId, unsafeAsVenueId;
|
|
13879
13879
|
var init_filtering = __esm({
|
|
13880
13880
|
"../blocks/src/system/blocks/events/shared/filtering.ts"() {
|
|
13881
13881
|
"use strict";
|
|
@@ -13894,8 +13894,8 @@ var init_filtering = __esm({
|
|
|
13894
13894
|
"custom"
|
|
13895
13895
|
];
|
|
13896
13896
|
eventScheduleScopeValues = ["any", "recurring", "oneOff"];
|
|
13897
|
-
|
|
13898
|
-
|
|
13897
|
+
unsafeAsEventCategoryId = (value) => value;
|
|
13898
|
+
unsafeAsVenueId = (value) => value;
|
|
13899
13899
|
}
|
|
13900
13900
|
});
|
|
13901
13901
|
|
|
@@ -14268,6 +14268,8 @@ var init_schema3 = __esm({
|
|
|
14268
14268
|
mediaPickerAutoOpen: z29.boolean().optional(),
|
|
14269
14269
|
showMediaPreview: z29.boolean().optional(),
|
|
14270
14270
|
showMediaOverlayActions: z29.boolean().optional(),
|
|
14271
|
+
mediaPreviewMaxWidth: z29.enum(["xs", "sm", "md", "none"]).optional(),
|
|
14272
|
+
preventMediaPreviewUpscale: z29.boolean().optional(),
|
|
14271
14273
|
mediaDelivery: mediaDeliverySchema.optional(),
|
|
14272
14274
|
mediaDeliveryByVariant: z29.record(z29.string(), mediaDeliverySchema).optional(),
|
|
14273
14275
|
// Optional input hints for validators/widgets
|
|
@@ -14517,6 +14519,9 @@ var init_schema3 = __esm({
|
|
|
14517
14519
|
type: z29.literal("repeater"),
|
|
14518
14520
|
itemLabel: z29.string().default("Item"),
|
|
14519
14521
|
itemLabelSource: z29.string().optional(),
|
|
14522
|
+
showSummary: z29.boolean().optional(),
|
|
14523
|
+
summaryFields: z29.string().array().optional(),
|
|
14524
|
+
summaryMaxChars: z29.number().int().positive().optional(),
|
|
14520
14525
|
minItems: z29.number().int().min(0).default(0),
|
|
14521
14526
|
maxItems: z29.number().int().positive().optional(),
|
|
14522
14527
|
// Monomorphic mode
|
|
@@ -14841,47 +14846,48 @@ function validateFieldDefinitions(fields3, fragmentId) {
|
|
|
14841
14846
|
function prefixFieldId(field, scope) {
|
|
14842
14847
|
const cloned = cloneFieldDefinition(field);
|
|
14843
14848
|
cloned.id = `${scope}.${field.id}`;
|
|
14844
|
-
|
|
14849
|
+
const defaultValue = cloned.defaultValue;
|
|
14850
|
+
cloned.defaultValue = cloneUnknown(defaultValue);
|
|
14845
14851
|
cloned.visibleRoles = cloned.visibleRoles ? [...cloned.visibleRoles] : void 0;
|
|
14846
14852
|
cloned.ui = cloneUnknown(cloned.ui);
|
|
14847
14853
|
return cloned;
|
|
14848
14854
|
}
|
|
14849
14855
|
function cloneFieldDefinition(field) {
|
|
14850
|
-
|
|
14851
|
-
|
|
14852
|
-
|
|
14853
|
-
|
|
14854
|
-
|
|
14855
|
-
|
|
14856
|
-
|
|
14857
|
-
|
|
14858
|
-
|
|
14859
|
-
|
|
14860
|
-
|
|
14861
|
-
|
|
14862
|
-
|
|
14863
|
-
|
|
14864
|
-
|
|
14865
|
-
|
|
14866
|
-
|
|
14867
|
-
return {
|
|
14868
|
-
...field,
|
|
14869
|
-
schema: {
|
|
14870
|
-
fields: field.schema.fields.map(cloneFieldDefinition)
|
|
14871
|
-
}
|
|
14872
|
-
};
|
|
14873
|
-
}
|
|
14874
|
-
return { ...field };
|
|
14875
|
-
case "group":
|
|
14856
|
+
if (field.type === "repeater") {
|
|
14857
|
+
if (field.polymorphic && field.itemTypes) {
|
|
14858
|
+
return {
|
|
14859
|
+
...field,
|
|
14860
|
+
polymorphic: true,
|
|
14861
|
+
itemTypes: Object.fromEntries(
|
|
14862
|
+
Object.entries(field.itemTypes).map(([key, itemType]) => [
|
|
14863
|
+
key,
|
|
14864
|
+
{
|
|
14865
|
+
...itemType,
|
|
14866
|
+
fields: itemType.fields.map(cloneFieldDefinition)
|
|
14867
|
+
}
|
|
14868
|
+
])
|
|
14869
|
+
)
|
|
14870
|
+
};
|
|
14871
|
+
}
|
|
14872
|
+
if (field.schema) {
|
|
14876
14873
|
return {
|
|
14877
14874
|
...field,
|
|
14878
14875
|
schema: {
|
|
14879
14876
|
fields: field.schema.fields.map(cloneFieldDefinition)
|
|
14880
14877
|
}
|
|
14881
14878
|
};
|
|
14882
|
-
|
|
14883
|
-
|
|
14879
|
+
}
|
|
14880
|
+
return { ...field };
|
|
14884
14881
|
}
|
|
14882
|
+
if (field.type === "group") {
|
|
14883
|
+
return {
|
|
14884
|
+
...field,
|
|
14885
|
+
schema: {
|
|
14886
|
+
fields: field.schema.fields.map(cloneFieldDefinition)
|
|
14887
|
+
}
|
|
14888
|
+
};
|
|
14889
|
+
}
|
|
14890
|
+
return { ...field };
|
|
14885
14891
|
}
|
|
14886
14892
|
function cloneUnknown(value) {
|
|
14887
14893
|
if (value == null || typeof value !== "object") {
|
|
@@ -18392,7 +18398,8 @@ function createBlockManifestWithContentShape(config, _contentShape) {
|
|
|
18392
18398
|
return createBlockManifest(config);
|
|
18393
18399
|
}
|
|
18394
18400
|
function normalizeBlockLayout(layout) {
|
|
18395
|
-
|
|
18401
|
+
const rawLayout = layout;
|
|
18402
|
+
return Array.isArray(rawLayout) ? rawLayout : rawLayout;
|
|
18396
18403
|
}
|
|
18397
18404
|
function deriveComponentName(id) {
|
|
18398
18405
|
const base = id.replace(/^block\./, "");
|
|
@@ -21325,7 +21332,7 @@ function getProxyImageUrl(value, options, transformAspectRatio, resolved) {
|
|
|
21325
21332
|
if (!shouldUseExplicitRectProxy(value, options, resolvedTransform, sourceWidth, sourceHeight)) return void 0;
|
|
21326
21333
|
const params = buildProxyTransformParams(options, resolvedTransform);
|
|
21327
21334
|
const proxyBasePath = getImageProxyBasePath();
|
|
21328
|
-
const proxyUrl = getImageUrl({ id:
|
|
21335
|
+
const proxyUrl = getImageUrl({ id: unsafeAsMediaAssetId(value.assetId) }, params, proxyBasePath);
|
|
21329
21336
|
debugMediaNodeLog("resolve:proxy-img", { assetId: value.assetId, params, proxyBasePath, proxyUrl });
|
|
21330
21337
|
return proxyUrl;
|
|
21331
21338
|
}
|
|
@@ -33056,6 +33063,9 @@ var init_FeedbackMessage = __esm({
|
|
|
33056
33063
|
// ../blocks/src/system/runtime/nodes/form.client.tsx
|
|
33057
33064
|
import { useState as useState4 } from "react";
|
|
33058
33065
|
import { jsx as jsx17, jsxs as jsxs12 } from "react/jsx-runtime";
|
|
33066
|
+
function isUnknownArray(value) {
|
|
33067
|
+
return Array.isArray(value);
|
|
33068
|
+
}
|
|
33059
33069
|
var FormNodeClient;
|
|
33060
33070
|
var init_form_client = __esm({
|
|
33061
33071
|
"../blocks/src/system/runtime/nodes/form.client.tsx"() {
|
|
@@ -33181,7 +33191,7 @@ var init_form_client = __esm({
|
|
|
33181
33191
|
if (key === "company" || key === "altcha-solution") continue;
|
|
33182
33192
|
if (key in data) {
|
|
33183
33193
|
const existing = data[key];
|
|
33184
|
-
data[key] =
|
|
33194
|
+
data[key] = isUnknownArray(existing) ? [...existing, fieldValue] : [existing, fieldValue];
|
|
33185
33195
|
} else {
|
|
33186
33196
|
data[key] = fieldValue;
|
|
33187
33197
|
}
|
|
@@ -33576,7 +33586,7 @@ function useAvailableDates({
|
|
|
33576
33586
|
const endDate = formatLocalScheduleDate(
|
|
33577
33587
|
addLocalScheduleDays(parseBookingLocalDate(today), initialDays)
|
|
33578
33588
|
);
|
|
33579
|
-
fetchDates(today, endDate, false);
|
|
33589
|
+
void fetchDates(today, endDate, false);
|
|
33580
33590
|
}, [serviceId, fetchDates, initialDays]);
|
|
33581
33591
|
useVisibleTabPolling({
|
|
33582
33592
|
enabled: Boolean(serviceId && loadedRange),
|
|
@@ -33596,7 +33606,7 @@ function useAvailableDates({
|
|
|
33596
33606
|
BOOKING_FETCH_CHUNK_DAYS
|
|
33597
33607
|
)
|
|
33598
33608
|
);
|
|
33599
|
-
fetchDates(start, end, true);
|
|
33609
|
+
void fetchDates(start, end, true);
|
|
33600
33610
|
}, [fetchDates, isLoading]);
|
|
33601
33611
|
return {
|
|
33602
33612
|
availableDates,
|
|
@@ -33669,7 +33679,7 @@ function useAvailableSlots({
|
|
|
33669
33679
|
setSlots(
|
|
33670
33680
|
result.slots.map((slot) => ({
|
|
33671
33681
|
...slot,
|
|
33672
|
-
resourceId:
|
|
33682
|
+
resourceId: unsafeAsAppointmentResourceId(slot.resourceId)
|
|
33673
33683
|
}))
|
|
33674
33684
|
);
|
|
33675
33685
|
setHasLoaded(true);
|
|
@@ -33866,7 +33876,7 @@ function useDiscountCodeUi(options) {
|
|
|
33866
33876
|
if (!cancelled) setDiscountsAvailableLoading(false);
|
|
33867
33877
|
}
|
|
33868
33878
|
}
|
|
33869
|
-
checkDiscountAvailability();
|
|
33879
|
+
void checkDiscountAvailability();
|
|
33870
33880
|
return () => {
|
|
33871
33881
|
cancelled = true;
|
|
33872
33882
|
};
|
|
@@ -34243,13 +34253,13 @@ function toOptionalBrandedId(value, brand) {
|
|
|
34243
34253
|
return trimmed ? brand(trimmed) : void 0;
|
|
34244
34254
|
}
|
|
34245
34255
|
function toOptionalAppointmentServiceId(value) {
|
|
34246
|
-
return toOptionalBrandedId(value,
|
|
34256
|
+
return toOptionalBrandedId(value, unsafeAsAppointmentServiceId);
|
|
34247
34257
|
}
|
|
34248
34258
|
function toOptionalAppointmentResourceId(value) {
|
|
34249
|
-
return toOptionalBrandedId(value,
|
|
34259
|
+
return toOptionalBrandedId(value, unsafeAsAppointmentResourceId);
|
|
34250
34260
|
}
|
|
34251
34261
|
function toOptionalCustomerPassId(value) {
|
|
34252
|
-
return toOptionalBrandedId(value,
|
|
34262
|
+
return toOptionalBrandedId(value, unsafeAsCustomerPassId);
|
|
34253
34263
|
}
|
|
34254
34264
|
function isBookingFieldValue(value) {
|
|
34255
34265
|
return value === null || typeof value === "string" || typeof value === "number" || typeof value === "boolean" || Array.isArray(value) && value.every((item) => typeof item === "string");
|
|
@@ -34403,7 +34413,7 @@ function toBookingSlotView(slot) {
|
|
|
34403
34413
|
key: `${slot.startAt}|${slot.endAt}|${slot.resourceId}`,
|
|
34404
34414
|
startAt: slot.startAt,
|
|
34405
34415
|
endAt: slot.endAt,
|
|
34406
|
-
resourceId:
|
|
34416
|
+
resourceId: unsafeAsAppointmentResourceId(slot.resourceId),
|
|
34407
34417
|
...slot.resourceName ? { resourceName: slot.resourceName } : {},
|
|
34408
34418
|
...slot.label ? { label: slot.label } : {}
|
|
34409
34419
|
};
|
|
@@ -34525,31 +34535,30 @@ function validateBookingField(field, value) {
|
|
|
34525
34535
|
}
|
|
34526
34536
|
if (isBlankFieldValue(value)) return null;
|
|
34527
34537
|
const strValue = typeof value === "string" ? value : String(value);
|
|
34528
|
-
|
|
34529
|
-
|
|
34530
|
-
|
|
34531
|
-
|
|
34532
|
-
|
|
34533
|
-
|
|
34534
|
-
return null;
|
|
34535
|
-
} catch {
|
|
34536
|
-
return "Please enter a valid URL";
|
|
34537
|
-
}
|
|
34538
|
-
case "tel":
|
|
34539
|
-
return /^[+\d\s\-()]+$/.test(strValue) ? null : "Please enter a valid phone number";
|
|
34540
|
-
case "number": {
|
|
34541
|
-
const num = Number(value);
|
|
34542
|
-
if (Number.isNaN(num)) return "Please enter a valid number";
|
|
34543
|
-
if (field.min !== void 0 && num < field.min) {
|
|
34544
|
-
return `Value must be at least ${field.min}`;
|
|
34545
|
-
}
|
|
34546
|
-
if (field.max !== void 0 && num > field.max) {
|
|
34547
|
-
return `Value must be at most ${field.max}`;
|
|
34548
|
-
}
|
|
34538
|
+
if (field.type === "email") {
|
|
34539
|
+
return /^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(strValue) ? null : "Please enter a valid email address";
|
|
34540
|
+
}
|
|
34541
|
+
if (field.type === "url") {
|
|
34542
|
+
try {
|
|
34543
|
+
new URL(strValue);
|
|
34549
34544
|
return null;
|
|
34545
|
+
} catch {
|
|
34546
|
+
return "Please enter a valid URL";
|
|
34550
34547
|
}
|
|
34551
|
-
|
|
34552
|
-
|
|
34548
|
+
}
|
|
34549
|
+
if (field.type === "tel") {
|
|
34550
|
+
return /^[+\d\s\-()]+$/.test(strValue) ? null : "Please enter a valid phone number";
|
|
34551
|
+
}
|
|
34552
|
+
if (field.type === "number") {
|
|
34553
|
+
const num = Number(value);
|
|
34554
|
+
if (Number.isNaN(num)) return "Please enter a valid number";
|
|
34555
|
+
if (field.min !== void 0 && num < field.min) {
|
|
34556
|
+
return `Value must be at least ${field.min}`;
|
|
34557
|
+
}
|
|
34558
|
+
if (field.max !== void 0 && num > field.max) {
|
|
34559
|
+
return `Value must be at most ${field.max}`;
|
|
34560
|
+
}
|
|
34561
|
+
return null;
|
|
34553
34562
|
}
|
|
34554
34563
|
if (typeof value === "string") {
|
|
34555
34564
|
if (field.minLength && value.length < field.minLength) {
|
|
@@ -34649,7 +34658,7 @@ function buildBookingAvailabilityQuery(input) {
|
|
|
34649
34658
|
}
|
|
34650
34659
|
function deriveBookingFieldViews(input) {
|
|
34651
34660
|
return (input.form?.schema?.fields ?? []).map((field) => {
|
|
34652
|
-
const fieldId =
|
|
34661
|
+
const fieldId = unsafeAsBookingFieldId(field.id);
|
|
34653
34662
|
const inputId = `${input.idPrefix}-${fieldId}`;
|
|
34654
34663
|
const helpTextId = field.helpText ? `${inputId}-help` : null;
|
|
34655
34664
|
const fieldValue = input.values[field.id] ?? null;
|
|
@@ -34806,8 +34815,8 @@ function resolveAppointmentPackagesModel(input) {
|
|
|
34806
34815
|
function toHeadlessEligibleAppointmentPackage(appointmentPackage) {
|
|
34807
34816
|
return {
|
|
34808
34817
|
...appointmentPackage,
|
|
34809
|
-
customerPassId:
|
|
34810
|
-
passId:
|
|
34818
|
+
customerPassId: unsafeAsCustomerPassId(appointmentPackage.customerPassId),
|
|
34819
|
+
passId: unsafeAsPassId(appointmentPackage.passId)
|
|
34811
34820
|
};
|
|
34812
34821
|
}
|
|
34813
34822
|
function resolveHeadlessBookingStatus(input) {
|
|
@@ -34863,14 +34872,14 @@ function omitRecordKey(record, key) {
|
|
|
34863
34872
|
const { [key]: _removed, ...rest } = record;
|
|
34864
34873
|
return rest;
|
|
34865
34874
|
}
|
|
34866
|
-
var
|
|
34875
|
+
var unsafeAsBookingFieldId;
|
|
34867
34876
|
var init_booking_form_headless_state = __esm({
|
|
34868
34877
|
"../blocks/src/system/runtime/nodes/booking-form.headless.state.ts"() {
|
|
34869
34878
|
"use strict";
|
|
34870
34879
|
init_src();
|
|
34871
34880
|
init_dist();
|
|
34872
34881
|
init_booking_form_state();
|
|
34873
|
-
|
|
34882
|
+
unsafeAsBookingFieldId = (id) => id;
|
|
34874
34883
|
}
|
|
34875
34884
|
});
|
|
34876
34885
|
|
|
@@ -34894,7 +34903,7 @@ import React8, {
|
|
|
34894
34903
|
} from "react";
|
|
34895
34904
|
function useHeadlessBookingFlow(options) {
|
|
34896
34905
|
const viewerTimeZone = options.viewerTimeZone ?? getRuntimeTimeZone();
|
|
34897
|
-
const formKey =
|
|
34906
|
+
const formKey = unsafeAsFormId(options.formId);
|
|
34898
34907
|
const defaultServiceId = toOptionalAppointmentServiceId(
|
|
34899
34908
|
options.initialServiceId ?? resolveDefaultBookingServiceId(options.form, options.services) ?? void 0
|
|
34900
34909
|
);
|
|
@@ -35060,7 +35069,7 @@ function useHeadlessBookingFlow(options) {
|
|
|
35060
35069
|
setResourcesState({
|
|
35061
35070
|
tag: "loaded",
|
|
35062
35071
|
value: (result.options ?? []).map((option) => ({
|
|
35063
|
-
id:
|
|
35072
|
+
id: unsafeAsAppointmentResourceId(option.id),
|
|
35064
35073
|
label: option.label
|
|
35065
35074
|
}))
|
|
35066
35075
|
});
|
|
@@ -35276,11 +35285,11 @@ function useHeadlessBookingFlow(options) {
|
|
|
35276
35285
|
() => ({
|
|
35277
35286
|
selectService: (serviceId) => dispatch({
|
|
35278
35287
|
type: "service-selected",
|
|
35279
|
-
serviceId:
|
|
35288
|
+
serviceId: unsafeAsAppointmentServiceId(serviceId)
|
|
35280
35289
|
}),
|
|
35281
35290
|
selectResource: (resourceId) => dispatch({
|
|
35282
35291
|
type: "resource-selected",
|
|
35283
|
-
resourceId: resourceId ?
|
|
35292
|
+
resourceId: resourceId ? unsafeAsAppointmentResourceId(resourceId) : null
|
|
35284
35293
|
}),
|
|
35285
35294
|
selectDate: (date) => dispatch({ type: "date-selected", date }),
|
|
35286
35295
|
selectSlot: (slot) => dispatch({
|
|
@@ -35289,14 +35298,14 @@ function useHeadlessBookingFlow(options) {
|
|
|
35289
35298
|
}),
|
|
35290
35299
|
updateField: (fieldId, value) => dispatch({
|
|
35291
35300
|
type: "field-updated",
|
|
35292
|
-
fieldId:
|
|
35301
|
+
fieldId: unsafeAsBookingFieldId(fieldId),
|
|
35293
35302
|
value
|
|
35294
35303
|
}),
|
|
35295
|
-
markFieldTouched: (fieldId) => dispatch({ type: "field-touched", fieldId:
|
|
35304
|
+
markFieldTouched: (fieldId) => dispatch({ type: "field-touched", fieldId: unsafeAsBookingFieldId(fieldId) }),
|
|
35296
35305
|
selectPaymentOption: (kind) => dispatch({ type: "payment-option-selected", kind }),
|
|
35297
35306
|
selectAppointmentPackage: (packageId) => dispatch({
|
|
35298
35307
|
type: "appointment-package-selected",
|
|
35299
|
-
packageId: packageId ?
|
|
35308
|
+
packageId: packageId ? unsafeAsCustomerPassId(packageId) : null
|
|
35300
35309
|
}),
|
|
35301
35310
|
setDiscountCode: (code) => {
|
|
35302
35311
|
dispatch({ type: "discount-code-changed", code });
|
|
@@ -35656,7 +35665,7 @@ function usePolling(config) {
|
|
|
35656
35665
|
timeoutRef.current = setTimeout(doPoll, pollInterval);
|
|
35657
35666
|
}
|
|
35658
35667
|
};
|
|
35659
|
-
doPoll();
|
|
35668
|
+
void doPoll();
|
|
35660
35669
|
}, [poll]);
|
|
35661
35670
|
useEffect9(() => {
|
|
35662
35671
|
if (!config) {
|
|
@@ -35852,6 +35861,8 @@ var init_TimeSlotSelector = __esm({
|
|
|
35852
35861
|
import { jsx as jsx22, jsxs as jsxs16 } from "react/jsx-runtime";
|
|
35853
35862
|
function resolveColorStyle(color) {
|
|
35854
35863
|
switch (color) {
|
|
35864
|
+
case void 0:
|
|
35865
|
+
return void 0;
|
|
35855
35866
|
case "inherit":
|
|
35856
35867
|
return { color: "inherit" };
|
|
35857
35868
|
case "foreground":
|
|
@@ -36618,7 +36629,7 @@ function DefaultFieldInput({
|
|
|
36618
36629
|
] }, option.value)) });
|
|
36619
36630
|
case "checkbox":
|
|
36620
36631
|
if (field.field.options && field.field.options.length > 1) {
|
|
36621
|
-
const checkedValues =
|
|
36632
|
+
const checkedValues = toStringArray(value);
|
|
36622
36633
|
return /* @__PURE__ */ jsx25("div", { className: "rb-space-y-2", children: field.field.options.map((option) => /* @__PURE__ */ jsxs18("label", { className: "rb-flex rb-items-center rb-gap-2 rb-cursor-pointer", children: [
|
|
36623
36634
|
/* @__PURE__ */ jsx25(
|
|
36624
36635
|
"input",
|
|
@@ -36713,7 +36724,10 @@ function DefaultFieldInput({
|
|
|
36713
36724
|
className: "form-input"
|
|
36714
36725
|
}
|
|
36715
36726
|
);
|
|
36716
|
-
|
|
36727
|
+
case "text":
|
|
36728
|
+
case "email":
|
|
36729
|
+
case "tel":
|
|
36730
|
+
case "url":
|
|
36717
36731
|
return /* @__PURE__ */ jsx25(
|
|
36718
36732
|
"input",
|
|
36719
36733
|
{
|
|
@@ -36730,6 +36744,9 @@ function DefaultFieldInput({
|
|
|
36730
36744
|
);
|
|
36731
36745
|
}
|
|
36732
36746
|
}
|
|
36747
|
+
function toStringArray(value) {
|
|
36748
|
+
return Array.isArray(value) ? value.filter((item) => typeof item === "string") : [];
|
|
36749
|
+
}
|
|
36733
36750
|
function DefaultBookingDiscount({
|
|
36734
36751
|
booking
|
|
36735
36752
|
}) {
|
|
@@ -36821,7 +36838,7 @@ function collapseHeadlessSlotsForDisplay(input) {
|
|
|
36821
36838
|
visibleSlots.push({
|
|
36822
36839
|
startAt: slot.startAt,
|
|
36823
36840
|
endAt: slot.endAt,
|
|
36824
|
-
resourceId:
|
|
36841
|
+
resourceId: unsafeAsAppointmentResourceId(slot.resourceId)
|
|
36825
36842
|
});
|
|
36826
36843
|
}
|
|
36827
36844
|
return visibleSlots;
|
|
@@ -38038,7 +38055,7 @@ function usePortalAuth() {
|
|
|
38038
38055
|
setProfile(null);
|
|
38039
38056
|
}
|
|
38040
38057
|
}
|
|
38041
|
-
checkPortalAuth();
|
|
38058
|
+
void checkPortalAuth();
|
|
38042
38059
|
return () => {
|
|
38043
38060
|
cancelled = true;
|
|
38044
38061
|
};
|
|
@@ -38102,7 +38119,7 @@ function useEligibility(params) {
|
|
|
38102
38119
|
});
|
|
38103
38120
|
}
|
|
38104
38121
|
}
|
|
38105
|
-
fetchEligibility();
|
|
38122
|
+
void fetchEligibility();
|
|
38106
38123
|
return () => {
|
|
38107
38124
|
cancelled = true;
|
|
38108
38125
|
};
|
|
@@ -38147,7 +38164,7 @@ function useExistingEventRegistration({
|
|
|
38147
38164
|
dispatch({ type: "resolved", registration: null });
|
|
38148
38165
|
}
|
|
38149
38166
|
}
|
|
38150
|
-
fetchExistingRegistration();
|
|
38167
|
+
void fetchExistingRegistration();
|
|
38151
38168
|
return () => {
|
|
38152
38169
|
cancelled = true;
|
|
38153
38170
|
};
|
|
@@ -39395,6 +39412,14 @@ function EventRegistrationWizardContent(props2) {
|
|
|
39395
39412
|
const { wizard } = props2;
|
|
39396
39413
|
const showSpamProtection = props2.showSpamProtection ?? isSpamProtectionEnabled();
|
|
39397
39414
|
switch (wizard.step) {
|
|
39415
|
+
case "error":
|
|
39416
|
+
case "success":
|
|
39417
|
+
case "submitting":
|
|
39418
|
+
case "redirecting":
|
|
39419
|
+
case "verifying-payment":
|
|
39420
|
+
case "verifying-timeout":
|
|
39421
|
+
case "payment-failed":
|
|
39422
|
+
return null;
|
|
39398
39423
|
case "select-event":
|
|
39399
39424
|
return /* @__PURE__ */ jsx51(
|
|
39400
39425
|
EventSelectionStep,
|
|
@@ -39544,6 +39569,14 @@ function EventRegistrationWizardActions(props2) {
|
|
|
39544
39569
|
return wizard.eventRequiresPayment ? "Continue to Payment" : props2.buttonText;
|
|
39545
39570
|
};
|
|
39546
39571
|
switch (wizard.step) {
|
|
39572
|
+
case "error":
|
|
39573
|
+
case "success":
|
|
39574
|
+
case "submitting":
|
|
39575
|
+
case "redirecting":
|
|
39576
|
+
case "verifying-payment":
|
|
39577
|
+
case "verifying-timeout":
|
|
39578
|
+
case "payment-failed":
|
|
39579
|
+
return null;
|
|
39547
39580
|
case "select-event":
|
|
39548
39581
|
return null;
|
|
39549
39582
|
case "select-tickets": {
|
|
@@ -39595,10 +39628,10 @@ function EventRegistrationWizardActions(props2) {
|
|
|
39595
39628
|
const handlePaymentContinue = () => {
|
|
39596
39629
|
if (!selection.method) return;
|
|
39597
39630
|
if (selection.method === "free") {
|
|
39598
|
-
wizard.handlePaymentSelect("free");
|
|
39631
|
+
void wizard.handlePaymentSelect("free");
|
|
39599
39632
|
return;
|
|
39600
39633
|
}
|
|
39601
|
-
wizard.handlePaymentSelect(
|
|
39634
|
+
void wizard.handlePaymentSelect(
|
|
39602
39635
|
selection.method,
|
|
39603
39636
|
selection.passId ?? selection.bundlePassId,
|
|
39604
39637
|
selection.membershipId ?? selection.bundleMembershipId
|
|
@@ -39831,7 +39864,7 @@ function useWaitlistClaim() {
|
|
|
39831
39864
|
}
|
|
39832
39865
|
}
|
|
39833
39866
|
}
|
|
39834
|
-
resolveClaim();
|
|
39867
|
+
void resolveClaim();
|
|
39835
39868
|
return () => {
|
|
39836
39869
|
cancelled = true;
|
|
39837
39870
|
};
|
|
@@ -40857,7 +40890,13 @@ function EventRegistrationWizard(props2) {
|
|
|
40857
40890
|
return "Details";
|
|
40858
40891
|
case "select-payment":
|
|
40859
40892
|
return "Payment";
|
|
40860
|
-
|
|
40893
|
+
case "error":
|
|
40894
|
+
case "success":
|
|
40895
|
+
case "submitting":
|
|
40896
|
+
case "redirecting":
|
|
40897
|
+
case "verifying-payment":
|
|
40898
|
+
case "verifying-timeout":
|
|
40899
|
+
case "payment-failed":
|
|
40861
40900
|
return "";
|
|
40862
40901
|
}
|
|
40863
40902
|
});
|
|
@@ -41172,7 +41211,7 @@ var init_LeafletStaticMap = __esm({
|
|
|
41172
41211
|
}
|
|
41173
41212
|
}
|
|
41174
41213
|
}
|
|
41175
|
-
initMap();
|
|
41214
|
+
void initMap();
|
|
41176
41215
|
return () => {
|
|
41177
41216
|
mounted = false;
|
|
41178
41217
|
if (mapRef.current) {
|
|
@@ -42683,7 +42722,7 @@ function useCalendarEvents({
|
|
|
42683
42722
|
);
|
|
42684
42723
|
if (unloadedMonths.length > 0) {
|
|
42685
42724
|
const range = getThreeMonthRange(date);
|
|
42686
|
-
fetchEventsForRange(range.from, range.to, unloadedMonths);
|
|
42725
|
+
void fetchEventsForRange(range.from, range.to, unloadedMonths);
|
|
42687
42726
|
}
|
|
42688
42727
|
}, [preloadMonths, fetchEventsForRange]);
|
|
42689
42728
|
useEffect20(() => {
|
|
@@ -45488,7 +45527,7 @@ function useCourseRegistrationWizard(props2) {
|
|
|
45488
45527
|
setPortalAuthState("unauthenticated");
|
|
45489
45528
|
}
|
|
45490
45529
|
}
|
|
45491
|
-
checkPortalAuth();
|
|
45530
|
+
void checkPortalAuth();
|
|
45492
45531
|
return () => {
|
|
45493
45532
|
cancelled = true;
|
|
45494
45533
|
};
|
|
@@ -45573,7 +45612,7 @@ function useCourseRegistrationWizard(props2) {
|
|
|
45573
45612
|
if (!cancelled) setEligibilityLoading(false);
|
|
45574
45613
|
}
|
|
45575
45614
|
}
|
|
45576
|
-
fetchEligibility();
|
|
45615
|
+
void fetchEligibility();
|
|
45577
45616
|
return () => {
|
|
45578
45617
|
cancelled = true;
|
|
45579
45618
|
};
|
|
@@ -45632,7 +45671,7 @@ function useCourseRegistrationWizard(props2) {
|
|
|
45632
45671
|
await new Promise((r2) => setTimeout(r2, 1500));
|
|
45633
45672
|
}
|
|
45634
45673
|
}
|
|
45635
|
-
verifyAfterCheckout();
|
|
45674
|
+
void verifyAfterCheckout();
|
|
45636
45675
|
return () => {
|
|
45637
45676
|
cancelled = true;
|
|
45638
45677
|
};
|
|
@@ -45901,7 +45940,7 @@ function useCourseRegistrationWizard(props2) {
|
|
|
45901
45940
|
if (!cancelled) setDiscountsAvailableLoading(false);
|
|
45902
45941
|
}
|
|
45903
45942
|
}
|
|
45904
|
-
checkDiscountAvailability();
|
|
45943
|
+
void checkDiscountAvailability();
|
|
45905
45944
|
return () => {
|
|
45906
45945
|
cancelled = true;
|
|
45907
45946
|
};
|
|
@@ -46164,7 +46203,7 @@ function CourseRegistrationWizard(props2) {
|
|
|
46164
46203
|
className: "cr-form",
|
|
46165
46204
|
onSubmit: (e) => {
|
|
46166
46205
|
e.preventDefault();
|
|
46167
|
-
handleSubmit();
|
|
46206
|
+
void handleSubmit();
|
|
46168
46207
|
},
|
|
46169
46208
|
children: [
|
|
46170
46209
|
/* @__PURE__ */ jsx94(
|
|
@@ -47425,7 +47464,7 @@ function useCartDiscountUiState(api, plan) {
|
|
|
47425
47464
|
}
|
|
47426
47465
|
}
|
|
47427
47466
|
}
|
|
47428
|
-
loadCartDiscountAvailability();
|
|
47467
|
+
void loadCartDiscountAvailability();
|
|
47429
47468
|
return () => {
|
|
47430
47469
|
cancelled = true;
|
|
47431
47470
|
};
|
|
@@ -48378,10 +48417,10 @@ function PassesMembershipsController({ render }) {
|
|
|
48378
48417
|
});
|
|
48379
48418
|
const handleFormSubmit = useCallback14((event) => {
|
|
48380
48419
|
event.preventDefault();
|
|
48381
|
-
submitCheckout(false);
|
|
48420
|
+
void submitCheckout(false);
|
|
48382
48421
|
}, [submitCheckout]);
|
|
48383
48422
|
const handleConfirmDuplicate = useCallback14(() => {
|
|
48384
|
-
submitCheckout(true);
|
|
48423
|
+
void submitCheckout(true);
|
|
48385
48424
|
}, [submitCheckout]);
|
|
48386
48425
|
return /* @__PURE__ */ jsxs66(Fragment23, { children: [
|
|
48387
48426
|
/* @__PURE__ */ jsx108("div", { ref: shopRootRef, children: /* @__PURE__ */ jsx108(
|
|
@@ -49707,7 +49746,7 @@ function normalizeStoredObjectChildren(children, value, ctx) {
|
|
|
49707
49746
|
return normalized;
|
|
49708
49747
|
}
|
|
49709
49748
|
function normalizeStoredRepeaterItems(plan, value, ctx) {
|
|
49710
|
-
if (!
|
|
49749
|
+
if (!isUnknownArray2(value)) {
|
|
49711
49750
|
return value;
|
|
49712
49751
|
}
|
|
49713
49752
|
return value.map((item) => {
|
|
@@ -49754,7 +49793,7 @@ function normalizeObjectChildren(children, value, ctx) {
|
|
|
49754
49793
|
return normalized;
|
|
49755
49794
|
}
|
|
49756
49795
|
function normalizeRepeaterItems(plan, value, ctx) {
|
|
49757
|
-
if (!
|
|
49796
|
+
if (!isUnknownArray2(value)) return value;
|
|
49758
49797
|
return value.map((item) => {
|
|
49759
49798
|
if (!item || typeof item !== "object" || Array.isArray(item)) return item;
|
|
49760
49799
|
const itemRecord = item;
|
|
@@ -50141,6 +50180,9 @@ function isEmptyValue(value) {
|
|
|
50141
50180
|
function isPlainObject(value) {
|
|
50142
50181
|
return Boolean(value && typeof value === "object" && !Array.isArray(value));
|
|
50143
50182
|
}
|
|
50183
|
+
function isUnknownArray2(value) {
|
|
50184
|
+
return Array.isArray(value);
|
|
50185
|
+
}
|
|
50144
50186
|
function isValidRichTextDoc(value) {
|
|
50145
50187
|
const doc = richTextDoc(value);
|
|
50146
50188
|
return Boolean(isPlainObject(doc) && doc.type === "doc");
|
|
@@ -51573,16 +51615,20 @@ var marqueeLoopTransform = {
|
|
|
51573
51615
|
summary: "Repeat an array to a minimum length, then duplicate it for seamless marquee looping",
|
|
51574
51616
|
schema: marqueeLoopOptionsSchema,
|
|
51575
51617
|
run: (value, options) => {
|
|
51576
|
-
|
|
51618
|
+
const items = toUnknownArray(value);
|
|
51619
|
+
if (items.length === 0) return [];
|
|
51577
51620
|
const minItems = options?.minItems ?? 10;
|
|
51578
51621
|
const base = [];
|
|
51579
51622
|
while (base.length < minItems) {
|
|
51580
|
-
base.push(...
|
|
51623
|
+
base.push(...items);
|
|
51581
51624
|
if (base.length > 1e3) break;
|
|
51582
51625
|
}
|
|
51583
51626
|
return [...base, ...base];
|
|
51584
51627
|
}
|
|
51585
51628
|
};
|
|
51629
|
+
function toUnknownArray(value) {
|
|
51630
|
+
return Array.isArray(value) ? value : [];
|
|
51631
|
+
}
|
|
51586
51632
|
var formattingTransforms = [
|
|
51587
51633
|
uppercaseTransform,
|
|
51588
51634
|
fallbackTransform,
|
|
@@ -63924,14 +63970,23 @@ function injectMediaSlotPath(props2, node, parsedBinding, context) {
|
|
|
63924
63970
|
}
|
|
63925
63971
|
function resolveChildren(nodes, context) {
|
|
63926
63972
|
if (!nodes?.length) return [];
|
|
63927
|
-
|
|
63973
|
+
const children = [];
|
|
63974
|
+
nodes.forEach((child, index) => {
|
|
63928
63975
|
const childContext = { ...context, scopes: [...context.scopes] };
|
|
63929
63976
|
const resolved = resolveNode2(child, childContext, index);
|
|
63930
63977
|
if (Array.isArray(resolved)) {
|
|
63931
|
-
|
|
63978
|
+
for (const item of resolved) {
|
|
63979
|
+
const childNode = item;
|
|
63980
|
+
if (isReactNode(childNode)) children.push(childNode);
|
|
63981
|
+
}
|
|
63982
|
+
return;
|
|
63932
63983
|
}
|
|
63933
|
-
|
|
63984
|
+
if (isReactNode(resolved)) children.push(resolved);
|
|
63934
63985
|
});
|
|
63986
|
+
return children;
|
|
63987
|
+
}
|
|
63988
|
+
function isReactNode(value) {
|
|
63989
|
+
return value !== null && value !== void 0;
|
|
63935
63990
|
}
|
|
63936
63991
|
function resolveNode2(node, context, indexFallback) {
|
|
63937
63992
|
if (!shouldRenderNode(node, context)) {
|
|
@@ -64145,8 +64200,11 @@ var BLOCK_PREFIX = "block.";
|
|
|
64145
64200
|
function isPlainObject4(value) {
|
|
64146
64201
|
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
64147
64202
|
}
|
|
64203
|
+
function isUnknownArray3(value) {
|
|
64204
|
+
return Array.isArray(value);
|
|
64205
|
+
}
|
|
64148
64206
|
function cloneValue(value) {
|
|
64149
|
-
if (
|
|
64207
|
+
if (isUnknownArray3(value)) {
|
|
64150
64208
|
return value.map((item) => cloneValue(item));
|
|
64151
64209
|
}
|
|
64152
64210
|
if (isPlainObject4(value)) {
|
|
@@ -80560,11 +80618,11 @@ function normalizeContent(block) {
|
|
|
80560
80618
|
}
|
|
80561
80619
|
function normalizeParams(input) {
|
|
80562
80620
|
if (!input || typeof input !== "object") return {};
|
|
80563
|
-
const
|
|
80564
|
-
|
|
80565
|
-
coerceToString(value)
|
|
80566
|
-
|
|
80567
|
-
return
|
|
80621
|
+
const output = {};
|
|
80622
|
+
for (const [key, value] of Object.entries(input)) {
|
|
80623
|
+
output[key] = coerceToString(value);
|
|
80624
|
+
}
|
|
80625
|
+
return output;
|
|
80568
80626
|
}
|
|
80569
80627
|
function isNonArrayObject(value) {
|
|
80570
80628
|
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
@@ -82506,7 +82564,16 @@ var ENDPOINT_DEFINITIONS = {
|
|
|
82506
82564
|
revalidate: 60,
|
|
82507
82565
|
tags: ["site-{siteId}", "content-{siteId}-{type}"],
|
|
82508
82566
|
auth: "user",
|
|
82509
|
-
responseKind: "json"
|
|
82567
|
+
responseKind: "json",
|
|
82568
|
+
errors: ["validation:invalid_input", "resource:not_found", "resource:conflict", "server:internal_error"]
|
|
82569
|
+
},
|
|
82570
|
+
reorderContentEntries: {
|
|
82571
|
+
path: "/sites/{siteId}/content/{type}/order",
|
|
82572
|
+
method: "POST",
|
|
82573
|
+
tags: ["site-{siteId}", "content-{siteId}-{type}"],
|
|
82574
|
+
auth: "user",
|
|
82575
|
+
responseKind: "json",
|
|
82576
|
+
errors: ["validation:invalid_input", "resource:not_found", "resource:conflict", "server:internal_error"]
|
|
82510
82577
|
},
|
|
82511
82578
|
getContentTemplate: {
|
|
82512
82579
|
path: "/sites/{siteId}/content/types/{type}/template",
|
|
@@ -87128,10 +87195,16 @@ var dashboardConfigSchema = z70.object({
|
|
|
87128
87195
|
var fieldDefinitionInputSchema = unsafeRetypeZodSchema(fieldSchema);
|
|
87129
87196
|
var nodeDefinitionSchema = unsafeRetypeZodSchema(NodeSchema);
|
|
87130
87197
|
var sdkLoaderEndpointSchema = z70.enum(SUPPORTED_LOADER_ENDPOINTS);
|
|
87198
|
+
var loaderFallbackScalarSchema = z70.union([
|
|
87199
|
+
z70.string(),
|
|
87200
|
+
z70.number(),
|
|
87201
|
+
z70.boolean(),
|
|
87202
|
+
z70.null()
|
|
87203
|
+
]);
|
|
87131
87204
|
var loaderParamBindingSchema = z70.object({
|
|
87132
87205
|
$bind: z70.object({
|
|
87133
87206
|
from: z70.string().min(1, "Binding path is required"),
|
|
87134
|
-
fallback:
|
|
87207
|
+
fallback: loaderFallbackScalarSchema.optional()
|
|
87135
87208
|
})
|
|
87136
87209
|
});
|
|
87137
87210
|
var loaderParamValueSchema = z70.union([
|
|
@@ -87277,9 +87350,13 @@ var sdkBlockFieldOptionsMapSchema = z70.record(
|
|
|
87277
87350
|
var sdkContentTypeTemplateConfigSchema = z70.object({
|
|
87278
87351
|
blocks: z70.array(z70.unknown())
|
|
87279
87352
|
}).passthrough();
|
|
87353
|
+
var sdkContentTypeOrderingConfigSchema = z70.object({
|
|
87354
|
+
mode: z70.enum(["default", "manual"]).optional()
|
|
87355
|
+
}).optional();
|
|
87280
87356
|
var sdkContentTypeConfigSchema = z70.object({
|
|
87281
87357
|
key: z70.string().min(1),
|
|
87282
87358
|
fields: z70.array(z70.unknown()),
|
|
87359
|
+
ordering: sdkContentTypeOrderingConfigSchema,
|
|
87283
87360
|
template: sdkContentTypeTemplateConfigSchema.nullable().optional()
|
|
87284
87361
|
}).passthrough();
|
|
87285
87362
|
var sdkContentConfigSchema = z70.object({
|
|
@@ -88279,7 +88356,7 @@ async function prefetchBlockData2(page, context, client, options) {
|
|
|
88279
88356
|
throw new Error("listPublishedEntries requires siteId and type params");
|
|
88280
88357
|
}
|
|
88281
88358
|
const parsedLimit = typeof limit === "string" ? Number.parseInt(limit, 10) : typeof limit === "number" ? limit : void 0;
|
|
88282
|
-
const order = orderBy === "
|
|
88359
|
+
const order = orderBy === "order" ? "manual" : orderBy === "newest" || orderBy === "oldest" || orderBy === "title" ? orderBy : void 0;
|
|
88283
88360
|
const parsedEntryIds = mode === "manual" ? parseManualEntryIds(entryIds) : void 0;
|
|
88284
88361
|
if (mode === "manual" && (!parsedEntryIds || parsedEntryIds.length === 0)) {
|
|
88285
88362
|
return { entries: [] };
|
|
@@ -89007,6 +89084,9 @@ function isContentLoadNotFoundError(error) {
|
|
|
89007
89084
|
}
|
|
89008
89085
|
return Reflect.get(error, "status") === 404;
|
|
89009
89086
|
}
|
|
89087
|
+
function getRejectedReason(result) {
|
|
89088
|
+
return result.reason;
|
|
89089
|
+
}
|
|
89010
89090
|
async function loadContent(params) {
|
|
89011
89091
|
const { client, siteId, path, preview = false, forceSite } = params;
|
|
89012
89092
|
const [siteResult, contentResult] = await Promise.allSettled([
|
|
@@ -89014,7 +89094,7 @@ async function loadContent(params) {
|
|
|
89014
89094
|
client.getPage({ siteId, path, preview })
|
|
89015
89095
|
]);
|
|
89016
89096
|
if (siteResult.status === "rejected" || contentResult.status === "rejected") {
|
|
89017
|
-
const failures = [siteResult, contentResult].filter((result) => result.status === "rejected").map(
|
|
89097
|
+
const failures = [siteResult, contentResult].filter((result) => result.status === "rejected").map(getRejectedReason);
|
|
89018
89098
|
const upstreamFailure = failures.find((error) => !isContentLoadNotFoundError(error));
|
|
89019
89099
|
throw upstreamFailure ?? failures[0];
|
|
89020
89100
|
}
|