@ticketboothapp/booking 1.2.47 → 1.2.49

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.
Files changed (82) hide show
  1. package/package.json +1 -1
  2. package/src/components/BookingDetails.ts +18 -0
  3. package/src/components/booking/AddOnsSection.tsx +2 -2
  4. package/src/components/booking/AdminPaymentChoiceModal.tsx +1 -1
  5. package/src/components/booking/BookingDialog.tsx +1 -1
  6. package/src/components/booking/BookingFlow.tsx +16 -16
  7. package/src/components/booking/BookingFlowCollage.tsx +3 -2
  8. package/src/components/booking/BookingFlowPlaceholder.tsx +1 -1
  9. package/src/components/booking/BookingFlowPreview.tsx +1 -1
  10. package/src/components/booking/BookingProductGrid.tsx +4 -3
  11. package/src/components/booking/Calendar.module.css +2 -1
  12. package/src/components/booking/Calendar.tsx +5 -5
  13. package/src/components/booking/CancellationPolicySelector.tsx +2 -2
  14. package/src/components/booking/ChangeBookingDialog.tsx +6 -5
  15. package/src/components/booking/CheckoutForm.tsx +1 -1
  16. package/src/components/booking/CheckoutModal.tsx +3 -3
  17. package/src/components/booking/DapTourDescription.tsx +3 -3
  18. package/src/components/booking/DependentAddOnBookingDialog.tsx +7 -7
  19. package/src/components/booking/DependentAddOnPaymentForm.tsx +1 -1
  20. package/src/components/booking/ItineraryBox.tsx +6 -6
  21. package/src/components/booking/ItineraryBuilder.tsx +1 -1
  22. package/src/components/booking/MealDrinkAddOnSelector.tsx +3 -3
  23. package/src/components/booking/PickupLocationSelector.tsx +8 -8
  24. package/src/components/booking/PickupTimeSelector.tsx +2 -2
  25. package/src/components/booking/PriceBreakdown.tsx +4 -4
  26. package/src/components/booking/PriceSummary.tsx +3 -3
  27. package/src/components/booking/PrivateShuttleBookingFlow.tsx +11 -11
  28. package/src/components/booking/PromoCodeInput.tsx +1 -1
  29. package/src/components/booking/ReturnTimeSelector.tsx +2 -2
  30. package/src/components/booking/TicketSelector.tsx +1 -1
  31. package/src/components/booking/TourDescription.tsx +1 -1
  32. package/src/constants/images.ts +556 -0
  33. package/src/constants/products.ts +33 -0
  34. package/src/contexts/AvailabilitiesCacheContext.tsx +125 -0
  35. package/src/contexts/CompanyContext.tsx +70 -0
  36. package/src/data/dap-descriptions/session-couples-families-friends.en.json +61 -0
  37. package/src/data/dap-descriptions/session-elopements.en.json +60 -0
  38. package/src/data/dap-descriptions/session-proposals.en.json +60 -0
  39. package/src/hooks/useBookingSourceMetadataFromLocation.ts +1 -1
  40. package/src/hooks/useIsBookingLaunchLive.ts +1 -1
  41. package/src/lib/booking/booking-source.ts +51 -0
  42. package/src/lib/booking/checkout-breakdown.ts +69 -0
  43. package/src/lib/booking/correlation-id.ts +46 -0
  44. package/src/lib/booking/i18n/config.ts +21 -0
  45. package/src/lib/booking/i18n/index.tsx +144 -0
  46. package/src/lib/booking/i18n/messages/en.json +236 -0
  47. package/src/lib/booking/i18n/messages/fr.json +236 -0
  48. package/src/lib/booking/itinerary-display.ts +36 -0
  49. package/src/lib/booking/itinerary-labels.ts +70 -0
  50. package/src/lib/booking/location-calculations.ts +43 -0
  51. package/src/lib/booking/location-utils.ts +165 -0
  52. package/src/lib/booking/map-utils.ts +153 -0
  53. package/src/lib/booking/marker-icons.ts +113 -0
  54. package/src/lib/booking/normalize-booking-product-id.ts +21 -0
  55. package/src/lib/booking/pickup-location-types.ts +25 -0
  56. package/src/lib/booking/places-api.ts +154 -0
  57. package/src/lib/booking/pricing.ts +466 -0
  58. package/src/lib/booking/product-option-id.ts +35 -0
  59. package/src/lib/booking/source-metadata.ts +226 -0
  60. package/src/lib/booking/sunday-week.ts +14 -0
  61. package/src/lib/booking/trace-context.ts +62 -0
  62. package/src/lib/booking/utils.ts +9 -0
  63. package/src/lib/booking-api.ts +1793 -0
  64. package/src/lib/booking-constants.ts +23 -0
  65. package/src/lib/booking-ref.ts +13 -0
  66. package/src/lib/booking-types.ts +36 -0
  67. package/src/lib/currency.ts +81 -0
  68. package/src/lib/dap-descriptions.ts +50 -0
  69. package/src/lib/dap-itinerary-preview.ts +315 -0
  70. package/src/lib/dependent-add-on-api.ts +434 -0
  71. package/src/lib/env.ts +102 -0
  72. package/src/lib/manage-booking-post-checkout.ts +68 -0
  73. package/src/lib/photo-dap-config.ts +228 -0
  74. package/src/providers/booking-dialog-provider.tsx +3 -3
  75. package/src/providers/dependent-add-on-dialog-provider.tsx +105 -0
  76. package/src/strings/en.json +1774 -0
  77. package/src/strings/es.json +1573 -0
  78. package/src/strings/fr.json +1573 -0
  79. package/src/strings/index.js +23 -0
  80. package/src/types.d.ts +11 -0
  81. package/ticketboothapp-booking-1.2.48.tgz +0 -0
  82. package/tsconfig.json +3 -2
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ticketboothapp/booking",
3
- "version": "1.2.47",
3
+ "version": "1.2.49",
4
4
  "private": false,
