@flamingo-stack/openframe-frontend-core 0.0.636 → 0.0.637-2196.6270.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 +1 -8
- package/dist/components/meeting-scheduler/booking-form.d.ts.map +1 -1
- package/dist/components/meeting-scheduler/index.cjs +3 -7
- package/dist/components/meeting-scheduler/index.cjs.map +1 -1
- package/dist/components/meeting-scheduler/index.d.ts +1 -7
- package/dist/components/meeting-scheduler/index.d.ts.map +1 -1
- package/dist/components/meeting-scheduler/index.js +3 -7
- package/dist/components/meeting-scheduler/index.js.map +1 -1
- package/package.json +1 -1
- package/src/components/meeting-scheduler/booking-form.tsx +4 -17
- package/src/components/meeting-scheduler/index.tsx +0 -8
package/package.json
CHANGED
|
@@ -665,34 +665,21 @@ export function BookingForm({
|
|
|
665
665
|
*/
|
|
666
666
|
export function BookingFormSkeleton({
|
|
667
667
|
fieldRows,
|
|
668
|
-
rowCount,
|
|
669
668
|
consent,
|
|
670
669
|
footerNote,
|
|
671
670
|
}: {
|
|
672
671
|
fieldRows?: BookingFieldRow[];
|
|
673
|
-
/**
|
|
674
|
-
* How many field rows to draw, each full width — a host that knows roughly
|
|
675
|
-
* how tall its link's form is (it cannot know the questions before
|
|
676
|
-
* availability lands) sets it instead of relying on `fieldRows` or the
|
|
677
|
-
* built-in rows plus one block for the questions. Wins over `fieldRows`.
|
|
678
|
-
*/
|
|
679
|
-
rowCount?: number;
|
|
680
672
|
/** Whether the host adds its consent row (drawn only then). A HubSpot
|
|
681
673
|
* `legalConsent` block is unknown until availability lands — the one
|
|
682
674
|
* footprint this skeleton cannot budget for. */
|
|
683
675
|
consent?: boolean;
|
|
684
676
|
footerNote?: string;
|
|
685
677
|
}) {
|
|
686
|
-
// `rowCount` rows are one full-width slot each; host rows (or the built-in
|
|
687
|
-
// layout) go through the loaded form's normalisation (`normalizeFieldRows`).
|
|
688
|
-
const rows =
|
|
689
|
-
rowCount !== undefined
|
|
690
|
-
? Array.from({ length: rowCount }, (_, index): BookingFieldRow => [{ name: `skeleton-row-${index}` }])
|
|
691
|
-
: skeletonRows(fieldRows ?? DEFAULT_FIELD_ROWS);
|
|
692
678
|
return (
|
|
693
679
|
<div className={cn('flex-1', FORM_STACK)}>
|
|
694
|
-
{/*
|
|
695
|
-
|
|
680
|
+
{/* The host's rows (or the built-in layout) through the SAME grid, column
|
|
681
|
+
rule and normalisation as the loaded form — see `normalizeFieldRows`. */}
|
|
682
|
+
{skeletonRows(fieldRows ?? DEFAULT_FIELD_ROWS).map(row => (
|
|
696
683
|
<div key={row.map(s => s.name).join('|')} className={ROW_GRID}>
|
|
697
684
|
{row.map((slot, slotIndex) => (
|
|
698
685
|
<Skeleton key={slot.name} className={cn(FIELD_SKELETON_CLASS, slotColumnClass(row, slot, slotIndex))} />
|
|
@@ -700,7 +687,7 @@ export function BookingFormSkeleton({
|
|
|
700
687
|
</div>
|
|
701
688
|
))}
|
|
702
689
|
{/* Without rows there is no telling how many questions the link declares: one long answer stands for them. */}
|
|
703
|
-
{
|
|
690
|
+
{!fieldRows && <Skeleton className="h-[7.75rem] w-full" />}
|
|
704
691
|
{consent && <Skeleton className="h-[4.25rem] w-full" />}
|
|
705
692
|
{footerNote ? (
|
|
706
693
|
<div className={FOOTER_ROW_CLASS}>
|
|
@@ -143,12 +143,6 @@ export interface HubSpotMeetingSchedulerProps {
|
|
|
143
143
|
* can pass it across the RSC boundary where a component cannot.
|
|
144
144
|
*/
|
|
145
145
|
detailsFormProps?: Pick<BookingFormProps, 'fieldRows' | 'consent'>;
|
|
146
|
-
/**
|
|
147
|
-
* `flow="details-first"`: how many full-width field rows the cold-start form
|
|
148
|
-
* skeleton draws (see `BookingFormSkeleton`'s `rowCount`). Omit for the
|
|
149
|
-
* `fieldRows` / built-in footprint.
|
|
150
|
-
*/
|
|
151
|
-
skeletonRowCount?: number;
|
|
152
146
|
}
|
|
153
147
|
|
|
154
148
|
type Step = 'slot' | 'details' | 'confirmed';
|
|
@@ -396,7 +390,6 @@ export function HubSpotMeetingScheduler({
|
|
|
396
390
|
flow = DEFAULT_SCHEDULER_FLOW,
|
|
397
391
|
detailsForm: DetailsForm = BookingForm,
|
|
398
392
|
detailsFormProps,
|
|
399
|
-
skeletonRowCount,
|
|
400
393
|
}: HubSpotMeetingSchedulerProps) {
|
|
401
394
|
const {
|
|
402
395
|
availability,
|
|
@@ -725,7 +718,6 @@ export function HubSpotMeetingScheduler({
|
|
|
725
718
|
<div className={stepPanelClass}>
|
|
726
719
|
<BookingFormSkeleton
|
|
727
720
|
fieldRows={detailsFormProps?.fieldRows}
|
|
728
|
-
rowCount={skeletonRowCount}
|
|
729
721
|
consent={Boolean(detailsFormProps?.consent)}
|
|
730
722
|
footerNote={preset.footerNote}
|
|
731
723
|
/>
|