@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.
- package/components/DuffelAncillaries/Card.d.ts +14 -0
- package/components/DuffelAncillaries/Counter.d.ts +10 -0
- package/components/DuffelAncillaries/DuffelAncillaries.d.ts +3 -0
- package/components/DuffelAncillaries/DuffelAncillariesCustomElement.d.ts +12 -0
- package/components/DuffelAncillaries/bags/BaggageSelectionCard.d.ts +11 -0
- package/components/DuffelAncillaries/bags/BaggageSelectionController.d.ts +13 -0
- package/components/DuffelAncillaries/bags/BaggageSelectionModal.d.ts +11 -0
- package/components/DuffelAncillaries/bags/BaggageSelectionModalBody.d.ts +11 -0
- package/components/DuffelAncillaries/bags/BaggageSelectionModalBodyPassenger.d.ts +13 -0
- package/components/DuffelAncillaries/bags/BaggageSelectionModalFooter.d.ts +14 -0
- package/components/DuffelAncillaries/bags/BaggageSelectionModalHeader.d.ts +9 -0
- package/components/DuffelAncillaries/bags/IncludedBaggageBanner.d.ts +7 -0
- package/components/DuffelAncillaries/cancel_for_any_reason/CfarSelectionCard.d.ts +10 -0
- package/components/DuffelAncillaries/cancel_for_any_reason/CfarSelectionModal.d.ts +11 -0
- package/components/DuffelAncillaries/cancel_for_any_reason/CfarSelectionModalBody.d.ts +7 -0
- package/components/DuffelAncillaries/cancel_for_any_reason/CfarSelectionModalBodyListItem.d.ts +4 -0
- package/components/DuffelAncillaries/cancel_for_any_reason/CfarSelectionModalFooter.d.ts +11 -0
- package/components/DuffelAncillaries/cancel_for_any_reason/CfarSelectionModalHeader.d.ts +2 -0
- package/components/DuffelAncillaries/seats/Amenity.d.ts +6 -0
- package/components/DuffelAncillaries/seats/DeckSelect.d.ts +15 -0
- package/components/DuffelAncillaries/seats/Element.d.ts +15 -0
- package/components/DuffelAncillaries/seats/EmptyElement.d.ts +2 -0
- package/components/DuffelAncillaries/seats/ExitElement.d.ts +6 -0
- package/components/DuffelAncillaries/seats/Legend.d.ts +12 -0
- package/components/DuffelAncillaries/seats/Row.d.ts +13 -0
- package/components/DuffelAncillaries/seats/RowSection.d.ts +17 -0
- package/components/DuffelAncillaries/seats/SeatElement.d.ts +13 -0
- package/components/DuffelAncillaries/seats/SeatInfo.d.ts +7 -0
- package/components/DuffelAncillaries/seats/SeatMap.d.ts +12 -0
- package/components/DuffelAncillaries/seats/SeatMapUnavailable.d.ts +2 -0
- package/components/DuffelAncillaries/seats/SeatSelectionCard.d.ts +13 -0
- package/components/DuffelAncillaries/seats/SeatSelectionModal.d.ts +13 -0
- package/components/DuffelAncillaries/seats/SeatSelectionModalBody.d.ts +4 -0
- package/components/DuffelAncillaries/seats/SeatSelectionModalFooter.d.ts +16 -0
- package/components/DuffelAncillaries/seats/SeatSelectionModalHeader.d.ts +10 -0
- package/components/DuffelAncillaries/seats/SeatUnavailable.d.ts +5 -0
- package/components/DuffelPayments/DuffelPayments.d.ts +11 -0
- package/components/DuffelPayments/DuffelPaymentsCustomElement.d.ts +13 -0
- package/components/PlacesLookup/PlacesLookup.d.ts +20 -0
- package/components/shared/AnimatedLoaderEllipsis.d.ts +2 -0
- package/components/shared/Button.d.ts +23 -0
- package/components/shared/ErrorBoundary.d.ts +13 -0
- package/components/shared/FetchOfferErrorState.d.ts +5 -0
- package/components/shared/Icon.d.ts +46 -0
- package/components/shared/IconButton.d.ts +16 -0
- package/components/shared/Modal.d.ts +11 -0
- package/components/shared/NonIdealState.d.ts +4 -0
- package/components/shared/Stamp.d.ts +7 -0
- package/components/shared/Tabs.d.ts +16 -0
- package/custom-elements.d.ts +6 -0
- package/index.d.ts +7 -0
- package/lib/captureErrorInSentry.d.ts +1 -0
- package/lib/compileCreateOrderPayload.d.ts +14 -0
- package/lib/createPriceFormatters.d.ts +12 -0
- package/lib/fetchFromDuffelAPI.d.ts +8 -0
- package/lib/fetchFromFixtures.d.ts +4 -0
- package/lib/formatAvailableServices.d.ts +12 -0
- package/lib/formatDate.d.ts +2 -0
- package/lib/formatSeatMaps.d.ts +4 -0
- package/lib/getBaggageServiceDescription.d.ts +2 -0
- package/lib/getCabinsForSegmentAndDeck.d.ts +2 -0
- package/lib/getCurrencyForSeatMaps.d.ts +10 -0
- package/lib/getCurrencyForServices.d.ts +11 -0
- package/lib/getFirstSeatElementMatchingCriteria.d.ts +3 -0
- package/lib/getPassengerBySegmentList.d.ts +6 -0
- package/lib/getPassengerInitials.d.ts +1 -0
- package/lib/getPassengerMapById.d.ts +3 -0
- package/lib/getPassengerName.d.ts +3 -0
- package/lib/getRowNumber.d.ts +2 -0
- package/lib/getSegmentList.d.ts +2 -0
- package/lib/getServicePriceMapById.d.ts +3 -0
- package/lib/getSymbols.d.ts +2 -0
- package/lib/getTotalAmountForServices.d.ts +6 -0
- package/lib/getTotalQuantity.d.ts +2 -0
- package/lib/hasHighLuminance.d.ts +1 -0
- package/lib/hasService.d.ts +2 -0
- package/lib/hasServiceOfSameMetadataTypeAlreadyBeenSelected.d.ts +3 -0
- package/lib/hasWings.d.ts +2 -0
- package/lib/isBaggageService.d.ts +2 -0
- package/lib/isCancelForAnyReasonService.d.ts +2 -0
- package/lib/isFixtureOfferId.d.ts +2 -0
- package/lib/isPayloadComplete.d.ts +2 -0
- package/lib/isSeatElement.d.ts +2 -0
- package/lib/logging.d.ts +46 -0
- package/lib/moneyStringFormatter.d.ts +8 -0
- package/lib/offerIsExpired.d.ts +2 -0
- package/lib/retrieveOffer.d.ts +2 -0
- package/lib/retrieveOfferFromDuffelAPI.d.ts +1 -0
- package/lib/retrieveSeatMaps.d.ts +2 -0
- package/lib/retrieveSeatMapsFromDuffelAPI.d.ts +1 -0
- package/lib/setBodyScrollability.d.ts +1 -0
- package/lib/validateProps.d.ts +7 -0
- package/lib/withPlural.d.ts +1 -0
- package/package.json +4 -4
- package/tsconfig.tsbuildinfo +1 -0
- package/types/Aircraft.d.ts +14 -0
- package/types/Airline.d.ts +14 -0
- package/types/Airport.d.ts +44 -0
- package/types/City.d.ts +18 -0
- package/types/CreateOrderPayload.d.ts +72 -0
- package/types/CurrencyConversion.d.ts +10 -0
- package/types/DuffelAncillariesProps.d.ts +70 -0
- package/types/Offer.d.ts +711 -0
- package/types/Order.d.ts +8 -0
- package/types/Place.d.ts +8 -0
- package/types/SeatMap.d.ts +190 -0
- package/types/index.d.ts +11 -0
- package/README.md +0 -68
- package/react-dist/index.d.ts +0 -2121
- /package/{react-dist/custom-elements.js → custom-elements.js} +0 -0
- /package/{react-dist/custom-elements.js.map → custom-elements.js.map} +0 -0
- /package/{react-dist/index.js → index.js} +0 -0
- /package/{react-dist/index.js.map → index.js.map} +0 -0
- /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,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,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,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,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,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,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,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,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,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,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>;
|