@voyant-travel/bookings-react 0.142.0 → 0.142.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/admin/index.d.ts +2 -2
- package/dist/extras/hooks/use-slot-extra-manifest-mutation.d.ts +3 -3
- package/dist/extras/hooks/use-slot-extra-manifest.d.ts +1 -1
- package/dist/extras/query-options.d.ts +4 -4
- package/dist/extras/schemas.d.ts +3 -3
- package/dist/hooks/use-booking-action-ledger.d.ts +1 -1
- package/dist/hooks/use-supplier-status-mutation.d.ts +2 -2
- package/dist/hooks/use-supplier-statuses.d.ts +1 -1
- package/dist/journey/components/booking-journey.d.ts.map +1 -1
- package/dist/journey/components/booking-journey.js +9 -4
- package/dist/journey/components/journey-steps/billing-step.d.ts +1 -1
- package/dist/journey/components/journey-steps/billing-step.d.ts.map +1 -1
- package/dist/journey/components/journey-steps/billing-step.js +2 -2
- package/dist/journey/components/journey-steps/shared.d.ts +30 -1
- package/dist/journey/components/journey-steps/shared.d.ts.map +1 -1
- package/dist/journey/components/journey-steps/shared.js +45 -3
- package/dist/journey/components/journey-steps/travelers-step.d.ts +1 -1
- package/dist/journey/components/journey-steps/travelers-step.d.ts.map +1 -1
- package/dist/journey/components/journey-steps/travelers-step.js +4 -4
- package/dist/journey/components/journey-steps.d.ts +1 -1
- package/dist/journey/components/journey-steps.d.ts.map +1 -1
- package/dist/journey/components/journey-steps.js +1 -1
- package/dist/journey/types.d.ts +9 -0
- package/dist/journey/types.d.ts.map +1 -1
- package/dist/query-options.d.ts +4 -4
- package/dist/requirements/hooks/use-booking-questions.d.ts +1 -1
- package/dist/requirements/query-options.d.ts +4 -4
- package/dist/requirements/schemas.d.ts +3 -3
- package/dist/schemas.d.ts +6 -6
- package/package.json +11 -11
package/dist/admin/index.d.ts
CHANGED
|
@@ -134,8 +134,8 @@ export declare const bookingDetailTabSchema: z.ZodEnum<{
|
|
|
134
134
|
metadata: "metadata";
|
|
135
135
|
items: "items";
|
|
136
136
|
travelers: "travelers";
|
|
137
|
-
activity: "activity";
|
|
138
137
|
documents: "documents";
|
|
138
|
+
activity: "activity";
|
|
139
139
|
finance: "finance";
|
|
140
140
|
invoices: "invoices";
|
|
141
141
|
suppliers: "suppliers";
|
|
@@ -152,8 +152,8 @@ export declare const bookingDetailSearchSchema: z.ZodObject<{
|
|
|
152
152
|
metadata: "metadata";
|
|
153
153
|
items: "items";
|
|
154
154
|
travelers: "travelers";
|
|
155
|
-
activity: "activity";
|
|
156
155
|
documents: "documents";
|
|
156
|
+
activity: "activity";
|
|
157
157
|
finance: "finance";
|
|
158
158
|
invoices: "invoices";
|
|
159
159
|
suppliers: "suppliers";
|
|
@@ -12,7 +12,7 @@ export declare function useSlotExtraManifestMutation(slotId: string): {
|
|
|
12
12
|
productExtraId: string;
|
|
13
13
|
optionExtraConfigId?: string | null | undefined;
|
|
14
14
|
status?: "selected" | "cancelled" | "fulfilled" | "no_show" | undefined;
|
|
15
|
-
collectionStatus?: "
|
|
15
|
+
collectionStatus?: "not_required" | "pending" | "collected" | "waived" | "refunded" | undefined;
|
|
16
16
|
collectionCurrency?: string | null | undefined;
|
|
17
17
|
collectionAmountCents?: number | null | undefined;
|
|
18
18
|
notes?: string | null | undefined;
|
|
@@ -27,7 +27,7 @@ export declare function useSlotExtraManifestMutation(slotId: string): {
|
|
|
27
27
|
productExtraId: string;
|
|
28
28
|
optionExtraConfigId?: string | null | undefined;
|
|
29
29
|
status?: "selected" | "cancelled" | "fulfilled" | "no_show" | undefined;
|
|
30
|
-
collectionStatus?: "
|
|
30
|
+
collectionStatus?: "not_required" | "pending" | "collected" | "waived" | "refunded" | undefined;
|
|
31
31
|
collectionCurrency?: string | null | undefined;
|
|
32
32
|
collectionAmountCents?: number | null | undefined;
|
|
33
33
|
notes?: string | null | undefined;
|
|
@@ -39,7 +39,7 @@ export declare function useSlotExtraManifestMutation(slotId: string): {
|
|
|
39
39
|
}, Error, {
|
|
40
40
|
productExtraId: string;
|
|
41
41
|
travelerIds: string[];
|
|
42
|
-
collectionStatus: "
|
|
42
|
+
collectionStatus: "not_required" | "pending" | "collected" | "waived" | "refunded";
|
|
43
43
|
collectionCurrency?: string | null | undefined;
|
|
44
44
|
collectionAmountCents?: number | null | undefined;
|
|
45
45
|
notes?: string | null | undefined;
|
|
@@ -55,7 +55,7 @@ export declare function useSlotExtraManifest(slotId: string | null | undefined,
|
|
|
55
55
|
status: "selected" | "cancelled" | "fulfilled" | "no_show";
|
|
56
56
|
selected: boolean;
|
|
57
57
|
collectionMode: "cash_on_trip" | "external" | "included" | "none" | "booking_total";
|
|
58
|
-
collectionStatus: "
|
|
58
|
+
collectionStatus: "not_required" | "pending" | "collected" | "waived" | "refunded";
|
|
59
59
|
collectionCurrency: string | null;
|
|
60
60
|
collectionAmountCents: number | null;
|
|
61
61
|
collectedAt: string | null;
|
|
@@ -243,7 +243,7 @@ export declare function getSlotExtraManifestQueryOptions(client: FetchWithValida
|
|
|
243
243
|
status: "selected" | "cancelled" | "fulfilled" | "no_show";
|
|
244
244
|
selected: boolean;
|
|
245
245
|
collectionMode: "cash_on_trip" | "external" | "included" | "none" | "booking_total";
|
|
246
|
-
collectionStatus: "
|
|
246
|
+
collectionStatus: "not_required" | "pending" | "collected" | "waived" | "refunded";
|
|
247
247
|
collectionCurrency: string | null;
|
|
248
248
|
collectionAmountCents: number | null;
|
|
249
249
|
collectedAt: string | null;
|
|
@@ -307,7 +307,7 @@ export declare function getSlotExtraManifestQueryOptions(client: FetchWithValida
|
|
|
307
307
|
status: "selected" | "cancelled" | "fulfilled" | "no_show";
|
|
308
308
|
selected: boolean;
|
|
309
309
|
collectionMode: "cash_on_trip" | "external" | "included" | "none" | "booking_total";
|
|
310
|
-
collectionStatus: "
|
|
310
|
+
collectionStatus: "not_required" | "pending" | "collected" | "waived" | "refunded";
|
|
311
311
|
collectionCurrency: string | null;
|
|
312
312
|
collectionAmountCents: number | null;
|
|
313
313
|
collectedAt: string | null;
|
|
@@ -372,7 +372,7 @@ export declare function getSlotExtraManifestQueryOptions(client: FetchWithValida
|
|
|
372
372
|
status: "selected" | "cancelled" | "fulfilled" | "no_show";
|
|
373
373
|
selected: boolean;
|
|
374
374
|
collectionMode: "cash_on_trip" | "external" | "included" | "none" | "booking_total";
|
|
375
|
-
collectionStatus: "
|
|
375
|
+
collectionStatus: "not_required" | "pending" | "collected" | "waived" | "refunded";
|
|
376
376
|
collectionCurrency: string | null;
|
|
377
377
|
collectionAmountCents: number | null;
|
|
378
378
|
collectedAt: string | null;
|
|
@@ -439,7 +439,7 @@ export declare function getSlotExtraManifestQueryOptions(client: FetchWithValida
|
|
|
439
439
|
status: "selected" | "cancelled" | "fulfilled" | "no_show";
|
|
440
440
|
selected: boolean;
|
|
441
441
|
collectionMode: "cash_on_trip" | "external" | "included" | "none" | "booking_total";
|
|
442
|
-
collectionStatus: "
|
|
442
|
+
collectionStatus: "not_required" | "pending" | "collected" | "waived" | "refunded";
|
|
443
443
|
collectionCurrency: string | null;
|
|
444
444
|
collectionAmountCents: number | null;
|
|
445
445
|
collectedAt: string | null;
|
package/dist/extras/schemas.d.ts
CHANGED
|
@@ -175,8 +175,8 @@ export declare const slotExtraManifestSelectionSchema: z.ZodObject<{
|
|
|
175
175
|
booking_total: "booking_total";
|
|
176
176
|
}>;
|
|
177
177
|
collectionStatus: z.ZodEnum<{
|
|
178
|
-
pending: "pending";
|
|
179
178
|
not_required: "not_required";
|
|
179
|
+
pending: "pending";
|
|
180
180
|
collected: "collected";
|
|
181
181
|
waived: "waived";
|
|
182
182
|
refunded: "refunded";
|
|
@@ -278,8 +278,8 @@ export declare const slotExtraManifestSchema: z.ZodObject<{
|
|
|
278
278
|
booking_total: "booking_total";
|
|
279
279
|
}>;
|
|
280
280
|
collectionStatus: z.ZodEnum<{
|
|
281
|
-
pending: "pending";
|
|
282
281
|
not_required: "not_required";
|
|
282
|
+
pending: "pending";
|
|
283
283
|
collected: "collected";
|
|
284
284
|
waived: "waived";
|
|
285
285
|
refunded: "refunded";
|
|
@@ -383,8 +383,8 @@ export declare const slotExtraManifestResponse: z.ZodObject<{
|
|
|
383
383
|
booking_total: "booking_total";
|
|
384
384
|
}>;
|
|
385
385
|
collectionStatus: z.ZodEnum<{
|
|
386
|
-
pending: "pending";
|
|
387
386
|
not_required: "not_required";
|
|
387
|
+
pending: "pending";
|
|
388
388
|
collected: "collected";
|
|
389
389
|
waived: "waived";
|
|
390
390
|
refunded: "refunded";
|
|
@@ -18,7 +18,7 @@ export declare function useBookingActionLedger(bookingId: string | null | undefi
|
|
|
18
18
|
actionVersion: string;
|
|
19
19
|
actionKind: "reverse" | "read" | "create" | "update" | "delete" | "execute" | "approve" | "reject" | "compensate" | "duplicate";
|
|
20
20
|
status: "cancelled" | "expired" | "requested" | "awaiting_approval" | "approved" | "denied" | "succeeded" | "failed" | "reversed" | "compensated" | "superseded";
|
|
21
|
-
evaluatedRisk: "
|
|
21
|
+
evaluatedRisk: "low" | "medium" | "high" | "critical";
|
|
22
22
|
actorType: string | null;
|
|
23
23
|
principalType: "user" | "api_key" | "agent" | "workflow" | "system";
|
|
24
24
|
principalId: string;
|
|
@@ -16,7 +16,7 @@ export declare function useSupplierStatusMutation(bookingId: string): {
|
|
|
16
16
|
bookingId: string;
|
|
17
17
|
supplierServiceId: string | null;
|
|
18
18
|
serviceName: string;
|
|
19
|
-
status: "
|
|
19
|
+
status: "cancelled" | "pending" | "confirmed" | "rejected";
|
|
20
20
|
supplierReference: string | null;
|
|
21
21
|
costCurrency: string;
|
|
22
22
|
costAmountCents: number;
|
|
@@ -30,7 +30,7 @@ export declare function useSupplierStatusMutation(bookingId: string): {
|
|
|
30
30
|
bookingId: string;
|
|
31
31
|
supplierServiceId: string | null;
|
|
32
32
|
serviceName: string;
|
|
33
|
-
status: "
|
|
33
|
+
status: "cancelled" | "pending" | "confirmed" | "rejected";
|
|
34
34
|
supplierReference: string | null;
|
|
35
35
|
costCurrency: string;
|
|
36
36
|
costAmountCents: number;
|
|
@@ -7,7 +7,7 @@ export declare function useSupplierStatuses(bookingId: string | null | undefined
|
|
|
7
7
|
bookingId: string;
|
|
8
8
|
supplierServiceId: string | null;
|
|
9
9
|
serviceName: string;
|
|
10
|
-
status: "
|
|
10
|
+
status: "cancelled" | "pending" | "confirmed" | "rejected";
|
|
11
11
|
supplierReference: string | null;
|
|
12
12
|
costCurrency: string;
|
|
13
13
|
costAmountCents: number;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"booking-journey.d.ts","sourceRoot":"","sources":["../../../src/journey/components/booking-journey.tsx"],"names":[],"mappings":"AAgCA,OAAO,EACL,KAAK,mBAAmB,EAIzB,MAAM,aAAa,CAAA;
|
|
1
|
+
{"version":3,"file":"booking-journey.d.ts","sourceRoot":"","sources":["../../../src/journey/components/booking-journey.tsx"],"names":[],"mappings":"AAgCA,OAAO,EACL,KAAK,mBAAmB,EAIzB,MAAM,aAAa,CAAA;AAgCpB,wBAAgB,cAAc,CAAC,KAAK,EAAE,mBAAmB,GAAG,KAAK,CAAC,YAAY,CA0xB7E"}
|
|
@@ -11,12 +11,17 @@ import { JOURNEY_STEP_ORDER, } from "../types.js";
|
|
|
11
11
|
import { buildCommitParty, buildCommitPaymentIntent, canAdvanceFromStep, defaultMinimalShape, isStepVisible, makeHoldSignature, resolveInitialStatus, stackedStepComplete, validationErrorsForStep, warningsForStep, } from "./booking-journey-rules.js";
|
|
12
12
|
import { ConfigureStepSkeleton } from "./configure-step-skeleton.js";
|
|
13
13
|
import { ContractPreviewDialog } from "./contract-preview-dialog.js";
|
|
14
|
-
import { AccommodationStep, AddonsStep, BillingStep, DepartureStep, DocumentsStep, FinalizeControls, OptionsStep, PaymentStep, ReviewStep, TravelersStep, } from "./journey-steps.js";
|
|
14
|
+
import { AccommodationStep, AddonsStep, BillingStep, DepartureStep, DocumentsStep, deriveDefaultPhoneCountry, FinalizeControls, OptionsStep, PaymentStep, ReviewStep, TravelersStep, } from "./journey-steps.js";
|
|
15
15
|
import { PriceSidePanel } from "./side-panel.js";
|
|
16
16
|
import { StackedJourney } from "./stacked-journey.js";
|
|
17
17
|
import { StepHeader } from "./step-header.js";
|
|
18
18
|
export function BookingJourney(props) {
|
|
19
19
|
const messages = useBookingsUiMessagesOrDefault();
|
|
20
|
+
// Default phone country: the explicit prop, else the scope locale's region
|
|
21
|
+
// (storefronts thread the shopper locale here even when the bookings-ui i18n
|
|
22
|
+
// provider isn't mounted). `PhoneField` fills in the i18n locale + GB fallback
|
|
23
|
+
// when this is undefined.
|
|
24
|
+
const defaultPhoneCountry = deriveDefaultPhoneCountry(props.defaultPhoneCountry, props.scope?.locale);
|
|
20
25
|
const surface = props.surface ?? "admin";
|
|
21
26
|
// Admin books on a single stacked page (nothing hidden); the storefront
|
|
22
27
|
// keeps the guided one-step-at-a-time wizard. Two deliberately separate
|
|
@@ -396,9 +401,9 @@ export function BookingJourney(props) {
|
|
|
396
401
|
case "options":
|
|
397
402
|
return (_jsx(OptionsStep, { draft: draft, setDraft: setDraft, shape: shape, productId: props.entityId, renderUnitsPicker: props.renderUnitsPicker }));
|
|
398
403
|
case "billing":
|
|
399
|
-
return (_jsx(BillingStep, { draft: draft, setDraft: setDraft, shape: shape, renderLeadContactPicker: props.renderLeadContactPicker, renderExtras: billingExtrasSlot, errors: validationErrorsForStep("billing", draft, messages), warnings: warningsForStep("billing", draft, shape, messages) }));
|
|
404
|
+
return (_jsx(BillingStep, { draft: draft, setDraft: setDraft, shape: shape, defaultPhoneCountry: defaultPhoneCountry, renderLeadContactPicker: props.renderLeadContactPicker, renderExtras: billingExtrasSlot, errors: validationErrorsForStep("billing", draft, messages), warnings: warningsForStep("billing", draft, shape, messages) }));
|
|
400
405
|
case "travelers":
|
|
401
|
-
return (_jsx(TravelersStep, { draft: draft, setDraft: setDraft, shape: shape, renderTravelerContactPicker: props.renderTravelerContactPicker, errors: validationErrorsForStep("travelers", draft, messages), warnings: warningsForStep("travelers", draft, shape, messages) }));
|
|
406
|
+
return (_jsx(TravelersStep, { draft: draft, setDraft: setDraft, shape: shape, defaultPhoneCountry: defaultPhoneCountry, renderTravelerContactPicker: props.renderTravelerContactPicker, errors: validationErrorsForStep("travelers", draft, messages), warnings: warningsForStep("travelers", draft, shape, messages) }));
|
|
402
407
|
case "accommodation":
|
|
403
408
|
return _jsx(AccommodationStep, { draft: draft, setDraft: setDraft, shape: shape });
|
|
404
409
|
case "addons":
|
|
@@ -430,7 +435,7 @@ export function BookingJourney(props) {
|
|
|
430
435
|
// First load: the descriptor arrives with the first quote. Show a
|
|
431
436
|
// skeleton rather than the generic fallback, which would flash
|
|
432
437
|
// and then shift into the real layout.
|
|
433
|
-
!quote.data && quote.isQuoting ? (_jsx(ConfigureStepSkeleton, {})) : (_jsx(DepartureStep, { draft: draft, setDraft: setDraft, shape: shape, productId: props.entityId, renderDeparturePicker: props.renderDeparturePicker }))) : null, currentStep === "options" ? (_jsx(OptionsStep, { draft: draft, setDraft: setDraft, shape: shape, productId: props.entityId, renderUnitsPicker: props.renderUnitsPicker })) : null, currentStep === "billing" ? (_jsx(BillingStep, { draft: draft, setDraft: setDraft, shape: shape, renderLeadContactPicker: props.renderLeadContactPicker, renderExtras: billingExtrasSlot })) : null, currentStep === "travelers" ? (_jsx(TravelersStep, { draft: draft, setDraft: setDraft, shape: shape, renderTravelerContactPicker: props.renderTravelerContactPicker })) : null, currentStep === "accommodation" ? (_jsx(AccommodationStep, { draft: draft, setDraft: setDraft, shape: shape })) : null, currentStep === "addons" ? (_jsx(AddonsStep, { draft: draft, setDraft: setDraft, shape: shape })) : null, currentStep === "payment" ? (_jsx(PaymentStep, { draft: draft, setDraft: setDraft, shape: shape, capabilities: props.paymentCapabilities ?? {
|
|
438
|
+
!quote.data && quote.isQuoting ? (_jsx(ConfigureStepSkeleton, {})) : (_jsx(DepartureStep, { draft: draft, setDraft: setDraft, shape: shape, productId: props.entityId, renderDeparturePicker: props.renderDeparturePicker }))) : null, currentStep === "options" ? (_jsx(OptionsStep, { draft: draft, setDraft: setDraft, shape: shape, productId: props.entityId, renderUnitsPicker: props.renderUnitsPicker })) : null, currentStep === "billing" ? (_jsx(BillingStep, { draft: draft, setDraft: setDraft, shape: shape, defaultPhoneCountry: defaultPhoneCountry, renderLeadContactPicker: props.renderLeadContactPicker, renderExtras: billingExtrasSlot })) : null, currentStep === "travelers" ? (_jsx(TravelersStep, { draft: draft, setDraft: setDraft, shape: shape, defaultPhoneCountry: defaultPhoneCountry, renderTravelerContactPicker: props.renderTravelerContactPicker })) : null, currentStep === "accommodation" ? (_jsx(AccommodationStep, { draft: draft, setDraft: setDraft, shape: shape })) : null, currentStep === "addons" ? (_jsx(AddonsStep, { draft: draft, setDraft: setDraft, shape: shape })) : null, currentStep === "payment" ? (_jsx(PaymentStep, { draft: draft, setDraft: setDraft, shape: shape, capabilities: props.paymentCapabilities ?? {
|
|
434
439
|
acceptsCard: false,
|
|
435
440
|
acceptsHold: true,
|
|
436
441
|
acceptsTicketOnCredit: false,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { LeadContactPickerProps } from "../../types.js";
|
|
2
2
|
import { type StepCommonProps } from "./shared.js";
|
|
3
|
-
export declare function BillingStep({ draft, setDraft, renderLeadContactPicker, renderExtras, warnings, errors, }: StepCommonProps & {
|
|
3
|
+
export declare function BillingStep({ draft, setDraft, defaultPhoneCountry, renderLeadContactPicker, renderExtras, warnings, errors, }: StepCommonProps & {
|
|
4
4
|
renderLeadContactPicker?: (props: LeadContactPickerProps) => React.ReactNode;
|
|
5
5
|
renderExtras?: () => React.ReactNode;
|
|
6
6
|
warnings?: ReadonlyArray<string>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"billing-step.d.ts","sourceRoot":"","sources":["../../../../src/journey/components/journey-steps/billing-step.tsx"],"names":[],"mappings":"AAUA,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,gBAAgB,CAAA;AAC5D,OAAO,EAKL,KAAK,eAAe,EACrB,MAAM,aAAa,CAAA;AAMpB,wBAAgB,WAAW,CAAC,EAC1B,KAAK,EACL,QAAQ,EACR,uBAAuB,EACvB,YAAY,EACZ,QAAQ,EACR,MAAM,GACP,EAAE,eAAe,GAAG;IACnB,uBAAuB,CAAC,EAAE,CAAC,KAAK,EAAE,sBAAsB,KAAK,KAAK,CAAC,SAAS,CAAA;IAC5E,YAAY,CAAC,EAAE,MAAM,KAAK,CAAC,SAAS,CAAA;IACpC,QAAQ,CAAC,EAAE,aAAa,CAAC,MAAM,CAAC,CAAA;IAChC,MAAM,CAAC,EAAE,aAAa,CAAC,MAAM,CAAC,CAAA;CAC/B,GAAG,KAAK,CAAC,YAAY,
|
|
1
|
+
{"version":3,"file":"billing-step.d.ts","sourceRoot":"","sources":["../../../../src/journey/components/journey-steps/billing-step.tsx"],"names":[],"mappings":"AAUA,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,gBAAgB,CAAA;AAC5D,OAAO,EAKL,KAAK,eAAe,EACrB,MAAM,aAAa,CAAA;AAMpB,wBAAgB,WAAW,CAAC,EAC1B,KAAK,EACL,QAAQ,EACR,mBAAmB,EACnB,uBAAuB,EACvB,YAAY,EACZ,QAAQ,EACR,MAAM,GACP,EAAE,eAAe,GAAG;IACnB,uBAAuB,CAAC,EAAE,CAAC,KAAK,EAAE,sBAAsB,KAAK,KAAK,CAAC,SAAS,CAAA;IAC5E,YAAY,CAAC,EAAE,MAAM,KAAK,CAAC,SAAS,CAAA;IACpC,QAAQ,CAAC,EAAE,aAAa,CAAC,MAAM,CAAC,CAAA;IAChC,MAAM,CAAC,EAAE,aAAa,CAAC,MAAM,CAAC,CAAA;CAC/B,GAAG,KAAK,CAAC,YAAY,CA+OrB"}
|
|
@@ -12,7 +12,7 @@ import { Field, JourneyErrors, JourneyWarnings, PhoneField, } from "./shared.js"
|
|
|
12
12
|
// ─────────────────────────────────────────────────────────────────
|
|
13
13
|
// Billing
|
|
14
14
|
// ─────────────────────────────────────────────────────────────────
|
|
15
|
-
export function BillingStep({ draft, setDraft, renderLeadContactPicker, renderExtras, warnings, errors, }) {
|
|
15
|
+
export function BillingStep({ draft, setDraft, defaultPhoneCountry, renderLeadContactPicker, renderExtras, warnings, errors, }) {
|
|
16
16
|
const messages = useBookingsUiMessagesOrDefault();
|
|
17
17
|
const billing = draft.billing;
|
|
18
18
|
const emailError = isValidOptionalEmail(billing.contact.email)
|
|
@@ -56,7 +56,7 @@ export function BillingStep({ draft, setDraft, renderLeadContactPicker, renderEx
|
|
|
56
56
|
contact: { ...billing.contact, lastName: v },
|
|
57
57
|
})) }), _jsx(Field, { id: "bj-billing-email", label: messages.bookingJourney.billing.email, type: "email", value: billing.contact.email, error: emailError, onChange: (v) => setDraft(patchBilling(draft, {
|
|
58
58
|
contact: { ...billing.contact, email: v },
|
|
59
|
-
})) }), _jsx(PhoneField, { id: "bj-billing-phone", label: messages.bookingJourney.billing.phone, value: billing.contact.phone ?? "", onChange: (v) => setDraft(patchBilling(draft, {
|
|
59
|
+
})) }), _jsx(PhoneField, { id: "bj-billing-phone", label: messages.bookingJourney.billing.phone, defaultCountry: defaultPhoneCountry, value: billing.contact.phone ?? "", onChange: (v) => setDraft(patchBilling(draft, {
|
|
60
60
|
contact: { ...billing.contact, phone: v },
|
|
61
61
|
})) })] }), _jsxs("div", { className: "grid grid-cols-1 gap-3 sm:grid-cols-2", children: [_jsx(Field, { id: "bj-billing-line1", label: messages.bookingJourney.billing.addressLine1, value: billing.address.line1 ?? "", onChange: (v) => setDraft(patchBilling(draft, {
|
|
62
62
|
address: { ...billing.address, line1: v },
|
|
@@ -14,7 +14,33 @@ export interface StepCommonProps {
|
|
|
14
14
|
draft: Draft;
|
|
15
15
|
setDraft: (next: Draft | ((prev: Draft) => Draft)) => void;
|
|
16
16
|
shape: BookingDraftShape;
|
|
17
|
+
/**
|
|
18
|
+
* Default country (ISO 3166-1 alpha-2) for the step's phone inputs, already
|
|
19
|
+
* resolved by `BookingJourney` from its `defaultPhoneCountry` prop or the
|
|
20
|
+
* scope locale. When omitted the `PhoneField` derives one from the active
|
|
21
|
+
* i18n locale before falling back to GB.
|
|
22
|
+
*/
|
|
23
|
+
defaultPhoneCountry?: string;
|
|
17
24
|
}
|
|
25
|
+
/**
|
|
26
|
+
* Derives a default country (ISO 3166-1 alpha-2) for a phone input from an
|
|
27
|
+
* explicit value or a locale, or `undefined` when neither yields one — so
|
|
28
|
+
* callers can chain multiple locale sources before falling back.
|
|
29
|
+
*
|
|
30
|
+
* Order of preference:
|
|
31
|
+
* 1. An explicit value (e.g. a deployment's market/storefront setting) when it
|
|
32
|
+
* looks like a valid alpha-2 code.
|
|
33
|
+
* 2. The region subtag of `locale` (e.g. `"ro-RO"` -> `"RO"`). A bare language
|
|
34
|
+
* tag with no region (e.g. `"ro"`) yields no guess — we don't invent a
|
|
35
|
+
* country from a language.
|
|
36
|
+
*/
|
|
37
|
+
export declare function deriveDefaultPhoneCountry(explicit?: string, locale?: string): string | undefined;
|
|
38
|
+
/**
|
|
39
|
+
* Resolves the default country (ISO 3166-1 alpha-2) for a phone input, applying
|
|
40
|
+
* {@link deriveDefaultPhoneCountry} and falling back to `"GB"` as the
|
|
41
|
+
* last resort.
|
|
42
|
+
*/
|
|
43
|
+
export declare function resolveDefaultPhoneCountry(explicit?: string, locale?: string): string;
|
|
18
44
|
/**
|
|
19
45
|
* Soft validation warnings for a step, rendered INSIDE its card (below the
|
|
20
46
|
* content) so they're visibly scoped to the block they belong to.
|
|
@@ -34,11 +60,14 @@ export declare function Field({ id, label, value, onChange, type, placeholder, e
|
|
|
34
60
|
placeholder?: string;
|
|
35
61
|
error?: string;
|
|
36
62
|
}): React.ReactElement;
|
|
37
|
-
export declare function PhoneField({ id, label, value, onChange, }: {
|
|
63
|
+
export declare function PhoneField({ id, label, value, onChange, defaultCountry, }: {
|
|
38
64
|
id: string;
|
|
39
65
|
label: string;
|
|
40
66
|
value: string;
|
|
41
67
|
onChange: (v: string) => void;
|
|
68
|
+
/** Explicit default country (ISO 3166-1 alpha-2). Falls back to the active
|
|
69
|
+
* locale's region, then GB. */
|
|
70
|
+
defaultCountry?: string;
|
|
42
71
|
}): React.ReactElement;
|
|
43
72
|
/**
|
|
44
73
|
* Date field that uses the shared `<DatePicker />` from
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"shared.d.ts","sourceRoot":"","sources":["../../../../src/journey/components/journey-steps/shared.tsx"],"names":[],"mappings":"AAEA;;;GAGG;AAEH,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,6DAA6D,CAAA;AAYpG,OAAO,
|
|
1
|
+
{"version":3,"file":"shared.d.ts","sourceRoot":"","sources":["../../../../src/journey/components/journey-steps/shared.tsx"],"names":[],"mappings":"AAEA;;;GAGG;AAEH,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,6DAA6D,CAAA;AAYpG,OAAO,EAGL,8BAA8B,EAC/B,MAAM,wBAAwB,CAAA;AAC/B,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,0BAA0B,CAAA;AACrD,OAAO,KAAK,EAAE,oBAAoB,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAA;AAE5E,kFAAkF;AAClF,MAAM,MAAM,qBAAqB,GAAG,CAAC,KAAK,EAAE,oBAAoB,KAAK,KAAK,CAAC,SAAS,CAAA;AACpF,+EAA+E;AAC/E,MAAM,MAAM,iBAAiB,GAAG,CAAC,KAAK,EAAE,gBAAgB,KAAK,KAAK,CAAC,SAAS,CAAA;AAE5E,MAAM,WAAW,eAAe;IAC9B,KAAK,EAAE,KAAK,CAAA;IAIZ,QAAQ,EAAE,CAAC,IAAI,EAAE,KAAK,GAAG,CAAC,CAAC,IAAI,EAAE,KAAK,KAAK,KAAK,CAAC,KAAK,IAAI,CAAA;IAC1D,KAAK,EAAE,iBAAiB,CAAA;IACxB;;;;;OAKG;IACH,mBAAmB,CAAC,EAAE,MAAM,CAAA;CAC7B;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,yBAAyB,CAAC,QAAQ,CAAC,EAAE,MAAM,EAA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|
@@ -5,7 +5,47 @@ import { Input } from "@voyant-travel/ui/components/input";
|
|
|
5
5
|
import { Label } from "@voyant-travel/ui/components/label";
|
|
6
6
|
import { PhoneInput } from "@voyant-travel/ui/components/phone-input";
|
|
7
7
|
import { Select, SelectContent, SelectItem, SelectTrigger, SelectValue, } from "@voyant-travel/ui/components/select";
|
|
8
|
-
import { formatMessage, useBookingsUiMessagesOrDefault } from "../../../i18n/index.js";
|
|
8
|
+
import { formatMessage, useBookingsUiI18nOrDefault, useBookingsUiMessagesOrDefault, } from "../../../i18n/index.js";
|
|
9
|
+
/**
|
|
10
|
+
* Derives a default country (ISO 3166-1 alpha-2) for a phone input from an
|
|
11
|
+
* explicit value or a locale, or `undefined` when neither yields one — so
|
|
12
|
+
* callers can chain multiple locale sources before falling back.
|
|
13
|
+
*
|
|
14
|
+
* Order of preference:
|
|
15
|
+
* 1. An explicit value (e.g. a deployment's market/storefront setting) when it
|
|
16
|
+
* looks like a valid alpha-2 code.
|
|
17
|
+
* 2. The region subtag of `locale` (e.g. `"ro-RO"` -> `"RO"`). A bare language
|
|
18
|
+
* tag with no region (e.g. `"ro"`) yields no guess — we don't invent a
|
|
19
|
+
* country from a language.
|
|
20
|
+
*/
|
|
21
|
+
export function deriveDefaultPhoneCountry(explicit, locale) {
|
|
22
|
+
return normalizeAlpha2(explicit) ?? normalizeAlpha2(regionSubtag(locale));
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* Resolves the default country (ISO 3166-1 alpha-2) for a phone input, applying
|
|
26
|
+
* {@link deriveDefaultPhoneCountry} and falling back to `"GB"` as the
|
|
27
|
+
* last resort.
|
|
28
|
+
*/
|
|
29
|
+
export function resolveDefaultPhoneCountry(explicit, locale) {
|
|
30
|
+
return deriveDefaultPhoneCountry(explicit, locale) ?? "GB";
|
|
31
|
+
}
|
|
32
|
+
/** First 2-letter alpha region subtag of a BCP-47 tag, or `undefined`. */
|
|
33
|
+
function regionSubtag(locale) {
|
|
34
|
+
if (!locale)
|
|
35
|
+
return undefined;
|
|
36
|
+
// BCP-47 separates subtags with "-"; tolerate "_" too. The language subtag
|
|
37
|
+
// is first; the region is the first 2-letter alpha subtag after it (skipping
|
|
38
|
+
// any 4-letter script subtag such as "Hant").
|
|
39
|
+
return locale
|
|
40
|
+
.split(/[-_]/)
|
|
41
|
+
.slice(1)
|
|
42
|
+
.find((part) => /^[A-Za-z]{2}$/.test(part));
|
|
43
|
+
}
|
|
44
|
+
/** Uppercased alpha-2 code, or `undefined` when the input is malformed. */
|
|
45
|
+
function normalizeAlpha2(value) {
|
|
46
|
+
const trimmed = value?.trim();
|
|
47
|
+
return trimmed && /^[A-Za-z]{2}$/.test(trimmed) ? trimmed.toUpperCase() : undefined;
|
|
48
|
+
}
|
|
9
49
|
/**
|
|
10
50
|
* Soft validation warnings for a step, rendered INSIDE its card (below the
|
|
11
51
|
* content) so they're visibly scoped to the block they belong to.
|
|
@@ -24,8 +64,10 @@ export function Field({ id, label, value, onChange, type, placeholder, error, })
|
|
|
24
64
|
const errorId = `${id}-error`;
|
|
25
65
|
return (_jsxs("div", { className: "space-y-1", children: [_jsx(Label, { htmlFor: id, children: label }), _jsx(Input, { id: id, type: type ?? "text", value: value, placeholder: placeholder, "aria-invalid": error ? true : undefined, "aria-describedby": error ? errorId : undefined, onChange: (e) => onChange(e.target.value) }), error ? (_jsx("p", { id: errorId, className: "text-destructive text-xs", role: "alert", children: error })) : null] }));
|
|
26
66
|
}
|
|
27
|
-
export function PhoneField({ id, label, value, onChange, }) {
|
|
28
|
-
|
|
67
|
+
export function PhoneField({ id, label, value, onChange, defaultCountry, }) {
|
|
68
|
+
const i18n = useBookingsUiI18nOrDefault();
|
|
69
|
+
const resolvedCountry = resolveDefaultPhoneCountry(defaultCountry, i18n.locale);
|
|
70
|
+
return (_jsxs("div", { className: "space-y-1", children: [_jsx(Label, { htmlFor: id, children: label }), _jsx(PhoneInput, { id: id, defaultCountry: resolvedCountry, international: true, value: value || undefined, onChange: (v) => onChange(v ? String(v) : "") })] }));
|
|
29
71
|
}
|
|
30
72
|
/**
|
|
31
73
|
* Date field that uses the shared `<DatePicker />` from
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { TravelerContactPickerProps } from "../../types.js";
|
|
2
2
|
import { type StepCommonProps } from "./shared.js";
|
|
3
|
-
export declare function TravelersStep({ draft, setDraft, shape, renderTravelerContactPicker, warnings, errors, }: StepCommonProps & {
|
|
3
|
+
export declare function TravelersStep({ draft, setDraft, shape, defaultPhoneCountry, renderTravelerContactPicker, warnings, errors, }: StepCommonProps & {
|
|
4
4
|
renderTravelerContactPicker?: (props: TravelerContactPickerProps) => React.ReactNode;
|
|
5
5
|
warnings?: ReadonlyArray<string>;
|
|
6
6
|
errors?: ReadonlyArray<string>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"travelers-step.d.ts","sourceRoot":"","sources":["../../../../src/journey/components/journey-steps/travelers-step.tsx"],"names":[],"mappings":"AAiBA,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,gBAAgB,CAAA;AAEhE,OAAO,EASL,KAAK,eAAe,EACrB,MAAM,aAAa,CAAA;AA+BpB,wBAAgB,aAAa,CAAC,EAC5B,KAAK,EACL,QAAQ,EACR,KAAK,EACL,2BAA2B,EAC3B,QAAQ,EACR,MAAM,GACP,EAAE,eAAe,GAAG;IACnB,2BAA2B,CAAC,EAAE,CAAC,KAAK,EAAE,0BAA0B,KAAK,KAAK,CAAC,SAAS,CAAA;IACpF,QAAQ,CAAC,EAAE,aAAa,CAAC,MAAM,CAAC,CAAA;IAChC,MAAM,CAAC,EAAE,aAAa,CAAC,MAAM,CAAC,CAAA;CAC/B,GAAG,KAAK,CAAC,YAAY,
|
|
1
|
+
{"version":3,"file":"travelers-step.d.ts","sourceRoot":"","sources":["../../../../src/journey/components/journey-steps/travelers-step.tsx"],"names":[],"mappings":"AAiBA,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,gBAAgB,CAAA;AAEhE,OAAO,EASL,KAAK,eAAe,EACrB,MAAM,aAAa,CAAA;AA+BpB,wBAAgB,aAAa,CAAC,EAC5B,KAAK,EACL,QAAQ,EACR,KAAK,EACL,mBAAmB,EACnB,2BAA2B,EAC3B,QAAQ,EACR,MAAM,GACP,EAAE,eAAe,GAAG;IACnB,2BAA2B,CAAC,EAAE,CAAC,KAAK,EAAE,0BAA0B,KAAK,KAAK,CAAC,SAAS,CAAA;IACpF,QAAQ,CAAC,EAAE,aAAa,CAAC,MAAM,CAAC,CAAA;IAChC,MAAM,CAAC,EAAE,aAAa,CAAC,MAAM,CAAC,CAAA;CAC/B,GAAG,KAAK,CAAC,YAAY,CA0GrB"}
|
|
@@ -25,7 +25,7 @@ function paxFromTravelers(travelers, bands) {
|
|
|
25
25
|
function applyTravelers(draft, next, bands) {
|
|
26
26
|
return patchConfigure(setTravelers(draft, next), { pax: paxFromTravelers(next, bands) });
|
|
27
27
|
}
|
|
28
|
-
export function TravelersStep({ draft, setDraft, shape, renderTravelerContactPicker, warnings, errors, }) {
|
|
28
|
+
export function TravelersStep({ draft, setDraft, shape, defaultPhoneCountry, renderTravelerContactPicker, warnings, errors, }) {
|
|
29
29
|
const messages = useBookingsUiMessagesOrDefault();
|
|
30
30
|
const travelers = draft.travelers;
|
|
31
31
|
const bands = shape.paxBands;
|
|
@@ -80,7 +80,7 @@ export function TravelersStep({ draft, setDraft, shape, renderTravelerContactPic
|
|
|
80
80
|
};
|
|
81
81
|
setDraft(applyTravelers(draft, next, bands));
|
|
82
82
|
};
|
|
83
|
-
return (_jsx(TravelerCard, { idx: idx, traveler: traveler, shape: shape, draft: draft, setDraft: setDraft, renderTravelerContactPicker: renderTravelerContactPicker, apply: apply, showBandSelect: hasBandChoice, onRemove: travelers.length > 1 ? () => removeTraveler(idx) : undefined }, traveler.rowId ?? idx));
|
|
83
|
+
return (_jsx(TravelerCard, { idx: idx, traveler: traveler, shape: shape, draft: draft, setDraft: setDraft, defaultPhoneCountry: defaultPhoneCountry, renderTravelerContactPicker: renderTravelerContactPicker, apply: apply, showBandSelect: hasBandChoice, onRemove: travelers.length > 1 ? () => removeTraveler(idx) : undefined }, traveler.rowId ?? idx));
|
|
84
84
|
}), _jsxs(Button, { type: "button", variant: "outline", size: "sm", onClick: addTraveler, disabled: atMax, className: "w-full", children: [_jsx(Plus, { className: "mr-2 h-4 w-4" }), messages.bookingJourney.travelers.addTraveler] }), _jsx(PaxValidation, { draft: draft, shape: shape }), _jsx(PaxDependencyWarnings, { draft: draft, shape: shape }), _jsx(JourneyErrors, { errors: errors }), _jsx(JourneyWarnings, { warnings: warnings })] })] }));
|
|
85
85
|
}
|
|
86
86
|
/**
|
|
@@ -89,7 +89,7 @@ export function TravelersStep({ draft, setDraft, shape, renderTravelerContactPic
|
|
|
89
89
|
* required for child / infant bands and adult-only fields like passport drop
|
|
90
90
|
* off the form for non-adult travelers.
|
|
91
91
|
*/
|
|
92
|
-
function TravelerCard({ idx, traveler, shape, draft, setDraft, renderTravelerContactPicker, apply, showBandSelect, onRemove, }) {
|
|
92
|
+
function TravelerCard({ idx, traveler, shape, draft, setDraft, defaultPhoneCountry, renderTravelerContactPicker, apply, showBandSelect, onRemove, }) {
|
|
93
93
|
const messages = useBookingsUiMessagesOrDefault();
|
|
94
94
|
const bands = shape.paxBands;
|
|
95
95
|
const applicableFields = shape.travelerFields.filter((f) => {
|
|
@@ -172,7 +172,7 @@ function TravelerCard({ idx, traveler, shape, draft, setDraft, renderTravelerCon
|
|
|
172
172
|
selectedPersonId: traveler.personId,
|
|
173
173
|
}) })) : null, gridHasContent ? (_jsxs("div", { className: "grid grid-cols-1 gap-3 sm:grid-cols-2", children: [showIdentity ? (_jsxs(_Fragment, { children: [_jsx(Field, { id: `bj-trav-${idx}-first`, label: messages.bookingJourney.billing.firstName, value: traveler.firstName, onChange: (v) => patchRow({ firstName: v }) }), _jsx(Field, { id: `bj-trav-${idx}-last`, label: messages.bookingJourney.billing.lastName, value: traveler.lastName, onChange: (v) => patchRow({ lastName: v }) }), applicableFields.some((f) => f.key === "email") ? (_jsx(Field, { id: `bj-trav-${idx}-email`, label: messages.bookingJourney.billing.email, type: "email", value: traveler.email ?? "", error: emailError, onChange: (v) => patchRow({ email: v }) })) : null, phoneField ? (_jsx(PhoneField, { id: `bj-trav-${idx}-phone`,
|
|
174
174
|
// i18n-literal-ok Required marker appended to a descriptor-supplied field label.
|
|
175
|
-
label: phoneField.label + (phoneField.required ? " *" : ""), value: traveler.phone ?? "", onChange: (v) => patchRow({ phone: v }) })) : null] })) : null, dobField ? (_jsxs("div", { className: "space-y-1", children: [_jsx(DateField, { id: `bj-trav-${idx}-dob`,
|
|
175
|
+
label: phoneField.label + (phoneField.required ? " *" : ""), defaultCountry: defaultPhoneCountry, value: traveler.phone ?? "", onChange: (v) => patchRow({ phone: v }) })) : null] })) : null, dobField ? (_jsxs("div", { className: "space-y-1", children: [_jsx(DateField, { id: `bj-trav-${idx}-dob`,
|
|
176
176
|
// i18n-literal-ok Required marker appended to a descriptor-supplied field label.
|
|
177
177
|
label: dobField.label + (dobField.required ? " *" : ""), value: traveler.dateOfBirth ?? "", onChange: onDobChange, range: "past" }), ageOutOfBounds ? (_jsxs("p", { className: "text-amber-600 text-xs dark:text-amber-400", children: ["\u26A0", " ", formatMessage(messages.bookingJourney.validation.ageOutOfRange, {
|
|
178
178
|
age: computedAge,
|
|
@@ -16,6 +16,6 @@ export { DepartureStep, OptionsStep } from "./journey-steps/configure-steps.js";
|
|
|
16
16
|
export { DocumentsStep } from "./journey-steps/documents-step.js";
|
|
17
17
|
export { FinalizeControls, PaymentStep } from "./journey-steps/payment-step.js";
|
|
18
18
|
export { ReviewStep } from "./journey-steps/review-step.js";
|
|
19
|
-
export { JourneyWarnings } from "./journey-steps/shared.js";
|
|
19
|
+
export { deriveDefaultPhoneCountry, JourneyWarnings } from "./journey-steps/shared.js";
|
|
20
20
|
export { TravelersStep } from "./journey-steps/travelers-step.js";
|
|
21
21
|
//# sourceMappingURL=journey-steps.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"journey-steps.d.ts","sourceRoot":"","sources":["../../../src/journey/components/journey-steps.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,EAAE,iBAAiB,EAAE,MAAM,uCAAuC,CAAA;AACzE,OAAO,EAAE,UAAU,EAAE,MAAM,gCAAgC,CAAA;AAC3D,OAAO,EAAE,WAAW,EAAE,MAAM,iCAAiC,CAAA;AAC7D,OAAO,EAAE,aAAa,EAAE,WAAW,EAAE,MAAM,oCAAoC,CAAA;AAC/E,OAAO,EAAE,aAAa,EAAE,MAAM,mCAAmC,CAAA;AACjE,OAAO,EAAE,gBAAgB,EAAE,WAAW,EAAE,MAAM,iCAAiC,CAAA;AAC/E,OAAO,EAAE,UAAU,EAAE,MAAM,gCAAgC,CAAA;AAC3D,OAAO,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAA;
|
|
1
|
+
{"version":3,"file":"journey-steps.d.ts","sourceRoot":"","sources":["../../../src/journey/components/journey-steps.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,EAAE,iBAAiB,EAAE,MAAM,uCAAuC,CAAA;AACzE,OAAO,EAAE,UAAU,EAAE,MAAM,gCAAgC,CAAA;AAC3D,OAAO,EAAE,WAAW,EAAE,MAAM,iCAAiC,CAAA;AAC7D,OAAO,EAAE,aAAa,EAAE,WAAW,EAAE,MAAM,oCAAoC,CAAA;AAC/E,OAAO,EAAE,aAAa,EAAE,MAAM,mCAAmC,CAAA;AACjE,OAAO,EAAE,gBAAgB,EAAE,WAAW,EAAE,MAAM,iCAAiC,CAAA;AAC/E,OAAO,EAAE,UAAU,EAAE,MAAM,gCAAgC,CAAA;AAC3D,OAAO,EAAE,yBAAyB,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAA;AACtF,OAAO,EAAE,aAAa,EAAE,MAAM,mCAAmC,CAAA"}
|
|
@@ -16,5 +16,5 @@ export { DepartureStep, OptionsStep } from "./journey-steps/configure-steps.js";
|
|
|
16
16
|
export { DocumentsStep } from "./journey-steps/documents-step.js";
|
|
17
17
|
export { FinalizeControls, PaymentStep } from "./journey-steps/payment-step.js";
|
|
18
18
|
export { ReviewStep } from "./journey-steps/review-step.js";
|
|
19
|
-
export { JourneyWarnings } from "./journey-steps/shared.js";
|
|
19
|
+
export { deriveDefaultPhoneCountry, JourneyWarnings } from "./journey-steps/shared.js";
|
|
20
20
|
export { TravelersStep } from "./journey-steps/travelers-step.js";
|
package/dist/journey/types.d.ts
CHANGED
|
@@ -222,6 +222,15 @@ export interface BookingJourneyProps {
|
|
|
222
222
|
market?: string;
|
|
223
223
|
currency?: string;
|
|
224
224
|
};
|
|
225
|
+
/**
|
|
226
|
+
* Default country (ISO 3166-1 alpha-2, e.g. `"RO"`, `"GB"`) for the
|
|
227
|
+
* journey's phone inputs. Deployments should thread this from their
|
|
228
|
+
* market/storefront settings so the phone country matches the shopper's
|
|
229
|
+
* market instead of always defaulting to the UK. When omitted, the journey
|
|
230
|
+
* derives a country from the active locale's region subtag (e.g. `"ro-RO"`
|
|
231
|
+
* -> `"RO"`) and falls back to `"GB"` only as a last resort.
|
|
232
|
+
*/
|
|
233
|
+
defaultPhoneCountry?: string;
|
|
225
234
|
/**
|
|
226
235
|
* Layout of the booking flow.
|
|
227
236
|
* - `"wizard"` — one step at a time with Back/Next (the guided
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/journey/types.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,KAAK,EACV,cAAc,EACd,cAAc,EACd,kBAAkB,EACnB,MAAM,2DAA2D,CAAA;AAClE,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,6DAA6D,CAAA;AACpG,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAEtC,MAAM,MAAM,WAAW,GACnB,WAAW,GACX,SAAS,GACT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E,UAAU,GAAG,SAAS,GAAG,gBAAgB,GAAG,MAAM,CAAA;IAC7D,qEAAqE;IACrE,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,gFAAgF;IAChF,aAAa,CAAC,EAAE,MAAM,CAAA;IACtB;yDACqD;IACrD,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB;+CAC2C;IAC3C,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB;uDACmD;IACnD,WAAW,CAAC,EAAE,MAAM,CAAA;CACrB;AAED,MAAM,WAAW,kBAAkB;IACjC,OAAO,EAAE,WAAW,CAAA;IACpB,OAAO,EAAE,aAAa,CAAC,WAAW,CAAC,CAAA;IACnC,KAAK,EAAE,aAAa,CAAC,WAAW,CAAC,CAAA;IACjC,KAAK,EAAE,iBAAiB,CAAA;CACzB;AAED,MAAM,WAAW,cAAc;IAC7B,OAAO,EAAE,kBAAkB,GAAG,IAAI,CAAA;IAClC,SAAS,EAAE,OAAO,CAAA;IAClB,aAAa,CAAC,EAAE,MAAM,CAAA;IACtB,aAAa,CAAC,EAAE,oBAAoB,CAAA;IACpC,WAAW,CAAC,EAAE,WAAW,CAAA;IACzB,KAAK,CAAC,EAAE,aAAa,CAAC,WAAW,CAAC,CAAA;IAClC,KAAK,CAAC,EAAE,iBAAiB,CAAA;IACzB,KAAK,CAAC,EAAE,cAAc,CAAA;CACvB"}
|
package/dist/query-options.d.ts
CHANGED
|
@@ -1505,7 +1505,7 @@ export declare function getSupplierStatusesQueryOptions(client: FetchWithValidat
|
|
|
1505
1505
|
bookingId: string;
|
|
1506
1506
|
supplierServiceId: string | null;
|
|
1507
1507
|
serviceName: string;
|
|
1508
|
-
status: "
|
|
1508
|
+
status: "cancelled" | "pending" | "confirmed" | "rejected";
|
|
1509
1509
|
supplierReference: string | null;
|
|
1510
1510
|
costCurrency: string;
|
|
1511
1511
|
costAmountCents: number;
|
|
@@ -1520,7 +1520,7 @@ export declare function getSupplierStatusesQueryOptions(client: FetchWithValidat
|
|
|
1520
1520
|
bookingId: string;
|
|
1521
1521
|
supplierServiceId: string | null;
|
|
1522
1522
|
serviceName: string;
|
|
1523
|
-
status: "
|
|
1523
|
+
status: "cancelled" | "pending" | "confirmed" | "rejected";
|
|
1524
1524
|
supplierReference: string | null;
|
|
1525
1525
|
costCurrency: string;
|
|
1526
1526
|
costAmountCents: number;
|
|
@@ -1536,7 +1536,7 @@ export declare function getSupplierStatusesQueryOptions(client: FetchWithValidat
|
|
|
1536
1536
|
bookingId: string;
|
|
1537
1537
|
supplierServiceId: string | null;
|
|
1538
1538
|
serviceName: string;
|
|
1539
|
-
status: "
|
|
1539
|
+
status: "cancelled" | "pending" | "confirmed" | "rejected";
|
|
1540
1540
|
supplierReference: string | null;
|
|
1541
1541
|
costCurrency: string;
|
|
1542
1542
|
costAmountCents: number;
|
|
@@ -1554,7 +1554,7 @@ export declare function getSupplierStatusesQueryOptions(client: FetchWithValidat
|
|
|
1554
1554
|
bookingId: string;
|
|
1555
1555
|
supplierServiceId: string | null;
|
|
1556
1556
|
serviceName: string;
|
|
1557
|
-
status: "
|
|
1557
|
+
status: "cancelled" | "pending" | "confirmed" | "rejected";
|
|
1558
1558
|
supplierReference: string | null;
|
|
1559
1559
|
costCurrency: string;
|
|
1560
1560
|
costAmountCents: number;
|
|
@@ -10,7 +10,7 @@ export declare function useBookingQuestions(options?: UseBookingQuestionsOptions
|
|
|
10
10
|
label: string;
|
|
11
11
|
description: string | null;
|
|
12
12
|
target: "extra" | "service" | "traveler" | "booking" | "lead_traveler" | "booker";
|
|
13
|
-
fieldType: "number" | "boolean" | "date" | "other" | "file" | "email" | "phone" | "textarea" | "text" | "
|
|
13
|
+
fieldType: "number" | "boolean" | "date" | "other" | "file" | "email" | "phone" | "textarea" | "text" | "datetime" | "single_select" | "multi_select" | "country";
|
|
14
14
|
placeholder: string | null;
|
|
15
15
|
helpText: string | null;
|
|
16
16
|
isRequired: boolean;
|
|
@@ -132,7 +132,7 @@ export declare function getBookingQuestionsQueryOptions(client: FetchWithValidat
|
|
|
132
132
|
label: string;
|
|
133
133
|
description: string | null;
|
|
134
134
|
target: "extra" | "service" | "traveler" | "booking" | "lead_traveler" | "booker";
|
|
135
|
-
fieldType: "number" | "boolean" | "date" | "other" | "file" | "email" | "phone" | "textarea" | "text" | "
|
|
135
|
+
fieldType: "number" | "boolean" | "date" | "other" | "file" | "email" | "phone" | "textarea" | "text" | "datetime" | "single_select" | "multi_select" | "country";
|
|
136
136
|
placeholder: string | null;
|
|
137
137
|
helpText: string | null;
|
|
138
138
|
isRequired: boolean;
|
|
@@ -150,7 +150,7 @@ export declare function getBookingQuestionsQueryOptions(client: FetchWithValidat
|
|
|
150
150
|
label: string;
|
|
151
151
|
description: string | null;
|
|
152
152
|
target: "extra" | "service" | "traveler" | "booking" | "lead_traveler" | "booker";
|
|
153
|
-
fieldType: "number" | "boolean" | "date" | "other" | "file" | "email" | "phone" | "textarea" | "text" | "
|
|
153
|
+
fieldType: "number" | "boolean" | "date" | "other" | "file" | "email" | "phone" | "textarea" | "text" | "datetime" | "single_select" | "multi_select" | "country";
|
|
154
154
|
placeholder: string | null;
|
|
155
155
|
helpText: string | null;
|
|
156
156
|
isRequired: boolean;
|
|
@@ -169,7 +169,7 @@ export declare function getBookingQuestionsQueryOptions(client: FetchWithValidat
|
|
|
169
169
|
label: string;
|
|
170
170
|
description: string | null;
|
|
171
171
|
target: "extra" | "service" | "traveler" | "booking" | "lead_traveler" | "booker";
|
|
172
|
-
fieldType: "number" | "boolean" | "date" | "other" | "file" | "email" | "phone" | "textarea" | "text" | "
|
|
172
|
+
fieldType: "number" | "boolean" | "date" | "other" | "file" | "email" | "phone" | "textarea" | "text" | "datetime" | "single_select" | "multi_select" | "country";
|
|
173
173
|
placeholder: string | null;
|
|
174
174
|
helpText: string | null;
|
|
175
175
|
isRequired: boolean;
|
|
@@ -190,7 +190,7 @@ export declare function getBookingQuestionsQueryOptions(client: FetchWithValidat
|
|
|
190
190
|
label: string;
|
|
191
191
|
description: string | null;
|
|
192
192
|
target: "extra" | "service" | "traveler" | "booking" | "lead_traveler" | "booker";
|
|
193
|
-
fieldType: "number" | "boolean" | "date" | "other" | "file" | "email" | "phone" | "textarea" | "text" | "
|
|
193
|
+
fieldType: "number" | "boolean" | "date" | "other" | "file" | "email" | "phone" | "textarea" | "text" | "datetime" | "single_select" | "multi_select" | "country";
|
|
194
194
|
placeholder: string | null;
|
|
195
195
|
helpText: string | null;
|
|
196
196
|
isRequired: boolean;
|
|
@@ -26,9 +26,9 @@ export declare const questionFieldTypeSchema: z.ZodEnum<{
|
|
|
26
26
|
phone: "phone";
|
|
27
27
|
textarea: "textarea";
|
|
28
28
|
text: "text";
|
|
29
|
+
datetime: "datetime";
|
|
29
30
|
single_select: "single_select";
|
|
30
31
|
multi_select: "multi_select";
|
|
31
|
-
datetime: "datetime";
|
|
32
32
|
country: "country";
|
|
33
33
|
}>;
|
|
34
34
|
export declare const bookingQuestionSchema: z.ZodObject<{
|
|
@@ -55,9 +55,9 @@ export declare const bookingQuestionSchema: z.ZodObject<{
|
|
|
55
55
|
phone: "phone";
|
|
56
56
|
textarea: "textarea";
|
|
57
57
|
text: "text";
|
|
58
|
+
datetime: "datetime";
|
|
58
59
|
single_select: "single_select";
|
|
59
60
|
multi_select: "multi_select";
|
|
60
|
-
datetime: "datetime";
|
|
61
61
|
country: "country";
|
|
62
62
|
}>;
|
|
63
63
|
placeholder: z.ZodNullable<z.ZodString>;
|
|
@@ -166,9 +166,9 @@ export declare const bookingQuestionListResponse: z.ZodObject<{
|
|
|
166
166
|
phone: "phone";
|
|
167
167
|
textarea: "textarea";
|
|
168
168
|
text: "text";
|
|
169
|
+
datetime: "datetime";
|
|
169
170
|
single_select: "single_select";
|
|
170
171
|
multi_select: "multi_select";
|
|
171
|
-
datetime: "datetime";
|
|
172
172
|
country: "country";
|
|
173
173
|
}>;
|
|
174
174
|
placeholder: z.ZodNullable<z.ZodString>;
|
package/dist/schemas.d.ts
CHANGED
|
@@ -22,8 +22,8 @@ export declare const bookingStatusSchema: z.ZodEnum<{
|
|
|
22
22
|
}>;
|
|
23
23
|
export type BookingStatus = z.infer<typeof bookingStatusSchema>;
|
|
24
24
|
export declare const supplierConfirmationStatusSchema: z.ZodEnum<{
|
|
25
|
-
pending: "pending";
|
|
26
25
|
cancelled: "cancelled";
|
|
26
|
+
pending: "pending";
|
|
27
27
|
confirmed: "confirmed";
|
|
28
28
|
rejected: "rejected";
|
|
29
29
|
}>;
|
|
@@ -277,8 +277,8 @@ export declare const bookingSupplierStatusRecordSchema: z.ZodObject<{
|
|
|
277
277
|
supplierServiceId: z.ZodNullable<z.ZodString>;
|
|
278
278
|
serviceName: z.ZodString;
|
|
279
279
|
status: z.ZodEnum<{
|
|
280
|
-
pending: "pending";
|
|
281
280
|
cancelled: "cancelled";
|
|
281
|
+
pending: "pending";
|
|
282
282
|
confirmed: "confirmed";
|
|
283
283
|
rejected: "rejected";
|
|
284
284
|
}>;
|
|
@@ -1699,8 +1699,8 @@ export declare const bookingSupplierStatusesResponse: z.ZodObject<{
|
|
|
1699
1699
|
supplierServiceId: z.ZodNullable<z.ZodString>;
|
|
1700
1700
|
serviceName: z.ZodString;
|
|
1701
1701
|
status: z.ZodEnum<{
|
|
1702
|
-
pending: "pending";
|
|
1703
1702
|
cancelled: "cancelled";
|
|
1703
|
+
pending: "pending";
|
|
1704
1704
|
confirmed: "confirmed";
|
|
1705
1705
|
rejected: "rejected";
|
|
1706
1706
|
}>;
|
|
@@ -2244,9 +2244,9 @@ export declare const bookingActionLedgerStatusSchema: z.ZodEnum<{
|
|
|
2244
2244
|
superseded: "superseded";
|
|
2245
2245
|
}>;
|
|
2246
2246
|
export declare const bookingActionLedgerRiskSchema: z.ZodEnum<{
|
|
2247
|
-
high: "high";
|
|
2248
2247
|
low: "low";
|
|
2249
2248
|
medium: "medium";
|
|
2249
|
+
high: "high";
|
|
2250
2250
|
critical: "critical";
|
|
2251
2251
|
}>;
|
|
2252
2252
|
export declare const bookingActionLedgerPrincipalTypeSchema: z.ZodEnum<{
|
|
@@ -2287,9 +2287,9 @@ export declare const bookingActionLedgerEntrySchema: z.ZodObject<{
|
|
|
2287
2287
|
superseded: "superseded";
|
|
2288
2288
|
}>;
|
|
2289
2289
|
evaluatedRisk: z.ZodEnum<{
|
|
2290
|
-
high: "high";
|
|
2291
2290
|
low: "low";
|
|
2292
2291
|
medium: "medium";
|
|
2292
|
+
high: "high";
|
|
2293
2293
|
critical: "critical";
|
|
2294
2294
|
}>;
|
|
2295
2295
|
actorType: z.ZodNullable<z.ZodString>;
|
|
@@ -2377,9 +2377,9 @@ export declare const bookingActionLedgerListResponse: z.ZodObject<{
|
|
|
2377
2377
|
superseded: "superseded";
|
|
2378
2378
|
}>;
|
|
2379
2379
|
evaluatedRisk: z.ZodEnum<{
|
|
2380
|
-
high: "high";
|
|
2381
2380
|
low: "low";
|
|
2382
2381
|
medium: "medium";
|
|
2382
|
+
high: "high";
|
|
2383
2383
|
critical: "critical";
|
|
2384
2384
|
}>;
|
|
2385
2385
|
actorType: z.ZodNullable<z.ZodString>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@voyant-travel/bookings-react",
|
|
3
|
-
"version": "0.142.
|
|
3
|
+
"version": "0.142.1",
|
|
4
4
|
"license": "Apache-2.0",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -145,14 +145,14 @@
|
|
|
145
145
|
"react-dom": "^19.0.0",
|
|
146
146
|
"react-hook-form": "^7.80.0",
|
|
147
147
|
"zod": "^4.0.0",
|
|
148
|
-
"@voyant-travel/
|
|
149
|
-
"@voyant-travel/bookings": "^0.142.0",
|
|
150
|
-
"@voyant-travel/catalog-react": "^0.140.0",
|
|
151
|
-
"@voyant-travel/distribution-react": "^0.132.0",
|
|
148
|
+
"@voyant-travel/bookings": "^0.142.1",
|
|
152
149
|
"@voyant-travel/relationships-react": "^0.142.0",
|
|
150
|
+
"@voyant-travel/distribution-react": "^0.132.0",
|
|
153
151
|
"@voyant-travel/finance-react": "^0.142.0",
|
|
154
|
-
"@voyant-travel/
|
|
152
|
+
"@voyant-travel/catalog-react": "^0.140.0",
|
|
155
153
|
"@voyant-travel/legal-react": "^0.142.0",
|
|
154
|
+
"@voyant-travel/admin": "^0.116.0",
|
|
155
|
+
"@voyant-travel/identity-react": "^0.142.0",
|
|
156
156
|
"@voyant-travel/commerce-react": "^0.24.0",
|
|
157
157
|
"@voyant-travel/inventory-react": "^0.24.0",
|
|
158
158
|
"@voyant-travel/ui": "^0.108.10",
|
|
@@ -206,8 +206,8 @@
|
|
|
206
206
|
"sonner": "^2.0.7",
|
|
207
207
|
"@voyant-travel/catalog-contracts": "^0.108.2",
|
|
208
208
|
"@voyant-travel/i18n": "^0.110.0",
|
|
209
|
-
"@voyant-travel/
|
|
210
|
-
"@voyant-travel/
|
|
209
|
+
"@voyant-travel/types": "^0.107.0",
|
|
210
|
+
"@voyant-travel/react": "^0.104.1"
|
|
211
211
|
},
|
|
212
212
|
"devDependencies": {
|
|
213
213
|
"@tanstack/react-query": "^5.101.2",
|
|
@@ -223,16 +223,16 @@
|
|
|
223
223
|
"vitest": "^4.1.9",
|
|
224
224
|
"zod": "^4.4.3",
|
|
225
225
|
"@voyant-travel/admin": "^0.116.0",
|
|
226
|
-
"@voyant-travel/bookings": "^0.142.
|
|
226
|
+
"@voyant-travel/bookings": "^0.142.1",
|
|
227
227
|
"@voyant-travel/catalog-react": "^0.140.0",
|
|
228
228
|
"@voyant-travel/distribution-react": "^0.132.0",
|
|
229
|
+
"@voyant-travel/identity-react": "^0.142.0",
|
|
229
230
|
"@voyant-travel/relationships-react": "^0.142.0",
|
|
230
231
|
"@voyant-travel/finance-react": "^0.142.0",
|
|
231
|
-
"@voyant-travel/identity-react": "^0.142.0",
|
|
232
|
-
"@voyant-travel/legal-react": "^0.142.0",
|
|
233
232
|
"@voyant-travel/commerce-react": "^0.24.0",
|
|
234
233
|
"@voyant-travel/inventory-react": "^0.24.0",
|
|
235
234
|
"@voyant-travel/react": "^0.104.1",
|
|
235
|
+
"@voyant-travel/legal-react": "^0.142.0",
|
|
236
236
|
"@voyant-travel/ui": "^0.108.10",
|
|
237
237
|
"@voyant-travel/voyant-typescript-config": "^0.1.0",
|
|
238
238
|
"@voyant-travel/operations-react": "^0.23.0"
|