@riverbankcms/sdk 0.157.0 → 0.158.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/_dts/{BlocksIslandsHydrator-B3AHhvIn.d.ts → BlocksIslandsHydrator-BgNBtEai.d.ts} +1 -1
- package/dist/_dts/{Page-BMaOSVCP.d.ts → Page-DpCo8zXD.d.ts} +9 -6
- package/dist/_dts/{SdkPreviewMode-CEwDDqfK.d.ts → SdkPreviewMode-Bv2TMscG.d.ts} +2 -2
- package/dist/_dts/{client-BRFVhGUB.d.ts → client-B960v2gW.d.ts} +1 -1
- package/dist/_dts/{content-types-tEy1rtQ5.d.ts → content-types-CN0Wy8V6.d.ts} +26 -3
- package/dist/_dts/{contracts-BwDSOVGj.d.ts → contracts-BFUrby76.d.ts} +5 -4
- package/dist/_dts/{footerPageOutline-BVp5EPJj.d.ts → footerPageOutline-CmoqleLS.d.ts} +6 -6
- package/dist/_dts/{generatePageMetadata-BQb1mvpc.d.ts → generatePageMetadata-Dkvivc3R.d.ts} +2 -2
- package/dist/_dts/{hosted-booking-appearance-BN2Zu93B.d.ts → hosted-booking-appearance-BIbit60h.d.ts} +8976 -47
- package/dist/_dts/{index-Ca3oD2id.d.ts → index-Ba6RmuxX.d.ts} +3 -3
- package/dist/_dts/{index-Br1TNJlL.d.ts → index-DCNu_8it.d.ts} +4 -4
- package/dist/_dts/{index-CSLkIKs3.d.ts → index-DPfI2t5A.d.ts} +2 -2
- package/dist/_dts/{index-B0wsEbm3.d.ts → index-DaS_z6ir.d.ts} +1 -1
- package/dist/_dts/{index-B0DzVcrB.d.ts → index-DfkFWUxt.d.ts} +4 -1
- package/dist/_dts/{index-BF3hkKvt.d.ts → index-DpgkhY-a.d.ts} +2 -2
- package/dist/_dts/{loadContent-Dz9fOZMZ.d.ts → loadContent-DvvKF4nB.d.ts} +10 -7
- package/dist/_dts/{navigation-DOZwagCE.d.ts → navigation-n-eTVTIQ.d.ts} +75 -4
- package/dist/_dts/{resolvePageContent-oHZ8cfaF.d.ts → resolvePageContent-D0lGwVD6.d.ts} +2 -2
- package/dist/_dts/sdk/src/bookings/index.d.ts +2 -2
- package/dist/_dts/sdk/src/client/types.d.ts +2 -2
- package/dist/_dts/sdk/src/client.d.ts +6 -6
- package/dist/_dts/sdk/src/config/index.d.ts +6 -6
- package/dist/_dts/sdk/src/config/template-validation.d.ts +1 -1
- package/dist/_dts/sdk/src/config/validation.d.ts +1 -1
- package/dist/_dts/sdk/src/index.d.ts +8 -8
- package/dist/_dts/sdk/src/manifest/index.d.ts +3 -3
- package/dist/_dts/sdk/src/metadata/index.d.ts +1 -1
- package/dist/_dts/sdk/src/navigation/index.d.ts +2 -2
- package/dist/_dts/sdk/src/next/index.d.ts +10 -7
- package/dist/_dts/sdk/src/next/middleware.d.ts +2 -2
- package/dist/_dts/sdk/src/page-converter/index.d.ts +3 -3
- package/dist/_dts/sdk/src/portal/client.d.ts +11 -4
- package/dist/_dts/sdk/src/prebuild/index.d.ts +1 -1
- package/dist/_dts/sdk/src/preview-next/before-render.d.ts +2 -2
- package/dist/_dts/sdk/src/preview-next/client/index.d.ts +2 -2
- package/dist/_dts/sdk/src/preview-next/client/runtime.d.ts +1 -1
- package/dist/_dts/sdk/src/rendering/client.d.ts +2 -2
- package/dist/_dts/sdk/src/rendering/index.d.ts +45 -6
- package/dist/_dts/sdk/src/rendering/islands/client.d.ts +1 -1
- package/dist/_dts/sdk/src/rendering/server.d.ts +2 -2
- package/dist/_dts/sdk/src/routing/index.d.ts +5 -5
- package/dist/_dts/sdk/src/server.d.ts +5 -5
- package/dist/_dts/sdk/src/theme/index.d.ts +1 -1
- package/dist/_dts/{types-Dy1DNdIV.d.ts → types-BJrRUaY7.d.ts} +2 -2
- package/dist/_dts/{types-6q1MDqxg.d.ts → types-BY7PgnDi.d.ts} +7 -7
- package/dist/_dts/{types-BuWOkyqw.d.ts → types-maEnXL6Z.d.ts} +3 -3
- package/dist/_dts/{validation-BumblAOO.d.ts → validation-BjuVrMrs.d.ts} +4 -4
- package/dist/client/{BlocksIslandsHydrator-Cid8be1G.mjs → BlocksIslandsHydrator-WRLS96Ev.mjs} +17 -17
- package/dist/client/{BookingMailingListNote-BpzJTCZw.mjs → BookingMailingListNote-eovghMPa.mjs} +3 -56
- package/dist/client/{CalendarNavigationChevron-CBKHlGjE.mjs → CalendarNavigationChevron-CIcMQRc1.mjs} +5 -5
- package/dist/client/{DemoBookingPortalAccess-DpfgDMQ-.mjs → DemoBookingPortalAccess-CdnFgDyQ.mjs} +3 -3
- package/dist/client/{EventCalendar.client-DE5JHf4s.mjs → EventCalendar.client-Dc-ZLxKo.mjs} +8 -8
- package/dist/client/{EventCombined.client-DQLU3EAc.mjs → EventCombined.client-C93XqRIv.mjs} +6 -6
- package/dist/client/{EventItem-C9QTFafI.mjs → EventItem-DnCTygqk.mjs} +3 -3
- package/dist/client/{EventListWeekNavigation-6oYGdpNS.mjs → EventListWeekNavigation-9h97heuQ.mjs} +1 -1
- package/dist/client/{EventListing.client-D0N4Wj_4.mjs → EventListing.client-DFKlQvvs.mjs} +3 -3
- package/dist/client/{EventListing.view-Bish8-si.mjs → EventListing.view-pAuTDyrP.mjs} +4 -4
- package/dist/client/{EventRegistrationPayment-DLPYU2VU.mjs → EventRegistrationPayment-rgKlBvhP.mjs} +8 -7
- package/dist/client/{LeafletStaticMap-BmgEmEUS.mjs → LeafletStaticMap-3XiWSgy0.mjs} +1 -1
- package/dist/client/{Page-C-W_6VPx.mjs → Page-BmpeAwID.mjs} +750 -169
- package/dist/client/{StepIndicator-D8fvzhlS.mjs → StepIndicator-qEq6X5zP.mjs} +2 -2
- package/dist/client/{accordion-B5jBBoBC.mjs → accordion-DeObOasQ.mjs} +1 -1
- package/dist/client/{booking-form.client-xypjcfob.mjs → booking-form.client-DfWeF0lj.mjs} +36 -32
- package/dist/client/{bookingForm-CSE7NT54.mjs → bookingForm-TnzIBHx2.mjs} +4 -4
- package/dist/client/bookings.mjs +5 -5
- package/dist/client/{carousel-BrrLdGgn.mjs → carousel-kkFnbr5Z.mjs} +1 -1
- package/dist/client/{cart-QFgSKqia.mjs → cart-BAXNbFux.mjs} +3 -3
- package/dist/client/{cart.client-C6iA9v8X.mjs → cart.client-BczxUF70.mjs} +1 -1
- package/dist/client/{checkout-BAuLgA6Q.mjs → checkout-C5NRhPeP.mjs} +3 -3
- package/dist/client/{checkout.client-hbvBPpZR.mjs → checkout.client-BuDk3Td9.mjs} +1 -1
- package/dist/client/client.mjs +3 -2
- package/dist/client/{context-psG_Bwfs.mjs → context-CVsgML69.mjs} +1 -1
- package/dist/client/{cta-DrX2pzK9.mjs → cta-BWnUuJce.mjs} +1 -1
- package/dist/client/{demoPortalMagicLink-CClf0SHq.mjs → demoPortalMagicLink-CUlwvmxf.mjs} +1 -1
- package/dist/client/{enhanceHeaderSection-CqN7ig-2.mjs → enhanceHeaderSection-Cw8nnFj-.mjs} +2 -2
- package/dist/client/{event-details.client-CcYX4URD.mjs → event-details.client-Bl0E_6Vi.mjs} +2 -2
- package/dist/client/{event-registration.client-B8wVfnJ8.mjs → event-registration.client-DmfLg_LC.mjs} +15 -14
- package/dist/client/{eventCalendar-CRYN9-Vv.mjs → eventCalendar-D1Dwb9VA.mjs} +4 -4
- package/dist/client/{eventCombined-gGuj2_Vh.mjs → eventCombined-DfsqY1qR.mjs} +4 -4
- package/dist/client/{eventDetails-D1U7WEsJ.mjs → eventDetails-BmugDVoa.mjs} +2 -2
- package/dist/client/{eventListing-BY20rsvl.mjs → eventListing-BPAGJi3C.mjs} +4 -4
- package/dist/client/{eventRegistration-DnOZYpqh.mjs → eventRegistration-DBlz_x6u.mjs} +4 -4
- package/dist/client/{form-_q17Emh7.mjs → form-DVu3ZMjx.mjs} +3 -3
- package/dist/client/{form.client-BVaTf4FG.mjs → form.client-QZUyABIY.mjs} +3 -3
- package/dist/client/{form.parts-C9EmjE7U.mjs → form.parts-Bs0F3v08.mjs} +1 -1
- package/dist/client/formatDate-BD9D3dgo.mjs +26 -0
- package/dist/client/gifting/client.mjs +2 -2
- package/dist/client/{headerSection-CZ3unSkX.mjs → headerSection-BQwWW4Yy.mjs} +2 -2
- package/dist/client/{location-map.client-C_udm2_y.mjs → location-map.client-upKuwABk.mjs} +3 -10
- package/dist/client/{location-map.view-Bkd9gu_S.mjs → location-map.view-RuBCD10O.mjs} +87 -13
- package/dist/client/{locationMap-CunBAPoo.mjs → locationMap-1sCbsk0V.mjs} +2 -2
- package/dist/client/{newsletter-form.client-BkHhqPBi.mjs → newsletter-form.client-DBTU3oNv.mjs} +4 -4
- package/dist/client/{newsletter-form.parts-VGjM-NDG.mjs → newsletter-form.parts-C9I9JBhe.mjs} +1 -1
- package/dist/client/{newsletterForm-DGc1-NVR.mjs → newsletterForm-DTPtTxxG.mjs} +3 -3
- package/dist/client/{noop-D3wctocR.mjs → noop-DMFt3KdC.mjs} +19 -132
- package/dist/client/portal/client.mjs +589 -482
- package/dist/client/{product-detail.client-C_8N4OxU.mjs → product-detail.client-BX7M5o6p.mjs} +1 -1
- package/dist/client/{product-list.client-79qoSlLs.mjs → product-list.client-i32QNY4c.mjs} +1 -1
- package/dist/client/{productDetail-QGBXBpWb.mjs → productDetail-DWjE9zm7.mjs} +3 -3
- package/dist/client/{productList-Bdno11g6.mjs → productList-DZH9_brv.mjs} +3 -3
- package/dist/client/{propsDecoder-BpKsRqjG.mjs → propsDecoder-CTzHkEkh.mjs} +14 -3
- package/dist/client/{registry.server-D9GvC4EZ.mjs → registry.server-vJ5FlscU.mjs} +589 -246
- package/dist/client/rendering/client.mjs +23 -23
- package/dist/client/rendering/islands.mjs +1 -1
- package/dist/client/rendering.mjs +26 -4
- package/dist/client/{richText-coerce-Nln8Bw2P.mjs → richText-coerce-DXAmC72p.mjs} +1 -1
- package/dist/client/{routeIslandApiConfig-B4E30DaZ.mjs → routeIslandApiConfig-CmC7ygin.mjs} +1 -1
- package/dist/client/{shop-653-Nn74.mjs → shop-C7eL3B37.mjs} +3 -3
- package/dist/client/{shop-commerce-CfbvhT6h.mjs → shop-commerce-D8oRN0QJ.mjs} +9 -9
- package/dist/client/{shop-commerce-store-CfB26IXt.mjs → shop-commerce-store-CRnQ4M18.mjs} +1 -1
- package/dist/client/{shop.client-Bn7jUQOB.mjs → shop.client-X6d6KVmA.mjs} +9 -9
- package/dist/client/{shop.interactive-acMnyBZU.mjs → shop.interactive-DBMeM8VD.mjs} +155 -3
- package/dist/client/{shopShared-Du4efbgL.mjs → shopShared-Y182kN_s.mjs} +2 -2
- package/dist/client/{timetableModel-Duwk6gXe.mjs → timetableModel-D7PwpaBY.mjs} +5 -5
- package/dist/client/{useAvailableSlots-CbaAFr8M.mjs → useAvailableSlots-BDV6MHgJ.mjs} +2 -2
- package/dist/client/useBookingNowIso-DgJEv3ZY.mjs +58 -0
- package/dist/client/{useDiscountApply-DAl-GX21.mjs → useDiscountApply-BTu9EeT7.mjs} +1 -1
- package/dist/client/{useDiscountCodeUi-BUf9LuI6.mjs → useDiscountCodeUi-BfZxdxI-.mjs} +1 -1
- package/dist/client/{useEventPagination-hJDAEg-T.mjs → useEventPagination-pnvdHGeQ.mjs} +6 -6
- package/dist/client/{view-CFSMNvdC.mjs → view-BPEa6Okm.mjs} +8 -7
- package/dist/client/{view-4sSIJ6Ny.mjs → view-hJr_L4QC2.mjs} +3 -3
- package/dist/client/{wizardSteps-B3tRF3_2.mjs → wizardSteps-HdyGoIG3.mjs} +218 -47
- package/dist/preview-next/before-render.mjs +1 -1
- package/dist/preview-next/client/{EventEmbeddedCheckoutStep-BX5F0a_h.mjs → EventEmbeddedCheckoutStep-BFlBqSu4.mjs} +1 -1
- package/dist/preview-next/client/{PreviewEditorSidebar-DLzGdmTw.mjs → PreviewEditorSidebar-CXRUbqMp.mjs} +42 -26
- package/dist/preview-next/client/{PreviewEditorUI-Dru5AxOd.mjs → PreviewEditorUI-CxjEV0Fm.mjs} +31 -22
- package/dist/preview-next/client/{SdkPreviewModeRuntime-QVfwY0HY.mjs → SdkPreviewModeRuntime-BxI12BBS.mjs} +1310 -1226
- package/dist/preview-next/client/{SdkPreviewModeRuntime-V3absa-c.mjs → SdkPreviewModeRuntime-XdQSGGj_.mjs} +1 -1
- package/dist/preview-next/client/{SiteChromeCustomizeContext-RSPyKO_K.mjs → SiteChromeCustomizeContext-CfRQRwpH.mjs} +133891 -131593
- package/dist/preview-next/client/{ThemedButton-ADHirm0A.mjs → ThemedButton-BEOPss9H.mjs} +30 -4
- package/dist/preview-next/client/{previewChromeSurface-Cc4b9nBZ.mjs → previewChromeSurface-CH7hd5n7.mjs} +1 -1
- package/dist/preview-next/client/runtime.mjs +3 -3
- package/dist/preview-next/client/{sdk-runtime-CTLm99t6.mjs → sdk-runtime-C6xEU1LI.mjs} +1 -1
- package/dist/preview-next/client/{siteStyleAccess-YpHSMBBC.mjs → siteStyleAccess-CRXaC2oL.mjs} +2 -2
- package/dist/preview-next/client/{spinner-CsiSmy1g.mjs → spinner-BTf1CZmy.mjs} +1 -1
- package/dist/preview-next/keepAlive.mjs +1 -1
- package/dist/preview-next/middleware.mjs +1 -1
- package/dist/preview-next/{route-contract-dR_Jzpo5.mjs → route-contract-DM22uOXM.mjs} +41 -0
- package/dist/server/{Block.shared-BNrmEY1p.mjs → Block.shared-DLoilC2J.mjs} +4 -4
- package/dist/server/{bindings-C9zgT9uX.mjs → bindings-C7DKLVx_.mjs} +1 -1
- package/dist/server/{blocks-BLm-OxTv.mjs → blocks-jlIm0PWc.mjs} +953 -324
- package/dist/server/{client-CaQ1ElR3.mjs → client-CU4wlMLE.mjs} +2 -2
- package/dist/server/config-validation.mjs +1 -1
- package/dist/server/config.mjs +2 -2
- package/dist/server/index.mjs +2 -2
- package/dist/server/{loadContent-BFyU8YxS.mjs → loadContent-DmQ4BiiQ.mjs} +6 -4
- package/dist/server/{loadPage-DeQipVdO.mjs → loadPage-BBkDQA57.mjs} +3 -2
- package/dist/server/loadPage-ZrcfjG3X.mjs +2 -0
- package/dist/server/next.mjs +24 -12
- package/dist/server/{overrideResolution-D5nmZUYe.mjs → overrideResolution-ByeAbLSO.mjs} +1 -1
- package/dist/server/{overrides-BI13bIb7.mjs → overrides-BcA6ZPWf.mjs} +94 -30
- package/dist/server/page-converter.mjs +1 -1
- package/dist/server/{prebuild-UgDhSzy2.mjs → prebuild-8T-m7XjB.mjs} +1 -1
- package/dist/server/prebuild.mjs +1 -1
- package/dist/server/{prefetchBlockData-CLF-Y7h-.mjs → prefetchBlockData-Bjya-X9t.mjs} +6 -5
- package/dist/server/{publicProducts-vPbNQJsO.mjs → publicProducts-C3meXS2o.mjs} +41 -0
- package/dist/server/rendering/server.mjs +4 -4
- package/dist/server/rendering.mjs +26 -8
- package/dist/server/{resolveBlockData-C7J-pixy.mjs → resolveBlockData-D0ow8PRJ.mjs} +1 -1
- package/dist/server/routing.mjs +1 -1
- package/dist/server/server.mjs +3 -3
- package/dist/server/{siteChromeOverlayClearance-DLROm32h.mjs → siteChromeOverlayClearance-BangtD8A.mjs} +126 -1
- package/dist/server/{src-BZb5L4Fa.mjs → src-B935_bzN.mjs} +300 -2
- package/dist/server/theme-bridge.mjs +1 -1
- package/dist/server/{themeAdmission-x3uhdOWx.mjs → themeAdmission-D2-BnmDO.mjs} +314 -125
- package/dist/server/{validation-Ban_hxJG.mjs → validation-Cm41pDUB.mjs} +2 -2
- package/dist/server/{version-bkGVuskm.mjs → version-Bo9C3McI.mjs} +1 -1
- package/dist/styles/index.css +282 -0
- package/package.json +1 -1
- package/dist/server/loadPage-CvyKRtXK.mjs +0 -2
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { i as ThemedButtonLink, rr as textColorStyle } from "./ThemedButton-DVBC_pS9.mjs";
|
|
3
|
+
import { St as toScheduledBookingDateTime, _t as parseLocalScheduleTime, ft as formatBookingCompactEnglishTime } from "./noop-DMFt3KdC.mjs";
|
|
4
|
+
import { dn as parseWeeklyOpeningHours } from "./shop.interactive-DBMeM8VD.mjs";
|
|
3
5
|
import "react";
|
|
4
6
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
5
7
|
//#region ../core/src/location.ts
|
|
@@ -19,6 +21,49 @@ function toLocationCoordinates(value) {
|
|
|
19
21
|
};
|
|
20
22
|
}
|
|
21
23
|
//#endregion
|
|
24
|
+
//#region ../core/src/opening-hours.ts
|
|
25
|
+
const openingHoursWeekdayLabels = {
|
|
26
|
+
monday: "Monday",
|
|
27
|
+
tuesday: "Tuesday",
|
|
28
|
+
wednesday: "Wednesday",
|
|
29
|
+
thursday: "Thursday",
|
|
30
|
+
friday: "Friday",
|
|
31
|
+
saturday: "Saturday",
|
|
32
|
+
sunday: "Sunday"
|
|
33
|
+
};
|
|
34
|
+
function formatOpeningHoursTime(value) {
|
|
35
|
+
const time = parseLocalScheduleTime(value);
|
|
36
|
+
return formatBookingCompactEnglishTime(toScheduledBookingDateTime({
|
|
37
|
+
startsAt: new Date(Date.UTC(2e3, 0, 1, time.hour, time.minute)).toISOString(),
|
|
38
|
+
timeZone: "UTC",
|
|
39
|
+
locale: "en-GB"
|
|
40
|
+
}));
|
|
41
|
+
}
|
|
42
|
+
function formatDayHours(day) {
|
|
43
|
+
return day.kind === "closed" ? "Closed" : day.intervals.map((interval) => `${formatOpeningHoursTime(interval.opensAt)} to ${formatOpeningHoursTime(interval.closesAt)}`).join(", ");
|
|
44
|
+
}
|
|
45
|
+
function weekdayRangeLabel(weekdays) {
|
|
46
|
+
const first = weekdays[0];
|
|
47
|
+
const last = weekdays[weekdays.length - 1];
|
|
48
|
+
if (!first || !last) return "";
|
|
49
|
+
return first === last ? openingHoursWeekdayLabels[first] : `${openingHoursWeekdayLabels[first]} to ${openingHoursWeekdayLabels[last]}`;
|
|
50
|
+
}
|
|
51
|
+
/** Monday-first table rows; only adjacent days with identical ranges are grouped. */
|
|
52
|
+
function formatOpeningHoursRows(hours) {
|
|
53
|
+
return (hours?.days ?? []).reduce((rows, day) => {
|
|
54
|
+
const text = formatDayHours(day);
|
|
55
|
+
const previous = rows[rows.length - 1];
|
|
56
|
+
const weekdays = previous?.kind === day.kind && previous.hours === text ? [...previous.weekdays, day.weekday] : [day.weekday];
|
|
57
|
+
const row = {
|
|
58
|
+
kind: day.kind,
|
|
59
|
+
weekdays,
|
|
60
|
+
label: weekdayRangeLabel(weekdays),
|
|
61
|
+
hours: text
|
|
62
|
+
};
|
|
63
|
+
return weekdays.length > 1 ? [...rows.slice(0, -1), row] : [...rows, row];
|
|
64
|
+
}, []);
|
|
65
|
+
}
|
|
66
|
+
//#endregion
|
|
22
67
|
//#region ../blocks/src/system/runtime/nodes/location-map.shared.ts
|
|
23
68
|
const LOCATION_MAP_DEFAULTS = {
|
|
24
69
|
zoom: 15,
|
|
@@ -128,6 +173,7 @@ function describeUnresolvedLocationMapLocation(resolvedLocation) {
|
|
|
128
173
|
}
|
|
129
174
|
}
|
|
130
175
|
function normalizeLocationMapProps(input) {
|
|
176
|
+
const parsedHours = parseWeeklyOpeningHours(input.openingHours);
|
|
131
177
|
const resolvedLocation = resolveLocationMapLocation(input);
|
|
132
178
|
const locationValue = resolvedLocation.kind === "unresolved" ? null : resolvedLocation.locationValue;
|
|
133
179
|
const directionsLabel = normalizeLocationAddressText(input.directionsLabel) ?? LOCATION_MAP_DEFAULTS.directionsLabel;
|
|
@@ -139,6 +185,8 @@ function normalizeLocationMapProps(input) {
|
|
|
139
185
|
location: toLocationCoordinates(locationValue),
|
|
140
186
|
zoom: Math.min(LOCATION_MAP_LIMITS.zoom.max, Math.max(LOCATION_MAP_LIMITS.zoom.min, Math.round(normalizeNumber(input.zoom, LOCATION_MAP_DEFAULTS.zoom)))),
|
|
141
187
|
heightPx: Math.min(LOCATION_MAP_LIMITS.heightPx.max, Math.max(LOCATION_MAP_LIMITS.heightPx.min, Math.round(normalizeNumber(input.heightPx, LOCATION_MAP_DEFAULTS.heightPx)))),
|
|
188
|
+
openingHours: parsedHours.ok ? parsedHours.value : null,
|
|
189
|
+
showOpeningHours: normalizeBoolean(input.showOpeningHours, true),
|
|
142
190
|
showAddressText: normalizeBoolean(input.showAddressText, LOCATION_MAP_DEFAULTS.showAddressText),
|
|
143
191
|
showDirections: normalizeBoolean(input.showDirections, LOCATION_MAP_DEFAULTS.showDirections),
|
|
144
192
|
directionsLabel,
|
|
@@ -151,6 +199,8 @@ function toLocationMapHydrationProps(input) {
|
|
|
151
199
|
location: normalized.locationValue,
|
|
152
200
|
zoom: normalized.zoom,
|
|
153
201
|
heightPx: normalized.heightPx,
|
|
202
|
+
openingHours: normalized.openingHours,
|
|
203
|
+
showOpeningHours: normalized.showOpeningHours,
|
|
154
204
|
showAddressText: normalized.showAddressText,
|
|
155
205
|
showDirections: normalized.showDirections,
|
|
156
206
|
directionsLabel: normalized.directionsLabel,
|
|
@@ -167,15 +217,43 @@ function buildGoogleMapsDirectionsUrl(input) {
|
|
|
167
217
|
}
|
|
168
218
|
//#endregion
|
|
169
219
|
//#region ../blocks/src/system/runtime/nodes/location-map.view.tsx
|
|
170
|
-
function
|
|
171
|
-
|
|
220
|
+
function OpeningHoursTable({ hours }) {
|
|
221
|
+
if (!hours) return null;
|
|
222
|
+
return /* @__PURE__ */ jsxs("div", { children: [/* @__PURE__ */ jsxs("table", { children: [/* @__PURE__ */ jsx("caption", { children: "Opening hours" }), /* @__PURE__ */ jsx("tbody", { children: formatOpeningHoursRows(hours).map((row) => /* @__PURE__ */ jsxs("tr", {
|
|
223
|
+
"data-closed": row.kind === "closed" ? true : void 0,
|
|
224
|
+
children: [/* @__PURE__ */ jsx("th", {
|
|
225
|
+
scope: "row",
|
|
226
|
+
children: row.label
|
|
227
|
+
}), /* @__PURE__ */ jsx("td", { children: row.hours })]
|
|
228
|
+
}, row.label)) })] }), hours.note ? /* @__PURE__ */ jsx("p", { children: hours.note }) : null] });
|
|
229
|
+
}
|
|
230
|
+
function LocationMapDirections({ url, label }) {
|
|
231
|
+
return url ? /* @__PURE__ */ jsx(ThemedButtonLink, {
|
|
232
|
+
href: url,
|
|
233
|
+
target: "_blank",
|
|
234
|
+
rel: "noreferrer",
|
|
235
|
+
variant: "ghost",
|
|
236
|
+
size: "sm",
|
|
237
|
+
extraClassName: "rb-w-fit",
|
|
238
|
+
label
|
|
239
|
+
}) : null;
|
|
240
|
+
}
|
|
241
|
+
function LocationMapView(props) {
|
|
242
|
+
const { addressText, location, renderMap, zoom, heightPx, showAddressText, directionsLabel } = props;
|
|
243
|
+
const directionsUrl = props.showDirections ? buildGoogleMapsDirectionsUrl({
|
|
172
244
|
addressText,
|
|
173
245
|
location
|
|
174
|
-
});
|
|
175
|
-
|
|
246
|
+
}) : null;
|
|
247
|
+
const hours = props.showOpeningHours === false ? null : props.openingHours ?? null;
|
|
248
|
+
if (![
|
|
249
|
+
location,
|
|
250
|
+
addressText,
|
|
251
|
+
directionsUrl,
|
|
252
|
+
hours
|
|
253
|
+
].some(Boolean)) return /* @__PURE__ */ jsx("p", {
|
|
176
254
|
className: "rb-caption",
|
|
177
255
|
style: textColorStyle("mutedText"),
|
|
178
|
-
children: unresolvedMessage ?? "Location details coming soon."
|
|
256
|
+
children: props.unresolvedMessage ?? "Location details coming soon."
|
|
179
257
|
});
|
|
180
258
|
return /* @__PURE__ */ jsxs("div", {
|
|
181
259
|
className: "rb-flex rb-flex-col rb-gap-4 rb-text-left",
|
|
@@ -192,15 +270,11 @@ function LocationMapView({ addressText, location, zoom, heightPx, showAddressTex
|
|
|
192
270
|
style: textColorStyle("mutedText"),
|
|
193
271
|
children: addressText
|
|
194
272
|
}) : null,
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
rel: "noreferrer",
|
|
199
|
-
variant: "ghost",
|
|
200
|
-
size: "sm",
|
|
201
|
-
extraClassName: "rb-w-fit",
|
|
273
|
+
/* @__PURE__ */ jsx(OpeningHoursTable, { hours }),
|
|
274
|
+
/* @__PURE__ */ jsx(LocationMapDirections, {
|
|
275
|
+
url: directionsUrl,
|
|
202
276
|
label: directionsLabel
|
|
203
|
-
})
|
|
277
|
+
})
|
|
204
278
|
]
|
|
205
279
|
});
|
|
206
280
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { t as defineIslandPropsDecoder } from "./propsDecoder-
|
|
3
|
-
import { t as LocationMapIslandClient } from "./location-map.client-
|
|
2
|
+
import { t as defineIslandPropsDecoder } from "./propsDecoder-CTzHkEkh.mjs";
|
|
3
|
+
import { t as LocationMapIslandClient } from "./location-map.client-upKuwABk.mjs";
|
|
4
4
|
import { t as mountReactIsland } from "./reactMount-BGJVsHRb.mjs";
|
|
5
5
|
import "react";
|
|
6
6
|
import { jsx } from "react/jsx-runtime";
|
package/dist/client/{newsletter-form.client-BkHhqPBi.mjs → newsletter-form.client-DBTU3oNv.mjs}
RENAMED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { S as clsx } from "./ThemedButton-DVBC_pS9.mjs";
|
|
3
|
-
import { Ar as listLookSlot,
|
|
4
|
-
import { I as newsletterBlockSubmissionMessage, P as NEWSLETTER_SIGNUPS_PAUSED_MESSAGE, cn as parseMailingListVisitorSelection } from "./shop.interactive-
|
|
3
|
+
import { Ar as listLookSlot, Ki as assertNever } from "./wizardSteps-HdyGoIG3.mjs";
|
|
4
|
+
import { I as newsletterBlockSubmissionMessage, P as NEWSLETTER_SIGNUPS_PAUSED_MESSAGE, cn as parseMailingListVisitorSelection } from "./shop.interactive-DBMeM8VD.mjs";
|
|
5
5
|
import { t as assertNever$1 } from "./src-7cXhT0G_.mjs";
|
|
6
6
|
import { t as FeedbackMessage } from "./FeedbackMessage-CSJrAuXH.mjs";
|
|
7
|
-
import { a as partitionNewsletterFields, i as TOPIC_CHOICE_FIELD_ID, n as NewsletterSubmitRow, r as NewsletterTopicChips, t as NewsletterExtraField } from "./newsletter-form.parts-
|
|
8
|
-
import { n as useBlockApi, r as BlockApiError } from "./context-
|
|
7
|
+
import { a as partitionNewsletterFields, i as TOPIC_CHOICE_FIELD_ID, n as NewsletterSubmitRow, r as NewsletterTopicChips, t as NewsletterExtraField } from "./newsletter-form.parts-C9I9JBhe.mjs";
|
|
8
|
+
import { n as useBlockApi, r as BlockApiError } from "./context-CVsgML69.mjs";
|
|
9
9
|
import { i as AltchaWidget, r as isSpamProtectionEnabled, t as getChallengeUrl } from "./src-BNZzXgWu.mjs";
|
|
10
10
|
import { t as MAILING_LIST_CONFIRMATION_MESSAGE } from "./mailingListSignupCopy-CX4sDozG.mjs";
|
|
11
11
|
import { useEffect, useReducer, useRef, useState } from "react";
|
package/dist/client/{newsletter-form.parts-VGjM-NDG.mjs → newsletter-form.parts-C9I9JBhe.mjs}
RENAMED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { r as ThemedButton } from "./ThemedButton-DVBC_pS9.mjs";
|
|
3
|
-
import { Ar as listLookSlot } from "./wizardSteps-
|
|
3
|
+
import { Ar as listLookSlot } from "./wizardSteps-HdyGoIG3.mjs";
|
|
4
4
|
import { n as getFieldValidationControlProps, t as FieldValidationMessage } from "./FieldValidationMessage-CsqxShw4.mjs";
|
|
5
5
|
import "react";
|
|
6
6
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { t as defineIslandPropsDecoder } from "./propsDecoder-
|
|
3
|
-
import { t as BlockApiProvider } from "./context-
|
|
4
|
-
import { t as NewsletterFormClient } from "./newsletter-form.client-
|
|
2
|
+
import { t as defineIslandPropsDecoder } from "./propsDecoder-CTzHkEkh.mjs";
|
|
3
|
+
import { t as BlockApiProvider } from "./context-CVsgML69.mjs";
|
|
4
|
+
import { t as NewsletterFormClient } from "./newsletter-form.client-DBTU3oNv.mjs";
|
|
5
5
|
import { t as mountReactIsland } from "./reactMount-BGJVsHRb.mjs";
|
|
6
6
|
import "react";
|
|
7
7
|
import { jsx } from "react/jsx-runtime";
|
|
@@ -66,15 +66,7 @@ function parseBookingTimeZone(timeZone) {
|
|
|
66
66
|
}
|
|
67
67
|
//#endregion
|
|
68
68
|
//#region ../core/src/booking-date-time.ts
|
|
69
|
-
const DEFAULT_LOCALE = "en-US";
|
|
70
69
|
const FALLBACK_TIMEZONE = "UTC";
|
|
71
|
-
const DEFAULT_BOOKING_DATE_TIME_FORMAT = {
|
|
72
|
-
weekday: "short",
|
|
73
|
-
month: "short",
|
|
74
|
-
day: "numeric",
|
|
75
|
-
hour: "numeric",
|
|
76
|
-
minute: "2-digit"
|
|
77
|
-
};
|
|
78
70
|
const START_OF_DAY = {
|
|
79
71
|
hour: 0,
|
|
80
72
|
minute: 0,
|
|
@@ -182,68 +174,11 @@ function parseScheduledBookingDateTime(input) {
|
|
|
182
174
|
}
|
|
183
175
|
};
|
|
184
176
|
}
|
|
185
|
-
function parseScheduledBookingDateRange(input) {
|
|
186
|
-
const start = parseScheduledBookingDateTime(input);
|
|
187
|
-
if (!start.ok) return start;
|
|
188
|
-
if (input.endsAt == null) return {
|
|
189
|
-
ok: true,
|
|
190
|
-
value: start.value
|
|
191
|
-
};
|
|
192
|
-
try {
|
|
193
|
-
return {
|
|
194
|
-
ok: true,
|
|
195
|
-
value: {
|
|
196
|
-
...start.value,
|
|
197
|
-
endsAt: toUtcIsoDateTimeString(input.endsAt)
|
|
198
|
-
}
|
|
199
|
-
};
|
|
200
|
-
} catch {
|
|
201
|
-
return {
|
|
202
|
-
ok: false,
|
|
203
|
-
field: "endsAt",
|
|
204
|
-
reason: "invalid_ends_at",
|
|
205
|
-
value: input.endsAt
|
|
206
|
-
};
|
|
207
|
-
}
|
|
208
|
-
}
|
|
209
177
|
function toScheduledBookingDateTime(input) {
|
|
210
178
|
const result = parseScheduledBookingDateTime(input);
|
|
211
179
|
if (result.ok) return result.value;
|
|
212
180
|
throw new Error(formatParseError(result));
|
|
213
181
|
}
|
|
214
|
-
function toScheduledBookingDateRange(input) {
|
|
215
|
-
const result = parseScheduledBookingDateRange(input);
|
|
216
|
-
if (result.ok) return result.value;
|
|
217
|
-
throw new Error(formatParseError(result));
|
|
218
|
-
}
|
|
219
|
-
function formatBookingInstant(isoString, options) {
|
|
220
|
-
const date = new Date(isoString);
|
|
221
|
-
if (Number.isNaN(date.getTime())) return isoString;
|
|
222
|
-
return getDateTimeFormatter(options.locale ?? DEFAULT_LOCALE, getSafeTimeZone(options.timeZone), options.format).format(date);
|
|
223
|
-
}
|
|
224
|
-
function formatBookingDate(input, format = {
|
|
225
|
-
weekday: "long",
|
|
226
|
-
year: "numeric",
|
|
227
|
-
month: "long",
|
|
228
|
-
day: "numeric"
|
|
229
|
-
}) {
|
|
230
|
-
return formatBookingInstant(input.startsAt, {
|
|
231
|
-
locale: input.locale,
|
|
232
|
-
timeZone: input.timeZone,
|
|
233
|
-
format
|
|
234
|
-
});
|
|
235
|
-
}
|
|
236
|
-
function formatBookingTime(input, format = {
|
|
237
|
-
hour: "numeric",
|
|
238
|
-
minute: "2-digit",
|
|
239
|
-
hourCycle: "h12"
|
|
240
|
-
}) {
|
|
241
|
-
return formatBookingInstant(input.startsAt, {
|
|
242
|
-
locale: input.locale,
|
|
243
|
-
timeZone: input.timeZone,
|
|
244
|
-
format
|
|
245
|
-
});
|
|
246
|
-
}
|
|
247
182
|
/**
|
|
248
183
|
* Formats the compact English event-time presentation used by public surfaces.
|
|
249
184
|
*
|
|
@@ -272,33 +207,6 @@ function compactEnglishClock(parts, seconds) {
|
|
|
272
207
|
if (seconds === "include") return second === void 0 ? null : `${hour}:${minute}:${second}${token}`;
|
|
273
208
|
return `${minute === "00" ? hour : `${hour}:${minute}`}${token}`;
|
|
274
209
|
}
|
|
275
|
-
function formatBookingDateTime(input, format = DEFAULT_BOOKING_DATE_TIME_FORMAT) {
|
|
276
|
-
if (format === DEFAULT_BOOKING_DATE_TIME_FORMAT) return `${formatBookingDate(input, {
|
|
277
|
-
weekday: "short",
|
|
278
|
-
month: "short",
|
|
279
|
-
day: "numeric"
|
|
280
|
-
})}, ${formatBookingTime(input)}`;
|
|
281
|
-
return formatBookingInstant(input.startsAt, {
|
|
282
|
-
locale: input.locale,
|
|
283
|
-
timeZone: input.timeZone,
|
|
284
|
-
format
|
|
285
|
-
});
|
|
286
|
-
}
|
|
287
|
-
function formatBookingDateParts(input, options) {
|
|
288
|
-
return {
|
|
289
|
-
date: formatBookingDate(input, options?.dateFormat ?? {
|
|
290
|
-
weekday: "short",
|
|
291
|
-
month: "short",
|
|
292
|
-
day: "numeric",
|
|
293
|
-
year: "numeric"
|
|
294
|
-
}),
|
|
295
|
-
time: formatBookingTime(input, options?.timeFormat ?? {
|
|
296
|
-
hour: "numeric",
|
|
297
|
-
minute: "2-digit",
|
|
298
|
-
hourCycle: "h12"
|
|
299
|
-
})
|
|
300
|
-
};
|
|
301
|
-
}
|
|
302
210
|
function getBookingLocalDateKey(input) {
|
|
303
211
|
return formatDateKey(getLocalScheduleDate(new Date(input.startsAt), input.timeZone));
|
|
304
212
|
}
|
|
@@ -366,31 +274,18 @@ function buildBookingUtcDateWindow(input) {
|
|
|
366
274
|
if (result.reason === "invalid_date_range") throw new Error(`Invalid booking date range: startDate "${input.startDate}" must be on or before endDate "${input.endDate}"`);
|
|
367
275
|
throw new Error(`Invalid booking date format: "${result.value}" (expected YYYY-MM-DD)`);
|
|
368
276
|
}
|
|
369
|
-
function
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
const
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
const startDate = formatBookingDate(input, options?.dateFormat ?? {
|
|
382
|
-
month: "short",
|
|
383
|
-
day: "numeric",
|
|
384
|
-
year: "numeric"
|
|
385
|
-
});
|
|
386
|
-
const startTime = formatBookingTime(input, options?.timeFormat);
|
|
387
|
-
const endTime = formatBookingTime(endDateTime, options?.timeFormat);
|
|
388
|
-
if (startKey === endKey) return `${startDate}, ${startTime} - ${endTime}`;
|
|
389
|
-
return `${startDate}, ${startTime} - ${formatBookingDate(endDateTime, options?.dateFormat ?? {
|
|
390
|
-
month: "short",
|
|
391
|
-
day: "numeric",
|
|
392
|
-
year: "numeric"
|
|
393
|
-
})}, ${endTime}`;
|
|
277
|
+
function parseLocalScheduleTime(value) {
|
|
278
|
+
const match = /^(?<hour>\d{1,2}):(?<minute>\d{2})(?::(?<second>\d{2}))?$/u.exec(value.trim());
|
|
279
|
+
if (match === null || match.groups === void 0) throw new Error(`Invalid start time format: "${value}" (expected HH:MM or HH:MM:SS)`);
|
|
280
|
+
const hour = Number(match.groups.hour);
|
|
281
|
+
const minute = Number(match.groups.minute);
|
|
282
|
+
const second = match.groups.second !== void 0 ? Number(match.groups.second) : 0;
|
|
283
|
+
if (Number.isNaN(hour) || Number.isNaN(minute) || Number.isNaN(second) || hour < 0 || hour > 23 || minute < 0 || minute > 59 || second < 0 || second > 59) throw new Error(`Invalid start time format: "${value}" (expected HH:MM or HH:MM:SS)`);
|
|
284
|
+
return {
|
|
285
|
+
hour,
|
|
286
|
+
minute,
|
|
287
|
+
second
|
|
288
|
+
};
|
|
394
289
|
}
|
|
395
290
|
function getLocalScheduleDate(date, timeZone) {
|
|
396
291
|
const parts = getZonedDateTimeParts(date, getSafeTimeZone(timeZone));
|
|
@@ -468,19 +363,19 @@ function formatDateRange(start, endInclusive, context, options = {}) {
|
|
|
468
363
|
return preserveOrder ? `${presentDate(first, context, profile)} – ${presentDate(last, context, profile)}` : presentDateRange(first, last, context, profile);
|
|
469
364
|
}
|
|
470
365
|
function formatDateTime(value, context, options) {
|
|
471
|
-
return presentDateTime(value, context, displayProfile(options, options.zone, options.
|
|
366
|
+
return presentDateTime(value, context, displayProfile(options, options.zone, options.seconds));
|
|
472
367
|
}
|
|
473
368
|
function formatDateTimeRange(span, context, options) {
|
|
474
|
-
return presentDateTimeRange(span, context, displayProfile(options, options.zone, options.
|
|
369
|
+
return presentDateTimeRange(span, context, displayProfile(options, options.zone, options.seconds));
|
|
475
370
|
}
|
|
476
371
|
function formatTime(value, context, options) {
|
|
477
|
-
return presentTime(value, context, displayProfile({}, options.zone, options.
|
|
372
|
+
return presentTime(value, context, displayProfile({}, options.zone, options.seconds));
|
|
478
373
|
}
|
|
479
374
|
function formatTimeRange(start, end, context, options) {
|
|
480
375
|
return presentTimeRange({
|
|
481
376
|
start,
|
|
482
377
|
end
|
|
483
|
-
}, context, displayProfile({}, options.zone, options.
|
|
378
|
+
}, context, displayProfile({}, options.zone, options.seconds));
|
|
484
379
|
}
|
|
485
380
|
/** Sole date projection/typography owner, used by display and scheduled adapters. */
|
|
486
381
|
function presentDate(value, context, profile) {
|
|
@@ -578,19 +473,11 @@ function combinedFormat(date, clock) {
|
|
|
578
473
|
...clock.format
|
|
579
474
|
};
|
|
580
475
|
}
|
|
581
|
-
function displayProfile(options, zone,
|
|
476
|
+
function displayProfile(options, zone, seconds) {
|
|
582
477
|
return {
|
|
583
478
|
kind: "display",
|
|
584
479
|
dateFormat: dateFormat(options),
|
|
585
|
-
clock:
|
|
586
|
-
kind: "intl",
|
|
587
|
-
format: {
|
|
588
|
-
hour: "2-digit",
|
|
589
|
-
minute: "2-digit",
|
|
590
|
-
...seconds === "include" ? { second: "2-digit" } : {},
|
|
591
|
-
hourCycle: "h23"
|
|
592
|
-
}
|
|
593
|
-
} : {
|
|
480
|
+
clock: {
|
|
594
481
|
kind: "compact",
|
|
595
482
|
localeSource: "product",
|
|
596
483
|
seconds
|
|
@@ -1779,4 +1666,4 @@ const logger = {
|
|
|
1779
1666
|
withFields: (_) => logger
|
|
1780
1667
|
};
|
|
1781
1668
|
//#endregion
|
|
1782
|
-
export { isRecord as $, eventScheduleScopeValues as A, normalizeIdList as B, eventCalendarVariantMeaning as C,
|
|
1669
|
+
export { isRecord as $, eventScheduleScopeValues as A, normalizeIdList as B, eventCalendarVariantMeaning as C, toUtcIsoDateTimeString as Ct, isEventCalendarListLayout as D, isEventCalendarDisplayMode as E, normalizeEventStaffMemberId as F, blockBookingConsentSchema as G, publicEventLoaderQuerySchemaShape as H, normalizeEventSurfacePresets as I, toBookingRequirementConsentField as J, bookingConsentCarrierSchema as K, normalizeEventSurfacePresetsCsv as L, normalizeEventCategoryIds as M, normalizeEventCategoryIdsCsv as N, normalizeEventCalendarDisplayMode as O, normalizeEventScheduleScope as P, isObjectRecord as Q, normalizeEventSurfaceScope as R, eventCalendarListLayoutValues as S, toScheduledBookingDateTime as St, isEventCalendarDefaultView as T, publicEventSchema as U, publicEventDestinationSchema as V, publicEventsArraySchema as W, RichTextDocSchema as X, blockBookingPaymentTermsSchema as Y, isRichTextDoc as Z, eventCalendarDefaultViewValues as _, parseLocalScheduleTime as _t, eventCheckoutReturnResponseSchema as a, formatTime as at, eventCalendarListLayoutCompatibleDisplayModeValues as b, resolveBookingTimeZoneId as bt, calendarMonthKey as c, resolveBookingDisplayContext as ct, calendarWindowBounds as d, compareLocalScheduleDates as dt, WHOLE_SERIES_EVENT_PRESET_VALUES as et, calendarWindowMonths as f, formatBookingCompactEnglishTime as ft, resolveCalendarReadProfile as g, parseBookingLocalDate as gt, planCalendarMonthRanges as h, getLocalScheduleDate as ht, eventCheckoutResponseSchema as i, formatDateTimeRange as it, eventSurfaceScopeValues as j, resolveEventCalendarReadPlan as k, calendarPageResponseError as l, addLocalScheduleDays as lt, calendarWindowQuerySchema as m, getBookingLocalDateKey as mt, blockSiteTermsSchema as n, formatDateRange as nt, eventRegisterResponseSchema as o, formatTimeRange as ot, calendarWindowPageSchema as p, formatLocalScheduleDate as pt, isBookingRequirementConsentFieldId as q, verifiedSiteTermsAcceptanceSchema as r, formatDateTime as rt, calendarMonthDate as s, inferSiteDateLocale as st, logger as t, formatDate as tt, calendarQueryKey as u, buildBookingUtcDateWindow as ut, eventCalendarDisplayModeValues as v, parseUtcIsoDateTimeString as vt, eventListArrangementValues as w, eventCalendarListLayoutOptions as x, toBookingTimeZone as xt, eventCalendarListGroupingDecision as y, resolveBookingBusinessTimeZone as yt, normalizeEventVenueId as z };
|