5
5
  "sideEffects": [
6
6
  "**/*.css",
@@ -0,0 +1,18 @@
1
+ export interface BookingData {
2
+ bookingReference: string;
3
+ reservationReference?: string;
4
+ dateTime?: string;
5
+ totalAmount?: number;
6
+ currency?: string;
7
+ productId?: string;
8
+ optionId?: string;
9
+ bookingItems?: Array<{ category: string; count: number }>;
10
+ pickupLocationId?: string | null;
11
+ travelerHotel?: string | null;
12
+ startTime?: string | null;
13
+ returnAvailabilityId?: string | null;
14
+ cancellationPolicyId?: string | null;
15
+ promoCode?: string | null;
16
+ addOnSelections?: Array<{ addOnId: string; variantId?: string; quantity?: number }> | null;
17
+ [key: string]: unknown;
18
+ }
@@ -1,7 +1,7 @@
1
1
  'use client';
2
2
 
3
- import { formatCurrencyAmount } from '../../../../../src/lib/currency';
4
- import type { AddOn } from '../../../../../src/lib/booking-api';
3
+ import { formatCurrencyAmount } from '../../lib/currency';
4
+ import type { AddOn } from '../../lib/booking-api';
5
5
  import { MealDrinkAddOnSelector, canUseMealDrinkSelector } from './MealDrinkAddOnSelector';
6
6
  import type { Currency } from './CurrencySwitcher';
7
7
  import styles from './AddOnsSection.module.css';
@@ -1,7 +1,7 @@
1
1
  'use client';
2
2
 
3
3
  import { createPortal } from 'react-dom';
4
- import { formatCurrencyAmount } from '../../../../../src/lib/currency';
4
+ import { formatCurrencyAmount } from '../../lib/currency';
5
5
  import type { Currency } from './CurrencySwitcher';
6
6
 
7
7
  interface AdminPaymentChoiceModalProps {
@@ -4,7 +4,7 @@ import { useEffect, useRef, useState } from 'react';
4
4
  import { useBookingSourceMetadataFromLocation } from '../../hooks/useBookingSourceMetadataFromLocation';
5
5
  import { useBookingDialog } from '../../providers/booking-dialog-provider';
6
6
  import { useBookingHost } from '../../runtime';
7
- import { getProduct, type Product } from '../../../../../src/lib/booking-api';
7
+ import { getProduct, type Product } from '../../lib/booking-api';
8
8
  import './booking-flow.css';
9
9
  import BookingProductGrid from './BookingProductGrid';
10
10
  import { BookingFlow } from './BookingFlow';
@@ -25,13 +25,13 @@ import {
25
25
  isInsufficientCapacityReserveError,
26
26
  describeStandardTourCapacityConflictMessage,
27
27
  reportReserveCapacityConflictClientContext,
28
- } from '../../../../../src/lib/booking-api';
28
+ } from '../../lib/booking-api';
29
29
  import {
30
30
  EARLIEST_AVAILABILITY_DATE,
31
31
  LATEST_AVAILABILITY_DATE,
32
32
  INITIAL_FETCH_WEEKS,
33
- } from '../../../../../src/lib/booking-constants';
34
- import { getSundayOfWeek } from '../../../../../src/lib/booking/sunday-week';
33
+ } from '../../lib/booking-constants';
34
+ import { getSundayOfWeek } from '../../lib/booking/sunday-week';
35
35
  import { Calendar } from './Calendar';
36
36
  import { AdminPaymentChoiceModal } from './AdminPaymentChoiceModal';
37
37
  import { ItineraryBox } from './ItineraryBox';
@@ -43,26 +43,26 @@ import { TicketSelector } from './TicketSelector';
43
43
  import { AddOnsSection } from './AddOnsSection';
44
44
  import { CheckoutForm } from './CheckoutForm';
45
45
  import { PromoCodeInput } from './PromoCodeInput';
