@riverbankcms/sdk 0.89.1 → 0.90.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +27 -4
- package/dist/{PreviewEditorSidebar-JDR64FEC.mjs → PreviewEditorSidebar-KVXNF3VW.mjs} +3 -3
- package/dist/{PreviewEditorUI-67TMJMAF.mjs → PreviewEditorUI-J3JN5Z7T.mjs} +3 -3
- package/dist/SdkPreviewModeRuntime-UBL6MSNP.mjs +8 -0
- package/dist/_dts/ai/src/contracts/proposals.d.ts +216 -0
- package/dist/_dts/altcha/src/AltchaWidget.d.ts +1 -1
- package/dist/_dts/api/src/bookingOperations.d.ts +2 -0
- package/dist/_dts/api/src/bookingRecords.d.ts +4 -2
- package/dist/_dts/api/src/bookings.d.ts +3 -1
- package/dist/_dts/api/src/index.d.ts +6 -5
- package/dist/_dts/api/src/publicExperienceEndpoints.d.ts +15 -5
- package/dist/_dts/api/src/request.d.ts +21 -0
- package/dist/_dts/api/src/sdk-event-upsert.d.ts +3 -1
- package/dist/_dts/api/src/sdkContracts.d.ts +2 -0
- package/dist/_dts/api/src/types.d.ts +3 -1
- package/dist/_dts/api/src/url.d.ts +6 -3
- package/dist/_dts/block-form/src/utils/visibleWhen.d.ts +1 -0
- package/dist/_dts/block-form/src/widgets/RepeaterField/components/RepeaterThumbnailCard.d.ts +5 -1
- package/dist/_dts/block-form/src/widgets/RepeaterField/components/RepeaterThumbnailGrid.d.ts +9 -1
- package/dist/_dts/block-form/src/widgets/RepeaterField/components/index.d.ts +1 -0
- package/dist/_dts/blocks/src/contracts/non-block-islands.d.ts +7 -11
- package/dist/_dts/blocks/src/contracts/proof-block-islands.d.ts +6 -0
- package/dist/_dts/blocks/src/index.d.ts +2 -1
- package/dist/_dts/blocks/src/system/blocks/events/event-calendar.d.ts +14 -6
- package/dist/_dts/blocks/src/system/blocks/events/shared/types.d.ts +4 -4
- package/dist/_dts/blocks/src/system/blocks/hero.d.ts +0 -2
- package/dist/_dts/blocks/src/system/blocks/shop.d.ts +3 -3
- package/dist/_dts/blocks/src/system/blocks/shop.shared.d.ts +8 -0
- package/dist/_dts/blocks/src/system/constants/events.d.ts +4 -1
- package/dist/_dts/blocks/src/system/manifest/schema.d.ts +3 -1
- package/dist/_dts/blocks/src/system/runtime/api/index.d.ts +1 -0
- package/dist/_dts/blocks/src/system/runtime/api/types.d.ts +17 -5
- package/dist/_dts/blocks/src/system/runtime/components/registry.client.d.ts +51 -6
- package/dist/_dts/blocks/src/system/runtime/components/runtime-backed-blocks.d.ts +24 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/course-registration/useCourseRegistrationWizard.d.ts +2 -2
- package/dist/_dts/blocks/src/system/runtime/nodes/event-details/logic.d.ts +1 -17
- package/dist/_dts/blocks/src/system/runtime/nodes/event-details.client.d.ts +5 -9
- package/dist/_dts/blocks/src/system/runtime/nodes/event-details.server.d.ts +5 -9
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/event-registration.headless.contract.d.ts +2 -1
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/eventPaymentOptions.d.ts +24 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/types.d.ts +5 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/useDiscountCodeUi.d.ts +4 -4
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/useDiscountCodeUi.state.d.ts +50 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/useEventRegistrationWizard.d.ts +2 -2
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration.interactive.d.ts +21 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration.server.d.ts +1 -1
- package/dist/_dts/blocks/src/system/runtime/nodes/events/EventCalendar.interactive.d.ts +11 -1
- package/dist/_dts/blocks/src/system/runtime/nodes/events/EventCombined.client.d.ts +2 -1
- package/dist/_dts/blocks/src/system/runtime/nodes/events/EventCombined.interactive.d.ts +11 -1
- package/dist/_dts/blocks/src/system/runtime/nodes/events/shared/calendarViewOptions.d.ts +10 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/events/shared/eventProductEligibility.d.ts +24 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/shared/contract-schemas.d.ts +5 -2
- package/dist/_dts/blocks/src/system/runtime/nodes/shop-checkout-form.d.ts +2 -2
- package/dist/_dts/content-model/src/entry-slots/index.d.ts +1 -0
- package/dist/_dts/content-model/src/entry-slots/sdkBlocks.d.ts +21 -0
- package/dist/_dts/content-model/src/entry-slots/types.d.ts +7 -0
- package/dist/_dts/core/src/money-input.d.ts +18 -0
- package/dist/_dts/db/src/generated/supabase/database.types.d.ts +50 -0
- package/dist/_dts/media-editor/src/MediaEditor.d.ts +2 -1
- package/dist/_dts/media-editor/src/fieldUi.d.ts +6 -0
- package/dist/_dts/media-editor/src/index.d.ts +1 -1
- package/dist/_dts/preview-next/src/client/index.d.ts +1 -0
- package/dist/_dts/preview-next/src/client/preview/PreviewShell.d.ts +3 -2
- package/dist/_dts/preview-next/src/client/preview/PreviewShellLayout.d.ts +3 -2
- package/dist/_dts/preview-next/src/client/preview/PreviewThemedSiteDocument.d.ts +3 -2
- package/dist/_dts/preview-next/src/client/preview/SiteChromeEditableSurface.d.ts +2 -2
- package/dist/_dts/preview-next/src/client/preview/themeRuntime.d.ts +6 -0
- package/dist/_dts/preview-next/src/client/sdk/SdkPreviewMode.d.ts +2 -1
- package/dist/_dts/sdk/src/cli/commands/pull-dated-offering-scope.d.ts +10 -0
- package/dist/_dts/sdk/src/cli/content/reader.d.ts +12 -5
- package/dist/_dts/sdk/src/client/management/types.d.ts +6 -55
- package/dist/_dts/sdk/src/components.d.ts +1 -0
- package/dist/_dts/sdk/src/config/field-definitions.d.ts +3 -1
- package/dist/_dts/sdk/src/contracts/system-block-content.d.ts +3 -1
- package/dist/_dts/sdk/src/next/types.d.ts +8 -11
- package/dist/_dts/sdk/src/preview-next/client/index.d.ts +1 -1
- package/dist/_dts/sdk/src/rendering/blocks-theme-scope.d.ts +2 -1
- package/dist/_dts/sdk/src/rendering/components/Layout.d.ts +8 -7
- package/dist/_dts/sdk/src/rendering/components/pageShared.d.ts +5 -6
- package/dist/_dts/sdk/src/rendering/index.d.ts +1 -0
- package/dist/_dts/sdk/src/rendering/server.d.ts +1 -0
- package/dist/_dts/sdk/src/rendering/themeRuntime.d.ts +26 -0
- package/dist/_dts/sdk/src/version.d.ts +1 -1
- package/dist/_dts/site-commands/src/commands.d.ts +18 -0
- package/dist/_dts/theme-core/src/ResponsiveScope.d.ts +12 -0
- package/dist/_dts/theme-core/src/accordions/types.d.ts +1 -1
- package/dist/_dts/theme-core/src/buttons/personalities/types.d.ts +2 -2
- package/dist/_dts/theme-core/src/buttons/types.d.ts +5 -5
- package/dist/_dts/theme-core/src/cards/types.d.ts +2 -2
- package/dist/_dts/theme-core/src/index.d.ts +2 -0
- package/dist/_dts/theme-core/src/mock-themes/all.d.ts +21 -21
- package/dist/_dts/theme-core/src/schema.d.ts +18 -18
- package/dist/_dts/theme-core/src/site-styles/designState.d.ts +2 -2
- package/dist/_dts/theme-core/src/site-styles/generatedSchemas.d.ts +2 -2
- package/dist/_dts/theme-core/src/site-styles/logoBranding.d.ts +4 -4
- package/dist/_dts/theme-core/src/themeRuntime.d.ts +11 -0
- package/dist/{chunk-HKJQERFR.mjs → chunk-AEOYWPE4.mjs} +91 -55
- package/dist/{chunk-F645A5UV.mjs → chunk-BOQXMCSP.mjs} +129 -101
- package/dist/{chunk-ZQRBLCW5.mjs → chunk-GSPFFUVB.mjs} +2 -2
- package/dist/{chunk-7YUAXONX.mjs → chunk-PMBB6MQ7.mjs} +1280 -774
- package/dist/{chunk-TGBJWKMP.mjs → chunk-RQ3XZ4SJ.mjs} +9 -1
- package/dist/{chunk-7N46MZHI.mjs → chunk-UG7I7S7W.mjs} +1 -1
- package/dist/cli/index.mjs +899 -531
- package/dist/cli/init-docs/content/cli-reference.md +6 -1
- package/dist/cli/init-docs/content/content-management.md +27 -0
- package/dist/client/{accordion-MUCVNGQ7.mjs → accordion-GXQNWQ6O.mjs} +1 -1
- package/dist/client/{bookingForm-PKD6EFIE.mjs → bookingForm-STLUJ36H.mjs} +25 -270
- package/dist/client/bookings.mjs +432 -269
- package/dist/client/{carousel-3TKQSNJC.mjs → carousel-CVRN6EPP.mjs} +1 -1
- package/dist/client/{cart-6XHSZK23.mjs → cart-IYIBA5CL.mjs} +5 -6
- package/dist/client/{checkout-FVSPM6FI.mjs → checkout-O3BGM4GS.mjs} +5 -6
- package/dist/client/chunk-4RTFGHZN.mjs +433 -0
- package/dist/client/{chunk-UQFY4AHX.mjs → chunk-6DPXDOIL.mjs} +65 -28
- package/dist/client/{chunk-ZT5XE7FK.mjs → chunk-D3ETC2SU.mjs} +1 -1
- package/dist/client/{chunk-CQKKFEQD.mjs → chunk-DAS5CIER.mjs} +274 -105
- package/dist/client/{chunk-SDIYSQAY.mjs → chunk-HIHOQGIP.mjs} +2 -3
- package/dist/client/{chunk-ZJZZA5EP.mjs → chunk-MFPKS6QS.mjs} +11 -14
- package/dist/client/{chunk-EY42X22F.mjs → chunk-NBFRJ5NB.mjs} +156 -4
- package/dist/client/{chunk-VGLXACVK.mjs → chunk-VFHZLZAC.mjs} +1 -1
- package/dist/client/{chunk-STJ2NCQM.mjs → chunk-WHZQDPBZ.mjs} +19 -1
- package/dist/client/{chunk-RSQWWUAD.mjs → chunk-Z62JYS5O.mjs} +3 -3
- package/dist/client/client.mjs +3292 -2827
- package/dist/client/{courseRegistration-ATZSYDHM.mjs → courseRegistration-2D3ACMJR.mjs} +18 -56
- package/dist/client/{eventCalendar-6T2UGKKP.mjs → eventCalendar-QY4UZUFF.mjs} +8 -9
- package/dist/client/{eventCombined-Q4VANXVF.mjs → eventCombined-RRCDKJC2.mjs} +8 -9
- package/dist/client/{eventDetails-DW37E7VW.mjs → eventDetails-YO335BUT.mjs} +8 -9
- package/dist/client/{eventListing-XURTSAUW.mjs → eventListing-PXA6GFQ3.mjs} +8 -9
- package/dist/client/{eventRegistration-MRKEVAXW.mjs → eventRegistration-2ZHEDDXO.mjs} +8 -9
- package/dist/client/{form-WZZFFGMU.mjs → form-ZS6KX4U2.mjs} +6 -6
- package/dist/client/{headerSection-EQYVQBLM.mjs → headerSection-QK5SLIIB.mjs} +2 -2
- package/dist/client/hooks.mjs +1084 -1029
- package/dist/client/{locationMap-MFF5VAZR.mjs → locationMap-GFNIUD2X.mjs} +2 -2
- package/dist/client/{newsletterForm-JQ77UYIE.mjs → newsletterForm-PGLTTCUG.mjs} +4 -4
- package/dist/client/{productDetail-25LMT3IZ.mjs → productDetail-OPBE5ZPI.mjs} +5 -6
- package/dist/client/{productList-5ABEMKUG.mjs → productList-NI72Q62Z.mjs} +5 -6
- package/dist/client/rendering/client.mjs +2692 -2285
- package/dist/client/rendering/islands.mjs +18 -18
- package/dist/client/rendering.mjs +2611 -2156
- package/dist/client/{shop-OMMQZ6YO.mjs → shop-3ZQPEWYI.mjs} +5 -6
- package/dist/client/spam-protection.mjs +4 -5
- package/dist/preview-next/before-render.mjs +2 -2
- package/dist/preview-next/client/runtime.mjs +5 -5
- package/dist/{sdk-runtime-WNLBZ3ZH.mjs → sdk-runtime-FSHXCWDS.mjs} +6 -6
- package/dist/server/components.mjs +1722 -1453
- package/dist/server/config-validation.mjs +1316 -1261
- package/dist/server/config.mjs +1316 -1261
- package/dist/server/data.mjs +1084 -1029
- package/dist/server/index.mjs +135 -100
- package/dist/server/navigation.mjs +20 -30
- package/dist/server/next.mjs +1782 -1500
- package/dist/server/page-converter.mjs +1009 -946
- package/dist/server/prebuild.mjs +1 -1
- package/dist/server/rendering/server.mjs +1722 -1453
- package/dist/server/rendering.mjs +1728 -1459
- package/dist/server/routing.mjs +1127 -1045
- package/dist/server/server.mjs +1219 -1129
- package/dist/server/theme-bridge.mjs +8 -5
- package/package.json +2 -2
- package/dist/SdkPreviewModeRuntime-ZBEMRV7N.mjs +0 -8
- package/dist/client/chunk-LQFDYWPJ.mjs +0 -184
- package/dist/client/chunk-ZFHRN6W2.mjs +0 -66
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { ApiRequestError } from './chunk-
|
|
2
|
+
import { ApiRequestError } from './chunk-BOQXMCSP.mjs';
|
|
3
3
|
import { __commonJS, __export, __toESM } from './chunk-R7POPVJR.mjs';
|
|
4
4
|
import * as React61 from 'react';
|
|
5
5
|
import React61__default, { createContext, forwardRef, useContext, createElement, useRef, useMemo, useEffect, useState, useCallback, useImperativeHandle, useLayoutEffect, memo, createRef, Component as Component$1, useDebugValue, useId as useId$1, useSyncExternalStore, isValidElement, cloneElement, useReducer, startTransition } from 'react';
|
|
@@ -31343,12 +31343,17 @@ var visibleWhenPredicateSchema = z.object({
|
|
|
31343
31343
|
minItems: z.number().int().nonnegative().optional(),
|
|
31344
31344
|
maxItems: z.number().int().nonnegative().optional()
|
|
31345
31345
|
});
|
|
31346
|
-
var visibleWhenSchema = z.
|
|
31347
|
-
|
|
31348
|
-
|
|
31349
|
-
|
|
31350
|
-
|
|
31351
|
-
|
|
31346
|
+
var visibleWhenSchema = z.lazy(
|
|
31347
|
+
() => z.union([
|
|
31348
|
+
visibleWhenPredicateSchema,
|
|
31349
|
+
z.object({
|
|
31350
|
+
allOf: z.array(visibleWhenSchema).min(1)
|
|
31351
|
+
}),
|
|
31352
|
+
z.object({
|
|
31353
|
+
anyOf: z.array(visibleWhenSchema).min(1)
|
|
31354
|
+
})
|
|
31355
|
+
])
|
|
31356
|
+
);
|
|
31352
31357
|
var uiSchema = z.object({
|
|
31353
31358
|
widget: z.string().optional(),
|
|
31354
31359
|
// Container/widget presets (used by Group/Repeater widgets themselves, not for widget selection)
|
|
@@ -51971,9 +51976,6 @@ var heroCopyFragment = defineFragment({
|
|
|
51971
51976
|
maxLength: 600
|
|
51972
51977
|
}
|
|
51973
51978
|
],
|
|
51974
|
-
// Layout order is [eyebrow, headline, subheadline]. The hero block's
|
|
51975
|
-
// `splitEditorial` variant reads these nodes by index; keep the order stable
|
|
51976
|
-
// (it fails fast at import if the count changes).
|
|
51977
51979
|
layout: [
|
|
51978
51980
|
text(
|
|
51979
51981
|
{
|
|
@@ -54302,32 +54304,6 @@ var splitReverseLayout = splitLayoutWith([
|
|
|
54302
54304
|
splitContentColumn,
|
|
54303
54305
|
splitImageColumn
|
|
54304
54306
|
]);
|
|
54305
|
-
var heroEyebrowNode = heroCopyFragment.layout[0];
|
|
54306
|
-
var heroHeadlineNode = heroCopyFragment.layout[1];
|
|
54307
|
-
var heroSubheadlineNode = heroCopyFragment.layout[2];
|
|
54308
|
-
var heroCtaRowNode = heroCtaRowFragment.layout[0];
|
|
54309
|
-
if (!heroEyebrowNode || !heroHeadlineNode || !heroSubheadlineNode || !heroCtaRowNode) {
|
|
54310
|
-
throw new Error("Hero copy/CTA fragments are missing their expected layout nodes.");
|
|
54311
|
-
}
|
|
54312
|
-
var heroEditorialBottomRow = inline(
|
|
54313
|
-
{
|
|
54314
|
-
gap: "lg",
|
|
54315
|
-
align: "end",
|
|
54316
|
-
justify: "start",
|
|
54317
|
-
wrap: true,
|
|
54318
|
-
className: "rb-w-full"
|
|
54319
|
-
},
|
|
54320
|
-
[heroSubheadlineNode, heroCtaRowNode]
|
|
54321
|
-
);
|
|
54322
|
-
var splitEditorialContentColumn = heroContentWrapper(
|
|
54323
|
-
[heroEyebrowNode, heroHeadlineNode, heroEditorialBottomRow],
|
|
54324
|
-
"md",
|
|
54325
|
-
"rb-w-full rb-text-left"
|
|
54326
|
-
);
|
|
54327
|
-
var splitEditorialLayout = splitLayoutWith([
|
|
54328
|
-
splitEditorialContentColumn,
|
|
54329
|
-
splitImageColumn
|
|
54330
|
-
]);
|
|
54331
54307
|
var heroConfig = {
|
|
54332
54308
|
id: "block.hero",
|
|
54333
54309
|
title: "Hero",
|
|
@@ -54351,7 +54327,8 @@ var heroConfig = {
|
|
|
54351
54327
|
id: "imageShape",
|
|
54352
54328
|
label: "Image shape",
|
|
54353
54329
|
defaultValue: "default",
|
|
54354
|
-
uiIntent: "display"
|
|
54330
|
+
uiIntent: "display",
|
|
54331
|
+
visibleWhen: { field: "variant", oneOf: ["split", "splitReverse"] }
|
|
54355
54332
|
})
|
|
54356
54333
|
],
|
|
54357
54334
|
layout: classicLayout,
|
|
@@ -54359,8 +54336,7 @@ var heroConfig = {
|
|
|
54359
54336
|
classic: classicLayout,
|
|
54360
54337
|
micro: microLayout,
|
|
54361
54338
|
split: splitLayout,
|
|
54362
|
-
splitReverse: splitReverseLayout
|
|
54363
|
-
splitEditorial: splitEditorialLayout
|
|
54339
|
+
splitReverse: splitReverseLayout
|
|
54364
54340
|
},
|
|
54365
54341
|
defaultVariant: "classic",
|
|
54366
54342
|
description: "Hero section with headline, subtitle, and repeatable CTAs.",
|
|
@@ -56138,8 +56114,10 @@ function resolveGeneratedHeroLayoutStyles(content) {
|
|
|
56138
56114
|
return isPlainObject2(raw) ? raw : null;
|
|
56139
56115
|
}
|
|
56140
56116
|
function readHeroLayoutString(content, generatedKey, fallbackKey = generatedKey) {
|
|
56117
|
+
const explicitValue = readString(content, fallbackKey);
|
|
56118
|
+
if (explicitValue !== void 0) return explicitValue;
|
|
56141
56119
|
const generated = resolveGeneratedHeroLayoutStyles(content);
|
|
56142
|
-
return generated && typeof generated[generatedKey] === "string" ? generated[generatedKey] :
|
|
56120
|
+
return generated && typeof generated[generatedKey] === "string" ? generated[generatedKey] : void 0;
|
|
56143
56121
|
}
|
|
56144
56122
|
function resolveHeroVariant(content) {
|
|
56145
56123
|
const variant = readString(content, "variant");
|
|
@@ -56152,7 +56130,7 @@ function resolveHeroContentAlignment(content) {
|
|
|
56152
56130
|
const raw = readHeroLayoutString(content, "contentAlignment");
|
|
56153
56131
|
if (raw === "left" || raw === "center" || raw === "right") return raw;
|
|
56154
56132
|
const variant = resolveHeroVariant(content);
|
|
56155
|
-
if (variant === "split" || variant === "splitReverse"
|
|
56133
|
+
if (variant === "split" || variant === "splitReverse") return "left";
|
|
56156
56134
|
return "center";
|
|
56157
56135
|
}
|
|
56158
56136
|
function resolveHeroVerticalAlignment(content) {
|
|
@@ -56162,7 +56140,7 @@ function resolveHeroVerticalAlignment(content) {
|
|
|
56162
56140
|
const minHeight = sectionStyles?.minHeight;
|
|
56163
56141
|
if (minHeight === "banner" || minHeight === "hero" || minHeight === "immersive") return "center";
|
|
56164
56142
|
const variant = resolveHeroVariant(content);
|
|
56165
|
-
if (variant === "split" || variant === "splitReverse"
|
|
56143
|
+
if (variant === "split" || variant === "splitReverse") return "center";
|
|
56166
56144
|
return "top";
|
|
56167
56145
|
}
|
|
56168
56146
|
function resolveHeroContentMaxWidth(content) {
|
|
@@ -60549,6 +60527,35 @@ function normalizeEventStaffMemberId(value) {
|
|
|
60549
60527
|
const trimmed = value.trim();
|
|
60550
60528
|
return trimmed ? trimmed : null;
|
|
60551
60529
|
}
|
|
60530
|
+
var publicPassProductSchema = z.object({
|
|
60531
|
+
id: z.string(),
|
|
60532
|
+
productUseCase: z.enum(["event_pass", "appointment_package"]).default("event_pass"),
|
|
60533
|
+
name: z.string(),
|
|
60534
|
+
description: z.string().nullable(),
|
|
60535
|
+
price: z.number(),
|
|
60536
|
+
currency: z.string(),
|
|
60537
|
+
creditsTotal: z.number(),
|
|
60538
|
+
pricePerCredit: z.number(),
|
|
60539
|
+
validDays: z.number().nullable(),
|
|
60540
|
+
eligibleCategoryIds: z.array(z.string()),
|
|
60541
|
+
eligibleCategoryNames: z.array(z.string())
|
|
60542
|
+
});
|
|
60543
|
+
var publicPassProductCollectionSchema = z.object({
|
|
60544
|
+
passes: z.array(publicPassProductSchema)
|
|
60545
|
+
});
|
|
60546
|
+
var publicMembershipProductSchema = z.object({
|
|
60547
|
+
id: z.string(),
|
|
60548
|
+
name: z.string(),
|
|
60549
|
+
description: z.string().nullable(),
|
|
60550
|
+
price: z.number(),
|
|
60551
|
+
currency: z.string(),
|
|
60552
|
+
billingInterval: z.enum(["month", "year"]),
|
|
60553
|
+
eligibleCategoryIds: z.array(z.string()),
|
|
60554
|
+
eligibleCategoryNames: z.array(z.string())
|
|
60555
|
+
});
|
|
60556
|
+
var publicMembershipProductCollectionSchema = z.object({
|
|
60557
|
+
memberships: z.array(publicMembershipProductSchema)
|
|
60558
|
+
});
|
|
60552
60559
|
var occurrenceContextSchema = z.object({
|
|
60553
60560
|
id: z.string(),
|
|
60554
60561
|
seriesId: z.string(),
|
|
@@ -60561,7 +60568,8 @@ var occurrenceContextSchema = z.object({
|
|
|
60561
60568
|
|
|
60562
60569
|
// ../blocks/src/system/constants/events.ts
|
|
60563
60570
|
var EVENT_CONTENT_TYPE_SLUGS = ["event", "events"];
|
|
60564
|
-
var eventCalendarDisplayModeValues = ["combined", "
|
|
60571
|
+
var eventCalendarDisplayModeValues = ["combined", "calendar", "list", "timetable"];
|
|
60572
|
+
var eventCalendarDefaultViewValues = ["month", "week"];
|
|
60565
60573
|
var eventCalendarListLayoutValues = ["stack", "grid", "compact"];
|
|
60566
60574
|
var eventCalendarListLayoutOptions = [
|
|
60567
60575
|
{ id: "stack", label: "Stack" },
|
|
@@ -60572,6 +60580,9 @@ var eventCalendarListLayoutCompatibleDisplayModeValues = ["combined", "list"];
|
|
|
60572
60580
|
function isEventCalendarDisplayMode(value) {
|
|
60573
60581
|
return typeof value === "string" && eventCalendarDisplayModeValues.includes(value);
|
|
60574
60582
|
}
|
|
60583
|
+
function isEventCalendarDefaultView(value) {
|
|
60584
|
+
return typeof value === "string" && eventCalendarDefaultViewValues.includes(value);
|
|
60585
|
+
}
|
|
60575
60586
|
function isEventCalendarListLayout(value) {
|
|
60576
60587
|
return typeof value === "string" && eventCalendarListLayoutValues.includes(value);
|
|
60577
60588
|
}
|
|
@@ -60715,6 +60726,7 @@ var registrationButtonVariantSchema = z.enum(["primary", "secondary", "outline"]
|
|
|
60715
60726
|
var eventButtonVariantSchema = z.enum(["primary", "secondary", "outline", "link"]);
|
|
60716
60727
|
var eventLayoutSchema = z.enum(eventCalendarListLayoutValues);
|
|
60717
60728
|
var eventCalendarDisplayModeSchema = z.enum(eventCalendarDisplayModeValues);
|
|
60729
|
+
var eventCalendarDefaultViewSchema = z.enum(eventCalendarDefaultViewValues);
|
|
60718
60730
|
var columnOptionSchema = z.enum(["2", "3", "4"]);
|
|
60719
60731
|
var weekStartSchema = z.enum(["sunday", "monday"]);
|
|
60720
60732
|
var filterAutoShowSchema = z.enum(["auto", "always", "never"]);
|
|
@@ -60749,7 +60761,7 @@ function findEventByOccurrenceId(events2, occurrenceId) {
|
|
|
60749
60761
|
function findPreSelectedEvent(input) {
|
|
60750
60762
|
const occurrenceContext = input.occurrenceContext;
|
|
60751
60763
|
if (!occurrenceContext) {
|
|
60752
|
-
return null;
|
|
60764
|
+
return input.scopedEvents.length === 1 ? input.scopedEvents[0] ?? null : null;
|
|
60753
60765
|
}
|
|
60754
60766
|
const contextDate = getBookingLocalDateKey(toScheduledBookingDateTime({
|
|
60755
60767
|
startsAt: occurrenceContext.startsAt,
|
|
@@ -60853,7 +60865,9 @@ var eventRegistrationSourceSchema = z.object({
|
|
|
60853
60865
|
overlayEnabled: z.boolean().optional(),
|
|
60854
60866
|
spamProtectionEnabled: z.boolean().optional(),
|
|
60855
60867
|
stage: previewStageSchema.optional(),
|
|
60856
|
-
supportEmail: z.string().optional()
|
|
60868
|
+
supportEmail: z.string().optional(),
|
|
60869
|
+
sitePasses: publicPassProductCollectionSchema.nullable().optional(),
|
|
60870
|
+
siteMemberships: publicMembershipProductCollectionSchema.nullable().optional()
|
|
60857
60871
|
});
|
|
60858
60872
|
var eventRegistrationDisplaySchema = z.object({
|
|
60859
60873
|
kind: z.literal("event-registration"),
|
|
@@ -60876,7 +60890,9 @@ var eventRegistrationHydrationSchema = z.object({
|
|
|
60876
60890
|
buttonVariant: registrationButtonVariantSchema.optional(),
|
|
60877
60891
|
overlayEnabled: z.boolean().optional(),
|
|
60878
60892
|
spamProtectionEnabled: z.boolean().optional(),
|
|
60879
|
-
supportEmail: z.string().optional()
|
|
60893
|
+
supportEmail: z.string().optional(),
|
|
60894
|
+
sitePasses: publicPassProductCollectionSchema.nullable().optional(),
|
|
60895
|
+
siteMemberships: publicMembershipProductCollectionSchema.nullable().optional()
|
|
60880
60896
|
});
|
|
60881
60897
|
var eventRegistrationRenderSchema = z.object({
|
|
60882
60898
|
display: eventRegistrationDisplaySchema,
|
|
@@ -60985,7 +61001,9 @@ var eventRegistrationBlockRuntime = defineClientOwnedBlockRuntime({
|
|
|
60985
61001
|
buttonVariant: source.buttonVariant,
|
|
60986
61002
|
overlayEnabled: source.overlayEnabled,
|
|
60987
61003
|
spamProtectionEnabled: source.spamProtectionEnabled,
|
|
60988
|
-
supportEmail: source.supportEmail
|
|
61004
|
+
supportEmail: source.supportEmail,
|
|
61005
|
+
sitePasses: source.sitePasses ?? null,
|
|
61006
|
+
siteMemberships: source.siteMemberships ?? null
|
|
60989
61007
|
}
|
|
60990
61008
|
})
|
|
60991
61009
|
});
|
|
@@ -61168,6 +61186,8 @@ var eventRegistrationManifest = createBlockManifest({
|
|
|
61168
61186
|
},
|
|
61169
61187
|
// Event data from loader
|
|
61170
61188
|
events: { $bind: { from: "data.events" } },
|
|
61189
|
+
sitePasses: { $bind: { from: "data.sitePasses" } },
|
|
61190
|
+
siteMemberships: { $bind: { from: "data.siteMemberships" } },
|
|
61171
61191
|
// Stage for preview mode (allows registering for draft events)
|
|
61172
61192
|
stage: {
|
|
61173
61193
|
$bind: { from: "$root.previewStage", fallback: "published" }
|
|
@@ -61186,7 +61206,9 @@ var eventRegistrationBlockDefinition = {
|
|
|
61186
61206
|
manifest: eventRegistrationManifest,
|
|
61187
61207
|
runtime: eventRegistrationBlockRuntime,
|
|
61188
61208
|
dataSchemas: {
|
|
61189
|
-
events:
|
|
61209
|
+
events: publicEventsArraySchema.optional(),
|
|
61210
|
+
sitePasses: publicPassProductCollectionSchema.optional(),
|
|
61211
|
+
siteMemberships: publicMembershipProductCollectionSchema.optional(),
|
|
61190
61212
|
occurrenceContext: occurrenceContextSchema.optional()
|
|
61191
61213
|
},
|
|
61192
61214
|
dataLoaders: {
|
|
@@ -61205,6 +61227,20 @@ var eventRegistrationBlockDefinition = {
|
|
|
61205
61227
|
entryId: { $bind: { from: "$root.contentEntry._entryId", fallback: "" } }
|
|
61206
61228
|
},
|
|
61207
61229
|
mode: "server"
|
|
61230
|
+
},
|
|
61231
|
+
sitePasses: {
|
|
61232
|
+
endpoint: "listPublicPasses",
|
|
61233
|
+
params: {
|
|
61234
|
+
siteId: { $bind: { from: "$root.siteId" } }
|
|
61235
|
+
},
|
|
61236
|
+
mode: "server"
|
|
61237
|
+
},
|
|
61238
|
+
siteMemberships: {
|
|
61239
|
+
endpoint: "listPublicMemberships",
|
|
61240
|
+
params: {
|
|
61241
|
+
siteId: { $bind: { from: "$root.siteId" } }
|
|
61242
|
+
},
|
|
61243
|
+
mode: "server"
|
|
61208
61244
|
}
|
|
61209
61245
|
}
|
|
61210
61246
|
};
|
|
@@ -61639,31 +61675,6 @@ var courseRegistrationBlockDefinition = {
|
|
|
61639
61675
|
}
|
|
61640
61676
|
}
|
|
61641
61677
|
};
|
|
61642
|
-
var publicPassProductSchema = z.object({
|
|
61643
|
-
id: z.string(),
|
|
61644
|
-
productUseCase: z.enum(["event_pass", "appointment_package"]).default("event_pass"),
|
|
61645
|
-
name: z.string(),
|
|
61646
|
-
description: z.string().nullable(),
|
|
61647
|
-
price: z.number(),
|
|
61648
|
-
currency: z.string(),
|
|
61649
|
-
creditsTotal: z.number(),
|
|
61650
|
-
pricePerCredit: z.number(),
|
|
61651
|
-
validDays: z.number().nullable(),
|
|
61652
|
-
eligibleCategoryIds: z.array(z.string()),
|
|
61653
|
-
eligibleCategoryNames: z.array(z.string())
|
|
61654
|
-
});
|
|
61655
|
-
var publicMembershipProductSchema = z.object({
|
|
61656
|
-
id: z.string(),
|
|
61657
|
-
name: z.string(),
|
|
61658
|
-
description: z.string().nullable(),
|
|
61659
|
-
price: z.number(),
|
|
61660
|
-
currency: z.string(),
|
|
61661
|
-
billingInterval: z.enum(["month", "year"]),
|
|
61662
|
-
eligibleCategoryIds: z.array(z.string()),
|
|
61663
|
-
eligibleCategoryNames: z.array(z.string())
|
|
61664
|
-
});
|
|
61665
|
-
|
|
61666
|
-
// ../blocks/src/system/blocks/event-details.ts
|
|
61667
61678
|
var eventDetailsManifest = createBlockManifest({
|
|
61668
61679
|
id: "block.event-details",
|
|
61669
61680
|
version: "1.0.0",
|
|
@@ -61827,8 +61838,8 @@ var eventDetailsBlockDefinition = {
|
|
|
61827
61838
|
dataSchemas: {
|
|
61828
61839
|
eventDetailsData: z.object({
|
|
61829
61840
|
events: publicEventsArraySchema,
|
|
61830
|
-
sitePasses:
|
|
61831
|
-
siteMemberships:
|
|
61841
|
+
sitePasses: publicPassProductCollectionSchema,
|
|
61842
|
+
siteMemberships: publicMembershipProductCollectionSchema,
|
|
61832
61843
|
autoApplyDiscount: eventAutoApplyDiscountPreviewSchema.nullable().optional().default(null)
|
|
61833
61844
|
}).optional(),
|
|
61834
61845
|
occurrenceContext: occurrenceContextSchema2.optional()
|
|
@@ -64886,6 +64897,7 @@ var eventCalendarSourceSchema = z.object(
|
|
|
64886
64897
|
loadMoreText: z.string().optional(),
|
|
64887
64898
|
startOfWeek: weekStartSchema.optional(),
|
|
64888
64899
|
calendarTabViews: calendarTabViewsSchema.optional(),
|
|
64900
|
+
defaultCalendarView: eventCalendarDefaultViewSchema.optional(),
|
|
64889
64901
|
showFilters: z.boolean().nullable().optional(),
|
|
64890
64902
|
showCategoryFilter: filterAutoShowSchema.optional(),
|
|
64891
64903
|
showVenueFilter: z.boolean().nullable().optional(),
|
|
@@ -64917,6 +64929,7 @@ var eventCalendarDisplaySchema = z.object({
|
|
|
64917
64929
|
paginationAction: eventListPaginationActionSchema,
|
|
64918
64930
|
startOfWeek: weekStartSchema,
|
|
64919
64931
|
calendarTabViews: calendarTabViewsSchema,
|
|
64932
|
+
defaultCalendarView: eventCalendarDefaultViewSchema,
|
|
64920
64933
|
showFilters: z.boolean(),
|
|
64921
64934
|
showCategoryFilter: filterAutoShowSchema,
|
|
64922
64935
|
showVenueFilter: z.boolean(),
|
|
@@ -64976,6 +64989,7 @@ function buildEventCalendarDisplay(source) {
|
|
|
64976
64989
|
}),
|
|
64977
64990
|
startOfWeek: source.startOfWeek ?? "monday",
|
|
64978
64991
|
calendarTabViews: source.calendarTabViews ?? "both",
|
|
64992
|
+
defaultCalendarView: source.defaultCalendarView ?? "month",
|
|
64979
64993
|
showFilters: source.showFilters ?? true,
|
|
64980
64994
|
showCategoryFilter: source.showCategoryFilter ?? "auto",
|
|
64981
64995
|
showVenueFilter: source.showVenueFilter ?? false,
|
|
@@ -65089,6 +65103,9 @@ function normalizeEventCalendarContent(content) {
|
|
|
65089
65103
|
...variant ? { variant } : {},
|
|
65090
65104
|
displayMode: normalizeEventCalendarDisplayMode(record.displayMode),
|
|
65091
65105
|
listLayout: normalizeEventCalendarListLayout(record.listLayout),
|
|
65106
|
+
defaultCalendarView: normalizeEventCalendarDefaultView(
|
|
65107
|
+
record.defaultCalendarView
|
|
65108
|
+
),
|
|
65092
65109
|
kind,
|
|
65093
65110
|
eventSurface: normalizeEventSurfaceScope(record.eventSurface),
|
|
65094
65111
|
filterEventPresets: normalizeEventSurfacePresets(record.filterEventPresets),
|
|
@@ -65106,6 +65123,9 @@ function normalizeEventCalendarDisplayMode(value) {
|
|
|
65106
65123
|
function normalizeEventCalendarListLayout(value) {
|
|
65107
65124
|
return isEventCalendarListLayout(value) ? value : void 0;
|
|
65108
65125
|
}
|
|
65126
|
+
function normalizeEventCalendarDefaultView(value) {
|
|
65127
|
+
return isEventCalendarDefaultView(value) ? value : void 0;
|
|
65128
|
+
}
|
|
65109
65129
|
var eventCalendarLayout = [
|
|
65110
65130
|
styledSection({
|
|
65111
65131
|
children: sectionContainer(
|
|
@@ -65165,6 +65185,9 @@ var eventCalendarLayout = [
|
|
|
65165
65185
|
calendarTabViews: {
|
|
65166
65186
|
$bind: { from: "content.calendarTabViews", fallback: "both" }
|
|
65167
65187
|
},
|
|
65188
|
+
defaultCalendarView: {
|
|
65189
|
+
$bind: { from: "content.defaultCalendarView", fallback: "month" }
|
|
65190
|
+
},
|
|
65168
65191
|
// Filtering options
|
|
65169
65192
|
showFilters: {
|
|
65170
65193
|
$bind: { from: "content.showFilters", fallback: true }
|
|
@@ -65231,8 +65254,7 @@ var eventCalendarAdditionalFields = [
|
|
|
65231
65254
|
defaultValue: "combined",
|
|
65232
65255
|
options: [
|
|
65233
65256
|
{ value: "combined", label: "Combined (List + Calendar tabs)" },
|
|
65234
|
-
{ value: "
|
|
65235
|
-
{ value: "week", label: "Week agenda" },
|
|
65257
|
+
{ value: "calendar", label: "Calendar" },
|
|
65236
65258
|
{ value: "timetable", label: "Timetable" },
|
|
65237
65259
|
{ value: "list", label: "List" }
|
|
65238
65260
|
],
|
|
@@ -65271,7 +65293,12 @@ var eventCalendarAdditionalFields = [
|
|
|
65271
65293
|
],
|
|
65272
65294
|
ui: {
|
|
65273
65295
|
intent: "display",
|
|
65274
|
-
visibleWhen: {
|
|
65296
|
+
visibleWhen: {
|
|
65297
|
+
allOf: [
|
|
65298
|
+
{ field: "variant", oneOf: ["combined", "list"] },
|
|
65299
|
+
{ field: "listLayout", equals: "grid" }
|
|
65300
|
+
]
|
|
65301
|
+
}
|
|
65275
65302
|
}
|
|
65276
65303
|
},
|
|
65277
65304
|
{
|
|
@@ -65319,7 +65346,12 @@ var eventCalendarAdditionalFields = [
|
|
|
65319
65346
|
required: false,
|
|
65320
65347
|
ui: {
|
|
65321
65348
|
intent: "display",
|
|
65322
|
-
visibleWhen: {
|
|
65349
|
+
visibleWhen: {
|
|
65350
|
+
allOf: [
|
|
65351
|
+
{ field: "variant", oneOf: ["combined", "list"] },
|
|
65352
|
+
{ field: "paginationMode", equals: "seeAllLink" }
|
|
65353
|
+
]
|
|
65354
|
+
}
|
|
65323
65355
|
}
|
|
65324
65356
|
},
|
|
65325
65357
|
{
|
|
@@ -65352,7 +65384,7 @@ var eventCalendarAdditionalFields = [
|
|
|
65352
65384
|
intent: "display",
|
|
65353
65385
|
visibleWhen: {
|
|
65354
65386
|
field: "variant",
|
|
65355
|
-
oneOf: ["combined", "
|
|
65387
|
+
oneOf: ["combined", "calendar", "timetable"]
|
|
65356
65388
|
}
|
|
65357
65389
|
}
|
|
65358
65390
|
},
|
|
@@ -65375,6 +65407,33 @@ var eventCalendarAdditionalFields = [
|
|
|
65375
65407
|
visibleWhen: { field: "variant", equals: "combined" }
|
|
65376
65408
|
}
|
|
65377
65409
|
},
|
|
65410
|
+
{
|
|
65411
|
+
id: "defaultCalendarView",
|
|
65412
|
+
type: "select",
|
|
65413
|
+
label: "Calendar view",
|
|
65414
|
+
description: "Choose the standalone calendar view, or the first view in combined mode",
|
|
65415
|
+
required: false,
|
|
65416
|
+
multiple: false,
|
|
65417
|
+
defaultValue: "month",
|
|
65418
|
+
options: [
|
|
65419
|
+
{ value: "month", label: "Month" },
|
|
65420
|
+
{ value: "week", label: "Week" }
|
|
65421
|
+
],
|
|
65422
|
+
ui: {
|
|
65423
|
+
intent: "display",
|
|
65424
|
+
visibleWhen: {
|
|
65425
|
+
anyOf: [
|
|
65426
|
+
{ field: "variant", equals: "calendar" },
|
|
65427
|
+
{
|
|
65428
|
+
allOf: [
|
|
65429
|
+
{ field: "variant", equals: "combined" },
|
|
65430
|
+
{ field: "calendarTabViews", equals: "both" }
|
|
65431
|
+
]
|
|
65432
|
+
}
|
|
65433
|
+
]
|
|
65434
|
+
}
|
|
65435
|
+
}
|
|
65436
|
+
},
|
|
65378
65437
|
// Filtering options
|
|
65379
65438
|
{
|
|
65380
65439
|
id: "kind",
|
|
@@ -65402,7 +65461,7 @@ var eventCalendarAdditionalFields = [
|
|
|
65402
65461
|
intent: "display",
|
|
65403
65462
|
visibleWhen: {
|
|
65404
65463
|
field: "variant",
|
|
65405
|
-
oneOf: ["combined", "list", "timetable"]
|
|
65464
|
+
oneOf: ["combined", "calendar", "list", "timetable"]
|
|
65406
65465
|
}
|
|
65407
65466
|
}
|
|
65408
65467
|
},
|
|
@@ -65422,8 +65481,10 @@ var eventCalendarAdditionalFields = [
|
|
|
65422
65481
|
ui: {
|
|
65423
65482
|
intent: "display",
|
|
65424
65483
|
visibleWhen: {
|
|
65425
|
-
|
|
65426
|
-
|
|
65484
|
+
allOf: [
|
|
65485
|
+
{ field: "variant", oneOf: ["combined", "calendar", "list", "timetable"] },
|
|
65486
|
+
{ field: "showFilters", equals: true }
|
|
65487
|
+
]
|
|
65427
65488
|
}
|
|
65428
65489
|
}
|
|
65429
65490
|
},
|
|
@@ -65437,8 +65498,10 @@ var eventCalendarAdditionalFields = [
|
|
|
65437
65498
|
ui: {
|
|
65438
65499
|
intent: "display",
|
|
65439
65500
|
visibleWhen: {
|
|
65440
|
-
|
|
65441
|
-
|
|
65501
|
+
allOf: [
|
|
65502
|
+
{ field: "variant", oneOf: ["combined", "calendar", "list", "timetable"] },
|
|
65503
|
+
{ field: "showFilters", equals: true }
|
|
65504
|
+
]
|
|
65442
65505
|
}
|
|
65443
65506
|
}
|
|
65444
65507
|
},
|
|
@@ -65452,8 +65515,10 @@ var eventCalendarAdditionalFields = [
|
|
|
65452
65515
|
ui: {
|
|
65453
65516
|
intent: "display",
|
|
65454
65517
|
visibleWhen: {
|
|
65455
|
-
|
|
65456
|
-
|
|
65518
|
+
allOf: [
|
|
65519
|
+
{ field: "variant", oneOf: ["combined", "calendar", "list", "timetable"] },
|
|
65520
|
+
{ field: "showFilters", equals: true }
|
|
65521
|
+
]
|
|
65457
65522
|
}
|
|
65458
65523
|
}
|
|
65459
65524
|
},
|
|
@@ -65467,8 +65532,15 @@ var eventCalendarAdditionalFields = [
|
|
|
65467
65532
|
ui: {
|
|
65468
65533
|
intent: "display",
|
|
65469
65534
|
visibleWhen: {
|
|
65470
|
-
|
|
65471
|
-
|
|
65535
|
+
anyOf: [
|
|
65536
|
+
{ field: "variant", oneOf: ["combined", "list", "timetable"] },
|
|
65537
|
+
{
|
|
65538
|
+
allOf: [
|
|
65539
|
+
{ field: "variant", equals: "calendar" },
|
|
65540
|
+
{ field: "defaultCalendarView", equals: "week" }
|
|
65541
|
+
]
|
|
65542
|
+
}
|
|
65543
|
+
]
|
|
65472
65544
|
}
|
|
65473
65545
|
}
|
|
65474
65546
|
},
|
|
@@ -65584,8 +65656,7 @@ var eventCalendarAdditionalFields = [
|
|
|
65584
65656
|
];
|
|
65585
65657
|
var eventCalendarVariants = {
|
|
65586
65658
|
combined: eventCalendarLayout[0],
|
|
65587
|
-
|
|
65588
|
-
week: eventCalendarLayout[0],
|
|
65659
|
+
calendar: eventCalendarLayout[0],
|
|
65589
65660
|
timetable: eventCalendarLayout[0],
|
|
65590
65661
|
list: eventCalendarLayout[0]
|
|
65591
65662
|
};
|
|
@@ -65597,8 +65668,7 @@ var eventCalendarVariants = {
|
|
|
65597
65668
|
multiple: false,
|
|
65598
65669
|
options: [
|
|
65599
65670
|
{ value: "combined" },
|
|
65600
|
-
{ value: "
|
|
65601
|
-
{ value: "week" },
|
|
65671
|
+
{ value: "calendar" },
|
|
65602
65672
|
{ value: "timetable" },
|
|
65603
65673
|
{ value: "list" }
|
|
65604
65674
|
]
|
|
@@ -65611,6 +65681,13 @@ var eventCalendarVariants = {
|
|
|
65611
65681
|
options: eventCalendarListLayoutOptions.map((option) => ({
|
|
65612
65682
|
value: option.id
|
|
65613
65683
|
}))
|
|
65684
|
+
},
|
|
65685
|
+
{
|
|
65686
|
+
id: "defaultCalendarView",
|
|
65687
|
+
type: "select",
|
|
65688
|
+
required: false,
|
|
65689
|
+
multiple: false,
|
|
65690
|
+
options: [{ value: "month" }, { value: "week" }]
|
|
65614
65691
|
}
|
|
65615
65692
|
];
|
|
65616
65693
|
var eventCalendarConfig = {
|
|
@@ -65654,8 +65731,7 @@ var eventCalendarConfig = {
|
|
|
65654
65731
|
defaultVariant: "combined",
|
|
65655
65732
|
variantOptions: {
|
|
65656
65733
|
combined: { label: "Combined" },
|
|
65657
|
-
|
|
65658
|
-
week: { label: "Week" },
|
|
65734
|
+
calendar: { label: "Calendar" },
|
|
65659
65735
|
timetable: { label: "Timetable" },
|
|
65660
65736
|
list: { label: "List" }
|
|
65661
65737
|
}
|
|
@@ -68949,9 +69025,9 @@ var shopBlockDefinition = {
|
|
|
68949
69025
|
runtime: shopBlockRuntime,
|
|
68950
69026
|
dataSchemas: {
|
|
68951
69027
|
// listPublicPasses returns { passes: [...] }
|
|
68952
|
-
passes:
|
|
69028
|
+
passes: publicPassProductCollectionSchema.optional(),
|
|
68953
69029
|
// listPublicMemberships returns { memberships: [...] }
|
|
68954
|
-
memberships:
|
|
69030
|
+
memberships: publicMembershipProductCollectionSchema.optional()
|
|
68955
69031
|
},
|
|
68956
69032
|
dataLoaders: {
|
|
68957
69033
|
// Load passes for display
|
|
@@ -70823,13 +70899,6 @@ var systemBlockDefinitionsRaw = [
|
|
|
70823
70899
|
weight: "featured",
|
|
70824
70900
|
bias: "clear",
|
|
70825
70901
|
surfaces: heroSectionSurfaces
|
|
70826
|
-
}),
|
|
70827
|
-
layoutProfile({
|
|
70828
|
-
variantKey: "splitEditorial",
|
|
70829
|
-
family: "split",
|
|
70830
|
-
weight: "featured",
|
|
70831
|
-
bias: "clear",
|
|
70832
|
-
surfaces: heroSectionSurfaces
|
|
70833
70902
|
})
|
|
70834
70903
|
]
|
|
70835
70904
|
})),
|
|
@@ -71073,9 +71142,8 @@ var systemBlockDefinitionsRaw = [
|
|
|
71073
71142
|
flow: offeringsFlow,
|
|
71074
71143
|
layoutProfiles: [
|
|
71075
71144
|
layoutProfile({ variantKey: "combined", family: "grid", weight: "standard" }),
|
|
71145
|
+
layoutProfile({ variantKey: "calendar", family: "stack", weight: "standard" }),
|
|
71076
71146
|
layoutProfile({ variantKey: "list", family: "stack", weight: "standard" }),
|
|
71077
|
-
layoutProfile({ variantKey: "month", family: "grid", weight: "standard" }),
|
|
71078
|
-
layoutProfile({ variantKey: "week", family: "stack", weight: "standard" }),
|
|
71079
71147
|
layoutProfile({ variantKey: "timetable", family: "stack", weight: "standard" })
|
|
71080
71148
|
]
|
|
71081
71149
|
})),
|
|
@@ -71655,10 +71723,7 @@ function normalizeRenderStage(stage) {
|
|
|
71655
71723
|
return stage === "preview" ? "preview" : "published";
|
|
71656
71724
|
}
|
|
71657
71725
|
function isRouteVisibleInStage(routeEntry, stageInput) {
|
|
71658
|
-
|
|
71659
|
-
if (stage === "preview" || !isRouteRecord(routeEntry)) {
|
|
71660
|
-
return true;
|
|
71661
|
-
}
|
|
71726
|
+
if (normalizeRenderStage(stageInput) === "preview" || !isRouteRecord(routeEntry)) return true;
|
|
71662
71727
|
const status = routeEntry.status;
|
|
71663
71728
|
return !(typeof status === "string" && status !== "published");
|
|
71664
71729
|
}
|
|
@@ -71667,52 +71732,45 @@ function extractRouteHref(candidate, stageInput = "published") {
|
|
|
71667
71732
|
const trimmed = candidate.trim();
|
|
71668
71733
|
return trimmed.length > 0 ? trimmed : null;
|
|
71669
71734
|
}
|
|
71670
|
-
if (!isRouteRecord(candidate))
|
|
71671
|
-
|
|
71672
|
-
|
|
71673
|
-
|
|
71674
|
-
|
|
71735
|
+
if (!isRouteRecord(candidate)) return null;
|
|
71736
|
+
const fields3 = normalizeRenderStage(stageInput) === "preview" ? [
|
|
71737
|
+
"draftPath",
|
|
71738
|
+
"path",
|
|
71739
|
+
"href",
|
|
71740
|
+
"url"
|
|
71741
|
+
] : [
|
|
71742
|
+
"path",
|
|
71743
|
+
"href",
|
|
71744
|
+
"url"
|
|
71745
|
+
];
|
|
71675
71746
|
for (const field of fields3) {
|
|
71676
71747
|
const value = candidate[field];
|
|
71677
|
-
if (typeof value === "string" && value.trim().length > 0)
|
|
71678
|
-
return value.trim();
|
|
71679
|
-
}
|
|
71748
|
+
if (typeof value === "string" && value.trim().length > 0) return value.trim();
|
|
71680
71749
|
}
|
|
71681
71750
|
return null;
|
|
71682
71751
|
}
|
|
71683
71752
|
function extractRouteUpdatedAt(candidate) {
|
|
71684
|
-
if (!isRouteRecord(candidate))
|
|
71685
|
-
|
|
71686
|
-
}
|
|
71687
|
-
const fields3 = [
|
|
71753
|
+
if (!isRouteRecord(candidate)) return null;
|
|
71754
|
+
for (const field of [
|
|
71688
71755
|
"updatedAt",
|
|
71689
71756
|
"updated_at",
|
|
71690
71757
|
"publishedAt",
|
|
71691
71758
|
"published_at",
|
|
71692
71759
|
"modifiedAt",
|
|
71693
71760
|
"modified_at"
|
|
71694
|
-
]
|
|
71695
|
-
for (const field of fields3) {
|
|
71761
|
+
]) {
|
|
71696
71762
|
const value = candidate[field];
|
|
71697
|
-
if (typeof value === "string" && value.length > 0)
|
|
71698
|
-
return value;
|
|
71699
|
-
}
|
|
71763
|
+
if (typeof value === "string" && value.length > 0) return value;
|
|
71700
71764
|
}
|
|
71701
71765
|
return null;
|
|
71702
71766
|
}
|
|
71703
71767
|
function resolveRouteTargetForStage(routeIdValue, routes, stageInput) {
|
|
71704
71768
|
const routeId = typeof routeIdValue === "string" ? routeIdValue : null;
|
|
71705
|
-
if (!routeId || !routes)
|
|
71706
|
-
return null;
|
|
71707
|
-
}
|
|
71769
|
+
if (!routeId || !routes) return null;
|
|
71708
71770
|
const routeEntry = routes[routeId];
|
|
71709
|
-
if (!isRouteVisibleInStage(routeEntry, stageInput))
|
|
71710
|
-
return null;
|
|
71711
|
-
}
|
|
71771
|
+
if (!isRouteVisibleInStage(routeEntry, stageInput)) return null;
|
|
71712
71772
|
const href = extractRouteHref(routeEntry, stageInput);
|
|
71713
|
-
if (!href)
|
|
71714
|
-
return null;
|
|
71715
|
-
}
|
|
71773
|
+
if (!href) return null;
|
|
71716
71774
|
return {
|
|
71717
71775
|
routeId,
|
|
71718
71776
|
href,
|
|
@@ -73534,21 +73592,33 @@ function idleSubmissionFeedback() {
|
|
|
73534
73592
|
return { tag: "idle" };
|
|
73535
73593
|
}
|
|
73536
73594
|
function errorSubmissionFeedback(message2) {
|
|
73537
|
-
return {
|
|
73595
|
+
return {
|
|
73596
|
+
tag: "error",
|
|
73597
|
+
message: message2
|
|
73598
|
+
};
|
|
73538
73599
|
}
|
|
73539
73600
|
function successSubmissionFeedback(message2) {
|
|
73540
|
-
return {
|
|
73601
|
+
return {
|
|
73602
|
+
tag: "success",
|
|
73603
|
+
message: message2
|
|
73604
|
+
};
|
|
73541
73605
|
}
|
|
73542
73606
|
function ok2() {
|
|
73543
73607
|
return { ok: true };
|
|
73544
73608
|
}
|
|
73545
|
-
function
|
|
73546
|
-
return {
|
|
73609
|
+
function okWith(data) {
|
|
73610
|
+
return {
|
|
73611
|
+
ok: true,
|
|
73612
|
+
data
|
|
73613
|
+
};
|
|
73547
73614
|
}
|
|
73548
73615
|
function err2(error) {
|
|
73549
|
-
return {
|
|
73616
|
+
return {
|
|
73617
|
+
ok: false,
|
|
73618
|
+
error
|
|
73619
|
+
};
|
|
73550
73620
|
}
|
|
73551
|
-
function
|
|
73621
|
+
function assertNever8(value, message2) {
|
|
73552
73622
|
throw new Error(`Unexpected value: ${String(value)}`);
|
|
73553
73623
|
}
|
|
73554
73624
|
|
|
@@ -73703,7 +73773,7 @@ function deriveBookingFormViewState(input) {
|
|
|
73703
73773
|
resourceName: input.verificationState.resourceName
|
|
73704
73774
|
};
|
|
73705
73775
|
default:
|
|
73706
|
-
return
|
|
73776
|
+
return assertNever8(input.verificationState);
|
|
73707
73777
|
}
|
|
73708
73778
|
}
|
|
73709
73779
|
function resolveBookingSiteId(siteId, form2) {
|
|
@@ -73873,7 +73943,7 @@ function getBookingServicePaymentSelectionMode(service) {
|
|
|
73873
73943
|
case "flexible_balance":
|
|
73874
73944
|
return "implicit_flexible_balance";
|
|
73875
73945
|
default:
|
|
73876
|
-
return
|
|
73946
|
+
return assertNever8(onlyKind);
|
|
73877
73947
|
}
|
|
73878
73948
|
}
|
|
73879
73949
|
if (allowedKinds.length === 2 && allowedKinds.includes("upfront") && (allowedKinds.includes("deferred_manual") || allowedKinds.includes("instalment_plan") || allowedKinds.includes("flexible_balance"))) {
|
|
@@ -74075,7 +74145,7 @@ function formatBookingSubmissionPreparationError(error) {
|
|
|
74075
74145
|
case "service-missing-duration":
|
|
74076
74146
|
return `Service "${error.serviceTitle}" is missing duration. Please update the service in the dashboard to include a duration (e.g., 30 minutes).`;
|
|
74077
74147
|
default:
|
|
74078
|
-
return
|
|
74148
|
+
return assertNever8(error);
|
|
74079
74149
|
}
|
|
74080
74150
|
}
|
|
74081
74151
|
function getBookingSuccessMessage(successMessage) {
|
|
@@ -74356,7 +74426,7 @@ function BookingFormSSR({
|
|
|
74356
74426
|
}
|
|
74357
74427
|
var booking_form_server_default = BookingFormSSR;
|
|
74358
74428
|
|
|
74359
|
-
// ../blocks/src/system/runtime/nodes/
|
|
74429
|
+
// ../blocks/src/system/runtime/nodes/events/shared/eventProductEligibility.ts
|
|
74360
74430
|
function isCategoryEligible(eligibleCategoryIds, eventCategoryId) {
|
|
74361
74431
|
const categories = eligibleCategoryIds ?? [];
|
|
74362
74432
|
if (categories.length === 0) return true;
|
|
@@ -74371,6 +74441,32 @@ function membershipCoversEvent(args, event) {
|
|
|
74371
74441
|
if (!event.acceptsMemberships) return false;
|
|
74372
74442
|
return isCategoryEligible(args.eligibleCategoryIds, event.eventCategoryId);
|
|
74373
74443
|
}
|
|
74444
|
+
function filterPassesForEvent(sitePasses, event) {
|
|
74445
|
+
if (!sitePasses || !event) return [];
|
|
74446
|
+
if (event.requiresRegistration === false) return [];
|
|
74447
|
+
const acceptsPasses = event.acceptsPasses ?? true;
|
|
74448
|
+
const eventCategoryId = event.eventCategory?.id ?? null;
|
|
74449
|
+
return sitePasses.filter(
|
|
74450
|
+
(pass) => pass.productUseCase === "event_pass" && passCoversEvent(
|
|
74451
|
+
{ eligibleCategoryIds: pass.eligibleCategoryIds },
|
|
74452
|
+
{ acceptsPasses, eventCategoryId }
|
|
74453
|
+
)
|
|
74454
|
+
);
|
|
74455
|
+
}
|
|
74456
|
+
function filterMembershipsForEvent(siteMemberships, event) {
|
|
74457
|
+
if (!siteMemberships || !event) return [];
|
|
74458
|
+
if (event.requiresRegistration === false) return [];
|
|
74459
|
+
const acceptsMemberships = event.acceptsMemberships ?? true;
|
|
74460
|
+
const eventCategoryId = event.eventCategory?.id ?? null;
|
|
74461
|
+
return siteMemberships.filter(
|
|
74462
|
+
(membership) => membershipCoversEvent(
|
|
74463
|
+
{ eligibleCategoryIds: membership.eligibleCategoryIds },
|
|
74464
|
+
{ acceptsMemberships, eventCategoryId }
|
|
74465
|
+
)
|
|
74466
|
+
);
|
|
74467
|
+
}
|
|
74468
|
+
|
|
74469
|
+
// ../blocks/src/system/runtime/nodes/event-details/logic.ts
|
|
74374
74470
|
function parseLimit(value, fallback2) {
|
|
74375
74471
|
const n3 = typeof value === "string" ? parseInt(value, 10) : typeof value === "number" ? value : NaN;
|
|
74376
74472
|
return Number.isFinite(n3) && n3 > 0 ? n3 : fallback2;
|
|
@@ -74429,30 +74525,6 @@ function selectEventDetails(args) {
|
|
|
74429
74525
|
}).slice(0, otherLimit) : [];
|
|
74430
74526
|
return { mode, selected, otherDates, timeZone };
|
|
74431
74527
|
}
|
|
74432
|
-
function filterPassesForEvent(sitePasses, event) {
|
|
74433
|
-
if (!sitePasses || !event) return [];
|
|
74434
|
-
if (event.requiresRegistration === false) return [];
|
|
74435
|
-
const acceptsPasses = event.acceptsPasses ?? true;
|
|
74436
|
-
const eventCategoryId = event.eventCategory?.id ?? null;
|
|
74437
|
-
return sitePasses.filter(
|
|
74438
|
-
(pass) => pass.productUseCase === "event_pass" && passCoversEvent(
|
|
74439
|
-
{ eligibleCategoryIds: pass.eligibleCategoryIds },
|
|
74440
|
-
{ acceptsPasses, eventCategoryId }
|
|
74441
|
-
)
|
|
74442
|
-
);
|
|
74443
|
-
}
|
|
74444
|
-
function filterMembershipsForEvent(siteMemberships, event) {
|
|
74445
|
-
if (!siteMemberships || !event) return [];
|
|
74446
|
-
if (event.requiresRegistration === false) return [];
|
|
74447
|
-
const acceptsMemberships = event.acceptsMemberships ?? true;
|
|
74448
|
-
const eventCategoryId = event.eventCategory?.id ?? null;
|
|
74449
|
-
return siteMemberships.filter(
|
|
74450
|
-
(membership) => membershipCoversEvent(
|
|
74451
|
-
{ eligibleCategoryIds: membership.eligibleCategoryIds },
|
|
74452
|
-
{ acceptsMemberships, eventCategoryId }
|
|
74453
|
-
)
|
|
74454
|
-
);
|
|
74455
|
-
}
|
|
74456
74528
|
function CoursePricingDisplay({
|
|
74457
74529
|
pricing,
|
|
74458
74530
|
acceptedItems
|
|
@@ -75176,6 +75248,7 @@ var eventCombinedSourceSchema = z.object(
|
|
|
75176
75248
|
loadMoreText: z.string().optional(),
|
|
75177
75249
|
startOfWeek: weekStartSchema.optional(),
|
|
75178
75250
|
calendarTabViews: calendarTabViewsSchema.optional(),
|
|
75251
|
+
defaultCalendarView: eventCalendarDefaultViewSchema.optional(),
|
|
75179
75252
|
showFilters: z.boolean().nullable().optional(),
|
|
75180
75253
|
showCategoryFilter: filterAutoShowSchema.optional(),
|
|
75181
75254
|
showVenueFilter: z.boolean().nullable().optional(),
|
|
@@ -75206,6 +75279,7 @@ var eventCombinedDisplaySchema = z.object({
|
|
|
75206
75279
|
paginationAction: eventListPaginationActionSchema,
|
|
75207
75280
|
startOfWeek: weekStartSchema,
|
|
75208
75281
|
calendarTabViews: calendarTabViewsSchema,
|
|
75282
|
+
defaultCalendarView: eventCalendarDefaultViewSchema,
|
|
75209
75283
|
showFilters: z.boolean(),
|
|
75210
75284
|
showCategoryFilter: filterAutoShowSchema,
|
|
75211
75285
|
showVenueFilter: z.boolean(),
|
|
@@ -75262,6 +75336,7 @@ function buildEventCombinedDisplay(source) {
|
|
|
75262
75336
|
}),
|
|
75263
75337
|
startOfWeek: source.startOfWeek ?? "monday",
|
|
75264
75338
|
calendarTabViews: source.calendarTabViews ?? "both",
|
|
75339
|
+
defaultCalendarView: source.defaultCalendarView ?? "month",
|
|
75265
75340
|
showFilters: source.showFilters ?? true,
|
|
75266
75341
|
showCategoryFilter: source.showCategoryFilter ?? "auto",
|
|
75267
75342
|
showVenueFilter: source.showVenueFilter ?? false,
|
|
@@ -76225,10 +76300,118 @@ function EventListingFrameView(props2) {
|
|
|
76225
76300
|
footer
|
|
76226
76301
|
] });
|
|
76227
76302
|
}
|
|
76303
|
+
var AgendaEventCard = ({
|
|
76304
|
+
event,
|
|
76305
|
+
showCapacity,
|
|
76306
|
+
onClick
|
|
76307
|
+
}) => {
|
|
76308
|
+
const eventUrl = event.path;
|
|
76309
|
+
const categoryColor = event.eventCategory?.color || "rgb(var(--tb-accent))";
|
|
76310
|
+
const price = formatEventPrice(event);
|
|
76311
|
+
const { available, isFull } = getEventAvailability(event);
|
|
76312
|
+
const capacity = showCapacity && available != null ? isFull ? "Full" : `${available} spots left` : null;
|
|
76313
|
+
const title = event.title;
|
|
76314
|
+
const timeZone = event.timeZone ?? null;
|
|
76315
|
+
const teacherLine = formatEventTeacherLine(event);
|
|
76316
|
+
const cardContent = /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
76317
|
+
/* @__PURE__ */ jsx(
|
|
76318
|
+
"div",
|
|
76319
|
+
{
|
|
76320
|
+
className: "event-agenda-card-indicator",
|
|
76321
|
+
style: { backgroundColor: categoryColor },
|
|
76322
|
+
"aria-hidden": "true"
|
|
76323
|
+
}
|
|
76324
|
+
),
|
|
76325
|
+
/* @__PURE__ */ jsxs("div", { className: "event-agenda-card-content", children: [
|
|
76326
|
+
/* @__PURE__ */ jsxs("div", { className: "event-agenda-card-header", children: [
|
|
76327
|
+
/* @__PURE__ */ jsx("span", { className: "event-agenda-card-time", children: formatTime(event.startsAt, { timeZone }) }),
|
|
76328
|
+
/* @__PURE__ */ jsx("span", { className: "event-agenda-card-title", children: title })
|
|
76329
|
+
] }),
|
|
76330
|
+
/* @__PURE__ */ jsxs("div", { className: "event-agenda-card-details", children: [
|
|
76331
|
+
event.venue && /* @__PURE__ */ jsxs("span", { className: "event-agenda-card-venue", children: [
|
|
76332
|
+
/* @__PURE__ */ jsxs(
|
|
76333
|
+
"svg",
|
|
76334
|
+
{
|
|
76335
|
+
className: "event-agenda-card-icon",
|
|
76336
|
+
width: "14",
|
|
76337
|
+
height: "14",
|
|
76338
|
+
viewBox: "0 0 24 24",
|
|
76339
|
+
fill: "none",
|
|
76340
|
+
stroke: "currentColor",
|
|
76341
|
+
strokeWidth: "2",
|
|
76342
|
+
strokeLinecap: "round",
|
|
76343
|
+
strokeLinejoin: "round",
|
|
76344
|
+
children: [
|
|
76345
|
+
/* @__PURE__ */ jsx("path", { d: "M21 10c0 7-9 13-9 13s-9-6-9-13a9 9 0 0 1 18 0z" }),
|
|
76346
|
+
/* @__PURE__ */ jsx("circle", { cx: "12", cy: "10", r: "3" })
|
|
76347
|
+
]
|
|
76348
|
+
}
|
|
76349
|
+
),
|
|
76350
|
+
event.venue.name
|
|
76351
|
+
] }),
|
|
76352
|
+
teacherLine && /* @__PURE__ */ jsx("span", { className: "event-agenda-card-teacher", children: teacherLine }),
|
|
76353
|
+
/* @__PURE__ */ jsx("span", { className: "event-agenda-card-price", children: price }),
|
|
76354
|
+
capacity && /* @__PURE__ */ jsx("span", { className: `event-agenda-card-capacity ${isFull ? "event-agenda-card-capacity--full" : ""}`, children: capacity })
|
|
76355
|
+
] })
|
|
76356
|
+
] })
|
|
76357
|
+
] });
|
|
76358
|
+
if (onClick) {
|
|
76359
|
+
return /* @__PURE__ */ jsx(
|
|
76360
|
+
"button",
|
|
76361
|
+
{
|
|
76362
|
+
type: "button",
|
|
76363
|
+
className: "event-agenda-card",
|
|
76364
|
+
onClick: () => onClick(event),
|
|
76365
|
+
children: cardContent
|
|
76366
|
+
}
|
|
76367
|
+
);
|
|
76368
|
+
}
|
|
76369
|
+
return /* @__PURE__ */ jsx("a", { href: eventUrl, className: "event-agenda-card", children: cardContent });
|
|
76370
|
+
};
|
|
76371
|
+
var FULL_DAY_NAMES = ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"];
|
|
76372
|
+
function formatAgendaDayHeader(date) {
|
|
76373
|
+
const dayName = FULL_DAY_NAMES[date.getDay()];
|
|
76374
|
+
const monthName = MONTH_NAMES[date.getMonth()];
|
|
76375
|
+
return `${dayName ?? "Day"}, ${monthName ?? "Month"} ${date.getDate()}`;
|
|
76376
|
+
}
|
|
76377
|
+
var WeekAgendaView = ({
|
|
76378
|
+
days,
|
|
76379
|
+
events: events2,
|
|
76380
|
+
showCapacity,
|
|
76381
|
+
emptyMessage = "No events scheduled"
|
|
76382
|
+
}) => {
|
|
76383
|
+
const eventsByDate = groupEventsByDate(events2);
|
|
76384
|
+
return /* @__PURE__ */ jsx("div", { className: "event-agenda-week", children: days.map((date) => {
|
|
76385
|
+
const dateKey = formatDateKey2(date);
|
|
76386
|
+
const dayEvents = eventsByDate.get(dateKey) || [];
|
|
76387
|
+
const today = isToday(date);
|
|
76388
|
+
return /* @__PURE__ */ jsxs(
|
|
76389
|
+
"div",
|
|
76390
|
+
{
|
|
76391
|
+
className: `event-agenda-day ${today ? "event-agenda-day--today" : ""}`,
|
|
76392
|
+
children: [
|
|
76393
|
+
/* @__PURE__ */ jsx("div", { className: "event-agenda-day-header", children: /* @__PURE__ */ jsxs("h4", { className: "event-agenda-day-title", children: [
|
|
76394
|
+
formatAgendaDayHeader(date),
|
|
76395
|
+
today && /* @__PURE__ */ jsx("span", { className: "event-agenda-day-today-badge", children: "Today" })
|
|
76396
|
+
] }) }),
|
|
76397
|
+
/* @__PURE__ */ jsx("div", { className: "event-agenda-day-content", children: dayEvents.length === 0 ? /* @__PURE__ */ jsx("p", { className: "event-agenda-day-empty", children: emptyMessage }) : /* @__PURE__ */ jsx("div", { className: "event-agenda-day-events", children: dayEvents.map((event) => /* @__PURE__ */ jsx(
|
|
76398
|
+
AgendaEventCard,
|
|
76399
|
+
{
|
|
76400
|
+
event,
|
|
76401
|
+
showCapacity
|
|
76402
|
+
},
|
|
76403
|
+
event.occurrenceId || event.id
|
|
76404
|
+
)) }) })
|
|
76405
|
+
]
|
|
76406
|
+
},
|
|
76407
|
+
dateKey
|
|
76408
|
+
);
|
|
76409
|
+
}) });
|
|
76410
|
+
};
|
|
76228
76411
|
|
|
76229
76412
|
// ../blocks/src/system/runtime/nodes/events/shared/timetableModel.ts
|
|
76230
76413
|
var DEFAULT_EVENT_CELL_COLOR = "rgb(var(--tb-accent))";
|
|
76231
|
-
var
|
|
76414
|
+
var FULL_DAY_NAMES2 = ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"];
|
|
76232
76415
|
function buildTimetableModel2(input) {
|
|
76233
76416
|
const generic = buildTimetableModel({
|
|
76234
76417
|
items: input.events,
|
|
@@ -76288,12 +76471,12 @@ function formatEventTimeRange(event) {
|
|
|
76288
76471
|
return `${formatTime(event.startsAt, { timeZone })} - ${formatTime(event.endsAt, { timeZone })}`;
|
|
76289
76472
|
}
|
|
76290
76473
|
function formatDayLabel(date) {
|
|
76291
|
-
const dayName =
|
|
76474
|
+
const dayName = FULL_DAY_NAMES2[date.getDay()] ?? "";
|
|
76292
76475
|
const monthName = MONTH_NAMES[date.getMonth()] ?? "";
|
|
76293
76476
|
return `${dayName}, ${monthName} ${date.getDate()}`;
|
|
76294
76477
|
}
|
|
76295
76478
|
function formatShortDayLabel(date) {
|
|
76296
|
-
const dayName =
|
|
76479
|
+
const dayName = FULL_DAY_NAMES2[date.getDay()] ?? "";
|
|
76297
76480
|
return `${dayName.slice(0, 3)} ${date.getDate()}`;
|
|
76298
76481
|
}
|
|
76299
76482
|
function assertNeverDisplayMode(value) {
|
|
@@ -76349,8 +76532,8 @@ function renderListSsr(display, prefetchedEvents) {
|
|
|
76349
76532
|
}
|
|
76350
76533
|
);
|
|
76351
76534
|
}
|
|
76352
|
-
function
|
|
76353
|
-
const calendarView = display.
|
|
76535
|
+
function renderCalendarSsr(display) {
|
|
76536
|
+
const calendarView = display.defaultCalendarView;
|
|
76354
76537
|
const viewDate = /* @__PURE__ */ new Date();
|
|
76355
76538
|
const viewport = buildCalendarViewport({
|
|
76356
76539
|
view: calendarView,
|
|
@@ -76394,7 +76577,15 @@ function renderCalendarGrid(display) {
|
|
|
76394
76577
|
}
|
|
76395
76578
|
)
|
|
76396
76579
|
] }),
|
|
76397
|
-
|
|
76580
|
+
viewport.kind === "week" ? /* @__PURE__ */ jsx(
|
|
76581
|
+
WeekAgendaView,
|
|
76582
|
+
{
|
|
76583
|
+
days: viewport.days,
|
|
76584
|
+
events: [...display.events],
|
|
76585
|
+
emptyMessage: display.emptyMessage,
|
|
76586
|
+
showCapacity: display.showCapacity
|
|
76587
|
+
}
|
|
76588
|
+
) : /* @__PURE__ */ jsxs("div", { className: "event-calendar-container", children: [
|
|
76398
76589
|
/* @__PURE__ */ jsx("div", { className: "event-calendar-day-headers", children: dayNames.map((day) => /* @__PURE__ */ jsx("div", { className: "event-calendar-day-header", children: day }, day)) }),
|
|
76399
76590
|
/* @__PURE__ */ jsx("div", { className: "event-calendar-grid", children: viewport.days.map((date) => {
|
|
76400
76591
|
const dateKey = formatDateKey2(date);
|
|
@@ -76432,7 +76623,7 @@ function renderCalendarGrid(display) {
|
|
|
76432
76623
|
] }, dateKey);
|
|
76433
76624
|
}) })
|
|
76434
76625
|
] }),
|
|
76435
|
-
display.events.length === 0 ? /* @__PURE__ */ jsx("p", { className: "event-calendar-empty", children: display.emptyMessage }) : null
|
|
76626
|
+
viewport.kind === "month" && display.events.length === 0 ? /* @__PURE__ */ jsx("p", { className: "event-calendar-empty", children: display.emptyMessage }) : null
|
|
76436
76627
|
] });
|
|
76437
76628
|
}
|
|
76438
76629
|
function renderTimetableSsr(display) {
|
|
@@ -76607,9 +76798,8 @@ var EventCalendarSSR = (props2) => {
|
|
|
76607
76798
|
case "timetable":
|
|
76608
76799
|
content = renderTimetableSsr(display);
|
|
76609
76800
|
break;
|
|
76610
|
-
case "
|
|
76611
|
-
|
|
76612
|
-
content = renderCalendarGrid(display);
|
|
76801
|
+
case "calendar":
|
|
76802
|
+
content = renderCalendarSsr(display);
|
|
76613
76803
|
break;
|
|
76614
76804
|
default:
|
|
76615
76805
|
content = assertNeverDisplayMode(display.displayMode);
|
|
@@ -76660,6 +76850,8 @@ function EventRegistrationSSR({
|
|
|
76660
76850
|
spamProtectionEnabled,
|
|
76661
76851
|
stage,
|
|
76662
76852
|
supportEmail,
|
|
76853
|
+
sitePasses,
|
|
76854
|
+
siteMemberships,
|
|
76663
76855
|
children
|
|
76664
76856
|
}) {
|
|
76665
76857
|
const islandProps = buildEventRegistrationInteractiveIslandProps({
|
|
@@ -76681,7 +76873,9 @@ function EventRegistrationSSR({
|
|
|
76681
76873
|
overlayEnabled,
|
|
76682
76874
|
spamProtectionEnabled,
|
|
76683
76875
|
stage,
|
|
76684
|
-
supportEmail
|
|
76876
|
+
supportEmail,
|
|
76877
|
+
sitePasses,
|
|
76878
|
+
siteMemberships
|
|
76685
76879
|
});
|
|
76686
76880
|
const display = islandProps.render.display;
|
|
76687
76881
|
return /* @__PURE__ */ jsxs(
|
|
@@ -93908,6 +94102,39 @@ function ThemeScope({
|
|
|
93908
94102
|
}
|
|
93909
94103
|
);
|
|
93910
94104
|
}
|
|
94105
|
+
function ResponsiveScope({
|
|
94106
|
+
children,
|
|
94107
|
+
responsiveMode = DEFAULT_THEME_RESPONSIVE_MODE,
|
|
94108
|
+
className
|
|
94109
|
+
}) {
|
|
94110
|
+
const responsiveScope = getResponsiveScopeSpec(responsiveMode);
|
|
94111
|
+
const isContainerResponsive = responsiveScope.kind === "container";
|
|
94112
|
+
const wrapperStyle = isContainerResponsive ? {
|
|
94113
|
+
containerType: "inline-size",
|
|
94114
|
+
containerName: responsiveScope.containerName
|
|
94115
|
+
} : {};
|
|
94116
|
+
return /* @__PURE__ */ jsxs(
|
|
94117
|
+
"div",
|
|
94118
|
+
{
|
|
94119
|
+
className: className ? `theme-scope ${className}` : "theme-scope",
|
|
94120
|
+
style: wrapperStyle,
|
|
94121
|
+
"data-rb-responsive-mode": responsiveScope.kind,
|
|
94122
|
+
"data-theme-scope": "responsive",
|
|
94123
|
+
children: [
|
|
94124
|
+
isContainerResponsive && /* @__PURE__ */ jsx(
|
|
94125
|
+
"style",
|
|
94126
|
+
{
|
|
94127
|
+
"data-container-responsive-overrides": true,
|
|
94128
|
+
dangerouslySetInnerHTML: {
|
|
94129
|
+
__html: escapeStyleContent(containerResponsiveThemeCss)
|
|
94130
|
+
}
|
|
94131
|
+
}
|
|
94132
|
+
),
|
|
94133
|
+
children
|
|
94134
|
+
]
|
|
94135
|
+
}
|
|
94136
|
+
);
|
|
94137
|
+
}
|
|
93911
94138
|
z.object({
|
|
93912
94139
|
tokens: z.record(z.string(), z.string()),
|
|
93913
94140
|
typography: z.object({
|
|
@@ -95387,7 +95614,7 @@ function extractBlockData(content) {
|
|
|
95387
95614
|
}
|
|
95388
95615
|
|
|
95389
95616
|
// ../content-editor/src/utils/assertNever.ts
|
|
95390
|
-
function
|
|
95617
|
+
function assertNever9(value, message2) {
|
|
95391
95618
|
throw new Error(`Unexpected value: ${String(value)}`);
|
|
95392
95619
|
}
|
|
95393
95620
|
function cloneRecord(value) {
|
|
@@ -96146,7 +96373,7 @@ function applyEditorCommand(snapshot, command2) {
|
|
|
96146
96373
|
return nextSnapshot;
|
|
96147
96374
|
}
|
|
96148
96375
|
default:
|
|
96149
|
-
return
|
|
96376
|
+
return assertNever9(command2);
|
|
96150
96377
|
}
|
|
96151
96378
|
}
|
|
96152
96379
|
function applyUserOperation(snapshot, operation) {
|
|
@@ -96234,7 +96461,7 @@ function applySystemOperation(snapshot, operation) {
|
|
|
96234
96461
|
case "replace-block-list":
|
|
96235
96462
|
return replaceEditorBlockList(snapshot, operation.next);
|
|
96236
96463
|
default:
|
|
96237
|
-
return
|
|
96464
|
+
return assertNever9(operation);
|
|
96238
96465
|
}
|
|
96239
96466
|
}
|
|
96240
96467
|
function hydrateMetadataSnapshot(snapshot, baseline, current, published) {
|
|
@@ -100111,7 +100338,7 @@ function toDrainFailure(effect, error) {
|
|
|
100111
100338
|
case "persist-remove":
|
|
100112
100339
|
return { kind: effect.type, message: message2 };
|
|
100113
100340
|
default:
|
|
100114
|
-
return
|
|
100341
|
+
return assertNever9(effect);
|
|
100115
100342
|
}
|
|
100116
100343
|
}
|
|
100117
100344
|
async function drainEditorEffect(effect, context) {
|
|
@@ -100123,7 +100350,7 @@ async function drainEditorEffect(effect, context) {
|
|
|
100123
100350
|
case "persist-remove":
|
|
100124
100351
|
return drainPersistRemoveEffect(effect, context);
|
|
100125
100352
|
default:
|
|
100126
|
-
return
|
|
100353
|
+
return assertNever9(effect);
|
|
100127
100354
|
}
|
|
100128
100355
|
}
|
|
100129
100356
|
async function drainEditorEffects(effects, context) {
|
|
@@ -123425,7 +123652,7 @@ function readSliderFieldUiConfig(ui) {
|
|
|
123425
123652
|
}
|
|
123426
123653
|
|
|
123427
123654
|
// ../block-form/src/manifest/utils.ts
|
|
123428
|
-
function
|
|
123655
|
+
function assertNever10(value) {
|
|
123429
123656
|
throw new Error(`Unhandled manifest variant: ${JSON.stringify(value)}`);
|
|
123430
123657
|
}
|
|
123431
123658
|
function getGroupChildFields(field) {
|
|
@@ -123483,7 +123710,7 @@ function toManifestFieldInput(field) {
|
|
|
123483
123710
|
case "entryPicker":
|
|
123484
123711
|
return field;
|
|
123485
123712
|
}
|
|
123486
|
-
return
|
|
123713
|
+
return assertNever10(field);
|
|
123487
123714
|
}
|
|
123488
123715
|
function numberFieldToManifestInput(field) {
|
|
123489
123716
|
const ui = readNumberFieldUiConfig(field.ui);
|
|
@@ -124117,7 +124344,7 @@ function shouldUseCanonicalSchema(field) {
|
|
|
124117
124344
|
case "button":
|
|
124118
124345
|
return false;
|
|
124119
124346
|
}
|
|
124120
|
-
return
|
|
124347
|
+
return assertNever10(field);
|
|
124121
124348
|
}
|
|
124122
124349
|
function createManifestValidation(manifest, options) {
|
|
124123
124350
|
const { fields: fields3, schema } = createManifestFormAdapter(manifest, {
|
|
@@ -125224,11 +125451,33 @@ function getVisibleWhenPredicates(visibleWhen) {
|
|
|
125224
125451
|
if (isVisibleWhenPredicate(visibleWhen)) {
|
|
125225
125452
|
return [visibleWhen];
|
|
125226
125453
|
}
|
|
125227
|
-
const allOf = visibleWhen.allOf;
|
|
125228
|
-
if (
|
|
125229
|
-
return [];
|
|
125454
|
+
const allOf = "allOf" in visibleWhen ? visibleWhen.allOf : void 0;
|
|
125455
|
+
if (Array.isArray(allOf)) {
|
|
125456
|
+
return allOf.flatMap((condition) => [...getVisibleWhenPredicates(condition)]);
|
|
125457
|
+
}
|
|
125458
|
+
const anyOf = "anyOf" in visibleWhen ? visibleWhen.anyOf : void 0;
|
|
125459
|
+
if (Array.isArray(anyOf)) {
|
|
125460
|
+
return anyOf.flatMap((condition) => [...getVisibleWhenPredicates(condition)]);
|
|
125461
|
+
}
|
|
125462
|
+
return [];
|
|
125463
|
+
}
|
|
125464
|
+
function evaluateVisibleWhen(visibleWhen, evaluatePredicate) {
|
|
125465
|
+
if (isVisibleWhenPredicate(visibleWhen)) {
|
|
125466
|
+
return evaluatePredicate(visibleWhen);
|
|
125230
125467
|
}
|
|
125231
|
-
|
|
125468
|
+
if ("allOf" in visibleWhen) {
|
|
125469
|
+
const conditions = visibleWhen.allOf;
|
|
125470
|
+
return conditions.length === 0 || conditions.every(
|
|
125471
|
+
(condition) => evaluateVisibleWhen(condition, evaluatePredicate)
|
|
125472
|
+
);
|
|
125473
|
+
}
|
|
125474
|
+
if ("anyOf" in visibleWhen) {
|
|
125475
|
+
const conditions = visibleWhen.anyOf;
|
|
125476
|
+
return conditions.length === 0 || conditions.some(
|
|
125477
|
+
(condition) => evaluateVisibleWhen(condition, evaluatePredicate)
|
|
125478
|
+
);
|
|
125479
|
+
}
|
|
125480
|
+
return true;
|
|
125232
125481
|
}
|
|
125233
125482
|
function evaluateVisibleWhenPredicate(condition, watchedValue) {
|
|
125234
125483
|
if (condition.equals !== void 0) {
|
|
@@ -125276,9 +125525,10 @@ function useRepeaterVisibility(field, backend, path) {
|
|
|
125276
125525
|
const satisfiesCondition = useMemo(() => {
|
|
125277
125526
|
if (!visibleWhen) return true;
|
|
125278
125527
|
if (conditions.length === 0) return true;
|
|
125279
|
-
return
|
|
125280
|
-
|
|
125281
|
-
|
|
125528
|
+
return evaluateVisibleWhen(visibleWhen, (condition) => {
|
|
125529
|
+
const index2 = conditions.indexOf(condition);
|
|
125530
|
+
return evaluateVisibleWhenPredicate(condition, watchedValues[index2]);
|
|
125531
|
+
});
|
|
125282
125532
|
}, [visibleWhen, conditions, watchedValues]);
|
|
125283
125533
|
return !isHidden2 && satisfiesCondition;
|
|
125284
125534
|
}
|
|
@@ -126553,6 +126803,24 @@ function useBlockApi() {
|
|
|
126553
126803
|
}
|
|
126554
126804
|
return client;
|
|
126555
126805
|
}
|
|
126806
|
+
|
|
126807
|
+
// ../blocks/src/system/runtime/api/types.ts
|
|
126808
|
+
function discountAvailabilityHasDiscounts(availability) {
|
|
126809
|
+
return availability.type !== "none";
|
|
126810
|
+
}
|
|
126811
|
+
function discountAvailabilityAllowsManualEntry(availability) {
|
|
126812
|
+
return "manualCodeEntryAllowed" in availability && availability.manualCodeEntryAllowed;
|
|
126813
|
+
}
|
|
126814
|
+
function getAutoAppliedDiscountPreview(availability) {
|
|
126815
|
+
switch (availability.type) {
|
|
126816
|
+
case "none":
|
|
126817
|
+
case "manual":
|
|
126818
|
+
return null;
|
|
126819
|
+
case "auto":
|
|
126820
|
+
case "auto_and_manual":
|
|
126821
|
+
return availability.autoAppliedDiscount;
|
|
126822
|
+
}
|
|
126823
|
+
}
|
|
126556
126824
|
function AltchaWidget({
|
|
126557
126825
|
challengeUrl,
|
|
126558
126826
|
onSolutionChange,
|
|
@@ -126596,7 +126864,7 @@ function AltchaWidget({
|
|
|
126596
126864
|
}
|
|
126597
126865
|
};
|
|
126598
126866
|
}, [challengeUrl, auto, hidelogo, className, onSolutionChange]);
|
|
126599
|
-
return
|
|
126867
|
+
return createElement("div", { ref: containerRef });
|
|
126600
126868
|
}
|
|
126601
126869
|
|
|
126602
126870
|
// ../altcha/src/client.ts
|
|
@@ -126817,7 +127085,7 @@ function availableDatesReducer(state, action) {
|
|
|
126817
127085
|
case "load-failed":
|
|
126818
127086
|
return { tag: "error", data: state.data, message: action.message };
|
|
126819
127087
|
default:
|
|
126820
|
-
return
|
|
127088
|
+
return assertNever8(action);
|
|
126821
127089
|
}
|
|
126822
127090
|
}
|
|
126823
127091
|
|
|
@@ -126938,7 +127206,7 @@ function getAvailableSlots(state) {
|
|
|
126938
127206
|
case "error":
|
|
126939
127207
|
return state.slots;
|
|
126940
127208
|
default:
|
|
126941
|
-
return
|
|
127209
|
+
return assertNever8(state);
|
|
126942
127210
|
}
|
|
126943
127211
|
}
|
|
126944
127212
|
function hasLoadedAvailableSlots(state) {
|
|
@@ -126952,7 +127220,7 @@ function hasLoadedAvailableSlots(state) {
|
|
|
126952
127220
|
case "loaded":
|
|
126953
127221
|
return true;
|
|
126954
127222
|
default:
|
|
126955
|
-
return
|
|
127223
|
+
return assertNever8(state);
|
|
126956
127224
|
}
|
|
126957
127225
|
}
|
|
126958
127226
|
function isLoadingAvailableSlots(state) {
|
|
@@ -126986,7 +127254,7 @@ function availableSlotsReducer(state, action) {
|
|
|
126986
127254
|
message: action.message
|
|
126987
127255
|
};
|
|
126988
127256
|
default:
|
|
126989
|
-
return
|
|
127257
|
+
return assertNever8(action);
|
|
126990
127258
|
}
|
|
126991
127259
|
}
|
|
126992
127260
|
|
|
@@ -127092,7 +127360,7 @@ function bookingSubmissionReducer(state, action) {
|
|
|
127092
127360
|
case "feedback-cleared":
|
|
127093
127361
|
return clearWorkflowFeedback(state);
|
|
127094
127362
|
default:
|
|
127095
|
-
return
|
|
127363
|
+
return assertNever8(action);
|
|
127096
127364
|
}
|
|
127097
127365
|
}
|
|
127098
127366
|
function selectIsSubmitting(state) {
|
|
@@ -127136,7 +127404,7 @@ function useBookingSubmission(_siteId) {
|
|
|
127136
127404
|
type: "submission-succeeded",
|
|
127137
127405
|
message: response.type === "checkout_redirect" ? "Redirecting to secure checkout..." : "Booking submitted successfully."
|
|
127138
127406
|
});
|
|
127139
|
-
return
|
|
127407
|
+
return okWith(response);
|
|
127140
127408
|
} catch (error) {
|
|
127141
127409
|
console.error("Booking submission error:", error);
|
|
127142
127410
|
const message2 = error instanceof Error ? error.message : "Failed to book appointment";
|
|
@@ -127155,64 +127423,156 @@ function useBookingSubmission(_siteId) {
|
|
|
127155
127423
|
isSubmitting: selectIsSubmitting(state)
|
|
127156
127424
|
};
|
|
127157
127425
|
}
|
|
127426
|
+
|
|
127427
|
+
// ../blocks/src/system/runtime/nodes/event-registration/useDiscountCodeUi.state.ts
|
|
127428
|
+
var initialDiscountCodeUiState = {
|
|
127429
|
+
discountUiOpen: false,
|
|
127430
|
+
discountCode: "",
|
|
127431
|
+
availability: { tag: "disabled" }
|
|
127432
|
+
};
|
|
127433
|
+
function getDiscountContextKey(context) {
|
|
127434
|
+
if (!context) return "disabled";
|
|
127435
|
+
switch (context.type) {
|
|
127436
|
+
case "event":
|
|
127437
|
+
return [
|
|
127438
|
+
context.type,
|
|
127439
|
+
context.eventSeriesId,
|
|
127440
|
+
context.eventCategoryId ?? "",
|
|
127441
|
+
context.ticketsCount ?? ""
|
|
127442
|
+
].join(":");
|
|
127443
|
+
case "appointment":
|
|
127444
|
+
return [context.type, context.serviceId].join(":");
|
|
127445
|
+
case "course":
|
|
127446
|
+
return [context.type, context.courseId].join(":");
|
|
127447
|
+
case "pass":
|
|
127448
|
+
return [context.type, context.passId].join(":");
|
|
127449
|
+
case "membership":
|
|
127450
|
+
return [context.type, context.membershipId].join(":");
|
|
127451
|
+
case "product":
|
|
127452
|
+
return [context.type, context.productId, context.productCategoryId ?? ""].join(":");
|
|
127453
|
+
}
|
|
127454
|
+
}
|
|
127455
|
+
function buildDiscountAvailabilityRequestPlan(options) {
|
|
127456
|
+
if (!options.discountContext) {
|
|
127457
|
+
return { ok: false, key: "disabled" };
|
|
127458
|
+
}
|
|
127459
|
+
const subtotalCents = options.subtotalCents;
|
|
127460
|
+
const key = [
|
|
127461
|
+
getDiscountContextKey(options.discountContext),
|
|
127462
|
+
subtotalCents ?? ""
|
|
127463
|
+
].join("|");
|
|
127464
|
+
return {
|
|
127465
|
+
ok: true,
|
|
127466
|
+
key,
|
|
127467
|
+
request: {
|
|
127468
|
+
context: options.discountContext,
|
|
127469
|
+
...subtotalCents !== void 0 ? { subtotalCents } : {}
|
|
127470
|
+
}
|
|
127471
|
+
};
|
|
127472
|
+
}
|
|
127473
|
+
function discountAvailabilityStateFromResponse(response) {
|
|
127474
|
+
if (!discountAvailabilityHasDiscounts(response)) {
|
|
127475
|
+
return { tag: "unavailable" };
|
|
127476
|
+
}
|
|
127477
|
+
return {
|
|
127478
|
+
tag: "available",
|
|
127479
|
+
manualCodeEntryAllowed: discountAvailabilityAllowsManualEntry(response),
|
|
127480
|
+
autoAppliedDiscount: getAutoAppliedDiscountPreview(response)
|
|
127481
|
+
};
|
|
127482
|
+
}
|
|
127483
|
+
function discountCodeUiReducer(state, event) {
|
|
127484
|
+
switch (event.type) {
|
|
127485
|
+
case "availability-disabled":
|
|
127486
|
+
return initialDiscountCodeUiState;
|
|
127487
|
+
case "availability-loading":
|
|
127488
|
+
return {
|
|
127489
|
+
...state,
|
|
127490
|
+
availability: { tag: "loading" }
|
|
127491
|
+
};
|
|
127492
|
+
case "availability-loaded": {
|
|
127493
|
+
const availability = discountAvailabilityStateFromResponse(event.response);
|
|
127494
|
+
if (availability.tag !== "available" || !availability.manualCodeEntryAllowed) {
|
|
127495
|
+
return {
|
|
127496
|
+
...state,
|
|
127497
|
+
discountUiOpen: false,
|
|
127498
|
+
discountCode: "",
|
|
127499
|
+
availability
|
|
127500
|
+
};
|
|
127501
|
+
}
|
|
127502
|
+
return {
|
|
127503
|
+
...state,
|
|
127504
|
+
availability
|
|
127505
|
+
};
|
|
127506
|
+
}
|
|
127507
|
+
case "availability-failed":
|
|
127508
|
+
return {
|
|
127509
|
+
...state,
|
|
127510
|
+
discountUiOpen: false,
|
|
127511
|
+
discountCode: "",
|
|
127512
|
+
availability: { tag: "error" }
|
|
127513
|
+
};
|
|
127514
|
+
case "discount-code-changed":
|
|
127515
|
+
return {
|
|
127516
|
+
...state,
|
|
127517
|
+
discountCode: event.code
|
|
127518
|
+
};
|
|
127519
|
+
case "discount-ui-open-changed":
|
|
127520
|
+
return {
|
|
127521
|
+
...state,
|
|
127522
|
+
discountUiOpen: event.isOpen
|
|
127523
|
+
};
|
|
127524
|
+
}
|
|
127525
|
+
}
|
|
127526
|
+
|
|
127527
|
+
// ../blocks/src/system/runtime/nodes/event-registration/useDiscountCodeUi.ts
|
|
127528
|
+
function useStableDiscountAvailabilityRequestPlan(options) {
|
|
127529
|
+
const nextPlan = buildDiscountAvailabilityRequestPlan(options);
|
|
127530
|
+
const planRef = useRef(nextPlan);
|
|
127531
|
+
if (planRef.current.key !== nextPlan.key) {
|
|
127532
|
+
planRef.current = nextPlan;
|
|
127533
|
+
}
|
|
127534
|
+
return planRef.current;
|
|
127535
|
+
}
|
|
127158
127536
|
function useDiscountCodeUi(options) {
|
|
127159
|
-
const [
|
|
127160
|
-
|
|
127161
|
-
|
|
127162
|
-
|
|
127163
|
-
const
|
|
127164
|
-
const [discountsAvailableLoading, setDiscountsAvailableLoading] = useState(false);
|
|
127537
|
+
const [state, dispatch] = useReducer(
|
|
127538
|
+
discountCodeUiReducer,
|
|
127539
|
+
initialDiscountCodeUiState
|
|
127540
|
+
);
|
|
127541
|
+
const requestPlan = useStableDiscountAvailabilityRequestPlan(options);
|
|
127165
127542
|
useEffect(() => {
|
|
127166
127543
|
let cancelled = false;
|
|
127167
127544
|
async function checkDiscountAvailability() {
|
|
127168
|
-
if (!
|
|
127169
|
-
|
|
127170
|
-
setManualCodeEntryAllowed(false);
|
|
127171
|
-
setAutoAppliedDiscount(null);
|
|
127172
|
-
setDiscountsAvailableLoading(false);
|
|
127173
|
-
setDiscountUiOpen(false);
|
|
127174
|
-
setDiscountCode("");
|
|
127545
|
+
if (!requestPlan.ok) {
|
|
127546
|
+
dispatch({ type: "availability-disabled" });
|
|
127175
127547
|
return;
|
|
127176
127548
|
}
|
|
127177
|
-
|
|
127549
|
+
dispatch({ type: "availability-loading" });
|
|
127178
127550
|
try {
|
|
127179
|
-
const res = await options.api.getDiscountsAvailable(
|
|
127180
|
-
context: options.discountContext,
|
|
127181
|
-
subtotalCents: options.subtotalCents
|
|
127182
|
-
});
|
|
127551
|
+
const res = await options.api.getDiscountsAvailable(requestPlan.request);
|
|
127183
127552
|
if (cancelled) return;
|
|
127184
|
-
|
|
127185
|
-
setManualCodeEntryAllowed(res.manualCodeEntryAllowed);
|
|
127186
|
-
setAutoAppliedDiscount(res.autoAppliedDiscount);
|
|
127187
|
-
if (!res.hasDiscounts || !res.manualCodeEntryAllowed) {
|
|
127188
|
-
setDiscountUiOpen(false);
|
|
127189
|
-
setDiscountCode("");
|
|
127190
|
-
}
|
|
127553
|
+
dispatch({ type: "availability-loaded", response: res });
|
|
127191
127554
|
} catch {
|
|
127192
127555
|
if (cancelled) return;
|
|
127193
|
-
|
|
127194
|
-
setManualCodeEntryAllowed(false);
|
|
127195
|
-
setAutoAppliedDiscount(null);
|
|
127196
|
-
setDiscountUiOpen(false);
|
|
127197
|
-
setDiscountCode("");
|
|
127198
|
-
} finally {
|
|
127199
|
-
if (!cancelled) setDiscountsAvailableLoading(false);
|
|
127556
|
+
dispatch({ type: "availability-failed" });
|
|
127200
127557
|
}
|
|
127201
127558
|
}
|
|
127202
127559
|
void checkDiscountAvailability();
|
|
127203
127560
|
return () => {
|
|
127204
127561
|
cancelled = true;
|
|
127205
127562
|
};
|
|
127206
|
-
}, [options.api,
|
|
127563
|
+
}, [options.api, requestPlan]);
|
|
127564
|
+
const availability = state.availability;
|
|
127565
|
+
const isAvailable = availability.tag === "available";
|
|
127566
|
+
const manualCodeEntryAllowed = isAvailable ? availability.manualCodeEntryAllowed : false;
|
|
127207
127567
|
return {
|
|
127208
|
-
discountUiOpen,
|
|
127209
|
-
setDiscountUiOpen,
|
|
127210
|
-
discountCode,
|
|
127211
|
-
setDiscountCode,
|
|
127212
|
-
discountsAvailable,
|
|
127568
|
+
discountUiOpen: state.discountUiOpen,
|
|
127569
|
+
setDiscountUiOpen: (isOpen) => dispatch({ type: "discount-ui-open-changed", isOpen }),
|
|
127570
|
+
discountCode: state.discountCode,
|
|
127571
|
+
setDiscountCode: (code) => dispatch({ type: "discount-code-changed", code }),
|
|
127572
|
+
discountsAvailable: isAvailable,
|
|
127213
127573
|
manualCodeEntryAllowed,
|
|
127214
|
-
autoAppliedDiscount,
|
|
127215
|
-
discountsAvailableLoading
|
|
127574
|
+
autoAppliedDiscount: isAvailable ? availability.autoAppliedDiscount : null,
|
|
127575
|
+
discountsAvailableLoading: availability.tag === "loading"
|
|
127216
127576
|
};
|
|
127217
127577
|
}
|
|
127218
127578
|
|
|
@@ -127395,7 +127755,7 @@ function buildBookingPaymentOptionViewModel(input) {
|
|
|
127395
127755
|
};
|
|
127396
127756
|
}
|
|
127397
127757
|
default:
|
|
127398
|
-
return
|
|
127758
|
+
return assertNever8(input.option);
|
|
127399
127759
|
}
|
|
127400
127760
|
}
|
|
127401
127761
|
function buildInstalmentSchedulePreview(input) {
|
|
@@ -127452,7 +127812,7 @@ function buildInstalmentSchedulePreview(input) {
|
|
|
127452
127812
|
})));
|
|
127453
127813
|
}
|
|
127454
127814
|
default:
|
|
127455
|
-
return
|
|
127815
|
+
return assertNever8(input.option.plan);
|
|
127456
127816
|
}
|
|
127457
127817
|
}
|
|
127458
127818
|
function getPaymentCadenceLabel(plan) {
|
|
@@ -127676,7 +128036,7 @@ function bookingFlowReducer(state, event) {
|
|
|
127676
128036
|
case "reset":
|
|
127677
128037
|
return event.initial;
|
|
127678
128038
|
default:
|
|
127679
|
-
return
|
|
128039
|
+
return assertNever8(event);
|
|
127680
128040
|
}
|
|
127681
128041
|
}
|
|
127682
128042
|
function clearAvailabilityFeedback(feedback) {
|
|
@@ -127805,7 +128165,7 @@ function validateBookingStep(input) {
|
|
|
127805
128165
|
return Object.keys(errors).length > 0 ? { ok: false, errors: createFieldBookingValidationErrors(errors) } : { ok: true };
|
|
127806
128166
|
}
|
|
127807
128167
|
default:
|
|
127808
|
-
return
|
|
128168
|
+
return assertNever8(input.stepId);
|
|
127809
128169
|
}
|
|
127810
128170
|
}
|
|
127811
128171
|
function validateBookingFields(input) {
|
|
@@ -128097,7 +128457,7 @@ function resolveAppointmentPackagesModel(input) {
|
|
|
128097
128457
|
};
|
|
128098
128458
|
}
|
|
128099
128459
|
default:
|
|
128100
|
-
return
|
|
128460
|
+
return assertNever8(input.state);
|
|
128101
128461
|
}
|
|
128102
128462
|
}
|
|
128103
128463
|
function toHeadlessEligibleAppointmentPackage(appointmentPackage) {
|
|
@@ -128421,7 +128781,10 @@ function useHeadlessBookingFlow(options) {
|
|
|
128421
128781
|
state.selectedDate,
|
|
128422
128782
|
state.selectedSlot
|
|
128423
128783
|
]);
|
|
128424
|
-
const appointmentDiscountContext =
|
|
128784
|
+
const appointmentDiscountContext = useMemo(
|
|
128785
|
+
() => selectedService && (selectedService.priceAmount ?? 0) > 0 ? { type: "appointment", serviceId: selectedService.id } : null,
|
|
128786
|
+
[selectedService?.id, selectedService?.priceAmount]
|
|
128787
|
+
);
|
|
128425
128788
|
const discountUi = useDiscountCodeUi({
|
|
128426
128789
|
api,
|
|
128427
128790
|
discountContext: appointmentDiscountContext,
|
|
@@ -128807,7 +129170,7 @@ function pollingReducer(state, action) {
|
|
|
128807
129170
|
case "timeout":
|
|
128808
129171
|
return state;
|
|
128809
129172
|
default:
|
|
128810
|
-
return
|
|
129173
|
+
return assertNever8(state);
|
|
128811
129174
|
}
|
|
128812
129175
|
case "polling-timed-out":
|
|
128813
129176
|
return {
|
|
@@ -128816,7 +129179,7 @@ function pollingReducer(state, action) {
|
|
|
128816
129179
|
error: new Error("Polling timed out")
|
|
128817
129180
|
};
|
|
128818
129181
|
default:
|
|
128819
|
-
return
|
|
129182
|
+
return assertNever8(action);
|
|
128820
129183
|
}
|
|
128821
129184
|
}
|
|
128822
129185
|
|
|
@@ -129342,7 +129705,7 @@ function DefaultBookingStepContent({
|
|
|
129342
129705
|
case "custom-fields":
|
|
129343
129706
|
return /* @__PURE__ */ jsx(DefaultDynamicFields, { fields: booking.fields.items, booking });
|
|
129344
129707
|
default:
|
|
129345
|
-
return
|
|
129708
|
+
return assertNever8(stepId);
|
|
129346
129709
|
}
|
|
129347
129710
|
}
|
|
129348
129711
|
function DefaultServiceSelectionStep({
|
|
@@ -130649,12 +131012,18 @@ function createInitialRegistrationFlowState(hasPreSelectedContext) {
|
|
|
130649
131012
|
};
|
|
130650
131013
|
}
|
|
130651
131014
|
function selectionEquals(a2, b2) {
|
|
130652
|
-
return a2.method === b2.method && a2.passId === b2.passId && a2.membershipId === b2.membershipId && a2.bundlePassId === b2.bundlePassId && a2.bundleMembershipId === b2.bundleMembershipId && a2.productName === b2.productName && a2.productDescription === b2.productDescription && a2.productPrice === b2.productPrice && a2.productCurrency === b2.productCurrency && a2.productInterval === b2.productInterval;
|
|
131015
|
+
return a2.method === b2.method && a2.passId === b2.passId && a2.membershipId === b2.membershipId && a2.bundlePassId === b2.bundlePassId && a2.bundleMembershipId === b2.bundleMembershipId && a2.productName === b2.productName && a2.productDescription === b2.productDescription && a2.productPrice === b2.productPrice && a2.productCurrency === b2.productCurrency && a2.productInterval === b2.productInterval && a2.collectionOptionKind === b2.collectionOptionKind;
|
|
130653
131016
|
}
|
|
130654
131017
|
function withDefaultSelection(selection) {
|
|
130655
131018
|
if (!selection || !selection.method) {
|
|
130656
131019
|
return { method: null };
|
|
130657
131020
|
}
|
|
131021
|
+
if (selection.method === "stripe") {
|
|
131022
|
+
return {
|
|
131023
|
+
...selection,
|
|
131024
|
+
collectionOptionKind: selection.collectionOptionKind ?? "upfront"
|
|
131025
|
+
};
|
|
131026
|
+
}
|
|
130658
131027
|
return selection;
|
|
130659
131028
|
}
|
|
130660
131029
|
function computeAutoSelection(input) {
|
|
@@ -130680,7 +131049,7 @@ function computeAutoSelection(input) {
|
|
|
130680
131049
|
}
|
|
130681
131050
|
}
|
|
130682
131051
|
if (eligibility.canPayDirectly && eligibility.price) {
|
|
130683
|
-
return { method: "stripe" };
|
|
131052
|
+
return { method: "stripe", collectionOptionKind: "upfront" };
|
|
130684
131053
|
}
|
|
130685
131054
|
return { method: null };
|
|
130686
131055
|
}
|
|
@@ -130698,11 +131067,17 @@ function isSelectionValid(input) {
|
|
|
130698
131067
|
case "pass":
|
|
130699
131068
|
return isAuthenticated && ticketsCount === 1 && !!selection.passId && eligibility.eligiblePasses.some((pass) => pass.id === selection.passId);
|
|
130700
131069
|
case "membership":
|
|
130701
|
-
return isAuthenticated && ticketsCount === 1 && !!selection.membershipId && eligibility.eligibleMemberships.some(
|
|
131070
|
+
return isAuthenticated && ticketsCount === 1 && !!selection.membershipId && eligibility.eligibleMemberships.some(
|
|
131071
|
+
(membership) => membership.id === selection.membershipId
|
|
131072
|
+
);
|
|
130702
131073
|
case "pass_bundle":
|
|
130703
|
-
return ticketsCount === 1 && !!selection.bundlePassId && eligibility.availablePasses.some(
|
|
131074
|
+
return ticketsCount === 1 && !!selection.bundlePassId && eligibility.availablePasses.some(
|
|
131075
|
+
(pass) => pass.id === selection.bundlePassId
|
|
131076
|
+
);
|
|
130704
131077
|
case "membership_bundle":
|
|
130705
|
-
return ticketsCount === 1 && !!selection.bundleMembershipId && eligibility.availableMemberships.some(
|
|
131078
|
+
return ticketsCount === 1 && !!selection.bundleMembershipId && eligibility.availableMemberships.some(
|
|
131079
|
+
(membership) => membership.id === selection.bundleMembershipId
|
|
131080
|
+
);
|
|
130706
131081
|
default:
|
|
130707
131082
|
return false;
|
|
130708
131083
|
}
|
|
@@ -130749,9 +131124,15 @@ function registrationFlowReducer(state, action) {
|
|
|
130749
131124
|
ticketsCount: Math.max(1, action.ticketsCount)
|
|
130750
131125
|
});
|
|
130751
131126
|
case "set-authenticated":
|
|
130752
|
-
return normalizeRegistrationFlowState({
|
|
131127
|
+
return normalizeRegistrationFlowState({
|
|
131128
|
+
...state,
|
|
131129
|
+
isAuthenticated: action.isAuthenticated
|
|
131130
|
+
});
|
|
130753
131131
|
case "eligibility-updated":
|
|
130754
|
-
return normalizeRegistrationFlowState({
|
|
131132
|
+
return normalizeRegistrationFlowState({
|
|
131133
|
+
...state,
|
|
131134
|
+
eligibility: action.eligibility
|
|
131135
|
+
});
|
|
130755
131136
|
case "set-manual-payment-selection":
|
|
130756
131137
|
return normalizeRegistrationFlowState({
|
|
130757
131138
|
...state,
|
|
@@ -130763,7 +131144,7 @@ function registrationFlowReducer(state, action) {
|
|
|
130763
131144
|
return normalizeRegistrationFlowState({
|
|
130764
131145
|
...state,
|
|
130765
131146
|
passOptOut: true,
|
|
130766
|
-
paymentSelection: { method: "stripe" },
|
|
131147
|
+
paymentSelection: { method: "stripe", collectionOptionKind: "upfront" },
|
|
130767
131148
|
selectionSource: "manual"
|
|
130768
131149
|
});
|
|
130769
131150
|
case "event-changed":
|
|
@@ -130809,7 +131190,10 @@ function normalizeEventRegistrationMaxTickets(value) {
|
|
|
130809
131190
|
function resolveEventRegistrationSubmitPlan(input) {
|
|
130810
131191
|
const selection = input.paymentSelection.method ? input.paymentSelection : void 0;
|
|
130811
131192
|
if (input.canJoinWaitlist) {
|
|
130812
|
-
return {
|
|
131193
|
+
return {
|
|
131194
|
+
ok: true,
|
|
131195
|
+
args: withOptionalSelection({ method: "free" }, selection)
|
|
131196
|
+
};
|
|
130813
131197
|
}
|
|
130814
131198
|
switch (input.paymentSelection.method) {
|
|
130815
131199
|
case "pass":
|
|
@@ -130824,19 +131208,28 @@ function resolveEventRegistrationSubmitPlan(input) {
|
|
|
130824
131208
|
return input.paymentSelection.membershipId ? {
|
|
130825
131209
|
ok: true,
|
|
130826
131210
|
args: withOptionalSelection(
|
|
130827
|
-
{
|
|
131211
|
+
{
|
|
131212
|
+
method: "membership",
|
|
131213
|
+
membershipId: input.paymentSelection.membershipId
|
|
131214
|
+
},
|
|
130828
131215
|
selection
|
|
130829
131216
|
)
|
|
130830
131217
|
} : missingPaymentSelection();
|
|
130831
131218
|
case "free":
|
|
130832
|
-
return {
|
|
131219
|
+
return {
|
|
131220
|
+
ok: true,
|
|
131221
|
+
args: withOptionalSelection({ method: "free" }, selection)
|
|
131222
|
+
};
|
|
130833
131223
|
case null:
|
|
130834
131224
|
return input.eventRequiresPayment ? missingPaymentSelection() : { ok: true, args: { method: "free" } };
|
|
130835
131225
|
case "pass_bundle":
|
|
130836
131226
|
return input.paymentSelection.bundlePassId ? {
|
|
130837
131227
|
ok: true,
|
|
130838
131228
|
args: withOptionalSelection(
|
|
130839
|
-
{
|
|
131229
|
+
{
|
|
131230
|
+
method: "pass_bundle",
|
|
131231
|
+
passId: input.paymentSelection.bundlePassId
|
|
131232
|
+
},
|
|
130840
131233
|
selection
|
|
130841
131234
|
)
|
|
130842
131235
|
} : missingPaymentSelection();
|
|
@@ -130852,7 +131245,10 @@ function resolveEventRegistrationSubmitPlan(input) {
|
|
|
130852
131245
|
)
|
|
130853
131246
|
} : missingPaymentSelection();
|
|
130854
131247
|
case "stripe":
|
|
130855
|
-
return {
|
|
131248
|
+
return {
|
|
131249
|
+
ok: true,
|
|
131250
|
+
args: withOptionalSelection({ method: "stripe" }, selection)
|
|
131251
|
+
};
|
|
130856
131252
|
}
|
|
130857
131253
|
}
|
|
130858
131254
|
function withOptionalSelection(args, selection) {
|
|
@@ -131006,7 +131402,7 @@ function eligibilityLookupReducer(state, action) {
|
|
|
131006
131402
|
error: action.message
|
|
131007
131403
|
};
|
|
131008
131404
|
default:
|
|
131009
|
-
return
|
|
131405
|
+
return assertNever8(action);
|
|
131010
131406
|
}
|
|
131011
131407
|
}
|
|
131012
131408
|
var initialExistingRegistrationLookupState = {
|
|
@@ -131028,7 +131424,7 @@ function existingRegistrationLookupReducer(state, action) {
|
|
|
131028
131424
|
registration: action.registration
|
|
131029
131425
|
};
|
|
131030
131426
|
default:
|
|
131031
|
-
return
|
|
131427
|
+
return assertNever8(action);
|
|
131032
131428
|
}
|
|
131033
131429
|
}
|
|
131034
131430
|
|
|
@@ -131936,10 +132332,72 @@ function SelectableOptionCard(props2) {
|
|
|
131936
132332
|
}
|
|
131937
132333
|
);
|
|
131938
132334
|
}
|
|
132335
|
+
|
|
132336
|
+
// ../blocks/src/system/runtime/nodes/event-registration/eventPaymentOptions.ts
|
|
132337
|
+
var DEFAULT_EVENT_DIRECT_PAYMENT_OPTION = {
|
|
132338
|
+
kind: "upfront"
|
|
132339
|
+
};
|
|
132340
|
+
function buildEventRegistrationPaymentOptionsViewModel(input) {
|
|
132341
|
+
const supportedOptions = selectSupportedEventDirectPaymentOptions(
|
|
132342
|
+
input.paymentTerms
|
|
132343
|
+
);
|
|
132344
|
+
const selection = buildBookingPaymentSelectionViewModel({
|
|
132345
|
+
serviceTitle: input.eventTitle,
|
|
132346
|
+
paymentTerms: { allowedOptions: [...supportedOptions] },
|
|
132347
|
+
priceAmount: input.totalPriceCents,
|
|
132348
|
+
priceCurrency: input.currency,
|
|
132349
|
+
bookingStartAt: input.startsAt,
|
|
132350
|
+
locale: input.locale
|
|
132351
|
+
});
|
|
132352
|
+
return {
|
|
132353
|
+
mode: selection.mode,
|
|
132354
|
+
sectionTitle: selection.sectionTitle,
|
|
132355
|
+
options: selection.options.map(
|
|
132356
|
+
(option) => toEventDirectPaymentOption(option, selection.mode)
|
|
132357
|
+
)
|
|
132358
|
+
};
|
|
132359
|
+
}
|
|
132360
|
+
function selectSupportedEventDirectPaymentOptions(paymentTerms) {
|
|
132361
|
+
const supported = paymentTerms?.allowedOptions.filter(isSupportedEventDirectPaymentOption) ?? [];
|
|
132362
|
+
return supported.length > 0 ? supported : [DEFAULT_EVENT_DIRECT_PAYMENT_OPTION];
|
|
132363
|
+
}
|
|
132364
|
+
function isSupportedEventDirectPaymentOption(option) {
|
|
132365
|
+
return option.kind === "upfront" || option.kind === "flexible_balance";
|
|
132366
|
+
}
|
|
132367
|
+
function toEventDirectPaymentOption(option, mode) {
|
|
132368
|
+
switch (option.kind) {
|
|
132369
|
+
case "upfront":
|
|
132370
|
+
return {
|
|
132371
|
+
...option,
|
|
132372
|
+
kind: "upfront",
|
|
132373
|
+
label: mode === "choice_required" ? "Pay in full now" : "Pay by card"
|
|
132374
|
+
};
|
|
132375
|
+
case "flexible_balance":
|
|
132376
|
+
return {
|
|
132377
|
+
...option,
|
|
132378
|
+
kind: "flexible_balance",
|
|
132379
|
+
label: "Pay deposit now"
|
|
132380
|
+
};
|
|
132381
|
+
case "deferred_manual":
|
|
132382
|
+
case "instalment_plan":
|
|
132383
|
+
throw new Error(
|
|
132384
|
+
`Unsupported event registration payment option: ${option.kind}`
|
|
132385
|
+
);
|
|
132386
|
+
}
|
|
132387
|
+
}
|
|
131939
132388
|
function PaymentCheckIcon() {
|
|
131940
132389
|
return /* @__PURE__ */ jsx("div", { className: "er-check", children: /* @__PURE__ */ jsx(CheckIcon2, {}) });
|
|
131941
132390
|
}
|
|
131942
|
-
function PaymentTile({
|
|
132391
|
+
function PaymentTile({
|
|
132392
|
+
icon: icon2,
|
|
132393
|
+
label,
|
|
132394
|
+
detail,
|
|
132395
|
+
selected,
|
|
132396
|
+
disabled,
|
|
132397
|
+
tooltip,
|
|
132398
|
+
upsell,
|
|
132399
|
+
onClick
|
|
132400
|
+
}) {
|
|
131943
132401
|
return /* @__PURE__ */ jsx(
|
|
131944
132402
|
SelectableOptionCard,
|
|
131945
132403
|
{
|
|
@@ -131962,6 +132420,16 @@ function PaymentTile({ icon: icon2, label, detail, selected, disabled, tooltip,
|
|
|
131962
132420
|
}
|
|
131963
132421
|
);
|
|
131964
132422
|
}
|
|
132423
|
+
function formatDirectPaymentOptionDetail(option) {
|
|
132424
|
+
const dueToday = option.summaryRows.find((row) => row.label === "Due today");
|
|
132425
|
+
const balanceDueBy = option.summaryRows.find(
|
|
132426
|
+
(row) => row.label === "Balance due by"
|
|
132427
|
+
);
|
|
132428
|
+
return [
|
|
132429
|
+
dueToday ? `Due today: ${dueToday.value}` : option.description,
|
|
132430
|
+
balanceDueBy ? `Balance due by: ${balanceDueBy.value}` : null
|
|
132431
|
+
].filter((part) => Boolean(part)).join(" \xB7 ");
|
|
132432
|
+
}
|
|
131965
132433
|
var PaymentSelectionStep = ({
|
|
131966
132434
|
event,
|
|
131967
132435
|
occurrenceContext,
|
|
@@ -131981,9 +132449,12 @@ var PaymentSelectionStep = ({
|
|
|
131981
132449
|
const canContinue = (() => {
|
|
131982
132450
|
if (!selectedMethod) return false;
|
|
131983
132451
|
if (selectedMethod === "pass") return Boolean(selectedSelection.passId);
|
|
131984
|
-
if (selectedMethod === "membership")
|
|
131985
|
-
|
|
131986
|
-
if (selectedMethod === "
|
|
132452
|
+
if (selectedMethod === "membership")
|
|
132453
|
+
return Boolean(selectedSelection.membershipId);
|
|
132454
|
+
if (selectedMethod === "pass_bundle")
|
|
132455
|
+
return Boolean(selectedSelection.bundlePassId);
|
|
132456
|
+
if (selectedMethod === "membership_bundle")
|
|
132457
|
+
return Boolean(selectedSelection.bundleMembershipId);
|
|
131987
132458
|
return true;
|
|
131988
132459
|
})();
|
|
131989
132460
|
const getButtonText = useCallback(() => {
|
|
@@ -132012,7 +132483,15 @@ var PaymentSelectionStep = ({
|
|
|
132012
132483
|
buttonText: getButtonText(),
|
|
132013
132484
|
showLoginPrompt
|
|
132014
132485
|
});
|
|
132015
|
-
}, [
|
|
132486
|
+
}, [
|
|
132487
|
+
onStateChange,
|
|
132488
|
+
eligibilityLoading,
|
|
132489
|
+
eligibilityError,
|
|
132490
|
+
eligibility,
|
|
132491
|
+
isAuthenticated,
|
|
132492
|
+
canContinue,
|
|
132493
|
+
getButtonText
|
|
132494
|
+
]);
|
|
132016
132495
|
if (eligibilityLoading) {
|
|
132017
132496
|
return /* @__PURE__ */ jsx("div", { className: "er-stack", children: /* @__PURE__ */ jsxs("div", { className: "er-center", children: [
|
|
132018
132497
|
/* @__PURE__ */ jsx(SpinnerNode, { size: "lg", srLabel: "Checking payment options" }),
|
|
@@ -132060,7 +132539,10 @@ var PaymentSelectionStep = ({
|
|
|
132060
132539
|
"button",
|
|
132061
132540
|
{
|
|
132062
132541
|
type: "button",
|
|
132063
|
-
className: themeButtonClassName({
|
|
132542
|
+
className: themeButtonClassName({
|
|
132543
|
+
variant: "primary",
|
|
132544
|
+
size: "md"
|
|
132545
|
+
}),
|
|
132064
132546
|
disabled: !email.trim(),
|
|
132065
132547
|
onClick: onRequestLogin,
|
|
132066
132548
|
children: "Email me a login link"
|
|
@@ -132075,20 +132557,31 @@ var PaymentSelectionStep = ({
|
|
|
132075
132557
|
] });
|
|
132076
132558
|
}
|
|
132077
132559
|
const totalPrice = eligibility.price ? eligibility.price * ticketsCount : 0;
|
|
132560
|
+
const directPaymentOptions = buildEventRegistrationPaymentOptionsViewModel({
|
|
132561
|
+
eventTitle: event?.title ?? "Event",
|
|
132562
|
+
paymentTerms: event?.paymentTerms,
|
|
132563
|
+
totalPriceCents: totalPrice,
|
|
132564
|
+
currency: eligibility.currency,
|
|
132565
|
+
startsAt: occurrenceContext?.startsAt ?? event?.startsAt
|
|
132566
|
+
}).options;
|
|
132078
132567
|
const isMultiTicket = areEntitlementsDisabledForTicketCount(ticketsCount);
|
|
132079
132568
|
return /* @__PURE__ */ jsxs("div", { className: "er-stack", children: [
|
|
132080
132569
|
/* @__PURE__ */ jsx("h3", { className: "er-title", children: "Payment Options" }),
|
|
132081
132570
|
/* @__PURE__ */ jsxs("div", { className: "er-payment-tiles", children: [
|
|
132082
|
-
eligibility.canPayDirectly && eligibility.price && /* @__PURE__ */ jsx(
|
|
132571
|
+
eligibility.canPayDirectly && eligibility.price && /* @__PURE__ */ jsx(Fragment, { children: directPaymentOptions.map((option) => /* @__PURE__ */ jsx(
|
|
132083
132572
|
PaymentTile,
|
|
132084
132573
|
{
|
|
132085
132574
|
icon: /* @__PURE__ */ jsx(CreditCard, { size: 24, "aria-hidden": "true" }),
|
|
132086
|
-
label:
|
|
132087
|
-
detail:
|
|
132088
|
-
selected: selectedMethod === "stripe",
|
|
132089
|
-
onClick: () => onSelectionChange({
|
|
132090
|
-
|
|
132091
|
-
|
|
132575
|
+
label: option.label,
|
|
132576
|
+
detail: formatDirectPaymentOptionDetail(option),
|
|
132577
|
+
selected: selectedMethod === "stripe" && (selectedSelection.collectionOptionKind ?? "upfront") === option.kind,
|
|
132578
|
+
onClick: () => onSelectionChange({
|
|
132579
|
+
method: "stripe",
|
|
132580
|
+
collectionOptionKind: option.kind
|
|
132581
|
+
})
|
|
132582
|
+
},
|
|
132583
|
+
option.kind
|
|
132584
|
+
)) }),
|
|
132092
132585
|
isAuthenticated && eligibility.eligiblePasses.map((pass) => /* @__PURE__ */ jsx(
|
|
132093
132586
|
PaymentTile,
|
|
132094
132587
|
{
|
|
@@ -132098,7 +132591,11 @@ var PaymentSelectionStep = ({
|
|
|
132098
132591
|
selected: selectedMethod === "pass" && selectedSelection.passId === pass.id,
|
|
132099
132592
|
disabled: isMultiTicket,
|
|
132100
132593
|
tooltip: isMultiTicket ? ENTITLEMENT_SINGLE_TICKET_TOOLTIP : void 0,
|
|
132101
|
-
onClick: () => onSelectionChange({
|
|
132594
|
+
onClick: () => onSelectionChange({
|
|
132595
|
+
method: "pass",
|
|
132596
|
+
passId: pass.id,
|
|
132597
|
+
productName: pass.passName
|
|
132598
|
+
})
|
|
132102
132599
|
},
|
|
132103
132600
|
pass.id
|
|
132104
132601
|
)),
|
|
@@ -133513,7 +134010,7 @@ function magicLinkSubmissionReducer(state, action) {
|
|
|
133513
134010
|
case "reset":
|
|
133514
134011
|
return initialMagicLinkSubmissionState;
|
|
133515
134012
|
default:
|
|
133516
|
-
return
|
|
134013
|
+
return assertNever8(action);
|
|
133517
134014
|
}
|
|
133518
134015
|
}
|
|
133519
134016
|
function isMagicLinkSubmitting(state) {
|
|
@@ -133648,7 +134145,9 @@ function EventRegistrationWizard(props2) {
|
|
|
133648
134145
|
buttonVariant = "primary",
|
|
133649
134146
|
className,
|
|
133650
134147
|
spamProtectionEnabled,
|
|
133651
|
-
supportEmail
|
|
134148
|
+
supportEmail,
|
|
134149
|
+
sitePasses,
|
|
134150
|
+
siteMemberships
|
|
133652
134151
|
} = props2;
|
|
133653
134152
|
const maxTicketsNum = normalizeEventRegistrationMaxTickets(maxTickets);
|
|
133654
134153
|
const showSpamProtection = spamProtectionEnabled ?? isSpamProtectionEnabled();
|
|
@@ -133744,11 +134243,13 @@ function EventRegistrationWizard(props2) {
|
|
|
133744
134243
|
const summaryPriceLabel = summaryEvent ? formatEventPriceDisplay(summaryEvent.pricing) : null;
|
|
133745
134244
|
const summaryAvailabilityLabel = summaryEvent?.availableSpots === null || summaryEvent?.availableSpots === void 0 ? null : summaryEvent.availableSpots > 0 ? `${summaryEvent.availableSpots} spots left` : summaryEvent.waitlistEnabled ? "Waitlist available" : "Fully booked";
|
|
133746
134245
|
const waitlistClaimRequiresPortalLogin = wizard.waitlistClaim.requiresPortalLogin && wizard.portalAuthState !== "authenticated" && wizard.portalAuthState !== "checking";
|
|
134246
|
+
const selectedProductEvent = wizard.selectedEvent ?? wizard.preSelectedEvent;
|
|
134247
|
+
const hasPassOrMembershipProducts = filterPassesForEvent(sitePasses?.passes, selectedProductEvent).length > 0 || filterMembershipsForEvent(siteMemberships?.memberships, selectedProductEvent).length > 0;
|
|
133747
134248
|
const portalAuthCopy = waitlistClaimRequiresPortalLogin ? {
|
|
133748
134249
|
...EVENT_PORTAL_AUTH_COPY["waitlist-claim"],
|
|
133749
134250
|
description: wizard.waitlistClaim.loginMessage ?? "Log in to continue with your waitlist claim."
|
|
133750
134251
|
} : EVENT_PORTAL_AUTH_COPY.membership;
|
|
133751
|
-
const showPortalAuthPrompt = waitlistClaimRequiresPortalLogin || wizard.step === "select-tickets" && wizard.portalAuthState !== "authenticated" && wizard.portalAuthState !== "checking" && summaryEventPricingType !== "free";
|
|
134252
|
+
const showPortalAuthPrompt = waitlistClaimRequiresPortalLogin || wizard.step === "select-tickets" && wizard.portalAuthState !== "authenticated" && wizard.portalAuthState !== "checking" && hasPassOrMembershipProducts && summaryEventPricingType !== "free";
|
|
133752
134253
|
const renderRegistrationSurface = (variant) => /* @__PURE__ */ jsxs("div", { className: `er-container${variant === "overlay" ? " er-container--overlay" : ""}`, children: [
|
|
133753
134254
|
isWizardStep && /* @__PURE__ */ jsxs("div", { className: "er-payment-layout er-payment-layout--no-sidebar", children: [
|
|
133754
134255
|
/* @__PURE__ */ jsxs("div", { className: "er-payment-layout-main", children: [
|
|
@@ -134667,11 +135168,6 @@ function useCourseRegistrationWizard(props2) {
|
|
|
134667
135168
|
const [eligibleMemberships, setEligibleMemberships] = useState([]);
|
|
134668
135169
|
const [paymentChoice, setPaymentChoice] = useState("checkout");
|
|
134669
135170
|
const [selectedMembershipId, setSelectedMembershipId] = useState(null);
|
|
134670
|
-
const [discountUiOpen, setDiscountUiOpen] = useState(false);
|
|
134671
|
-
const [discountCode, setDiscountCode] = useState("");
|
|
134672
|
-
const [discountsAvailable, setDiscountsAvailable] = useState(false);
|
|
134673
|
-
const [manualCodeEntryAllowed, setManualCodeEntryAllowed] = useState(false);
|
|
134674
|
-
const [discountsAvailableLoading, setDiscountsAvailableLoading] = useState(false);
|
|
134675
135171
|
const [bookingMode, setBookingMode] = useState(null);
|
|
134676
135172
|
const waitlistClaim = useWaitlistClaim();
|
|
134677
135173
|
const selectedCoursePricing = useMemo(
|
|
@@ -135092,45 +135588,12 @@ function useCourseRegistrationWizard(props2) {
|
|
|
135092
135588
|
if (paymentChoice !== "checkout") return null;
|
|
135093
135589
|
return { type: "course", courseId: selectedCourse.id };
|
|
135094
135590
|
}, [selectedCourse, selectedCoursePricing?.selectedRequiresPayment, paymentChoice]);
|
|
135095
|
-
|
|
135096
|
-
|
|
135097
|
-
|
|
135098
|
-
|
|
135099
|
-
|
|
135100
|
-
|
|
135101
|
-
setDiscountsAvailableLoading(false);
|
|
135102
|
-
setDiscountUiOpen(false);
|
|
135103
|
-
setDiscountCode("");
|
|
135104
|
-
return;
|
|
135105
|
-
}
|
|
135106
|
-
setDiscountsAvailableLoading(true);
|
|
135107
|
-
try {
|
|
135108
|
-
const res = await api.getDiscountsAvailable({
|
|
135109
|
-
context: courseDiscountContext,
|
|
135110
|
-
subtotalCents: selectedCoursePricing?.selectedPriceAmount ?? void 0
|
|
135111
|
-
});
|
|
135112
|
-
if (cancelled) return;
|
|
135113
|
-
setDiscountsAvailable(res.hasDiscounts);
|
|
135114
|
-
setManualCodeEntryAllowed(res.manualCodeEntryAllowed);
|
|
135115
|
-
if (!res.hasDiscounts || !res.manualCodeEntryAllowed) {
|
|
135116
|
-
setDiscountUiOpen(false);
|
|
135117
|
-
setDiscountCode("");
|
|
135118
|
-
}
|
|
135119
|
-
} catch {
|
|
135120
|
-
if (cancelled) return;
|
|
135121
|
-
setDiscountsAvailable(false);
|
|
135122
|
-
setManualCodeEntryAllowed(false);
|
|
135123
|
-
setDiscountUiOpen(false);
|
|
135124
|
-
setDiscountCode("");
|
|
135125
|
-
} finally {
|
|
135126
|
-
if (!cancelled) setDiscountsAvailableLoading(false);
|
|
135127
|
-
}
|
|
135128
|
-
}
|
|
135129
|
-
void checkDiscountAvailability();
|
|
135130
|
-
return () => {
|
|
135131
|
-
cancelled = true;
|
|
135132
|
-
};
|
|
135133
|
-
}, [api, courseDiscountContext, selectedCoursePricing?.selectedPriceAmount]);
|
|
135591
|
+
const discountUi = useDiscountCodeUi({
|
|
135592
|
+
api,
|
|
135593
|
+
discountContext: courseDiscountContext,
|
|
135594
|
+
subtotalCents: selectedCoursePricing?.selectedPriceAmount ?? void 0
|
|
135595
|
+
});
|
|
135596
|
+
const discountCode = discountUi.discountCode;
|
|
135134
135597
|
const hasCoursePayment = resolveHasCoursePayment(selectedCoursePricing);
|
|
135135
135598
|
const canUseMembership = hasCoursePayment && selectedCourse?.acceptsMemberships === true && portalAuthState === "authenticated" && eligibleMemberships.length > 0;
|
|
135136
135599
|
const hasPreSelectedCourse = scopedCourses.length === 1;
|
|
@@ -135179,13 +135642,13 @@ function useCourseRegistrationWizard(props2) {
|
|
|
135179
135642
|
setPaymentChoice,
|
|
135180
135643
|
selectedMembershipId,
|
|
135181
135644
|
setSelectedMembershipId,
|
|
135182
|
-
discountUiOpen,
|
|
135183
|
-
setDiscountUiOpen,
|
|
135184
|
-
discountCode,
|
|
135185
|
-
setDiscountCode,
|
|
135186
|
-
discountsAvailable,
|
|
135187
|
-
manualCodeEntryAllowed,
|
|
135188
|
-
discountsAvailableLoading,
|
|
135645
|
+
discountUiOpen: discountUi.discountUiOpen,
|
|
135646
|
+
setDiscountUiOpen: discountUi.setDiscountUiOpen,
|
|
135647
|
+
discountCode: discountUi.discountCode,
|
|
135648
|
+
setDiscountCode: discountUi.setDiscountCode,
|
|
135649
|
+
discountsAvailable: discountUi.discountsAvailable,
|
|
135650
|
+
manualCodeEntryAllowed: discountUi.manualCodeEntryAllowed,
|
|
135651
|
+
discountsAvailableLoading: discountUi.discountsAvailableLoading,
|
|
135189
135652
|
canUseMembership,
|
|
135190
135653
|
waitlistClaim,
|
|
135191
135654
|
// New booking mode state
|
|
@@ -136161,7 +136624,7 @@ function shopPassesMembershipsReducer(state, action) {
|
|
|
136161
136624
|
returnNotice: null
|
|
136162
136625
|
};
|
|
136163
136626
|
default:
|
|
136164
|
-
return
|
|
136627
|
+
return assertNever8(action);
|
|
136165
136628
|
}
|
|
136166
136629
|
}
|
|
136167
136630
|
function getOpenCheckout(state) {
|
|
@@ -136295,15 +136758,13 @@ function planCartDiscountAvailabilityRequests(checkout2) {
|
|
|
136295
136758
|
}));
|
|
136296
136759
|
}
|
|
136297
136760
|
function aggregateCartDiscountUiState(availability) {
|
|
136298
|
-
if (!availability.some(
|
|
136761
|
+
if (!availability.some(discountAvailabilityHasDiscounts)) {
|
|
136299
136762
|
return { type: "unavailable" };
|
|
136300
136763
|
}
|
|
136301
|
-
if (availability.some(
|
|
136764
|
+
if (availability.some(discountAvailabilityAllowsManualEntry)) {
|
|
136302
136765
|
return { type: "manual-allowed" };
|
|
136303
136766
|
}
|
|
136304
|
-
const autoAppliedDiscount = availability.find(
|
|
136305
|
-
(item) => item.autoAppliedDiscount
|
|
136306
|
-
)?.autoAppliedDiscount ?? null;
|
|
136767
|
+
const autoAppliedDiscount = availability.map(getAutoAppliedDiscountPreview).find((discount) => discount !== null) ?? null;
|
|
136307
136768
|
return {
|
|
136308
136769
|
type: "auto-only",
|
|
136309
136770
|
autoAppliedDiscount
|
|
@@ -136370,7 +136831,7 @@ function discountApplyReducer(state, action) {
|
|
|
136370
136831
|
status: { type: "idle" }
|
|
136371
136832
|
};
|
|
136372
136833
|
default:
|
|
136373
|
-
return
|
|
136834
|
+
return assertNever8(action);
|
|
136374
136835
|
}
|
|
136375
136836
|
}
|
|
136376
136837
|
function getAppliedDiscountCode(state) {
|
|
@@ -136401,7 +136862,7 @@ function getDiscountApplyFeedback(status, formatPrice2) {
|
|
|
136401
136862
|
message: status.message
|
|
136402
136863
|
};
|
|
136403
136864
|
default:
|
|
136404
|
-
return
|
|
136865
|
+
return assertNever8(status);
|
|
136405
136866
|
}
|
|
136406
136867
|
}
|
|
136407
136868
|
var DISCOUNT_APPLY_MESSAGES = {
|
|
@@ -137396,7 +137857,7 @@ function shopCheckoutReducer(state, action) {
|
|
|
137396
137857
|
notice: action.notice
|
|
137397
137858
|
};
|
|
137398
137859
|
default:
|
|
137399
|
-
return
|
|
137860
|
+
return assertNever8(action);
|
|
137400
137861
|
}
|
|
137401
137862
|
}
|
|
137402
137863
|
var CART_DISCOUNT_UNAVAILABLE = { type: "unavailable" };
|
|
@@ -137879,7 +138340,7 @@ function giftingClientReducer(state, action) {
|
|
|
137879
138340
|
purchaseNotice: action.notice
|
|
137880
138341
|
};
|
|
137881
138342
|
default:
|
|
137882
|
-
return
|
|
138343
|
+
return assertNever8(action);
|
|
137883
138344
|
}
|
|
137884
138345
|
}
|
|
137885
138346
|
function resolveGiftingPurchaseNotice(search, defaultSuccessMessage) {
|
|
@@ -139472,7 +139933,7 @@ function eventPaginationLoadReducer(state, action) {
|
|
|
139472
139933
|
case "synced":
|
|
139473
139934
|
return createInitialEventPaginationLoadState(action.events, action.pageSize);
|
|
139474
139935
|
default:
|
|
139475
|
-
return
|
|
139936
|
+
return assertNever8(action);
|
|
139476
139937
|
}
|
|
139477
139938
|
}
|
|
139478
139939
|
function getEventIdentity(event) {
|
|
@@ -139693,7 +140154,7 @@ function eventFiltersLoadReducer(state, action) {
|
|
|
139693
140154
|
case "failed":
|
|
139694
140155
|
return { kind: "error", filters: state.filters, error: action.error };
|
|
139695
140156
|
default:
|
|
139696
|
-
return
|
|
140157
|
+
return assertNever8(action);
|
|
139697
140158
|
}
|
|
139698
140159
|
}
|
|
139699
140160
|
function toEventFiltersLoadError(error) {
|
|
@@ -140123,7 +140584,7 @@ function calendarEventCacheLoadReducer(_state, action) {
|
|
|
140123
140584
|
case "failed":
|
|
140124
140585
|
return { kind: "error", error: action.error };
|
|
140125
140586
|
default:
|
|
140126
|
-
return
|
|
140587
|
+
return assertNever8(action);
|
|
140127
140588
|
}
|
|
140128
140589
|
}
|
|
140129
140590
|
function toCalendarEventCacheLoadError(error) {
|
|
@@ -140440,114 +140901,6 @@ var CalendarDayCell = ({
|
|
|
140440
140901
|
] })
|
|
140441
140902
|
] });
|
|
140442
140903
|
};
|
|
140443
|
-
var AgendaEventCard = ({
|
|
140444
|
-
event,
|
|
140445
|
-
showCapacity,
|
|
140446
|
-
onClick
|
|
140447
|
-
}) => {
|
|
140448
|
-
const eventUrl = event.path;
|
|
140449
|
-
const categoryColor = event.eventCategory?.color || "rgb(var(--tb-accent))";
|
|
140450
|
-
const price = formatEventPrice(event);
|
|
140451
|
-
const { available, isFull } = getEventAvailability(event);
|
|
140452
|
-
const capacity = showCapacity && available != null ? isFull ? "Full" : `${available} spots left` : null;
|
|
140453
|
-
const title = event.title;
|
|
140454
|
-
const timeZone = event.timeZone ?? null;
|
|
140455
|
-
const teacherLine = formatEventTeacherLine(event);
|
|
140456
|
-
const cardContent = /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
140457
|
-
/* @__PURE__ */ jsx(
|
|
140458
|
-
"div",
|
|
140459
|
-
{
|
|
140460
|
-
className: "event-agenda-card-indicator",
|
|
140461
|
-
style: { backgroundColor: categoryColor },
|
|
140462
|
-
"aria-hidden": "true"
|
|
140463
|
-
}
|
|
140464
|
-
),
|
|
140465
|
-
/* @__PURE__ */ jsxs("div", { className: "event-agenda-card-content", children: [
|
|
140466
|
-
/* @__PURE__ */ jsxs("div", { className: "event-agenda-card-header", children: [
|
|
140467
|
-
/* @__PURE__ */ jsx("span", { className: "event-agenda-card-time", children: formatTime(event.startsAt, { timeZone }) }),
|
|
140468
|
-
/* @__PURE__ */ jsx("span", { className: "event-agenda-card-title", children: title })
|
|
140469
|
-
] }),
|
|
140470
|
-
/* @__PURE__ */ jsxs("div", { className: "event-agenda-card-details", children: [
|
|
140471
|
-
event.venue && /* @__PURE__ */ jsxs("span", { className: "event-agenda-card-venue", children: [
|
|
140472
|
-
/* @__PURE__ */ jsxs(
|
|
140473
|
-
"svg",
|
|
140474
|
-
{
|
|
140475
|
-
className: "event-agenda-card-icon",
|
|
140476
|
-
width: "14",
|
|
140477
|
-
height: "14",
|
|
140478
|
-
viewBox: "0 0 24 24",
|
|
140479
|
-
fill: "none",
|
|
140480
|
-
stroke: "currentColor",
|
|
140481
|
-
strokeWidth: "2",
|
|
140482
|
-
strokeLinecap: "round",
|
|
140483
|
-
strokeLinejoin: "round",
|
|
140484
|
-
children: [
|
|
140485
|
-
/* @__PURE__ */ jsx("path", { d: "M21 10c0 7-9 13-9 13s-9-6-9-13a9 9 0 0 1 18 0z" }),
|
|
140486
|
-
/* @__PURE__ */ jsx("circle", { cx: "12", cy: "10", r: "3" })
|
|
140487
|
-
]
|
|
140488
|
-
}
|
|
140489
|
-
),
|
|
140490
|
-
event.venue.name
|
|
140491
|
-
] }),
|
|
140492
|
-
teacherLine && /* @__PURE__ */ jsx("span", { className: "event-agenda-card-teacher", children: teacherLine }),
|
|
140493
|
-
/* @__PURE__ */ jsx("span", { className: "event-agenda-card-price", children: price }),
|
|
140494
|
-
capacity && /* @__PURE__ */ jsx("span", { className: `event-agenda-card-capacity ${isFull ? "event-agenda-card-capacity--full" : ""}`, children: capacity })
|
|
140495
|
-
] })
|
|
140496
|
-
] })
|
|
140497
|
-
] });
|
|
140498
|
-
if (onClick) {
|
|
140499
|
-
return /* @__PURE__ */ jsx(
|
|
140500
|
-
"button",
|
|
140501
|
-
{
|
|
140502
|
-
type: "button",
|
|
140503
|
-
className: "event-agenda-card",
|
|
140504
|
-
onClick: () => onClick(event),
|
|
140505
|
-
children: cardContent
|
|
140506
|
-
}
|
|
140507
|
-
);
|
|
140508
|
-
}
|
|
140509
|
-
return /* @__PURE__ */ jsx("a", { href: eventUrl, className: "event-agenda-card", children: cardContent });
|
|
140510
|
-
};
|
|
140511
|
-
var FULL_DAY_NAMES2 = ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"];
|
|
140512
|
-
function formatAgendaDayHeader(date) {
|
|
140513
|
-
const dayName = FULL_DAY_NAMES2[date.getDay()];
|
|
140514
|
-
const monthName = MONTH_NAMES[date.getMonth()];
|
|
140515
|
-
return `${dayName ?? "Day"}, ${monthName ?? "Month"} ${date.getDate()}`;
|
|
140516
|
-
}
|
|
140517
|
-
var WeekAgendaView = ({
|
|
140518
|
-
days,
|
|
140519
|
-
events: events2,
|
|
140520
|
-
showCapacity,
|
|
140521
|
-
emptyMessage = "No events scheduled"
|
|
140522
|
-
}) => {
|
|
140523
|
-
const eventsByDate = groupEventsByDate(events2);
|
|
140524
|
-
return /* @__PURE__ */ jsx("div", { className: "event-agenda-week", children: days.map((date) => {
|
|
140525
|
-
const dateKey = formatDateKey2(date);
|
|
140526
|
-
const dayEvents = eventsByDate.get(dateKey) || [];
|
|
140527
|
-
const today = isToday(date);
|
|
140528
|
-
return /* @__PURE__ */ jsxs(
|
|
140529
|
-
"div",
|
|
140530
|
-
{
|
|
140531
|
-
className: `event-agenda-day ${today ? "event-agenda-day--today" : ""}`,
|
|
140532
|
-
children: [
|
|
140533
|
-
/* @__PURE__ */ jsx("div", { className: "event-agenda-day-header", children: /* @__PURE__ */ jsxs("h4", { className: "event-agenda-day-title", children: [
|
|
140534
|
-
formatAgendaDayHeader(date),
|
|
140535
|
-
today && /* @__PURE__ */ jsx("span", { className: "event-agenda-day-today-badge", children: "Today" })
|
|
140536
|
-
] }) }),
|
|
140537
|
-
/* @__PURE__ */ jsx("div", { className: "event-agenda-day-content", children: dayEvents.length === 0 ? /* @__PURE__ */ jsx("p", { className: "event-agenda-day-empty", children: emptyMessage }) : /* @__PURE__ */ jsx("div", { className: "event-agenda-day-events", children: dayEvents.map((event) => /* @__PURE__ */ jsx(
|
|
140538
|
-
AgendaEventCard,
|
|
140539
|
-
{
|
|
140540
|
-
event,
|
|
140541
|
-
showCapacity
|
|
140542
|
-
},
|
|
140543
|
-
event.occurrenceId || event.id
|
|
140544
|
-
)) }) })
|
|
140545
|
-
]
|
|
140546
|
-
},
|
|
140547
|
-
dateKey
|
|
140548
|
-
);
|
|
140549
|
-
}) });
|
|
140550
|
-
};
|
|
140551
140904
|
function EventDetailModal({
|
|
140552
140905
|
event,
|
|
140553
140906
|
showCapacity,
|
|
@@ -140716,6 +141069,23 @@ function EventModals({
|
|
|
140716
141069
|
}
|
|
140717
141070
|
return marker;
|
|
140718
141071
|
}
|
|
141072
|
+
|
|
141073
|
+
// ../blocks/src/system/runtime/nodes/events/shared/calendarViewOptions.ts
|
|
141074
|
+
var monthOption = { id: "month", label: "Month" };
|
|
141075
|
+
var weekOption = { id: "week", label: "Week" };
|
|
141076
|
+
function resolveInitialCalendarView(input) {
|
|
141077
|
+
switch (input.calendarTabViews) {
|
|
141078
|
+
case "month":
|
|
141079
|
+
return "month";
|
|
141080
|
+
case "week":
|
|
141081
|
+
return "week";
|
|
141082
|
+
case "both":
|
|
141083
|
+
return input.defaultCalendarView ?? "month";
|
|
141084
|
+
}
|
|
141085
|
+
}
|
|
141086
|
+
function orderCalendarViewToggleOptions(defaultCalendarView) {
|
|
141087
|
+
return defaultCalendarView === "week" ? [weekOption, monthOption] : [monthOption, weekOption];
|
|
141088
|
+
}
|
|
140719
141089
|
function toEventCombinedControllerProps(props2) {
|
|
140720
141090
|
return {
|
|
140721
141091
|
events: props2.render.hydration.prefetchedEvents ? [...props2.render.display.events] : void 0,
|
|
@@ -140727,6 +141097,7 @@ function toEventCombinedControllerProps(props2) {
|
|
|
140727
141097
|
paginationAction: props2.render.display.paginationAction,
|
|
140728
141098
|
startOfWeek: props2.render.display.startOfWeek,
|
|
140729
141099
|
calendarTabViews: props2.render.display.calendarTabViews,
|
|
141100
|
+
defaultCalendarView: props2.render.display.defaultCalendarView,
|
|
140730
141101
|
showFilters: props2.render.display.showFilters,
|
|
140731
141102
|
showCategoryFilter: props2.render.display.showCategoryFilter,
|
|
140732
141103
|
showVenueFilter: props2.render.display.showVenueFilter,
|
|
@@ -140759,6 +141130,7 @@ var EventCombinedClient = ({
|
|
|
140759
141130
|
// Calendar options
|
|
140760
141131
|
startOfWeek: startOfWeek2 = "monday",
|
|
140761
141132
|
calendarTabViews = "both",
|
|
141133
|
+
defaultCalendarView,
|
|
140762
141134
|
// Filtering options
|
|
140763
141135
|
showFilters,
|
|
140764
141136
|
showCategoryFilter = "auto",
|
|
@@ -140791,9 +141163,21 @@ var EventCombinedClient = ({
|
|
|
140791
141163
|
const resolvedEventSurface = eventSurface ?? "all";
|
|
140792
141164
|
const resolvedScheduleScope = scheduleScope ?? "any";
|
|
140793
141165
|
const [activeTab, setActiveTab] = useState("list");
|
|
140794
|
-
const
|
|
140795
|
-
|
|
141166
|
+
const initialCalendarView = useMemo(
|
|
141167
|
+
() => resolveInitialCalendarView({
|
|
141168
|
+
calendarTabViews,
|
|
141169
|
+
defaultCalendarView
|
|
141170
|
+
}),
|
|
141171
|
+
[calendarTabViews, defaultCalendarView]
|
|
140796
141172
|
);
|
|
141173
|
+
const [calendarView, setCalendarView] = useState(initialCalendarView);
|
|
141174
|
+
const calendarViewOptions = useMemo(
|
|
141175
|
+
() => orderCalendarViewToggleOptions(initialCalendarView),
|
|
141176
|
+
[initialCalendarView]
|
|
141177
|
+
);
|
|
141178
|
+
useEffect(() => {
|
|
141179
|
+
setCalendarView(initialCalendarView);
|
|
141180
|
+
}, [initialCalendarView]);
|
|
140797
141181
|
const filtersIdBase = useId$1();
|
|
140798
141182
|
const {
|
|
140799
141183
|
categories,
|
|
@@ -140975,26 +141359,16 @@ var EventCombinedClient = ({
|
|
|
140975
141359
|
),
|
|
140976
141360
|
activeTab === "calendar" && /* @__PURE__ */ jsxs(EventModalProvider, { children: [
|
|
140977
141361
|
/* @__PURE__ */ jsxs("div", { className: "event-combined-content event-calendar", children: [
|
|
140978
|
-
calendarTabViews === "both" && /* @__PURE__ */
|
|
140979
|
-
|
|
140980
|
-
|
|
140981
|
-
|
|
140982
|
-
|
|
140983
|
-
|
|
140984
|
-
|
|
140985
|
-
|
|
140986
|
-
|
|
140987
|
-
|
|
140988
|
-
/* @__PURE__ */ jsx(
|
|
140989
|
-
"button",
|
|
140990
|
-
{
|
|
140991
|
-
type: "button",
|
|
140992
|
-
className: `event-calendar-view-btn ${calendarView === "week" ? "event-calendar-view-btn--active" : ""}`,
|
|
140993
|
-
onClick: () => setCalendarView("week"),
|
|
140994
|
-
children: "Week"
|
|
140995
|
-
}
|
|
140996
|
-
)
|
|
140997
|
-
] }),
|
|
141362
|
+
calendarTabViews === "both" && /* @__PURE__ */ jsx("div", { className: "event-calendar-view-toggle", children: calendarViewOptions.map((option) => /* @__PURE__ */ jsx(
|
|
141363
|
+
"button",
|
|
141364
|
+
{
|
|
141365
|
+
type: "button",
|
|
141366
|
+
className: `event-calendar-view-btn ${calendarView === option.id ? "event-calendar-view-btn--active" : ""}`,
|
|
141367
|
+
onClick: () => setCalendarView(option.id),
|
|
141368
|
+
children: option.label
|
|
141369
|
+
},
|
|
141370
|
+
option.id
|
|
141371
|
+
)) }),
|
|
140998
141372
|
/* @__PURE__ */ jsxs("div", { className: "event-calendar-header", children: [
|
|
140999
141373
|
/* @__PURE__ */ jsxs("div", { className: "event-calendar-nav", children: [
|
|
141000
141374
|
/* @__PURE__ */ jsx(
|
|
@@ -141263,6 +141637,7 @@ var EventCalendarClient = ({
|
|
|
141263
141637
|
paginationAction: display.paginationAction,
|
|
141264
141638
|
startOfWeek: display.startOfWeek,
|
|
141265
141639
|
calendarTabViews: display.calendarTabViews,
|
|
141640
|
+
defaultCalendarView: display.defaultCalendarView,
|
|
141266
141641
|
showFilters: display.showFilters,
|
|
141267
141642
|
showCategoryFilter: display.showCategoryFilter,
|
|
141268
141643
|
showVenueFilter: display.showVenueFilter,
|
|
@@ -141357,7 +141732,7 @@ var EventCalendarTimetableClient = ({ render }) => {
|
|
|
141357
141732
|
};
|
|
141358
141733
|
var EventCalendarGridClient = ({ render }) => {
|
|
141359
141734
|
const { display, hydration } = render;
|
|
141360
|
-
const calendarView = display.
|
|
141735
|
+
const calendarView = display.defaultCalendarView;
|
|
141361
141736
|
const { filtersNode, listFilters } = useEventCalendarFilterState(display);
|
|
141362
141737
|
const calendarInitialEvents = usePrefetchedCalendarEvents(display, listFilters);
|
|
141363
141738
|
const {
|
|
@@ -141397,7 +141772,15 @@ var EventCalendarGridClient = ({ render }) => {
|
|
|
141397
141772
|
onPrevious: goToPrevious,
|
|
141398
141773
|
onToday: goToToday,
|
|
141399
141774
|
children: [
|
|
141400
|
-
|
|
141775
|
+
viewport.kind === "week" ? /* @__PURE__ */ jsx(
|
|
141776
|
+
WeekAgendaView,
|
|
141777
|
+
{
|
|
141778
|
+
days: viewport.days,
|
|
141779
|
+
events: events2,
|
|
141780
|
+
emptyMessage: display.emptyMessage,
|
|
141781
|
+
showCapacity: display.showCapacity
|
|
141782
|
+
}
|
|
141783
|
+
) : /* @__PURE__ */ jsxs("div", { className: "event-calendar-container", children: [
|
|
141401
141784
|
/* @__PURE__ */ jsx("div", { className: "event-calendar-day-headers", children: dayNames.map((day) => /* @__PURE__ */ jsx("div", { className: "event-calendar-day-header", children: day }, day)) }),
|
|
141402
141785
|
/* @__PURE__ */ jsx("div", { className: "event-calendar-grid", children: viewport.days.map((date) => {
|
|
141403
141786
|
const dateKey = formatDateKey2(date);
|
|
@@ -141413,7 +141796,7 @@ var EventCalendarGridClient = ({ render }) => {
|
|
|
141413
141796
|
);
|
|
141414
141797
|
}) })
|
|
141415
141798
|
] }),
|
|
141416
|
-
events2.length === 0 && !loading && !error ? /* @__PURE__ */ jsx("p", { className: "event-calendar-empty", children: display.emptyMessage }) : null
|
|
141799
|
+
viewport.kind === "month" && events2.length === 0 && !loading && !error ? /* @__PURE__ */ jsx("p", { className: "event-calendar-empty", children: display.emptyMessage }) : null
|
|
141417
141800
|
]
|
|
141418
141801
|
}
|
|
141419
141802
|
),
|
|
@@ -141633,7 +142016,7 @@ function formSubmissionReducer(_state, action) {
|
|
|
141633
142016
|
case "submission-failed":
|
|
141634
142017
|
return { tag: "failed", message: action.message };
|
|
141635
142018
|
default:
|
|
141636
|
-
return
|
|
142019
|
+
return assertNever8(action);
|
|
141637
142020
|
}
|
|
141638
142021
|
}
|
|
141639
142022
|
|
|
@@ -141941,7 +142324,7 @@ function newsletterFormSubmissionReducer(state, action) {
|
|
|
141941
142324
|
case "succeeded":
|
|
141942
142325
|
return { tag: "success" };
|
|
141943
142326
|
default:
|
|
141944
|
-
return
|
|
142327
|
+
return assertNever8(action);
|
|
141945
142328
|
}
|
|
141946
142329
|
}
|
|
141947
142330
|
function newsletterFieldError(fieldId, message2) {
|
|
@@ -148922,11 +149305,17 @@ var useUploads = ({ uploader, maxParallel = 3, onComplete }) => {
|
|
|
148922
149305
|
[items, enqueue, retry, remove, reset2]
|
|
148923
149306
|
);
|
|
148924
149307
|
};
|
|
148925
|
-
function
|
|
148926
|
-
return {
|
|
149308
|
+
function ok$1(value) {
|
|
149309
|
+
return {
|
|
149310
|
+
ok: true,
|
|
149311
|
+
value
|
|
149312
|
+
};
|
|
148927
149313
|
}
|
|
148928
149314
|
function err3(error) {
|
|
148929
|
-
return {
|
|
149315
|
+
return {
|
|
149316
|
+
ok: false,
|
|
149317
|
+
error
|
|
149318
|
+
};
|
|
148930
149319
|
}
|
|
148931
149320
|
var unsafeAsSiteId2 = (id) => id;
|
|
148932
149321
|
var unsafeAsBookingSessionId = (id) => id;
|
|
@@ -148935,20 +149324,55 @@ var unsafeAsSiteFontId = (id) => id;
|
|
|
148935
149324
|
var unsafeAsBookingRequirementId = (id) => id;
|
|
148936
149325
|
function fromArray(items) {
|
|
148937
149326
|
const [first2, ...rest] = items;
|
|
148938
|
-
if (first2 === void 0)
|
|
148939
|
-
|
|
148940
|
-
|
|
148941
|
-
|
|
148942
|
-
|
|
148943
|
-
|
|
148944
|
-
|
|
148945
|
-
|
|
148946
|
-
|
|
149327
|
+
if (first2 === void 0) return err3("empty_array");
|
|
149328
|
+
return ok$1([first2, ...rest]);
|
|
149329
|
+
}
|
|
149330
|
+
var IMAGE_FILE_FORMATS = [
|
|
149331
|
+
"jpeg",
|
|
149332
|
+
"png",
|
|
149333
|
+
"webp",
|
|
149334
|
+
"gif",
|
|
149335
|
+
"avif",
|
|
149336
|
+
"heic",
|
|
149337
|
+
"heif",
|
|
149338
|
+
"svg"
|
|
149339
|
+
];
|
|
149340
|
+
var VIDEO_FILE_FORMATS = [
|
|
149341
|
+
"mp4",
|
|
149342
|
+
"webm",
|
|
149343
|
+
"mov"
|
|
149344
|
+
];
|
|
149345
|
+
var AUDIO_FILE_FORMATS = [
|
|
149346
|
+
"mpeg",
|
|
149347
|
+
"mp4",
|
|
149348
|
+
"wav",
|
|
149349
|
+
"ogg",
|
|
149350
|
+
"webm",
|
|
149351
|
+
"flac"
|
|
149352
|
+
];
|
|
149353
|
+
var DOCUMENT_FILE_FORMATS = [
|
|
149354
|
+
"pdf",
|
|
149355
|
+
"docx",
|
|
149356
|
+
"txt",
|
|
149357
|
+
"rtf"
|
|
149358
|
+
];
|
|
148947
149359
|
var SPREADSHEET_FILE_FORMATS = ["csv"];
|
|
148948
149360
|
var FONT_FILE_FORMATS = ["woff2"];
|
|
148949
149361
|
var ARCHIVE_FILE_FORMATS = ["zip"];
|
|
148950
|
-
var FILE_KIND_TAGS = [
|
|
148951
|
-
|
|
149362
|
+
var FILE_KIND_TAGS = [
|
|
149363
|
+
"image",
|
|
149364
|
+
"video",
|
|
149365
|
+
"audio",
|
|
149366
|
+
"document",
|
|
149367
|
+
"spreadsheet",
|
|
149368
|
+
"font",
|
|
149369
|
+
"archive"
|
|
149370
|
+
];
|
|
149371
|
+
var RENDERABLE_FILE_KIND_TAGS = [
|
|
149372
|
+
"image",
|
|
149373
|
+
"video",
|
|
149374
|
+
"audio"
|
|
149375
|
+
];
|
|
148952
149376
|
var FILE_USE_TAGS = [
|
|
148953
149377
|
"media-library",
|
|
148954
149378
|
"content-download",
|
|
@@ -148962,19 +149386,19 @@ var FILE_USE_TAGS = [
|
|
|
148962
149386
|
];
|
|
148963
149387
|
var WORKFLOW_INPUT_KINDS = ["audio-enrichment", "generic-file-processing"];
|
|
148964
149388
|
var SITE_BRAND_ASSET_USES = ["logo", "social-image"];
|
|
148965
|
-
var
|
|
149389
|
+
var SITE_BACKGROUND_ASSET_USES3 = ["selected-background", ...[
|
|
148966
149390
|
"light-texture",
|
|
148967
149391
|
"proof-band-dark",
|
|
148968
149392
|
"cta-wash",
|
|
148969
149393
|
"footer-detail",
|
|
148970
149394
|
"style-atmosphere-1",
|
|
148971
149395
|
"style-atmosphere-2"
|
|
149396
|
+
]];
|
|
149397
|
+
var TEMPORARY_INGESTION_KINDS = [
|
|
149398
|
+
"backup-zip",
|
|
149399
|
+
"newsletter-csv",
|
|
149400
|
+
"instagram-zip"
|
|
148972
149401
|
];
|
|
148973
|
-
var SITE_BACKGROUND_ASSET_USES3 = [
|
|
148974
|
-
"selected-background",
|
|
148975
|
-
...AMBIENT_BACKGROUND_ROLES3
|
|
148976
|
-
];
|
|
148977
|
-
var TEMPORARY_INGESTION_KINDS = ["backup-zip", "newsletter-csv", "instagram-zip"];
|
|
148978
149402
|
var ACCESS_POLICY_TAGS = [
|
|
148979
149403
|
"public-read",
|
|
148980
149404
|
"site-editor-read",
|
|
@@ -148984,10 +149408,8 @@ var ACCESS_POLICY_TAGS = [
|
|
|
148984
149408
|
"management-api-read"
|
|
148985
149409
|
];
|
|
148986
149410
|
function asPositiveSeconds(value) {
|
|
148987
|
-
if (!Number.isSafeInteger(value) || value <= 0)
|
|
148988
|
-
|
|
148989
|
-
}
|
|
148990
|
-
return ok3(value);
|
|
149411
|
+
if (!Number.isSafeInteger(value) || value <= 0) return err3("not-positive-seconds");
|
|
149412
|
+
return ok$1(value);
|
|
148991
149413
|
}
|
|
148992
149414
|
function isRecord20(value) {
|
|
148993
149415
|
return Boolean(value) && typeof value === "object" && !Array.isArray(value);
|
|
@@ -149004,37 +149426,59 @@ function parseFileKindJson(value) {
|
|
|
149004
149426
|
if (!family.ok || family.value !== "raster") return err3("invalid-field");
|
|
149005
149427
|
const format2 = parseOneOf(record.format, IMAGE_FILE_FORMATS);
|
|
149006
149428
|
if (!format2.ok) return format2;
|
|
149007
|
-
return
|
|
149429
|
+
return ok$1({
|
|
149430
|
+
tag: "image",
|
|
149431
|
+
family: "raster",
|
|
149432
|
+
format: format2.value
|
|
149433
|
+
});
|
|
149008
149434
|
}
|
|
149009
149435
|
case "video": {
|
|
149010
149436
|
const format2 = parseOneOf(record.format, VIDEO_FILE_FORMATS);
|
|
149011
149437
|
if (!format2.ok) return format2;
|
|
149012
|
-
return
|
|
149438
|
+
return ok$1({
|
|
149439
|
+
tag: "video",
|
|
149440
|
+
format: format2.value
|
|
149441
|
+
});
|
|
149013
149442
|
}
|
|
149014
149443
|
case "audio": {
|
|
149015
149444
|
const format2 = parseOneOf(record.format, AUDIO_FILE_FORMATS);
|
|
149016
149445
|
if (!format2.ok) return format2;
|
|
149017
|
-
return
|
|
149446
|
+
return ok$1({
|
|
149447
|
+
tag: "audio",
|
|
149448
|
+
format: format2.value
|
|
149449
|
+
});
|
|
149018
149450
|
}
|
|
149019
149451
|
case "document": {
|
|
149020
149452
|
const format2 = parseOneOf(record.format, DOCUMENT_FILE_FORMATS);
|
|
149021
149453
|
if (!format2.ok) return format2;
|
|
149022
|
-
return
|
|
149454
|
+
return ok$1({
|
|
149455
|
+
tag: "document",
|
|
149456
|
+
format: format2.value
|
|
149457
|
+
});
|
|
149023
149458
|
}
|
|
149024
149459
|
case "spreadsheet": {
|
|
149025
149460
|
const format2 = parseOneOf(record.format, SPREADSHEET_FILE_FORMATS);
|
|
149026
149461
|
if (!format2.ok) return format2;
|
|
149027
|
-
return
|
|
149462
|
+
return ok$1({
|
|
149463
|
+
tag: "spreadsheet",
|
|
149464
|
+
format: format2.value
|
|
149465
|
+
});
|
|
149028
149466
|
}
|
|
149029
149467
|
case "font": {
|
|
149030
149468
|
const format2 = parseOneOf(record.format, FONT_FILE_FORMATS);
|
|
149031
149469
|
if (!format2.ok) return format2;
|
|
149032
|
-
return
|
|
149470
|
+
return ok$1({
|
|
149471
|
+
tag: "font",
|
|
149472
|
+
format: format2.value
|
|
149473
|
+
});
|
|
149033
149474
|
}
|
|
149034
149475
|
case "archive": {
|
|
149035
149476
|
const format2 = parseOneOf(record.format, ARCHIVE_FILE_FORMATS);
|
|
149036
149477
|
if (!format2.ok) return format2;
|
|
149037
|
-
return
|
|
149478
|
+
return ok$1({
|
|
149479
|
+
tag: "archive",
|
|
149480
|
+
format: format2.value
|
|
149481
|
+
});
|
|
149038
149482
|
}
|
|
149039
149483
|
}
|
|
149040
149484
|
}
|
|
@@ -149048,44 +149492,68 @@ function parseFileUseJson(value) {
|
|
|
149048
149492
|
case "media-library": {
|
|
149049
149493
|
const renderUse = parseOneOf(record.renderUse, RENDERABLE_FILE_KIND_TAGS);
|
|
149050
149494
|
if (!renderUse.ok) return renderUse;
|
|
149051
|
-
return
|
|
149495
|
+
return ok$1({
|
|
149496
|
+
tag: "media-library",
|
|
149497
|
+
renderUse: renderUse.value
|
|
149498
|
+
});
|
|
149052
149499
|
}
|
|
149053
149500
|
case "content-download":
|
|
149054
|
-
return
|
|
149501
|
+
return ok$1({ tag: "content-download" });
|
|
149055
149502
|
case "digital-product-file": {
|
|
149056
149503
|
const fulfillmentVisibility = requireString(record.fulfillmentVisibility);
|
|
149057
149504
|
if (!fulfillmentVisibility.ok || fulfillmentVisibility.value !== "entitled-customer") return err3("invalid-field");
|
|
149058
|
-
return
|
|
149505
|
+
return ok$1({
|
|
149506
|
+
tag: "digital-product-file",
|
|
149507
|
+
fulfillmentVisibility: "entitled-customer"
|
|
149508
|
+
});
|
|
149059
149509
|
}
|
|
149060
149510
|
case "workflow-input": {
|
|
149061
149511
|
const workflowKind = parseOneOf(record.workflowKind, WORKFLOW_INPUT_KINDS);
|
|
149062
149512
|
if (!workflowKind.ok) return workflowKind;
|
|
149063
|
-
return
|
|
149513
|
+
return ok$1({
|
|
149514
|
+
tag: "workflow-input",
|
|
149515
|
+
workflowKind: workflowKind.value
|
|
149516
|
+
});
|
|
149064
149517
|
}
|
|
149065
149518
|
case "booking-evidence": {
|
|
149066
149519
|
const requirementId = requireNonEmptyString(record.requirementId);
|
|
149067
149520
|
if (!requirementId.ok) return requirementId;
|
|
149068
|
-
return
|
|
149521
|
+
return ok$1({
|
|
149522
|
+
tag: "booking-evidence",
|
|
149523
|
+
requirementId: unsafeAsBookingRequirementId(requirementId.value)
|
|
149524
|
+
});
|
|
149069
149525
|
}
|
|
149070
149526
|
case "site-brand-asset": {
|
|
149071
149527
|
const brandUse = parseOneOf(record.brandUse, SITE_BRAND_ASSET_USES);
|
|
149072
149528
|
if (!brandUse.ok) return brandUse;
|
|
149073
|
-
return
|
|
149529
|
+
return ok$1({
|
|
149530
|
+
tag: "site-brand-asset",
|
|
149531
|
+
brandUse: brandUse.value
|
|
149532
|
+
});
|
|
149074
149533
|
}
|
|
149075
149534
|
case "site-background-asset": {
|
|
149076
149535
|
const backgroundUse = parseOneOf(record.backgroundUse, SITE_BACKGROUND_ASSET_USES3);
|
|
149077
149536
|
if (!backgroundUse.ok) return backgroundUse;
|
|
149078
|
-
return
|
|
149537
|
+
return ok$1({
|
|
149538
|
+
tag: "site-background-asset",
|
|
149539
|
+
backgroundUse: backgroundUse.value
|
|
149540
|
+
});
|
|
149079
149541
|
}
|
|
149080
149542
|
case "site-font-file": {
|
|
149081
149543
|
const fontId = requireNonEmptyString(record.fontId);
|
|
149082
149544
|
if (!fontId.ok) return fontId;
|
|
149083
|
-
return
|
|
149545
|
+
return ok$1({
|
|
149546
|
+
tag: "site-font-file",
|
|
149547
|
+
fontId: unsafeAsSiteFontId(fontId.value)
|
|
149548
|
+
});
|
|
149084
149549
|
}
|
|
149085
149550
|
case "temporary-ingestion": {
|
|
149086
149551
|
const ingestionKind = parseOneOf(record.ingestionKind, TEMPORARY_INGESTION_KINDS);
|
|
149087
149552
|
if (!ingestionKind.ok) return ingestionKind;
|
|
149088
|
-
return
|
|
149553
|
+
return ok$1({
|
|
149554
|
+
tag: "temporary-ingestion",
|
|
149555
|
+
ingestionKind: ingestionKind.value
|
|
149556
|
+
});
|
|
149089
149557
|
}
|
|
149090
149558
|
}
|
|
149091
149559
|
}
|
|
@@ -149095,7 +149563,7 @@ function parseFileUsesJson(value) {
|
|
|
149095
149563
|
if (!parsed.ok) return parsed;
|
|
149096
149564
|
const nonEmpty = fromArray(parsed.value);
|
|
149097
149565
|
if (!nonEmpty.ok) return err3("expected-non-empty-array");
|
|
149098
|
-
return
|
|
149566
|
+
return ok$1(nonEmpty.value);
|
|
149099
149567
|
}
|
|
149100
149568
|
function parseAccessPolicyJson(value) {
|
|
149101
149569
|
const recordResult = requireRecord(value);
|
|
@@ -149105,23 +149573,29 @@ function parseAccessPolicyJson(value) {
|
|
|
149105
149573
|
if (!tag.ok) return tag;
|
|
149106
149574
|
switch (tag.value) {
|
|
149107
149575
|
case "public-read":
|
|
149108
|
-
return
|
|
149576
|
+
return ok$1({ tag: "public-read" });
|
|
149109
149577
|
case "site-editor-read": {
|
|
149110
149578
|
const siteId = requireNonEmptyString(record.siteId);
|
|
149111
149579
|
if (!siteId.ok) return siteId;
|
|
149112
|
-
return
|
|
149580
|
+
return ok$1({
|
|
149581
|
+
tag: "site-editor-read",
|
|
149582
|
+
siteId: unsafeAsSiteId2(siteId.value)
|
|
149583
|
+
});
|
|
149113
149584
|
}
|
|
149114
149585
|
case "signed-public-render": {
|
|
149115
|
-
const expiresInSeconds =
|
|
149586
|
+
const expiresInSeconds = parsePositiveSeconds$1(record.expiresInSeconds);
|
|
149116
149587
|
if (!expiresInSeconds.ok) return expiresInSeconds;
|
|
149117
|
-
return
|
|
149588
|
+
return ok$1({
|
|
149589
|
+
tag: "signed-public-render",
|
|
149590
|
+
expiresInSeconds: expiresInSeconds.value
|
|
149591
|
+
});
|
|
149118
149592
|
}
|
|
149119
149593
|
case "entitled-customer-read": {
|
|
149120
149594
|
const scope = parseEntitledCustomerAccessScopeJson(record.scope);
|
|
149121
149595
|
if (!scope.ok) return scope;
|
|
149122
149596
|
const expiresInSeconds = parseOptionalPositiveSeconds(record.expiresInSeconds);
|
|
149123
149597
|
if (!expiresInSeconds.ok) return expiresInSeconds;
|
|
149124
|
-
return
|
|
149598
|
+
return ok$1({
|
|
149125
149599
|
tag: "entitled-customer-read",
|
|
149126
149600
|
scope: scope.value,
|
|
149127
149601
|
...expiresInSeconds.value !== void 0 ? { expiresInSeconds: expiresInSeconds.value } : {}
|
|
@@ -149132,14 +149606,14 @@ function parseAccessPolicyJson(value) {
|
|
|
149132
149606
|
if (!sessionId.ok) return sessionId;
|
|
149133
149607
|
const expiresInSeconds = parseOptionalPositiveSeconds(record.expiresInSeconds);
|
|
149134
149608
|
if (!expiresInSeconds.ok) return expiresInSeconds;
|
|
149135
|
-
return
|
|
149609
|
+
return ok$1({
|
|
149136
149610
|
tag: "booking-session-read",
|
|
149137
149611
|
sessionId: unsafeAsBookingSessionId(sessionId.value),
|
|
149138
149612
|
...expiresInSeconds.value !== void 0 ? { expiresInSeconds: expiresInSeconds.value } : {}
|
|
149139
149613
|
});
|
|
149140
149614
|
}
|
|
149141
149615
|
case "management-api-read":
|
|
149142
|
-
return
|
|
149616
|
+
return ok$1({ tag: "management-api-read" });
|
|
149143
149617
|
}
|
|
149144
149618
|
}
|
|
149145
149619
|
function parseEntitledCustomerAccessScopeJson(value) {
|
|
@@ -149150,11 +149624,11 @@ function parseEntitledCustomerAccessScopeJson(value) {
|
|
|
149150
149624
|
if (!tag.ok) return tag;
|
|
149151
149625
|
switch (tag.value) {
|
|
149152
149626
|
case "any-entitled-customer":
|
|
149153
|
-
return
|
|
149627
|
+
return ok$1({ tag: "any-entitled-customer" });
|
|
149154
149628
|
case "specific-entitlement": {
|
|
149155
149629
|
const entitlementId = requireNonEmptyString(record.entitlementId);
|
|
149156
149630
|
if (!entitlementId.ok) return entitlementId;
|
|
149157
|
-
return
|
|
149631
|
+
return ok$1({
|
|
149158
149632
|
tag: "specific-entitlement",
|
|
149159
149633
|
entitlementId: unsafeAsEntitlementId(entitlementId.value)
|
|
149160
149634
|
});
|
|
@@ -149163,18 +149637,18 @@ function parseEntitledCustomerAccessScopeJson(value) {
|
|
|
149163
149637
|
}
|
|
149164
149638
|
function requireRecord(value) {
|
|
149165
149639
|
if (!isRecord20(value)) return err3("expected-object");
|
|
149166
|
-
return
|
|
149640
|
+
return ok$1(value);
|
|
149167
149641
|
}
|
|
149168
149642
|
function requireString(value) {
|
|
149169
149643
|
if (typeof value !== "string") return err3("invalid-string");
|
|
149170
|
-
return
|
|
149644
|
+
return ok$1(value);
|
|
149171
149645
|
}
|
|
149172
149646
|
function requireNonEmptyString(value) {
|
|
149173
149647
|
const string = requireString(value);
|
|
149174
149648
|
if (!string.ok) return string;
|
|
149175
149649
|
const trimmed = string.value.trim();
|
|
149176
149650
|
if (!trimmed || trimmed !== string.value) return err3("invalid-string");
|
|
149177
|
-
return
|
|
149651
|
+
return ok$1(string.value);
|
|
149178
149652
|
}
|
|
149179
149653
|
function parseOneOf(value, allowed) {
|
|
149180
149654
|
return parseStringIn(value, allowed, "invalid-field");
|
|
@@ -149186,17 +149660,17 @@ function parseStringIn(value, allowed, outOfSetError) {
|
|
|
149186
149660
|
const string = requireString(value);
|
|
149187
149661
|
if (!string.ok) return string;
|
|
149188
149662
|
if (!isOneOf(string.value, allowed)) return err3(outOfSetError);
|
|
149189
|
-
return
|
|
149663
|
+
return ok$1(string.value);
|
|
149190
149664
|
}
|
|
149191
|
-
function
|
|
149665
|
+
function parsePositiveSeconds$1(value) {
|
|
149192
149666
|
if (typeof value !== "number") return err3("invalid-number");
|
|
149193
149667
|
const parsed = asPositiveSeconds(value);
|
|
149194
149668
|
if (!parsed.ok) return err3("invalid-positive-seconds");
|
|
149195
|
-
return
|
|
149669
|
+
return ok$1(parsed.value);
|
|
149196
149670
|
}
|
|
149197
149671
|
function parseOptionalPositiveSeconds(value) {
|
|
149198
|
-
if (value === void 0 || value === null) return
|
|
149199
|
-
return
|
|
149672
|
+
if (value === void 0 || value === null) return ok$1(void 0);
|
|
149673
|
+
return parsePositiveSeconds$1(value);
|
|
149200
149674
|
}
|
|
149201
149675
|
function traverse(items, parse2) {
|
|
149202
149676
|
const values = [];
|
|
@@ -149205,36 +149679,12 @@ function traverse(items, parse2) {
|
|
|
149205
149679
|
if (!parsed.ok) return parsed;
|
|
149206
149680
|
values.push(parsed.value);
|
|
149207
149681
|
}
|
|
149208
|
-
return
|
|
149682
|
+
return ok$1(values);
|
|
149209
149683
|
}
|
|
149210
149684
|
function isOneOf(value, allowed) {
|
|
149211
149685
|
return allowed.includes(value);
|
|
149212
149686
|
}
|
|
149213
149687
|
new TextDecoder("latin1");
|
|
149214
|
-
var PRODUCT_FILE_EXTENSION_TAGS = [
|
|
149215
|
-
"pdf",
|
|
149216
|
-
"docx",
|
|
149217
|
-
"txt",
|
|
149218
|
-
"rtf",
|
|
149219
|
-
"csv",
|
|
149220
|
-
"zip",
|
|
149221
|
-
"mp3",
|
|
149222
|
-
"m4a",
|
|
149223
|
-
"wav",
|
|
149224
|
-
"ogg",
|
|
149225
|
-
"flac",
|
|
149226
|
-
"webm",
|
|
149227
|
-
"mp4",
|
|
149228
|
-
"mov"
|
|
149229
|
-
];
|
|
149230
|
-
new Set(PRODUCT_FILE_EXTENSION_TAGS);
|
|
149231
|
-
var RASTER_IMAGE_MIME_TYPES = [
|
|
149232
|
-
"image/jpeg",
|
|
149233
|
-
"image/png",
|
|
149234
|
-
"image/webp",
|
|
149235
|
-
"image/avif"
|
|
149236
|
-
];
|
|
149237
|
-
new Set(RASTER_IMAGE_MIME_TYPES);
|
|
149238
149688
|
var MEDIA_KINDS2 = [
|
|
149239
149689
|
"image",
|
|
149240
149690
|
"video",
|
|
@@ -149251,10 +149701,7 @@ var MEDIA_ASSET_FILE_FILTERS2 = [
|
|
|
149251
149701
|
"documents",
|
|
149252
149702
|
"downloads"
|
|
149253
149703
|
];
|
|
149254
|
-
var MEDIA_ASSET_LIBRARY_SCOPES = [
|
|
149255
|
-
"files-and-media",
|
|
149256
|
-
"product-files"
|
|
149257
|
-
];
|
|
149704
|
+
var MEDIA_ASSET_LIBRARY_SCOPES = ["files-and-media", "product-files"];
|
|
149258
149705
|
var MediaStorageError = class extends Error {
|
|
149259
149706
|
constructor(message2, options = {}) {
|
|
149260
149707
|
super(message2);
|
|
@@ -149265,24 +149712,30 @@ var MediaStorageError = class extends Error {
|
|
|
149265
149712
|
this.cause = options.cause;
|
|
149266
149713
|
}
|
|
149267
149714
|
};
|
|
149268
|
-
function
|
|
149269
|
-
return {
|
|
149715
|
+
function ok3(value) {
|
|
149716
|
+
return {
|
|
149717
|
+
ok: true,
|
|
149718
|
+
value
|
|
149719
|
+
};
|
|
149270
149720
|
}
|
|
149271
149721
|
function fail(error) {
|
|
149272
|
-
return {
|
|
149722
|
+
return {
|
|
149723
|
+
ok: false,
|
|
149724
|
+
error
|
|
149725
|
+
};
|
|
149273
149726
|
}
|
|
149274
149727
|
function normalizeStringInput(value) {
|
|
149275
149728
|
if (typeof value !== "string") return fail({ tag: "MISSING" });
|
|
149276
149729
|
const trimmed = value.trim();
|
|
149277
149730
|
if (!trimmed) return fail({ tag: "EMPTY" });
|
|
149278
|
-
return
|
|
149731
|
+
return ok3(trimmed);
|
|
149279
149732
|
}
|
|
149280
149733
|
function validateRelativeStoragePath(value) {
|
|
149281
149734
|
if (value.startsWith("sites/")) return fail({ tag: "SITE_SCOPED_PATH" });
|
|
149282
149735
|
if (value.startsWith("/")) return fail({ tag: "LEADING_SLASH" });
|
|
149283
149736
|
if (value.includes("//")) return fail({ tag: "DOUBLE_SLASH" });
|
|
149284
149737
|
if (value.includes("..")) return fail({ tag: "TRAVERSAL" });
|
|
149285
|
-
return
|
|
149738
|
+
return ok3(value);
|
|
149286
149739
|
}
|
|
149287
149740
|
function brandRelativeStoragePath(value) {
|
|
149288
149741
|
return value;
|
|
@@ -149292,13 +149745,11 @@ function parseRelativeStoragePath(value) {
|
|
|
149292
149745
|
if (!normalized.ok) return normalized;
|
|
149293
149746
|
const validated = validateRelativeStoragePath(normalized.value);
|
|
149294
149747
|
if (!validated.ok) return validated;
|
|
149295
|
-
return
|
|
149748
|
+
return ok3(brandRelativeStoragePath(validated.value));
|
|
149296
149749
|
}
|
|
149297
149750
|
function assertRelativeStoragePath(value) {
|
|
149298
149751
|
const parsed = parseRelativeStoragePath(value);
|
|
149299
|
-
if (!parsed.ok) {
|
|
149300
|
-
throw new Error(`Expected RelativeStoragePath, got ${parsed.error.tag}`);
|
|
149301
|
-
}
|
|
149752
|
+
if (!parsed.ok) throw new Error(`Expected RelativeStoragePath, got ${parsed.error.tag}`);
|
|
149302
149753
|
return parsed.value;
|
|
149303
149754
|
}
|
|
149304
149755
|
var pad = (value) => value.toString().padStart(2, "0");
|
|
@@ -149311,55 +149762,47 @@ var extractExtension = (filename) => {
|
|
|
149311
149762
|
var generateId4 = () => {
|
|
149312
149763
|
const crypto2 = globalThis.crypto;
|
|
149313
149764
|
if (crypto2 && typeof crypto2.getRandomValues === "function") {
|
|
149314
|
-
const array = crypto2.getRandomValues(new Uint32Array(4));
|
|
149765
|
+
const array = crypto2.getRandomValues(/* @__PURE__ */ new Uint32Array(4));
|
|
149315
149766
|
return Array.from(array).map((value) => value.toString(16).padStart(8, "0")).join("-");
|
|
149316
149767
|
}
|
|
149317
149768
|
return `${Date.now()}-${Math.random().toString(16).slice(2)}`;
|
|
149318
149769
|
};
|
|
149319
|
-
var generateStoragePath = ({
|
|
149320
|
-
filename,
|
|
149321
|
-
folder = "originals",
|
|
149322
|
-
variantKey,
|
|
149323
|
-
now = /* @__PURE__ */ new Date()
|
|
149324
|
-
}) => {
|
|
149770
|
+
var generateStoragePath = ({ filename, folder = "originals", variantKey, now = /* @__PURE__ */ new Date() }) => {
|
|
149325
149771
|
const extension = extractExtension(filename);
|
|
149326
149772
|
const year = now.getUTCFullYear();
|
|
149327
149773
|
const month = pad(now.getUTCMonth() + 1);
|
|
149328
149774
|
const id = generateId4();
|
|
149329
|
-
if (folder === "variants") {
|
|
149330
|
-
|
|
149331
|
-
return assertRelativeStoragePath(`variants/${key}/${id}${extension}`);
|
|
149332
|
-
}
|
|
149333
|
-
if (folder === "imports") {
|
|
149334
|
-
const key = variantKey ?? generateId4();
|
|
149335
|
-
return assertRelativeStoragePath(`imports/${key}${extension}`);
|
|
149336
|
-
}
|
|
149775
|
+
if (folder === "variants") return assertRelativeStoragePath(`variants/${variantKey ?? generateId4()}/${id}${extension}`);
|
|
149776
|
+
if (folder === "imports") return assertRelativeStoragePath(`imports/${variantKey ?? generateId4()}${extension}`);
|
|
149337
149777
|
return assertRelativeStoragePath(`originals/${year}/${month}/${id}${extension}`);
|
|
149338
149778
|
};
|
|
149339
149779
|
var DEFAULT_BUCKET = "media";
|
|
149340
149780
|
var MAX_LIMIT = 100;
|
|
149341
|
-
var fileKindSchema = z.custom(
|
|
149342
|
-
|
|
149343
|
-
|
|
149344
|
-
);
|
|
149345
|
-
var fileUsesSchema = z.custom(
|
|
149346
|
-
(value) => parseFileUsesJson(value).ok,
|
|
149347
|
-
{ message: "Invalid file uses JSON" }
|
|
149348
|
-
);
|
|
149349
|
-
var accessPolicySchema = z.custom(
|
|
149350
|
-
(value) => parseAccessPolicyJson(value).ok,
|
|
149351
|
-
{ message: "Invalid access policy JSON" }
|
|
149352
|
-
);
|
|
149781
|
+
var fileKindSchema = z.custom((value) => parseFileKindJson(value).ok, { message: "Invalid file kind JSON" });
|
|
149782
|
+
var fileUsesSchema = z.custom((value) => parseFileUsesJson(value).ok, { message: "Invalid file uses JSON" });
|
|
149783
|
+
var accessPolicySchema = z.custom((value) => parseAccessPolicyJson(value).ok, { message: "Invalid access policy JSON" });
|
|
149353
149784
|
var fileDomainSchema = z.object({
|
|
149354
149785
|
fileKind: fileKindSchema,
|
|
149355
149786
|
fileUses: fileUsesSchema,
|
|
149356
149787
|
accessPolicy: accessPolicySchema,
|
|
149357
|
-
storageClass: z.enum([
|
|
149788
|
+
storageClass: z.enum([
|
|
149789
|
+
"public-site",
|
|
149790
|
+
"private-site",
|
|
149791
|
+
"temporary"
|
|
149792
|
+
]),
|
|
149358
149793
|
mimeTypeDetected: z.string().min(1).optional().nullable(),
|
|
149359
149794
|
safeDownloadFilename: z.string().min(1).optional().nullable(),
|
|
149360
|
-
lifecycleState: z.enum([
|
|
149795
|
+
lifecycleState: z.enum([
|
|
149796
|
+
"active",
|
|
149797
|
+
"pending-delete",
|
|
149798
|
+
"deleted"
|
|
149799
|
+
]),
|
|
149361
149800
|
originAssetId: z.string().uuid().optional().nullable(),
|
|
149362
|
-
derivativeKind: z.enum([
|
|
149801
|
+
derivativeKind: z.enum([
|
|
149802
|
+
"image-variant",
|
|
149803
|
+
"video-poster",
|
|
149804
|
+
"audio-waveform"
|
|
149805
|
+
]).optional().nullable(),
|
|
149363
149806
|
uploadSessionId: z.string().uuid().optional().nullable()
|
|
149364
149807
|
});
|
|
149365
149808
|
var fileDomainPatchSchema = fileDomainSchema.partial();
|
|
@@ -149400,13 +149843,10 @@ z.object({
|
|
|
149400
149843
|
altText: z.string().nullable().optional(),
|
|
149401
149844
|
caption: z.string().nullable().optional(),
|
|
149402
149845
|
exif: z.record(z.string(), z.any()).nullable().optional(),
|
|
149403
|
-
// Video metadata
|
|
149404
149846
|
durationSeconds: z.number().positive().nullable().optional(),
|
|
149405
149847
|
thumbnailAssetId: z.string().uuid().nullable().optional(),
|
|
149406
149848
|
isThumbnail: z.boolean().optional()
|
|
149407
|
-
}).refine((value) => Object.keys(value).length > 0, {
|
|
149408
|
-
message: "Update payload must include at least one field"
|
|
149409
|
-
});
|
|
149849
|
+
}).refine((value) => Object.keys(value).length > 0, { message: "Update payload must include at least one field" });
|
|
149410
149850
|
z.object({
|
|
149411
149851
|
siteId: z.string().min(1),
|
|
149412
149852
|
limit: z.number().int().min(1).max(MAX_LIMIT).optional(),
|
|
@@ -156624,6 +157064,7 @@ var MediaEditor = ({
|
|
|
156624
157064
|
cropEditorMode = "dialog",
|
|
156625
157065
|
cropEditorAutoOpen = false,
|
|
156626
157066
|
mediaPickerAutoOpen = false,
|
|
157067
|
+
onMediaPickerOpenChange,
|
|
156627
157068
|
mediaPickerDialogMaxWidth,
|
|
156628
157069
|
mediaPickerPolicy,
|
|
156629
157070
|
showPreview = true,
|
|
@@ -156683,7 +157124,8 @@ var MediaEditor = ({
|
|
|
156683
157124
|
useEffect(() => {
|
|
156684
157125
|
if (!mediaPickerAutoOpen) return;
|
|
156685
157126
|
setPickerOpen(true);
|
|
156686
|
-
|
|
157127
|
+
onMediaPickerOpenChange?.(true);
|
|
157128
|
+
}, [mediaPickerAutoOpen, onMediaPickerOpenChange]);
|
|
156687
157129
|
useEffect(() => {
|
|
156688
157130
|
if (mediaPickerAutoOpen) {
|
|
156689
157131
|
setCropOpen(false);
|
|
@@ -156851,7 +157293,10 @@ var MediaEditor = ({
|
|
|
156851
157293
|
{
|
|
156852
157294
|
value,
|
|
156853
157295
|
previewAspectRatio,
|
|
156854
|
-
onReplace: () =>
|
|
157296
|
+
onReplace: () => {
|
|
157297
|
+
setPickerOpen(true);
|
|
157298
|
+
onMediaPickerOpenChange?.(true);
|
|
157299
|
+
},
|
|
156855
157300
|
onEditCrop: openCropper,
|
|
156856
157301
|
onEditDetails,
|
|
156857
157302
|
onRemove: clear,
|
|
@@ -156877,6 +157322,7 @@ var MediaEditor = ({
|
|
|
156877
157322
|
open: pickerOpen,
|
|
156878
157323
|
onOpenChange: (open) => {
|
|
156879
157324
|
setPickerOpen(open);
|
|
157325
|
+
onMediaPickerOpenChange?.(open);
|
|
156880
157326
|
},
|
|
156881
157327
|
children: ({
|
|
156882
157328
|
assets,
|
|
@@ -157000,54 +157446,39 @@ var filterUpdatePayload = (input) => {
|
|
|
157000
157446
|
return payload;
|
|
157001
157447
|
};
|
|
157002
157448
|
var extractErrorMessage = (body) => {
|
|
157003
|
-
if (!isRecord21(body))
|
|
157004
|
-
|
|
157005
|
-
|
|
157006
|
-
|
|
157007
|
-
|
|
157449
|
+
if (!isRecord21(body)) return typeof body === "string" && body.trim().length > 0 ? body : null;
|
|
157450
|
+
for (const key of [
|
|
157451
|
+
"error",
|
|
157452
|
+
"message",
|
|
157453
|
+
"detail",
|
|
157454
|
+
"reason"
|
|
157455
|
+
]) {
|
|
157008
157456
|
const value = body[key];
|
|
157009
|
-
if (typeof value === "string" && value.trim().length > 0)
|
|
157010
|
-
return value;
|
|
157011
|
-
}
|
|
157457
|
+
if (typeof value === "string" && value.trim().length > 0) return value;
|
|
157012
157458
|
}
|
|
157013
157459
|
const details = body.details;
|
|
157014
|
-
if (Array.isArray(details)) {
|
|
157015
|
-
|
|
157016
|
-
|
|
157017
|
-
return entry;
|
|
157018
|
-
}
|
|
157019
|
-
if (isRecord21(entry) && typeof entry.message === "string" && entry.message.trim().length > 0) {
|
|
157020
|
-
return entry.message;
|
|
157021
|
-
}
|
|
157022
|
-
}
|
|
157460
|
+
if (Array.isArray(details)) for (const entry of details) {
|
|
157461
|
+
if (typeof entry === "string" && entry.trim().length > 0) return entry;
|
|
157462
|
+
if (isRecord21(entry) && typeof entry.message === "string" && entry.message.trim().length > 0) return entry.message;
|
|
157023
157463
|
}
|
|
157024
157464
|
const errors = body.errors;
|
|
157025
157465
|
if (Array.isArray(errors)) {
|
|
157026
|
-
for (const entry of errors)
|
|
157027
|
-
if (isRecord21(entry) && typeof entry.message === "string" && entry.message.trim().length > 0) {
|
|
157028
|
-
return entry.message;
|
|
157029
|
-
}
|
|
157030
|
-
}
|
|
157466
|
+
for (const entry of errors) if (isRecord21(entry) && typeof entry.message === "string" && entry.message.trim().length > 0) return entry.message;
|
|
157031
157467
|
}
|
|
157032
157468
|
return null;
|
|
157033
157469
|
};
|
|
157034
157470
|
var toMediaStorageError = (error, fallback2) => {
|
|
157035
|
-
if (error instanceof MediaStorageError)
|
|
157036
|
-
|
|
157037
|
-
|
|
157038
|
-
|
|
157039
|
-
|
|
157040
|
-
|
|
157041
|
-
}
|
|
157042
|
-
if (error instanceof Error && error.message.trim().length > 0) {
|
|
157043
|
-
return new MediaStorageError(error.message, { cause: error });
|
|
157044
|
-
}
|
|
157471
|
+
if (error instanceof MediaStorageError) return error;
|
|
157472
|
+
if (error instanceof ApiRequestError) return new MediaStorageError(extractErrorMessage(error.body ?? null) ?? fallback2, {
|
|
157473
|
+
status: error.status,
|
|
157474
|
+
cause: error
|
|
157475
|
+
});
|
|
157476
|
+
if (error instanceof Error && error.message.trim().length > 0) return new MediaStorageError(error.message, { cause: error });
|
|
157045
157477
|
return new MediaStorageError(fallback2, { cause: error });
|
|
157046
157478
|
};
|
|
157047
157479
|
var callClient = async (client, params, mapError) => {
|
|
157048
157480
|
try {
|
|
157049
|
-
|
|
157050
|
-
return unwrapResponse(result);
|
|
157481
|
+
return unwrapResponse(await client(params));
|
|
157051
157482
|
} catch (error) {
|
|
157052
157483
|
throw mapError(error);
|
|
157053
157484
|
}
|
|
@@ -157055,82 +157486,63 @@ var callClient = async (client, params, mapError) => {
|
|
|
157055
157486
|
var createApiMediaRepo = ({ client }) => ({
|
|
157056
157487
|
async getAsset(assetId) {
|
|
157057
157488
|
try {
|
|
157058
|
-
|
|
157489
|
+
return unwrapResponse(await client({
|
|
157059
157490
|
endpoint: "mediaGet",
|
|
157060
157491
|
params: { assetId }
|
|
157061
|
-
});
|
|
157062
|
-
return unwrapResponse(result);
|
|
157492
|
+
}));
|
|
157063
157493
|
} catch (error) {
|
|
157064
|
-
if (error instanceof ApiRequestError && error.status === 404)
|
|
157065
|
-
return null;
|
|
157066
|
-
}
|
|
157494
|
+
if (error instanceof ApiRequestError && error.status === 404) return null;
|
|
157067
157495
|
throw toMediaStorageError(error, DEFAULT_MESSAGES.get);
|
|
157068
157496
|
}
|
|
157069
157497
|
},
|
|
157070
157498
|
async listAssets(options) {
|
|
157071
|
-
return callClient(
|
|
157072
|
-
|
|
157073
|
-
{
|
|
157074
|
-
|
|
157075
|
-
|
|
157076
|
-
|
|
157077
|
-
|
|
157078
|
-
|
|
157079
|
-
|
|
157080
|
-
|
|
157081
|
-
|
|
157082
|
-
}
|
|
157083
|
-
},
|
|
157084
|
-
(error) => toMediaStorageError(error, DEFAULT_MESSAGES.list)
|
|
157085
|
-
);
|
|
157499
|
+
return callClient(client, {
|
|
157500
|
+
endpoint: "mediaList",
|
|
157501
|
+
params: {
|
|
157502
|
+
siteId: options.siteId,
|
|
157503
|
+
q: options.search,
|
|
157504
|
+
limit: options.limit === void 0 ? void 0 : String(options.limit),
|
|
157505
|
+
offset: options.offset === void 0 ? void 0 : String(options.offset),
|
|
157506
|
+
labels: normalizeLabels(options.labels),
|
|
157507
|
+
fileFilter: options.fileFilter ?? fileFilterForMediaKinds(options.mediaKinds)
|
|
157508
|
+
}
|
|
157509
|
+
}, (error) => toMediaStorageError(error, DEFAULT_MESSAGES.list));
|
|
157086
157510
|
},
|
|
157087
157511
|
async createAsset(input) {
|
|
157088
|
-
return callClient(
|
|
157089
|
-
|
|
157090
|
-
{
|
|
157091
|
-
|
|
157092
|
-
|
|
157093
|
-
|
|
157094
|
-
|
|
157095
|
-
|
|
157096
|
-
|
|
157097
|
-
|
|
157098
|
-
|
|
157099
|
-
|
|
157100
|
-
|
|
157101
|
-
|
|
157102
|
-
|
|
157103
|
-
|
|
157104
|
-
|
|
157105
|
-
|
|
157106
|
-
}
|
|
157107
|
-
},
|
|
157108
|
-
(error) => toMediaStorageError(error, DEFAULT_MESSAGES.create)
|
|
157109
|
-
);
|
|
157512
|
+
return callClient(client, {
|
|
157513
|
+
endpoint: "createMediaAsset",
|
|
157514
|
+
body: {
|
|
157515
|
+
siteId: input.siteId,
|
|
157516
|
+
storageBucket: input.storageBucket ?? "media",
|
|
157517
|
+
storagePath: input.storagePath,
|
|
157518
|
+
filename: input.filename,
|
|
157519
|
+
mimeType: input.mimeType,
|
|
157520
|
+
width: input.width,
|
|
157521
|
+
height: input.height,
|
|
157522
|
+
bytes: input.bytes,
|
|
157523
|
+
checksumSha256: input.checksumSha256 ?? null,
|
|
157524
|
+
source: input.source ?? "upload",
|
|
157525
|
+
altText: input.altText ?? null,
|
|
157526
|
+
caption: input.caption ?? null,
|
|
157527
|
+
exif: input.exif ?? null
|
|
157528
|
+
}
|
|
157529
|
+
}, (error) => toMediaStorageError(error, DEFAULT_MESSAGES.create));
|
|
157110
157530
|
},
|
|
157111
157531
|
async updateAsset(assetId, input) {
|
|
157112
157532
|
const payload = filterUpdatePayload(input);
|
|
157113
|
-
if (Object.keys(payload).length === 0)
|
|
157114
|
-
|
|
157115
|
-
|
|
157116
|
-
|
|
157117
|
-
|
|
157118
|
-
|
|
157119
|
-
endpoint: "mediaUpdate",
|
|
157120
|
-
params: { assetId },
|
|
157121
|
-
body: payload
|
|
157122
|
-
},
|
|
157123
|
-
(error) => toMediaStorageError(error, DEFAULT_MESSAGES.update)
|
|
157124
|
-
);
|
|
157533
|
+
if (Object.keys(payload).length === 0) throw new MediaStorageError("No update payload provided");
|
|
157534
|
+
return callClient(client, {
|
|
157535
|
+
endpoint: "mediaUpdate",
|
|
157536
|
+
params: { assetId },
|
|
157537
|
+
body: payload
|
|
157538
|
+
}, (error) => toMediaStorageError(error, DEFAULT_MESSAGES.update));
|
|
157125
157539
|
},
|
|
157126
157540
|
async deleteAsset(assetId, options) {
|
|
157127
157541
|
try {
|
|
157128
157542
|
await client({
|
|
157129
157543
|
endpoint: "mediaDelete",
|
|
157130
157544
|
params: { assetId },
|
|
157131
|
-
body: {
|
|
157132
|
-
deleteObject: options?.deleteObject
|
|
157133
|
-
}
|
|
157545
|
+
body: { deleteObject: options?.deleteObject }
|
|
157134
157546
|
});
|
|
157135
157547
|
} catch (error) {
|
|
157136
157548
|
throw toMediaStorageError(error, DEFAULT_MESSAGES.delete);
|
|
@@ -157145,7 +157557,7 @@ var globalAssetInflightRequests = /* @__PURE__ */ new Map();
|
|
|
157145
157557
|
function createCachedMediaRepo(baseRepo, options) {
|
|
157146
157558
|
const cacheTtlMs = DEFAULT_CACHE_TTL_MS;
|
|
157147
157559
|
function buildCacheKey(options2) {
|
|
157148
|
-
|
|
157560
|
+
return [
|
|
157149
157561
|
options2.siteId,
|
|
157150
157562
|
options2.search ?? "",
|
|
157151
157563
|
options2.limit ?? "all",
|
|
@@ -157154,8 +157566,7 @@ function createCachedMediaRepo(baseRepo, options) {
|
|
|
157154
157566
|
JSON.stringify(options2.mediaKinds ?? null),
|
|
157155
157567
|
options2.fileFilter ?? "all",
|
|
157156
157568
|
options2.libraryScope ?? "files-and-media"
|
|
157157
|
-
];
|
|
157158
|
-
return parts.join(":");
|
|
157569
|
+
].join(":");
|
|
157159
157570
|
}
|
|
157160
157571
|
function readCache(key, cache) {
|
|
157161
157572
|
const entry = cache.get(key);
|
|
@@ -157181,17 +157592,10 @@ function createCachedMediaRepo(baseRepo, options) {
|
|
|
157181
157592
|
async getAsset(assetId) {
|
|
157182
157593
|
const cacheKey = `asset:${assetId}`;
|
|
157183
157594
|
const entry = globalAssetCache.get(cacheKey);
|
|
157184
|
-
if (entry)
|
|
157185
|
-
|
|
157186
|
-
return entry.data;
|
|
157187
|
-
} else {
|
|
157188
|
-
globalAssetCache.delete(cacheKey);
|
|
157189
|
-
}
|
|
157190
|
-
}
|
|
157595
|
+
if (entry) if (entry.expiresAt > Date.now()) return entry.data;
|
|
157596
|
+
else globalAssetCache.delete(cacheKey);
|
|
157191
157597
|
const inflightRequest = globalAssetInflightRequests.get(assetId);
|
|
157192
|
-
if (inflightRequest)
|
|
157193
|
-
return inflightRequest;
|
|
157194
|
-
}
|
|
157598
|
+
if (inflightRequest) return inflightRequest;
|
|
157195
157599
|
const fetchPromise = baseRepo.getAsset(assetId).then((result) => {
|
|
157196
157600
|
writeCache(cacheKey, result, globalAssetCache);
|
|
157197
157601
|
globalAssetInflightRequests.delete(assetId);
|
|
@@ -157206,9 +157610,7 @@ function createCachedMediaRepo(baseRepo, options) {
|
|
|
157206
157610
|
async listAssets(options2) {
|
|
157207
157611
|
const cacheKey = buildCacheKey(options2);
|
|
157208
157612
|
const cached = readCache(cacheKey, globalListCache);
|
|
157209
|
-
if (cached)
|
|
157210
|
-
return cached;
|
|
157211
|
-
}
|
|
157613
|
+
if (cached) return cached;
|
|
157212
157614
|
const result = await baseRepo.listAssets(options2);
|
|
157213
157615
|
writeCache(cacheKey, result, globalListCache);
|
|
157214
157616
|
return result;
|
|
@@ -157452,6 +157854,26 @@ function withRepeaterThumbnailMediaFieldUi(field, options) {
|
|
|
157452
157854
|
}
|
|
157453
157855
|
};
|
|
157454
157856
|
}
|
|
157857
|
+
function withRepeaterThumbnailPickerOnlyMediaFieldUi(field, options) {
|
|
157858
|
+
if (!field || field.type !== "media") {
|
|
157859
|
+
return null;
|
|
157860
|
+
}
|
|
157861
|
+
return {
|
|
157862
|
+
...field,
|
|
157863
|
+
ui: {
|
|
157864
|
+
...field.ui ?? {},
|
|
157865
|
+
variant: "inline",
|
|
157866
|
+
hideLabel: true,
|
|
157867
|
+
hideDescription: true,
|
|
157868
|
+
cropEditorMode: "inline",
|
|
157869
|
+
cropEditorAutoOpen: false,
|
|
157870
|
+
mediaPickerAutoOpen: true,
|
|
157871
|
+
...options?.onMediaPickerOpenChange ? { onMediaPickerOpenChange: options.onMediaPickerOpenChange } : {},
|
|
157872
|
+
showMediaPreview: false,
|
|
157873
|
+
showMediaOverlayActions: false
|
|
157874
|
+
}
|
|
157875
|
+
};
|
|
157876
|
+
}
|
|
157455
157877
|
function withRepeaterStackMediaFieldUi(field) {
|
|
157456
157878
|
return {
|
|
157457
157879
|
...field,
|
|
@@ -157830,6 +158252,7 @@ function InlineThumbnailAltField({ backend, path }) {
|
|
|
157830
158252
|
}
|
|
157831
158253
|
);
|
|
157832
158254
|
}
|
|
158255
|
+
var idleThumbnailPickerOnlyFlow = { kind: "idle" };
|
|
157833
158256
|
function handleDoneButtonKeyDown2(event, onDone) {
|
|
157834
158257
|
if (event.key !== "Enter" && event.key !== " ") {
|
|
157835
158258
|
return;
|
|
@@ -157854,7 +158277,9 @@ function RepeaterThumbnailCard({
|
|
|
157854
158277
|
onMoveUp,
|
|
157855
158278
|
onMoveDown,
|
|
157856
158279
|
disableMoveUp,
|
|
157857
|
-
disableMoveDown
|
|
158280
|
+
disableMoveDown,
|
|
158281
|
+
mediaPickerAutoOpenRequest,
|
|
158282
|
+
onMediaPickerAutoOpenHandled
|
|
157858
158283
|
}) {
|
|
157859
158284
|
const rowPath = `${basePath}.${index2}`;
|
|
157860
158285
|
const blockContext = useBlockContext();
|
|
@@ -157913,6 +158338,19 @@ function RepeaterThumbnailCard({
|
|
|
157913
158338
|
}),
|
|
157914
158339
|
[thumbnailField, imageTabPickerAutoOpen]
|
|
157915
158340
|
);
|
|
158341
|
+
const [pickerOnlyFlow, setPickerOnlyFlow] = useState(
|
|
158342
|
+
idleThumbnailPickerOnlyFlow
|
|
158343
|
+
);
|
|
158344
|
+
const handlePickerOnlyOpenChange = useCallback((open) => {
|
|
158345
|
+
if (open) return;
|
|
158346
|
+
setPickerOnlyFlow(idleThumbnailPickerOnlyFlow);
|
|
158347
|
+
}, []);
|
|
158348
|
+
const pickerOnlyField = useMemo(
|
|
158349
|
+
() => pickerOnlyFlow.kind === "picker-only" ? withRepeaterThumbnailPickerOnlyMediaFieldUi(thumbnailField, {
|
|
158350
|
+
onMediaPickerOpenChange: handlePickerOnlyOpenChange
|
|
158351
|
+
}) : null,
|
|
158352
|
+
[handlePickerOnlyOpenChange, pickerOnlyFlow.kind, thumbnailField]
|
|
158353
|
+
);
|
|
157916
158354
|
const rawThumbnailValue = getObjectPathValue(normalizedItemValue, thumbnailFieldId);
|
|
157917
158355
|
const [resolvedThumbnailValue, setResolvedThumbnailValue] = useState(null);
|
|
157918
158356
|
const effectiveThumbnailValue = resolvedThumbnailValue ?? rawThumbnailValue;
|
|
@@ -157942,6 +158380,7 @@ function RepeaterThumbnailCard({
|
|
|
157942
158380
|
const density = densityClasses(presentation.density);
|
|
157943
158381
|
const [detailsOpen, setDetailsOpen] = useState(false);
|
|
157944
158382
|
const [editorTab, setEditorTab] = useState("image");
|
|
158383
|
+
const handledMediaPickerAutoOpenRequestIdRef = useRef(null);
|
|
157945
158384
|
const layoutGridSpanFactor = useMemo(() => {
|
|
157946
158385
|
if (presentation.mode !== "layoutGrid") {
|
|
157947
158386
|
return 1;
|
|
@@ -158082,11 +158521,26 @@ function RepeaterThumbnailCard({
|
|
|
158082
158521
|
setEditorTab(tab);
|
|
158083
158522
|
setDetailsOpen(true);
|
|
158084
158523
|
};
|
|
158085
|
-
const openReplaceFlow = () => {
|
|
158524
|
+
const openReplaceFlow = useCallback(() => {
|
|
158086
158525
|
setImageTabPickerAutoOpen(true);
|
|
158087
158526
|
setEditorTab("image");
|
|
158088
158527
|
setDetailsOpen(true);
|
|
158089
|
-
};
|
|
158528
|
+
}, []);
|
|
158529
|
+
useEffect(() => {
|
|
158530
|
+
const requestId = mediaPickerAutoOpenRequest?.requestId;
|
|
158531
|
+
if (requestId === void 0) return;
|
|
158532
|
+
if (handledMediaPickerAutoOpenRequestIdRef.current === requestId) return;
|
|
158533
|
+
handledMediaPickerAutoOpenRequestIdRef.current = requestId;
|
|
158534
|
+
if (thumbnailField?.type === "media") {
|
|
158535
|
+
setPickerOnlyFlow({ kind: "picker-only", requestId });
|
|
158536
|
+
}
|
|
158537
|
+
onMediaPickerAutoOpenHandled?.(requestId);
|
|
158538
|
+
}, [mediaPickerAutoOpenRequest, onMediaPickerAutoOpenHandled, thumbnailField]);
|
|
158539
|
+
useEffect(() => {
|
|
158540
|
+
if (pickerOnlyFlow.kind !== "picker-only") return;
|
|
158541
|
+
if (rawThumbnailValue == null) return;
|
|
158542
|
+
setPickerOnlyFlow(idleThumbnailPickerOnlyFlow);
|
|
158543
|
+
}, [pickerOnlyFlow.kind, rawThumbnailValue]);
|
|
158090
158544
|
const handlePreviewClick = (event) => {
|
|
158091
158545
|
if (event.defaultPrevented) {
|
|
158092
158546
|
return;
|
|
@@ -158254,6 +158708,7 @@ function RepeaterThumbnailCard({
|
|
|
158254
158708
|
]
|
|
158255
158709
|
}
|
|
158256
158710
|
),
|
|
158711
|
+
pickerOnlyFlow.kind === "picker-only" && pickerOnlyField ? /* @__PURE__ */ jsx("div", { "data-repeater-thumbnail-picker-only-flow": pickerOnlyFlow.requestId, children: renderChild(pickerOnlyField, thumbnailFieldPath) }) : null,
|
|
158257
158712
|
/* @__PURE__ */ jsx(
|
|
158258
158713
|
Dialog2,
|
|
158259
158714
|
{
|
|
@@ -158782,7 +159237,9 @@ function RepeaterThumbnailGridItem({
|
|
|
158782
159237
|
onRemove,
|
|
158783
159238
|
renderChild,
|
|
158784
159239
|
presentation,
|
|
158785
|
-
canDrag
|
|
159240
|
+
canDrag,
|
|
159241
|
+
mediaPickerAutoOpenRequest,
|
|
159242
|
+
onMediaPickerAutoOpenHandled
|
|
158786
159243
|
}) {
|
|
158787
159244
|
const sortable = useSortable({ id, disabled: !canDrag });
|
|
158788
159245
|
const style2 = {
|
|
@@ -158804,6 +159261,8 @@ function RepeaterThumbnailGridItem({
|
|
|
158804
159261
|
onRemove,
|
|
158805
159262
|
renderChild,
|
|
158806
159263
|
presentation,
|
|
159264
|
+
mediaPickerAutoOpenRequest: mediaPickerAutoOpenRequest?.targetIndex === index2 ? { requestId: mediaPickerAutoOpenRequest.requestId } : null,
|
|
159265
|
+
onMediaPickerAutoOpenHandled,
|
|
158807
159266
|
renderDragHandle: canDrag ? () => /* @__PURE__ */ jsx(
|
|
158808
159267
|
RepeaterDragHandle,
|
|
158809
159268
|
{
|
|
@@ -158827,6 +159286,9 @@ function RepeaterThumbnailGrid({
|
|
|
158827
159286
|
minItems,
|
|
158828
159287
|
onMove,
|
|
158829
159288
|
onRemove,
|
|
159289
|
+
onAdd,
|
|
159290
|
+
mediaPickerAutoOpenRequest,
|
|
159291
|
+
onMediaPickerAutoOpenHandled,
|
|
158830
159292
|
renderChild,
|
|
158831
159293
|
presentation
|
|
158832
159294
|
}) {
|
|
@@ -158836,33 +159298,54 @@ function RepeaterThumbnailGrid({
|
|
|
158836
159298
|
activationDistance: 6,
|
|
158837
159299
|
onMove
|
|
158838
159300
|
});
|
|
158839
|
-
return /* @__PURE__ */
|
|
158840
|
-
|
|
158841
|
-
|
|
158842
|
-
|
|
158843
|
-
|
|
158844
|
-
|
|
158845
|
-
|
|
158846
|
-
|
|
158847
|
-
|
|
158848
|
-
|
|
158849
|
-
|
|
158850
|
-
|
|
158851
|
-
|
|
158852
|
-
|
|
158853
|
-
|
|
158854
|
-
|
|
158855
|
-
|
|
158856
|
-
|
|
158857
|
-
|
|
158858
|
-
|
|
158859
|
-
|
|
158860
|
-
|
|
158861
|
-
|
|
158862
|
-
|
|
158863
|
-
|
|
158864
|
-
|
|
159301
|
+
return /* @__PURE__ */ jsxs("div", { ref: linearDnd.containerRef, children: [
|
|
159302
|
+
items.length === 0 ? /* @__PURE__ */ jsxs(
|
|
159303
|
+
"button",
|
|
159304
|
+
{
|
|
159305
|
+
type: "button",
|
|
159306
|
+
className: "flex min-h-36 w-full flex-col items-center justify-center gap-3 rounded-md border-2 border-dashed border-input bg-muted/30 px-4 py-6 text-sm font-medium text-muted-foreground transition hover:border-primary/60 hover:bg-muted/50 hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",
|
|
159307
|
+
onClick: onAdd,
|
|
159308
|
+
children: [
|
|
159309
|
+
/* @__PURE__ */ jsx("span", { className: "flex h-10 w-10 items-center justify-center rounded-full bg-background shadow-sm", children: /* @__PURE__ */ jsx(Image, { className: "h-5 w-5", "aria-hidden": "true" }) }),
|
|
159310
|
+
/* @__PURE__ */ jsxs("span", { className: "inline-flex items-center gap-2", children: [
|
|
159311
|
+
/* @__PURE__ */ jsx(Plus, { className: "h-4 w-4", "aria-hidden": "true" }),
|
|
159312
|
+
"Add ",
|
|
159313
|
+
config.itemLabel ?? "Item"
|
|
159314
|
+
] })
|
|
159315
|
+
]
|
|
159316
|
+
}
|
|
159317
|
+
) : null,
|
|
159318
|
+
/* @__PURE__ */ jsx(
|
|
159319
|
+
DndContext,
|
|
159320
|
+
{
|
|
159321
|
+
sensors: linearDnd.sensors,
|
|
159322
|
+
collisionDetection: linearDnd.collisionDetection,
|
|
159323
|
+
onDragEnd: linearDnd.handleDragEnd,
|
|
159324
|
+
children: /* @__PURE__ */ jsx(SortableContext, { items: linearDnd.sortableItemIds, strategy: linearDnd.sortingStrategy, children: /* @__PURE__ */ jsx("div", { className: getGridClassName(presentation.density), children: items.map((item, index2) => /* @__PURE__ */ jsx(
|
|
159325
|
+
RepeaterThumbnailGridItem,
|
|
159326
|
+
{
|
|
159327
|
+
id: item.id,
|
|
159328
|
+
index: index2,
|
|
159329
|
+
config,
|
|
159330
|
+
backend,
|
|
159331
|
+
basePath,
|
|
159332
|
+
itemsLength: items.length,
|
|
159333
|
+
minItems,
|
|
159334
|
+
onMove,
|
|
159335
|
+
onRemove,
|
|
159336
|
+
renderChild,
|
|
159337
|
+
presentation,
|
|
159338
|
+
canDrag: linearDnd.canUsePointerDrag,
|
|
159339
|
+
mediaPickerAutoOpenRequest,
|
|
159340
|
+
onMediaPickerAutoOpenHandled
|
|
159341
|
+
},
|
|
159342
|
+
item.id
|
|
159343
|
+
)) }) })
|
|
159344
|
+
}
|
|
159345
|
+
)
|
|
159346
|
+
] });
|
|
158865
159347
|
}
|
|
159348
|
+
var noAddFollowUp = { kind: "none" };
|
|
158866
159349
|
function RepeaterField({ path, backend, config, renderChild }) {
|
|
158867
159350
|
const repeaterOps = useRepeaterBackend(backend, path);
|
|
158868
159351
|
const fieldState = backend.getFieldState(path);
|
|
@@ -158871,6 +159354,8 @@ function RepeaterField({ path, backend, config, renderChild }) {
|
|
|
158871
159354
|
const polymorphicWarnOnceRef = useRef(false);
|
|
158872
159355
|
const labelFieldWarnOnceRef = useRef(false);
|
|
158873
159356
|
const addButtonRef = useRef(null);
|
|
159357
|
+
const mediaPickerAutoOpenRequestIdRef = useRef(0);
|
|
159358
|
+
const [mediaPickerAutoOpenRequest, setMediaPickerAutoOpenRequest] = useState(null);
|
|
158874
159359
|
const minItems = config.minItems ?? 0;
|
|
158875
159360
|
const maxItems = config.maxItems;
|
|
158876
159361
|
const isPolymorphic = Boolean(config.polymorphic && config.itemTypes);
|
|
@@ -158910,20 +159395,33 @@ function RepeaterField({ path, backend, config, renderChild }) {
|
|
|
158910
159395
|
labelFieldWarnOnceRef.current = true;
|
|
158911
159396
|
}, [presentation, isPolymorphic, path, config.fields]);
|
|
158912
159397
|
const addDisabled = maxItems != null && repeaterOps.items.length >= maxItems || layoutGridAddDisabled;
|
|
158913
|
-
const handleAdd = (itemType) => {
|
|
159398
|
+
const handleAdd = (itemType, followUp = noAddFollowUp) => {
|
|
159399
|
+
if (maxItems != null && repeaterOps.items.length >= maxItems) {
|
|
159400
|
+
return { kind: "skipped" };
|
|
159401
|
+
}
|
|
158914
159402
|
if (useLayoutGrid && !canAppendLayoutGridDefaultItem(itemType)) {
|
|
158915
|
-
return;
|
|
159403
|
+
return { kind: "skipped" };
|
|
158916
159404
|
}
|
|
158917
159405
|
const nextItem = createDefaultItem(config, itemType);
|
|
159406
|
+
const nextIndex = repeaterOps.items.length;
|
|
158918
159407
|
if (presentation.mode === "layoutGrid") {
|
|
158919
159408
|
const nextPlacement = getNextLayoutGridPlacement(itemType);
|
|
158920
159409
|
if (!nextPlacement) {
|
|
158921
|
-
return;
|
|
159410
|
+
return { kind: "skipped" };
|
|
158922
159411
|
}
|
|
158923
159412
|
nextItem[presentation.rowField] = nextPlacement.row;
|
|
158924
159413
|
nextItem[presentation.columnField] = nextPlacement.colStart;
|
|
158925
159414
|
}
|
|
158926
159415
|
repeaterOps.append(nextItem);
|
|
159416
|
+
if (followUp.kind === "open-thumbnail-media-picker") {
|
|
159417
|
+
mediaPickerAutoOpenRequestIdRef.current += 1;
|
|
159418
|
+
setMediaPickerAutoOpenRequest({
|
|
159419
|
+
kind: "open-thumbnail-media-picker",
|
|
159420
|
+
targetIndex: nextIndex,
|
|
159421
|
+
requestId: mediaPickerAutoOpenRequestIdRef.current
|
|
159422
|
+
});
|
|
159423
|
+
}
|
|
159424
|
+
return { kind: "added", index: nextIndex };
|
|
158927
159425
|
};
|
|
158928
159426
|
const handleMove = (from2, to) => {
|
|
158929
159427
|
if (to < 0 || to >= repeaterOps.items.length) return;
|
|
@@ -158959,6 +159457,13 @@ function RepeaterField({ path, backend, config, renderChild }) {
|
|
|
158959
159457
|
basePath: path,
|
|
158960
159458
|
items: repeaterOps.items,
|
|
158961
159459
|
minItems,
|
|
159460
|
+
onAdd: () => handleAdd(void 0, { kind: "open-thumbnail-media-picker" }),
|
|
159461
|
+
mediaPickerAutoOpenRequest,
|
|
159462
|
+
onMediaPickerAutoOpenHandled: (requestId) => {
|
|
159463
|
+
setMediaPickerAutoOpenRequest(
|
|
159464
|
+
(current) => current?.requestId === requestId ? null : current
|
|
159465
|
+
);
|
|
159466
|
+
},
|
|
158962
159467
|
onMove: handleMove,
|
|
158963
159468
|
onRemove: handleRemove,
|
|
158964
159469
|
renderChild,
|
|
@@ -158978,7 +159483,7 @@ function RepeaterField({ path, backend, config, renderChild }) {
|
|
|
158978
159483
|
focusFallbackRef: addButtonRef
|
|
158979
159484
|
}
|
|
158980
159485
|
),
|
|
158981
|
-
/* @__PURE__ */ jsx("div", { className: "mt-3", children: isPolymorphic ? /* @__PURE__ */ jsxs(DropdownMenu2, { children: [
|
|
159486
|
+
useThumbnailGrid && repeaterOps.items.length === 0 ? null : /* @__PURE__ */ jsx("div", { className: "mt-3", children: isPolymorphic ? /* @__PURE__ */ jsxs(DropdownMenu2, { children: [
|
|
158982
159487
|
/* @__PURE__ */ jsx(DropdownMenuTrigger2, { asChild: true, children: /* @__PURE__ */ jsxs(Button, { ref: addButtonRef, type: "button", variant: "secondary", disabled: addDisabled, children: [
|
|
158983
159488
|
/* @__PURE__ */ jsx(Plus, { className: "mr-2 h-4 w-4" }),
|
|
158984
159489
|
"Add ",
|
|
@@ -159744,7 +160249,8 @@ function evaluateVisibility(field, backend, path) {
|
|
|
159744
160249
|
if (conditions.length === 0) {
|
|
159745
160250
|
return true;
|
|
159746
160251
|
}
|
|
159747
|
-
return
|
|
160252
|
+
return evaluateVisibleWhen(
|
|
160253
|
+
visibleWhen,
|
|
159748
160254
|
(condition) => evaluateVisibilityCondition(condition, backend, path)
|
|
159749
160255
|
);
|
|
159750
160256
|
}
|
|
@@ -181606,7 +182112,7 @@ function requireUseSyncExternalStoreShim_development() {
|
|
|
181606
182112
|
return x === y2 && (x !== 0 || 1 / x === 1 / y2) || x !== x && y2 !== y2;
|
|
181607
182113
|
}
|
|
181608
182114
|
var objectIs = typeof Object.is === "function" ? Object.is : is;
|
|
181609
|
-
var useState95 = React$1.useState,
|
|
182115
|
+
var useState95 = React$1.useState, useEffect101 = React$1.useEffect, useLayoutEffect11 = React$1.useLayoutEffect, useDebugValue2 = React$1.useDebugValue;
|
|
181610
182116
|
var didWarnOld18Alpha = false;
|
|
181611
182117
|
var didWarnUncachedGetSnapshot = false;
|
|
181612
182118
|
function useSyncExternalStore7(subscribe, getSnapshot, getServerSnapshot) {
|
|
@@ -181643,7 +182149,7 @@ function requireUseSyncExternalStoreShim_development() {
|
|
|
181643
182149
|
});
|
|
181644
182150
|
}
|
|
181645
182151
|
}, [subscribe, value, getSnapshot]);
|
|
181646
|
-
|
|
182152
|
+
useEffect101(function() {
|
|
181647
182153
|
if (checkIfSnapshotChanged(inst)) {
|
|
181648
182154
|
forceUpdate({
|
|
181649
182155
|
inst
|
|
@@ -181908,9 +182414,9 @@ function requireWithSelector_development() {
|
|
|
181908
182414
|
}
|
|
181909
182415
|
var objectIs = typeof Object.is === "function" ? Object.is : is;
|
|
181910
182416
|
var useSyncExternalStore7 = shim2.useSyncExternalStore;
|
|
181911
|
-
var
|
|
182417
|
+
var useRef83 = React$1.useRef, useEffect101 = React$1.useEffect, useMemo92 = React$1.useMemo, useDebugValue2 = React$1.useDebugValue;
|
|
181912
182418
|
function useSyncExternalStoreWithSelector(subscribe, getSnapshot, getServerSnapshot, selector, isEqual) {
|
|
181913
|
-
var instRef =
|
|
182419
|
+
var instRef = useRef83(null);
|
|
181914
182420
|
var inst;
|
|
181915
182421
|
if (instRef.current === null) {
|
|
181916
182422
|
inst = {
|
|
@@ -181965,7 +182471,7 @@ function requireWithSelector_development() {
|
|
|
181965
182471
|
return [getSnapshotWithSelector, getServerSnapshotWithSelector];
|
|
181966
182472
|
}, [getSnapshot, getServerSnapshot, selector, isEqual]), getSelection2 = _useMemo[0], getServerSelection = _useMemo[1];
|
|
181967
182473
|
var value = useSyncExternalStore7(subscribe, getSelection2, getServerSelection);
|
|
181968
|
-
|
|
182474
|
+
useEffect101(function() {
|
|
181969
182475
|
inst.hasValue = true;
|
|
181970
182476
|
inst.value = value;
|
|
181971
182477
|
}, [value]);
|
|
@@ -183110,7 +183616,7 @@ function recordPreviewDesignHistoryDomain(state, domainId) {
|
|
|
183110
183616
|
};
|
|
183111
183617
|
}
|
|
183112
183618
|
function confirmPreviewDesignHistoryUndo(state, domainId) {
|
|
183113
|
-
if (state.past.
|
|
183619
|
+
if (state.past[state.past.length - 1] !== domainId) return state;
|
|
183114
183620
|
return {
|
|
183115
183621
|
past: state.past.slice(0, -1),
|
|
183116
183622
|
future: [domainId, ...state.future]
|
|
@@ -183124,7 +183630,7 @@ function confirmPreviewDesignHistoryRedo(state, domainId) {
|
|
|
183124
183630
|
};
|
|
183125
183631
|
}
|
|
183126
183632
|
function selectPreviewDesignHistoryDomain(state, command2, capabilities) {
|
|
183127
|
-
const domainId = command2 === "undo" ? state.past.
|
|
183633
|
+
const domainId = command2 === "undo" ? state.past[state.past.length - 1] : state.future[0];
|
|
183128
183634
|
if (!domainId) return null;
|
|
183129
183635
|
const domain2 = capabilities[domainId];
|
|
183130
183636
|
if (domain2.isPending || domain2.isStale) return null;
|
|
@@ -183140,7 +183646,7 @@ function selectPreviewDesignHistoryDomain(state, command2, capabilities) {
|
|
|
183140
183646
|
function previewDesignHistoryDomainForCommand(state, command2) {
|
|
183141
183647
|
switch (command2) {
|
|
183142
183648
|
case "undo":
|
|
183143
|
-
return state.past.
|
|
183649
|
+
return state.past[state.past.length - 1] ?? null;
|
|
183144
183650
|
case "redo":
|
|
183145
183651
|
return state.future[0] ?? null;
|
|
183146
183652
|
default:
|
|
@@ -183261,7 +183767,7 @@ function deriveStagedSessionCapabilities(state) {
|
|
|
183261
183767
|
requiresReload: true
|
|
183262
183768
|
};
|
|
183263
183769
|
default:
|
|
183264
|
-
return
|
|
183770
|
+
return assertNever11(state, "Unhandled editor staged session state");
|
|
183265
183771
|
}
|
|
183266
183772
|
}
|
|
183267
183773
|
function beginStagedSession(state, transaction) {
|
|
@@ -183274,7 +183780,7 @@ function beginStagedSession(state, transaction) {
|
|
|
183274
183780
|
case "stale":
|
|
183275
183781
|
return state;
|
|
183276
183782
|
default:
|
|
183277
|
-
return
|
|
183783
|
+
return assertNever11(state, "Unhandled editor staged session state");
|
|
183278
183784
|
}
|
|
183279
183785
|
}
|
|
183280
183786
|
function applyStagedSession(state) {
|
|
@@ -183287,7 +183793,7 @@ function applyStagedSession(state) {
|
|
|
183287
183793
|
case "stale":
|
|
183288
183794
|
return state;
|
|
183289
183795
|
default:
|
|
183290
|
-
return
|
|
183796
|
+
return assertNever11(state, "Unhandled editor staged session state");
|
|
183291
183797
|
}
|
|
183292
183798
|
}
|
|
183293
183799
|
function confirmStagedSession(state) {
|
|
@@ -183315,7 +183821,7 @@ function cancelStagedSession(state) {
|
|
|
183315
183821
|
case "applying":
|
|
183316
183822
|
return state;
|
|
183317
183823
|
default:
|
|
183318
|
-
return
|
|
183824
|
+
return assertNever11(state, "Unhandled editor staged session state");
|
|
183319
183825
|
}
|
|
183320
183826
|
}
|
|
183321
183827
|
function enqueueTransaction(state, transaction) {
|
|
@@ -183349,7 +183855,7 @@ function enqueueTransaction(state, transaction) {
|
|
|
183349
183855
|
case "stale":
|
|
183350
183856
|
return state;
|
|
183351
183857
|
default:
|
|
183352
|
-
return
|
|
183858
|
+
return assertNever11(state, "Unhandled editor transaction queue state");
|
|
183353
183859
|
}
|
|
183354
183860
|
}
|
|
183355
183861
|
function beginAutosaveBatch(state) {
|
|
@@ -183366,7 +183872,7 @@ function beginAutosaveBatch(state) {
|
|
|
183366
183872
|
case "stale":
|
|
183367
183873
|
return state;
|
|
183368
183874
|
default:
|
|
183369
|
-
return
|
|
183875
|
+
return assertNever11(state, "Unhandled editor transaction queue state");
|
|
183370
183876
|
}
|
|
183371
183877
|
}
|
|
183372
183878
|
function confirmAutosaveBatch(state) {
|
|
@@ -183401,7 +183907,7 @@ function mergeBatchAndFollowUpTransactions(batch, followUp) {
|
|
|
183401
183907
|
batch
|
|
183402
183908
|
);
|
|
183403
183909
|
}
|
|
183404
|
-
function
|
|
183910
|
+
function assertNever11(value, message2) {
|
|
183405
183911
|
throw new Error(`${message2}: ${JSON.stringify(value)}`);
|
|
183406
183912
|
}
|
|
183407
183913
|
|
|
@@ -187835,4 +188341,4 @@ lucide-react/dist/esm/lucide-react.mjs:
|
|
|
187835
188341
|
*)
|
|
187836
188342
|
*/
|
|
187837
188343
|
|
|
187838
|
-
export { AMBIENT_BACKGROUND_ROLES2 as AMBIENT_BACKGROUND_ROLES, ArrowDown, ArrowUp, BackgroundColorField, BackgroundGradientField, Badge2 as Badge, BlockApiProvider, Box, Button, CSS2 as CSS, Callout, CalloutDescription, CalloutTitle, Card, CardContent, CardHeader, CardTitle, Check, ChevronDown, ChevronLeft, ChevronRight, Collapsible2 as Collapsible, CollapsibleContent2 as CollapsibleContent, CollapsibleTrigger2 as CollapsibleTrigger, ColorPicker, Combobox, CommandMultiSelect, Content, ContentFieldsForm, ContentSpinner, Copy, DEFAULT_LAUNCH_READINESS_INPUT, Dialog2 as Dialog, DialogClose2 as DialogClose, DialogContent2 as DialogContent, DialogDescription2 as DialogDescription, DialogFooter, DialogHeader, DialogTitle2 as DialogTitle, DndContext, DropdownMenu2 as DropdownMenu, DropdownMenuContent2 as DropdownMenuContent, DropdownMenuItem2 as DropdownMenuItem, DropdownMenuLabel2 as DropdownMenuLabel, DropdownMenuSeparator2 as DropdownMenuSeparator, DropdownMenuTrigger2 as DropdownMenuTrigger, EDITABLE_SURFACE_FORWARDING_PROP, EMPTY_DOC, EditableBlockProvider, EditorChrome, EditorProvider, EllipsisVertical, EmptyState2 as EmptyState, EntryControllerProvider, EyeOff, FieldFrame, FixedBottomSurface, FormRenderer, GRADIENT_PRESETS, GripVertical, Image, ImagePlus, Input, KeyboardCode, LINKED_CONTENT_ENTRY_META_KEY, Label4 as Label, List2 as List, LoaderCircle, ManifestForm, Maximize2, MediaEditor, MediaEditorProvider, MediaPickerDialog, MediaPickerMini, Monitor, PAGE_DESIGN_EDITOR_STATE_FETCH_ERROR_MESSAGE, PUBLIC_FILE_FIELD_KINDS, PageRenderer, Palette, PaletteProvider, Pencil, Plus, PointerSensor, PreviewDesignCoordinatorProvider, PreviewDesignHistoryOrderProvider, PreviewRichTextEditor, PreviewTextEditor, PreviewThemeOverlayProvider, ResizableSplitPane, RichText2 as RichText, RichTextEditorSurface, Root2, RotateCcw, SECTION_BACKGROUND_MIN_SOURCE_HEIGHT, SECTION_BACKGROUND_MIN_SOURCE_WIDTH, SITE_CHROME_CLASS_NAMES, SITE_CHROME_VISIBLE_HEADER_SELECTOR, SUBROUTE_KINDS, ScrollableDialogContent, SdkConfigProvider, Search, Select2 as Select, SelectContent2 as SelectContent, SelectItem2 as SelectItem, SelectTrigger2 as SelectTrigger, SelectValue2 as SelectValue, Separator2 as Separator, Settings, SiteChromeCustomizeProvider, SiteDocumentLayout, Smartphone, Sparkles, Surface, Tablet, Tabs2 as Tabs, TabsContent2 as TabsContent, TabsList2 as TabsList, TabsTrigger2 as TabsTrigger, Text2 as Text, Textarea, ThemeScope, Trash2, TriangleAlert, Trigger, Upload, X, applyBackgroundOverrideContentPatch, applyCompiledRuntimeFieldsToContent, applyFeatureCardIconSuggestions, applyPageDesignEditorAction, applyResolvedSelections, asDesignBlockId, asRecord, assertNever, assertNever5 as assertNever2, attachRenderableMediaAssetFields, augmentManifestWithStyleGroups, backgroundColorTokens, backgroundOverrideEquals, beginAutosaveBatch, buildApplySiteStyleSelectionBody, buildEditorModelRuntimeFieldsByBlockId, buildSiteChromeLookModels, buildThemeRuntime, buttonPersonalities, canCycleBackgroundOverrideValue, canRedoHistory, canUndoHistory, cancelPreview, classifyHistoryShortcut, classifyKnownMimeType, clearTypographyFontOverrides, clientComponentRegistry, closestCenter, cn, confirmAutosaveBatch, createBlock, createCustomBlockRegistry, createEditorInsertBlockCommand, createEditorRemoveBlockCommand, createEditorReorderBlocksCommand, createEntrySlotBlock, createFeatureCardIconKey, createHistoryState, createManifestFormAdapter, createManifestValidation, createMicrobatcher, createOptimisticActionRunner, createRoutingHelpers, createSnapshotFromPageRecord, createStoreBackend, createStyleConfiguratorState, curatedSiteStyles, cycleSiteChromeLookId, cycleableSiteChromeOptions, decodePublicProductCategorySelectorQuery, defaultBackgroundOverrideForMode, defaultSectionTransitionVariantForFamily, deleteBlock, deleteEntrySlotBlock, deriveLaunchReadiness, deriveRouteMetadataPresentation, deriveStyleConfiguratorCapabilities, deriveTransactionCapabilities, designRuntimeRulesForTheme, dismissNotices, dismissWarnings, emitMediaCropDebug, enabledBackgroundModes, enqueueTransaction, evaluateTypographyFontSlot, evaluateVisibility, expectParsedBrandedId, findButtonPersonality, findFooterLook, findPaletteVariant, findTypographyPreset, foldSubroute, formatSiteChromeBackgroundTokenLabel, getBlockDefinition, getBlockIconSemanticFallbackId, getClientRect, getCuratedSiteStyle, getDirectImageUrlForMediaAsset, getFeatureCardIconCompletion, getFieldIntent, getFooterLayout, getGeneratedBlockIconStyleState, getHeaderLayout, getHeaderStyle, getIconComponent, getIconPickerOptionsForPreset, getLinkedContentEntryMeta, getModalConfig, getPageDesignEditorState, getRichTextImagePositionFromTarget, gradientToCss, idleEditorTransactionQueueState, imagePoolForOverride, inferLegacyOfferingsPreviewGroupOrder, insertOrReplaceRichTextImage, isHeaderField, isIconPickerPreset, isInternalResolvedLinkValue, isKeyboardEvent, isKnownIconName, isNonEmptyValue, isObjectRecord2 as isObjectRecord, isOfferingsPreviewSourceKey, isPreviewingChange, isSupportedLoaderEndpoint, isSvgMimeType, isThemeV2NormalEditorRawStyleFieldName, isThemeV2NormalEditorRawStylePath, listBlockDescriptors, listContentTypes, listEntryPageContentSlots, lucide_react_exports, markApplyFailed, markApplySaved, markApplySaving, mergeBlockDescriptorsWithRegistry, mergeManifestWithSdkOptions, mutateBlockContent, normalEditorCuratedPromotedFieldPaths, normalizeOfferingsPreviewGroupOrder, normalizePickerSearchThreshold, normalizePublicApiLoaderParams, openRow, paletteOverridesSchema, paletteVariants, parseAspectRatioValue, parseBackgroundOverrideFromContent, parseBlockIconValue, parseMediaAssetId, parseSiteIconStyleGuideVersionId, parseSiteId, planBackgroundOverride, planBackgroundTransition, planPageDesignLayoutLookCompatibility, planSiteChromeFooterLayoutSelection, planSiteChromeLookSelection, planSiteDocument, planSiteStylePreviewChange, prefetchBlockData, previewAssistantEnabled, previewButtonPersonality, previewDesignHistoryDomainForCommand, previewFooterLook, previewHeaderLayout, previewHeaderStyle, previewPaletteVariant, previewSiteStyle, previewTypographyPreset, pushHistoryEntry, rankBackgroundImagePoolItems, recoveryConflictCopy, redoHistory, rejectAutosaveBatch, renderBlock, reorderBlocks, reorderEntrySlotBlocks, requireEntriesForCuratedChoices, resolveBackgroundCapability, resolveBlockTitle, resolveContentTitle, resolveIconPickerPreset, resolveImageUrlWithContext, resolveMediaSlotContract, resolveOfferingsPreviewGroupOrderEntries, resolvePageRouteSlug, resolvePickerSelectionLabel, resolvePreviewSidebarTab, resolveStyleConfiguratorInitialSnapshot, resolveVideoSelectionIntentForMediaField, resolveVisiblePromotedFieldPathsForEditorBlock, sectionTransitionFamilies, sectionTransitionFamilyForBoundaryOptionId, sectionTransitionVariantForBoundaryOptionId, selectPreviewDesignHistoryDomain, selectionSnapshotFromApplySiteStyleSelectionResponse, setPaletteOverrides, setTypographyBodyFontOverride, setTypographyHeadingFontOverride, shouldShowPickerSearch, siteFooterManifest, siteHeaderManifest, siteOptionSources, stableSerialize, styleConfiguratorHistoryEntryForPersistedSelection, suggestFeatureCardSemanticIcons, suggestSemanticIconForFeatureCard, surfaceResolutionContextFromTheme, syncStyleConfiguratorState, systemCustomizeFacetAppliesToLayoutVariant, systemCustomizeFacetApplyContentPatch, systemCustomizeFacetCurrentValue, systemCustomizeFacetDefinitionForBlock, systemCustomizeFacetDefinitionsForBlock, systemCustomizeFacetLabelForValue, systemCustomizeFacetNextValue, systemCustomizeFacetRollbackContentPatch, toFeatureCardIconSuggestionInputs, toRoutableLinkPayload, toggleRow, typographyPresets, undoHistory, unfinishedBlockCopy, unsafeAsEditorBlockId, unsafeAsEditorBlockValues, unsafeAsLinkedContentEntryId, unwrapResponse, useAsyncPickerOptions, useBackendWatch, useBlockContext, useCombinedRefs, useDebouncedLatestSave, useDndContext, useDraggable, useDroppable, useEditor, useEditorUiStore, useEditorUiStoreInstance, useEntryController, useEntryEditorController, useField, useIsomorphicLayoutEffect3 as useIsomorphicLayoutEffect, useMediaEditor, useMediaEditorOptional, useMultiAutosave, useOptionalEditorUiStoreInstance, usePreviewDesignCoordinator, usePreviewDesignHistoryOrder, usePreviewThemeOverlay, useRichTextEditor, useSdkConfig, useSensor, useSensors, useSiteChromeCustomizeOptional, useUISelector, useUniqueId, validateBlockManifestIssues, visibleHeaderClearancePx };
|
|
188344
|
+
export { AMBIENT_BACKGROUND_ROLES2 as AMBIENT_BACKGROUND_ROLES, ArrowDown, ArrowUp, BackgroundColorField, BackgroundGradientField, Badge2 as Badge, BlockApiProvider, Box, Button, CSS2 as CSS, Callout, CalloutDescription, CalloutTitle, Card, CardContent, CardHeader, CardTitle, Check, ChevronDown, ChevronLeft, ChevronRight, Collapsible2 as Collapsible, CollapsibleContent2 as CollapsibleContent, CollapsibleTrigger2 as CollapsibleTrigger, ColorPicker, Combobox, CommandMultiSelect, Content, ContentFieldsForm, ContentSpinner, Copy, DEFAULT_LAUNCH_READINESS_INPUT, Dialog2 as Dialog, DialogClose2 as DialogClose, DialogContent2 as DialogContent, DialogDescription2 as DialogDescription, DialogFooter, DialogHeader, DialogTitle2 as DialogTitle, DndContext, DropdownMenu2 as DropdownMenu, DropdownMenuContent2 as DropdownMenuContent, DropdownMenuItem2 as DropdownMenuItem, DropdownMenuLabel2 as DropdownMenuLabel, DropdownMenuSeparator2 as DropdownMenuSeparator, DropdownMenuTrigger2 as DropdownMenuTrigger, EDITABLE_SURFACE_FORWARDING_PROP, EMPTY_DOC, EditableBlockProvider, EditorChrome, EditorProvider, EllipsisVertical, EmptyState2 as EmptyState, EntryControllerProvider, EyeOff, FieldFrame, FixedBottomSurface, FormRenderer, GRADIENT_PRESETS, GripVertical, Image, ImagePlus, Input, KeyboardCode, LINKED_CONTENT_ENTRY_META_KEY, Label4 as Label, List2 as List, LoaderCircle, ManifestForm, Maximize2, MediaEditor, MediaEditorProvider, MediaPickerDialog, MediaPickerMini, Monitor, PAGE_DESIGN_EDITOR_STATE_FETCH_ERROR_MESSAGE, PUBLIC_FILE_FIELD_KINDS, PageRenderer, Palette, PaletteProvider, Pencil, Plus, PointerSensor, PreviewDesignCoordinatorProvider, PreviewDesignHistoryOrderProvider, PreviewRichTextEditor, PreviewTextEditor, PreviewThemeOverlayProvider, ResizableSplitPane, ResponsiveScope, RichText2 as RichText, RichTextEditorSurface, Root2, RotateCcw, SECTION_BACKGROUND_MIN_SOURCE_HEIGHT, SECTION_BACKGROUND_MIN_SOURCE_WIDTH, SITE_CHROME_CLASS_NAMES, SITE_CHROME_VISIBLE_HEADER_SELECTOR, SUBROUTE_KINDS, ScrollableDialogContent, SdkConfigProvider, Search, Select2 as Select, SelectContent2 as SelectContent, SelectItem2 as SelectItem, SelectTrigger2 as SelectTrigger, SelectValue2 as SelectValue, Separator2 as Separator, Settings, SiteChromeCustomizeProvider, SiteDocumentLayout, Smartphone, Sparkles, Surface, Tablet, Tabs2 as Tabs, TabsContent2 as TabsContent, TabsList2 as TabsList, TabsTrigger2 as TabsTrigger, Text2 as Text, Textarea, ThemeScope, Trash2, TriangleAlert, Trigger, Upload, X, applyBackgroundOverrideContentPatch, applyCompiledRuntimeFieldsToContent, applyFeatureCardIconSuggestions, applyPageDesignEditorAction, applyResolvedSelections, asDesignBlockId, asRecord, assertNever, assertNever5 as assertNever2, attachRenderableMediaAssetFields, augmentManifestWithStyleGroups, backgroundColorTokens, backgroundOverrideEquals, beginAutosaveBatch, buildApplySiteStyleSelectionBody, buildEditorModelRuntimeFieldsByBlockId, buildSiteChromeLookModels, buildThemeRuntime, buttonPersonalities, canCycleBackgroundOverrideValue, canRedoHistory, canUndoHistory, cancelPreview, classifyHistoryShortcut, classifyKnownMimeType, clearTypographyFontOverrides, clientComponentRegistry, closestCenter, cn, confirmAutosaveBatch, createBlock, createCustomBlockRegistry, createEditorInsertBlockCommand, createEditorRemoveBlockCommand, createEditorReorderBlocksCommand, createEntrySlotBlock, createFeatureCardIconKey, createHistoryState, createManifestFormAdapter, createManifestValidation, createMicrobatcher, createOptimisticActionRunner, createRoutingHelpers, createSnapshotFromPageRecord, createStoreBackend, createStyleConfiguratorState, curatedSiteStyles, cycleSiteChromeLookId, cycleableSiteChromeOptions, decodePublicProductCategorySelectorQuery, defaultBackgroundOverrideForMode, defaultSectionTransitionVariantForFamily, deleteBlock, deleteEntrySlotBlock, deriveLaunchReadiness, deriveRouteMetadataPresentation, deriveStyleConfiguratorCapabilities, deriveTransactionCapabilities, designRuntimeRulesForTheme, dismissNotices, dismissWarnings, emitMediaCropDebug, enabledBackgroundModes, enqueueTransaction, evaluateTypographyFontSlot, evaluateVisibility, expectParsedBrandedId, findButtonPersonality, findFooterLook, findPaletteVariant, findTypographyPreset, foldSubroute, formatSiteChromeBackgroundTokenLabel, getBlockDefinition, getBlockIconSemanticFallbackId, getClientRect, getCuratedSiteStyle, getDirectImageUrlForMediaAsset, getFeatureCardIconCompletion, getFieldIntent, getFooterLayout, getGeneratedBlockIconStyleState, getHeaderLayout, getHeaderStyle, getIconComponent, getIconPickerOptionsForPreset, getLinkedContentEntryMeta, getModalConfig, getPageDesignEditorState, getRichTextImagePositionFromTarget, gradientToCss, idleEditorTransactionQueueState, imagePoolForOverride, inferLegacyOfferingsPreviewGroupOrder, insertOrReplaceRichTextImage, isHeaderField, isIconPickerPreset, isInternalResolvedLinkValue, isKeyboardEvent, isKnownIconName, isNonEmptyValue, isObjectRecord2 as isObjectRecord, isOfferingsPreviewSourceKey, isPreviewingChange, isSupportedLoaderEndpoint, isSvgMimeType, isThemeV2NormalEditorRawStyleFieldName, isThemeV2NormalEditorRawStylePath, listBlockDescriptors, listContentTypes, listEntryPageContentSlots, lucide_react_exports, markApplyFailed, markApplySaved, markApplySaving, mergeBlockDescriptorsWithRegistry, mergeManifestWithSdkOptions, mutateBlockContent, normalEditorCuratedPromotedFieldPaths, normalizeOfferingsPreviewGroupOrder, normalizePickerSearchThreshold, normalizePublicApiLoaderParams, openRow, paletteOverridesSchema, paletteVariants, parseAspectRatioValue, parseBackgroundOverrideFromContent, parseBlockIconValue, parseMediaAssetId, parseSiteIconStyleGuideVersionId, parseSiteId, planBackgroundOverride, planBackgroundTransition, planPageDesignLayoutLookCompatibility, planSiteChromeFooterLayoutSelection, planSiteChromeLookSelection, planSiteDocument, planSiteStylePreviewChange, prefetchBlockData, previewAssistantEnabled, previewButtonPersonality, previewDesignHistoryDomainForCommand, previewFooterLook, previewHeaderLayout, previewHeaderStyle, previewPaletteVariant, previewSiteStyle, previewTypographyPreset, pushHistoryEntry, rankBackgroundImagePoolItems, recoveryConflictCopy, redoHistory, rejectAutosaveBatch, renderBlock, reorderBlocks, reorderEntrySlotBlocks, requireEntriesForCuratedChoices, resolveBackgroundCapability, resolveBlockTitle, resolveContentTitle, resolveIconPickerPreset, resolveImageUrlWithContext, resolveMediaSlotContract, resolveOfferingsPreviewGroupOrderEntries, resolvePageRouteSlug, resolvePickerSelectionLabel, resolvePreviewSidebarTab, resolveStyleConfiguratorInitialSnapshot, resolveVideoSelectionIntentForMediaField, resolveVisiblePromotedFieldPathsForEditorBlock, sectionTransitionFamilies, sectionTransitionFamilyForBoundaryOptionId, sectionTransitionVariantForBoundaryOptionId, selectPreviewDesignHistoryDomain, selectionSnapshotFromApplySiteStyleSelectionResponse, setPaletteOverrides, setTypographyBodyFontOverride, setTypographyHeadingFontOverride, shouldShowPickerSearch, siteFooterManifest, siteHeaderManifest, siteOptionSources, stableSerialize, styleConfiguratorHistoryEntryForPersistedSelection, suggestFeatureCardSemanticIcons, suggestSemanticIconForFeatureCard, surfaceResolutionContextFromTheme, syncStyleConfiguratorState, systemCustomizeFacetAppliesToLayoutVariant, systemCustomizeFacetApplyContentPatch, systemCustomizeFacetCurrentValue, systemCustomizeFacetDefinitionForBlock, systemCustomizeFacetDefinitionsForBlock, systemCustomizeFacetLabelForValue, systemCustomizeFacetNextValue, systemCustomizeFacetRollbackContentPatch, toFeatureCardIconSuggestionInputs, toRoutableLinkPayload, toggleRow, typographyPresets, undoHistory, unfinishedBlockCopy, unsafeAsEditorBlockId, unsafeAsEditorBlockValues, unsafeAsLinkedContentEntryId, unwrapResponse, useAsyncPickerOptions, useBackendWatch, useBlockContext, useCombinedRefs, useDebouncedLatestSave, useDndContext, useDraggable, useDroppable, useEditor, useEditorUiStore, useEditorUiStoreInstance, useEntryController, useEntryEditorController, useField, useIsomorphicLayoutEffect3 as useIsomorphicLayoutEffect, useMediaEditor, useMediaEditorOptional, useMultiAutosave, useOptionalEditorUiStoreInstance, usePreviewDesignCoordinator, usePreviewDesignHistoryOrder, usePreviewThemeOverlay, useRichTextEditor, useSdkConfig, useSensor, useSensors, useSiteChromeCustomizeOptional, useUISelector, useUniqueId, validateBlockManifestIssues, visibleHeaderClearancePx };
|