@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
package/dist/client/bookings.mjs
CHANGED
|
@@ -5015,12 +5015,12 @@ var personalitiesById = new Map(
|
|
|
5015
5015
|
);
|
|
5016
5016
|
|
|
5017
5017
|
// ../core/src/branded.ts
|
|
5018
|
-
var
|
|
5019
|
-
var
|
|
5020
|
-
var
|
|
5021
|
-
var
|
|
5022
|
-
var
|
|
5023
|
-
var
|
|
5018
|
+
var unsafeAsSiteId = (id) => id;
|
|
5019
|
+
var unsafeAsFormId = (id) => id;
|
|
5020
|
+
var unsafeAsPassId = (id) => id;
|
|
5021
|
+
var unsafeAsCustomerPassId = (id) => id;
|
|
5022
|
+
var unsafeAsAppointmentServiceId = (id) => id;
|
|
5023
|
+
var unsafeAsAppointmentResourceId = (id) => id;
|
|
5024
5024
|
|
|
5025
5025
|
// ../core/src/date-math.ts
|
|
5026
5026
|
function addDaysToDate(date, dayCount) {
|
|
@@ -5389,6 +5389,8 @@ var accordionIconMotionValues = [
|
|
|
5389
5389
|
import { jsx as jsx2, jsxs } from "react/jsx-runtime";
|
|
5390
5390
|
function resolveColorStyle(color) {
|
|
5391
5391
|
switch (color) {
|
|
5392
|
+
case void 0:
|
|
5393
|
+
return void 0;
|
|
5392
5394
|
case "inherit":
|
|
5393
5395
|
return { color: "inherit" };
|
|
5394
5396
|
case "foreground":
|
|
@@ -9911,7 +9913,7 @@ function useAvailableDates({
|
|
|
9911
9913
|
const endDate = formatLocalScheduleDate(
|
|
9912
9914
|
addLocalScheduleDays(parseBookingLocalDate(today), initialDays)
|
|
9913
9915
|
);
|
|
9914
|
-
fetchDates(today, endDate, false);
|
|
9916
|
+
void fetchDates(today, endDate, false);
|
|
9915
9917
|
}, [serviceId, fetchDates, initialDays]);
|
|
9916
9918
|
useVisibleTabPolling({
|
|
9917
9919
|
enabled: Boolean(serviceId && loadedRange),
|
|
@@ -9931,7 +9933,7 @@ function useAvailableDates({
|
|
|
9931
9933
|
BOOKING_FETCH_CHUNK_DAYS
|
|
9932
9934
|
)
|
|
9933
9935
|
);
|
|
9934
|
-
fetchDates(start, end, true);
|
|
9936
|
+
void fetchDates(start, end, true);
|
|
9935
9937
|
}, [fetchDates, isLoading]);
|
|
9936
9938
|
return {
|
|
9937
9939
|
availableDates,
|
|
@@ -9994,7 +9996,7 @@ function useAvailableSlots({
|
|
|
9994
9996
|
setSlots(
|
|
9995
9997
|
result.slots.map((slot) => ({
|
|
9996
9998
|
...slot,
|
|
9997
|
-
resourceId:
|
|
9999
|
+
resourceId: unsafeAsAppointmentResourceId(slot.resourceId)
|
|
9998
10000
|
}))
|
|
9999
10001
|
);
|
|
10000
10002
|
setHasLoaded(true);
|
|
@@ -10167,7 +10169,7 @@ function useDiscountCodeUi(options) {
|
|
|
10167
10169
|
if (!cancelled) setDiscountsAvailableLoading(false);
|
|
10168
10170
|
}
|
|
10169
10171
|
}
|
|
10170
|
-
checkDiscountAvailability();
|
|
10172
|
+
void checkDiscountAvailability();
|
|
10171
10173
|
return () => {
|
|
10172
10174
|
cancelled = true;
|
|
10173
10175
|
};
|
|
@@ -10443,7 +10445,7 @@ function formatScheduleDate(isoString, locale) {
|
|
|
10443
10445
|
}
|
|
10444
10446
|
|
|
10445
10447
|
// ../blocks/src/system/runtime/nodes/booking-form.headless.state.ts
|
|
10446
|
-
var
|
|
10448
|
+
var unsafeAsBookingFieldId = (id) => id;
|
|
10447
10449
|
function createEmptyBookingValidationErrors() {
|
|
10448
10450
|
return { formError: null, fieldErrors: {} };
|
|
10449
10451
|
}
|
|
@@ -10513,16 +10515,16 @@ function toOptionalBrandedId(value, brand) {
|
|
|
10513
10515
|
return trimmed ? brand(trimmed) : void 0;
|
|
10514
10516
|
}
|
|
10515
10517
|
function toOptionalFormId(value) {
|
|
10516
|
-
return toOptionalBrandedId(value,
|
|
10518
|
+
return toOptionalBrandedId(value, unsafeAsFormId);
|
|
10517
10519
|
}
|
|
10518
10520
|
function toOptionalAppointmentServiceId(value) {
|
|
10519
|
-
return toOptionalBrandedId(value,
|
|
10521
|
+
return toOptionalBrandedId(value, unsafeAsAppointmentServiceId);
|
|
10520
10522
|
}
|
|
10521
10523
|
function toOptionalAppointmentResourceId(value) {
|
|
10522
|
-
return toOptionalBrandedId(value,
|
|
10524
|
+
return toOptionalBrandedId(value, unsafeAsAppointmentResourceId);
|
|
10523
10525
|
}
|
|
10524
10526
|
function toOptionalCustomerPassId(value) {
|
|
10525
|
-
return toOptionalBrandedId(value,
|
|
10527
|
+
return toOptionalBrandedId(value, unsafeAsCustomerPassId);
|
|
10526
10528
|
}
|
|
10527
10529
|
function isBookingFieldValue(value) {
|
|
10528
10530
|
return value === null || typeof value === "string" || typeof value === "number" || typeof value === "boolean" || Array.isArray(value) && value.every((item) => typeof item === "string");
|
|
@@ -10676,7 +10678,7 @@ function toBookingSlotView(slot) {
|
|
|
10676
10678
|
key: `${slot.startAt}|${slot.endAt}|${slot.resourceId}`,
|
|
10677
10679
|
startAt: slot.startAt,
|
|
10678
10680
|
endAt: slot.endAt,
|
|
10679
|
-
resourceId:
|
|
10681
|
+
resourceId: unsafeAsAppointmentResourceId(slot.resourceId),
|
|
10680
10682
|
...slot.resourceName ? { resourceName: slot.resourceName } : {},
|
|
10681
10683
|
...slot.label ? { label: slot.label } : {}
|
|
10682
10684
|
};
|
|
@@ -10798,31 +10800,30 @@ function validateBookingField(field, value) {
|
|
|
10798
10800
|
}
|
|
10799
10801
|
if (isBlankFieldValue(value)) return null;
|
|
10800
10802
|
const strValue = typeof value === "string" ? value : String(value);
|
|
10801
|
-
|
|
10802
|
-
|
|
10803
|
-
|
|
10804
|
-
|
|
10805
|
-
|
|
10806
|
-
|
|
10807
|
-
return null;
|
|
10808
|
-
} catch {
|
|
10809
|
-
return "Please enter a valid URL";
|
|
10810
|
-
}
|
|
10811
|
-
case "tel":
|
|
10812
|
-
return /^[+\d\s\-()]+$/.test(strValue) ? null : "Please enter a valid phone number";
|
|
10813
|
-
case "number": {
|
|
10814
|
-
const num = Number(value);
|
|
10815
|
-
if (Number.isNaN(num)) return "Please enter a valid number";
|
|
10816
|
-
if (field.min !== void 0 && num < field.min) {
|
|
10817
|
-
return `Value must be at least ${field.min}`;
|
|
10818
|
-
}
|
|
10819
|
-
if (field.max !== void 0 && num > field.max) {
|
|
10820
|
-
return `Value must be at most ${field.max}`;
|
|
10821
|
-
}
|
|
10803
|
+
if (field.type === "email") {
|
|
10804
|
+
return /^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(strValue) ? null : "Please enter a valid email address";
|
|
10805
|
+
}
|
|
10806
|
+
if (field.type === "url") {
|
|
10807
|
+
try {
|
|
10808
|
+
new URL(strValue);
|
|
10822
10809
|
return null;
|
|
10810
|
+
} catch {
|
|
10811
|
+
return "Please enter a valid URL";
|
|
10823
10812
|
}
|
|
10824
|
-
|
|
10825
|
-
|
|
10813
|
+
}
|
|
10814
|
+
if (field.type === "tel") {
|
|
10815
|
+
return /^[+\d\s\-()]+$/.test(strValue) ? null : "Please enter a valid phone number";
|
|
10816
|
+
}
|
|
10817
|
+
if (field.type === "number") {
|
|
10818
|
+
const num = Number(value);
|
|
10819
|
+
if (Number.isNaN(num)) return "Please enter a valid number";
|
|
10820
|
+
if (field.min !== void 0 && num < field.min) {
|
|
10821
|
+
return `Value must be at least ${field.min}`;
|
|
10822
|
+
}
|
|
10823
|
+
if (field.max !== void 0 && num > field.max) {
|
|
10824
|
+
return `Value must be at most ${field.max}`;
|
|
10825
|
+
}
|
|
10826
|
+
return null;
|
|
10826
10827
|
}
|
|
10827
10828
|
if (typeof value === "string") {
|
|
10828
10829
|
if (field.minLength && value.length < field.minLength) {
|
|
@@ -10922,7 +10923,7 @@ function buildBookingAvailabilityQuery(input) {
|
|
|
10922
10923
|
}
|
|
10923
10924
|
function deriveBookingFieldViews(input) {
|
|
10924
10925
|
return (input.form?.schema?.fields ?? []).map((field) => {
|
|
10925
|
-
const fieldId =
|
|
10926
|
+
const fieldId = unsafeAsBookingFieldId(field.id);
|
|
10926
10927
|
const inputId = `${input.idPrefix}-${fieldId}`;
|
|
10927
10928
|
const helpTextId = field.helpText ? `${inputId}-help` : null;
|
|
10928
10929
|
const fieldValue = input.values[field.id] ?? null;
|
|
@@ -11045,7 +11046,7 @@ function getAppointmentBookingOverrideInput(props) {
|
|
|
11045
11046
|
return {
|
|
11046
11047
|
ok: true,
|
|
11047
11048
|
value: {
|
|
11048
|
-
siteId:
|
|
11049
|
+
siteId: unsafeAsSiteId(props.siteId),
|
|
11049
11050
|
apiBaseUrl: props.apiBaseUrl,
|
|
11050
11051
|
portalToken: props.portalToken ?? null,
|
|
11051
11052
|
formId,
|
|
@@ -11147,8 +11148,8 @@ function resolveAppointmentPackagesModel(input) {
|
|
|
11147
11148
|
function toHeadlessEligibleAppointmentPackage(appointmentPackage) {
|
|
11148
11149
|
return {
|
|
11149
11150
|
...appointmentPackage,
|
|
11150
|
-
customerPassId:
|
|
11151
|
-
passId:
|
|
11151
|
+
customerPassId: unsafeAsCustomerPassId(appointmentPackage.customerPassId),
|
|
11152
|
+
passId: unsafeAsPassId(appointmentPackage.passId)
|
|
11152
11153
|
};
|
|
11153
11154
|
}
|
|
11154
11155
|
function resolveHeadlessBookingStatus(input) {
|
|
@@ -11231,7 +11232,7 @@ function HeadlessBookingProvider({
|
|
|
11231
11232
|
}
|
|
11232
11233
|
function useHeadlessBookingFlow(options) {
|
|
11233
11234
|
const viewerTimeZone = options.viewerTimeZone ?? getRuntimeTimeZone();
|
|
11234
|
-
const formKey =
|
|
11235
|
+
const formKey = unsafeAsFormId(options.formId);
|
|
11235
11236
|
const defaultServiceId = toOptionalAppointmentServiceId(
|
|
11236
11237
|
options.initialServiceId ?? resolveDefaultBookingServiceId(options.form, options.services) ?? void 0
|
|
11237
11238
|
);
|
|
@@ -11397,7 +11398,7 @@ function useHeadlessBookingFlow(options) {
|
|
|
11397
11398
|
setResourcesState({
|
|
11398
11399
|
tag: "loaded",
|
|
11399
11400
|
value: (result.options ?? []).map((option) => ({
|
|
11400
|
-
id:
|
|
11401
|
+
id: unsafeAsAppointmentResourceId(option.id),
|
|
11401
11402
|
label: option.label
|
|
11402
11403
|
}))
|
|
11403
11404
|
});
|
|
@@ -11613,11 +11614,11 @@ function useHeadlessBookingFlow(options) {
|
|
|
11613
11614
|
() => ({
|
|
11614
11615
|
selectService: (serviceId) => dispatch({
|
|
11615
11616
|
type: "service-selected",
|
|
11616
|
-
serviceId:
|
|
11617
|
+
serviceId: unsafeAsAppointmentServiceId(serviceId)
|
|
11617
11618
|
}),
|
|
11618
11619
|
selectResource: (resourceId) => dispatch({
|
|
11619
11620
|
type: "resource-selected",
|
|
11620
|
-
resourceId: resourceId ?
|
|
11621
|
+
resourceId: resourceId ? unsafeAsAppointmentResourceId(resourceId) : null
|
|
11621
11622
|
}),
|
|
11622
11623
|
selectDate: (date) => dispatch({ type: "date-selected", date }),
|
|
11623
11624
|
selectSlot: (slot) => dispatch({
|
|
@@ -11626,14 +11627,14 @@ function useHeadlessBookingFlow(options) {
|
|
|
11626
11627
|
}),
|
|
11627
11628
|
updateField: (fieldId, value) => dispatch({
|
|
11628
11629
|
type: "field-updated",
|
|
11629
|
-
fieldId:
|
|
11630
|
+
fieldId: unsafeAsBookingFieldId(fieldId),
|
|
11630
11631
|
value
|
|
11631
11632
|
}),
|
|
11632
|
-
markFieldTouched: (fieldId) => dispatch({ type: "field-touched", fieldId:
|
|
11633
|
+
markFieldTouched: (fieldId) => dispatch({ type: "field-touched", fieldId: unsafeAsBookingFieldId(fieldId) }),
|
|
11633
11634
|
selectPaymentOption: (kind) => dispatch({ type: "payment-option-selected", kind }),
|
|
11634
11635
|
selectAppointmentPackage: (packageId) => dispatch({
|
|
11635
11636
|
type: "appointment-package-selected",
|
|
11636
|
-
packageId: packageId ?
|
|
11637
|
+
packageId: packageId ? unsafeAsCustomerPassId(packageId) : null
|
|
11637
11638
|
}),
|
|
11638
11639
|
setDiscountCode: (code) => {
|
|
11639
11640
|
dispatch({ type: "discount-code-changed", code });
|
|
@@ -11976,7 +11977,7 @@ function usePolling(config) {
|
|
|
11976
11977
|
timeoutRef.current = setTimeout(doPoll, pollInterval);
|
|
11977
11978
|
}
|
|
11978
11979
|
};
|
|
11979
|
-
doPoll();
|
|
11980
|
+
void doPoll();
|
|
11980
11981
|
}, [poll]);
|
|
11981
11982
|
useEffect7(() => {
|
|
11982
11983
|
if (!config) {
|
|
@@ -12825,7 +12826,7 @@ function DefaultFieldInput({
|
|
|
12825
12826
|
] }, option.value)) });
|
|
12826
12827
|
case "checkbox":
|
|
12827
12828
|
if (field.field.options && field.field.options.length > 1) {
|
|
12828
|
-
const checkedValues =
|
|
12829
|
+
const checkedValues = toStringArray(value);
|
|
12829
12830
|
return /* @__PURE__ */ jsx10("div", { className: "rb-space-y-2", children: field.field.options.map((option) => /* @__PURE__ */ jsxs7("label", { className: "rb-flex rb-items-center rb-gap-2 rb-cursor-pointer", children: [
|
|
12830
12831
|
/* @__PURE__ */ jsx10(
|
|
12831
12832
|
"input",
|
|
@@ -12920,7 +12921,10 @@ function DefaultFieldInput({
|
|
|
12920
12921
|
className: "form-input"
|
|
12921
12922
|
}
|
|
12922
12923
|
);
|
|
12923
|
-
|
|
12924
|
+
case "text":
|
|
12925
|
+
case "email":
|
|
12926
|
+
case "tel":
|
|
12927
|
+
case "url":
|
|
12924
12928
|
return /* @__PURE__ */ jsx10(
|
|
12925
12929
|
"input",
|
|
12926
12930
|
{
|
|
@@ -12937,6 +12941,9 @@ function DefaultFieldInput({
|
|
|
12937
12941
|
);
|
|
12938
12942
|
}
|
|
12939
12943
|
}
|
|
12944
|
+
function toStringArray(value) {
|
|
12945
|
+
return Array.isArray(value) ? value.filter((item) => typeof item === "string") : [];
|
|
12946
|
+
}
|
|
12940
12947
|
function DefaultBookingDiscount({
|
|
12941
12948
|
booking
|
|
12942
12949
|
}) {
|
|
@@ -13028,7 +13035,7 @@ function collapseHeadlessSlotsForDisplay(input) {
|
|
|
13028
13035
|
visibleSlots.push({
|
|
13029
13036
|
startAt: slot.startAt,
|
|
13030
13037
|
endAt: slot.endAt,
|
|
13031
|
-
resourceId:
|
|
13038
|
+
resourceId: unsafeAsAppointmentResourceId(slot.resourceId)
|
|
13032
13039
|
});
|
|
13033
13040
|
}
|
|
13034
13041
|
return visibleSlots;
|
|
@@ -13950,7 +13957,7 @@ function useBookingFormConfig(siteId, formId) {
|
|
|
13950
13957
|
}
|
|
13951
13958
|
}
|
|
13952
13959
|
}
|
|
13953
|
-
loadFormAndServices();
|
|
13960
|
+
void loadFormAndServices();
|
|
13954
13961
|
return () => {
|
|
13955
13962
|
mounted = false;
|
|
13956
13963
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { normalizeCarouselProps, CarouselNodeClient } from './chunk-
|
|
1
|
+
import { normalizeCarouselProps, CarouselNodeClient } from './chunk-75OUS5MT.mjs';
|
|
2
2
|
import { mountReactIsland } from './chunk-N7PBWBWQ.mjs';
|
|
3
|
-
import { defineIslandPropsDecoder } from './chunk-
|
|
4
|
-
import './chunk-
|
|
3
|
+
import { defineIslandPropsDecoder } from './chunk-JGXPTEI2.mjs';
|
|
4
|
+
import './chunk-AUJ5DBZJ.mjs';
|
|
5
5
|
import { jsx } from 'react/jsx-runtime';
|
|
6
6
|
|
|
7
7
|
var decode = defineIslandPropsDecoder("carousel");
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import { mountShopBlockIsland, CartClient } from './chunk-
|
|
2
|
-
import './chunk-
|
|
3
|
-
import './chunk-
|
|
1
|
+
import { mountShopBlockIsland, CartClient } from './chunk-FUXW6VW2.mjs';
|
|
2
|
+
import './chunk-CWGTG37I.mjs';
|
|
3
|
+
import './chunk-75OUS5MT.mjs';
|
|
4
4
|
import './chunk-I2MMZO53.mjs';
|
|
5
|
-
import './chunk-
|
|
6
|
-
import './chunk-
|
|
5
|
+
import './chunk-ZFHRN6W2.mjs';
|
|
6
|
+
import './chunk-UVQEJJTN.mjs';
|
|
7
7
|
import './chunk-3DCJ45Z2.mjs';
|
|
8
8
|
import './chunk-3PEDD5KJ.mjs';
|
|
9
9
|
import './chunk-UDNSI5PY.mjs';
|
|
10
10
|
import './chunk-N7PBWBWQ.mjs';
|
|
11
|
-
import { defineIslandPropsDecoder } from './chunk-
|
|
12
|
-
import './chunk-
|
|
11
|
+
import { defineIslandPropsDecoder } from './chunk-JGXPTEI2.mjs';
|
|
12
|
+
import './chunk-AUJ5DBZJ.mjs';
|
|
13
13
|
|
|
14
14
|
// src/rendering/islands/enhancers/cart.tsx
|
|
15
15
|
var decode = defineIslandPropsDecoder("cart");
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import { mountShopBlockIsland, CheckoutClient } from './chunk-
|
|
2
|
-
import './chunk-
|
|
3
|
-
import './chunk-
|
|
1
|
+
import { mountShopBlockIsland, CheckoutClient } from './chunk-FUXW6VW2.mjs';
|
|
2
|
+
import './chunk-CWGTG37I.mjs';
|
|
3
|
+
import './chunk-75OUS5MT.mjs';
|
|
4
4
|
import './chunk-I2MMZO53.mjs';
|
|
5
|
-
import './chunk-
|
|
6
|
-
import './chunk-
|
|
5
|
+
import './chunk-ZFHRN6W2.mjs';
|
|
6
|
+
import './chunk-UVQEJJTN.mjs';
|
|
7
7
|
import './chunk-3DCJ45Z2.mjs';
|
|
8
8
|
import './chunk-3PEDD5KJ.mjs';
|
|
9
9
|
import './chunk-UDNSI5PY.mjs';
|
|
10
10
|
import './chunk-N7PBWBWQ.mjs';
|
|
11
|
-
import { defineIslandPropsDecoder } from './chunk-
|
|
12
|
-
import './chunk-
|
|
11
|
+
import { defineIslandPropsDecoder } from './chunk-JGXPTEI2.mjs';
|
|
12
|
+
import './chunk-AUJ5DBZJ.mjs';
|
|
13
13
|
|
|
14
14
|
// src/rendering/islands/enhancers/checkout.tsx
|
|
15
15
|
var decode = defineIslandPropsDecoder("checkout");
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { ChevronLeft, ChevronRight } from './chunk-
|
|
3
|
-
import { clsx_default } from './chunk-
|
|
2
|
+
import { ChevronLeft, ChevronRight } from './chunk-JGXPTEI2.mjs';
|
|
3
|
+
import { clsx_default } from './chunk-AUJ5DBZJ.mjs';
|
|
4
4
|
import React, { useRef, useState, useCallback, useEffect } from 'react';
|
|
5
5
|
import { jsxs, Fragment, jsx } from 'react/jsx-runtime';
|
|
6
6
|
|
|
@@ -5,13 +5,21 @@ function assertNever(value, message = "Unexpected variant") {
|
|
|
5
5
|
throw new Error(`${message}: ${String(value)}`);
|
|
6
6
|
}
|
|
7
7
|
|
|
8
|
+
// ../core/src/result.ts
|
|
9
|
+
function ok(value) {
|
|
10
|
+
return { ok: true, value };
|
|
11
|
+
}
|
|
12
|
+
function err(error) {
|
|
13
|
+
return { ok: false, error };
|
|
14
|
+
}
|
|
15
|
+
|
|
8
16
|
// ../core/src/branded.ts
|
|
9
|
-
var
|
|
10
|
-
var
|
|
11
|
-
var
|
|
12
|
-
var
|
|
13
|
-
var
|
|
14
|
-
var
|
|
17
|
+
var unsafeAsMediaAssetId = (id) => id;
|
|
18
|
+
var unsafeAsFormId = (id) => id;
|
|
19
|
+
var unsafeAsPassId = (id) => id;
|
|
20
|
+
var unsafeAsCustomerPassId = (id) => id;
|
|
21
|
+
var unsafeAsAppointmentServiceId = (id) => id;
|
|
22
|
+
var unsafeAsAppointmentResourceId = (id) => id;
|
|
15
23
|
|
|
16
24
|
// ../core/src/date-math.ts
|
|
17
25
|
function addDaysToDate(date, dayCount) {
|
|
@@ -148,14 +156,6 @@ function assertNever3(value) {
|
|
|
148
156
|
throw new Error(`Unexpected value: ${String(value)}`);
|
|
149
157
|
}
|
|
150
158
|
|
|
151
|
-
// ../core/src/result.ts
|
|
152
|
-
function ok(value) {
|
|
153
|
-
return { ok: true, value };
|
|
154
|
-
}
|
|
155
|
-
function err(error) {
|
|
156
|
-
return { ok: false, error };
|
|
157
|
-
}
|
|
158
|
-
|
|
159
159
|
// ../core/src/booking-date-time.ts
|
|
160
160
|
var DEFAULT_LOCALE = "en-US";
|
|
161
161
|
var FALLBACK_TIMEZONE = "UTC";
|
|
@@ -715,14 +715,14 @@ function rotateNormalizedPoint(point, rotation) {
|
|
|
715
715
|
const x = point.x;
|
|
716
716
|
const y = point.y;
|
|
717
717
|
switch (rotation) {
|
|
718
|
+
case 0:
|
|
719
|
+
return { x, y };
|
|
718
720
|
case 90:
|
|
719
721
|
return { x: 1 - y, y: x };
|
|
720
722
|
case 180:
|
|
721
723
|
return { x: 1 - x, y: 1 - y };
|
|
722
724
|
case 270:
|
|
723
725
|
return { x: y, y: 1 - x };
|
|
724
|
-
default:
|
|
725
|
-
return { x, y };
|
|
726
726
|
}
|
|
727
727
|
}
|
|
728
728
|
|
|
@@ -1379,7 +1379,7 @@ function getProxyImageUrl(value, options, transformAspectRatio, resolved) {
|
|
|
1379
1379
|
if (!shouldUseExplicitRectProxy(value, options, resolvedTransform, sourceWidth, sourceHeight)) return void 0;
|
|
1380
1380
|
const params = buildProxyTransformParams(options, resolvedTransform);
|
|
1381
1381
|
const proxyBasePath = getImageProxyBasePath();
|
|
1382
|
-
const proxyUrl = getImageUrl({ id:
|
|
1382
|
+
const proxyUrl = getImageUrl({ id: unsafeAsMediaAssetId(value.assetId) }, params, proxyBasePath);
|
|
1383
1383
|
debugMediaNodeLog("resolve:proxy-img", { assetId: value.assetId, params, proxyBasePath, proxyUrl });
|
|
1384
1384
|
return proxyUrl;
|
|
1385
1385
|
}
|
|
@@ -1962,4 +1962,4 @@ function scaleCssLengthToken(token, factor) {
|
|
|
1962
1962
|
return `${rounded}${unit}`;
|
|
1963
1963
|
}
|
|
1964
1964
|
|
|
1965
|
-
export { DEFAULT_BOOKING_TIME_ZONE, ImagePresets, MediaPlaceholder, addIntervalPreservingMonthAnchor, addLocalScheduleDays,
|
|
1965
|
+
export { DEFAULT_BOOKING_TIME_ZONE, ImagePresets, MediaPlaceholder, addIntervalPreservingMonthAnchor, addLocalScheduleDays, assertNever, backgroundColorStyle, borderColorStyle, buildResolveImageUrlContext, clampConfiguredAmount, clsx_default, computeMediaTransformStyle, err, formatBookingDate, formatBookingDateParts, formatBookingDateTime, formatBookingInstant, formatBookingTime, formatLocalScheduleDate, getBookingInstalmentDepositRefundability, getBookingInstalmentPlanIntervalCount, getBookingLocalDateKey, getCurrentResolveImageUrlContext, mergeStyles, normalizeLocationAddressText, ok, omitZeroAmountFutureRows, parseAspectRatioValue, parseBookingLocalDate, parseColorTokenParts, renderAudio, renderVideo, resolveBookingTimeZoneId, resolveFlexibleBalanceDueAt, resolveFlexibleBalanceInitialPaymentCents, resolveImageUrlWithContext, resolveMediaNodeResponsiveImage, resolvePlanningDateInput, rgbColorValue, setContextResolveImageUrlContext, splitAmountWithRemainderInFirst, textColorStyle, toBookingTimeZone, toLocationCoordinates, toScheduledBookingDateRange, toScheduledBookingDateTime, unsafeAsAppointmentResourceId, unsafeAsAppointmentServiceId, unsafeAsCustomerPassId, unsafeAsFormId, unsafeAsPassId };
|
|
@@ -1,8 +1,10 @@
|
|
|
1
|
-
import { clsx_default } from './chunk-
|
|
1
|
+
import { clsx_default } from './chunk-AUJ5DBZJ.mjs';
|
|
2
2
|
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
3
3
|
|
|
4
4
|
function resolveColorStyle(color) {
|
|
5
5
|
switch (color) {
|
|
6
|
+
case void 0:
|
|
7
|
+
return void 0;
|
|
6
8
|
case "inherit":
|
|
7
9
|
return { color: "inherit" };
|
|
8
10
|
case "foreground":
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { EMPTY_COMMERCE_CART_STATE, parseStoredCommerceCartState, reduceCommerceCart, buildPassCartItem } from './chunk-
|
|
1
|
+
import { EMPTY_COMMERCE_CART_STATE, parseStoredCommerceCartState, reduceCommerceCart, buildPassCartItem } from './chunk-JGXPTEI2.mjs';
|
|
2
2
|
import * as React from 'react';
|
|
3
3
|
|
|
4
4
|
var EMPTY_STATE = EMPTY_COMMERCE_CART_STATE;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { assertNever11 } from './chunk-
|
|
2
|
+
import { assertNever11 } from './chunk-JGXPTEI2.mjs';
|
|
3
3
|
import { useReducer, useRef, useCallback, useEffect } from 'react';
|
|
4
4
|
|
|
5
5
|
// ../blocks/src/system/runtime/hooks/usePolling.state.ts
|
|
@@ -153,7 +153,7 @@ function usePolling(config) {
|
|
|
153
153
|
timeoutRef.current = setTimeout(doPoll, pollInterval);
|
|
154
154
|
}
|
|
155
155
|
};
|
|
156
|
-
doPoll();
|
|
156
|
+
void doPoll();
|
|
157
157
|
}, [poll]);
|
|
158
158
|
useEffect(() => {
|
|
159
159
|
if (!config) {
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { addPassToCommerceCart, useCommerceCart } from './chunk-
|
|
3
|
-
import { CarouselNodeClient } from './chunk-
|
|
2
|
+
import { addPassToCommerceCart, useCommerceCart } from './chunk-CWGTG37I.mjs';
|
|
3
|
+
import { CarouselNodeClient } from './chunk-75OUS5MT.mjs';
|
|
4
4
|
import { isRecord } from './chunk-I2MMZO53.mjs';
|
|
5
|
-
import { useDiscountCodeUi } from './chunk-
|
|
6
|
-
import { createBodyThemePortalRoot, consumeSearchParams, scrollToBlock, TerminalPanel, StateIcon, CheckIcon, CrossIcon, ActionRow, DiscountCodeDisclosure, consumeSearchParam, buildCheckoutReturnUrls } from './chunk-
|
|
5
|
+
import { useDiscountCodeUi } from './chunk-ZFHRN6W2.mjs';
|
|
6
|
+
import { createBodyThemePortalRoot, consumeSearchParams, scrollToBlock, TerminalPanel, StateIcon, CheckIcon, CrossIcon, ActionRow, DiscountCodeDisclosure, consumeSearchParam, buildCheckoutReturnUrls } from './chunk-UVQEJJTN.mjs';
|
|
7
7
|
import { ModalShell, resolveDedicatedCheckoutPath } from './chunk-3PEDD5KJ.mjs';
|
|
8
8
|
import { useBlockApi, FeedbackMessage, BlockApiProvider } from './chunk-UDNSI5PY.mjs';
|
|
9
9
|
import { mountReactIsland } from './chunk-N7PBWBWQ.mjs';
|
|
10
|
-
import { themeButtonClassName, formatCommercePrice, formatInterval, getShopDisplayForItems, deriveCommerceCheckoutState, buildProductDetailDisplay, productItemKey, buildProductCartItem, buildProductCardDisplay, assertNever11, reportWorkflowError, clearWorkflowFeedback } from './chunk-
|
|
11
|
-
import { assertNever, ok, err, getCurrentResolveImageUrlContext, resolveImageUrlWithContext, ImagePresets } from './chunk-
|
|
10
|
+
import { themeButtonClassName, formatCommercePrice, formatInterval, getShopDisplayForItems, deriveCommerceCheckoutState, buildProductDetailDisplay, productItemKey, buildProductCartItem, buildProductCardDisplay, assertNever11, reportWorkflowError, clearWorkflowFeedback } from './chunk-JGXPTEI2.mjs';
|
|
11
|
+
import { assertNever, ok, err, getCurrentResolveImageUrlContext, resolveImageUrlWithContext, ImagePresets } from './chunk-AUJ5DBZJ.mjs';
|
|
12
12
|
import * as React3 from 'react';
|
|
13
13
|
import React3__default, { useState, useRef, useCallback, useEffect } from 'react';
|
|
14
14
|
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
@@ -704,7 +704,7 @@ function useCartDiscountUiState(api, plan) {
|
|
|
704
704
|
}
|
|
705
705
|
}
|
|
706
706
|
}
|
|
707
|
-
loadCartDiscountAvailability();
|
|
707
|
+
void loadCartDiscountAvailability();
|
|
708
708
|
return () => {
|
|
709
709
|
cancelled = true;
|
|
710
710
|
};
|
|
@@ -1549,10 +1549,10 @@ function PassesMembershipsController({ render }) {
|
|
|
1549
1549
|
});
|
|
1550
1550
|
const handleFormSubmit = useCallback((event) => {
|
|
1551
1551
|
event.preventDefault();
|
|
1552
|
-
submitCheckout(false);
|
|
1552
|
+
void submitCheckout(false);
|
|
1553
1553
|
}, [submitCheckout]);
|
|
1554
1554
|
const handleConfirmDuplicate = useCallback(() => {
|
|
1555
|
-
submitCheckout(true);
|
|
1555
|
+
void submitCheckout(true);
|
|
1556
1556
|
}, [submitCheckout]);
|
|
1557
1557
|
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
1558
1558
|
/* @__PURE__ */ jsx("div", { ref: shopRootRef, children: /* @__PURE__ */ jsx(
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { parseAspectRatioValue, parseColorTokenParts, toBookingTimeZone, resolvePlanningDateInput, formatBookingDate, toScheduledBookingDateTime, formatBookingTime, toScheduledBookingDateRange, formatBookingDateParts, ImagePresets, getCurrentResolveImageUrlContext, renderVideo, renderAudio, resolveMediaNodeResponsiveImage, MediaPlaceholder, computeMediaTransformStyle, rgbColorValue } from './chunk-
|
|
1
|
+
import { parseAspectRatioValue, parseColorTokenParts, toBookingTimeZone, resolvePlanningDateInput, formatBookingDate, toScheduledBookingDateTime, formatBookingTime, toScheduledBookingDateRange, formatBookingDateParts, ImagePresets, getCurrentResolveImageUrlContext, renderVideo, renderAudio, resolveMediaNodeResponsiveImage, MediaPlaceholder, computeMediaTransformStyle, rgbColorValue } from './chunk-AUJ5DBZJ.mjs';
|
|
2
2
|
import z2, { z } from 'zod';
|
|
3
3
|
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
4
4
|
import { forwardRef, createElement } from 'react';
|
|
@@ -1899,8 +1899,8 @@ var eventSurfaceScopeValues = [
|
|
|
1899
1899
|
"custom"
|
|
1900
1900
|
];
|
|
1901
1901
|
var eventScheduleScopeValues = ["any", "recurring", "oneOff"];
|
|
1902
|
-
var
|
|
1903
|
-
var
|
|
1902
|
+
var unsafeAsEventCategoryId = (value) => value;
|
|
1903
|
+
var unsafeAsVenueId = (value) => value;
|
|
1904
1904
|
function normalizeEventBlockKind(value) {
|
|
1905
1905
|
return value === "courses" || value === "events" ? value : "all";
|
|
1906
1906
|
}
|
|
@@ -1926,10 +1926,10 @@ function normalizeEventCategoryIds(value) {
|
|
|
1926
1926
|
if (Array.isArray(value)) {
|
|
1927
1927
|
return normalizeIdList(
|
|
1928
1928
|
value.filter((entry) => typeof entry === "string")
|
|
1929
|
-
).map(
|
|
1929
|
+
).map(unsafeAsEventCategoryId);
|
|
1930
1930
|
}
|
|
1931
1931
|
if (typeof value === "string") {
|
|
1932
|
-
return normalizeIdList(value.split(",")).map(
|
|
1932
|
+
return normalizeIdList(value.split(",")).map(unsafeAsEventCategoryId);
|
|
1933
1933
|
}
|
|
1934
1934
|
return [];
|
|
1935
1935
|
}
|
|
@@ -1942,7 +1942,7 @@ function normalizeEventVenueId(value) {
|
|
|
1942
1942
|
return null;
|
|
1943
1943
|
}
|
|
1944
1944
|
const trimmed = value.trim();
|
|
1945
|
-
return trimmed ?
|
|
1945
|
+
return trimmed ? unsafeAsVenueId(trimmed) : null;
|
|
1946
1946
|
}
|
|
1947
1947
|
function normalizeEventStaffMemberId(value) {
|
|
1948
1948
|
if (typeof value !== "string") {
|
|
@@ -2049,6 +2049,8 @@ var uiSchema = z.object({
|
|
|
2049
2049
|
mediaPickerAutoOpen: z.boolean().optional(),
|
|
2050
2050
|
showMediaPreview: z.boolean().optional(),
|
|
2051
2051
|
showMediaOverlayActions: z.boolean().optional(),
|
|
2052
|
+
mediaPreviewMaxWidth: z.enum(["xs", "sm", "md", "none"]).optional(),
|
|
2053
|
+
preventMediaPreviewUpscale: z.boolean().optional(),
|
|
2052
2054
|
mediaDelivery: mediaDeliverySchema.optional(),
|
|
2053
2055
|
mediaDeliveryByVariant: z.record(z.string(), mediaDeliverySchema).optional(),
|
|
2054
2056
|
// Optional input hints for validators/widgets
|
|
@@ -2298,6 +2300,9 @@ var repeaterFieldSchema = baseFieldSchema.extend({
|
|
|
2298
2300
|
type: z.literal("repeater"),
|
|
2299
2301
|
itemLabel: z.string().default("Item"),
|
|
2300
2302
|
itemLabelSource: z.string().optional(),
|
|
2303
|
+
showSummary: z.boolean().optional(),
|
|
2304
|
+
summaryFields: z.string().array().optional(),
|
|
2305
|
+
summaryMaxChars: z.number().int().positive().optional(),
|
|
2301
2306
|
minItems: z.number().int().min(0).default(0),
|
|
2302
2307
|
maxItems: z.number().int().positive().optional(),
|
|
2303
2308
|
// Monomorphic mode
|
|
@@ -2643,47 +2648,48 @@ function scopeFragmentLayout(fragment, scope) {
|
|
|
2643
2648
|
function prefixFieldId(field, scope) {
|
|
2644
2649
|
const cloned = cloneFieldDefinition(field);
|
|
2645
2650
|
cloned.id = `${scope}.${field.id}`;
|
|
2646
|
-
|
|
2651
|
+
const defaultValue = cloned.defaultValue;
|
|
2652
|
+
cloned.defaultValue = cloneUnknown(defaultValue);
|
|
2647
2653
|
cloned.visibleRoles = cloned.visibleRoles ? [...cloned.visibleRoles] : void 0;
|
|
2648
2654
|
cloned.ui = cloneUnknown(cloned.ui);
|
|
2649
2655
|
return cloned;
|
|
2650
2656
|
}
|
|
2651
2657
|
function cloneFieldDefinition(field) {
|
|
2652
|
-
|
|
2653
|
-
|
|
2654
|
-
|
|
2655
|
-
|
|
2656
|
-
|
|
2657
|
-
|
|
2658
|
-
|
|
2659
|
-
|
|
2660
|
-
|
|
2661
|
-
|
|
2662
|
-
|
|
2663
|
-
|
|
2664
|
-
|
|
2665
|
-
|
|
2666
|
-
|
|
2667
|
-
|
|
2668
|
-
|
|
2669
|
-
return {
|
|
2670
|
-
...field,
|
|
2671
|
-
schema: {
|
|
2672
|
-
fields: field.schema.fields.map(cloneFieldDefinition)
|
|
2673
|
-
}
|
|
2674
|
-
};
|
|
2675
|
-
}
|
|
2676
|
-
return { ...field };
|
|
2677
|
-
case "group":
|
|
2658
|
+
if (field.type === "repeater") {
|
|
2659
|
+
if (field.polymorphic && field.itemTypes) {
|
|
2660
|
+
return {
|
|
2661
|
+
...field,
|
|
2662
|
+
polymorphic: true,
|
|
2663
|
+
itemTypes: Object.fromEntries(
|
|
2664
|
+
Object.entries(field.itemTypes).map(([key, itemType]) => [
|
|
2665
|
+
key,
|
|
2666
|
+
{
|
|
2667
|
+
...itemType,
|
|
2668
|
+
fields: itemType.fields.map(cloneFieldDefinition)
|
|
2669
|
+
}
|
|
2670
|
+
])
|
|
2671
|
+
)
|
|
2672
|
+
};
|
|
2673
|
+
}
|
|
2674
|
+
if (field.schema) {
|
|
2678
2675
|
return {
|
|
2679
2676
|
...field,
|
|
2680
2677
|
schema: {
|
|
2681
2678
|
fields: field.schema.fields.map(cloneFieldDefinition)
|
|
2682
2679
|
}
|
|
2683
2680
|
};
|
|
2684
|
-
|
|
2685
|
-
|
|
2681
|
+
}
|
|
2682
|
+
return { ...field };
|
|
2683
|
+
}
|
|
2684
|
+
if (field.type === "group") {
|
|
2685
|
+
return {
|
|
2686
|
+
...field,
|
|
2687
|
+
schema: {
|
|
2688
|
+
fields: field.schema.fields.map(cloneFieldDefinition)
|
|
2689
|
+
}
|
|
2690
|
+
};
|
|
2686
2691
|
}
|
|
2692
|
+
return { ...field };
|
|
2687
2693
|
}
|
|
2688
2694
|
function cloneUnknown(value) {
|
|
2689
2695
|
if (value == null || typeof value !== "object") {
|
|
@@ -3466,7 +3472,8 @@ function createBlockManifest(config) {
|
|
|
3466
3472
|
return augmentManifest(manifest);
|
|
3467
3473
|
}
|
|
3468
3474
|
function normalizeBlockLayout(layout) {
|
|
3469
|
-
|
|
3475
|
+
const rawLayout = layout;
|
|
3476
|
+
return Array.isArray(rawLayout) ? rawLayout : rawLayout;
|
|
3470
3477
|
}
|
|
3471
3478
|
function deriveComponentName(id) {
|
|
3472
3479
|
const base = id.replace(/^block\./, "");
|