46
- import { useTranslations, useLocale } from '../../../../../src/lib/booking/i18n';
46
+ import { useTranslations, useLocale } from '../../lib/booking/i18n';
47
47
  import { type Currency } from './CurrencySwitcher';
48
- import { formatBookingRefForDisplay } from '../../../../../src/lib/booking-ref';
48
+ import { formatBookingRefForDisplay } from '../../lib/booking-ref';
49
49
  import {
50
50
  formatCurrencyAmount,
51
51
  reconcileChangeBookingProposedTotal,
52
- } from '../../../../../src/lib/currency';
53
- import { buildCheckoutBreakdown } from '../../../../../src/lib/booking/checkout-breakdown';
54
- import type { PricingConfig, PrecomputedPricesByCategory, ItineraryDisplayStep } from '../../../../../src/lib/booking-api';
55
- import { ItineraryStepType as StepType } from '../../../../../src/lib/booking-api';
52
+ } from '../../lib/currency';
53
+ import { buildCheckoutBreakdown } from '../../lib/booking/checkout-breakdown';
54
+ import type { PricingConfig, PrecomputedPricesByCategory, ItineraryDisplayStep } from '../../lib/booking-api';
55
+ import { ItineraryStepType as StepType } from '../../lib/booking-api';
56
56
  import {
57
57
  getDisplayPriceFromBaseInDisplayCurrency,
58
58
  computePriceBreakdown,
59
59
  computeOrderSummary,
60
60
  type PriceBreakdown as PriceBreakdownData,
61
61
  type OrderSummary,
62
- } from '../../../../../src/lib/booking/pricing';
63
- import { useCompanyTimezone } from '../../../../../src/contexts/CompanyContext';
62
+ } from '../../lib/booking/pricing';
63
+ import { useCompanyTimezone } from '../../contexts/CompanyContext';
64
64
  import { useBookingApp } from '../../contexts/BookingAppContext';
65
- import { useAvailabilitiesCache, buildAvailabilitiesCacheKey } from '../../../../../src/contexts/AvailabilitiesCacheContext';
65
+ import { useAvailabilitiesCache, buildAvailabilitiesCacheKey } from '../../contexts/AvailabilitiesCacheContext';
66
66
  import { type PriceSummaryLine } from './PriceSummary';
67
67
  import { CheckoutModal, type CheckoutModalLineItem } from './CheckoutModal';
68
68
  import { BookingFlowCollage } from './BookingFlowCollage';
@@ -71,9 +71,9 @@ import {
71
71
  buildBookingSourceContext,
72
72
  inferClientBookingSourceFromProductIds,
73
73
  type BookingSourceMetadata,
74
- } from '../../../../../src/lib/booking/source-metadata';
75
- import { getItineraryStepLabel } from '../../../../../src/lib/booking/itinerary-display';
76
- import { MANAGE_BOOKING_FROM_CHANGE_PAYMENT, MANAGE_BOOKING_QUERY_FROM } from '../../../../../src/lib/manage-booking-post-checkout';
74
+ } from '../../lib/booking/source-metadata';
75
+ import { getItineraryStepLabel } from '../../lib/booking/itinerary-display';
76
+ import { MANAGE_BOOKING_FROM_CHANGE_PAYMENT, MANAGE_BOOKING_QUERY_FROM } from '../../lib/manage-booking-post-checkout';
77
77
  import { useBookingHost } from '../../runtime';
78
78
  import type { BookingFlowUiOptions } from './booking-flow-ui';
79
79
  import { BOOKING_FLOW_ABANDON_EVENT } from '../../providers/booking-dialog-provider';
