@voyantjs/flights-ui 0.20.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/airline-logo.d.ts +19 -0
- package/dist/components/airline-logo.d.ts.map +1 -0
- package/dist/components/airline-logo.js +18 -0
- package/dist/components/airport-combobox.d.ts +20 -0
- package/dist/components/airport-combobox.d.ts.map +1 -0
- package/dist/components/airport-combobox.js +29 -0
- package/dist/components/flight-baggage-step.d.ts +32 -0
- package/dist/components/flight-baggage-step.d.ts.map +1 -0
- package/dist/components/flight-baggage-step.js +106 -0
- package/dist/components/flight-billing-step.d.ts +69 -0
- package/dist/components/flight-billing-step.d.ts.map +1 -0
- package/dist/components/flight-billing-step.js +111 -0
- package/dist/components/flight-booking-journey.d.ts +31 -0
- package/dist/components/flight-booking-journey.d.ts.map +1 -0
- package/dist/components/flight-booking-journey.js +114 -0
- package/dist/components/flight-booking-ledger.d.ts +53 -0
- package/dist/components/flight-booking-ledger.d.ts.map +1 -0
- package/dist/components/flight-booking-ledger.js +94 -0
- package/dist/components/flight-booking-shell.d.ts +92 -0
- package/dist/components/flight-booking-shell.d.ts.map +1 -0
- package/dist/components/flight-booking-shell.js +486 -0
- package/dist/components/flight-contact-form.d.ts +16 -0
- package/dist/components/flight-contact-form.d.ts.map +1 -0
- package/dist/components/flight-contact-form.js +21 -0
- package/dist/components/flight-fare-upsell-step.d.ts +26 -0
- package/dist/components/flight-fare-upsell-step.d.ts.map +1 -0
- package/dist/components/flight-fare-upsell-step.js +141 -0
- package/dist/components/flight-filters-bar.d.ts +19 -0
- package/dist/components/flight-filters-bar.d.ts.map +1 -0
- package/dist/components/flight-filters-bar.js +90 -0
- package/dist/components/flight-itinerary.d.ts +28 -0
- package/dist/components/flight-itinerary.d.ts.map +1 -0
- package/dist/components/flight-itinerary.js +90 -0
- package/dist/components/flight-offer-detail.d.ts +21 -0
- package/dist/components/flight-offer-detail.d.ts.map +1 -0
- package/dist/components/flight-offer-detail.js +61 -0
- package/dist/components/flight-offer-row.d.ts +25 -0
- package/dist/components/flight-offer-row.d.ts.map +1 -0
- package/dist/components/flight-offer-row.js +74 -0
- package/dist/components/flight-order-confirmation.d.ts +13 -0
- package/dist/components/flight-order-confirmation.d.ts.map +1 -0
- package/dist/components/flight-order-confirmation.js +50 -0
- package/dist/components/flight-passenger-form.d.ts +49 -0
- package/dist/components/flight-passenger-form.d.ts.map +1 -0
- package/dist/components/flight-passenger-form.js +155 -0
- package/dist/components/flight-payment-selector.d.ts +13 -0
- package/dist/components/flight-payment-selector.d.ts.map +1 -0
- package/dist/components/flight-payment-selector.js +36 -0
- package/dist/components/flight-payment-step.d.ts +32 -0
- package/dist/components/flight-payment-step.d.ts.map +1 -0
- package/dist/components/flight-payment-step.js +82 -0
- package/dist/components/flight-search-form.d.ts +14 -0
- package/dist/components/flight-search-form.d.ts.map +1 -0
- package/dist/components/flight-search-form.js +56 -0
- package/dist/components/flight-seat-map.d.ts +32 -0
- package/dist/components/flight-seat-map.d.ts.map +1 -0
- package/dist/components/flight-seat-map.js +96 -0
- package/dist/components/flight-seats-step.d.ts +40 -0
- package/dist/components/flight-seats-step.d.ts.map +1 -0
- package/dist/components/flight-seats-step.js +211 -0
- package/dist/components/flight-services-step.d.ts +27 -0
- package/dist/components/flight-services-step.d.ts.map +1 -0
- package/dist/components/flight-services-step.js +110 -0
- package/dist/components/pax-cabin-popover.d.ts +18 -0
- package/dist/components/pax-cabin-popover.d.ts.map +1 -0
- package/dist/components/pax-cabin-popover.js +38 -0
- package/dist/components/popular-routes.d.ts +47 -0
- package/dist/components/popular-routes.d.ts.map +1 -0
- package/dist/components/popular-routes.js +126 -0
- package/dist/index.d.ts +26 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +23 -0
- package/package.json +77 -0
- package/src/styles.css +1 -0
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import type { FlightOffer, Money, PassengerCounts } from "@voyantjs/flights/contract/types";
|
|
2
|
+
/**
|
|
3
|
+
* Per-leg selection passed through the booking journey. Two single-itinerary
|
|
4
|
+
* offers when round-trip; one when one-way. The shell synthesizes a combined
|
|
5
|
+
* offer from these at submit time.
|
|
6
|
+
*/
|
|
7
|
+
export interface FlightItinerarySelection {
|
|
8
|
+
outbound: FlightOffer;
|
|
9
|
+
return?: FlightOffer;
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* Optional ancillary line items rendered nested under the relevant leg.
|
|
13
|
+
* Phases 2/3 wire bag/seat picks here; for Phase 1 it's just a placeholder
|
|
14
|
+
* shape so the ledger doesn't need to change later.
|
|
15
|
+
*/
|
|
16
|
+
export interface LedgerLineItem {
|
|
17
|
+
label: string;
|
|
18
|
+
amount?: Money;
|
|
19
|
+
/** Free-text right-side value (e.g. "Included") when no money applies. */
|
|
20
|
+
meta?: string;
|
|
21
|
+
}
|
|
22
|
+
export interface FlightBookingLedgerProps {
|
|
23
|
+
selection: FlightItinerarySelection;
|
|
24
|
+
passengers: PassengerCounts;
|
|
25
|
+
carrierName?: (iataCode: string) => string | undefined;
|
|
26
|
+
airportName?: (iataCode: string) => string | undefined;
|
|
27
|
+
/** Per-leg ancillary line items (bags / seats / extras). */
|
|
28
|
+
outboundExtras?: LedgerLineItem[];
|
|
29
|
+
returnExtras?: LedgerLineItem[];
|
|
30
|
+
/** Sticky CTA at the bottom — typically "Continue" or "Confirm". */
|
|
31
|
+
cta?: {
|
|
32
|
+
label: string;
|
|
33
|
+
onClick: () => void;
|
|
34
|
+
disabled?: boolean;
|
|
35
|
+
loading?: boolean;
|
|
36
|
+
};
|
|
37
|
+
/** Per-leg edit handlers — open the search results back up. */
|
|
38
|
+
onEditOutbound?: () => void;
|
|
39
|
+
onEditReturn?: () => void;
|
|
40
|
+
/** Step status hints — checks shown next to each section name. */
|
|
41
|
+
completedSections?: ReadonlySet<LedgerSection>;
|
|
42
|
+
className?: string;
|
|
43
|
+
}
|
|
44
|
+
export type LedgerSection = "flights" | "passengers" | "bags" | "seats" | "services" | "documents" | "billing" | "payment";
|
|
45
|
+
/**
|
|
46
|
+
* Sticky right-rail price ledger. Mirrors the running total + per-leg
|
|
47
|
+
* breakdown that real airline checkouts use (Wizz/Ryanair/Lufthansa). One
|
|
48
|
+
* source of truth for the total — the shell passes ancillary picks down via
|
|
49
|
+
* `outboundExtras`/`returnExtras`, so the ledger doesn't need to know how
|
|
50
|
+
* they were collected.
|
|
51
|
+
*/
|
|
52
|
+
export declare function FlightBookingLedger({ selection, passengers, carrierName, airportName, outboundExtras, returnExtras, cta, onEditOutbound, onEditReturn, completedSections, className, }: FlightBookingLedgerProps): import("react/jsx-runtime").JSX.Element;
|
|
53
|
+
//# sourceMappingURL=flight-booking-ledger.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"flight-booking-ledger.d.ts","sourceRoot":"","sources":["../../src/components/flight-booking-ledger.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,WAAW,EAAE,KAAK,EAAE,eAAe,EAAE,MAAM,kCAAkC,CAAA;AAO3F;;;;GAIG;AACH,MAAM,WAAW,wBAAwB;IACvC,QAAQ,EAAE,WAAW,CAAA;IACrB,MAAM,CAAC,EAAE,WAAW,CAAA;CACrB;AAED;;;;GAIG;AACH,MAAM,WAAW,cAAc;IAC7B,KAAK,EAAE,MAAM,CAAA;IACb,MAAM,CAAC,EAAE,KAAK,CAAA;IACd,0EAA0E;IAC1E,IAAI,CAAC,EAAE,MAAM,CAAA;CACd;AAED,MAAM,WAAW,wBAAwB;IACvC,SAAS,EAAE,wBAAwB,CAAA;IACnC,UAAU,EAAE,eAAe,CAAA;IAC3B,WAAW,CAAC,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,MAAM,GAAG,SAAS,CAAA;IACtD,WAAW,CAAC,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,MAAM,GAAG,SAAS,CAAA;IACtD,4DAA4D;IAC5D,cAAc,CAAC,EAAE,cAAc,EAAE,CAAA;IACjC,YAAY,CAAC,EAAE,cAAc,EAAE,CAAA;IAC/B,oEAAoE;IACpE,GAAG,CAAC,EAAE;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,OAAO,EAAE,MAAM,IAAI,CAAC;QAAC,QAAQ,CAAC,EAAE,OAAO,CAAC;QAAC,OAAO,CAAC,EAAE,OAAO,CAAA;KAAE,CAAA;IACnF,+DAA+D;IAC/D,cAAc,CAAC,EAAE,MAAM,IAAI,CAAA;IAC3B,YAAY,CAAC,EAAE,MAAM,IAAI,CAAA;IACzB,kEAAkE;IAClE,iBAAiB,CAAC,EAAE,WAAW,CAAC,aAAa,CAAC,CAAA;IAC9C,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB;AAED,MAAM,MAAM,aAAa,GACrB,SAAS,GACT,YAAY,GACZ,MAAM,GACN,OAAO,GACP,UAAU,GACV,WAAW,GACX,SAAS,GACT,SAAS,CAAA;AAEb;;;;;;GAMG;AACH,wBAAgB,mBAAmB,CAAC,EAClC,SAAS,EACT,UAAU,EACV,WAAW,EACX,WAAW,EACX,cAAc,EACd,YAAY,EACZ,GAAG,EACH,cAAc,EACd,YAAY,EACZ,iBAAiB,EACjB,SAAS,GACV,EAAE,wBAAwB,2CAuD1B"}
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
3
|
+
import { Button } from "@voyantjs/ui/components/button";
|
|
4
|
+
import { cn } from "@voyantjs/ui/lib/utils";
|
|
5
|
+
import { Check, Pencil, Plane, Users } from "lucide-react";
|
|
6
|
+
import { AirlineLogo } from "./airline-logo";
|
|
7
|
+
/**
|
|
8
|
+
* Sticky right-rail price ledger. Mirrors the running total + per-leg
|
|
9
|
+
* breakdown that real airline checkouts use (Wizz/Ryanair/Lufthansa). One
|
|
10
|
+
* source of truth for the total — the shell passes ancillary picks down via
|
|
11
|
+
* `outboundExtras`/`returnExtras`, so the ledger doesn't need to know how
|
|
12
|
+
* they were collected.
|
|
13
|
+
*/
|
|
14
|
+
export function FlightBookingLedger({ selection, passengers, carrierName, airportName, outboundExtras, returnExtras, cta, onEditOutbound, onEditReturn, completedSections, className, }) {
|
|
15
|
+
const total = computeTotal(selection, outboundExtras, returnExtras);
|
|
16
|
+
const paxTotal = (passengers.adults ?? 0) + (passengers.children ?? 0) + (passengers.infants ?? 0);
|
|
17
|
+
return (_jsxs("aside", { className: cn("flex w-full max-w-sm flex-col gap-4 rounded-xl border bg-card p-4 shadow-sm", className), children: [_jsx(LegBlock, { label: selection.return ? "Outbound" : "Flight", offer: selection.outbound, carrierName: carrierName, airportName: airportName, extras: outboundExtras, onEdit: onEditOutbound, complete: completedSections?.has("flights") }), selection.return && (_jsx(LegBlock, { label: "Return", offer: selection.return, carrierName: carrierName, airportName: airportName, extras: returnExtras, onEdit: onEditReturn, complete: completedSections?.has("flights") })), _jsx(SectionRow, { icon: _jsx(Users, { className: "h-3.5 w-3.5" }), label: "Passengers", right: `${paxTotal} pax`, complete: completedSections?.has("passengers") }), _jsx(PlaceholderSections, { completed: completedSections }), _jsxs("div", { className: "mt-2 flex items-center justify-between border-t pt-3", children: [_jsx("span", { className: "font-medium text-sm", children: "Total" }), _jsx("span", { className: "font-semibold text-lg tabular-nums", children: formatMoney(total.amount, total.currency) })] }), cta && (_jsx(Button, { className: "w-full", onClick: cta.onClick, disabled: cta.disabled || cta.loading, children: cta.loading ? "Working…" : cta.label }))] }));
|
|
18
|
+
}
|
|
19
|
+
// ─────────────────────────────────────────────────────────────────────────────
|
|
20
|
+
function LegBlock({ label, offer, carrierName, airportName, extras, onEdit, complete, }) {
|
|
21
|
+
const itin = offer.itineraries[0];
|
|
22
|
+
if (!itin)
|
|
23
|
+
return null;
|
|
24
|
+
const segs = itin.segments;
|
|
25
|
+
const first = segs[0];
|
|
26
|
+
const last = segs[segs.length - 1];
|
|
27
|
+
if (!first || !last)
|
|
28
|
+
return null;
|
|
29
|
+
const carriers = Array.from(new Set(segs.map((s) => s.carrierCode)));
|
|
30
|
+
const stops = segs.length - 1;
|
|
31
|
+
return (_jsxs("div", { className: "flex flex-col gap-2", children: [_jsxs("div", { className: "flex items-center justify-between gap-2", children: [_jsxs("div", { className: "flex items-center gap-1.5", children: [complete ? (_jsx(Check, { className: "h-3.5 w-3.5 text-emerald-600" })) : (_jsx(Plane, { className: "h-3.5 w-3.5 text-muted-foreground" })), _jsx("span", { className: "font-medium text-[11px] uppercase tracking-wider text-muted-foreground", children: label })] }), _jsxs("div", { className: "flex items-center gap-2", children: [_jsx("span", { className: "font-semibold text-sm tabular-nums", children: formatMoney(offer.totalPrice.amount, offer.totalPrice.currency) }), onEdit && (_jsx(Button, { type: "button", variant: "ghost", size: "sm", className: "h-6 px-1.5 text-muted-foreground", onClick: onEdit, children: _jsx(Pencil, { className: "h-3 w-3" }) }))] })] }), _jsxs("div", { className: "flex items-center gap-2", children: [_jsx("div", { className: "flex shrink-0 items-center -space-x-1", children: carriers.map((code) => (_jsx(AirlineLogo, { iataCode: code, name: carrierName?.(code), size: 18 }, code))) }), _jsxs("div", { className: "flex min-w-0 flex-col leading-tight", children: [_jsxs("span", { className: "truncate font-medium text-sm", children: [airportName?.(first.departure.iataCode) ?? first.departure.iataCode, " \u2192", " ", airportName?.(last.arrival.iataCode) ?? last.arrival.iataCode] }), _jsxs("span", { className: "text-[11px] text-muted-foreground", children: [formatDate(first.departure.at), " \u00B7 ", formatTime(first.departure.at), " \u2013", " ", formatTime(last.arrival.at), " \u00B7", " ", stops === 0 ? "Nonstop" : `${stops} stop${stops > 1 ? "s" : ""}`] })] })] }), extras && extras.length > 0 && (_jsx("ul", { className: "flex flex-col gap-1 border-t pt-2", children: extras.map((x, i) => (_jsxs("li", { className: "flex items-center justify-between text-muted-foreground text-xs", children: [_jsx("span", { children: x.label }), _jsx("span", { className: "tabular-nums", children: x.amount ? formatMoney(x.amount.amount, x.amount.currency) : (x.meta ?? "") })] }, i))) }))] }));
|
|
32
|
+
}
|
|
33
|
+
function SectionRow({ icon, label, right, complete, }) {
|
|
34
|
+
return (_jsxs("div", { className: "flex items-center justify-between border-t pt-3", children: [_jsxs("span", { className: "flex items-center gap-1.5 font-medium text-[11px] uppercase tracking-wider text-muted-foreground", children: [complete ? (_jsx(Check, { className: "h-3.5 w-3.5 text-emerald-600" })) : (_jsx("span", { className: "text-muted-foreground", children: icon })), label] }), right && _jsx("span", { className: "text-muted-foreground text-xs", children: right })] }));
|
|
35
|
+
}
|
|
36
|
+
function PlaceholderSections({ completed }) {
|
|
37
|
+
// Phase 1 only renders Passengers above; later phases will replace this with
|
|
38
|
+
// bags/seats/services/documents/billing rows. The shape stays consistent so
|
|
39
|
+
// the ledger doesn't need to change later.
|
|
40
|
+
if (!completed)
|
|
41
|
+
return null;
|
|
42
|
+
const items = [];
|
|
43
|
+
if (completed.has("billing"))
|
|
44
|
+
items.push({ id: "billing", label: "Billing" });
|
|
45
|
+
if (completed.has("payment"))
|
|
46
|
+
items.push({ id: "payment", label: "Payment" });
|
|
47
|
+
if (items.length === 0)
|
|
48
|
+
return null;
|
|
49
|
+
return (_jsx(_Fragment, { children: items.map((it) => (_jsx(SectionRow, { icon: _jsx("span", {}), label: it.label, complete: completed.has(it.id) }, it.id))) }));
|
|
50
|
+
}
|
|
51
|
+
// ── Helpers ──────────────────────────────────────────────────────────────────
|
|
52
|
+
function computeTotal(selection, outboundExtras, returnExtras) {
|
|
53
|
+
const currency = selection.outbound.totalPrice.currency;
|
|
54
|
+
let amount = num(selection.outbound.totalPrice.amount);
|
|
55
|
+
if (selection.return)
|
|
56
|
+
amount += num(selection.return.totalPrice.amount);
|
|
57
|
+
for (const x of outboundExtras ?? [])
|
|
58
|
+
amount += num(x.amount?.amount);
|
|
59
|
+
for (const x of returnExtras ?? [])
|
|
60
|
+
amount += num(x.amount?.amount);
|
|
61
|
+
return { amount: amount.toFixed(2), currency };
|
|
62
|
+
}
|
|
63
|
+
function num(v) {
|
|
64
|
+
if (!v)
|
|
65
|
+
return 0;
|
|
66
|
+
const n = Number(v);
|
|
67
|
+
return Number.isFinite(n) ? n : 0;
|
|
68
|
+
}
|
|
69
|
+
function formatMoney(amount, currency) {
|
|
70
|
+
const n = Number(amount);
|
|
71
|
+
if (!Number.isFinite(n))
|
|
72
|
+
return `${amount} ${currency}`;
|
|
73
|
+
return new Intl.NumberFormat(undefined, {
|
|
74
|
+
style: "currency",
|
|
75
|
+
currency,
|
|
76
|
+
maximumFractionDigits: 0,
|
|
77
|
+
}).format(n);
|
|
78
|
+
}
|
|
79
|
+
function formatTime(iso) {
|
|
80
|
+
const d = new Date(iso);
|
|
81
|
+
if (Number.isNaN(d.getTime()))
|
|
82
|
+
return iso;
|
|
83
|
+
return new Intl.DateTimeFormat(undefined, { hour: "2-digit", minute: "2-digit" }).format(d);
|
|
84
|
+
}
|
|
85
|
+
function formatDate(iso) {
|
|
86
|
+
const d = new Date(iso);
|
|
87
|
+
if (Number.isNaN(d.getTime()))
|
|
88
|
+
return iso;
|
|
89
|
+
return new Intl.DateTimeFormat(undefined, {
|
|
90
|
+
weekday: "short",
|
|
91
|
+
day: "numeric",
|
|
92
|
+
month: "short",
|
|
93
|
+
}).format(d);
|
|
94
|
+
}
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
import type { AncillaryCatalog, FlightBookRequest, FlightOrder, PassengerCounts } from "@voyantjs/flights/contract/types";
|
|
2
|
+
import { type BillingValue } from "./flight-billing-step";
|
|
3
|
+
import { type FlightItinerarySelection } from "./flight-booking-ledger";
|
|
4
|
+
import { type FlightPassengerFormProps } from "./flight-passenger-form";
|
|
5
|
+
import { type PaymentStepCapabilities, type SavedPaymentMethod } from "./flight-payment-step";
|
|
6
|
+
import { type FlightSeatMapSlot } from "./flight-seats-step";
|
|
7
|
+
/**
|
|
8
|
+
* Per-leg ancillary catalogs supplied by the parent (typically via
|
|
9
|
+
* `useFlightAncillaries(outbound)` + `useFlightAncillaries(return)`).
|
|
10
|
+
* The shell owns the user's picks and merges them into the book request.
|
|
11
|
+
*/
|
|
12
|
+
export interface FlightBookingAncillaries {
|
|
13
|
+
outboundCatalog: AncillaryCatalog | null;
|
|
14
|
+
returnCatalog?: AncillaryCatalog | null;
|
|
15
|
+
loading?: boolean;
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* Seat-map fetcher contract supplied by the parent. The shell calls
|
|
19
|
+
* `getSeatMap` lazily per segment id when the user opens "pick now" mode;
|
|
20
|
+
* the parent typically backs this with `useFlightSeatMap`.
|
|
21
|
+
*/
|
|
22
|
+
export interface FlightBookingSeatMaps {
|
|
23
|
+
/** Returns the slot for the given segment — typically wraps useFlightSeatMap. */
|
|
24
|
+
getSeatMap: (input: {
|
|
25
|
+
offerId: string;
|
|
26
|
+
segmentId: string;
|
|
27
|
+
}) => FlightSeatMapSlot;
|
|
28
|
+
}
|
|
29
|
+
/** Saved-payment-methods slot supplied by the parent (CRM-adjacent in production). */
|
|
30
|
+
export interface FlightBookingSavedPaymentMethods {
|
|
31
|
+
methods: SavedPaymentMethod[];
|
|
32
|
+
loading?: boolean;
|
|
33
|
+
}
|
|
34
|
+
export interface FlightBookingShellProps {
|
|
35
|
+
/** Per-leg pick — outbound always present, return only on round-trips. */
|
|
36
|
+
selection: FlightItinerarySelection;
|
|
37
|
+
passengers: PassengerCounts;
|
|
38
|
+
onBook: (request: FlightBookRequest) => Promise<FlightOrder> | FlightOrder;
|
|
39
|
+
onBooked?: (order: FlightOrder) => void;
|
|
40
|
+
/** "Back to results" affordance. */
|
|
41
|
+
onCancel?: () => void;
|
|
42
|
+
/** Per-leg edit affordances on the ledger — typically navigate back to the search page. */
|
|
43
|
+
onEditOutbound?: () => void;
|
|
44
|
+
onEditReturn?: () => void;
|
|
45
|
+
carrierName?: (iataCode: string) => string | undefined;
|
|
46
|
+
airportName?: (iataCode: string) => string | undefined;
|
|
47
|
+
/** Per-leg ancillary catalogs. When omitted the bags + services steps render skeletons. */
|
|
48
|
+
ancillaries?: FlightBookingAncillaries;
|
|
49
|
+
/** Per-segment seat-map fetcher. When omitted the seats step still works (skip / auto). */
|
|
50
|
+
seatMaps?: FlightBookingSeatMaps;
|
|
51
|
+
/** Saved payment methods on file for the picked contact. */
|
|
52
|
+
savedPaymentMethods?: FlightBookingSavedPaymentMethods;
|
|
53
|
+
/**
|
|
54
|
+
* What the active processor + template offer for immediate-charge flows
|
|
55
|
+
* (`chargeSavedCard`, `newCard`). Hold (which generates the shareable
|
|
56
|
+
* payment link) and the agency-credit extra are always available.
|
|
57
|
+
*
|
|
58
|
+
* See `docs/architecture/payments-architecture.md` §Core Rule 7.
|
|
59
|
+
*/
|
|
60
|
+
paymentCapabilities?: PaymentStepCapabilities;
|
|
61
|
+
/** True when the route requires travel documents (international etc.). */
|
|
62
|
+
documentsRequired?: boolean;
|
|
63
|
+
/**
|
|
64
|
+
* Optional render slot for a person picker on each passenger card.
|
|
65
|
+
* Forwarded to `FlightPassengerForm.renderPicker`.
|
|
66
|
+
*/
|
|
67
|
+
renderPassengerPicker?: FlightPassengerFormProps["renderPicker"];
|
|
68
|
+
/**
|
|
69
|
+
* Render slot for a CRM person picker in the billing step. Receives an
|
|
70
|
+
* `apply` callback the parent invokes with the prefill payload.
|
|
71
|
+
*/
|
|
72
|
+
renderBillingPersonPicker?: (apply: (prefill: Partial<BillingValue>) => void) => React.ReactNode;
|
|
73
|
+
/**
|
|
74
|
+
* Render slot for a CRM organization picker in the billing step (Companie tab).
|
|
75
|
+
*/
|
|
76
|
+
renderBillingOrgPicker?: (apply: (prefill: Partial<BillingValue>) => void) => React.ReactNode;
|
|
77
|
+
/**
|
|
78
|
+
* Called when the user toggles "Save as default" + clicks Continue from
|
|
79
|
+
* billing. Parent may persist back to identity addresses / org.
|
|
80
|
+
*/
|
|
81
|
+
onSaveBillingDefaults?: (value: BillingValue) => void;
|
|
82
|
+
}
|
|
83
|
+
/**
|
|
84
|
+
* Multi-step booking shell with a sticky right-rail price ledger and a top
|
|
85
|
+
* stepper. Steps: review → passengers → bags → services → contact+payment
|
|
86
|
+
* → confirm. The shell owns the per-leg `FlightItinerarySelection` plus
|
|
87
|
+
* ancillary picks (baggage / assistance / extras), and synthesizes a
|
|
88
|
+
* combined `FlightOffer` (with both itineraries merged) when `onBook` is
|
|
89
|
+
* called — so the booking adapter sees a single offer with all legs intact.
|
|
90
|
+
*/
|
|
91
|
+
export declare function FlightBookingShell({ selection, passengers, onBook, onBooked, onCancel, onEditOutbound, onEditReturn, carrierName, airportName, ancillaries, seatMaps, savedPaymentMethods, paymentCapabilities, documentsRequired, renderPassengerPicker, renderBillingPersonPicker, renderBillingOrgPicker, onSaveBillingDefaults, }: FlightBookingShellProps): import("react/jsx-runtime").JSX.Element | null;
|
|
92
|
+
//# sourceMappingURL=flight-booking-shell.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"flight-booking-shell.d.ts","sourceRoot":"","sources":["../../src/components/flight-booking-shell.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EACV,gBAAgB,EAEhB,iBAAiB,EAEjB,WAAW,EAEX,eAAe,EAGhB,MAAM,kCAAkC,CAAA;AAOzC,OAAO,EACL,KAAK,YAAY,EAIlB,MAAM,uBAAuB,CAAA;AAC9B,OAAO,EAEL,KAAK,wBAAwB,EAE9B,MAAM,yBAAyB,CAAA;AAGhC,OAAO,EAEL,KAAK,wBAAwB,EAE9B,MAAM,yBAAyB,CAAA;AAChC,OAAO,EAEL,KAAK,uBAAuB,EAC5B,KAAK,kBAAkB,EACxB,MAAM,uBAAuB,CAAA;AAC9B,OAAO,EAAE,KAAK,iBAAiB,EAAmB,MAAM,qBAAqB,CAAA;AAkD7E;;;;GAIG;AACH,MAAM,WAAW,wBAAwB;IACvC,eAAe,EAAE,gBAAgB,GAAG,IAAI,CAAA;IACxC,aAAa,CAAC,EAAE,gBAAgB,GAAG,IAAI,CAAA;IACvC,OAAO,CAAC,EAAE,OAAO,CAAA;CAClB;AAED;;;;GAIG;AACH,MAA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