@duffel/components 3.6.11--canary-2 → 3.6.11--canary-4
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/package.json +1 -1
- 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 -12
- package/components/DuffelAncillaries/bags/BaggageSelectionController.d.ts +0 -14
- package/components/DuffelAncillaries/bags/BaggageSelectionModal.d.ts +0 -12
- package/components/DuffelAncillaries/bags/BaggageSelectionModalBody.d.ts +0 -12
- package/components/DuffelAncillaries/bags/BaggageSelectionModalBodyPassenger.d.ts +0 -14
- package/components/DuffelAncillaries/bags/BaggageSelectionModalFooter.d.ts +0 -15
- package/components/DuffelAncillaries/bags/BaggageSelectionModalHeader.d.ts +0 -10
- package/components/DuffelAncillaries/bags/IncludedBaggageBanner.d.ts +0 -8
- package/components/DuffelAncillaries/cancel_for_any_reason/CfarSelectionCard.d.ts +0 -11
- package/components/DuffelAncillaries/cancel_for_any_reason/CfarSelectionModal.d.ts +0 -12
- package/components/DuffelAncillaries/cancel_for_any_reason/CfarSelectionModalBody.d.ts +0 -8
- package/components/DuffelAncillaries/cancel_for_any_reason/CfarSelectionModalBodyListItem.d.ts +0 -4
- package/components/DuffelAncillaries/cancel_for_any_reason/CfarSelectionModalFooter.d.ts +0 -12
- package/components/DuffelAncillaries/cancel_for_any_reason/CfarSelectionModalHeader.d.ts +0 -2
- package/components/DuffelAncillaries/seats/Amenity.d.ts +0 -7
- package/components/DuffelAncillaries/seats/DeckSelect.d.ts +0 -15
- package/components/DuffelAncillaries/seats/Element.d.ts +0 -16
- 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 -13
- package/components/DuffelAncillaries/seats/Row.d.ts +0 -14
- package/components/DuffelAncillaries/seats/RowSection.d.ts +0 -18
- package/components/DuffelAncillaries/seats/SeatElement.d.ts +0 -14
- package/components/DuffelAncillaries/seats/SeatInfo.d.ts +0 -8
- package/components/DuffelAncillaries/seats/SeatMap.d.ts +0 -13
- 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 -15
- 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 -11
- package/components/DuffelAncillaries/seats/SeatUnavailable.d.ts +0 -6
- package/components/DuffelCardForm/DuffelCardForm.d.ts +0 -4
- package/components/DuffelCardForm/DuffelCardFormCustomElement.d.ts +0 -32
- package/components/DuffelCardForm/lib/getIFrameEventListener.d.ts +0 -7
- package/components/DuffelCardForm/lib/getIFrameOriginForEnvironment.d.ts +0 -2
- package/components/DuffelCardForm/lib/getIframeURL.d.ts +0 -2
- package/components/DuffelCardForm/lib/getPathnameForIntent.d.ts +0 -2
- package/components/DuffelCardForm/lib/getTokenFromClientKey.d.ts +0 -1
- package/components/DuffelCardForm/lib/postMessageToCreateCardForTemporaryUse.d.ts +0 -1
- package/components/DuffelCardForm/lib/postMessageToSaveCard.d.ts +0 -1
- package/components/DuffelCardForm/lib/postMessageWithStyles.d.ts +0 -2
- package/components/DuffelCardForm/lib/types.d.ts +0 -126
- package/components/DuffelCardForm/lib/useDuffelCardFormActions.d.ts +0 -24
- package/components/DuffelNGSView/DuffelNGSView.d.ts +0 -8
- package/components/DuffelNGSView/NGSShelfInfoCard.d.ts +0 -7
- package/components/DuffelNGSView/NGSSliceFareCard.d.ts +0 -10
- package/components/DuffelNGSView/NGSTable.d.ts +0 -10
- package/components/DuffelNGSView/SliceSummary.d.ts +0 -7
- package/components/DuffelNGSView/lib/deduplicate-mapped-offers-by-fare-brand.d.ts +0 -7
- package/components/DuffelNGSView/lib/get-max-baggages-for-offer-slice.d.ts +0 -8
- package/components/DuffelNGSView/lib/group-offers-for-ngs-view.d.ts +0 -6
- package/components/DuffelNGSView/lib/index.d.ts +0 -14
- package/components/DuffelNGSView/lib/sort-ngs-rows.d.ts +0 -6
- package/components/DuffelPayments/DuffelPayments.d.ts +0 -11
- package/components/DuffelPayments/DuffelPaymentsCustomElement.d.ts +0 -13
- package/components/MapboxPlacesLookup/MapboxPlacesLookup.d.ts +0 -12
- package/components/MapboxPlacesLookup/MapboxPlacesLookupCustomElement.d.ts +0 -13
- package/components/MapboxPlacesLookup/lib/getPlacesFromMapboxClient.d.ts +0 -7
- package/components/OfferSlice/OfferSlice.d.ts +0 -7
- package/components/OfferSlice/OfferSliceConditions.d.ts +0 -7
- package/components/OfferSlice/OfferSliceDetailItem.d.ts +0 -7
- package/components/OfferSlice/OfferSliceDetailLayoverItem.d.ts +0 -8
- package/components/OfferSlice/OfferSliceDetailTravelItem.d.ts +0 -9
- package/components/OfferSlice/lib/getHighlightStyles.d.ts +0 -7
- package/components/OfferSliceModal/OfferSliceModal.d.ts +0 -7
- package/components/PlacesLookup/PlacesLookup.d.ts +0 -20
- package/components/Stays/StaysAmenities.d.ts +0 -9
- package/components/Stays/StaysAmenitiesCustomElement.d.ts +0 -12
- package/components/Stays/StaysRating.d.ts +0 -6
- package/components/Stays/StaysRatingCustomElement.d.ts +0 -14
- package/components/Stays/StaysRoomRateCard.d.ts +0 -11
- package/components/Stays/StaysRoomRateCardCustomElement.d.ts +0 -14
- package/components/Stays/StaysSummary.d.ts +0 -12
- package/components/Stays/StaysSummaryCustomElement.d.ts +0 -12
- package/components/Stays/lib/types.d.ts +0 -29
- package/components/shared/AirlineLogo.d.ts +0 -8
- 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/HSpace.d.ts +0 -28
- package/components/shared/Icon.d.ts +0 -96
- package/components/shared/IconButton.d.ts +0 -16
- package/components/shared/Modal.d.ts +0 -14
- package/components/shared/NonIdealState.d.ts +0 -4
- package/components/shared/RadioButton.d.ts +0 -7
- package/components/shared/SliceCarriersTitle.d.ts +0 -7
- package/components/shared/Stamp.d.ts +0 -7
- package/components/shared/Tabs.d.ts +0 -16
- package/components/shared/VSpace.d.ts +0 -14
- package/components/shared/WithComponentStyles.d.ts +0 -7
- package/custom-elements.d.ts +0 -12
- package/custom-elements.js +0 -69
- package/custom-elements.js.map +0 -7
- package/fixtures/passengers/mock_passengers.d.ts +0 -4
- package/index.d.ts +0 -15
- package/index.js +0 -40
- package/index.js.map +0 -7
- package/lib/captureErrorInSentry.d.ts +0 -1
- package/lib/colors.d.ts +0 -28
- package/lib/compileCreateOrderPayload.d.ts +0 -13
- package/lib/convertDurationToString.d.ts +0 -1
- package/lib/createPriceFormatters.d.ts +0 -12
- package/lib/fetchFromDuffelAPI.d.ts +0 -8
- package/lib/fetchFromFixtures.d.ts +0 -3
- package/lib/formatAvailableServices.d.ts +0 -12
- package/lib/formatDate.d.ts +0 -2
- package/lib/formatSeatMaps.d.ts +0 -4
- package/lib/getAirlinesText.d.ts +0 -2
- package/lib/getBaggageServiceDescription.d.ts +0 -2
- package/lib/getCabinsForSegmentAndDeck.d.ts +0 -3
- package/lib/getCarriers.d.ts +0 -6
- package/lib/getCurrencyForSeatMaps.d.ts +0 -10
- package/lib/getCurrencyForServices.d.ts +0 -11
- package/lib/getDateObject.d.ts +0 -10
- package/lib/getDateString.d.ts +0 -73
- package/lib/getDayDiff.d.ts +0 -5
- package/lib/getDurationString.d.ts +0 -1
- package/lib/getFareBrandName.d.ts +0 -2
- package/lib/getFirstSeatElementMatchingCriteria.d.ts +0 -4
- package/lib/getLayoverOriginDestinationKey.d.ts +0 -1
- package/lib/getPassengerBySegmentList.d.ts +0 -7
- package/lib/getPassengerInitials.d.ts +0 -1
- package/lib/getPassengerMapById.d.ts +0 -4
- package/lib/getPassengerName.d.ts +0 -2
- package/lib/getRowNumber.d.ts +0 -2
- package/lib/getSegmentDates.d.ts +0 -5
- package/lib/getSegmentFlightNumber.d.ts +0 -2
- package/lib/getSegmentList.d.ts +0 -3
- package/lib/getServicePriceMapById.d.ts +0 -4
- package/lib/getSliceDetails.d.ts +0 -3
- package/lib/getSymbols.d.ts +0 -2
- package/lib/getTimeString.d.ts +0 -1
- package/lib/getTotalAmountForServices.d.ts +0 -4
- package/lib/getTotalQuantity.d.ts +0 -2
- package/lib/getTravelItem.d.ts +0 -3
- package/lib/hasAvailableSeatService.d.ts +0 -3
- package/lib/hasBaggageServiceOfSameMetadataTypeAlreadyBeenSelected.d.ts +0 -4
- package/lib/hasHighLuminance.d.ts +0 -1
- package/lib/hasService.d.ts +0 -2
- package/lib/hasWings.d.ts +0 -2
- package/lib/isBaggageService.d.ts +0 -3
- package/lib/isCancelForAnyReasonService.d.ts +0 -3
- package/lib/isFixtureOfferId.d.ts +0 -2
- package/lib/isISO8601Duration.d.ts +0 -2
- package/lib/isPayloadComplete.d.ts +0 -3
- package/lib/isSeatElement.d.ts +0 -3
- package/lib/isValidDateString.d.ts +0 -6
- 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 -3
- package/lib/retrieveOfferFromDuffelAPI.d.ts +0 -1
- package/lib/retrieveSeatMaps.d.ts +0 -3
- package/lib/retrieveSeatMapsFromDuffelAPI.d.ts +0 -1
- package/lib/setBodyScrollability.d.ts +0 -1
- package/lib/toUTCDate.d.ts +0 -1
- package/lib/validateProps.d.ts +0 -7
- package/lib/withPlural.d.ts +0 -1
- package/stories/AirlineLogo.stories.d.ts +0 -4
- package/stories/BaggageSelectionModalHeader.stories.d.ts +0 -6
- package/stories/Button.stories.d.ts +0 -15
- package/stories/DuffelAncillaries.stories.d.ts +0 -23
- package/stories/DuffelCardForm.stories.d.ts +0 -7
- package/stories/DuffelNGSView.stories.d.ts +0 -7
- package/stories/DuffelPayments.stories.d.ts +0 -7
- package/stories/Icon.stories.d.ts +0 -4
- package/stories/IconButton.stories.d.ts +0 -8
- package/stories/MapboxPlacesLookup.stories.d.ts +0 -6
- package/stories/NGSShelfInfoCard.stories.d.ts +0 -3
- package/stories/NGSSliceFareCard.stories.d.ts +0 -4
- package/stories/OfferSlice.stories.d.ts +0 -6
- package/stories/OfferSliceModal.stories.d.ts +0 -6
- package/stories/PlacesLookup.stories.d.ts +0 -4
- package/stories/SliceCarriersTitle.stories.d.ts +0 -10
- package/stories/SliceSummary.stories.d.ts +0 -6
- package/stories/StaysAmenities.stories.d.ts +0 -10
- package/stories/StaysRating.stories.d.ts +0 -16
- package/stories/StaysRoomRateCard.stories.d.ts +0 -38
- package/stories/StaysSummary.stories.d.ts +0 -46
- package/tests/components/DuffelAncillaries.test.d.ts +0 -1
- package/tests/lib/convertDurationToString.test.d.ts +0 -1
- package/tests/lib/createPriceFormatters.test.d.ts +0 -1
- package/tests/lib/formatAvailableServices.test.d.ts +0 -1
- package/tests/lib/formatSeatMaps.test.d.ts +0 -1
- package/tests/lib/getAirlinesText.test.d.ts +0 -1
- package/tests/lib/getCarriers.test.d.ts +0 -1
- package/tests/lib/getCurrencyForServices.test.d.ts +0 -1
- package/tests/lib/getDateObject.test.d.ts +0 -1
- package/tests/lib/getDateString.spec.d.ts +0 -1
- package/tests/lib/getDayDiff.test.d.ts +0 -1
- package/tests/lib/getDurationString.test.d.ts +0 -1
- package/tests/lib/getFareBrandName.test.d.ts +0 -1
- package/tests/lib/getLayoverOriginDestinationKey.test.d.ts +0 -1
- package/tests/lib/getSegmentDates.d.ts +0 -1
- package/tests/lib/getSegmentDates.test.d.ts +0 -1
- package/tests/lib/getSegmentFlightNumber.test.d.ts +0 -1
- package/tests/lib/getSliceDetails.test.d.ts +0 -1
- package/tests/lib/getTimeString.test.d.ts +0 -1
- package/tests/lib/getTravelItem.test.d.ts +0 -1
- package/tests/lib/groupOffersForNGSView.test.d.ts +0 -1
- package/tests/lib/hasAvailableSeatService.test.d.ts +0 -1
- package/tests/lib/hasBaggageServiceOfSameMetadataTypeAlreadyBeenSelected.test.d.ts +0 -1
- package/tests/lib/isValidDateString.test.d.ts +0 -1
- package/tests/lib/logging.test.d.ts +0 -1
- package/tests/lib/moneyStringFormatter.test.d.ts +0 -1
- package/tests/lib/toUTCDate.test.d.ts +0 -1
- package/tests/lib/validateProps.test.d.ts +0 -5
- package/tsconfig.tsbuildinfo +0 -1
- package/types/CurrencyConversion.d.ts +0 -10
- package/types/DuffelAncillariesProps.d.ts +0 -107
- package/types/TravelDetails.d.ts +0 -77
- package/types/index.d.ts +0 -4
|
@@ -1,126 +0,0 @@
|
|
|
1
|
-
interface CommonCardData {
|
|
2
|
-
id: string;
|
|
3
|
-
last_4_digits: string;
|
|
4
|
-
live_mode: false;
|
|
5
|
-
}
|
|
6
|
-
interface CardActionError {
|
|
7
|
-
status: number;
|
|
8
|
-
message: string;
|
|
9
|
-
}
|
|
10
|
-
export interface CreateCardForTemporaryUseData extends CommonCardData {
|
|
11
|
-
saved: false;
|
|
12
|
-
/** The card will no longer be available for use after this time. */
|
|
13
|
-
unavailable_at: string;
|
|
14
|
-
}
|
|
15
|
-
export interface SaveCardData extends CommonCardData {
|
|
16
|
-
saved: true;
|
|
17
|
-
unavailable_at: null;
|
|
18
|
-
}
|
|
19
|
-
export interface SaveCardError extends CardActionError {
|
|
20
|
-
}
|
|
21
|
-
export interface CreateCardForTemporaryUseError extends CardActionError {
|
|
22
|
-
}
|
|
23
|
-
/**
|
|
24
|
-
* An object where each key value pair is a style to be applied.
|
|
25
|
-
* e.g. { 'background-image': 'red', 'color': '#000', 'margin-inline': '8px' }
|
|
26
|
-
*
|
|
27
|
-
* Note: If you rely on css variables these will not work as they are
|
|
28
|
-
* defined on a stylesheet the component does not have access to.
|
|
29
|
-
*/
|
|
30
|
-
type StylesMap = Record<string, string>;
|
|
31
|
-
export interface InteractiveElementStyles {
|
|
32
|
-
default?: StylesMap;
|
|
33
|
-
hover?: StylesMap;
|
|
34
|
-
active?: StylesMap;
|
|
35
|
-
focus?: StylesMap;
|
|
36
|
-
}
|
|
37
|
-
export interface DuffelCardFormStyles {
|
|
38
|
-
input?: InteractiveElementStyles;
|
|
39
|
-
select?: InteractiveElementStyles;
|
|
40
|
-
label?: StylesMap;
|
|
41
|
-
inputErrorMessage?: StylesMap;
|
|
42
|
-
sectionTitle?: StylesMap;
|
|
43
|
-
layoutGrid?: StylesMap;
|
|
44
|
-
}
|
|
45
|
-
export type DuffelCardFormAction = "validate" | "save-card" | "create-card-for-temporary-use";
|
|
46
|
-
export type DuffelCardFormIntent = "to-create-card-for-temporary-use" | "to-use-saved-card" | "to-save-card";
|
|
47
|
-
export interface DuffelCardFormProps {
|
|
48
|
-
/**
|
|
49
|
-
* The client key retrieved from the Duffel API.
|
|
50
|
-
*/
|
|
51
|
-
clientKey: string;
|
|
52
|
-
/**
|
|
53
|
-
* The styles to apply to the iframe input elements.
|
|
54
|
-
*/
|
|
55
|
-
styles?: DuffelCardFormStyles;
|
|
56
|
-
/**
|
|
57
|
-
* If you want to develop with in a different environment of the token proxy, you can choose it here.
|
|
58
|
-
*
|
|
59
|
-
* @default: `production`
|
|
60
|
-
*/
|
|
61
|
-
tokenProxyEnvironment?: "development" | "staging" | "production";
|
|
62
|
-
/**
|
|
63
|
-
* The card intent defines what the form is meant to look like.
|
|
64
|
-
* It can be one of:
|
|
65
|
-
*
|
|
66
|
-
* - `to-create-card-for-temporary-use`: The full form will be shown. You may also use this intent for the use case of using and saving the card.
|
|
67
|
-
* - `to-use-saved-card`: When using this intent also provide the saved card ID. Only a cvv field will be rendered.
|
|
68
|
-
* - `to-save-card`: The form will be shown without the cvv field. This only allows you to save a card for future use,
|
|
69
|
-
* but not create an id for immediate, temporary use. For the use case of saving during checkout or save + use, use the `to-create-card-for-temporary-use` intent.
|
|
70
|
-
*/
|
|
71
|
-
intent: DuffelCardFormIntent;
|
|
72
|
-
/**
|
|
73
|
-
* Once a card is saved, in order to use it, travellers need to enter its cvv.
|
|
74
|
-
* When using the `use-saved-card` intent, you must provide the card ID.
|
|
75
|
-
*/
|
|
76
|
-
savedCardData?: {
|
|
77
|
-
id: string;
|
|
78
|
-
brand: string;
|
|
79
|
-
};
|
|
80
|
-
/**
|
|
81
|
-
* This function will be called when the card form validation has been successful.
|
|
82
|
-
*/
|
|
83
|
-
onValidateSuccess?: () => void;
|
|
84
|
-
/**
|
|
85
|
-
* If the card form validation is successful but data is changed afterwards,
|
|
86
|
-
* making it invalid, this function will be called.
|
|
87
|
-
*/
|
|
88
|
-
onValidateFailure?: () => void;
|
|
89
|
-
/**
|
|
90
|
-
* This function will be called when the card has been created for temporary use.
|
|
91
|
-
*
|
|
92
|
-
* This callback will only be triggered if the `create-card-for-temporary-use`
|
|
93
|
-
* action is present in the `actions` prop. Alternatively,
|
|
94
|
-
* you may use the `triggerCreateCardForTemporaryUse` function from the
|
|
95
|
-
* `useDuffelCardFormActions` hook.
|
|
96
|
-
*/
|
|
97
|
-
onCreateCardForTemporaryUseSuccess?: (data: CreateCardForTemporaryUseData) => void;
|
|
98
|
-
/**
|
|
99
|
-
* This function will be called when the component has failed to create the card for temporary use.
|
|
100
|
-
*
|
|
101
|
-
* This callback will only be triggered if the `create-card-for-temporary-use`
|
|
102
|
-
* action is present in the `actions` prop. Alternatively,
|
|
103
|
-
* you may use the `triggerCreateCardForTemporaryUse` function from the
|
|
104
|
-
* `useDuffelCardFormActions` hook.
|
|
105
|
-
*/
|
|
106
|
-
onCreateCardForTemporaryUseFailure?: (error: CreateCardForTemporaryUseError) => void;
|
|
107
|
-
/**
|
|
108
|
-
* This function will be called when the card has been saved.
|
|
109
|
-
*
|
|
110
|
-
* This callback will only be triggered if the `save-card`
|
|
111
|
-
* action is present in the `actions` prop. Alternatively,
|
|
112
|
-
* you may use the `triggerSaveCard` function from the
|
|
113
|
-
* `useDuffelCardFormActions` hook.
|
|
114
|
-
*/
|
|
115
|
-
onSaveCardSuccess?: (data: SaveCardData) => void;
|
|
116
|
-
/**
|
|
117
|
-
* This function will be called when saving the card has failed.
|
|
118
|
-
*
|
|
119
|
-
* This callback will only be triggered if the `save-card`
|
|
120
|
-
* action is present in the `actions` prop. Alternatively,
|
|
121
|
-
* you may use the `triggerSaveCard` function from the
|
|
122
|
-
* `useDuffelCardFormActions` hook.
|
|
123
|
-
*/
|
|
124
|
-
onSaveCardFailure?: (error: SaveCardError) => void;
|
|
125
|
-
}
|
|
126
|
-
export {};
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
export interface DuffelCardFormActions {
|
|
3
|
-
saveCard: () => void;
|
|
4
|
-
createCardForTemporaryUse: () => void;
|
|
5
|
-
}
|
|
6
|
-
export interface UseDuffelCardFormActionsHook {
|
|
7
|
-
/**
|
|
8
|
-
* The ref you should pass to the DuffelCardForm component.
|
|
9
|
-
*/
|
|
10
|
-
ref: React.RefObject<DuffelCardFormActions>;
|
|
11
|
-
/**
|
|
12
|
-
* Call this function to tell the component to save the card.
|
|
13
|
-
*/
|
|
14
|
-
saveCard: () => void;
|
|
15
|
-
/**
|
|
16
|
-
* Call this function to tell the component to create a card for temporary use.
|
|
17
|
-
*/
|
|
18
|
-
createCardForTemporaryUse: () => void;
|
|
19
|
-
}
|
|
20
|
-
/**
|
|
21
|
-
* This hook abstracts the ref for convenience and readability.
|
|
22
|
-
* Add `ref` to the `DuffelCardForm` `ref` prop and call the functions to trigger the actions you'd like.
|
|
23
|
-
*/
|
|
24
|
-
export declare function useDuffelCardFormActions(): UseDuffelCardFormActionsHook;
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
/// <reference types="@duffel/api" />
|
|
2
|
-
import * as React from "react";
|
|
3
|
-
import { OfferRequest } from "@duffel/api/types";
|
|
4
|
-
export interface DuffelNGSViewProps {
|
|
5
|
-
offerRequest: OfferRequest;
|
|
6
|
-
onSelect: (offerId: string) => void;
|
|
7
|
-
}
|
|
8
|
-
export declare const DuffelNGSView: React.FC<DuffelNGSViewProps>;
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
/// <reference types="@duffel/api" />
|
|
2
|
-
import * as React from "react";
|
|
3
|
-
import { Offer } from "@duffel/api/types";
|
|
4
|
-
export interface NGSSliceFareCardProps {
|
|
5
|
-
offer: Omit<Offer, "available_services">;
|
|
6
|
-
sliceIndex: number;
|
|
7
|
-
onSelect?: () => void;
|
|
8
|
-
className?: string;
|
|
9
|
-
}
|
|
10
|
-
export declare const NGSSliceFareCard: React.FC<NGSSliceFareCardProps>;
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
/// <reference types="@duffel/api" />
|
|
2
|
-
import * as React from "react";
|
|
3
|
-
import { OfferRequest } from "@duffel/api/types";
|
|
4
|
-
export interface NGSTableProps {
|
|
5
|
-
offers: OfferRequest["offers"];
|
|
6
|
-
sliceIndex: number;
|
|
7
|
-
previousSliceKeys: string[];
|
|
8
|
-
onSelect: (offerId: string, sliceKey: string) => void;
|
|
9
|
-
}
|
|
10
|
-
export declare const NGSTable: React.FC<NGSTableProps>;
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
/// <reference types="@duffel/api" />
|
|
2
|
-
import { Offer, OfferRequest } from "@duffel/api/types";
|
|
3
|
-
import { NGSOfferRow } from "./group-offers-for-ngs-view";
|
|
4
|
-
export declare const deduplicateMappedOffersByFareBrand: (offersMap: Record<string, NGSOfferRow>) => Record<string, NGSOfferRow>;
|
|
5
|
-
export declare const getFareBrandNameForOffer: (offer: Omit<Offer, "available_services">, sliceIndex?: number) => string;
|
|
6
|
-
export declare const getCheapestOffer: (offers: OfferRequest["offers"]) => Omit<Offer, "available_services">;
|
|
7
|
-
export declare const groupByFareBrandName: (offers: OfferRequest["offers"]) => Omit<Offer, "available_services">[][];
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { OfferAvailableServiceBaggageMetadata, OfferSlice, OfferSliceSegmentPassenger } from "@duffel/api/types";
|
|
2
|
-
/**
|
|
3
|
-
* Returns the passenger baggages object with the largest quantity of baggages
|
|
4
|
-
* of a specified type for a slice. Baggage quantity can (very occasionally)
|
|
5
|
-
* vary across passengers and segments in a slice, so the 'max' baggages can
|
|
6
|
-
* be used as the baseline for a slice.
|
|
7
|
-
*/
|
|
8
|
-
export declare const getMaxBaggagesForOfferSlice: (offerSlice: OfferSlice, type: OfferAvailableServiceBaggageMetadata["type"]) => OfferSliceSegmentPassenger["baggages"];
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
/// <reference types="@duffel/api" />
|
|
2
|
-
import { OfferRequest, OfferSlice } from "@duffel/api/types";
|
|
3
|
-
import { NGSShelf } from ".";
|
|
4
|
-
export type NGSOfferRow = Record<"slice", OfferSlice> & Record<NGSShelf, OfferRequest["offers"] | null>;
|
|
5
|
-
export declare const getNGSSliceKey: (slice: OfferSlice, ownerId: string | null, includeFareBrand?: boolean) => string;
|
|
6
|
-
export declare const groupOffersForNGSView: (offers: OfferRequest["offers"], sliceIndex: number, previousSliceKeys: string[]) => NGSOfferRow[];
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
/// <reference types="@duffel/api" />
|
|
2
|
-
import { IconName } from "@components/shared/Icon";
|
|
3
|
-
import { OfferSlice, SeatType } from "@duffel/api/types";
|
|
4
|
-
export declare const NGS_SHELVES: readonly [1, 2, 3, 4, 5];
|
|
5
|
-
export type NGSShelf = OfferSlice["ngs_shelf"];
|
|
6
|
-
type ShelfInfo = {
|
|
7
|
-
short_title: string;
|
|
8
|
-
full_title: string;
|
|
9
|
-
description: string;
|
|
10
|
-
icon: IconName;
|
|
11
|
-
};
|
|
12
|
-
export declare const NGS_SHELF_INFO: Record<OfferSlice["ngs_shelf"], ShelfInfo>;
|
|
13
|
-
export declare const SEAT_ICONS_MAP: Record<SeatType, IconName>;
|
|
14
|
-
export {};
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import { OfferRequest } from "@duffel/api/types";
|
|
2
|
-
import { NGSShelf } from ".";
|
|
3
|
-
import { NGSOfferRow } from "./group-offers-for-ngs-view";
|
|
4
|
-
export type SortDirection = "asc" | "desc";
|
|
5
|
-
export declare const getCheapestOfferAmount: (offers: OfferRequest["offers"] | null) => number | null;
|
|
6
|
-
export declare const sortNGSRows: (rows: NGSOfferRow[], sortShelf: NGSShelf, sortDirection: SortDirection) => NGSOfferRow[];
|
|
@@ -1,11 +0,0 @@
|
|
|
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>;
|
|
@@ -1,13 +0,0 @@
|
|
|
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 {};
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import { Place } from "./lib/getPlacesFromMapboxClient";
|
|
3
|
-
export interface MapboxPlacesLookupProps {
|
|
4
|
-
mapboxPublicKey: string;
|
|
5
|
-
onPlaceSelected: (selection: Place) => void;
|
|
6
|
-
placeholder?: string;
|
|
7
|
-
inputClassName?: string;
|
|
8
|
-
popupClassName?: string;
|
|
9
|
-
highlightedPopupItemClassName?: string;
|
|
10
|
-
inputValue?: string;
|
|
11
|
-
}
|
|
12
|
-
export declare const MapboxPlacesLookup: React.FC<MapboxPlacesLookupProps>;
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { MapboxPlacesLookupProps } from "./MapboxPlacesLookup";
|
|
2
|
-
declare const CUSTOM_ELEMENT_TAG = "duffel-mapbox-places-lookup";
|
|
3
|
-
declare global {
|
|
4
|
-
namespace JSX {
|
|
5
|
-
interface IntrinsicElements {
|
|
6
|
-
[CUSTOM_ELEMENT_TAG]: React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>;
|
|
7
|
-
}
|
|
8
|
-
}
|
|
9
|
-
}
|
|
10
|
-
type MapboxPlacesLookupCustomElementRenderArguments = Pick<MapboxPlacesLookupProps, "mapboxPublicKey" | "placeholder" | "inputClassName">;
|
|
11
|
-
export declare function renderMapboxPlacesLookupCustomElement(props: MapboxPlacesLookupCustomElementRenderArguments): void;
|
|
12
|
-
export declare function onMapboxPlacesLookupPlaceSelected(onPlaceSelected: MapboxPlacesLookupProps["onPlaceSelected"]): void;
|
|
13
|
-
export {};
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import * as React from "react";
|
|
2
|
-
import { LayoverDetails, SliceDetailItemChangeStatus } from "src/types/TravelDetails";
|
|
3
|
-
export interface SliceDetailsLayoverItemProps {
|
|
4
|
-
layoverDetails: LayoverDetails;
|
|
5
|
-
changeStatus?: SliceDetailItemChangeStatus;
|
|
6
|
-
className?: string;
|
|
7
|
-
}
|
|
8
|
-
export declare const OfferSliceDetailLayoverItem: React.FC<SliceDetailsLayoverItemProps>;
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { SliceDetailItemChangeStatus, TravelDetails } from "src/types/TravelDetails";
|
|
2
|
-
export interface SliceDetailsTravelItemProps {
|
|
3
|
-
changeStatus?: SliceDetailItemChangeStatus;
|
|
4
|
-
travelDetails: TravelDetails<"offer" | "order">;
|
|
5
|
-
highlightAll?: boolean;
|
|
6
|
-
keysToHighlight?: string[];
|
|
7
|
-
}
|
|
8
|
-
export declare const getTerminalString: (terminal?: string | null) => string;
|
|
9
|
-
export declare const OfferSliceDetailTravelItem: React.FC<SliceDetailsTravelItemProps>;
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { Color } from "@lib/colors";
|
|
2
|
-
export declare const getHighlightStyles: (highlightAll: boolean, key?: string, keysToHighlight?: string[], highlightColor?: Color) => {
|
|
3
|
-
className?: string | undefined;
|
|
4
|
-
style?: {
|
|
5
|
-
backgroundColor: string;
|
|
6
|
-
} | undefined;
|
|
7
|
-
};
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { OfferSliceProps } from "@components/OfferSlice/OfferSlice";
|
|
2
|
-
import { ModalProps } from "@components/shared/Modal";
|
|
3
|
-
interface OfferSliceModalProps extends Pick<ModalProps, "isOpen" | "onClose"> {
|
|
4
|
-
slice: OfferSliceProps["slice"];
|
|
5
|
-
}
|
|
6
|
-
export declare const OfferSliceModal: React.FC<OfferSliceModalProps>;
|
|
7
|
-
export {};
|
|
@@ -1,20 +0,0 @@
|
|
|
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 {};
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
/// <reference types="@duffel/api" />
|
|
2
|
-
import * as React from "react";
|
|
3
|
-
import { IconName } from "@components/shared/Icon";
|
|
4
|
-
import { StaysAccommodation, StaysAmenity } from "@duffel/api/types";
|
|
5
|
-
export declare const amenityIcon: (type: StaysAmenity["type"]) => IconName;
|
|
6
|
-
export interface StaysAmenitiesProps {
|
|
7
|
-
amenities: StaysAccommodation["amenities"];
|
|
8
|
-
}
|
|
9
|
-
export declare const StaysAmenities: React.FC<StaysAmenitiesProps>;
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { StaysAmenitiesProps } from "./StaysAmenities";
|
|
2
|
-
declare const CUSTOM_ELEMENT_TAG = "duffel-stays-amenities";
|
|
3
|
-
type CustomElementRenderArguments = StaysAmenitiesProps;
|
|
4
|
-
declare global {
|
|
5
|
-
namespace JSX {
|
|
6
|
-
interface IntrinsicElements {
|
|
7
|
-
[CUSTOM_ELEMENT_TAG]: React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>;
|
|
8
|
-
}
|
|
9
|
-
}
|
|
10
|
-
}
|
|
11
|
-
export declare function renderDuffelStaysAmenitiesCustomElement(props: CustomElementRenderArguments): void;
|
|
12
|
-
export {};
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { StaysRatingProps } from "./StaysRating";
|
|
2
|
-
declare const CUSTOM_ELEMENT_TAG = "duffel-stays-rating";
|
|
3
|
-
type CustomElementRenderArguments = StaysRatingProps & {
|
|
4
|
-
elementId: string;
|
|
5
|
-
};
|
|
6
|
-
declare global {
|
|
7
|
-
namespace JSX {
|
|
8
|
-
interface IntrinsicElements {
|
|
9
|
-
[CUSTOM_ELEMENT_TAG]: React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>;
|
|
10
|
-
}
|
|
11
|
-
}
|
|
12
|
-
}
|
|
13
|
-
export declare function renderDuffelStaysRatingCustomElement(props: CustomElementRenderArguments): void;
|
|
14
|
-
export {};
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
/// <reference types="@duffel/api" />
|
|
2
|
-
import * as React from "react";
|
|
3
|
-
import { StaysRoomRate } from "@duffel/api/types";
|
|
4
|
-
export interface StaysRoomRateCardProps {
|
|
5
|
-
rate: StaysRoomRate;
|
|
6
|
-
searchNumberOfRooms: number;
|
|
7
|
-
numberOfNights: number;
|
|
8
|
-
selected: boolean;
|
|
9
|
-
onSelectRate: (rateId: string) => void;
|
|
10
|
-
}
|
|
11
|
-
export declare const StaysRoomRateCard: React.FC<StaysRoomRateCardProps>;
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { StaysRoomRateCardProps } from "./StaysRoomRateCard";
|
|
2
|
-
declare const CUSTOM_ELEMENT_TAG = "duffel-stays-room-rate-card";
|
|
3
|
-
type CustomElementRenderArguments = StaysRoomRateCardProps & {
|
|
4
|
-
elementId: string;
|
|
5
|
-
};
|
|
6
|
-
declare global {
|
|
7
|
-
namespace JSX {
|
|
8
|
-
interface IntrinsicElements {
|
|
9
|
-
[CUSTOM_ELEMENT_TAG]: React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>;
|
|
10
|
-
}
|
|
11
|
-
}
|
|
12
|
-
}
|
|
13
|
-
export declare function renderDuffelStaysRoomRateCardCustomElement(props: CustomElementRenderArguments): void;
|
|
14
|
-
export {};
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
/// <reference types="@duffel/api" />
|
|
2
|
-
import { StaysAccommodation, StaysBooking } from "@duffel/api/types";
|
|
3
|
-
export interface StaysSummaryProps {
|
|
4
|
-
accommodation: StaysAccommodation;
|
|
5
|
-
checkInDate: Date;
|
|
6
|
-
checkOutDate: Date;
|
|
7
|
-
numRooms?: number;
|
|
8
|
-
supportedLoyaltyProgramme?: StaysBooking["supported_loyalty_programme"];
|
|
9
|
-
loyaltyProgrammeAccountNumber?: string | null;
|
|
10
|
-
accommodationSpecialRequests?: string | null;
|
|
11
|
-
}
|
|
12
|
-
export declare const StaysSummary: React.FC<React.PropsWithChildren<StaysSummaryProps>>;
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { StaysSummaryProps } from "./StaysSummary";
|
|
2
|
-
declare const CUSTOM_ELEMENT_TAG = "duffel-stays-summary";
|
|
3
|
-
type CustomElementRenderArguments = StaysSummaryProps;
|
|
4
|
-
declare global {
|
|
5
|
-
namespace JSX {
|
|
6
|
-
interface IntrinsicElements {
|
|
7
|
-
[CUSTOM_ELEMENT_TAG]: React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>;
|
|
8
|
-
}
|
|
9
|
-
}
|
|
10
|
-
}
|
|
11
|
-
export declare function renderDuffelStaysSummaryCustomElement(props: CustomElementRenderArguments): void;
|
|
12
|
-
export {};
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
import { IconName } from "@components/shared/Icon";
|
|
2
|
-
import { StaysRoomRate } from "@duffel/api/types";
|
|
3
|
-
export declare const LOYALTY_PROGRAMS_NAME_MAP: {
|
|
4
|
-
wyndham_rewards: string;
|
|
5
|
-
choice_privileges: string;
|
|
6
|
-
marriott_bonvoy: string;
|
|
7
|
-
best_western_rewards: string;
|
|
8
|
-
world_of_hyatt: string;
|
|
9
|
-
hilton_honors: string;
|
|
10
|
-
ihg_one_rewards: string;
|
|
11
|
-
leaders_club: string;
|
|
12
|
-
stash_rewards: string;
|
|
13
|
-
omni_select_guest: string;
|
|
14
|
-
i_prefer: string;
|
|
15
|
-
accor_live_limitless: string;
|
|
16
|
-
my_6: string;
|
|
17
|
-
jumeirah_one: string;
|
|
18
|
-
global_hotel_alliance_discovery: string;
|
|
19
|
-
duffel_hotel_group_rewards: string;
|
|
20
|
-
};
|
|
21
|
-
export declare const SOURCE_NAME_MAP: {
|
|
22
|
-
bookingcom: string;
|
|
23
|
-
expedia: string;
|
|
24
|
-
priceline: string;
|
|
25
|
-
travelport: string;
|
|
26
|
-
duffel_hotel_group: string;
|
|
27
|
-
};
|
|
28
|
-
export declare const getBoardTypeLabel: (boardType: StaysRoomRate["board_type"]) => "Room only, no meals" | "Breakfast included" | "Half board" | "Full board" | "All inclusive";
|
|
29
|
-
export declare const boardTypeIcon: (boardType: StaysRoomRate["board_type"]) => IconName;
|
|
@@ -1,23 +0,0 @@
|
|
|
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 {};
|
|
@@ -1,13 +0,0 @@
|
|
|
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
|
-
}
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import * as React from "react";
|
|
2
|
-
type DivProps = JSX.IntrinsicElements["div"];
|
|
3
|
-
export interface HSpaceProps extends DivProps {
|
|
4
|
-
/**
|
|
5
|
-
* A space-delimited list of class names to pass along to a child element.
|
|
6
|
-
*/
|
|
7
|
-
className?: string;
|
|
8
|
-
/**
|
|
9
|
-
* The vertical spacing between each child element
|
|
10
|
-
*/
|
|
11
|
-
space: 0 | 4 | 8 | 12 | 16;
|
|
12
|
-
/**
|
|
13
|
-
* If you'd like all children inside your horizontal space container
|
|
14
|
-
* to be vertically aligned to the center of the div, you can set `alignCenter` to `true`
|
|
15
|
-
*
|
|
16
|
-
* Default: `false`
|
|
17
|
-
*/
|
|
18
|
-
alignCenter?: boolean;
|
|
19
|
-
/**
|
|
20
|
-
* If you'd like all children inside your horizontal space container
|
|
21
|
-
* to be spread out from one another, you can set `spaceBetween` to `true`
|
|
22
|
-
*
|
|
23
|
-
* Default: `false`
|
|
24
|
-
*/
|
|
25
|
-
spaceBetween?: boolean;
|
|
26
|
-
}
|
|
27
|
-
export declare const HSpace: React.FC<HSpaceProps>;
|
|
28
|
-
export {};
|