@flamingo-stack/openframe-frontend-core 0.0.675 → 0.0.676-2437.7317.1
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/components/meeting-scheduler/booking-form.d.ts +17 -1
- package/dist/components/meeting-scheduler/booking-form.d.ts.map +1 -1
- package/dist/components/meeting-scheduler/index.cjs +38 -23
- package/dist/components/meeting-scheduler/index.cjs.map +1 -1
- package/dist/components/meeting-scheduler/index.d.ts +6 -5
- package/dist/components/meeting-scheduler/index.d.ts.map +1 -1
- package/dist/components/meeting-scheduler/index.js +23 -8
- package/dist/components/meeting-scheduler/index.js.map +1 -1
- package/package.json +1 -1
- package/src/__tests__/meeting-scheduler-details-first.test.tsx +21 -0
- package/src/components/meeting-scheduler/booking-form.tsx +44 -12
- package/src/components/meeting-scheduler/index.tsx +6 -4
|
@@ -14,6 +14,20 @@ export interface BookingFieldSlot {
|
|
|
14
14
|
/** Columns out of `GRID_COLUMNS` at `md` and up — the keys of `SPAN_CLASS`. */
|
|
15
15
|
export type BookingFieldSpan = keyof typeof SPAN_CLASS;
|
|
16
16
|
export type BookingFieldRow = BookingFieldSlot[];
|
|
17
|
+
/**
|
|
18
|
+
* Display copy a HOST overrides for ONE field, keyed by its name — a built-in
|
|
19
|
+
* (`email`) or a HubSpot-declared question. It replaces what is DRAWN and
|
|
20
|
+
* nothing else: the name the answer rides under, the validation and the
|
|
21
|
+
* schema's own messages are untouched, so a campaign page can ask for a
|
|
22
|
+
* "Business Email" without owning a second email rule.
|
|
23
|
+
*
|
|
24
|
+
* An overridden `label` also feeds the type's derived placeholder
|
|
25
|
+
* (`Enter <label>`), so overriding the label alone keeps the pair consistent.
|
|
26
|
+
*/
|
|
27
|
+
export interface BookingFieldCopy {
|
|
28
|
+
label?: string;
|
|
29
|
+
placeholder?: string;
|
|
30
|
+
}
|
|
17
31
|
/**
|
|
18
32
|
* A HOST-supplied consent row — the block the waitlist form draws for its SMS
|
|
19
33
|
* consent, here for "I agree to the Privacy Policy and to be contacted". It is
|
|
@@ -76,6 +90,8 @@ export interface BookingFormProps {
|
|
|
76
90
|
* appended full width. Both are deliberate — see `slotNode`/`unplacedFields`.
|
|
77
91
|
*/
|
|
78
92
|
fieldRows?: BookingFieldRow[];
|
|
93
|
+
/** Per-field display overrides, keyed by field name — see `BookingFieldCopy`. */
|
|
94
|
+
fieldCopy?: Record<string, BookingFieldCopy>;
|
|
79
95
|
/** Host-supplied consent row, rendered after the fields — see `BookingFormConsent`. */
|
|
80
96
|
consent?: BookingFormConsent;
|
|
81
97
|
isSubmitting: boolean;
|
|
@@ -106,7 +122,7 @@ export interface BookingFormProps {
|
|
|
106
122
|
* submit; the parent calls `resetSignals()` after a SLOT_TAKEN refetch so a
|
|
107
123
|
* legitimate retry isn't flagged too-fast.
|
|
108
124
|
*/
|
|
109
|
-
export declare function BookingForm({ availability, meetingId, startTimeMs, durationMs, timezone, deferSlot, initialValues, submitLabel, footerNote, fieldRows, consent, isSubmitting, onSubmit, honeypotInputProps, getSignals, rescue, }: BookingFormProps): import("react").JSX.Element;
|
|
125
|
+
export declare function BookingForm({ availability, meetingId, startTimeMs, durationMs, timezone, deferSlot, initialValues, submitLabel, footerNote, fieldRows, fieldCopy, consent, isSubmitting, onSubmit, honeypotInputProps, getSignals, rescue, }: BookingFormProps): import("react").JSX.Element;
|
|
110
126
|
/**
|
|
111
127
|
* Cold-start placeholder for `flow="details-first"`, where the FORM is the
|
|
112
128
|
* 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":[],"mappings":"AAIA,OAAO,KAAK,EAAa,SAAS,EAAE,GAAG,EAAE,MAAM,OAAO,CAAC;AAIvD,OAAO,EAEL,KAAK,uBAAuB,EAQ5B,KAAK,mBAAmB,EAKzB,MAAM,sCAAsC,CAAC;AAE9C,OAAO,KAAK,EAAE,oBAA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ACH,SAAS,CAAC,EAAE,eAAe,EAAE,CAAC;IAC9B,uFAAuF;IACvF,OAAO,CAAC,EAAE,kBAAkB,CAAC;IAC7B,YAAY,EAAE,OAAO,CAAC;IACtB,QAAQ,EAAE,CAAC,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IAC9D,mFAAmF;IACnF,kBAAkB,EAAE;QAAE,GAAG,EAAE,GAAG,CAAC,gBAAgB,CAAC,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAE,CAAC;IACjE,UAAU,EAAE,MAAM,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAAC,CAAC;IAClD;;;6BAGyB;IACzB,MAAM,CAAC,EAAE,oBAAoB,GAAG,IAAI,CAAC;CACtC;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,MAAa,GACd,EAAE,gBAAgB,+
|
|
1
|
+
{"version":3,"file":"booking-form.d.ts","sourceRoot":"","sources":["../../../src/components/meeting-scheduler/booking-form.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAa,SAAS,EAAE,GAAG,EAAE,MAAM,OAAO,CAAC;AAIvD,OAAO,EAEL,KAAK,uBAAuB,EAQ5B,KAAK,mBAAmB,EAKzB,MAAM,sCAAsC,CAAC;AAE9C,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,yBAAyB,CAAC;AAqBpE;;;GAGG;AACH,MAAM,WAAW,gBAAgB;IAC/B,yFAAyF;IACzF,IAAI,EAAE,uBAAuB,GAAG,CAAC,MAAM,GAAG,WAAW,CAAC,OAAO,CAAC,CAAC,CAAC;IAChE,g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F,SAAS,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,gBAAgB,CAAC,CAAC;IAC7C,uFAAuF;IACvF,OAAO,CAAC,EAAE,kBAAkB,CAAC;IAC7B,YAAY,EAAE,OAAO,CAAC;IACtB,QAAQ,EAAE,CAAC,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IAC9D,mFAAmF;IACnF,kBAAkB,EAAE;QAAE,GAAG,EAAE,GAAG,CAAC,gBAAgB,CAAC,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAE,CAAC;IACjE,UAAU,EAAE,MAAM,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAAC,CAAC;IAClD;;;6BAGyB;IACzB,MAAM,CAAC,EAAE,oBAAoB,GAAG,IAAI,CAAC;CACtC;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,SAAS,EACT,OAAO,EACP,YAAY,EACZ,QAAQ,EACR,kBAAkB,EAClB,UAAU,EACV,MAAa,GACd,EAAE,gBAAgB,+BAyVlB;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"}
|
|
@@ -616,6 +616,7 @@ function BookingForm({
|
|
|
616
616
|
submitLabel,
|
|
617
617
|
footerNote,
|
|
618
618
|
fieldRows,
|
|
619
|
+
fieldCopy,
|
|
619
620
|
consent,
|
|
620
621
|
isSubmitting,
|
|
621
622
|
onSubmit,
|
|
@@ -715,18 +716,32 @@ function BookingForm({
|
|
|
715
716
|
const err = _optionalChain([errors, 'access', _19 => _19.formFields, 'optionalAccess', _20 => _20[name]]);
|
|
716
717
|
return _optionalChain([err, 'optionalAccess', _21 => _21.message]);
|
|
717
718
|
};
|
|
718
|
-
const renderField = (field, where) =>
|
|
719
|
-
field
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
|
|
719
|
+
const renderField = (field, where) => {
|
|
720
|
+
const copy = _optionalChain([fieldCopy, 'optionalAccess', _22 => _22[field.name]]);
|
|
721
|
+
const shown = copy ? { ...field, label: _nullishCoalesce(copy.label, () => ( field.label)), placeholder: _nullishCoalesce(copy.placeholder, () => ( field.placeholder)) } : field;
|
|
722
|
+
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
723
|
+
_chunkQVSVRG7Icjs.FieldWrapper,
|
|
724
|
+
{
|
|
725
|
+
label: shown.label,
|
|
726
|
+
htmlFor: where.id,
|
|
727
|
+
required: shown.required,
|
|
728
|
+
error: where.error,
|
|
729
|
+
children: FIELD_CONTROLS[shown.type]({
|
|
730
|
+
field: shown,
|
|
731
|
+
id: where.id,
|
|
732
|
+
registerName: where.registerName,
|
|
733
|
+
error: where.error,
|
|
734
|
+
register,
|
|
735
|
+
control
|
|
736
|
+
})
|
|
737
|
+
},
|
|
738
|
+
shown.name
|
|
739
|
+
);
|
|
740
|
+
};
|
|
726
741
|
const builtInFields = Object.fromEntries(
|
|
727
742
|
BUILT_IN_BOOKING_FIELDS.map((field) => [
|
|
728
743
|
field.name,
|
|
729
|
-
renderField(field, { id: builtInId(field.name), registerName: field.name, error: _optionalChain([errors, 'access',
|
|
744
|
+
renderField(field, { id: builtInId(field.name), registerName: field.name, error: _optionalChain([errors, 'access', _23 => _23[field.name], 'optionalAccess', _24 => _24.message]) })
|
|
730
745
|
])
|
|
731
746
|
);
|
|
732
747
|
const renderDeclaredField = (field) => renderField(field, {
|
|
@@ -787,7 +802,7 @@ function BookingForm({
|
|
|
787
802
|
// box doesn't shove the submit button down the card. With no error the
|
|
788
803
|
// wrapper is `display:contents` and the panel below is the flex item,
|
|
789
804
|
// exactly as it was.
|
|
790
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkQVSVRG7Icjs.FieldWrapper, { error: _optionalChain([errors, 'access',
|
|
805
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkQVSVRG7Icjs.FieldWrapper, { error: _optionalChain([errors, 'access', _25 => _25.legalConsentResponses, 'optionalAccess', _26 => _26.message]), children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex flex-col gap-[var(--spacing-system-xs)]", children: [
|
|
791
806
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-ods-text-secondary text-h6", children: legalConsent.processingConsentText }),
|
|
792
807
|
legalConsent.communicationConsentText && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-ods-text-secondary text-h6", children: legalConsent.communicationConsentText }),
|
|
793
808
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
@@ -806,7 +821,7 @@ function BookingForm({
|
|
|
806
821
|
_chunkVZMST7BDcjs.CheckboxBlock,
|
|
807
822
|
{
|
|
808
823
|
id: `ms-consent-${box.communicationTypeId}`,
|
|
809
|
-
checked: _nullishCoalesce(_optionalChain([current, 'optionalAccess',
|
|
824
|
+
checked: _nullishCoalesce(_optionalChain([current, 'optionalAccess', _27 => _27.consented]), () => ( false)),
|
|
810
825
|
onCheckedChange: (v) => rhf.onChange(
|
|
811
826
|
responses.map(
|
|
812
827
|
(r) => r.communicationTypeId === box.communicationTypeId ? { ...r, consented: v } : r
|
|
@@ -901,7 +916,7 @@ function zoneLabel(tz) {
|
|
|
901
916
|
timeZone: tz,
|
|
902
917
|
timeZoneName: "shortOffset"
|
|
903
918
|
}).formatToParts(/* @__PURE__ */ new Date());
|
|
904
|
-
const offset = _nullishCoalesce(_optionalChain([parts, 'access',
|
|
919
|
+
const offset = _nullishCoalesce(_optionalChain([parts, 'access', _28 => _28.find, 'call', _29 => _29((p) => p.type === "timeZoneName"), 'optionalAccess', _30 => _30.value]), () => ( ""));
|
|
905
920
|
return offset ? `${tz.replace(/_/g, " ")} (${offset})` : tz.replace(/_/g, " ");
|
|
906
921
|
} catch (e4) {
|
|
907
922
|
return tz.replace(/_/g, " ");
|
|
@@ -1028,7 +1043,7 @@ function SchedulerContextPanel({
|
|
|
1028
1043
|
value: timezone,
|
|
1029
1044
|
disabled,
|
|
1030
1045
|
onChange: (tz) => {
|
|
1031
|
-
if (tz) _optionalChain([onTimezoneChange, 'optionalCall',
|
|
1046
|
+
if (tz) _optionalChain([onTimezoneChange, 'optionalCall', _31 => _31(tz)]);
|
|
1032
1047
|
},
|
|
1033
1048
|
options: zoneOptions,
|
|
1034
1049
|
placeholder: "Search timezone\u2026",
|
|
@@ -1112,7 +1127,7 @@ function DayCalendar({ monthOffset, onMonthOffsetChange, selectedDay, onSelectDa
|
|
|
1112
1127
|
const startMonth = new Date(now.getFullYear(), now.getMonth(), 1);
|
|
1113
1128
|
const endMonth = new Date(now.getFullYear(), now.getMonth() + _chunkVZMST7BDcjs.MAX_MONTH_OFFSET + 1, 0);
|
|
1114
1129
|
const visibleMonth = new Date(now.getFullYear(), now.getMonth() + monthOffset, 1);
|
|
1115
|
-
const dayHasNoSlots = _react.useCallback.call(void 0, (day) => !_optionalChain([slotsByDay, 'optionalAccess',
|
|
1130
|
+
const dayHasNoSlots = _react.useCallback.call(void 0, (day) => !_optionalChain([slotsByDay, 'optionalAccess', _32 => _32.has, 'call', _33 => _33(calendarDayKey(day))]), [slotsByDay]);
|
|
1116
1131
|
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,
|
|
1117
1132
|
_chunkVZMST7BDcjs.DatePickerCalendar,
|
|
1118
1133
|
{
|
|
@@ -1130,7 +1145,7 @@ function DayCalendar({ monthOffset, onMonthOffsetChange, selectedDay, onSelectDa
|
|
|
1130
1145
|
const day = value;
|
|
1131
1146
|
if (!day) return;
|
|
1132
1147
|
const key = calendarDayKey(day);
|
|
1133
|
-
if (_optionalChain([slotsByDay, 'optionalAccess',
|
|
1148
|
+
if (_optionalChain([slotsByDay, 'optionalAccess', _34 => _34.has, 'call', _35 => _35(key)])) onSelectDay(key);
|
|
1134
1149
|
},
|
|
1135
1150
|
disabledDays: slotsByDay === null ? DISABLE_EVERY_DAY : dayHasNoSlots
|
|
1136
1151
|
}
|
|
@@ -1354,7 +1369,7 @@ function MeetingSchedulerDirectory({
|
|
|
1354
1369
|
};
|
|
1355
1370
|
}, [initialData, includeAll, apiBaseUrl]);
|
|
1356
1371
|
const rows = _react.useMemo.call(void 0, () => {
|
|
1357
|
-
const purposes = _nullishCoalesce(_optionalChain([data, 'optionalAccess',
|
|
1372
|
+
const purposes = _nullishCoalesce(_optionalChain([data, 'optionalAccess', _36 => _36.purposes]), () => ( []));
|
|
1358
1373
|
return purposes.flatMap((p) => p.links.map((link) => ({ link, audienceLabel: p.label })));
|
|
1359
1374
|
}, [data]);
|
|
1360
1375
|
const totalPages = _chunkVTYP25OWcjs.pageCount.call(void 0, rows.length, pageSize);
|
|
@@ -1511,7 +1526,7 @@ function HubSpotMeetingScheduler({
|
|
|
1511
1526
|
onStageChangeRef.current = onStageChange;
|
|
1512
1527
|
});
|
|
1513
1528
|
_react.useEffect.call(void 0, () => {
|
|
1514
|
-
_optionalChain([onStageChangeRef, 'access',
|
|
1529
|
+
_optionalChain([onStageChangeRef, 'access', _37 => _37.current, 'optionalCall', _38 => _38(stage)]);
|
|
1515
1530
|
}, [stage]);
|
|
1516
1531
|
const [stash, setStash] = _react.useState.call(void 0, null);
|
|
1517
1532
|
const inFlightRef = _react.useRef.call(void 0, false);
|
|
@@ -1542,8 +1557,8 @@ function HubSpotMeetingScheduler({
|
|
|
1542
1557
|
_react.useEffect.call(void 0, () => {
|
|
1543
1558
|
autoAdvanceCount.current = 0;
|
|
1544
1559
|
}, [meetingId]);
|
|
1545
|
-
const durations = _react.useMemo.call(void 0, () => _nullishCoalesce(_optionalChain([availability, 'optionalAccess',
|
|
1546
|
-
const shownHosts = _nullishCoalesce(_nullishCoalesce(hosts, () => ( _optionalChain([availability, 'optionalAccess',
|
|
1560
|
+
const durations = _react.useMemo.call(void 0, () => _nullishCoalesce(_optionalChain([availability, 'optionalAccess', _39 => _39.durationsMs]), () => ( [])), [_optionalChain([availability, 'optionalAccess', _40 => _40.durationsMs])]);
|
|
1561
|
+
const shownHosts = _nullishCoalesce(_nullishCoalesce(hosts, () => ( _optionalChain([availability, 'optionalAccess', _41 => _41.hosts]))), () => ( []));
|
|
1547
1562
|
const durationMs = _nullishCoalesce(_nullishCoalesce(pickedDurationMs, () => ( durations[0])), () => ( null));
|
|
1548
1563
|
const slots = _react.useMemo.call(void 0, () => {
|
|
1549
1564
|
if (!availability || durationMs == null) return [];
|
|
@@ -1603,7 +1618,7 @@ function HubSpotMeetingScheduler({
|
|
|
1603
1618
|
_chunkRCLYHHB3cjs.completeFormRescue.call(void 0, rescue, payload[_chunkRCLYHHB3cjs.FORM_RESCUE_ATTEMPT_FIELD]);
|
|
1604
1619
|
setConfirmation(result.confirmation);
|
|
1605
1620
|
setStep("confirmed");
|
|
1606
|
-
_optionalChain([onBooked, 'optionalCall',
|
|
1621
|
+
_optionalChain([onBooked, 'optionalCall', _42 => _42(result.confirmation)]);
|
|
1607
1622
|
return;
|
|
1608
1623
|
}
|
|
1609
1624
|
const code = _nullishCoalesce(result.code, () => ( "TEMPORARILY_UNAVAILABLE"));
|
|
@@ -1651,8 +1666,8 @@ function HubSpotMeetingScheduler({
|
|
|
1651
1666
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: stepPanelClass, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1652
1667
|
BookingFormSkeleton,
|
|
1653
1668
|
{
|
|
1654
|
-
fieldRows: _optionalChain([detailsFormProps, 'optionalAccess',
|
|
1655
|
-
consent: Boolean(_optionalChain([detailsFormProps, 'optionalAccess',
|
|
1669
|
+
fieldRows: _optionalChain([detailsFormProps, 'optionalAccess', _43 => _43.fieldRows]),
|
|
1670
|
+
consent: Boolean(_optionalChain([detailsFormProps, 'optionalAccess', _44 => _44.consent])),
|
|
1656
1671
|
footerNote: preset.footerNote
|
|
1657
1672
|
}
|
|
1658
1673
|
) })
|
|
@@ -1713,7 +1728,7 @@ function HubSpotMeetingScheduler({
|
|
|
1713
1728
|
deferSlot: detailsFirst,
|
|
1714
1729
|
submitLabel: preset.submitLabel,
|
|
1715
1730
|
footerNote: preset.footerNote,
|
|
1716
|
-
initialValues: detailsFirst ? _optionalChain([stash, 'optionalAccess',
|
|
1731
|
+
initialValues: detailsFirst ? _optionalChain([stash, 'optionalAccess', _45 => _45.payload]) : void 0,
|
|
1717
1732
|
isSubmitting,
|
|
1718
1733
|
onSubmit: detailsFirst ? stashDetails : handleSubmit,
|
|
1719
1734
|
honeypotInputProps,
|