@flamingo-stack/openframe-frontend-core 0.0.671 → 0.0.672-snapshot.20260928034232
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-DAGKBFZN.cjs → chunk-26NSIJMT.cjs} +33 -33
- package/dist/{chunk-DAGKBFZN.cjs.map → chunk-26NSIJMT.cjs.map} +1 -1
- package/dist/{chunk-FUXUJSPP.cjs → chunk-3UDBK2YG.cjs} +1 -1
- package/dist/chunk-3UDBK2YG.cjs.map +1 -0
- package/dist/{chunk-XGXHHSDU.cjs → chunk-6QUKYN4K.cjs} +22 -22
- package/dist/{chunk-XGXHHSDU.cjs.map → chunk-6QUKYN4K.cjs.map} +1 -1
- package/dist/{chunk-SNNE34OP.js → chunk-BF7GZ6BS.js} +5 -5
- package/dist/{chunk-SJZPKIW6.cjs → chunk-DRURJCEY.cjs} +12 -12
- package/dist/{chunk-SJZPKIW6.cjs.map → chunk-DRURJCEY.cjs.map} +1 -1
- package/dist/{chunk-YIDNSRPL.cjs → chunk-G262S3Q5.cjs} +31 -31
- package/dist/{chunk-YIDNSRPL.cjs.map → chunk-G262S3Q5.cjs.map} +1 -1
- package/dist/{chunk-OG2BNJ2Q.cjs → chunk-HJ532KQR.cjs} +390 -375
- package/dist/chunk-HJ532KQR.cjs.map +1 -0
- package/dist/{chunk-K3O4D7LW.js → chunk-HRM6242Y.js} +4 -4
- package/dist/{chunk-BP542DGQ.cjs → chunk-IFQMIYFO.cjs} +55 -28
- package/dist/chunk-IFQMIYFO.cjs.map +1 -0
- package/dist/{chunk-IJIIL6WU.js → chunk-IG7M3XKX.js} +6 -6
- package/dist/{chunk-PQ7YC5Y6.js → chunk-II6ABVLK.js} +3 -3
- 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-XH4MRTZM.cjs → chunk-K365MY6G.cjs} +5 -5
- package/dist/{chunk-XH4MRTZM.cjs.map → chunk-K365MY6G.cjs.map} +1 -1
- package/dist/{chunk-EIAVE6SE.cjs → chunk-KV7W5T6U.cjs} +10 -10
- package/dist/{chunk-EIAVE6SE.cjs.map → chunk-KV7W5T6U.cjs.map} +1 -1
- package/dist/{chunk-II66XWU5.cjs → chunk-KYF5EONP.cjs} +3 -3
- package/dist/{chunk-II66XWU5.cjs.map → chunk-KYF5EONP.cjs.map} +1 -1
- package/dist/{chunk-D55IENZJ.cjs → chunk-LCMT2GZK.cjs} +1 -1
- package/dist/chunk-LCMT2GZK.cjs.map +1 -0
- package/dist/{chunk-STLBB6PF.js → chunk-LMUZZUYC.js} +35 -8
- package/dist/chunk-LMUZZUYC.js.map +1 -0
- package/dist/{chunk-FAJUQKWQ.cjs → chunk-N6TC6IPV.cjs} +76 -75
- package/dist/chunk-N6TC6IPV.cjs.map +1 -0
- package/dist/{chunk-RKUCK6MN.js → chunk-OGOMAK7B.js} +2 -2
- package/dist/{chunk-G64BNLDO.js → chunk-P4GUIOLP.js} +2 -2
- package/dist/{chunk-DUZEFACP.js → chunk-RRU46J3N.js} +3 -3
- package/dist/{chunk-DAWYS25M.cjs → chunk-THSIFQGS.cjs} +17 -17
- package/dist/{chunk-DAWYS25M.cjs.map → chunk-THSIFQGS.cjs.map} +1 -1
- package/dist/{chunk-6C6UUOH4.js → chunk-TTHBFT7Q.js} +8 -7
- package/dist/{chunk-6C6UUOH4.js.map → chunk-TTHBFT7Q.js.map} +1 -1
- package/dist/{chunk-YNGAJGYB.cjs → chunk-TZP2OXHG.cjs} +346 -6
- package/dist/chunk-TZP2OXHG.cjs.map +1 -0
- package/dist/{chunk-T3ACDOVD.cjs → chunk-U2H3C4NT.cjs} +7 -7
- package/dist/{chunk-T3ACDOVD.cjs.map → chunk-U2H3C4NT.cjs.map} +1 -1
- package/dist/{chunk-OYMOG544.js → chunk-UFMXQKVT.js} +5 -5
- package/dist/{chunk-NIYIK32F.js → chunk-UMTXGEPU.js} +19 -4
- package/dist/{chunk-NIYIK32F.js.map → chunk-UMTXGEPU.js.map} +1 -1
- package/dist/{chunk-3PVOF3IB.js → chunk-UTHZ7DLN.js} +343 -3
- package/dist/{chunk-3PVOF3IB.js.map → chunk-UTHZ7DLN.js.map} +1 -1
- package/dist/{chunk-YJWR7D6O.cjs → chunk-UXT5EK27.cjs} +3 -3
- package/dist/{chunk-YJWR7D6O.cjs.map → chunk-UXT5EK27.cjs.map} +1 -1
- package/dist/{chunk-UH3BL2OT.js → chunk-VK5737GE.js} +2 -2
- package/dist/{chunk-R22IA7MP.js → chunk-VKLM5UKG.js} +4 -4
- package/dist/{chunk-FHTNCWIP.js → chunk-X2DR3XNN.js} +5 -5
- package/dist/{chunk-GF5TSQ6C.cjs → chunk-YCYOZAB5.cjs} +10 -10
- package/dist/{chunk-GF5TSQ6C.cjs.map → chunk-YCYOZAB5.cjs.map} +1 -1
- package/dist/{chunk-4PVY4JJN.js → chunk-YWQVL5VJ.js} +3 -3
- package/dist/{chunk-PLG6LP7E.cjs → chunk-Z5K4IQZU.cjs} +49 -49
- package/dist/{chunk-PLG6LP7E.cjs.map → chunk-Z5K4IQZU.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 +7 -2
- 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 +75 -40
- package/dist/components/meeting-scheduler/index.cjs.map +1 -1
- package/dist/components/meeting-scheduler/index.d.ts +5 -1
- package/dist/components/meeting-scheduler/index.d.ts.map +1 -1
- package/dist/components/meeting-scheduler/index.js +46 -11
- 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 +53 -9
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +52 -8
- package/dist/index.js.map +1 -1
- package/dist/utils/form-rescue.cjs +123 -0
- package/dist/utils/form-rescue.cjs.map +1 -0
- package/dist/utils/form-rescue.d.ts +105 -0
- package/dist/utils/form-rescue.d.ts.map +1 -0
- package/dist/utils/form-rescue.js +101 -0
- package/dist/utils/form-rescue.js.map +1 -0
- package/dist/utils/index.cjs +119 -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 +99 -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 +27 -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 +38 -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 +189 -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 +198 -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-SNNE34OP.js.map → chunk-BF7GZ6BS.js.map} +0 -0
- /package/dist/{chunk-K3O4D7LW.js.map → chunk-HRM6242Y.js.map} +0 -0
- /package/dist/{chunk-IJIIL6WU.js.map → chunk-IG7M3XKX.js.map} +0 -0
- /package/dist/{chunk-PQ7YC5Y6.js.map → chunk-II6ABVLK.js.map} +0 -0
- /package/dist/{chunk-RKUCK6MN.js.map → chunk-OGOMAK7B.js.map} +0 -0
- /package/dist/{chunk-G64BNLDO.js.map → chunk-P4GUIOLP.js.map} +0 -0
- /package/dist/{chunk-DUZEFACP.js.map → chunk-RRU46J3N.js.map} +0 -0
- /package/dist/{chunk-OYMOG544.js.map → chunk-UFMXQKVT.js.map} +0 -0
- /package/dist/{chunk-UH3BL2OT.js.map → chunk-VK5737GE.js.map} +0 -0
- /package/dist/{chunk-R22IA7MP.js.map → chunk-VKLM5UKG.js.map} +0 -0
- /package/dist/{chunk-FHTNCWIP.js.map → chunk-X2DR3XNN.js.map} +0 -0
- /package/dist/{chunk-4PVY4JJN.js.map → chunk-YWQVL5VJ.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-VKLM5UKG.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-X2DR3XNN.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-IG7M3XKX.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-UFMXQKVT.js";
|
|
67
67
|
import {
|
|
68
68
|
FileDownloadCard,
|
|
69
69
|
GoogleSheetsViewer,
|
|
70
70
|
PdfViewer
|
|
71
|
-
} from "../chunk-
|
|
71
|
+
} from "../chunk-RRU46J3N.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-HRM6242Y.js";
|
|
82
82
|
import {
|
|
83
83
|
MobileNavigationDropdown,
|
|
84
84
|
MultiLevelNavigation,
|
|
85
85
|
StickySectionNav,
|
|
86
86
|
useSectionNavigation
|
|
87
|
-
} from "../chunk-
|
|
87
|
+
} from "../chunk-VK5737GE.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-P4GUIOLP.js";
|
|
97
97
|
import {
|
|
98
98
|
EmptyState,
|
|
99
99
|
UnifiedPagination
|
|
100
100
|
} from "../chunk-5ONM3FHQ.js";
|
|
101
|
-
import "../chunk-
|
|
101
|
+
import "../chunk-YWQVL5VJ.js";
|
|
102
102
|
import {
|
|
103
103
|
ArticleAuthorByline,
|
|
104
104
|
DetailPageSkeleton
|
|
105
|
-
} from "../chunk-
|
|
105
|
+
} from "../chunk-OGOMAK7B.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-II6ABVLK.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-UMTXGEPU.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-UTHZ7DLN.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"],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C;IAClD;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 _chunkHJ532KQRcjs = require('../../chunk-HJ532KQR.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 _chunkTZP2OXHGcjs = require('../../chunk-TZP2OXHG.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(_chunkHJ532KQRcjs.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
|
+
_chunkHJ532KQRcjs.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, _chunkHJ532KQRcjs.Select, { value: _nullishCoalesce(rhf.value, () => ( "")), onValueChange: rhf.onChange, children: [
|
|
527
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkHJ532KQRcjs.SelectTrigger, { id, "aria-required": field.required || void 0, "aria-invalid": Boolean(error), children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkHJ532KQRcjs.SelectValue, { placeholder: "Select\u2026" }) }),
|
|
528
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkHJ532KQRcjs.SelectContent, { children: (_nullishCoalesce(field.options, () => ( []))).map((opt) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkHJ532KQRcjs.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
|
+
_chunkHJ532KQRcjs.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, _chunkHJ532KQRcjs.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, ..._chunkHJ532KQRcjs.HUBSPOT_DO_NOT_COLLECT_FORM_PROPS, children: [
|
|
750
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkHJ532KQRcjs.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
|
+
_chunkHJ532KQRcjs.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
|
+
_chunkHJ532KQRcjs.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, _chunkHJ532KQRcjs.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, _chunkHJ532KQRcjs.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
|
+
_chunkHJ532KQRcjs.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() + _chunkHJ532KQRcjs.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
|
+
_chunkHJ532KQRcjs.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(_chunkHJ532KQRcjs.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 < _chunkHJ532KQRcjs.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;
|
|
@@ -1458,7 +1469,8 @@ function HubSpotMeetingScheduler({
|
|
|
1458
1469
|
className,
|
|
1459
1470
|
flow = DEFAULT_SCHEDULER_FLOW,
|
|
1460
1471
|
detailsForm: DetailsForm = BookingForm,
|
|
1461
|
-
detailsFormProps
|
|
1472
|
+
detailsFormProps,
|
|
1473
|
+
rescueFormId = null
|
|
1462
1474
|
}) {
|
|
1463
1475
|
const {
|
|
1464
1476
|
availability,
|
|
@@ -1472,7 +1484,7 @@ function HubSpotMeetingScheduler({
|
|
|
1472
1484
|
isSubmitting
|
|
1473
1485
|
} = useMeetingBooking({ meetingId, apiBaseUrl, initialAvailability });
|
|
1474
1486
|
const detailsFirst = flow === "details-first";
|
|
1475
|
-
const hydrated =
|
|
1487
|
+
const hydrated = _chunk3UDBK2YGcjs.useIsHydrated.call(void 0, );
|
|
1476
1488
|
const [pickedTimezone, setTimezone] = _react.useState.call(void 0, null);
|
|
1477
1489
|
const resolvedLocalTimezone = _react.useMemo.call(void 0, () => {
|
|
1478
1490
|
if (!hydrated) return null;
|
|
@@ -1505,8 +1517,28 @@ function HubSpotMeetingScheduler({
|
|
|
1505
1517
|
const [selectedSlot, setSelectedSlot] = _react.useState.call(void 0, null);
|
|
1506
1518
|
const [confirmation, setConfirmation] = _react.useState.call(void 0, null);
|
|
1507
1519
|
const [bookingError, setBookingError] = _react.useState.call(void 0, null);
|
|
1508
|
-
const { honeypotInputProps, getSignals, resetSignals } =
|
|
1509
|
-
const { toast } =
|
|
1520
|
+
const { honeypotInputProps, getSignals, resetSignals } = _chunkTZP2OXHGcjs.useHumanitySignals.call(void 0, );
|
|
1521
|
+
const { toast } = _chunkTZP2OXHGcjs.useToast.call(void 0, );
|
|
1522
|
+
const rescueFieldNames = _react.useMemo.call(void 0,
|
|
1523
|
+
() => [
|
|
1524
|
+
...BUILT_IN_BOOKING_FIELDS.map((field) => field.name),
|
|
1525
|
+
...normalizeFormFields(_nullishCoalesce(_optionalChain([availability, 'optionalAccess', _38 => _38.formFields]), () => ( []))).map((field) => field.name)
|
|
1526
|
+
],
|
|
1527
|
+
[_optionalChain([availability, 'optionalAccess', _39 => _39.formFields])]
|
|
1528
|
+
);
|
|
1529
|
+
const [restored, setRestored] = _react.useState.call(void 0, null);
|
|
1530
|
+
const rescue = _chunkTZP2OXHGcjs.useFormRescue.call(void 0, {
|
|
1531
|
+
formId: rescueFormId,
|
|
1532
|
+
fieldNames: rescueFieldNames,
|
|
1533
|
+
getSignals,
|
|
1534
|
+
onRestore: (values) => {
|
|
1535
|
+
const { email, firstName, lastName, ...answers } = values;
|
|
1536
|
+
setRestored((prev) => ({
|
|
1537
|
+
version: (_nullishCoalesce(_optionalChain([prev, 'optionalAccess', _40 => _40.version]), () => ( 0))) + 1,
|
|
1538
|
+
values: { email: _nullishCoalesce(email, () => ( "")), firstName: _nullishCoalesce(firstName, () => ( "")), lastName: _nullishCoalesce(lastName, () => ( "")), formFields: answers }
|
|
1539
|
+
}));
|
|
1540
|
+
}
|
|
1541
|
+
});
|
|
1510
1542
|
const autoAdvanceCount = _react.useRef.call(void 0, 0);
|
|
1511
1543
|
const [machineFor, setMachineFor] = _react.useState.call(void 0, meetingId);
|
|
1512
1544
|
if (machineFor !== meetingId) {
|
|
@@ -1522,8 +1554,8 @@ function HubSpotMeetingScheduler({
|
|
|
1522
1554
|
_react.useEffect.call(void 0, () => {
|
|
1523
1555
|
autoAdvanceCount.current = 0;
|
|
1524
1556
|
}, [meetingId]);
|
|
1525
|
-
const durations = _react.useMemo.call(void 0, () => _nullishCoalesce(_optionalChain([availability, 'optionalAccess',
|
|
1526
|
-
const shownHosts = _nullishCoalesce(_nullishCoalesce(hosts, () => ( _optionalChain([availability, 'optionalAccess',
|
|
1557
|
+
const durations = _react.useMemo.call(void 0, () => _nullishCoalesce(_optionalChain([availability, 'optionalAccess', _41 => _41.durationsMs]), () => ( [])), [_optionalChain([availability, 'optionalAccess', _42 => _42.durationsMs])]);
|
|
1558
|
+
const shownHosts = _nullishCoalesce(_nullishCoalesce(hosts, () => ( _optionalChain([availability, 'optionalAccess', _43 => _43.hosts]))), () => ( []));
|
|
1527
1559
|
const durationMs = _nullishCoalesce(_nullishCoalesce(pickedDurationMs, () => ( durations[0])), () => ( null));
|
|
1528
1560
|
const slots = _react.useMemo.call(void 0, () => {
|
|
1529
1561
|
if (!availability || durationMs == null) return [];
|
|
@@ -1574,15 +1606,16 @@ function HubSpotMeetingScheduler({
|
|
|
1574
1606
|
async (payload) => {
|
|
1575
1607
|
const priorError = bookingError;
|
|
1576
1608
|
setBookingError(null);
|
|
1577
|
-
const result = await book(payload);
|
|
1609
|
+
const result = await book({ ...payload, ...rescue.submitFields() });
|
|
1578
1610
|
if (!result.ok && result.message === BOOKING_IN_FLIGHT_MESSAGE) {
|
|
1579
1611
|
setBookingError(priorError);
|
|
1580
1612
|
return;
|
|
1581
1613
|
}
|
|
1582
1614
|
if (result.ok && result.confirmation) {
|
|
1615
|
+
rescue.complete();
|
|
1583
1616
|
setConfirmation(result.confirmation);
|
|
1584
1617
|
setStep("confirmed");
|
|
1585
|
-
_optionalChain([onBooked, 'optionalCall',
|
|
1618
|
+
_optionalChain([onBooked, 'optionalCall', _44 => _44(result.confirmation)]);
|
|
1586
1619
|
return;
|
|
1587
1620
|
}
|
|
1588
1621
|
const code = _nullishCoalesce(result.code, () => ( "TEMPORARILY_UNAVAILABLE"));
|
|
@@ -1604,7 +1637,7 @@ function HubSpotMeetingScheduler({
|
|
|
1604
1637
|
});
|
|
1605
1638
|
}
|
|
1606
1639
|
},
|
|
1607
|
-
[book, bookingError, detailsFirst, onBooked, refetchAvailability, resetSignals, toast]
|
|
1640
|
+
[book, bookingError, detailsFirst, onBooked, refetchAvailability, rescue, resetSignals, toast]
|
|
1608
1641
|
);
|
|
1609
1642
|
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
1643
|
const backEdge = detailsFirst ? step === "slot" ? backToDetails : onBack : step === "details" ? backToSlot : onBack;
|
|
@@ -1630,8 +1663,8 @@ function HubSpotMeetingScheduler({
|
|
|
1630
1663
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: stepPanelClass, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1631
1664
|
BookingFormSkeleton,
|
|
1632
1665
|
{
|
|
1633
|
-
fieldRows: _optionalChain([detailsFormProps, 'optionalAccess',
|
|
1634
|
-
consent: Boolean(_optionalChain([detailsFormProps, 'optionalAccess',
|
|
1666
|
+
fieldRows: _optionalChain([detailsFormProps, 'optionalAccess', _45 => _45.fieldRows]),
|
|
1667
|
+
consent: Boolean(_optionalChain([detailsFormProps, 'optionalAccess', _46 => _46.consent])),
|
|
1635
1668
|
footerNote: preset.footerNote
|
|
1636
1669
|
}
|
|
1637
1670
|
) })
|
|
@@ -1692,20 +1725,22 @@ function HubSpotMeetingScheduler({
|
|
|
1692
1725
|
deferSlot: detailsFirst,
|
|
1693
1726
|
submitLabel: preset.submitLabel,
|
|
1694
1727
|
footerNote: preset.footerNote,
|
|
1695
|
-
initialValues: detailsFirst ? _optionalChain([stash, 'optionalAccess',
|
|
1728
|
+
initialValues: _nullishCoalesce((detailsFirst ? _optionalChain([stash, 'optionalAccess', _47 => _47.payload]) : void 0), () => ( _optionalChain([restored, 'optionalAccess', _48 => _48.values]))),
|
|
1696
1729
|
isSubmitting,
|
|
1697
1730
|
onSubmit: detailsFirst ? stashDetails : handleSubmit,
|
|
1698
1731
|
honeypotInputProps,
|
|
1699
|
-
getSignals
|
|
1700
|
-
|
|
1732
|
+
getSignals,
|
|
1733
|
+
onValuesChange: rescue.track
|
|
1734
|
+
},
|
|
1735
|
+
_nullishCoalesce(_optionalChain([restored, 'optionalAccess', _49 => _49.version]), () => ( 0))
|
|
1701
1736
|
)
|
|
1702
1737
|
] }) : /* @__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
1738
|
bookingError === "SLOT_TAKEN" && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1704
|
-
|
|
1739
|
+
_chunkHJ532KQRcjs.Alert,
|
|
1705
1740
|
{
|
|
1706
1741
|
variant: "warning",
|
|
1707
1742
|
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,
|
|
1743
|
+
children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkHJ532KQRcjs.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
1744
|
}
|
|
1710
1745
|
),
|
|
1711
1746
|
timezone && durationMs != null ? (
|