@@ -4036,7 +4036,7 @@ export function BookingFlow({
4036
4036
  } | null;
4037
4037
  const displayProducts = catalog.getProducts(defaultStrings) as Record<
4038
4038
  string,
4039
- { id: string; videoUrl?: import('../../../../../src/constants/products').VideoSources }
4039
+ { id: string; videoUrl?: import('../../constants/products').VideoSources }
4040
4040
  >;
4041
4041
  const displayProduct = Object.values(displayProducts).find((p) => p.id === productId);
4042
4042
  const collageImageIds = config?.display?.collageImageIds ?? config?.display?.imageIds ?? [];
@@ -1,10 +1,11 @@
1
+ // @ts-nocheck
1
2
  'use client';
2
3
 
3
4
  import { useState, useRef, useEffect, useCallback } from 'react';
4
5
  import BackgroundPlayer from 'next-video/background-player';
5
- import type { VideoSources } from '../../../../../src/constants/products';
6
+ import type { VideoSources } from '../../constants/products';
6
7
  import { resolvePublicAssetUrl, useBookingHost } from '../../runtime';
7
- import { useTranslations } from '../../../../../src/lib/booking/i18n';
8
+ import { useTranslations } from '../../lib/booking/i18n';
8
9
  import styles from './BookingFlowCollage.module.css';
9
10
 
10
11
  export interface BookingFlowCollageProps {
@@ -1,6 +1,6 @@
1
1
  'use client';
2
2
 
3
- import type { ProductConfig } from '../../../../../src/lib/booking-types';
3
+ import type { ProductConfig } from '../../lib/booking-types';
4
4
  import styles from './BookingFlowPlaceholder.module.css';
5
5
 
6
6
  interface BookingFlowPlaceholderProps {
@@ -2,7 +2,7 @@
2
2
 
3
3
  import { useEffect, useRef } from 'react';
4
4
  import { useBookingHost } from '../../runtime';
5
- import type { VideoSources } from '../../../../../src/constants/products';
5
+ import type { VideoSources } from '../../constants/products';
6
6
  import { BookingFlowCollage } from './BookingFlowCollage';
7
7
  import { TourDescription } from './TourDescription';
8
8
 
@@ -1,3 +1,4 @@
1
+ // @ts-nocheck
1
2
  'use client';
2
3
 
3
4
  import { useState, useMemo, useEffect, useRef, useCallback } from 'react';
@@ -7,8 +8,8 @@ import {
7
8
  type ProductGridRestoreState,
8
9
  } from '../../providers/booking-dialog-provider';
9
10
  import { resolvePublicAssetUrl, useBookingHost } from '../../runtime';
10
- import { useLocale, useTranslations } from '../../../../../src/lib/booking/i18n';
11
- import type { Product } from '../../../../../src/constants/products';
11
+ import { useLocale, useTranslations } from '../../lib/booking/i18n';
12
+ import type { Product } from '../../constants/products';
12
13
  import BackgroundPlayer from 'next-video/background-player';
13
14
  import styles from './BookingProductGrid.module.css';
14
15
 
@@ -20,7 +21,7 @@ type HostedProductGridStrings = {
20
21
  };
21
22
  };
22
23
 
23
- const DEFAULT_VIDEO = {
24
+ const DEFAULT_VIDEO: Product['videoUrl'] = {
24
25
  src: '/videos/via-via-moraine-lake-tour-video.mp4',
25
26
  webm: '/videos/via-via-moraine-lake-tour-video.webm',
26
27
  };
@@ -96,7 +96,8 @@
96
96
  /* Admin capacity mode: let the calendar frame be wider so 7 days fit without horizontal scrolling. */
97
97
  @media (min-width: 640px) {
98
98
  .calendar.calendarAdminMode {
99
- max-width: 50rem;
99
+ margin-top: 12px;
100
+ max-width: 48rem;
100
101
  }
101
102
  }
102
103
 
@@ -5,15 +5,15 @@ import { createPortal } from 'react-dom';
5
5
  import { startOfWeek, addDays, addWeeks, subWeeks, isSameDay, parseISO, startOfMonth, endOfMonth, eachDayOfInterval, addMonths, subMonths } from 'date-fns';
6
6
  import { formatInTimeZone, fromZonedTime } from 'date-fns-tz';
7
7
  import { enUS, fr } from 'date-fns/locale';
8
- import type { Availability } from '../../../../../src/lib/booking-api';
9
- import { useTranslations, useLocale } from '../../../../../src/lib/booking/i18n';
8
+ import type { Availability } from '../../lib/booking-api';
9
+ import { useTranslations, useLocale } from '../../lib/booking/i18n';
10
10
  import {
11
11
  MINI_CALENDAR_START_MONTH,
12
12
  MINI_CALENDAR_END_MONTH,
13
13
  VISIBLE_RANGE_BUFFER_WEEKS,
14
- } from '../../../../../src/lib/booking-constants';
15
- import { getSundayOfWeek } from '../../../../../src/lib/booking/sunday-week';
16
- import { cn } from '../../../../../src/lib/booking/utils';
14
+ } from '../../lib/booking-constants';
15
+ import { getSundayOfWeek } from '../../lib/booking/sunday-week';
16
+ import { cn } from '../../lib/booking/utils';
17
17
  import styles from './Calendar.module.css';
18
18
 
19
19
  // ============ Types ============
@@ -1,8 +1,8 @@
1
1
  'use client';
2
2
 
3
3
  import { Check } from 'lucide-react';
4
- import { formatCurrencyAmount } from '../../../../../src/lib/currency';
5
- import type { CancellationPolicyOption, RefundTierOption } from '../../../../../src/lib/booking-api';
4
+ import { formatCurrencyAmount } from '../../lib/currency';
5
+ import type { CancellationPolicyOption, RefundTierOption } from '../../lib/booking-api';
6
6
  import type { Currency } from './CurrencySwitcher';
7
7
  import styles from './CancellationPolicySelector.module.css';
8
8
 
@@ -1,17 +1,18 @@
1
+ // @ts-nocheck
1
2
  'use client';
2
3
 
3
4
  import { useCallback, useEffect, useMemo, useRef, useState } from 'react';
4
5
  import { AnimatePresence, motion } from 'framer-motion';
5
- import { getProduct, type Product } from '../../../../../src/lib/booking-api';
6
+ import { getProduct, type Product } from '../../lib/booking-api';
6
7
  import { useBookingHost } from '../../runtime';
7
- import { formatCurrencyAmount, type Currency } from '../../../../../src/lib/currency';
8
+ import { formatCurrencyAmount, type Currency } from '../../lib/currency';
8
9
  import { BookingFlow, type ChangeFlowSelectionPreview } from './BookingFlow';
9
10
  import { useBookingSourceMetadataFromLocation } from '../../hooks/useBookingSourceMetadataFromLocation';
10
11
  import styles from './BookingDialog.module.css';
11
12
  import './booking-flow.css';
12
- import type { BookingData } from '../../../../../src/components/BookingDetails';
13
- import { getItineraryStepLabel } from '../../../../../src/lib/booking/itinerary-display';
14
- import { effectiveProductOptionIdForChangeFlow } from '../../../../../src/lib/booking/product-option-id';
13
+ import type { BookingData } from '../../components/BookingDetails';
14
+ import { getItineraryStepLabel } from '../../lib/booking/itinerary-display';
15
+ import { effectiveProductOptionIdForChangeFlow } from '../../lib/booking/product-option-id';
15
16
 
16
17
  interface ChangeBookingDialogProps {
17
18
  isOpen: boolean;
@@ -4,7 +4,7 @@ import { PriceSummary, type PriceSummaryLine } from './PriceSummary';
4
4
  import { TermsAcceptance } from './TermsAcceptance';
5
5
  import { PickupLocationSelector } from './PickupLocationSelector';
6
6
  import type { Currency } from './CurrencySwitcher';
7
- import type { PickupLocation, Destination } from '../../../../../src/lib/booking-api';
7
+ import type { PickupLocation, Destination } from '../../lib/booking-api';
8
8
  import styles from './CheckoutForm.module.css';
9
9
  import { useBookingHost } from '../../runtime';
10
10
  import { AnimatePresence, motion } from 'framer-motion';
@@ -5,11 +5,11 @@ import { createPortal } from 'react-dom';
5
5
  import { loadStripe } from '@stripe/stripe-js';
6
6
  import { Elements, PaymentElement, useStripe, useElements } from '@stripe/react-stripe-js';
7
7
  import { useBookingHost } from '../../runtime';
8
- import { formatCurrencyAmount } from '../../../../../src/lib/currency';
8
+ import { formatCurrencyAmount } from '../../lib/currency';
9
9
  import { PriceSummary, type PriceSummaryLine } from './PriceSummary';
10
10
  import type { Currency } from './CurrencySwitcher';
11
- import type { Locale } from '../../../../../src/lib/booking/i18n/config';
12
- import type { OrderSummaryTicketLine, OrderSummaryFeeLine, PriceBreakdown as PriceBreakdownType } from '../../../../../src/lib/booking/pricing';
11
+ import type { Locale } from '../../lib/booking/i18n/config';
12
+ import type { OrderSummaryTicketLine, OrderSummaryFeeLine, PriceBreakdown as PriceBreakdownType } from '../../lib/booking/pricing';
13
13
 
14
14
  export interface CheckoutModalLineItem {
15
15
  line: OrderSummaryTicketLine;
@@ -2,9 +2,9 @@
2
2
 
3
3
  import { useMemo } from 'react';
4
4
  import { TourDescription } from './TourDescription';
5
- import { useLocale, useTranslations } from '../../../../../src/lib/booking/i18n';
6
- import { getDapDescription } from '../../../../../src/lib/dap-descriptions';
7
- import type { PhotoDapSlug } from '../../../../../src/lib/photo-dap-config';
5
+ import { useLocale, useTranslations } from '../../lib/booking/i18n';
6
+ import { getDapDescription } from '../../lib/dap-descriptions';
7
+ import type { PhotoDapSlug } from '../../lib/photo-dap-config';
8
8
 
9
9
  export function DapTourDescription({
10
10
  slug,
@@ -11,7 +11,7 @@ import {
11
11
  import { format, parseISO } from 'date-fns';
12
12
  import {
13
13
  useDependentAddOnDialog,
14
- } from '../../../../../src/providers/dependent-add-on-dialog-provider';
14
+ } from '../../providers/dependent-add-on-dialog-provider';
15
15
  import { useBookingHost } from '../../runtime';
16
16
  import {
17
17
  getDependentAddOnAvailability,
@@ -20,9 +20,9 @@ import {
20
20
  type DependentAddOnCheckoutQuestion,
21
21
  type DependentAddOnSlot,
22
22
  type DapItineraryStep,
23
- } from '../../../../../src/lib/dependent-add-on-api';
24
- import { dapItineraryStepsToDisplay } from '../../../../../src/lib/dap-itinerary-preview';
25
- import { DEFAULT_PHOTO_DAP_CANCELLATION_DAYS_BEFORE_SESSION } from '../../../../../src/lib/photo-dap-config';
23
+ } from '../../lib/dependent-add-on-api';
24
+ import { dapItineraryStepsToDisplay } from '../../lib/dap-itinerary-preview';
25
+ import { DEFAULT_PHOTO_DAP_CANCELLATION_DAYS_BEFORE_SESSION } from '../../lib/photo-dap-config';
26
26
  import { CheckoutModal, type CheckoutModalLineItem } from './CheckoutModal';
27
27
  import { DapFlowCollage } from './DapFlowCollage';
28
28
  import { DapTourDescription } from './DapTourDescription';
@@ -30,9 +30,9 @@ import {
30
30
  ItineraryReadOnlySummary,
31
31
  type ItineraryReadOnlyPhotoPreview,
32
32
  } from './ItineraryBox';
33
- import { formatBookingRefForDisplay } from '../../../../../src/lib/booking-ref';
34
- import type { Currency } from '../../../../../src/lib/currency';
35
- import { useLocale, useTranslations } from '../../../../../src/lib/booking/i18n';
33
+ import { formatBookingRefForDisplay } from '../../lib/booking-ref';
34
+ import type { Currency } from '../../lib/currency';
35
+ import { useLocale, useTranslations } from '../../lib/booking/i18n';
36
36
  import checkoutFormStyles from './CheckoutForm.module.css';
37
37
  import returnTimeStyles from './ReturnTimeSelector.module.css';
38
38
  import bookingStyles from './BookingDialog.module.css';
@@ -4,7 +4,7 @@ import { useState, useMemo } from 'react';
4
4
  import { loadStripe } from '@stripe/stripe-js';
5
5
  import { Elements, PaymentElement, useStripe, useElements } from '@stripe/react-stripe-js';
6
6
  import { useBookingHost } from '../../runtime';
7
- import { formatCurrencyAmount, type Currency } from '../../../../../src/lib/currency';
7
+ import { formatCurrencyAmount, type Currency } from '../../lib/currency';
8
8
  import bookingStyles from './BookingDialog.module.css';
9
9
 
10
10
  function toCurrency(code: string | undefined): Currency {
@@ -2,12 +2,12 @@
2
2
 
3
3
  import { Fragment, useRef, useEffect, useState } from 'react';
4
4
  import { createPortal } from 'react-dom';
5
- import type { ItineraryDisplayStep } from '../../../../../src/lib/booking-api';
6
- import { ItineraryStepType as StepType } from '../../../../../src/lib/booking-api';
7
- import { getStepLabel } from '../../../../../src/lib/booking/itinerary-labels';
8
- import type { PickupLocation } from '../../../../../src/lib/booking-api';
9
- import type { DapItineraryStep } from '../../../../../src/lib/dap-itinerary-preview';
10
- import { getPhotoSessionInsertPosition } from '../../../../../src/lib/dap-itinerary-preview';
5
+ import type { ItineraryDisplayStep } from '../../lib/booking-api';
6
+ import { ItineraryStepType as StepType } from '../../lib/booking-api';
7
+ import { getStepLabel } from '../../lib/booking/itinerary-labels';
8
+ import type { PickupLocation } from '../../lib/booking-api';
9
+ import type { DapItineraryStep } from '../../lib/dap-itinerary-preview';
10
+ import { getPhotoSessionInsertPosition } from '../../lib/dap-itinerary-preview';
11
11
  import styles from './ItineraryBox.module.css';
12
12
 
13
13
  type TranslationFn = (key: string, params?: Record<string, string>) => string;
@@ -1,6 +1,6 @@
1
1
  'use client';
2
2
 
3
- import type { ItineraryBuilderDestination } from '../../../../../src/lib/booking-api';
3
+ import type { ItineraryBuilderDestination } from '../../lib/booking-api';
4
4
 
5
5
  interface ItineraryBuilderProps {
6
6
  /** Shared destinations from product.itineraryBuilder */
@@ -1,10 +1,10 @@
1
1
  'use client';
2
2
 
3
3
  import { useMemo, useCallback } from 'react';
4
- import { formatCurrencyAmount } from '../../../../../src/lib/currency';
5
- import type { AddOn, AddOnVariant } from '../../../../../src/lib/booking-api';
4
+ import { formatCurrencyAmount } from '../../lib/currency';
5
+ import type { AddOn, AddOnVariant } from '../../lib/booking-api';
6
6
  import type { Currency } from './CurrencySwitcher';
7
- import type { Locale } from '../../../../../src/lib/booking/i18n/config';
7
+ import type { Locale } from '../../lib/booking/i18n/config';
8
8
 
9
9
  export interface AddOnSelection {
10
10
  addOnId: string;
@@ -2,37 +2,37 @@
2
2
 
3
3
  import { useState, useEffect, useMemo, useCallback, useRef } from 'react';
4
4
  import { GoogleMap, Marker, InfoWindow, useJsApiLoader } from '@react-google-maps/api';
5
- import type { PickupLocation, Destination } from '../../../../../src/lib/booking-api';
5
+ import type { PickupLocation, Destination } from '../../lib/booking-api';
6
6
  import {
7
7
  formatDistance,
8
8
  formatTime,
9
9
  geocodeAddress,
10
10
  isWithinPrivateShuttleServiceArea,
11
- } from '../../../../../src/lib/booking/location-utils';
11
+ } from '../../lib/booking/location-utils';
12
12
  import {
13
13
  calculateNearbyLocations,
14
14
  isExactMatch,
15
- } from '../../../../../src/lib/booking/location-calculations';
15
+ } from '../../lib/booking/location-calculations';
16
16
  import {
17
17
  getAutocompleteSuggestions,
18
18
  getPlaceDetails,
19
19
  type AutocompleteSuggestion,
20
- } from '../../../../../src/lib/booking/places-api';
20
+ } from '../../lib/booking/places-api';
21
21
  import {
22
22
  createDistanceMarkerIcon,
23
23
  createPinMarkerIcon,
24
24
  createSearchedLocationPinIcon,
25
25
  createDestinationMarkerIcon,
26
- } from '../../../../../src/lib/booking/marker-icons';
26
+ } from '../../lib/booking/marker-icons';
27
27
  import { useBookingHost } from '../../runtime';
28
28
  import {
29
29
  calculateMapCenter,
30
30
  calculateMapBounds,
31
31
  getMapOptions,
32
32
  panToLocationIfNeeded,
33
- } from '../../../../../src/lib/booking/map-utils';
34
- import type { SearchedLocation, NearbyLocation } from '../../../../../src/lib/booking/pickup-location-types';
35
- import { useTranslations } from '../../../../../src/lib/booking/i18n';
33
+ } from '../../lib/booking/map-utils';
34
+ import type { SearchedLocation, NearbyLocation } from '../../lib/booking/pickup-location-types';
35
+ import { useTranslations } from '../../lib/booking/i18n';
36
36
  import { useBookingApp } from '../../contexts/BookingAppContext';
37
37
  import styles from './PickupLocationSelector.module.css';
38
38
 
@@ -1,7 +1,7 @@
1
1
  'use client';
2
2
 
3
- import type { Availability } from '../../../../../src/lib/booking-api';
4
- import type { ProductOption } from '../../../../../src/lib/booking-api';
3
+ import type { Availability } from '../../lib/booking-api';
4
+ import type { ProductOption } from '../../lib/booking-api';
5
5
  import styles from './PickupTimeSelector.module.css';
6
6
 
7
7
  type TranslationFn = (key: string, params?: Record<string, string | number>) => string;
@@ -1,12 +1,12 @@
1
1
  'use client';
2
2
 
3
3
  import { useState } from 'react';
4
- import { formatCurrencyAmount } from '../../../../../src/lib/currency';
5
- import type { PriceBreakdown as PriceBreakdownType } from '../../../../../src/lib/booking/pricing';
6
- import { useTranslations } from '../../../../../src/lib/booking/i18n';
4
+ import { formatCurrencyAmount } from '../../lib/currency';
5
+ import type { PriceBreakdown as PriceBreakdownType } from '../../lib/booking/pricing';
6
+ import { useTranslations } from '../../lib/booking/i18n';
7
7
  import { useBookingApp } from '../../contexts/BookingAppContext';
8
8
  import type { Currency } from './CurrencySwitcher';
9
- import type { Locale } from '../../../../../src/lib/booking/i18n/config';
9
+ import type { Locale } from '../../lib/booking/i18n/config';
10
10
 
11
11
  export interface PriceBreakdownProps {
12
12
  category: string;
@@ -1,11 +1,11 @@
1
1
  'use client';
2
2
 
3
- import { formatCurrencyAmount } from '../../../../../src/lib/currency';
4
- import type { PriceBreakdown as PriceBreakdownType } from '../../../../../src/lib/booking/pricing';
3
+ import { formatCurrencyAmount } from '../../lib/currency';
4
+ import type { PriceBreakdown as PriceBreakdownType } from '../../lib/booking/pricing';
5
5
  import { PriceBreakdown } from './PriceBreakdown';
6
6
  import { InfoTooltip } from './InfoTooltip';
7
7
  import type { Currency } from './CurrencySwitcher';
8
- import type { Locale } from '../../../../../src/lib/booking/i18n/config';
8
+ import type { Locale } from '../../lib/booking/i18n/config';
9
9
  import styles from './PriceSummary.module.css';
10
10
 
11
11
  /** One row in the price summary: either a ticket line (with optional breakdown tooltip) or a simple line. */
@@ -23,23 +23,23 @@ import {
23
23
  isInsufficientCapacityReserveError,
24
24
  describePrivateShuttleCapacityConflictMessage,
25
25
  reportReserveCapacityConflictClientContext,
26
- } from '../../../../../src/lib/booking-api';
26
+ } from '../../lib/booking-api';
27
27
  import {
28
28
  EARLIEST_AVAILABILITY_DATE,
29
29
  LATEST_AVAILABILITY_DATE,
30
30
  INITIAL_FETCH_WEEKS,
31
- } from '../../../../../src/lib/booking-constants';
32
- import { formatCurrencyAmount } from '../../../../../src/lib/currency';
33
- import { formatBookingRefForDisplay } from '../../../../../src/lib/booking-ref';
34
- import { buildCheckoutBreakdown } from '../../../../../src/lib/booking/checkout-breakdown';
35
- import type { PricingConfig, PrecomputedPricesByCategory } from '../../../../../src/lib/booking-api';
31
+ } from '../../lib/booking-constants';
32
+ import { formatCurrencyAmount } from '../../lib/currency';
33
+ import { formatBookingRefForDisplay } from '../../lib/booking-ref';
34
+ import { buildCheckoutBreakdown } from '../../lib/booking/checkout-breakdown';
35
+ import type { PricingConfig, PrecomputedPricesByCategory } from '../../lib/booking-api';
36
36
  import { Calendar } from './Calendar';
37
37
  import { PickupLocationSelector } from './PickupLocationSelector';
38
- import { useTranslations, useLocale } from '../../../../../src/lib/booking/i18n';
38
+ import { useTranslations, useLocale } from '../../lib/booking/i18n';
39
39
  import { type Currency } from './CurrencySwitcher';
40
- import { useCompanyTimezone } from '../../../../../src/contexts/CompanyContext';
40
+ import { useCompanyTimezone } from '../../contexts/CompanyContext';
41
41
  import { useBookingApp } from '../../contexts/BookingAppContext';
42
- import { useAvailabilitiesCache, buildAvailabilitiesCacheKey } from '../../../../../src/contexts/AvailabilitiesCacheContext';
42
+ import { useAvailabilitiesCache, buildAvailabilitiesCacheKey } from '../../contexts/AvailabilitiesCacheContext';
43
43
  import { CheckoutModal, type CheckoutModalLineItem } from './CheckoutModal';
44
44
  import { CancellationPolicySelector } from './CancellationPolicySelector';
45
45
  import { PriceSummary } from './PriceSummary';
@@ -55,8 +55,8 @@ import {
55
55
  buildBookingSourceContext,
56
56
  inferClientBookingSourceFromProductIds,
57
57
  type BookingSourceMetadata,
58
- } from '../../../../../src/lib/booking/source-metadata';
59
- import type { VideoSources } from '../../../../../src/constants/products';
58
+ } from '../../lib/booking/source-metadata';
59
+ import type { VideoSources } from '../../constants/products';
60
60
  import type { BookingFlowUiOptions } from './booking-flow-ui';
61
61
  import { BOOKING_FLOW_ABANDON_EVENT } from '../../providers/booking-dialog-provider';
62
62
 
@@ -1,7 +1,7 @@
1
1
  'use client';
2
2
 
3
3
  import { Check, X } from 'lucide-react';
4
- import { formatCurrencyAmount } from '../../../../../src/lib/currency';
4
+ import { formatCurrencyAmount } from '../../lib/currency';
5
5
  import type { Currency } from './CurrencySwitcher';
6
6
  import styles from './PromoCodeInput.module.css';
7
7
 
@@ -2,8 +2,8 @@
2
2
 
3
3
  import { parseISO } from 'date-fns';
4
4
  import { formatInTimeZone } from 'date-fns-tz';
5
- import { formatCurrencyAmount } from '../../../../../src/lib/currency';
6
- import type { ReturnOption } from '../../../../../src/lib/booking-api';
5
+ import { formatCurrencyAmount } from '../../lib/currency';
6
+ import type { ReturnOption } from '../../lib/booking-api';
7
7
  import type { Currency } from './CurrencySwitcher';
8
8
  import styles from './ReturnTimeSelector.module.css';
9
9
 
@@ -4,7 +4,7 @@ import { useMemo } from 'react';
4
4
  import { parseISO } from 'date-fns';
5
5
  import { enUS, fr } from 'date-fns/locale';
6
6
  import { formatInTimeZone } from 'date-fns-tz';
7
- import { formatCurrencyAmount } from '../../../../../src/lib/currency';
7
+ import { formatCurrencyAmount } from '../../lib/currency';
8
8
  import type { Currency } from './CurrencySwitcher';
9
9
  import styles from './TicketSelector.module.css';
10
10
 
@@ -1,7 +1,7 @@
1
1
  'use client';
2
2
 
3
3
  import { useState, useMemo } from 'react';
4
- import { useTranslations, useLocale } from '../../../../../src/lib/booking/i18n';
4
+ import { useTranslations, useLocale } from '../../lib/booking/i18n';
5
5
  import { useBookingHost } from '../../runtime';
6
6
  import styles from './TourDescription.module.css';
7
7