@duffel/components 3.1.3--prototype.12 → 3.1.3--prototype.14

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 (114) hide show
  1. package/components/DuffelAncillaries/Card.d.ts +14 -0
  2. package/components/DuffelAncillaries/Counter.d.ts +10 -0
  3. package/components/DuffelAncillaries/DuffelAncillaries.d.ts +3 -0
  4. package/components/DuffelAncillaries/DuffelAncillariesCustomElement.d.ts +12 -0
  5. package/components/DuffelAncillaries/bags/BaggageSelectionCard.d.ts +11 -0
  6. package/components/DuffelAncillaries/bags/BaggageSelectionController.d.ts +13 -0
  7. package/components/DuffelAncillaries/bags/BaggageSelectionModal.d.ts +11 -0
  8. package/components/DuffelAncillaries/bags/BaggageSelectionModalBody.d.ts +11 -0
  9. package/components/DuffelAncillaries/bags/BaggageSelectionModalBodyPassenger.d.ts +13 -0
  10. package/components/DuffelAncillaries/bags/BaggageSelectionModalFooter.d.ts +14 -0
  11. package/components/DuffelAncillaries/bags/BaggageSelectionModalHeader.d.ts +9 -0
  12. package/components/DuffelAncillaries/bags/IncludedBaggageBanner.d.ts +7 -0
  13. package/components/DuffelAncillaries/cancel_for_any_reason/CfarSelectionCard.d.ts +10 -0
  14. package/components/DuffelAncillaries/cancel_for_any_reason/CfarSelectionModal.d.ts +11 -0
  15. package/components/DuffelAncillaries/cancel_for_any_reason/CfarSelectionModalBody.d.ts +7 -0
  16. package/components/DuffelAncillaries/cancel_for_any_reason/CfarSelectionModalBodyListItem.d.ts +4 -0
  17. package/components/DuffelAncillaries/cancel_for_any_reason/CfarSelectionModalFooter.d.ts +11 -0
  18. package/components/DuffelAncillaries/cancel_for_any_reason/CfarSelectionModalHeader.d.ts +2 -0
  19. package/components/DuffelAncillaries/seats/Amenity.d.ts +6 -0
  20. package/components/DuffelAncillaries/seats/DeckSelect.d.ts +15 -0
  21. package/components/DuffelAncillaries/seats/Element.d.ts +15 -0
  22. package/components/DuffelAncillaries/seats/EmptyElement.d.ts +2 -0
  23. package/components/DuffelAncillaries/seats/ExitElement.d.ts +6 -0
  24. package/components/DuffelAncillaries/seats/Legend.d.ts +12 -0
  25. package/components/DuffelAncillaries/seats/Row.d.ts +13 -0
  26. package/components/DuffelAncillaries/seats/RowSection.d.ts +17 -0
  27. package/components/DuffelAncillaries/seats/SeatElement.d.ts +13 -0
  28. package/components/DuffelAncillaries/seats/SeatInfo.d.ts +7 -0
  29. package/components/DuffelAncillaries/seats/SeatMap.d.ts +12 -0
  30. package/components/DuffelAncillaries/seats/SeatMapUnavailable.d.ts +2 -0
  31. package/components/DuffelAncillaries/seats/SeatSelectionCard.d.ts +13 -0
  32. package/components/DuffelAncillaries/seats/SeatSelectionModal.d.ts +13 -0
  33. package/components/DuffelAncillaries/seats/SeatSelectionModalBody.d.ts +4 -0
  34. package/components/DuffelAncillaries/seats/SeatSelectionModalFooter.d.ts +16 -0
  35. package/components/DuffelAncillaries/seats/SeatSelectionModalHeader.d.ts +10 -0
  36. package/components/DuffelAncillaries/seats/SeatUnavailable.d.ts +5 -0
  37. package/components/DuffelPayments/DuffelPayments.d.ts +11 -0
  38. package/components/DuffelPayments/DuffelPaymentsCustomElement.d.ts +13 -0
  39. package/components/PlacesLookup/PlacesLookup.d.ts +20 -0
  40. package/components/shared/AnimatedLoaderEllipsis.d.ts +2 -0
  41. package/components/shared/Button.d.ts +23 -0
  42. package/components/shared/ErrorBoundary.d.ts +13 -0
  43. package/components/shared/FetchOfferErrorState.d.ts +5 -0
  44. package/components/shared/Icon.d.ts +46 -0
  45. package/components/shared/IconButton.d.ts +16 -0
  46. package/components/shared/Modal.d.ts +11 -0
  47. package/components/shared/NonIdealState.d.ts +4 -0
  48. package/components/shared/Stamp.d.ts +7 -0
  49. package/components/shared/Tabs.d.ts +16 -0
  50. package/custom-elements.d.ts +6 -0
  51. package/index.d.ts +7 -0
  52. package/lib/captureErrorInSentry.d.ts +1 -0
  53. package/lib/compileCreateOrderPayload.d.ts +14 -0
  54. package/lib/createPriceFormatters.d.ts +12 -0
  55. package/lib/fetchFromDuffelAPI.d.ts +8 -0
  56. package/lib/fetchFromFixtures.d.ts +4 -0
  57. package/lib/formatAvailableServices.d.ts +12 -0
  58. package/lib/formatDate.d.ts +2 -0
  59. package/lib/formatSeatMaps.d.ts +4 -0
  60. package/lib/getBaggageServiceDescription.d.ts +2 -0
  61. package/lib/getCabinsForSegmentAndDeck.d.ts +2 -0
  62. package/lib/getCurrencyForSeatMaps.d.ts +10 -0
  63. package/lib/getCurrencyForServices.d.ts +11 -0
  64. package/lib/getFirstSeatElementMatchingCriteria.d.ts +3 -0
  65. package/lib/getPassengerBySegmentList.d.ts +6 -0
  66. package/lib/getPassengerInitials.d.ts +1 -0
  67. package/lib/getPassengerMapById.d.ts +3 -0
  68. package/lib/getPassengerName.d.ts +3 -0
  69. package/lib/getRowNumber.d.ts +2 -0
  70. package/lib/getSegmentList.d.ts +2 -0
  71. package/lib/getServicePriceMapById.d.ts +3 -0
  72. package/lib/getSymbols.d.ts +2 -0
  73. package/lib/getTotalAmountForServices.d.ts +6 -0
  74. package/lib/getTotalQuantity.d.ts +2 -0
  75. package/lib/hasHighLuminance.d.ts +1 -0
  76. package/lib/hasService.d.ts +2 -0
  77. package/lib/hasServiceOfSameMetadataTypeAlreadyBeenSelected.d.ts +3 -0
  78. package/lib/hasWings.d.ts +2 -0
  79. package/lib/isBaggageService.d.ts +2 -0
  80. package/lib/isCancelForAnyReasonService.d.ts +2 -0
  81. package/lib/isFixtureOfferId.d.ts +2 -0
  82. package/lib/isPayloadComplete.d.ts +2 -0
  83. package/lib/isSeatElement.d.ts +2 -0
  84. package/lib/logging.d.ts +46 -0
  85. package/lib/moneyStringFormatter.d.ts +8 -0
  86. package/lib/offerIsExpired.d.ts +2 -0
  87. package/lib/retrieveOffer.d.ts +2 -0
  88. package/lib/retrieveOfferFromDuffelAPI.d.ts +1 -0
  89. package/lib/retrieveSeatMaps.d.ts +2 -0
  90. package/lib/retrieveSeatMapsFromDuffelAPI.d.ts +1 -0
  91. package/lib/setBodyScrollability.d.ts +1 -0
  92. package/lib/validateProps.d.ts +7 -0
  93. package/lib/withPlural.d.ts +1 -0
  94. package/package.json +4 -4
  95. package/tsconfig.tsbuildinfo +1 -0
  96. package/types/Aircraft.d.ts +14 -0
  97. package/types/Airline.d.ts +14 -0
  98. package/types/Airport.d.ts +44 -0
  99. package/types/City.d.ts +18 -0
  100. package/types/CreateOrderPayload.d.ts +72 -0
  101. package/types/CurrencyConversion.d.ts +10 -0
  102. package/types/DuffelAncillariesProps.d.ts +70 -0
  103. package/types/Offer.d.ts +711 -0
  104. package/types/Order.d.ts +8 -0
  105. package/types/Place.d.ts +8 -0
  106. package/types/SeatMap.d.ts +190 -0
  107. package/types/index.d.ts +11 -0
  108. package/README.md +0 -68
  109. package/react-dist/index.d.ts +0 -2121
  110. /package/{react-dist/custom-elements.js → custom-elements.js} +0 -0
  111. /package/{react-dist/custom-elements.js.map → custom-elements.js.map} +0 -0
  112. /package/{react-dist/index.js → index.js} +0 -0
  113. /package/{react-dist/index.js.map → index.js.map} +0 -0
  114. /package/{react-dist/index.tsbuildinfo → index.tsbuildinfo} +0 -0
