@riverbankcms/sdk 0.143.0 → 0.144.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{PreviewEditorSidebar-DROGfMKi.mjs → PreviewEditorSidebar-CQZNnFiM.mjs} +19 -25
- package/dist/{PreviewEditorUI-BaRjhFu-.mjs → PreviewEditorUI-DCNxnmI0.mjs} +2 -2
- package/dist/{SdkPreviewModeRuntime-OIABYLES.mjs → SdkPreviewModeRuntime-BJolUbr1.mjs} +15 -6
- package/dist/{SiteChromeCustomizeContext-ohjTvZbc.mjs → SiteChromeCustomizeContext-CKgEpoxi.mjs} +1915 -1463
- package/dist/_dts/api/src/billing.d.ts +1 -1
- package/dist/_dts/api/src/billingEndpointTypes.d.ts +8 -2
- package/dist/_dts/api/src/bookingConfig.d.ts +3 -1
- package/dist/_dts/api/src/index.d.ts +1 -1
- package/dist/_dts/api/src/navigation/dashboardBookingsNav.d.ts +4 -4
- package/dist/_dts/api/src/publicExperience/eventEndpoints.d.ts +1 -0
- package/dist/_dts/api/src/sdkContracts.d.ts +1 -1
- package/dist/_dts/api/src/sdkSettingsContracts.d.ts +8 -0
- package/dist/_dts/api/src/sitePlatformEndpoints.d.ts +2 -8
- package/dist/_dts/api/src/siteSettings.d.ts +17 -7
- package/dist/_dts/billing/src/membership/index.d.ts +3 -0
- package/dist/_dts/block-form/src/backend/types.d.ts +14 -0
- package/dist/_dts/block-form/src/client/index.d.ts +1 -0
- package/dist/_dts/block-form/src/context/RepeaterHostActionsContext.d.ts +30 -0
- package/dist/_dts/block-form/src/context/index.d.ts +1 -0
- package/dist/_dts/block-form/src/index.d.ts +1 -0
- package/dist/_dts/block-form/src/widgets/RepeaterField/components/RepeaterList.d.ts +4 -1
- package/dist/_dts/block-form/src/widgets/RepeaterField/components/RepeaterRow.d.ts +5 -2
- package/dist/_dts/block-form/src/widgets/RepeaterField/components/RepeaterRowActions.d.ts +11 -1
- package/dist/_dts/block-form/src/widgets/RepeaterField/hooks/index.d.ts +1 -0
- package/dist/_dts/block-form/src/widgets/RepeaterField/hooks/useEmptyStateFocusAfterRemoval.d.ts +8 -0
- package/dist/_dts/block-form/src/widgets/RepeaterField/utils/buildSummary.d.ts +15 -1
- package/dist/_dts/block-form/src/widgets/RepeaterField/utils/repeaterRowActionsDomain.d.ts +5 -2
- package/dist/_dts/blocks/src/contracts/proof-block-islands.d.ts +34 -10
- package/dist/_dts/blocks/src/pageRendererContracts.d.ts +3 -0
- package/dist/_dts/blocks/src/system/constants/events.d.ts +10 -0
- package/dist/_dts/blocks/src/system/runtime/api/client.d.ts +5 -0
- package/dist/_dts/blocks/src/system/runtime/api/context.d.ts +3 -3
- package/dist/_dts/blocks/src/system/runtime/api/endpoints.d.ts +10 -0
- package/dist/_dts/blocks/src/system/runtime/api/index.d.ts +3 -2
- package/dist/_dts/blocks/src/system/runtime/api/readAuthority.d.ts +11 -0
- package/dist/_dts/blocks/src/system/runtime/api/types/core.d.ts +9 -0
- package/dist/_dts/blocks/src/system/runtime/components/registry.client.d.ts +7 -13
- package/dist/_dts/blocks/src/system/runtime/components/runtime-backed-blocks.d.ts +3 -6
- package/dist/_dts/blocks/src/system/runtime/hooks/useCalendarEvents.d.ts +9 -4
- package/dist/_dts/blocks/src/system/runtime/hooks/useCalendarEvents.state.d.ts +0 -1
- package/dist/_dts/blocks/src/system/runtime/hooks/useEventPagination.d.ts +1 -3
- package/dist/_dts/blocks/src/system/runtime/nodes/basic.d.ts +7 -24
- package/dist/_dts/blocks/src/system/runtime/nodes/cart.server.d.ts +1 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/checkout.server.d.ts +1 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/EventRegistrationBookingLayer.d.ts +2 -1
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/EventRegistrationSurface.d.ts +2 -1
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/EventRegistrationWizardActions.d.ts +2 -1
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/event-registration.headless.contract.d.ts +2 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/event-registration.headless.override.d.ts +2 -1
- 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 +8 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/events/EventCalendar.interactive.d.ts +4 -5
- package/dist/_dts/blocks/src/system/runtime/nodes/events/EventCombined.client.d.ts +7 -2
- package/dist/_dts/blocks/src/system/runtime/nodes/events/EventCombined.interactive.d.ts +7 -5
- package/dist/_dts/blocks/src/system/runtime/nodes/events/EventListing.interactive.d.ts +5 -6
- package/dist/_dts/blocks/src/system/runtime/nodes/events/shared/eventCollectionContract.d.ts +3 -1
- package/dist/_dts/blocks/src/system/runtime/nodes/header-control.d.ts +10 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/layout.d.ts +6 -21
- package/dist/_dts/blocks/src/system/runtime/nodes/product-detail.server.d.ts +1 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/product-list.server.d.ts +1 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/shop.interactive.d.ts +13 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/shop.server.d.ts +1 -0
- package/dist/_dts/blocks/src/system/runtime/shared/components/ThemedButton.d.ts +58 -0
- package/dist/_dts/blocks/src/system/runtime/shared/components/index.d.ts +2 -0
- package/dist/_dts/blocks/src/system/transforms/registry/chromeLogo.d.ts +23 -0
- package/dist/_dts/blocks/src/system/transforms/registry/index.d.ts +2 -1
- package/dist/_dts/blocks/src/system/transforms/registry/layout.d.ts +3 -1
- package/dist/_dts/blocks/src/system/transforms/typed.d.ts +4 -1
- package/dist/_dts/core/src/event-catalogue.d.ts +27 -0
- package/dist/_dts/core/src/event-preset-vocabulary.d.ts +7 -0
- package/dist/_dts/core/src/index.d.ts +2 -0
- package/dist/_dts/db/src/generated/supabase/database.types.d.ts +13 -0
- package/dist/_dts/db/src/schemas/forms.d.ts +286 -2
- package/dist/_dts/editor-blocks/src/block-editor/{BlockCardHeader.d.ts → BlockCardFrame.d.ts} +11 -3
- package/dist/_dts/logger/src/console.d.ts +3 -0
- package/dist/_dts/sdk/src/client/publicEventReadOperations.d.ts +1 -0
- package/dist/_dts/sdk/src/client/types.d.ts +3 -0
- package/dist/_dts/sdk/src/navigation/index.d.ts +27 -0
- package/dist/_dts/sdk/src/public-api/contracts.d.ts +15 -7
- package/dist/_dts/sdk/src/rendering/blocks-page-renderer.d.ts +1 -0
- package/dist/_dts/sdk/src/rendering/client.d.ts +1 -0
- package/dist/_dts/sdk/src/rendering/components/Block.shared.d.ts +1 -0
- package/dist/_dts/sdk/src/rendering/components/Layout.d.ts +7 -1
- package/dist/_dts/sdk/src/rendering/components/pageShared.d.ts +2 -0
- package/dist/_dts/sdk/src/rendering/islands/enhancers/routeIslandApiConfig.d.ts +3 -2
- package/dist/_dts/sdk/src/rendering/islands/enhancers/shopShared.d.ts +2 -0
- package/dist/_dts/sdk/src/rendering/overrides.d.ts +1 -0
- package/dist/_dts/sdk/src/version.d.ts +1 -1
- package/dist/_dts/theme-core/src/buttons/affordanceSuppression.d.ts +1 -1
- package/dist/_dts/theme-core/src/buttons/classNames.d.ts +3 -13
- package/dist/_dts/theme-core/src/customCss/index.d.ts +1 -1
- package/dist/_dts/theme-core/src/customCss/patch.d.ts +0 -5
- package/dist/_dts/theme-core/src/generated/containerResponsiveThemeCss.d.ts +1 -1
- package/dist/_dts/theme-core/src/surfaces/index.d.ts +1 -0
- package/dist/_dts/theme-core/src/surfaces/logoVariant.d.ts +26 -0
- package/dist/_dts/theme-core/src/utils/colorStyles.d.ts +10 -0
- package/dist/_dts/ui/src/editor-item-card.d.ts +116 -0
- package/dist/_dts/ui/src/index.d.ts +1 -0
- package/dist/client/{BookingConsentAgreement-BoCtvzzu.mjs → BookingConsentAgreement-DoAILrkN.mjs} +4 -55
- package/dist/client/{DiscountCodeDisclosure-B5S30nZk.mjs → DiscountCodeDisclosure-X528hUTf.mjs} +27 -17
- package/dist/client/{EventCombined.client-CeZ2-zSt.mjs → EventCombined.client-DSBVwq5m.mjs} +54 -46
- package/dist/client/{EventListing.client-DJN3j8B3.mjs → EventListing.client-DmFAX7Vb.mjs} +3 -4
- package/dist/client/{LeafletStaticMap-RjtGzDQT.mjs → LeafletStaticMap-BAqXdfhq.mjs} +1 -1
- package/dist/client/ThemedButton-BwNFVwi4.mjs +412 -0
- package/dist/client/{accordion-DOmnDoyg.mjs → accordion-DRhMdkbd.mjs} +1 -1
- package/dist/client/{bookingForm-C0vk7pgS.mjs → bookingForm-iJ_nCsNF.mjs} +26 -32
- package/dist/client/bookings.mjs +201 -118
- package/dist/client/{carousel-BZJ7pno3.mjs → carousel-D8zuffZr.mjs} +2 -2
- package/dist/client/{carousel.client-DQTjCVQT.mjs → carousel.client-jahpU9Vz.mjs} +1 -1
- package/dist/client/{cart-CaeVAHJl.mjs → cart-DeMGJViN.mjs} +3 -3
- package/dist/client/{checkout-7wmoNDtG.mjs → checkout-DXc06Km2.mjs} +3 -3
- package/dist/client/{checkoutUrls-FL6lRkrt.mjs → checkoutUrls-CW3-78uu.mjs} +1 -1
- package/dist/client/client.mjs +2271 -1983
- package/dist/client/{colorStyles-3013aRAY.mjs → colorStyles-CuJBiS-1.mjs} +16 -4
- package/dist/client/{context-BOimxE3U.mjs → context-CDLCfDep.mjs} +24 -8
- package/dist/client/{dates-BnzVksi4.mjs → dates-ClFx7Epy.mjs} +2 -2
- package/dist/client/{eventCalendar-l-fpaslC.mjs → eventCalendar-BaGpnOGN.mjs} +39 -50
- package/dist/client/{eventCombined-DGGvssK6.mjs → eventCombined-ywONOx2m.mjs} +5 -4
- package/dist/client/{eventDetails-DRiCm_hL.mjs → eventDetails-B2LlOTYY.mjs} +4 -4
- package/dist/client/{eventListing-dph8loYX.mjs → eventListing-CMgxWpqP.mjs} +5 -4
- package/dist/client/{eventRegistration-ClBohmbY.mjs → eventRegistration-BarLDNHR.mjs} +83 -68
- package/dist/client/{form-BLVVAnd3.mjs → form-BjqKaBJ7.mjs} +9 -10
- package/dist/client/{headerSection-DHy4C8Ix.mjs → headerSection-CP4XDwz1.mjs} +23 -30
- package/dist/client/hooks.mjs +257 -63
- package/dist/client/{locationMap-6HuS28ck.mjs → locationMap-C5gW-d-w.mjs} +9 -10
- package/dist/client/{media-DHpfFwd3.mjs → media-BtJ37tzS.mjs} +1 -1
- package/dist/client/{newsletterForm-xOdcOhZP.mjs → newsletterForm-afXlVSA0.mjs} +8 -9
- package/dist/client/{pricing-ChinRYFt.mjs → pricing-Bl1CAl28.mjs} +1 -1
- package/dist/client/{productDetail-0chA5gbK.mjs → productDetail-CvQ3jWQe.mjs} +3 -3
- package/dist/client/{productList-OoINA0h1.mjs → productList-U874PGO7.mjs} +3 -3
- package/dist/client/{propsDecoder-CIZ-hbIG.mjs → propsDecoder-DPXtCZWP.mjs} +87 -29
- package/dist/client/rendering/client.mjs +1891 -1740
- package/dist/client/rendering/islands.mjs +19 -19
- package/dist/client/rendering.mjs +2225 -1913
- package/dist/client/{routeIslandApiConfig-UNsfPcYq.mjs → routeIslandApiConfig-NGYiUWXu.mjs} +8 -1
- package/dist/client/{scrollToBlock-BPZl0gPZ.mjs → scrollToBlock-0-C3DVhK.mjs} +1 -1
- package/dist/client/{shop-CLJFqNIq.mjs → shop-BXjXhM9P.mjs} +45 -58
- package/dist/client/{shop-commerce-PpANg5wB.mjs → shop-commerce-BZ6UlWJ7.mjs} +42 -55
- package/dist/client/{shop-commerce-store-TA_Kz2ku.mjs → shop-commerce-store-DlSBXb3D.mjs} +1 -1
- package/dist/client/{shopShared-DzcFcA5g.mjs → shopShared-kkEOiLPA.mjs} +6 -5
- package/dist/client/{useEventFilters-CFU21QZo.mjs → useEventFilters-zvnnE1ro.mjs} +66 -355
- package/dist/preview-next/client/runtime.mjs +3 -3
- package/dist/preview-next/editor-chrome.css +8 -0
- package/dist/{sdk-runtime-CDKl0Fr7.mjs → sdk-runtime-DFJlQt3q.mjs} +1 -1
- package/dist/{separator-BTp96X32.mjs → separator-o8GHb1xh.mjs} +1 -1
- package/dist/server/components.mjs +828 -623
- package/dist/server/config-validation.mjs +257 -63
- package/dist/server/config.mjs +257 -63
- package/dist/server/data.mjs +257 -63
- package/dist/server/index.mjs +9 -5
- package/dist/server/navigation.mjs +28 -1
- package/dist/server/next.mjs +14129 -13947
- package/dist/server/page-converter.mjs +110 -59
- package/dist/server/prebuild.mjs +1 -1
- package/dist/server/rendering/server.mjs +832 -624
- package/dist/server/rendering.mjs +830 -624
- package/dist/server/routing.mjs +294 -69
- package/dist/server/server.mjs +266 -68
- package/dist/server/theme-bridge.mjs +40 -1
- package/dist/styles/index.css +6 -0
- package/package.json +1 -1
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Whether a surface reads as light or dark, judged from the text foreground
|
|
3
|
+
* that was resolved for it: light text means a dark surface. `unknown` covers
|
|
4
|
+
* every foreground we cannot honestly classify.
|
|
5
|
+
*/
|
|
6
|
+
export type SurfaceTone = 'light' | 'dark' | 'unknown';
|
|
7
|
+
/** Concrete hex behind a plain, opaque palette token, or null otherwise. */
|
|
8
|
+
export declare function opaquePaletteHexForToken(expandedPalette: Readonly<Record<string, string>>, token: string | null | undefined): string | null;
|
|
9
|
+
/**
|
|
10
|
+
* Tone of the surface a foreground token was resolved for.
|
|
11
|
+
*
|
|
12
|
+
* A token with opacity has no known underlay to composite against, and a raw
|
|
13
|
+
* or unrecognised token has no palette hex, so both are `unknown` rather than
|
|
14
|
+
* a guess.
|
|
15
|
+
*/
|
|
16
|
+
export declare function surfaceToneFromForegroundToken(expandedPalette: Readonly<Record<string, string>>, foregroundToken: string | null | undefined): SurfaceTone;
|
|
17
|
+
export type LogoVariants<TLogo> = Readonly<{
|
|
18
|
+
forLightBackgrounds: TLogo | null;
|
|
19
|
+
forDarkBackgrounds: TLogo | null;
|
|
20
|
+
}>;
|
|
21
|
+
/**
|
|
22
|
+
* The logo to draw on a surface of the given tone. A missing variant falls
|
|
23
|
+
* back to the other one, and an unknown tone uses the light-backgrounds logo,
|
|
24
|
+
* which is what every site rendered before variants existed.
|
|
25
|
+
*/
|
|
26
|
+
export declare function selectLogoVariant<TLogo>(tone: SurfaceTone, variants: LogoVariants<TLogo>): TLogo | null;
|
|
@@ -58,6 +58,16 @@ export declare function cssVarValue(token: ThemeColorToken): string;
|
|
|
58
58
|
* @returns CSSProperties with backgroundColor
|
|
59
59
|
*/
|
|
60
60
|
export declare function backgroundColorStyle(token: ThemeColorToken): CSSProperties;
|
|
61
|
+
/**
|
|
62
|
+
* Converts a text color token to a CSS color value that follows the enclosing
|
|
63
|
+
* surface. The semantic text tokens (`text`, `heading`, `mutedText`) resolve
|
|
64
|
+
* to the surface foreground variables, so text adapts when a section's
|
|
65
|
+
* background changes; any other token is a fixed theme color.
|
|
66
|
+
*
|
|
67
|
+
* @param token - Theme color token
|
|
68
|
+
* @returns CSS color value
|
|
69
|
+
*/
|
|
70
|
+
export declare function textColorValue(token: ThemeColorToken): string;
|
|
61
71
|
/**
|
|
62
72
|
* Creates a text color style object from a theme token.
|
|
63
73
|
*
|
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
/**
|
|
3
|
+
* The card an editor uses for one item in an ordered list: a block on a page,
|
|
4
|
+
* a field on a form, an item in a repeater.
|
|
5
|
+
*
|
|
6
|
+
* It owns presentation only: the surface, the header layout, the disclosure
|
|
7
|
+
* and its accessibility contract, and how actions are drawn. Which actions an
|
|
8
|
+
* item offers, when they are available, reordering, drag state and focus
|
|
9
|
+
* restoration all belong to the editor that renders it.
|
|
10
|
+
*/
|
|
11
|
+
export type EditorItemCardControl = Readonly<{
|
|
12
|
+
label: string;
|
|
13
|
+
disabled?: boolean;
|
|
14
|
+
onSelect: () => void;
|
|
15
|
+
ref?: React.Ref<HTMLButtonElement>;
|
|
16
|
+
}>;
|
|
17
|
+
export type EditorItemCardInlineAction = EditorItemCardControl & Readonly<{
|
|
18
|
+
key: string;
|
|
19
|
+
icon: React.ReactNode;
|
|
20
|
+
}>;
|
|
21
|
+
export type EditorItemCardMenuItem = Readonly<{
|
|
22
|
+
key: string;
|
|
23
|
+
label: string;
|
|
24
|
+
icon: React.ReactNode;
|
|
25
|
+
tone?: 'default' | 'destructive';
|
|
26
|
+
disabled?: boolean;
|
|
27
|
+
onSelect: () => void;
|
|
28
|
+
}>;
|
|
29
|
+
export type EditorItemCardMenuGroup = Readonly<{
|
|
30
|
+
key: string;
|
|
31
|
+
items: readonly EditorItemCardMenuItem[];
|
|
32
|
+
}>;
|
|
33
|
+
export type EditorItemCardMenu = Readonly<{
|
|
34
|
+
/** Accessible name for the trigger, e.g. "More actions for Hero". */
|
|
35
|
+
label: string;
|
|
36
|
+
disabled?: boolean;
|
|
37
|
+
ref?: React.Ref<HTMLButtonElement>;
|
|
38
|
+
groups: readonly EditorItemCardMenuGroup[];
|
|
39
|
+
}>;
|
|
40
|
+
export type EditorItemCardActionsProps = Readonly<{
|
|
41
|
+
move?: Readonly<{
|
|
42
|
+
earlier: EditorItemCardControl;
|
|
43
|
+
later: EditorItemCardControl;
|
|
44
|
+
}>;
|
|
45
|
+
/** Controls that render their own trigger, such as a settings dialog. */
|
|
46
|
+
slot?: React.ReactNode;
|
|
47
|
+
inline?: readonly EditorItemCardInlineAction[];
|
|
48
|
+
menu?: EditorItemCardMenu;
|
|
49
|
+
className?: string;
|
|
50
|
+
testId?: string;
|
|
51
|
+
}>;
|
|
52
|
+
/**
|
|
53
|
+
* `locked` renders no drag handle and no actions at all. There is deliberately
|
|
54
|
+
* no way to show them disabled: a control that never works reads as broken.
|
|
55
|
+
*/
|
|
56
|
+
export type EditorItemCardAffordances = Readonly<{
|
|
57
|
+
kind: 'full';
|
|
58
|
+
dragHandle?: React.ReactNode;
|
|
59
|
+
actions?: EditorItemCardActionsProps;
|
|
60
|
+
}> | Readonly<{
|
|
61
|
+
kind: 'locked';
|
|
62
|
+
}>;
|
|
63
|
+
export type EditorItemCardDisclosure = Readonly<{
|
|
64
|
+
kind: 'collapsible';
|
|
65
|
+
open: boolean;
|
|
66
|
+
onOpenChange: (open: boolean) => void;
|
|
67
|
+
/** Stable id for the content region; generated when omitted. */
|
|
68
|
+
contentId?: string;
|
|
69
|
+
}> | Readonly<{
|
|
70
|
+
kind: 'static';
|
|
71
|
+
}>;
|
|
72
|
+
export type EditorItemCardState = 'default' | 'error' | 'highlighted';
|
|
73
|
+
export type EditorItemCardProps = Omit<React.ComponentProps<'div'>, 'title' | 'children'> & Readonly<{
|
|
74
|
+
title: string;
|
|
75
|
+
subtitle?: React.ReactNode;
|
|
76
|
+
/** Status shown beside the title, e.g. a validation hint. */
|
|
77
|
+
titleAdornment?: React.ReactNode;
|
|
78
|
+
state?: EditorItemCardState;
|
|
79
|
+
disclosure: EditorItemCardDisclosure;
|
|
80
|
+
affordances: EditorItemCardAffordances;
|
|
81
|
+
/** When false the header's controls are inert, e.g. while handlers load. */
|
|
82
|
+
interactive?: boolean;
|
|
83
|
+
/** Prefix for the header's test ids. */
|
|
84
|
+
testIdPrefix?: string;
|
|
85
|
+
children?: React.ReactNode;
|
|
86
|
+
}>;
|
|
87
|
+
export declare function EditorItemCard({ title, subtitle, titleAdornment, state, disclosure: requestedDisclosure, affordances, interactive, testIdPrefix, children, className, ...rootProps }: EditorItemCardProps): React.ReactElement;
|
|
88
|
+
/**
|
|
89
|
+
* The action row, usable on its own by item presentations that aren't a
|
|
90
|
+
* header card (for example a thumbnail tile).
|
|
91
|
+
*/
|
|
92
|
+
export declare function EditorItemCardActions({ move, slot, inline, menu, className, testId, }: EditorItemCardActionsProps): React.ReactElement;
|
|
93
|
+
export type EditorItemCardDragHandleProps = React.ButtonHTMLAttributes<HTMLButtonElement> & {
|
|
94
|
+
/**
|
|
95
|
+
* Keeps the handle's space so titles stay aligned down a list, but makes it
|
|
96
|
+
* invisible and inert — e.g. while the item is expanded.
|
|
97
|
+
*/
|
|
98
|
+
concealed?: boolean;
|
|
99
|
+
};
|
|
100
|
+
export declare const EditorItemCardDragHandle: React.ForwardRefExoticComponent<React.ButtonHTMLAttributes<HTMLButtonElement> & {
|
|
101
|
+
/**
|
|
102
|
+
* Keeps the handle's space so titles stay aligned down a list, but makes it
|
|
103
|
+
* invisible and inert — e.g. while the item is expanded.
|
|
104
|
+
*/
|
|
105
|
+
concealed?: boolean;
|
|
106
|
+
} & React.RefAttributes<HTMLButtonElement>>;
|
|
107
|
+
export type EditorItemInsertDividerProps = Readonly<{
|
|
108
|
+
/** Visible action text, e.g. "Insert block" or "Insert field". */
|
|
109
|
+
label: string;
|
|
110
|
+
onSelect: () => void;
|
|
111
|
+
}>;
|
|
112
|
+
/**
|
|
113
|
+
* The gap between two items in an editor list. Its insert action appears
|
|
114
|
+
* when the gap is hovered or when keyboard focus reaches it.
|
|
115
|
+
*/
|
|
116
|
+
export declare function EditorItemInsertDivider({ label, onSelect }: EditorItemInsertDividerProps): React.ReactElement;
|
|
@@ -4,6 +4,7 @@ export { SplitButton, type SplitButtonMenuItem, type SplitButtonProps, } from '.
|
|
|
4
4
|
export { ButtonGroup, ButtonGroupSeparator, ButtonGroupText, buttonGroupVariants, } from './button-group';
|
|
5
5
|
export { Card, CardHeader, CardTitle, CardDescription, CardContent, CardFooter, } from './card';
|
|
6
6
|
export { Surface, surfaceVariants, type SurfaceProps } from './surface';
|
|
7
|
+
export { EditorItemCard, EditorItemCardActions, EditorItemCardDragHandle, EditorItemInsertDivider, type EditorItemCardActionsProps, type EditorItemCardAffordances, type EditorItemCardControl, type EditorItemCardDisclosure, type EditorItemCardDragHandleProps, type EditorItemCardInlineAction, type EditorItemCardMenu, type EditorItemCardMenuGroup, type EditorItemCardMenuItem, type EditorItemCardProps, type EditorItemCardState, type EditorItemInsertDividerProps, } from './editor-item-card';
|
|
7
8
|
export { Collapsible, CollapsibleTrigger, CollapsibleContent, } from './collapsible';
|
|
8
9
|
export { Disclosure, DisclosureTrigger, DisclosureContent, } from './disclosure';
|
|
9
10
|
export { Dialog, DialogTrigger, DialogPortal, DialogClose, DialogOverlay, DialogContent, DialogHeader, DialogFooter, DialogTitle, DialogDescription, } from './dialog';
|
package/dist/client/{BookingConsentAgreement-BoCtvzzu.mjs → BookingConsentAgreement-DoAILrkN.mjs}
RENAMED
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import { n as RichText } from "./checkoutUrls-FL6lRkrt.mjs";
|
|
2
|
+
import { _n as formatCurrencyAmount, zt as assertNever$2 } from "./propsDecoder-DPXtCZWP.mjs";
|
|
3
|
+
import { a as CheckIcon } from "./scrollToBlock-0-C3DVhK.mjs";
|
|
4
|
+
import { n as RichText } from "./checkoutUrls-CW3-78uu.mjs";
|
|
6
5
|
import { useCallback, useEffect, useReducer, useRef } from "react";
|
|
7
6
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
8
7
|
//#region ../core/src/date-math.ts
|
|
@@ -613,56 +612,6 @@ function usePolling(config) {
|
|
|
613
612
|
};
|
|
614
613
|
}
|
|
615
614
|
//#endregion
|
|
616
|
-
//#region ../blocks/src/system/runtime/nodes/spinner.tsx
|
|
617
|
-
function resolveColorStyle(color) {
|
|
618
|
-
switch (color) {
|
|
619
|
-
case void 0: return;
|
|
620
|
-
case "inherit": return { color: "inherit" };
|
|
621
|
-
case "foreground": return { color: "rgb(var(--tb-foreground))" };
|
|
622
|
-
case "text": return { color: "rgb(var(--tb-text))" };
|
|
623
|
-
default: return;
|
|
624
|
-
}
|
|
625
|
-
}
|
|
626
|
-
function SpinnerNode({ className, size = "md", color, strokeWidth = 3, srLabel, style, ...rest }) {
|
|
627
|
-
const hasExplicitAriaLabel = typeof rest["aria-label"] === "string" && rest["aria-label"].trim().length > 0;
|
|
628
|
-
const accessibilityProps = srLabel ? {
|
|
629
|
-
role: "status",
|
|
630
|
-
"aria-live": "polite"
|
|
631
|
-
} : hasExplicitAriaLabel ? {} : { "aria-hidden": true };
|
|
632
|
-
const trackStroke = color === "inherit" ? "currentColor" : "var(--rb-spinner-track-color)";
|
|
633
|
-
const trackOpacity = color === "inherit" ? .25 : 1;
|
|
634
|
-
return /* @__PURE__ */ jsxs("span", {
|
|
635
|
-
...accessibilityProps,
|
|
636
|
-
className: clsx("rb-spinner", size ? `rb-spinner--${size}` : null, color === "inherit" ? "rb-spinner--inherit" : null, className),
|
|
637
|
-
style: {
|
|
638
|
-
...resolveColorStyle(color),
|
|
639
|
-
...style ?? {}
|
|
640
|
-
},
|
|
641
|
-
...rest,
|
|
642
|
-
children: [/* @__PURE__ */ jsxs("svg", {
|
|
643
|
-
viewBox: "0 0 24 24",
|
|
644
|
-
fill: "none",
|
|
645
|
-
"aria-hidden": "true",
|
|
646
|
-
children: [/* @__PURE__ */ jsx("circle", {
|
|
647
|
-
cx: "12",
|
|
648
|
-
cy: "12",
|
|
649
|
-
r: "10",
|
|
650
|
-
stroke: trackStroke,
|
|
651
|
-
strokeWidth,
|
|
652
|
-
opacity: trackOpacity
|
|
653
|
-
}), /* @__PURE__ */ jsx("path", {
|
|
654
|
-
d: "M12 2a10 10 0 0 1 10 10",
|
|
655
|
-
stroke: "currentColor",
|
|
656
|
-
strokeWidth,
|
|
657
|
-
strokeLinecap: "round"
|
|
658
|
-
})]
|
|
659
|
-
}), srLabel ? /* @__PURE__ */ jsx("span", {
|
|
660
|
-
className: "rb-sr-only",
|
|
661
|
-
children: srLabel
|
|
662
|
-
}) : null]
|
|
663
|
-
});
|
|
664
|
-
}
|
|
665
|
-
//#endregion
|
|
666
615
|
//#region ../blocks/src/system/runtime/shared/components/StepIndicator.tsx
|
|
667
616
|
/**
|
|
668
617
|
* Shared step indicator component for registration wizards.
|
|
@@ -748,4 +697,4 @@ function BookingConsentAgreement({ agreement, showTitle = true, title, titleId }
|
|
|
748
697
|
})] });
|
|
749
698
|
}
|
|
750
699
|
//#endregion
|
|
751
|
-
export {
|
|
700
|
+
export { resolveBookingPaymentDueNowCents as a, buildBookingPaymentSelectionViewModel as i, StepIndicator as n, formatPrice as o, usePolling as r, BookingConsentAgreement as t };
|
package/dist/client/{DiscountCodeDisclosure-B5S30nZk.mjs → DiscountCodeDisclosure-X528hUTf.mjs}
RENAMED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import {
|
|
2
|
+
import { t as ThemedButton } from "./ThemedButton-BwNFVwi4.mjs";
|
|
3
3
|
import { useId } from "react";
|
|
4
4
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
5
5
|
//#region ../blocks/src/system/runtime/api/types/discounts.ts
|
|
@@ -38,14 +38,8 @@ const themeFormClasses = {
|
|
|
38
38
|
label: "form-label",
|
|
39
39
|
row: "rb-flex rb-flex-col rb-gap-2 rb-sm-flex-row",
|
|
40
40
|
input: "form-input",
|
|
41
|
-
apply:
|
|
42
|
-
|
|
43
|
-
size: "sm"
|
|
44
|
-
}),
|
|
45
|
-
remove: themeButtonClassName({
|
|
46
|
-
variant: "secondary",
|
|
47
|
-
size: "sm"
|
|
48
|
-
}),
|
|
41
|
+
apply: "",
|
|
42
|
+
remove: "",
|
|
49
43
|
hint: "rb-caption status-muted",
|
|
50
44
|
feedback: "rb-caption"
|
|
51
45
|
};
|
|
@@ -53,6 +47,22 @@ function getDiscountCodeDisclosureClasses(surface) {
|
|
|
53
47
|
if (surface === "theme-form") return themeFormClasses;
|
|
54
48
|
return BLOCK_DISCOUNT_CODE_DISCLOSURE_CLASSES[surface];
|
|
55
49
|
}
|
|
50
|
+
function DiscountActionButton(props) {
|
|
51
|
+
return props.surface === "theme-form" ? /* @__PURE__ */ jsx(ThemedButton, {
|
|
52
|
+
type: "button",
|
|
53
|
+
variant: "secondary",
|
|
54
|
+
size: "sm",
|
|
55
|
+
label: props.label,
|
|
56
|
+
onClick: props.onClick,
|
|
57
|
+
disabled: props.disabled
|
|
58
|
+
}) : /* @__PURE__ */ jsx("button", {
|
|
59
|
+
type: "button",
|
|
60
|
+
className: props.className,
|
|
61
|
+
onClick: props.onClick,
|
|
62
|
+
disabled: props.disabled,
|
|
63
|
+
children: props.label
|
|
64
|
+
});
|
|
65
|
+
}
|
|
56
66
|
function DiscountCodeDisclosure({ surface, isOpen, code, onOpen, onChange, onRemove, onApply, id, toggleLabel = "Have a discount code?", label = "Discount code", placeholder = "Enter code", applyLabel = "Apply", removeLabel = "Remove", hint = "Applied at checkout.", feedback = null, isApplying = false, applyDisabled = false, disabled = false }) {
|
|
57
67
|
const generatedId = useId();
|
|
58
68
|
const inputId = id ?? `discount-code-${generatedId}`;
|
|
@@ -94,19 +104,19 @@ function DiscountCodeDisclosure({ surface, isOpen, code, onOpen, onChange, onRem
|
|
|
94
104
|
autoComplete: "off",
|
|
95
105
|
disabled: disabled || isApplying
|
|
96
106
|
}),
|
|
97
|
-
onApply ? /* @__PURE__ */ jsx(
|
|
98
|
-
|
|
107
|
+
onApply ? /* @__PURE__ */ jsx(DiscountActionButton, {
|
|
108
|
+
surface,
|
|
99
109
|
className: classes.apply,
|
|
110
|
+
label: isApplying ? "Applying..." : applyLabel,
|
|
100
111
|
onClick: onApply,
|
|
101
|
-
disabled: disabled || isApplying || applyDisabled
|
|
102
|
-
children: isApplying ? "Applying..." : applyLabel
|
|
112
|
+
disabled: disabled || isApplying || applyDisabled
|
|
103
113
|
}) : null,
|
|
104
|
-
/* @__PURE__ */ jsx(
|
|
105
|
-
|
|
114
|
+
/* @__PURE__ */ jsx(DiscountActionButton, {
|
|
115
|
+
surface,
|
|
106
116
|
className: classes.remove,
|
|
117
|
+
label: removeLabel,
|
|
107
118
|
onClick: onRemove,
|
|
108
|
-
disabled: disabled || isApplying
|
|
109
|
-
children: removeLabel
|
|
119
|
+
disabled: disabled || isApplying
|
|
110
120
|
})
|
|
111
121
|
]
|
|
112
122
|
}),
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { O as clsx } from "./colorStyles-
|
|
3
|
-
import {
|
|
4
|
-
import { a as EventCardClient, i as EventPaginatedListView, n as useEventPagination, o as EventFilters, r as toError, s as formatEventTeacherLine, t as useEventFilters } from "./useEventFilters-
|
|
5
|
-
import { o as formatEventRemainingPlaces, p as isEventFull, t as formatEventPrice } from "./pricing-
|
|
6
|
-
import { a as formatTime, d as resolveEventLinkProps, o as groupEventsByDate, s as resolveEventTimeZone, t as formatDate, u as resolveEventCta } from "./dates-
|
|
7
|
-
import { n as useBlockApi } from "./context-
|
|
2
|
+
import { O as clsx } from "./colorStyles-CuJBiS-1.mjs";
|
|
3
|
+
import { F as calendarMonthKey, G as buildEventRuntimeFilters, I as calendarPageResponseError, K as getEventRuntimeFiltersKey, L as calendarQueryKey, P as calendarMonthDate, Q as MONTH_NAMES, R as calendarWindowBounds, V as planCalendarMonthRanges, W as getBlockApiReadStage, X as getCardOrientation, Z as getContainerClass, ct as shiftCalendarAnchorDate, et as addMonths, it as getOrderedDayNames, nt as formatDateKey, ot as isSameCalendarDay, rn as getLocalScheduleDate, rt as getDayOfWeek, st as isToday, tn as formatLocalScheduleDate, tt as buildCalendarViewport, z as calendarWindowMonths$1 } from "./propsDecoder-DPXtCZWP.mjs";
|
|
4
|
+
import { a as EventCardClient, i as EventPaginatedListView, n as useEventPagination, o as EventFilters, r as toError, s as formatEventTeacherLine, t as useEventFilters } from "./useEventFilters-zvnnE1ro.mjs";
|
|
5
|
+
import { o as formatEventRemainingPlaces, p as isEventFull, t as formatEventPrice } from "./pricing-Bl1CAl28.mjs";
|
|
6
|
+
import { a as formatTime, d as resolveEventLinkProps, o as groupEventsByDate, s as resolveEventTimeZone, t as formatDate, u as resolveEventCta } from "./dates-ClFx7Epy.mjs";
|
|
7
|
+
import { n as useBlockApi } from "./context-CDLCfDep.mjs";
|
|
8
|
+
import { n as ThemedButtonLink, t as ThemedButton } from "./ThemedButton-BwNFVwi4.mjs";
|
|
8
9
|
import { t as createBodyThemePortalRoot } from "./themePortalRoot-AGs4cE7t.mjs";
|
|
9
10
|
import { t as ModalShell } from "./ModalShell-CqkBvBIC.mjs";
|
|
10
11
|
import React, { createContext, useCallback, useContext, useEffect, useId, useMemo, useRef, useState } from "react";
|
|
@@ -95,9 +96,6 @@ const TabBar = ({ tabs, activeTab, onTabChange, className }) => {
|
|
|
95
96
|
};
|
|
96
97
|
//#endregion
|
|
97
98
|
//#region ../blocks/src/system/runtime/hooks/useCalendarEvents.state.ts
|
|
98
|
-
function calendarMonthKey(date) {
|
|
99
|
-
return `${date.year}-${String(date.month).padStart(2, "0")}`;
|
|
100
|
-
}
|
|
101
99
|
function calendarWindowMonths(date, radius) {
|
|
102
100
|
const months = [];
|
|
103
101
|
for (let offset = -radius; offset <= radius; offset++) months.push(calendarMonthKey(addMonths(date, offset)));
|
|
@@ -134,10 +132,9 @@ function planCalendarRequest(state, months, retry) {
|
|
|
134
132
|
const month = state.get(key);
|
|
135
133
|
return !month || month.kind === "partial" || retry && month.kind === "failed";
|
|
136
134
|
});
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
const
|
|
140
|
-
const continuation = month && (month.kind === "partial" || month.kind === "failed") ? month.continuation : void 0;
|
|
135
|
+
if (missing.length === 0) return null;
|
|
136
|
+
const continuedMonth = missing.map((key) => state.get(key)).find((month) => month?.kind === "partial") ?? (retry ? missing.map((key) => state.get(key)).find((month) => month?.kind === "failed") : void 0);
|
|
137
|
+
const continuation = continuedMonth?.kind === "partial" || continuedMonth?.kind === "failed" ? continuedMonth.continuation : void 0;
|
|
141
138
|
if (continuation) return {
|
|
142
139
|
...continuation,
|
|
143
140
|
months: continuation.months.filter((key) => state.get(key)?.kind !== "ready")
|
|
@@ -330,40 +327,55 @@ function useCalendarViewport({ view = "month", startOfWeek = "monday", initialDa
|
|
|
330
327
|
}, [today])
|
|
331
328
|
};
|
|
332
329
|
}
|
|
330
|
+
function prepareCalendarRead(siteId, stage, filters, readProfile) {
|
|
331
|
+
return siteId ? {
|
|
332
|
+
kind: "ready",
|
|
333
|
+
key: calendarQueryKey(siteId, stage, {
|
|
334
|
+
...filters,
|
|
335
|
+
readProfile
|
|
336
|
+
})
|
|
337
|
+
} : {
|
|
338
|
+
kind: "missing-site-config",
|
|
339
|
+
error: /* @__PURE__ */ new Error("Calendar is missing site configuration")
|
|
340
|
+
};
|
|
341
|
+
}
|
|
333
342
|
/**
|
|
334
343
|
* The reducer owns month data and request ownership. The hook only performs I/O.
|
|
335
344
|
* Requests for other months remain useful until the query context changes.
|
|
336
345
|
*/
|
|
337
|
-
function useCalendarEventCache({ readProfile = "listing-card", viewDate, calendarWindow, preloadMonths = 1, filters,
|
|
346
|
+
function useCalendarEventCache({ readProfile = "listing-card", viewDate, calendarWindow, preloadMonths = 1, filters, timeZone }) {
|
|
338
347
|
const { getPublicEventCalendarWindow, config } = useBlockApi();
|
|
348
|
+
const stage = getBlockApiReadStage(config);
|
|
339
349
|
const filtersKey = getEventRuntimeFiltersKey(filters);
|
|
350
|
+
const preparation = useMemo(() => prepareCalendarRead(config.siteId, stage, filters, readProfile), [
|
|
351
|
+
config.siteId,
|
|
352
|
+
filtersKey,
|
|
353
|
+
stage,
|
|
354
|
+
readProfile
|
|
355
|
+
]);
|
|
340
356
|
const context = useMemo(() => ({
|
|
341
357
|
getPublicEventCalendarWindow,
|
|
342
358
|
filters,
|
|
343
359
|
stage,
|
|
344
360
|
timeZone,
|
|
345
|
-
|
|
346
|
-
...filters,
|
|
347
|
-
readProfile
|
|
348
|
-
})
|
|
361
|
+
preparation
|
|
349
362
|
}), [
|
|
350
363
|
getPublicEventCalendarWindow,
|
|
351
|
-
config.siteId,
|
|
352
364
|
filtersKey,
|
|
353
365
|
stage,
|
|
354
366
|
timeZone,
|
|
355
|
-
|
|
367
|
+
preparation
|
|
356
368
|
]);
|
|
357
369
|
const activeContext = useRef(context);
|
|
358
370
|
activeContext.current = context;
|
|
359
|
-
const seed = () => calendarWindow?.scope.key === context.key && calendarWindow.scope.timeZone === timeZone ? seedCalendarWindow(calendarWindow) : /* @__PURE__ */ new Map();
|
|
371
|
+
const seed = () => context.preparation.kind === "ready" && calendarWindow?.scope.key === context.preparation.key && calendarWindow.scope.timeZone === timeZone ? seedCalendarWindow(calendarWindow) : /* @__PURE__ */ new Map();
|
|
360
372
|
const [snapshot, setSnapshot] = useState(() => ({
|
|
361
373
|
context,
|
|
362
374
|
cache: seed()
|
|
363
375
|
}));
|
|
364
376
|
if (snapshot.context !== context) setSnapshot({
|
|
365
377
|
context,
|
|
366
|
-
cache:
|
|
378
|
+
cache: seed()
|
|
367
379
|
});
|
|
368
380
|
const months = useMemo(() => calendarWindowMonths(viewDate, preloadMonths), [
|
|
369
381
|
viewDate.year,
|
|
@@ -371,13 +383,15 @@ function useCalendarEventCache({ readProfile = "listing-card", viewDate, calenda
|
|
|
371
383
|
preloadMonths
|
|
372
384
|
]);
|
|
373
385
|
const displayMonths = useMemo(() => calendarWindowMonths(viewDate, 1), [viewDate.year, viewDate.month]);
|
|
374
|
-
const request = useMemo(() => snapshot.context === context ? planCalendarRequest(snapshot.cache, months, false) : null, [
|
|
386
|
+
const request = useMemo(() => snapshot.context === context && context.preparation.kind === "ready" ? planCalendarRequest(snapshot.cache, months, false) : null, [
|
|
375
387
|
snapshot,
|
|
376
388
|
context,
|
|
377
389
|
months
|
|
378
390
|
]);
|
|
379
391
|
const launched = useRef(/* @__PURE__ */ new WeakSet());
|
|
380
392
|
const runRequest = useCallback(async (planned) => {
|
|
393
|
+
const preparation = context.preparation;
|
|
394
|
+
if (preparation.kind !== "ready") return;
|
|
381
395
|
if (launched.current.has(planned)) return;
|
|
382
396
|
launched.current.add(planned);
|
|
383
397
|
const apply = (action) => setSnapshot((current) => current.context === context ? {
|
|
@@ -394,7 +408,6 @@ function useCalendarEventCache({ readProfile = "listing-card", viewDate, calenda
|
|
|
394
408
|
const page = await context.getPublicEventCalendarWindow({
|
|
395
409
|
...context.filters,
|
|
396
410
|
readProfile,
|
|
397
|
-
stage: context.stage,
|
|
398
411
|
...planned.window,
|
|
399
412
|
afterStartsAt: cursor?.startsAt,
|
|
400
413
|
afterId: cursor?.occurrenceId,
|
|
@@ -402,7 +415,7 @@ function useCalendarEventCache({ readProfile = "listing-card", viewDate, calenda
|
|
|
402
415
|
});
|
|
403
416
|
if (activeContext.current !== context) return;
|
|
404
417
|
const invalid = calendarPageResponseError(page, {
|
|
405
|
-
key:
|
|
418
|
+
key: preparation.key,
|
|
406
419
|
timeZone,
|
|
407
420
|
window: planned.window,
|
|
408
421
|
cursor
|
|
@@ -444,11 +457,14 @@ function useCalendarEventCache({ readProfile = "listing-card", viewDate, calenda
|
|
|
444
457
|
]);
|
|
445
458
|
return {
|
|
446
459
|
events: selectCalendarEvents(snapshot.cache, displayMonths),
|
|
447
|
-
loadState: projectCalendarLoadState(snapshot.cache, months)
|
|
460
|
+
loadState: context.preparation.kind === "ready" ? projectCalendarLoadState(snapshot.cache, months) : {
|
|
461
|
+
kind: "error",
|
|
462
|
+
error: context.preparation.error
|
|
463
|
+
},
|
|
448
464
|
retryCurrentView
|
|
449
465
|
};
|
|
450
466
|
}
|
|
451
|
-
function useCalendarEvents({ readProfile, siteId: _siteId, calendarWindow, view = "month", startOfWeek = "monday", preloadMonths = 1, filters,
|
|
467
|
+
function useCalendarEvents({ readProfile, siteId: _siteId, calendarWindow, view = "month", startOfWeek = "monday", preloadMonths = 1, filters, calendarContext }) {
|
|
452
468
|
const today = useCalendarToday(calendarContext);
|
|
453
469
|
const { viewDate, viewport, goToDate, goToPrevious, goToNext, goToToday } = useCalendarViewport({
|
|
454
470
|
view,
|
|
@@ -462,7 +478,6 @@ function useCalendarEvents({ readProfile, siteId: _siteId, calendarWindow, view
|
|
|
462
478
|
calendarWindow,
|
|
463
479
|
preloadMonths,
|
|
464
480
|
filters,
|
|
465
|
-
stage,
|
|
466
481
|
timeZone: calendarContext.timeZone
|
|
467
482
|
});
|
|
468
483
|
return {
|
|
@@ -709,10 +724,6 @@ function AgendaLinkCard({ event, showCapacity, showVenue, buttonVariant, buttonT
|
|
|
709
724
|
const price = formatEventPrice(event);
|
|
710
725
|
const capacity = showCapacity ? formatEventRemainingPlaces(event) : null;
|
|
711
726
|
const cta = resolveEventCta(event, buttonText);
|
|
712
|
-
const buttonClass = themeButtonClassName({
|
|
713
|
-
variant: buttonVariant,
|
|
714
|
-
size: "sm"
|
|
715
|
-
});
|
|
716
727
|
return /* @__PURE__ */ jsxs("article", {
|
|
717
728
|
className: "event-agenda-card event-agenda-card--agenda",
|
|
718
729
|
children: [
|
|
@@ -764,12 +775,14 @@ function AgendaLinkCard({ event, showCapacity, showVenue, buttonVariant, buttonT
|
|
|
764
775
|
}), cta.hidden ? /* @__PURE__ */ jsx("span", {
|
|
765
776
|
className: "event-agenda-card-status status-muted",
|
|
766
777
|
children: cta.label
|
|
767
|
-
}) : /* @__PURE__ */ jsx(
|
|
778
|
+
}) : /* @__PURE__ */ jsx(ThemedButtonLink, {
|
|
768
779
|
href: cta.href,
|
|
769
780
|
target: cta.external ? "_blank" : void 0,
|
|
770
781
|
rel: cta.external ? "noopener noreferrer" : void 0,
|
|
771
|
-
|
|
772
|
-
|
|
782
|
+
variant: buttonVariant,
|
|
783
|
+
size: "sm",
|
|
784
|
+
extraClassName: "event-agenda-card-cta",
|
|
785
|
+
label: cta.label
|
|
773
786
|
})]
|
|
774
787
|
})
|
|
775
788
|
]
|
|
@@ -1064,7 +1077,6 @@ function toEventCombinedControllerProps(props) {
|
|
|
1064
1077
|
return {
|
|
1065
1078
|
events: props.render.hydration.prefetchedEvents ? [...props.render.display.events] : void 0,
|
|
1066
1079
|
siteId: props.render.hydration.siteId,
|
|
1067
|
-
stage: props.render.hydration.stage,
|
|
1068
1080
|
listLayout: props.render.display.listLayout,
|
|
1069
1081
|
listColumns: props.render.display.listColumns,
|
|
1070
1082
|
eventsPerPage: props.render.display.eventsPerPage,
|
|
@@ -1122,14 +1134,12 @@ const EventCombinedCalendarHeader = ({ calendarView, title, loadState, onPreviou
|
|
|
1122
1134
|
children: /* @__PURE__ */ jsx(CalendarNavigationChevron, { direction: "next" })
|
|
1123
1135
|
})
|
|
1124
1136
|
]
|
|
1125
|
-
}), /* @__PURE__ */ jsx(
|
|
1137
|
+
}), /* @__PURE__ */ jsx(ThemedButton, {
|
|
1126
1138
|
type: "button",
|
|
1127
1139
|
onClick: onToday,
|
|
1128
|
-
|
|
1129
|
-
|
|
1130
|
-
|
|
1131
|
-
}),
|
|
1132
|
-
children: "Today"
|
|
1140
|
+
variant: buttonVariant,
|
|
1141
|
+
size: "sm",
|
|
1142
|
+
label: "Today"
|
|
1133
1143
|
})]
|
|
1134
1144
|
});
|
|
1135
1145
|
const EventCombinedCalendarTab = ({ calendarTabViews, calendarView, calendarViewOptions, onCalendarViewChange, calendarEvents, eventsByDate, viewDate, viewport, calendarLoadState, dayNames, calendarContext, today, goToPrevious, goToNext, goToToday, emptyMessage, showCapacity, showVenue, cardRole, buttonVariant, buttonText, showEmptyState }) => /* @__PURE__ */ jsxs(EventModalProvider, { children: [/* @__PURE__ */ jsxs("div", {
|
|
@@ -1198,7 +1208,7 @@ const EventCombinedCalendarTab = ({ calendarTabViews, calendarView, calendarView
|
|
|
1198
1208
|
* Tabbed view with List and Calendar tabs.
|
|
1199
1209
|
* List tab includes filtering; Calendar tab shows month/week view.
|
|
1200
1210
|
*/
|
|
1201
|
-
const EventCombinedClient = ({ events: initialEvents, siteId,
|
|
1211
|
+
const EventCombinedClient = ({ events: initialEvents, siteId, listLayout = "stack", listColumns = "3", eventsPerPage = 12, paginationAction = {
|
|
1202
1212
|
kind: "loadMore",
|
|
1203
1213
|
label: "Load more events"
|
|
1204
1214
|
}, startOfWeek = "monday", calendarTabViews = "both", defaultCalendarView, showFilters, showCategoryFilter = "auto", showVenueFilter, showStaffFilter, eventSurface, filterEventPresets, scheduleScope, seriesIds, filterCategoryIds, filterStaffMemberId, filterVenueId, showVenue, showMap, showCapacity, cardRole, buttonVariant = "primary", buttonText = "Book", emptyMessage = "No upcoming events scheduled.", className, calendarContext, calendarWindow }) => {
|
|
@@ -1252,8 +1262,7 @@ const EventCombinedClient = ({ events: initialEvents, siteId, stage, listLayout
|
|
|
1252
1262
|
fetchInitialOnMount: fetchInitialEventsOnMount,
|
|
1253
1263
|
initialFilters: initialListFilters,
|
|
1254
1264
|
filters: listFilters,
|
|
1255
|
-
pageSize
|
|
1256
|
-
stage
|
|
1265
|
+
pageSize
|
|
1257
1266
|
});
|
|
1258
1267
|
const { events: calendarEventsRaw, viewDate, today, viewport, loadState: calendarLoadState, goToPrevious, goToNext, goToToday } = useCalendarEvents({
|
|
1259
1268
|
siteId,
|
|
@@ -1261,7 +1270,6 @@ const EventCombinedClient = ({ events: initialEvents, siteId, stage, listLayout
|
|
|
1261
1270
|
startOfWeek,
|
|
1262
1271
|
preloadMonths: 1,
|
|
1263
1272
|
filters: listFilters,
|
|
1264
|
-
stage,
|
|
1265
1273
|
calendarContext,
|
|
1266
1274
|
calendarWindow
|
|
1267
1275
|
});
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import {
|
|
3
|
-
import { i as EventPaginatedListView, n as useEventPagination, o as EventFilters, t as useEventFilters } from "./useEventFilters-
|
|
2
|
+
import { G as buildEventRuntimeFilters } from "./propsDecoder-DPXtCZWP.mjs";
|
|
3
|
+
import { i as EventPaginatedListView, n as useEventPagination, o as EventFilters, t as useEventFilters } from "./useEventFilters-zvnnE1ro.mjs";
|
|
4
4
|
import { useId, useMemo } from "react";
|
|
5
5
|
import { jsx } from "react/jsx-runtime";
|
|
6
6
|
//#region ../blocks/src/system/runtime/nodes/events/EventListing.client.tsx
|
|
@@ -32,8 +32,7 @@ const EventListingController = ({ render }) => {
|
|
|
32
32
|
fetchInitialOnMount: hydration.fetchInitialEventsOnMount,
|
|
33
33
|
initialFilters: initialListFilters,
|
|
34
34
|
filters: listFilters,
|
|
35
|
-
pageSize: hydration.eventsPerPage
|
|
36
|
-
stage: hydration.stage
|
|
35
|
+
pageSize: hydration.eventsPerPage
|
|
37
36
|
});
|
|
38
37
|
return /* @__PURE__ */ jsx(EventPaginatedListView, {
|
|
39
38
|
display,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import {
|
|
2
|
+
import { Rt as isRecord } from "./propsDecoder-DPXtCZWP.mjs";
|
|
3
3
|
import { useEffect, useRef, useState } from "react";
|
|
4
4
|
import { jsx } from "react/jsx-runtime";
|
|
5
5
|
//#region ../blocks/src/system/runtime/nodes/shared/LeafletStaticMap.tsx
|