@flamingo-stack/openframe-frontend-core 0.0.671 → 0.0.672-snapshot.20260928032919
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/chat-protocol/card-marker.d.ts +12 -0
- package/dist/chat-protocol/card-marker.d.ts.map +1 -1
- package/dist/chat-protocol/index.cjs +17 -0
- package/dist/chat-protocol/index.cjs.map +1 -1
- package/dist/chat-protocol/index.d.ts +1 -0
- package/dist/chat-protocol/index.d.ts.map +1 -1
- package/dist/chat-protocol/index.js +15 -1
- package/dist/chat-protocol/index.js.map +1 -1
- package/dist/{chunk-4PVY4JJN.js → chunk-2TQ64TG3.js} +3 -3
- package/dist/{chunk-FAJUQKWQ.cjs → chunk-3EIB5PNM.cjs} +76 -75
- package/dist/chunk-3EIB5PNM.cjs.map +1 -0
- package/dist/{chunk-FUXUJSPP.cjs → chunk-3UDBK2YG.cjs} +1 -1
- package/dist/chunk-3UDBK2YG.cjs.map +1 -0
- package/dist/{chunk-G64BNLDO.js → chunk-3X6WFYSV.js} +2 -2
- package/dist/{chunk-DUZEFACP.js → chunk-4UAIOXYC.js} +3 -3
- package/dist/{chunk-SNNE34OP.js → chunk-5KD5SSP6.js} +5 -5
- package/dist/{chunk-RKUCK6MN.js → chunk-6NGIPAQ6.js} +2 -2
- package/dist/{chunk-OG2BNJ2Q.cjs → chunk-6PPEG2N4.cjs} +389 -375
- package/dist/chunk-6PPEG2N4.cjs.map +1 -0
- package/dist/{chunk-NIYIK32F.js → chunk-6ZX6TFSS.js} +18 -4
- package/dist/{chunk-NIYIK32F.js.map → chunk-6ZX6TFSS.js.map} +1 -1
- package/dist/{chunk-6C6UUOH4.js → chunk-A77HP3N6.js} +8 -7
- package/dist/{chunk-6C6UUOH4.js.map → chunk-A77HP3N6.js.map} +1 -1
- package/dist/{chunk-YNGAJGYB.cjs → chunk-AXMNWMAU.cjs} +340 -6
- package/dist/chunk-AXMNWMAU.cjs.map +1 -0
- package/dist/{chunk-PLG6LP7E.cjs → chunk-BAEHCDPI.cjs} +49 -49
- package/dist/{chunk-PLG6LP7E.cjs.map → chunk-BAEHCDPI.cjs.map} +1 -1
- package/dist/{chunk-R22IA7MP.js → chunk-BBDEIE56.js} +4 -4
- package/dist/{chunk-PQ7YC5Y6.js → chunk-D5HO3RNF.js} +3 -3
- package/dist/{chunk-II66XWU5.cjs → chunk-D6IOMPAH.cjs} +3 -3
- package/dist/{chunk-II66XWU5.cjs.map → chunk-D6IOMPAH.cjs.map} +1 -1
- package/dist/{chunk-DAGKBFZN.cjs → chunk-EQIBWG5U.cjs} +33 -33
- package/dist/{chunk-DAGKBFZN.cjs.map → chunk-EQIBWG5U.cjs.map} +1 -1
- package/dist/{chunk-3PVOF3IB.js → chunk-EVB3EO5S.js} +337 -3
- package/dist/{chunk-3PVOF3IB.js.map → chunk-EVB3EO5S.js.map} +1 -1
- package/dist/{chunk-SJZPKIW6.cjs → chunk-G64BDYU5.cjs} +12 -12
- package/dist/{chunk-SJZPKIW6.cjs.map → chunk-G64BDYU5.cjs.map} +1 -1
- package/dist/{chunk-BP542DGQ.cjs → chunk-GLPGYU6H.cjs} +55 -28
- package/dist/chunk-GLPGYU6H.cjs.map +1 -0
- package/dist/{chunk-TLLTL6LB.js → chunk-JD4U7QMG.js} +1 -1
- package/dist/chunk-JD4U7QMG.js.map +1 -0
- package/dist/{chunk-ZRIVCLPR.js → chunk-JD5TKRCU.js} +1 -1
- package/dist/chunk-JD5TKRCU.js.map +1 -0
- package/dist/{chunk-YJWR7D6O.cjs → chunk-JKIM7U7N.cjs} +3 -3
- package/dist/{chunk-YJWR7D6O.cjs.map → chunk-JKIM7U7N.cjs.map} +1 -1
- package/dist/{chunk-K3O4D7LW.js → chunk-KUASHD7Z.js} +4 -4
- package/dist/{chunk-GF5TSQ6C.cjs → chunk-KXL534EV.cjs} +10 -10
- package/dist/{chunk-GF5TSQ6C.cjs.map → chunk-KXL534EV.cjs.map} +1 -1
- package/dist/{chunk-FHTNCWIP.js → chunk-KYVFU7VQ.js} +5 -5
- package/dist/{chunk-OYMOG544.js → chunk-KZAT6VWE.js} +5 -5
- package/dist/{chunk-D55IENZJ.cjs → chunk-LCMT2GZK.cjs} +1 -1
- package/dist/chunk-LCMT2GZK.cjs.map +1 -0
- package/dist/{chunk-IJIIL6WU.js → chunk-MVU7HF5A.js} +6 -6
- package/dist/{chunk-XGXHHSDU.cjs → chunk-NYDFVUMH.cjs} +22 -22
- package/dist/{chunk-XGXHHSDU.cjs.map → chunk-NYDFVUMH.cjs.map} +1 -1
- package/dist/{chunk-STLBB6PF.js → chunk-O75Y5O3U.js} +35 -8
- package/dist/chunk-O75Y5O3U.js.map +1 -0
- package/dist/{chunk-DAWYS25M.cjs → chunk-PDNGWDJF.cjs} +17 -17
- package/dist/{chunk-DAWYS25M.cjs.map → chunk-PDNGWDJF.cjs.map} +1 -1
- package/dist/{chunk-T3ACDOVD.cjs → chunk-VRZZCL4R.cjs} +7 -7
- package/dist/{chunk-T3ACDOVD.cjs.map → chunk-VRZZCL4R.cjs.map} +1 -1
- package/dist/{chunk-XH4MRTZM.cjs → chunk-WQFT7GOC.cjs} +5 -5
- package/dist/{chunk-XH4MRTZM.cjs.map → chunk-WQFT7GOC.cjs.map} +1 -1
- package/dist/{chunk-YIDNSRPL.cjs → chunk-XGBFQ3YV.cjs} +31 -31
- package/dist/{chunk-YIDNSRPL.cjs.map → chunk-XGBFQ3YV.cjs.map} +1 -1
- package/dist/{chunk-UH3BL2OT.js → chunk-Y7TZHPS2.js} +2 -2
- package/dist/{chunk-EIAVE6SE.cjs → chunk-YKKW67A3.cjs} +10 -10
- package/dist/{chunk-EIAVE6SE.cjs.map → chunk-YKKW67A3.cjs.map} +1 -1
- package/dist/components/case-studies/index.cjs +18 -17
- package/dist/components/case-studies/index.cjs.map +1 -1
- package/dist/components/case-studies/index.js +7 -6
- package/dist/components/case-studies/index.js.map +1 -1
- package/dist/components/case-studies/share-experience-section.d.ts.map +1 -1
- package/dist/components/chat/index.cjs +2 -2
- package/dist/components/chat/index.js +1 -1
- package/dist/components/contact/contact-form.d.ts +6 -1
- package/dist/components/contact/contact-form.d.ts.map +1 -1
- package/dist/components/contact/index.cjs +6 -6
- package/dist/components/contact/index.js +5 -5
- package/dist/components/docs/index.cjs +9 -9
- package/dist/components/docs/index.js +8 -8
- package/dist/components/embeds/index.cjs +6 -6
- package/dist/components/embeds/index.js +5 -5
- package/dist/components/faq/index.cjs +6 -6
- package/dist/components/faq/index.js +5 -5
- package/dist/components/features/index.cjs +5 -5
- package/dist/components/features/index.js +4 -4
- package/dist/components/features/waitlist-form.d.ts +3 -1
- package/dist/components/features/waitlist-form.d.ts.map +1 -1
- package/dist/components/help-center-pages/index.cjs +77 -76
- package/dist/components/help-center-pages/index.cjs.map +1 -1
- package/dist/components/help-center-pages/index.js +17 -16
- package/dist/components/help-center-pages/index.js.map +1 -1
- package/dist/components/help-center-pages/trust-center-sections.d.ts.map +1 -1
- package/dist/components/index.cjs +43 -43
- package/dist/components/index.js +15 -15
- package/dist/components/meeting-scheduler/booking-form.d.ts +4 -1
- package/dist/components/meeting-scheduler/booking-form.d.ts.map +1 -1
- package/dist/components/meeting-scheduler/index.cjs +73 -39
- package/dist/components/meeting-scheduler/index.cjs.map +1 -1
- package/dist/components/meeting-scheduler/index.d.ts.map +1 -1
- package/dist/components/meeting-scheduler/index.js +44 -10
- package/dist/components/meeting-scheduler/index.js.map +1 -1
- package/dist/components/navigation/index.cjs +8 -8
- package/dist/components/navigation/index.js +7 -7
- package/dist/components/onboarding-guides/index.cjs +8 -8
- package/dist/components/onboarding-guides/index.js +7 -7
- package/dist/components/tickets/help-center-create-form.d.ts.map +1 -1
- package/dist/components/tickets/index.cjs +9 -9
- package/dist/components/tickets/index.js +8 -8
- package/dist/components/ui/index.cjs +5 -5
- package/dist/components/ui/index.js +4 -4
- package/dist/contexts/endpoints-runtime-context.d.ts +5 -0
- package/dist/contexts/endpoints-runtime-context.d.ts.map +1 -1
- package/dist/contexts/index.cjs +2 -2
- package/dist/contexts/index.js +1 -1
- package/dist/hooks/index.cjs +5 -3
- package/dist/hooks/index.cjs.map +1 -1
- package/dist/hooks/index.d.ts +1 -0
- package/dist/hooks/index.d.ts.map +1 -1
- package/dist/hooks/index.js +4 -2
- package/dist/hooks/use-form-rescue.d.ts +37 -0
- package/dist/hooks/use-form-rescue.d.ts.map +1 -0
- package/dist/index.cjs +51 -9
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +50 -8
- package/dist/index.js.map +1 -1
- package/dist/utils/form-rescue.cjs +117 -0
- package/dist/utils/form-rescue.cjs.map +1 -0
- package/dist/utils/form-rescue.d.ts +98 -0
- package/dist/utils/form-rescue.d.ts.map +1 -0
- package/dist/utils/form-rescue.js +96 -0
- package/dist/utils/form-rescue.js.map +1 -0
- package/dist/utils/index.cjs +113 -0
- package/dist/utils/index.cjs.map +1 -1
- package/dist/utils/index.d.ts +1 -0
- package/dist/utils/index.d.ts.map +1 -1
- package/dist/utils/index.js +94 -1
- package/dist/utils/index.js.map +1 -1
- package/package.json +7 -1
- package/src/chat-protocol/__tests__/card-marker.test.ts +27 -1
- package/src/chat-protocol/card-marker.ts +24 -0
- package/src/chat-protocol/index.ts +3 -0
- package/src/components/case-studies/share-experience-section.tsx +1 -0
- package/src/components/contact/contact-form.tsx +38 -2
- package/src/components/features/waitlist-form.tsx +23 -2
- package/src/components/help-center-pages/trust-center-sections.tsx +1 -0
- package/src/components/meeting-scheduler/booking-form.tsx +14 -0
- package/src/components/meeting-scheduler/index.tsx +33 -3
- package/src/components/tickets/help-center-create-form.tsx +2 -0
- package/src/contexts/endpoints-runtime-context.tsx +5 -0
- package/src/hooks/__tests__/use-form-rescue.test.tsx +182 -0
- package/src/hooks/index.ts +3 -0
- package/src/hooks/use-form-rescue.ts +315 -0
- package/src/utils/__tests__/form-rescue.test.ts +106 -0
- package/src/utils/form-rescue.ts +190 -0
- package/src/utils/index.ts +5 -0
- package/dist/chunk-BP542DGQ.cjs.map +0 -1
- package/dist/chunk-D55IENZJ.cjs.map +0 -1
- package/dist/chunk-FAJUQKWQ.cjs.map +0 -1
- package/dist/chunk-FUXUJSPP.cjs.map +0 -1
- package/dist/chunk-OG2BNJ2Q.cjs.map +0 -1
- package/dist/chunk-STLBB6PF.js.map +0 -1
- package/dist/chunk-TLLTL6LB.js.map +0 -1
- package/dist/chunk-YNGAJGYB.cjs.map +0 -1
- package/dist/chunk-ZRIVCLPR.js.map +0 -1
- /package/dist/{chunk-4PVY4JJN.js.map → chunk-2TQ64TG3.js.map} +0 -0
- /package/dist/{chunk-G64BNLDO.js.map → chunk-3X6WFYSV.js.map} +0 -0
- /package/dist/{chunk-DUZEFACP.js.map → chunk-4UAIOXYC.js.map} +0 -0
- /package/dist/{chunk-SNNE34OP.js.map → chunk-5KD5SSP6.js.map} +0 -0
- /package/dist/{chunk-RKUCK6MN.js.map → chunk-6NGIPAQ6.js.map} +0 -0
- /package/dist/{chunk-R22IA7MP.js.map → chunk-BBDEIE56.js.map} +0 -0
- /package/dist/{chunk-PQ7YC5Y6.js.map → chunk-D5HO3RNF.js.map} +0 -0
- /package/dist/{chunk-K3O4D7LW.js.map → chunk-KUASHD7Z.js.map} +0 -0
- /package/dist/{chunk-FHTNCWIP.js.map → chunk-KYVFU7VQ.js.map} +0 -0
- /package/dist/{chunk-OYMOG544.js.map → chunk-KZAT6VWE.js.map} +0 -0
- /package/dist/{chunk-IJIIL6WU.js.map → chunk-MVU7HF5A.js.map} +0 -0
- /package/dist/{chunk-UH3BL2OT.js.map → chunk-Y7TZHPS2.js.map} +0 -0
package/dist/components/index.js
CHANGED
|
@@ -15,7 +15,7 @@ import {
|
|
|
15
15
|
SoftwareInfo,
|
|
16
16
|
SoftwareSourceBadge,
|
|
17
17
|
ToolBadge
|
|
18
|
-
} from "../chunk-
|
|
18
|
+
} from "../chunk-BBDEIE56.js";
|
|
19
19
|
import {
|
|
20
20
|
AppHeader,
|
|
21
21
|
AppLayout,
|
|
@@ -35,7 +35,7 @@ import {
|
|
|
35
35
|
SlidingSidebar,
|
|
36
36
|
TicketAlertsButton,
|
|
37
37
|
TopNavigation
|
|
38
|
-
} from "../chunk-
|
|
38
|
+
} from "../chunk-KYVFU7VQ.js";
|
|
39
39
|
import {
|
|
40
40
|
DeliveryLists,
|
|
41
41
|
DeliveryTable,
|
|
@@ -49,7 +49,7 @@ import {
|
|
|
49
49
|
RoadmapView,
|
|
50
50
|
useLegalDocs,
|
|
51
51
|
useRoadmapVoting
|
|
52
|
-
} from "../chunk-
|
|
52
|
+
} from "../chunk-MVU7HF5A.js";
|
|
53
53
|
import {
|
|
54
54
|
DocNavigationProvider,
|
|
55
55
|
DocViewer,
|
|
@@ -63,12 +63,12 @@ import {
|
|
|
63
63
|
useDocNavigation,
|
|
64
64
|
useDocumentTree,
|
|
65
65
|
useScrollSpy
|
|
66
|
-
} from "../chunk-
|
|
66
|
+
} from "../chunk-KZAT6VWE.js";
|
|
67
67
|
import {
|
|
68
68
|
FileDownloadCard,
|
|
69
69
|
GoogleSheetsViewer,
|
|
70
70
|
PdfViewer
|
|
71
|
-
} from "../chunk-
|
|
71
|
+
} from "../chunk-4UAIOXYC.js";
|
|
72
72
|
import {
|
|
73
73
|
PersistentPagination,
|
|
74
74
|
PersistentPaginationWrapper,
|
|
@@ -78,13 +78,13 @@ import {
|
|
|
78
78
|
FaqAccordion,
|
|
79
79
|
FaqDocumentPage,
|
|
80
80
|
FaqSection
|
|
81
|
-
} from "../chunk-
|
|
81
|
+
} from "../chunk-KUASHD7Z.js";
|
|
82
82
|
import {
|
|
83
83
|
MobileNavigationDropdown,
|
|
84
84
|
MultiLevelNavigation,
|
|
85
85
|
StickySectionNav,
|
|
86
86
|
useSectionNavigation
|
|
87
|
-
} from "../chunk-
|
|
87
|
+
} from "../chunk-Y7TZHPS2.js";
|
|
88
88
|
import {
|
|
89
89
|
DeliveryRow,
|
|
90
90
|
DevCardRowContent,
|
|
@@ -93,16 +93,16 @@ import {
|
|
|
93
93
|
DevSectionPage,
|
|
94
94
|
DevSectionView,
|
|
95
95
|
ListEmptyState
|
|
96
|
-
} from "../chunk-
|
|
96
|
+
} from "../chunk-3X6WFYSV.js";
|
|
97
97
|
import {
|
|
98
98
|
EmptyState,
|
|
99
99
|
UnifiedPagination
|
|
100
100
|
} from "../chunk-5ONM3FHQ.js";
|
|
101
|
-
import "../chunk-
|
|
101
|
+
import "../chunk-2TQ64TG3.js";
|
|
102
102
|
import {
|
|
103
103
|
ArticleAuthorByline,
|
|
104
104
|
DetailPageSkeleton
|
|
105
|
-
} from "../chunk-
|
|
105
|
+
} from "../chunk-6NGIPAQ6.js";
|
|
106
106
|
import {
|
|
107
107
|
DocSearchBar,
|
|
108
108
|
DocSearchResultRow,
|
|
@@ -110,7 +110,7 @@ import {
|
|
|
110
110
|
mapDocSearchResults,
|
|
111
111
|
resolveSearchResultAction,
|
|
112
112
|
useDocSearch
|
|
113
|
-
} from "../chunk-
|
|
113
|
+
} from "../chunk-D5HO3RNF.js";
|
|
114
114
|
import {
|
|
115
115
|
useSelfFetch
|
|
116
116
|
} from "../chunk-KKSSA4CS.js";
|
|
@@ -625,7 +625,7 @@ import {
|
|
|
625
625
|
useTimeTracker,
|
|
626
626
|
useTrackerClock,
|
|
627
627
|
useWalkthroughVideo
|
|
628
|
-
} from "../chunk-
|
|
628
|
+
} from "../chunk-6ZX6TFSS.js";
|
|
629
629
|
import "../chunk-L2SLFCXP.js";
|
|
630
630
|
import "../chunk-BJXDHKUX.js";
|
|
631
631
|
import {
|
|
@@ -638,10 +638,10 @@ import {
|
|
|
638
638
|
showToast,
|
|
639
639
|
useOnboardingState,
|
|
640
640
|
useToast
|
|
641
|
-
} from "../chunk-
|
|
641
|
+
} from "../chunk-EVB3EO5S.js";
|
|
642
642
|
import {
|
|
643
643
|
useEndpointsRuntime
|
|
644
|
-
} from "../chunk-
|
|
644
|
+
} from "../chunk-JD5TKRCU.js";
|
|
645
645
|
import {
|
|
646
646
|
Pagination,
|
|
647
647
|
PaginationContent,
|
|
@@ -1008,7 +1008,7 @@ import {
|
|
|
1008
1008
|
useVideoOriginPreconnect,
|
|
1009
1009
|
useVideoWarmup,
|
|
1010
1010
|
usesCanonicalStatusStyle
|
|
1011
|
-
} from "../chunk-
|
|
1011
|
+
} from "../chunk-JD4U7QMG.js";
|
|
1012
1012
|
import {
|
|
1013
1013
|
errorMessage,
|
|
1014
1014
|
scrollElementIntoView
|
|
@@ -85,6 +85,9 @@ export interface BookingFormProps {
|
|
|
85
85
|
name: string;
|
|
86
86
|
};
|
|
87
87
|
getSignals: () => Record<string, string | number>;
|
|
88
|
+
/** Called on every edit with the answers flattened (declared questions beside
|
|
89
|
+
* the built-ins) and the edited field's name — the parent's form rescue. */
|
|
90
|
+
onValuesChange?: (values: Record<string, unknown>, changedField: string | null) => void;
|
|
88
91
|
}
|
|
89
92
|
/**
|
|
90
93
|
* BookingForm — attendee details + the link's declared custom questions +
|
|
@@ -100,7 +103,7 @@ export interface BookingFormProps {
|
|
|
100
103
|
* submit; the parent calls `resetSignals()` after a SLOT_TAKEN refetch so a
|
|
101
104
|
* legitimate retry isn't flagged too-fast.
|
|
102
105
|
*/
|
|
103
|
-
export declare function BookingForm({ availability, meetingId, startTimeMs, durationMs, timezone, deferSlot, initialValues, submitLabel, footerNote, fieldRows, consent, isSubmitting, onSubmit, honeypotInputProps, getSignals, }: BookingFormProps): import("react").JSX.Element;
|
|
106
|
+
export declare function BookingForm({ availability, meetingId, startTimeMs, durationMs, timezone, deferSlot, initialValues, submitLabel, footerNote, fieldRows, consent, isSubmitting, onSubmit, honeypotInputProps, getSignals, onValuesChange, }: BookingFormProps): import("react").JSX.Element;
|
|
104
107
|
/**
|
|
105
108
|
* Cold-start placeholder for `flow="details-first"`, where the FORM is the
|
|
106
109
|
* first thing in the action panel.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"booking-form.d.ts","sourceRoot":"","sources":["../../../src/components/meeting-scheduler/booking-form.tsx"],"names":[],"m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iFAC6E;IAC7E,cAAc,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,YAAY,EAAE,MAAM,GAAG,IAAI,KAAK,IAAI,CAAC;CACzF;AAED;;;;;;;;;;;;;GAaG;AACH,wBAAgB,WAAW,CAAC,EAC1B,YAAY,EACZ,SAAS,EACT,WAAW,EACX,UAAU,EACV,QAAQ,EACR,SAAiB,EACjB,aAAa,EACb,WAAW,EACX,UAAU,EACV,SAAS,EACT,OAAO,EACP,YAAY,EACZ,QAAQ,EACR,kBAAkB,EAClB,UAAU,EACV,cAAc,GACf,EAAE,gBAAgB,+BAiUlB;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,mBAAmB,CAAC,EAClC,SAAS,EACT,OAAO,EACP,UAAU,GACX,EAAE;IACD,SAAS,CAAC,EAAE,eAAe,EAAE,CAAC;IAC9B;;qDAEiD;IACjD,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB,+BA2BA"}
|
|
@@ -24,14 +24,15 @@ var _chunk77BLJHKIcjs = require('../../chunk-77BLJHKI.cjs');
|
|
|
24
24
|
|
|
25
25
|
|
|
26
26
|
|
|
27
|
-
var
|
|
27
|
+
var _chunk6PPEG2N4cjs = require('../../chunk-6PPEG2N4.cjs');
|
|
28
28
|
require('../../chunk-GQWM3ECA.cjs');
|
|
29
29
|
require('../../chunk-TON3YCCW.cjs');
|
|
30
30
|
|
|
31
31
|
|
|
32
32
|
|
|
33
|
-
|
|
34
|
-
require('../../chunk-
|
|
33
|
+
|
|
34
|
+
var _chunkAXMNWMAUcjs = require('../../chunk-AXMNWMAU.cjs');
|
|
35
|
+
require('../../chunk-LCMT2GZK.cjs');
|
|
35
36
|
require('../../chunk-JU6SBF3C.cjs');
|
|
36
37
|
|
|
37
38
|
|
|
@@ -44,7 +45,7 @@ var _chunkVTYP25OWcjs = require('../../chunk-VTYP25OW.cjs');
|
|
|
44
45
|
var _chunkQVSVRG7Icjs = require('../../chunk-QVSVRG7I.cjs');
|
|
45
46
|
|
|
46
47
|
|
|
47
|
-
var
|
|
48
|
+
var _chunk3UDBK2YGcjs = require('../../chunk-3UDBK2YG.cjs');
|
|
48
49
|
require('../../chunk-V2A4MAAL.cjs');
|
|
49
50
|
require('../../chunk-SADRZ4YI.cjs');
|
|
50
51
|
require('../../chunk-5R4QMTML.cjs');
|
|
@@ -341,7 +342,7 @@ function useMeetingBooking(options) {
|
|
|
341
342
|
const seededOffset = _optionalChain([initialAvailability, 'optionalAccess', _5 => _5.meetingId]) === meetingId ? initialAvailability.monthOffset : void 0;
|
|
342
343
|
const [monthOffset, setMonthOffsetState] = _react.useState.call(void 0, _nullishCoalesce(seededOffset, () => ( 0)));
|
|
343
344
|
const setMonthOffset = _react.useCallback.call(void 0, (offset) => {
|
|
344
|
-
setMonthOffsetState(Math.max(0, Math.min(
|
|
345
|
+
setMonthOffsetState(Math.max(0, Math.min(_chunk6PPEG2N4cjs.MAX_MONTH_OFFSET, offset)));
|
|
345
346
|
}, []);
|
|
346
347
|
const prevMeetingIdRef = _react.useRef.call(void 0, meetingId);
|
|
347
348
|
_react.useLayoutEffect.call(void 0, () => {
|
|
@@ -470,7 +471,7 @@ var FIELD_CONTROLS = {
|
|
|
470
471
|
}
|
|
471
472
|
),
|
|
472
473
|
textarea: ({ field, id, registerName, error, register }) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
473
|
-
|
|
474
|
+
_chunk6PPEG2N4cjs.Textarea,
|
|
474
475
|
{
|
|
475
476
|
id,
|
|
476
477
|
required: field.required,
|
|
@@ -522,9 +523,9 @@ var FIELD_CONTROLS = {
|
|
|
522
523
|
{
|
|
523
524
|
control,
|
|
524
525
|
name: registerName,
|
|
525
|
-
render: ({ field: rhf }) => /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
526
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
527
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
526
|
+
render: ({ field: rhf }) => /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunk6PPEG2N4cjs.Select, { value: _nullishCoalesce(rhf.value, () => ( "")), onValueChange: rhf.onChange, children: [
|
|
527
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk6PPEG2N4cjs.SelectTrigger, { id, "aria-required": field.required || void 0, "aria-invalid": Boolean(error), children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk6PPEG2N4cjs.SelectValue, { placeholder: "Select\u2026" }) }),
|
|
528
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk6PPEG2N4cjs.SelectContent, { children: (_nullishCoalesce(field.options, () => ( []))).map((opt) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk6PPEG2N4cjs.SelectItem, { value: opt, children: optionLabel(field, opt) }, opt)) })
|
|
528
529
|
] })
|
|
529
530
|
}
|
|
530
531
|
),
|
|
@@ -534,14 +535,14 @@ var FIELD_CONTROLS = {
|
|
|
534
535
|
control,
|
|
535
536
|
name: registerName,
|
|
536
537
|
render: ({ field: rhf }) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
537
|
-
|
|
538
|
+
_chunk6PPEG2N4cjs.RadioGroup,
|
|
538
539
|
{
|
|
539
540
|
value: _nullishCoalesce(rhf.value, () => ( "")),
|
|
540
541
|
onValueChange: rhf.onChange,
|
|
541
542
|
"aria-required": field.required || void 0,
|
|
542
543
|
"aria-invalid": Boolean(error),
|
|
543
544
|
children: (_nullishCoalesce(field.options, () => ( []))).map((opt) => /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex items-center gap-[var(--spacing-system-xs)]", children: [
|
|
544
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
545
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk6PPEG2N4cjs.RadioGroupItem, { id: `${id}-${opt}`, value: opt }),
|
|
545
546
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkGSD62VAYcjs.Label, { htmlFor: `${id}-${opt}`, children: optionLabel(field, opt) })
|
|
546
547
|
] }, opt))
|
|
547
548
|
}
|
|
@@ -617,7 +618,8 @@ function BookingForm({
|
|
|
617
618
|
isSubmitting,
|
|
618
619
|
onSubmit,
|
|
619
620
|
honeypotInputProps,
|
|
620
|
-
getSignals
|
|
621
|
+
getSignals,
|
|
622
|
+
onValuesChange
|
|
621
623
|
}) {
|
|
622
624
|
const { formFields, legalConsent } = availability;
|
|
623
625
|
const supportedFields = _react.useMemo.call(void 0, () => normalizeFormFields(formFields), [formFields]);
|
|
@@ -638,6 +640,7 @@ function BookingForm({
|
|
|
638
640
|
handleSubmit,
|
|
639
641
|
setValue,
|
|
640
642
|
getValues,
|
|
643
|
+
watch,
|
|
641
644
|
formState: { errors }
|
|
642
645
|
} = _reacthookform.useForm.call(void 0, {
|
|
643
646
|
resolver: _zod3.zodResolver.call(void 0, schema),
|
|
@@ -672,6 +675,14 @@ function BookingForm({
|
|
|
672
675
|
{ shouldDirty: false }
|
|
673
676
|
);
|
|
674
677
|
}, [consentDefaults, priorConsents, getValues, setValue]);
|
|
678
|
+
_react.useEffect.call(void 0, () => {
|
|
679
|
+
if (!onValuesChange) return void 0;
|
|
680
|
+
const subscription = watch((values, { name }) => {
|
|
681
|
+
const answers = _nullishCoalesce(values.formFields, () => ( {}));
|
|
682
|
+
onValuesChange({ ...values, ...answers }, name ? name.replace(/^formFields\./, "") : null);
|
|
683
|
+
});
|
|
684
|
+
return () => subscription.unsubscribe();
|
|
685
|
+
}, [watch, onValuesChange]);
|
|
675
686
|
const submitValid = handleSubmit(async (data) => {
|
|
676
687
|
if (consentMissing) return;
|
|
677
688
|
if (deferSlot) {
|
|
@@ -735,8 +746,8 @@ function BookingForm({
|
|
|
735
746
|
children: _nullishCoalesce(submitLabel, () => ( DEFAULT_SUBMIT_LABEL))
|
|
736
747
|
}
|
|
737
748
|
);
|
|
738
|
-
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "form", { onSubmit: submit, className: FORM_STACK, noValidate: true, ...
|
|
739
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
749
|
+
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "form", { onSubmit: submit, className: FORM_STACK, noValidate: true, ..._chunk6PPEG2N4cjs.HUBSPOT_DO_NOT_COLLECT_FORM_PROPS, children: [
|
|
750
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk6PPEG2N4cjs.HoneypotField, { ...honeypotInputProps }),
|
|
740
751
|
fieldRows ? /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment, { children: [
|
|
741
752
|
placedRows.map((row) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: ROW_GRID, children: row.map((slot, slotIndex) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: slotColumnClass(row, slot, slotIndex), children: slotNode(slot.name) }, slot.name)) }, row.map((s) => s.name).join("|"))),
|
|
742
753
|
[...unplacedBuiltIns, ...unplacedFields].map((field) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _react.Fragment, { children: slotNode(field.name) }, field.name))
|
|
@@ -749,7 +760,7 @@ function BookingForm({
|
|
|
749
760
|
supportedFields.map((field) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _react.Fragment, { children: renderDeclaredField(field) }, field.name))
|
|
750
761
|
] }),
|
|
751
762
|
consent && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
752
|
-
|
|
763
|
+
_chunk6PPEG2N4cjs.CheckboxBlock,
|
|
753
764
|
{
|
|
754
765
|
id: "ms-host-consent",
|
|
755
766
|
checked: consented,
|
|
@@ -784,7 +795,7 @@ function BookingForm({
|
|
|
784
795
|
// same block the waitlist form uses): box + label in one
|
|
785
796
|
// bordered row.
|
|
786
797
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
787
|
-
|
|
798
|
+
_chunk6PPEG2N4cjs.CheckboxBlock,
|
|
788
799
|
{
|
|
789
800
|
id: `ms-consent-${box.communicationTypeId}`,
|
|
790
801
|
checked: _nullishCoalesce(_optionalChain([current, 'optionalAccess', _26 => _26.consented]), () => ( false)),
|
|
@@ -894,7 +905,7 @@ function ContextPanelSkeleton({
|
|
|
894
905
|
backLabel = "Back"
|
|
895
906
|
}) {
|
|
896
907
|
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: _chunkX7CEWD6Vcjs.cn.call(void 0, PANEL_STACK, className), children: [
|
|
897
|
-
onBack && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
908
|
+
onBack && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk6PPEG2N4cjs.BackButton, { label: backLabel, onClick: onBack, className: BACK_BUTTON_CLASS }),
|
|
898
909
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: STRIP_BODY, children: [
|
|
899
910
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: STRIP_MAIN, children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: IDENTITY_ROW, children: [
|
|
900
911
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex min-w-0 flex-1 items-center gap-[var(--spacing-system-xs)] lg:flex-none", children: [
|
|
@@ -942,7 +953,7 @@ function SchedulerContextPanel({
|
|
|
942
953
|
return zones.map((tz) => ({ value: tz, label: zoneLabel(tz) }));
|
|
943
954
|
}, [timezone]);
|
|
944
955
|
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: _chunkX7CEWD6Vcjs.cn.call(void 0, PANEL_STACK, className), children: [
|
|
945
|
-
onBack && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
956
|
+
onBack && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk6PPEG2N4cjs.BackButton, { label: backLabel, onClick: onBack, className: BACK_BUTTON_CLASS }),
|
|
946
957
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: STRIP_BODY, children: [
|
|
947
958
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: STRIP_MAIN, children: [
|
|
948
959
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: IDENTITY_ROW, children: [
|
|
@@ -1004,7 +1015,7 @@ function SchedulerContextPanel({
|
|
|
1004
1015
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: _chunkX7CEWD6Vcjs.cn.call(void 0, STRIP_ASIDE, locked && "max-lg:hidden"), children: [
|
|
1005
1016
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: FIELD_LABEL_CLASS, children: "Timezone" }),
|
|
1006
1017
|
timezone ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1007
|
-
|
|
1018
|
+
_chunk6PPEG2N4cjs.Autocomplete,
|
|
1008
1019
|
{
|
|
1009
1020
|
value: timezone,
|
|
1010
1021
|
disabled,
|
|
@@ -1091,18 +1102,18 @@ var NOOP = () => void 0;
|
|
|
1091
1102
|
function DayCalendar({ monthOffset, onMonthOffsetChange, selectedDay, onSelectDay, slotsByDay }) {
|
|
1092
1103
|
const now = /* @__PURE__ */ new Date();
|
|
1093
1104
|
const startMonth = new Date(now.getFullYear(), now.getMonth(), 1);
|
|
1094
|
-
const endMonth = new Date(now.getFullYear(), now.getMonth() +
|
|
1105
|
+
const endMonth = new Date(now.getFullYear(), now.getMonth() + _chunk6PPEG2N4cjs.MAX_MONTH_OFFSET + 1, 0);
|
|
1095
1106
|
const visibleMonth = new Date(now.getFullYear(), now.getMonth() + monthOffset, 1);
|
|
1096
1107
|
const dayHasNoSlots = _react.useCallback.call(void 0, (day) => !_optionalChain([slotsByDay, 'optionalAccess', _31 => _31.has, 'call', _32 => _32(calendarDayKey(day))]), [slotsByDay]);
|
|
1097
1108
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "flex min-h-0 flex-1 flex-col", "aria-busy": slotsByDay === null, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1098
|
-
|
|
1109
|
+
_chunk6PPEG2N4cjs.DatePickerCalendar,
|
|
1099
1110
|
{
|
|
1100
1111
|
mode: "single",
|
|
1101
1112
|
bare: true,
|
|
1102
1113
|
month: visibleMonth,
|
|
1103
1114
|
onMonthChange: (month) => {
|
|
1104
1115
|
const offset = (month.getFullYear() - now.getFullYear()) * 12 + (month.getMonth() - now.getMonth());
|
|
1105
|
-
onMonthOffsetChange(Math.max(0, Math.min(
|
|
1116
|
+
onMonthOffsetChange(Math.max(0, Math.min(_chunk6PPEG2N4cjs.MAX_MONTH_OFFSET, offset)));
|
|
1106
1117
|
},
|
|
1107
1118
|
fromDate: startMonth,
|
|
1108
1119
|
toDate: endMonth,
|
|
@@ -1218,7 +1229,7 @@ function SlotPicker({
|
|
|
1218
1229
|
monthLabelFor(monthOffset),
|
|
1219
1230
|
"."
|
|
1220
1231
|
] }),
|
|
1221
|
-
monthOffset <
|
|
1232
|
+
monthOffset < _chunk6PPEG2N4cjs.MAX_MONTH_OFFSET && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
1222
1233
|
_chunkF6U2H42Lcjs.Button,
|
|
1223
1234
|
{
|
|
1224
1235
|
variant: "outline",
|
|
@@ -1240,7 +1251,7 @@ function SlotPicker({
|
|
|
1240
1251
|
|
|
1241
1252
|
|
|
1242
1253
|
function useNextAvailableLabel(ms) {
|
|
1243
|
-
const hydrated =
|
|
1254
|
+
const hydrated = _chunk3UDBK2YGcjs.useIsHydrated.call(void 0, );
|
|
1244
1255
|
return _react.useMemo.call(void 0, () => {
|
|
1245
1256
|
if (!hydrated || ms == null) return null;
|
|
1246
1257
|
return _chunkQRUW4UXBcjs.formatDateWithTimezone.call(void 0, ms, _chunkQRUW4UXBcjs.VIEWER_TIMEZONE, "shortWeekdayDateTime", { viewerLocale: true }) || null;
|
|
@@ -1472,7 +1483,7 @@ function HubSpotMeetingScheduler({
|
|
|
1472
1483
|
isSubmitting
|
|
1473
1484
|
} = useMeetingBooking({ meetingId, apiBaseUrl, initialAvailability });
|
|
1474
1485
|
const detailsFirst = flow === "details-first";
|
|
1475
|
-
const hydrated =
|
|
1486
|
+
const hydrated = _chunk3UDBK2YGcjs.useIsHydrated.call(void 0, );
|
|
1476
1487
|
const [pickedTimezone, setTimezone] = _react.useState.call(void 0, null);
|
|
1477
1488
|
const resolvedLocalTimezone = _react.useMemo.call(void 0, () => {
|
|
1478
1489
|
if (!hydrated) return null;
|
|
@@ -1505,8 +1516,28 @@ function HubSpotMeetingScheduler({
|
|
|
1505
1516
|
const [selectedSlot, setSelectedSlot] = _react.useState.call(void 0, null);
|
|
1506
1517
|
const [confirmation, setConfirmation] = _react.useState.call(void 0, null);
|
|
1507
1518
|
const [bookingError, setBookingError] = _react.useState.call(void 0, null);
|
|
1508
|
-
const { honeypotInputProps, getSignals, resetSignals } =
|
|
1509
|
-
const { toast } =
|
|
1519
|
+
const { honeypotInputProps, getSignals, resetSignals } = _chunkAXMNWMAUcjs.useHumanitySignals.call(void 0, );
|
|
1520
|
+
const { toast } = _chunkAXMNWMAUcjs.useToast.call(void 0, );
|
|
1521
|
+
const rescueFieldNames = _react.useMemo.call(void 0,
|
|
1522
|
+
() => [
|
|
1523
|
+
...BUILT_IN_BOOKING_FIELDS.map((field) => field.name),
|
|
1524
|
+
...normalizeFormFields(_nullishCoalesce(_optionalChain([availability, 'optionalAccess', _38 => _38.formFields]), () => ( []))).map((field) => field.name)
|
|
1525
|
+
],
|
|
1526
|
+
[_optionalChain([availability, 'optionalAccess', _39 => _39.formFields])]
|
|
1527
|
+
);
|
|
1528
|
+
const [restored, setRestored] = _react.useState.call(void 0, null);
|
|
1529
|
+
const rescue = _chunkAXMNWMAUcjs.useFormRescue.call(void 0, {
|
|
1530
|
+
formId: "meeting_booking",
|
|
1531
|
+
fieldNames: rescueFieldNames,
|
|
1532
|
+
getSignals,
|
|
1533
|
+
onRestore: (values) => {
|
|
1534
|
+
const { email, firstName, lastName, ...answers } = values;
|
|
1535
|
+
setRestored((prev) => ({
|
|
1536
|
+
version: (_nullishCoalesce(_optionalChain([prev, 'optionalAccess', _40 => _40.version]), () => ( 0))) + 1,
|
|
1537
|
+
values: { email: _nullishCoalesce(email, () => ( "")), firstName: _nullishCoalesce(firstName, () => ( "")), lastName: _nullishCoalesce(lastName, () => ( "")), formFields: answers }
|
|
1538
|
+
}));
|
|
1539
|
+
}
|
|
1540
|
+
});
|
|
1510
1541
|
const autoAdvanceCount = _react.useRef.call(void 0, 0);
|
|
1511
1542
|
const [machineFor, setMachineFor] = _react.useState.call(void 0, meetingId);
|
|
1512
1543
|
if (machineFor !== meetingId) {
|
|
@@ -1522,8 +1553,8 @@ function HubSpotMeetingScheduler({
|
|
|
1522
1553
|
_react.useEffect.call(void 0, () => {
|
|
1523
1554
|
autoAdvanceCount.current = 0;
|
|
1524
1555
|
}, [meetingId]);
|
|
1525
|
-
const durations = _react.useMemo.call(void 0, () => _nullishCoalesce(_optionalChain([availability, 'optionalAccess',
|
|
1526
|
-
const shownHosts = _nullishCoalesce(_nullishCoalesce(hosts, () => ( _optionalChain([availability, 'optionalAccess',
|
|
1556
|
+
const durations = _react.useMemo.call(void 0, () => _nullishCoalesce(_optionalChain([availability, 'optionalAccess', _41 => _41.durationsMs]), () => ( [])), [_optionalChain([availability, 'optionalAccess', _42 => _42.durationsMs])]);
|
|
1557
|
+
const shownHosts = _nullishCoalesce(_nullishCoalesce(hosts, () => ( _optionalChain([availability, 'optionalAccess', _43 => _43.hosts]))), () => ( []));
|
|
1527
1558
|
const durationMs = _nullishCoalesce(_nullishCoalesce(pickedDurationMs, () => ( durations[0])), () => ( null));
|
|
1528
1559
|
const slots = _react.useMemo.call(void 0, () => {
|
|
1529
1560
|
if (!availability || durationMs == null) return [];
|
|
@@ -1574,15 +1605,16 @@ function HubSpotMeetingScheduler({
|
|
|
1574
1605
|
async (payload) => {
|
|
1575
1606
|
const priorError = bookingError;
|
|
1576
1607
|
setBookingError(null);
|
|
1577
|
-
const result = await book(payload);
|
|
1608
|
+
const result = await book({ ...payload, ...rescue.submitFields() });
|
|
1578
1609
|
if (!result.ok && result.message === BOOKING_IN_FLIGHT_MESSAGE) {
|
|
1579
1610
|
setBookingError(priorError);
|
|
1580
1611
|
return;
|
|
1581
1612
|
}
|
|
1582
1613
|
if (result.ok && result.confirmation) {
|
|
1614
|
+
rescue.complete();
|
|
1583
1615
|
setConfirmation(result.confirmation);
|
|
1584
1616
|
setStep("confirmed");
|
|
1585
|
-
_optionalChain([onBooked, 'optionalCall',
|
|
1617
|
+
_optionalChain([onBooked, 'optionalCall', _44 => _44(result.confirmation)]);
|
|
1586
1618
|
return;
|
|
1587
1619
|
}
|
|
1588
1620
|
const code = _nullishCoalesce(result.code, () => ( "TEMPORARILY_UNAVAILABLE"));
|
|
@@ -1604,7 +1636,7 @@ function HubSpotMeetingScheduler({
|
|
|
1604
1636
|
});
|
|
1605
1637
|
}
|
|
1606
1638
|
},
|
|
1607
|
-
[book, bookingError, detailsFirst, onBooked, refetchAvailability, resetSignals, toast]
|
|
1639
|
+
[book, bookingError, detailsFirst, onBooked, refetchAvailability, rescue, resetSignals, toast]
|
|
1608
1640
|
);
|
|
1609
1641
|
const escapeHatch = fallbackUrl ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkF6U2H42Lcjs.Button, { variant: "outline", size: "small-legacy", href: fallbackUrl, openInNewTab: true, children: "Open in HubSpot" }) : null;
|
|
1610
1642
|
const backEdge = detailsFirst ? step === "slot" ? backToDetails : onBack : step === "details" ? backToSlot : onBack;
|
|
@@ -1630,8 +1662,8 @@ function HubSpotMeetingScheduler({
|
|
|
1630
1662
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: stepPanelClass, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1631
1663
|
BookingFormSkeleton,
|
|
1632
1664
|
{
|
|
1633
|
-
fieldRows: _optionalChain([detailsFormProps, 'optionalAccess',
|
|
1634
|
-
consent: Boolean(_optionalChain([detailsFormProps, 'optionalAccess',
|
|
1665
|
+
fieldRows: _optionalChain([detailsFormProps, 'optionalAccess', _45 => _45.fieldRows]),
|
|
1666
|
+
consent: Boolean(_optionalChain([detailsFormProps, 'optionalAccess', _46 => _46.consent])),
|
|
1635
1667
|
footerNote: preset.footerNote
|
|
1636
1668
|
}
|
|
1637
1669
|
) })
|
|
@@ -1692,20 +1724,22 @@ function HubSpotMeetingScheduler({
|
|
|
1692
1724
|
deferSlot: detailsFirst,
|
|
1693
1725
|
submitLabel: preset.submitLabel,
|
|
1694
1726
|
footerNote: preset.footerNote,
|
|
1695
|
-
initialValues: detailsFirst ? _optionalChain([stash, 'optionalAccess',
|
|
1727
|
+
initialValues: _nullishCoalesce((detailsFirst ? _optionalChain([stash, 'optionalAccess', _47 => _47.payload]) : void 0), () => ( _optionalChain([restored, 'optionalAccess', _48 => _48.values]))),
|
|
1696
1728
|
isSubmitting,
|
|
1697
1729
|
onSubmit: detailsFirst ? stashDetails : handleSubmit,
|
|
1698
1730
|
honeypotInputProps,
|
|
1699
|
-
getSignals
|
|
1700
|
-
|
|
1731
|
+
getSignals,
|
|
1732
|
+
onValuesChange: rescue.track
|
|
1733
|
+
},
|
|
1734
|
+
_nullishCoalesce(_optionalChain([restored, 'optionalAccess', _49 => _49.version]), () => ( 0))
|
|
1701
1735
|
)
|
|
1702
1736
|
] }) : /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex flex-col gap-[var(--spacing-system-m)] md:min-h-0 md:flex-1", children: [
|
|
1703
1737
|
bookingError === "SLOT_TAKEN" && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1704
|
-
|
|
1738
|
+
_chunk6PPEG2N4cjs.Alert,
|
|
1705
1739
|
{
|
|
1706
1740
|
variant: "warning",
|
|
1707
1741
|
className: "mx-[var(--spacing-system-l)] mt-[var(--spacing-system-l)] w-auto lg:m-0 lg:w-full",
|
|
1708
|
-
children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1742
|
+
children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk6PPEG2N4cjs.AlertDescription, { children: "That time was just taken \u2014 pick another slot below. (If you already submitted, check your email for a confirmation before rebooking.)" })
|
|
1709
1743
|
}
|
|
1710
1744
|
),
|
|
1711
1745
|
timezone && durationMs != null ? (
|