@@ -0,0 +1,14 @@
1
+ import { IconName } from "@components/shared/Icon";
2
+ import * as React from "react";
3
+ export interface CardProps {
4
+ buttonTitle: string;
5
+ title: string;
6
+ icon: IconName;
7
+ onClick?: (() => void) | null;
8
+ children: React.ReactNode;
9
+ copy: string;
10
+ isLoading?: boolean;
11
+ disabled?: boolean;
12
+ isSelected?: boolean;
13
+ }
14
+ export declare const Card: React.FC<CardProps>;
@@ -0,0 +1,10 @@
1
+ import * as React from "react";
2
+ interface CounterProps {
3
+ id: string;
4
+ min: number;
5
+ max: number;
6
+ value: number;
7
+ onChange: (value: number) => void;
8
+ }
9
+ export declare const Counter: React.FC<CounterProps>;
10
+ export {};
@@ -0,0 +1,3 @@
1
+ import * as React from "react";
2
+ import { DuffelAncillariesProps } from "../../types/DuffelAncillariesProps";
3
+ export declare const DuffelAncillaries: React.FC<DuffelAncillariesProps>;
@@ -0,0 +1,12 @@
1
+ import { DuffelAncillariesPropsWithClientKeyAndOfferId, DuffelAncillariesPropsWithOfferIdForFixture, DuffelAncillariesPropsWithOffersAndSeatMaps, DuffelAncillariesPropWithOfferAndClientKey, OnPayloadReady } from "../../types/DuffelAncillariesProps";
2
+ declare global {
3
+ namespace JSX {
4
+ interface IntrinsicElements {
5
+ "duffel-ancillaries": React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>;
6
+ }
7
+ }
8
+ }
9
+ type DuffelAncillariesCustomElementRenderArguments = Omit<DuffelAncillariesPropsWithOfferIdForFixture, "onPayloadReady"> | Omit<DuffelAncillariesPropsWithClientKeyAndOfferId, "onPayloadReady"> | Omit<DuffelAncillariesPropWithOfferAndClientKey, "onPayloadReady"> | Omit<DuffelAncillariesPropsWithOffersAndSeatMaps, "onPayloadReady">;
10
+ export declare function renderDuffelAncillariesCustomElement(props: DuffelAncillariesCustomElementRenderArguments): void;
11
+ export declare function onDuffelAncillariesPayloadReady(onPayloadReady: OnPayloadReady): void;
12
+ export {};
@@ -0,0 +1,11 @@
1
+ import React from "react";
2
+ import { CreateOrderPayload, CreateOrderPayloadServices } from "../../../types/CreateOrderPayload";
3
+ import { Offer } from "../../../types/Offer";
4
+ export interface BaggageSelectionCardProps {
5
+ isLoading: boolean;
6
+ offer?: Offer;
7
+ passengers: CreateOrderPayload["passengers"];
8
+ selectedServices: CreateOrderPayloadServices;
9
+ setSelectedServices: (selectedServices: CreateOrderPayloadServices) => void;
10
+ }
11
+ export declare const BaggageSelectionCard: React.FC<BaggageSelectionCardProps>;
@@ -0,0 +1,13 @@
1
+ import React from "react";
2
+ import { CreateOrderPayloadServices } from "../../../types/CreateOrderPayload";
3
+ import { OfferAvailableServiceBaggage } from "../../../types/Offer";
4
+ interface BaggageSelectionControllerProps {
5
+ segmentId: string;
6
+ passengerId: string;
7
+ availableService: OfferAvailableServiceBaggage;
8
+ selectedServices: CreateOrderPayloadServices;
9
+ quantity: number;
10
+ onQuantityChanged: (quantity: number) => void;
11
+ }
12
+ export declare const BaggageSelectionController: React.FC<BaggageSelectionControllerProps>;
13
+ export {};
@@ -0,0 +1,11 @@
1
+ import React from "react";
2
+ import { CreateOrderPayload, CreateOrderPayloadServices } from "../../../types/CreateOrderPayload";
3
+ import { Offer } from "../../../types/Offer";
4
+ export interface BaggageSelectionModalProps {
5
+ isOpen: boolean;
6
+ offer?: Offer;
7
+ passengers: CreateOrderPayload["passengers"];
8
+ selectedServices: CreateOrderPayloadServices;
9
+ onClose: (selectedServices: CreateOrderPayloadServices) => void;
10
+ }
11
+ export declare const BaggageSelectionModal: React.FC<BaggageSelectionModalProps>;
@@ -0,0 +1,11 @@
1
+ import React from "react";
2
+ import { CreateOrderPayloadPassenger, CreateOrderPayloadServices } from "../../../types/CreateOrderPayload";
3
+ import { Offer, OfferSliceSegment } from "../../../types/Offer";
4
+ export interface BaggageSelectionModalBodyProps {
5
+ offer: Offer;
6
+ segment: OfferSliceSegment;
7
+ passengersById: Record<CreateOrderPayloadPassenger["id"], CreateOrderPayloadPassenger>;
8
+ selectedServices: CreateOrderPayloadServices;
9
+ setSelectedServices: (selectedServices: CreateOrderPayloadServices) => void;
10
+ }
11
+ export declare const BaggageSelectionModalBody: React.FC<BaggageSelectionModalBodyProps>;
@@ -0,0 +1,13 @@
1
+ import React from "react";
2
+ import { CreateOrderPayloadServices } from "../../../types/CreateOrderPayload";
3
+ import { OfferAvailableServiceBaggage, OfferSliceSegmentPassengerBaggage } from "../../../types/Offer";
4
+ export interface BaggageSelectionModalBodyPassengerProps {
5
+ segmentId: string;
6
+ passengerId: string;
7
+ passengerName: string;
8
+ includedBaggage: OfferSliceSegmentPassengerBaggage[];
9
+ passengerServicesForSegment: OfferAvailableServiceBaggage[];
10
+ selectedServices: CreateOrderPayloadServices;
11
+ setSelectedServices: (selectedServices: CreateOrderPayloadServices) => void;
12
+ }
13
+ export declare const BaggageSelectionModalBodyPassenger: React.FC<BaggageSelectionModalBodyPassengerProps>;
@@ -0,0 +1,14 @@
1
+ import { ServicePriceMapById } from "@lib/getServicePriceMapById";
2
+ import React from "react";
3
+ import { CreateOrderPayloadServices } from "../../../types/CreateOrderPayload";
4
+ export interface BaggageSelectionModalFooterProps {
5
+ currency: string;
6
+ selectedServices: CreateOrderPayloadServices;
7
+ servicePrices: ServicePriceMapById;
8
+ isFirstSegment: boolean;
9
+ isLastSegment: boolean;
10
+ onNextSegmentButtonClicked: () => void;
11
+ onPreviousSegmentButtonClicked: () => void;
12
+ onClose: () => void;
13
+ }
14
+ export declare const BaggageSelectionModalFooter: React.FC<BaggageSelectionModalFooterProps>;
@@ -0,0 +1,9 @@
1
+ import React from "react";
2
+ import { OfferSliceSegment } from "../../../types/Offer";
3
+ export interface BaggageSelectionModalHeaderProps {
4
+ segmentCount: number;
5
+ currentSegmentIndex: number;
6
+ currentSegment: OfferSliceSegment;
7
+ setCurrentSegmentIndex: (index: number) => void;
8
+ }
9
+ export declare const BaggageSelectionModalHeader: React.FC<BaggageSelectionModalHeaderProps>;
@@ -0,0 +1,7 @@
1
+ import React from "react";
2
+ import { OfferSliceSegmentPassengerBaggage } from "../../../types/Offer";
3
+ interface IncludedBaggageBannerProps {
4
+ includedBaggage: OfferSliceSegmentPassengerBaggage[];
5
+ }
6
+ export declare const IncludedBaggageBanner: React.FC<IncludedBaggageBannerProps>;
7
+ export {};
@@ -0,0 +1,10 @@
1
+ import React from "react";
2
+ import { CreateOrderPayloadServices } from "../../../types/CreateOrderPayload";
3
+ import { Offer } from "../../../types/Offer";
4
+ export interface CfarSelectionCardProps {
5
+ isLoading: boolean;
6
+ offer?: Offer;
7
+ selectedServices: CreateOrderPayloadServices;
8
+ setSelectedServices: (selectedServices: CreateOrderPayloadServices) => void;
9
+ }
10
+ export declare const CfarSelectionCard: React.FC<CfarSelectionCardProps>;
@@ -0,0 +1,11 @@
1
+ import React from "react";
2
+ import { CreateOrderPayloadServices } from "../../../types/CreateOrderPayload";
3
+ import { Offer, OfferAvailableServiceCancelForAnyReason } from "../../../types/Offer";
4
+ export interface CfarSelectionModalProps {
5
+ isOpen: boolean;
6
+ offerCurrency?: Offer["base_currency"];
7
+ service?: OfferAvailableServiceCancelForAnyReason;
8
+ selectedServices: CreateOrderPayloadServices;
9
+ onClose: (selectedServices: CreateOrderPayloadServices) => void;
10
+ }
11
+ export declare const CfarSelectionModal: React.FC<CfarSelectionModalProps>;
@@ -0,0 +1,7 @@
1
+ import React from "react";
2
+ import { Offer, OfferAvailableServiceCancelForAnyReason } from "../../../types/Offer";
3
+ export interface CfarSelectionModalBodyProps {
4
+ offerCurrency: Offer["base_currency"];
5
+ service: OfferAvailableServiceCancelForAnyReason;
6
+ }
7
+ export declare const CfarSelectionModalBody: React.FC<CfarSelectionModalBodyProps>;
@@ -0,0 +1,4 @@
1
+ import React, { ReactNode } from "react";
2
+ export declare const CfarSelectionModalBodyListItem: React.FC<{
3
+ children: ReactNode;
4
+ }>;
@@ -0,0 +1,11 @@
1
+ import React from "react";
2
+ import { CreateOrderPayloadServices } from "../../../types/CreateOrderPayload";
3
+ import { OfferAvailableServiceCancelForAnyReason } from "../../../types/Offer";
4
+ export interface CfarSelectionModalFooterProps {
5
+ service: OfferAvailableServiceCancelForAnyReason;
6
+ selectedServices: CreateOrderPayloadServices;
7
+ onAddCfarService: () => void;
8
+ onRemoveCfarService: () => void;
9
+ onClose: () => void;
10
+ }
11
+ export declare const CfarSelectionModalFooter: React.FC<CfarSelectionModalFooterProps>;
@@ -0,0 +1,2 @@
1
+ import React from "react";
2
+ export declare const CfarSelectionModalHeader: React.FC;
@@ -0,0 +1,6 @@
1
+ import * as React from "react";
2
+ import { SeatMapCabinRowSectionElementAmenity } from "../../../types/SeatMap";
3
+ export interface AmenityProps {
4
+ type: SeatMapCabinRowSectionElementAmenity;
5
+ }
6
+ export declare const Amenity: React.FC<AmenityProps>;
@@ -0,0 +1,15 @@
1
+ import * as React from "react";
2
+ export interface DeckSelectProps {
3
+ /**
4
+ * The currently selected deck number
5
+ */
6
+ value: number;
7
+ /**
8
+ * What to do when the user selects a deck
9
+ */
10
+ setValue: (value: number) => void;
11
+ }
12
+ /**
13
+ * The deck selection component for the seat map.
14
+ */
15
+ export declare const DeckSelect: React.FC<DeckSelectProps>;
@@ -0,0 +1,15 @@
1
+ import * as React from "react";
2
+ import { CreateOrderPayloadSeatService } from "../../../types/CreateOrderPayload";
3
+ import { SeatMapCabinRowSectionElement } from "../../../types/SeatMap";
4
+ interface ElementProps {
5
+ sectionIndex: number;
6
+ elementIndex: number;
7
+ element: SeatMapCabinRowSectionElement;
8
+ selectedServicesMap: Record<string, CreateOrderPayloadSeatService>;
9
+ onSeatToggled: (seatService: CreateOrderPayloadSeatService) => void;
10
+ currentPassengerId: string;
11
+ currentSegmentId: string;
12
+ currentPassengerName: string;
13
+ }
14
+ export declare const Element: React.FC<ElementProps>;
15
+ export {};
@@ -0,0 +1,2 @@
1
+ import * as React from "react";
2
+ export declare const EmptyElement: React.FC;
@@ -0,0 +1,6 @@
1
+ import * as React from "react";
2
+ interface ExitElementProps {
3
+ isRight: boolean;
4
+ }
5
+ export declare const ExitElement: React.FC<ExitElementProps>;
6
+ export {};
@@ -0,0 +1,12 @@
1
+ import * as React from "react";
2
+ import { SeatMapCabinRowSectionElementAmenity } from "../../../types/SeatMap";
3
+ export interface LegendProps {
4
+ /**
5
+ * The set of additional symbols to display
6
+ */
7
+ symbols: Set<SeatMapCabinRowSectionElementAmenity>;
8
+ }
9
+ /**
10
+ * The legend for the seat map.
11
+ */
12
+ export declare const Legend: React.FC<LegendProps>;
@@ -0,0 +1,13 @@
1
+ import * as React from "react";
2
+ import { CreateOrderPayloadSeatService } from "../../../types/CreateOrderPayload";
3
+ import { SeatMapCabinRow } from "../../../types/SeatMap";
4
+ export interface RowProps {
5
+ row: SeatMapCabinRow;
6
+ hasWings: boolean;
7
+ selectedServicesMap: Record<string, CreateOrderPayloadSeatService>;
8
+ onSeatToggled: (seatService: CreateOrderPayloadSeatService) => void;
9
+ currentPassengerId: string;
10
+ currentPassengerName: string;
11
+ currentSegmentId: string;
12
+ }
13
+ export declare const Row: React.FC<RowProps>;
@@ -0,0 +1,17 @@
1
+ import * as React from "react";
2
+ import { CreateOrderPayloadSeatService } from "../../../types/CreateOrderPayload";
3
+ import { SeatMapCabinRow, SeatMapCabinRowSection } from "../../../types/SeatMap";
4
+ interface RowSectionProps {
5
+ row: SeatMapCabinRow;
6
+ rowNumber: string | null;
7
+ hasWings: boolean;
8
+ section: SeatMapCabinRowSection;
9
+ sectionIndex: number;
10
+ selectedServicesMap: Record<string, CreateOrderPayloadSeatService>;
11
+ onSeatToggled: (seatService: CreateOrderPayloadSeatService) => void;
12
+ currentPassengerId: string;
13
+ currentPassengerName: string;
14
+ currentSegmentId: string;
15
+ }
16
+ export declare const RowSection: React.FC<RowSectionProps>;
17
+ export {};
@@ -0,0 +1,13 @@
1
+ import * as React from "react";
2
+ import { CreateOrderPayloadSeatService } from "../../../types/CreateOrderPayload";
3
+ import { SeatMapCabinRowSectionElementSeat } from "../../../types/SeatMap";
4
+ interface SeatElementProps {
5
+ element: SeatMapCabinRowSectionElementSeat;
6
+ currentSegmentId: string;
7
+ currentPassengerId: string;
8
+ currentPassengerName: string;
9
+ onSeatToggled: (seatService: CreateOrderPayloadSeatService) => void;
10
+ selectedServicesMap: Record<string, CreateOrderPayloadSeatService>;
11
+ }
12
+ export declare const SeatElement: React.FC<SeatElementProps>;
13
+ export {};
@@ -0,0 +1,7 @@
1
+ import * as React from "react";
2
+ import { SeatMapCabinRowSectionAvailableService, SeatMapCabinRowSectionElementSeat } from "../../../types/SeatMap";
3
+ export interface SeatInfoProps {
4
+ seat: SeatMapCabinRowSectionElementSeat | null;
5
+ service: SeatMapCabinRowSectionAvailableService | undefined;
6
+ }
7
+ export declare const SeatInfo: React.FC<SeatInfoProps>;
@@ -0,0 +1,12 @@
1
+ import * as React from "react";
2
+ import { CreateOrderPayloadSeatService } from "../../../types/CreateOrderPayload";
3
+ import { SeatMap as SeatMapType } from "../../../types/SeatMap";
4
+ export interface SeatMapProps {
5
+ seatMap: SeatMapType;
6
+ selectedServicesMap: Record<string, CreateOrderPayloadSeatService>;
7
+ onSeatToggled: (seatService: CreateOrderPayloadSeatService) => void;
8
+ currentPassengerId: string;
9
+ currentPassengerName: string;
10
+ currentSegmentId: string;
11
+ }
12
+ export declare const SeatMap: React.FC<SeatMapProps>;
@@ -0,0 +1,2 @@
1
+ import * as React from "react";
2
+ export declare const SeatMapUnavailable: React.FC;
@@ -0,0 +1,13 @@
1
+ import React from "react";
2
+ import { CreateOrderPayload, CreateOrderPayloadServices } from "../../../types/CreateOrderPayload";
3
+ import { Offer } from "../../../types/Offer";
4
+ import { SeatMap } from "../../../types/SeatMap";
5
+ export interface SeatSelectionCardProps {
6
+ isLoading: boolean;
7
+ offer?: Offer;
8
+ seatMaps?: SeatMap[];
9
+ passengers: CreateOrderPayload["passengers"];
10
+ selectedServices: CreateOrderPayloadServices;
11
+ setSelectedServices: (selectedServices: CreateOrderPayloadServices) => void;
12
+ }
13
+ export declare const SeatSelectionCard: React.FC<SeatSelectionCardProps>;
@@ -0,0 +1,13 @@
1
+ import React from "react";
2
+ import { CreateOrderPayload, CreateOrderPayloadSeatService } from "../../../types/CreateOrderPayload";
3
+ import { Offer } from "../../../types/Offer";
4
+ import { SeatMap } from "../../../types/SeatMap";
5
+ export interface SeatSelectionModalProps {
6
+ isOpen: boolean;
7
+ offer?: Offer;
8
+ seatMaps?: SeatMap[];
9
+ selectedServices: CreateOrderPayloadSeatService[];
10
+ passengers: CreateOrderPayload["passengers"];
11
+ onClose: (selectedServices: CreateOrderPayloadSeatService[]) => void;
12
+ }
13
+ export declare const SeatSelectionModal: React.FC<SeatSelectionModalProps>;
@@ -0,0 +1,4 @@
1
+ import React from "react";
2
+ import { SeatMapProps } from "./SeatMap";
3
+ export type SeatSelectionModalBodyProps = SeatMapProps;
4
+ export declare const SeatSelectionModalBody: React.FC<SeatSelectionModalBodyProps>;
@@ -0,0 +1,16 @@
1
+ import { ServicePriceMapById } from "@lib/getServicePriceMapById";
2
+ import React from "react";
3
+ import { CreateOrderPayloadServices } from "../../../types/CreateOrderPayload";
4
+ import { SeatMap } from "../../../types/SeatMap";
5
+ export interface SeatSelectionModalFooterProps {
6
+ currency: string;
7
+ selectedServices: CreateOrderPayloadServices;
8
+ servicePrices: ServicePriceMapById;
9
+ isFirstSegment: boolean;
10
+ isLastSegment: boolean;
11
+ onNextSegmentButtonClicked: () => void;
12
+ onPreviousSegmentButtonClicked: () => void;
13
+ onClose: () => void;
14
+ seatMaps: SeatMap[];
15
+ }
16
+ export declare const SeatSelectionModalFooter: React.FC<SeatSelectionModalFooterProps>;
@@ -0,0 +1,10 @@
1
+ import React from "react";
2
+ import { OfferSliceSegment } from "../../../types/Offer";
3
+ export interface SeatSelectionModalHeaderProps {
4
+ segmentAndPassengerPermutationsCount: number;
5
+ currentSegment: OfferSliceSegment;
6
+ currentPassengerName: string;
7
+ currentSegmentAndPassengerPermutationsIndex: number;
8
+ setCurrentSegmentAndPassengerPermutationsIndex: (index: number) => void;
9
+ }
10
+ export declare const SeatSelectionModalHeader: React.FC<SeatSelectionModalHeaderProps>;
@@ -0,0 +1,5 @@
1
+ import * as React from "react";
2
+ import { SeatMapCabinRowSectionElementSeat } from "../../../types/SeatMap";
3
+ export declare const SeatUnavailable: React.FC<{
4
+ seat: SeatMapCabinRowSectionElementSeat;
5
+ }>;
@@ -0,0 +1,11 @@
1
+ import { StripeError } from "@stripe/stripe-js";
2
+ import * as React from "react";
3
+ import { CustomStyles } from "../../types";
4
+ export interface DuffelPaymentsProps {
5
+ paymentIntentClientToken: string;
6
+ onSuccessfulPayment: () => void;
7
+ onFailedPayment: (error: StripeError) => void;
8
+ styles?: CustomStyles;
9
+ debug?: boolean;
10
+ }
11
+ export declare const DuffelPayments: React.FC<DuffelPaymentsProps>;
@@ -0,0 +1,13 @@
1
+ import { DuffelPaymentsProps } from "./DuffelPayments";
2
+ declare global {
3
+ namespace JSX {
4
+ interface IntrinsicElements {
5
+ "duffel-payments": React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>;
6
+ }
7
+ }
8
+ }
9
+ type DuffelPaymentsCustomElementRenderArguments = Pick<DuffelPaymentsProps, "paymentIntentClientToken" | "styles">;
10
+ export declare function renderDuffelPaymentsCustomElement(props: DuffelPaymentsCustomElementRenderArguments): void;
11
+ export declare function onDuffelPaymentsSuccessfulPayment(onSuccessfulPayment: DuffelPaymentsProps["onSuccessfulPayment"]): void;
12
+ export declare function onDuffelPaymentsFailedPayment(onFailedPayment: DuffelPaymentsProps["onFailedPayment"]): void;
13
+ export {};
@@ -0,0 +1,20 @@
1
+ import React from "react";
2
+ interface City {
3
+ type: "city";
4
+ name: string;
5
+ iata_code: string;
6
+ }
7
+ interface Airport {
8
+ type: "airport";
9
+ name: string;
10
+ iata_code: string;
11
+ latitude: string;
12
+ longitude: string;
13
+ }
14
+ type Place = City | Airport;
15
+ export interface PlacesLookupProps {
16
+ onPlaceSelected: (selection: Place) => void;
17
+ placeholder?: string;
18
+ }
19
+ export declare const PlacesLookup: React.FC<PlacesLookupProps>;
20
+ export {};
@@ -0,0 +1,2 @@
1
+ import * as React from "react";
2
+ export declare const AnimatedLoaderEllipsis: React.FC;
@@ -0,0 +1,23 @@
1
+ import { IconName } from "@components/shared/Icon";
2
+ import * as React from "react";
3
+ declare const BUTTON_VARIANTS: {
4
+ primary: string;
5
+ outlined: string;
6
+ destructive: string;
7
+ };
8
+ type ButtonVariants = keyof typeof BUTTON_VARIANTS;
9
+ declare const BUTTON_SIZES: {
10
+ 32: string;
11
+ 40: string;
12
+ 48: string;
13
+ };
14
+ type ButtonSizes = keyof typeof BUTTON_SIZES;
15
+ type NativeButtonProps = React.DetailedHTMLProps<React.ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>;
16
+ export interface ButtonProps extends Pick<NativeButtonProps, "id" | "onClick" | "disabled" | "children" | "className" | "type"> {
17
+ "data-testid"?: string;
18
+ iconBefore?: IconName;
19
+ variant?: ButtonVariants;
20
+ size?: ButtonSizes;
21
+ }
22
+ export declare const Button: React.FC<ButtonProps>;
23
+ export {};
@@ -0,0 +1,13 @@
1
+ import React from "react";
2
+ export declare class ErrorBoundary extends React.Component<{
3
+ children: React.ReactNode | React.ReactNode[];
4
+ }> {
5
+ state: {
6
+ hasError: boolean;
7
+ };
8
+ static getDerivedStateFromError(): {
9
+ hasError: boolean;
10
+ };
11
+ componentDidCatch(error: Error): void;
12
+ render(): string | number | boolean | Iterable<React.ReactNode> | import("react/jsx-runtime").JSX.Element | null | undefined;
13
+ }
@@ -0,0 +1,5 @@
1
+ import * as React from "react";
2
+ export declare const FetchOfferErrorState: React.FC<{
3
+ height: string;
4
+ message: string;
5
+ }>;
@@ -0,0 +1,46 @@
1
+ import * as React from "react";
2
+ export declare const ICON_MAP: {
3
+ add: import("react/jsx-runtime").JSX.Element;
4
+ apartment: import("react/jsx-runtime").JSX.Element;
5
+ arrow_forward: import("react/jsx-runtime").JSX.Element;
6
+ arrow_left: import("react/jsx-runtime").JSX.Element;
7
+ arrow_right: import("react/jsx-runtime").JSX.Element;
8
+ autorenew: import("react/jsx-runtime").JSX.Element;
9
+ bassinet: import("react/jsx-runtime").JSX.Element;
10
+ cabin_bag: import("react/jsx-runtime").JSX.Element;
11
+ check: import("react/jsx-runtime").JSX.Element;
12
+ checked_bag: import("react/jsx-runtime").JSX.Element;
13
+ chevron: import("react/jsx-runtime").JSX.Element;
14
+ close: import("react/jsx-runtime").JSX.Element;
15
+ closet: import("react/jsx-runtime").JSX.Element;
16
+ exit_row: import("react/jsx-runtime").JSX.Element;
17
+ exit_row_right: import("react/jsx-runtime").JSX.Element;
18
+ expand_content: import("react/jsx-runtime").JSX.Element;
19
+ flight_class: import("react/jsx-runtime").JSX.Element;
20
+ flight_takeoff: import("react/jsx-runtime").JSX.Element;
21
+ galley: import("react/jsx-runtime").JSX.Element;
22
+ lavatory: import("react/jsx-runtime").JSX.Element;
23
+ lie_flat_seat: import("react/jsx-runtime").JSX.Element;
24
+ minus: import("react/jsx-runtime").JSX.Element;
25
+ no_airplane: import("react/jsx-runtime").JSX.Element;
26
+ no_bag: import("react/jsx-runtime").JSX.Element;
27
+ no_seat: import("react/jsx-runtime").JSX.Element;
28
+ north_east: import("react/jsx-runtime").JSX.Element;
29
+ seat: import("react/jsx-runtime").JSX.Element;
30
+ seat_paid_indicator: import("react/jsx-runtime").JSX.Element;
31
+ shield_with_moon: import("react/jsx-runtime").JSX.Element;
32
+ stairs: import("react/jsx-runtime").JSX.Element;
33
+ wifi: import("react/jsx-runtime").JSX.Element;
34
+ };
35
+ export type IconName = keyof typeof ICON_MAP;
36
+ interface IconProps {
37
+ name: IconName;
38
+ className?: string;
39
+ size?: number;
40
+ onClick?: (event: React.MouseEvent<SVGSVGElement, MouseEvent>) => void;
41
+ ml?: string;
42
+ viewBox?: string;
43
+ style?: React.CSSProperties;
44
+ }
45
+ export declare const Icon: React.FunctionComponent<IconProps>;
46
+ export {};
@@ -0,0 +1,16 @@
1
+ import * as React from "react";
2
+ import { IconName } from "./Icon";
3
+ declare const ICON_BUTTON_VARIANTS: {
4
+ primary: string;
5
+ outlined: string;
6
+ };
7
+ type IconButtonVariants = keyof typeof ICON_BUTTON_VARIANTS;
8
+ type NativeButtonProps = React.DetailedHTMLProps<React.ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>;
9
+ export interface IconButtonProps extends Pick<NativeButtonProps, "id" | "onClick" | "disabled" | "className"> {
10
+ "data-testid"?: string;
11
+ icon: IconName;
12
+ title: string;
13
+ variant?: IconButtonVariants;
14
+ }
15
+ export declare const IconButton: React.FC<IconButtonProps>;
16
+ export {};
@@ -0,0 +1,11 @@
1
+ import * as React from "react";
2
+ interface ModalProps {
3
+ onClose: () => void;
4
+ isOpen: boolean;
5
+ children: React.ReactNode;
6
+ }
7
+ export declare const Modal: React.FC<ModalProps>;
8
+ export declare const ModalBody: React.FC<{
9
+ children: React.ReactNode;
10
+ }>;
11
+ export {};
@@ -0,0 +1,4 @@
1
+ import React from "react";
2
+ export declare const NonIdealState: React.FC<React.PropsWithChildren<{
3
+ style?: React.CSSProperties;
4
+ }>>;
@@ -0,0 +1,7 @@
1
+ import React from "react";
2
+ export interface StampProps {
3
+ backgroundColor: React.CSSProperties["backgroundColor"];
4
+ color: React.CSSProperties["color"];
5
+ children: React.ReactNode;
6
+ }
7
+ export declare const Stamp: React.FC<StampProps>;
@@ -0,0 +1,16 @@
1
+ import React from "react";
2
+ export interface TabsProps {
3
+ /**
4
+ * The currently selected tab option
5
+ */
6
+ value: string;
7
+ /**
8
+ * Callback for when a new tab option is selected
9
+ */
10
+ onChange: (value: string) => void;
11
+ /**
12
+ * The options you want to render on the tabs
13
+ */
14
+ options: string[];
15
+ }
16
+ export declare const Tabs: React.FC<TabsProps>;