@duffel/components 3.1.3--prototype.8 → 3.1.3--prototype.11
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/README.md +68 -0
- package/package.json +7 -7
- package/{custom-elements.js → react-dist/custom-elements.js} +2 -2
- package/{custom-elements.js.map → react-dist/custom-elements.js.map} +1 -1
- package/react-dist/index.d.ts +2156 -0
- package/{index.js → react-dist/index.js} +2 -2
- package/{index.js.map → react-dist/index.js.map} +1 -1
- package/react-dist/index.tsbuildinfo +1 -0
- package/components/DuffelAncillaries/Card.d.ts +0 -14
- package/components/DuffelAncillaries/Counter.d.ts +0 -10
- package/components/DuffelAncillaries/DuffelAncillaries.d.ts +0 -3
- package/components/DuffelAncillaries/DuffelAncillariesCustomElement.d.ts +0 -12
- package/components/DuffelAncillaries/bags/BaggageSelectionCard.d.ts +0 -11
- package/components/DuffelAncillaries/bags/BaggageSelectionController.d.ts +0 -13
- package/components/DuffelAncillaries/bags/BaggageSelectionModal.d.ts +0 -11
- package/components/DuffelAncillaries/bags/BaggageSelectionModalBody.d.ts +0 -11
- package/components/DuffelAncillaries/bags/BaggageSelectionModalBodyPassenger.d.ts +0 -13
- package/components/DuffelAncillaries/bags/BaggageSelectionModalFooter.d.ts +0 -14
- package/components/DuffelAncillaries/bags/BaggageSelectionModalHeader.d.ts +0 -9
- package/components/DuffelAncillaries/bags/IncludedBaggageBanner.d.ts +0 -7
- package/components/DuffelAncillaries/cancel_for_any_reason/CfarSelectionCard.d.ts +0 -10
- package/components/DuffelAncillaries/cancel_for_any_reason/CfarSelectionModal.d.ts +0 -11
- package/components/DuffelAncillaries/cancel_for_any_reason/CfarSelectionModalBody.d.ts +0 -7
- package/components/DuffelAncillaries/cancel_for_any_reason/CfarSelectionModalBodyListItem.d.ts +0 -4
- package/components/DuffelAncillaries/cancel_for_any_reason/CfarSelectionModalFooter.d.ts +0 -11
- package/components/DuffelAncillaries/cancel_for_any_reason/CfarSelectionModalHeader.d.ts +0 -2
- package/components/DuffelAncillaries/seats/Amenity.d.ts +0 -6
- package/components/DuffelAncillaries/seats/DeckSelect.d.ts +0 -15
- package/components/DuffelAncillaries/seats/Element.d.ts +0 -15
- package/components/DuffelAncillaries/seats/EmptyElement.d.ts +0 -2
- package/components/DuffelAncillaries/seats/ExitElement.d.ts +0 -6
- package/components/DuffelAncillaries/seats/Legend.d.ts +0 -12
- package/components/DuffelAncillaries/seats/Row.d.ts +0 -13
- package/components/DuffelAncillaries/seats/RowSection.d.ts +0 -17
- package/components/DuffelAncillaries/seats/SeatElement.d.ts +0 -13
- package/components/DuffelAncillaries/seats/SeatInfo.d.ts +0 -7
- package/components/DuffelAncillaries/seats/SeatMap.d.ts +0 -12
- package/components/DuffelAncillaries/seats/SeatMapUnavailable.d.ts +0 -2
- package/components/DuffelAncillaries/seats/SeatSelectionCard.d.ts +0 -13
- package/components/DuffelAncillaries/seats/SeatSelectionModal.d.ts +0 -13
- package/components/DuffelAncillaries/seats/SeatSelectionModalBody.d.ts +0 -4
- package/components/DuffelAncillaries/seats/SeatSelectionModalFooter.d.ts +0 -16
- package/components/DuffelAncillaries/seats/SeatSelectionModalHeader.d.ts +0 -10
- package/components/DuffelAncillaries/seats/SeatUnavailable.d.ts +0 -5
- package/components/DuffelPayments/DuffelPayments.d.ts +0 -11
- package/components/DuffelPayments/DuffelPaymentsCustomElement.d.ts +0 -13
- package/components/PlacesLookup/PlacesLookup.d.ts +0 -20
- package/components/shared/AnimatedLoaderEllipsis.d.ts +0 -2
- package/components/shared/Button.d.ts +0 -23
- package/components/shared/ErrorBoundary.d.ts +0 -13
- package/components/shared/FetchOfferErrorState.d.ts +0 -5
- package/components/shared/Icon.d.ts +0 -46
- package/components/shared/IconButton.d.ts +0 -16
- package/components/shared/Modal.d.ts +0 -11
- package/components/shared/NonIdealState.d.ts +0 -4
- package/components/shared/Stamp.d.ts +0 -7
- package/components/shared/Tabs.d.ts +0 -16
- package/custom-elements.d.ts +0 -6
- package/index.d.ts +0 -7
- package/lib/captureErrorInSentry.d.ts +0 -1
- package/lib/compileCreateOrderPayload.d.ts +0 -14
- package/lib/createPriceFormatters.d.ts +0 -12
- package/lib/fetchFromDuffelAPI.d.ts +0 -8
- package/lib/fetchFromFixtures.d.ts +0 -4
- package/lib/formatAvailableServices.d.ts +0 -12
- package/lib/formatDate.d.ts +0 -2
- package/lib/formatSeatMaps.d.ts +0 -4
- package/lib/getBaggageServiceDescription.d.ts +0 -2
- package/lib/getCabinsForSegmentAndDeck.d.ts +0 -2
- package/lib/getCurrencyForSeatMaps.d.ts +0 -10
- package/lib/getCurrencyForServices.d.ts +0 -11
- package/lib/getFirstSeatElementMatchingCriteria.d.ts +0 -3
- package/lib/getPassengerBySegmentList.d.ts +0 -6
- package/lib/getPassengerInitials.d.ts +0 -1
- package/lib/getPassengerMapById.d.ts +0 -3
- package/lib/getPassengerName.d.ts +0 -3
- package/lib/getRowNumber.d.ts +0 -2
- package/lib/getSegmentList.d.ts +0 -2
- package/lib/getServicePriceMapById.d.ts +0 -3
- package/lib/getSymbols.d.ts +0 -2
- package/lib/getTotalAmountForServices.d.ts +0 -6
- package/lib/getTotalQuantity.d.ts +0 -2
- package/lib/hasHighLuminance.d.ts +0 -1
- package/lib/hasService.d.ts +0 -2
- package/lib/hasServiceOfSameMetadataTypeAlreadyBeenSelected.d.ts +0 -3
- package/lib/hasWings.d.ts +0 -2
- package/lib/isBaggageService.d.ts +0 -2
- package/lib/isCancelForAnyReasonService.d.ts +0 -2
- package/lib/isFixtureOfferId.d.ts +0 -2
- package/lib/isPayloadComplete.d.ts +0 -2
- package/lib/isSeatElement.d.ts +0 -2
- package/lib/logging.d.ts +0 -46
- package/lib/moneyStringFormatter.d.ts +0 -8
- package/lib/offerIsExpired.d.ts +0 -2
- package/lib/retrieveOffer.d.ts +0 -2
- package/lib/retrieveOfferFromDuffelAPI.d.ts +0 -1
- package/lib/retrieveSeatMaps.d.ts +0 -2
- package/lib/retrieveSeatMapsFromDuffelAPI.d.ts +0 -1
- package/lib/setBodyScrollability.d.ts +0 -1
- package/lib/validateProps.d.ts +0 -7
- package/lib/withPlural.d.ts +0 -1
- package/scripts/generate-fixture.d.ts +0 -3
- package/scripts/setup-suggestion-data.d.ts +0 -28
- package/tsconfig.tsbuildinfo +0 -1
- package/types/Aircraft.d.ts +0 -14
- package/types/Airline.d.ts +0 -14
- package/types/Airport.d.ts +0 -44
- package/types/City.d.ts +0 -18
- package/types/CreateOrderPayload.d.ts +0 -72
- package/types/CurrencyConversion.d.ts +0 -10
- package/types/DuffelAncillariesProps.d.ts +0 -70
- package/types/Offer.d.ts +0 -711
- package/types/Order.d.ts +0 -8
- package/types/Place.d.ts +0 -8
- package/types/SeatMap.d.ts +0 -190
- package/types/index.d.ts +0 -11
|
@@ -1,70 +0,0 @@
|
|
|
1
|
-
import { CreateOrderPayload, CreateOrderPayloadServices } from "./CreateOrderPayload";
|
|
2
|
-
import { Offer, OfferAvailableServiceBaggage, OfferAvailableServiceCancelForAnyReason } from "./Offer";
|
|
3
|
-
import { SeatMap, SeatMapCabinRowSectionAvailableService } from "./SeatMap";
|
|
4
|
-
export type DuffelAncillariesProps = DuffelAncillariesPropsWithOfferIdForFixture | DuffelAncillariesPropsWithClientKeyAndOfferId | DuffelAncillariesPropWithOfferAndClientKey | DuffelAncillariesPropsWithOffersAndSeatMaps;
|
|
5
|
-
export interface DuffelAncillariesCommonProps {
|
|
6
|
-
styles?: CustomStyles;
|
|
7
|
-
onPayloadReady: OnPayloadReady;
|
|
8
|
-
passengers: CreateOrderPayload["passengers"];
|
|
9
|
-
services: Ancillaries[];
|
|
10
|
-
markup?: DuffelAncillariesMarkup;
|
|
11
|
-
priceFormatters?: DuffelAncillariesPriceFormatters;
|
|
12
|
-
debug?: boolean;
|
|
13
|
-
}
|
|
14
|
-
export interface DuffelAncillariesPropsWithOfferIdForFixture extends DuffelAncillariesCommonProps {
|
|
15
|
-
offer_id: `fixture_${string}`;
|
|
16
|
-
}
|
|
17
|
-
export interface DuffelAncillariesPropsWithClientKeyAndOfferId extends DuffelAncillariesCommonProps {
|
|
18
|
-
offer_id: string;
|
|
19
|
-
client_key: string;
|
|
20
|
-
}
|
|
21
|
-
export interface DuffelAncillariesPropWithOfferAndClientKey extends DuffelAncillariesCommonProps {
|
|
22
|
-
offer: Offer;
|
|
23
|
-
client_key: string;
|
|
24
|
-
}
|
|
25
|
-
export interface DuffelAncillariesPropsWithOffersAndSeatMaps extends DuffelAncillariesCommonProps {
|
|
26
|
-
offer: Offer;
|
|
27
|
-
seat_maps: SeatMap[];
|
|
28
|
-
}
|
|
29
|
-
export type DuffelAncillariesMarkupDefinition = {
|
|
30
|
-
rate: number;
|
|
31
|
-
amount: number;
|
|
32
|
-
};
|
|
33
|
-
export interface DuffelAncillariesMarkup {
|
|
34
|
-
bags?: DuffelAncillariesMarkupDefinition;
|
|
35
|
-
seats?: DuffelAncillariesMarkupDefinition;
|
|
36
|
-
cancel_for_any_reason?: DuffelAncillariesMarkupDefinition;
|
|
37
|
-
}
|
|
38
|
-
export type DuffelAncillariesPriceFormatterForBags = (amount: number, currency: string, service: OfferAvailableServiceBaggage) => {
|
|
39
|
-
amount: number;
|
|
40
|
-
currency?: string;
|
|
41
|
-
};
|
|
42
|
-
export type DuffelAncillariesPriceFormatterForSeats = (amount: number, currency: string, service: SeatMapCabinRowSectionAvailableService) => {
|
|
43
|
-
amount: number;
|
|
44
|
-
currency?: string;
|
|
45
|
-
};
|
|
46
|
-
export type DuffelAncillariesPriceFormatterForCancelForAnyReason = (amount: number, currency: string, service: OfferAvailableServiceCancelForAnyReason) => {
|
|
47
|
-
amount: number;
|
|
48
|
-
currency?: string;
|
|
49
|
-
};
|
|
50
|
-
export interface DuffelAncillariesPriceFormatters {
|
|
51
|
-
bags?: DuffelAncillariesPriceFormatterForBags;
|
|
52
|
-
seats?: DuffelAncillariesPriceFormatterForSeats;
|
|
53
|
-
cancel_for_any_reason?: DuffelAncillariesPriceFormatterForCancelForAnyReason;
|
|
54
|
-
}
|
|
55
|
-
export interface CustomStyles {
|
|
56
|
-
accentColor?: string;
|
|
57
|
-
buttonCornerRadius?: string;
|
|
58
|
-
fontFamily?: string;
|
|
59
|
-
}
|
|
60
|
-
export type OnPayloadReady = (data: CreateOrderPayload, metadata: OnPayloadReadyMetadata) => void;
|
|
61
|
-
export interface OnPayloadReadyMetadata {
|
|
62
|
-
offer_total_amount: Offer["total_amount"];
|
|
63
|
-
offer_total_currency: Offer["total_currency"];
|
|
64
|
-
offer_tax_amount: Offer["tax_amount"];
|
|
65
|
-
offer_tax_currency: Offer["tax_currency"];
|
|
66
|
-
baggage_services: CreateOrderPayloadServices;
|
|
67
|
-
seat_services: CreateOrderPayloadServices;
|
|
68
|
-
cancel_for_any_reason_services: CreateOrderPayloadServices;
|
|
69
|
-
}
|
|
70
|
-
export type Ancillaries = "bags" | "seats" | "cancel_for_any_reason";
|