@duffel/components 3.11.0 → 3.12.0
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 +6 -3
- package/package.json +4 -3
- 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 -34
- 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 -154
- package/components/DuffelCardForm/lib/useDuffelCardFormActions.d.ts +0 -24
- package/components/DuffelNGSView/AirlineSelector.d.ts +0 -10
- package/components/DuffelNGSView/DuffelNGSView.d.ts +0 -14
- package/components/DuffelNGSView/FilterControl.d.ts +0 -20
- package/components/DuffelNGSView/FilterControls.d.ts +0 -13
- package/components/DuffelNGSView/NGSShelfInfoCard.d.ts +0 -7
- package/components/DuffelNGSView/NGSSliceFareCard.d.ts +0 -10
- package/components/DuffelNGSView/NGSTable.d.ts +0 -15
- package/components/DuffelNGSView/SliceSummary.d.ts +0 -7
- package/components/DuffelNGSView/SortingControl.d.ts +0 -23
- package/components/DuffelNGSView/StopsSelector.d.ts +0 -8
- package/components/DuffelNGSView/TimeRangeSelector.d.ts +0 -8
- package/components/DuffelNGSView/lib/deduplicate-mapped-offers-by-fare-brand.d.ts +0 -7
- package/components/DuffelNGSView/lib/does-slice-have-mixed-cabins.d.ts +0 -4
- package/components/DuffelNGSView/lib/filter-results.d.ts +0 -14
- package/components/DuffelNGSView/lib/get-initial-filter-values.d.ts +0 -4
- package/components/DuffelNGSView/lib/get-max-baggages-for-offer-slice.d.ts +0 -8
- package/components/DuffelNGSView/lib/getAirlines.d.ts +0 -4
- 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-by-duration.d.ts +0 -5
- package/components/DuffelNGSView/lib/sort-ngs-rows-by-recommended.d.ts +0 -2
- package/components/DuffelNGSView/lib/sort-ngs-rows-by-shelf-price.d.ts +0 -6
- package/components/DuffelNGSView/lib/useFilters.d.ts +0 -28
- 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/StaysCancellationTimeline/Policy.d.ts +0 -8
- package/components/Stays/StaysCancellationTimeline/StaysCancellationTimeline.d.ts +0 -12
- package/components/Stays/StaysCancellationTimeline/StaysCancellationTimelineDeposit.d.ts +0 -12
- package/components/Stays/StaysCancellationTimeline/StaysCancellationTimelineGuarantee.d.ts +0 -12
- package/components/Stays/StaysCancellationTimeline/StaysCancellationTimelinePayNow.d.ts +0 -12
- package/components/Stays/StaysCancellationTimeline/TimelineItem.d.ts +0 -15
- package/components/Stays/StaysCancellationTimeline/lib/isTimezoneDate.d.ts +0 -4
- package/components/Stays/StaysCancellationTimeline/lib/renderTimelineDateTime.d.ts +0 -1
- package/components/Stays/StaysRating.d.ts +0 -6
- package/components/Stays/StaysRatingCustomElement.d.ts +0 -14
- package/components/Stays/StaysRoomRateCard.d.ts +0 -13
- 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/getRateLabel.d.ts +0 -2
- 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/Card.d.ts +0 -14
- 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 -98
- 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 -8
- 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 -70
- package/custom-elements.js.map +0 -7
- package/fixtures/offer-requests/orq_duplicates.d.ts +0 -2
- package/fixtures/passengers/mock_passengers.d.ts +0 -4
- package/functions/createThreeDSecureSession/client.d.ts +0 -43
- package/functions/createThreeDSecureSession/createThreeDSecureSession.d.ts +0 -25
- package/functions/createThreeDSecureSession/initEvervault.d.ts +0 -1
- package/functions/createThreeDSecureSession/loadEvervaultScript.d.ts +0 -1
- package/functions/hasService.d.ts +0 -3
- package/functions.d.ts +0 -10
- package/index.d.ts +0 -19
- package/index.js +0 -55
- package/index.js.map +0 -7
- package/lib/captureErrorInSentry.d.ts +0 -1
- package/lib/colors.d.ts +0 -31
- 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/isAmenityElement.d.ts +0 -3
- 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 -3
- package/stories/AirlineSelector.stories.d.ts +0 -3
- package/stories/BaggageSelectionModalHeader.stories.d.ts +0 -6
- package/stories/Button.stories.d.ts +0 -15
- package/stories/DuffelAncillaries.stories.d.ts +0 -24
- package/stories/DuffelCardForm.stories.d.ts +0 -7
- package/stories/DuffelNGSView.stories.d.ts +0 -8
- package/stories/DuffelPayments.stories.d.ts +0 -7
- package/stories/Icon.stories.d.ts +0 -3
- package/stories/IconButton.stories.d.ts +0 -8
- package/stories/MapboxPlacesLookup.stories.d.ts +0 -5
- package/stories/NGSShelfInfoCard.stories.d.ts +0 -3
- package/stories/NGSSliceFareCard.stories.d.ts +0 -3
- package/stories/OfferSlice.stories.d.ts +0 -5
- package/stories/OfferSliceModal.stories.d.ts +0 -6
- package/stories/PlacesLookup.stories.d.ts +0 -3
- package/stories/SeatMap.stories.d.ts +0 -4
- package/stories/SliceCarriersTitle.stories.d.ts +0 -10
- package/stories/SliceSummary.stories.d.ts +0 -5
- package/stories/StaysAmenities.stories.d.ts +0 -10
- package/stories/StaysCancellationTimeline.stories.d.ts +0 -122
- package/stories/StaysRating.stories.d.ts +0 -16
- package/stories/StaysRoomRateCard.stories.d.ts +0 -141
- package/stories/StaysSummary.stories.d.ts +0 -47
- package/tests/components/DuffelAncillaries.test.d.ts +0 -1
- package/tests/functions/createThreeDSecureSession.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/getAirlines.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/getRateLabel.spec.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 -115
- package/types/TravelDetails.d.ts +0 -77
- package/types/index.d.ts +0 -4
|
@@ -1,154 +0,0 @@
|
|
|
1
|
-
interface CommonCardData {
|
|
2
|
-
/**
|
|
3
|
-
* Duffel's unique identifier for the resource
|
|
4
|
-
*/
|
|
5
|
-
id: string;
|
|
6
|
-
/**
|
|
7
|
-
* Whether the card was created in live mode. This field will be set to true
|
|
8
|
-
* if the card was created in live mode, or false if it was created in test mode.
|
|
9
|
-
*/
|
|
10
|
-
live_mode: boolean;
|
|
11
|
-
/**
|
|
12
|
-
* Last 4 digits of the card number.
|
|
13
|
-
*/
|
|
14
|
-
last_4_digits: string;
|
|
15
|
-
/**
|
|
16
|
-
* Card brand name.
|
|
17
|
-
*/
|
|
18
|
-
brand: "visa" | "mastercard" | "uatp" | "american_express" | "diners_club" | "jcb" | "discover";
|
|
19
|
-
}
|
|
20
|
-
interface CardActionError {
|
|
21
|
-
status: number;
|
|
22
|
-
message: string;
|
|
23
|
-
}
|
|
24
|
-
export interface SecurityPolicyViolationData {
|
|
25
|
-
violated_directive: string;
|
|
26
|
-
}
|
|
27
|
-
export interface CreateCardForTemporaryUseData extends CommonCardData {
|
|
28
|
-
saved: false;
|
|
29
|
-
/**
|
|
30
|
-
* The ISO 8601 datetime at which the card will be automatically deleted.
|
|
31
|
-
*/
|
|
32
|
-
unavailable_at: string;
|
|
33
|
-
}
|
|
34
|
-
export interface SaveCardData extends CommonCardData {
|
|
35
|
-
saved: true;
|
|
36
|
-
/**
|
|
37
|
-
* The ISO 8601 datetime at which the card will be automatically deleted.
|
|
38
|
-
*/
|
|
39
|
-
unavailable_at: null;
|
|
40
|
-
}
|
|
41
|
-
export interface SaveCardError extends CardActionError {
|
|
42
|
-
}
|
|
43
|
-
export interface CreateCardForTemporaryUseError extends CardActionError {
|
|
44
|
-
}
|
|
45
|
-
/**
|
|
46
|
-
* An object where each key value pair is a style to be applied.
|
|
47
|
-
* e.g. { 'background-image': 'red', 'color': '#000', 'margin-inline': '8px' }
|
|
48
|
-
*
|
|
49
|
-
* Note: If you rely on css variables these will not work as they are
|
|
50
|
-
* defined on a stylesheet the component does not have access to.
|
|
51
|
-
*/
|
|
52
|
-
type StylesMap = Record<string, string>;
|
|
53
|
-
export interface InteractiveElementStyles {
|
|
54
|
-
default?: StylesMap;
|
|
55
|
-
hover?: StylesMap;
|
|
56
|
-
active?: StylesMap;
|
|
57
|
-
focus?: StylesMap;
|
|
58
|
-
}
|
|
59
|
-
export interface DuffelCardFormStyles {
|
|
60
|
-
input?: InteractiveElementStyles;
|
|
61
|
-
select?: InteractiveElementStyles;
|
|
62
|
-
label?: StylesMap;
|
|
63
|
-
inputErrorMessage?: StylesMap;
|
|
64
|
-
sectionTitle?: StylesMap;
|
|
65
|
-
layoutGrid?: StylesMap;
|
|
66
|
-
}
|
|
67
|
-
export type DuffelCardFormAction = "validate" | "save-card" | "create-card-for-temporary-use";
|
|
68
|
-
export type DuffelCardFormIntent = "to-create-card-for-temporary-use" | "to-use-saved-card" | "to-save-card";
|
|
69
|
-
export interface DuffelCardFormProps {
|
|
70
|
-
/**
|
|
71
|
-
* The client key retrieved from the Duffel API.
|
|
72
|
-
*/
|
|
73
|
-
clientKey: string;
|
|
74
|
-
/**
|
|
75
|
-
* The styles to apply to the iframe input elements.
|
|
76
|
-
*/
|
|
77
|
-
styles?: DuffelCardFormStyles;
|
|
78
|
-
/**
|
|
79
|
-
* This value is intended for Duffel engineers to load the card form iframe
|
|
80
|
-
* from different environments of our [token proxy service](https://github.com/duffelhq/token-proxy).
|
|
81
|
-
*
|
|
82
|
-
* @default: `production`
|
|
83
|
-
*/
|
|
84
|
-
tokenProxyEnvironment?: "development" | "staging" | "production";
|
|
85
|
-
/**
|
|
86
|
-
* The card intent defines what the form is meant to look like.
|
|
87
|
-
* It can be one of:
|
|
88
|
-
*
|
|
89
|
-
* - `to-create-card-for-temporary-use`: The full form will be shown. You may also use this intent for the use case of saving and using the card.
|
|
90
|
-
* - `to-use-saved-card`: Only a CVC field will be shown. When using this intent a saved card ID is required.
|
|
91
|
-
* - `to-save-card`: The form will be shown without the CVC field. This only allows you to save a card for future use,
|
|
92
|
-
* but not create an ID for immediate, temporary use. For the use case of saving and using during checkout, use the `to-create-card-for-temporary-use` intent.
|
|
93
|
-
|
|
94
|
-
*/
|
|
95
|
-
intent: DuffelCardFormIntent;
|
|
96
|
-
/**
|
|
97
|
-
* Once a card is saved, in order to use it, travellers need to enter its cvv.
|
|
98
|
-
* When using the `use-saved-card` intent, you must provide the card ID.
|
|
99
|
-
*/
|
|
100
|
-
savedCardData?: {
|
|
101
|
-
id: string;
|
|
102
|
-
brand: string;
|
|
103
|
-
};
|
|
104
|
-
/**
|
|
105
|
-
* This function will be called when the card form validation has been successful.
|
|
106
|
-
*/
|
|
107
|
-
onValidateSuccess?: () => void;
|
|
108
|
-
/**
|
|
109
|
-
* If the card form validation is successful but data is changed afterwards,
|
|
110
|
-
* making it invalid, this function will be called.
|
|
111
|
-
*/
|
|
112
|
-
onValidateFailure?: () => void;
|
|
113
|
-
/**
|
|
114
|
-
* This function will be called when the card has been created for temporary use.
|
|
115
|
-
*
|
|
116
|
-
* This callback will only be triggered if the `create-card-for-temporary-use`
|
|
117
|
-
* action is present in the `actions` prop. Alternatively,
|
|
118
|
-
* you may use the `triggerCreateCardForTemporaryUse` function from the
|
|
119
|
-
* `useDuffelCardFormActions` hook.
|
|
120
|
-
*/
|
|
121
|
-
onCreateCardForTemporaryUseSuccess?: (data: CreateCardForTemporaryUseData) => void;
|
|
122
|
-
/**
|
|
123
|
-
* This function will be called when the component has failed to create the card for temporary use.
|
|
124
|
-
*
|
|
125
|
-
* This callback will only be triggered if the `create-card-for-temporary-use`
|
|
126
|
-
* action is present in the `actions` prop. Alternatively,
|
|
127
|
-
* you may use the `triggerCreateCardForTemporaryUse` function from the
|
|
128
|
-
* `useDuffelCardFormActions` hook.
|
|
129
|
-
*/
|
|
130
|
-
onCreateCardForTemporaryUseFailure?: (error: CreateCardForTemporaryUseError) => void;
|
|
131
|
-
/**
|
|
132
|
-
* This function will be called when the card has been saved.
|
|
133
|
-
*
|
|
134
|
-
* This callback will only be triggered if the `save-card`
|
|
135
|
-
* action is present in the `actions` prop. Alternatively,
|
|
136
|
-
* you may use the `triggerSaveCard` function from the
|
|
137
|
-
* `useDuffelCardFormActions` hook.
|
|
138
|
-
*/
|
|
139
|
-
onSaveCardSuccess?: (data: SaveCardData) => void;
|
|
140
|
-
/**
|
|
141
|
-
* This function will be called when saving the card has failed.
|
|
142
|
-
*
|
|
143
|
-
* This callback will only be triggered if the `save-card`
|
|
144
|
-
* action is present in the `actions` prop. Alternatively,
|
|
145
|
-
* you may use the `triggerSaveCard` function from the
|
|
146
|
-
* `useDuffelCardFormActions` hook.
|
|
147
|
-
*/
|
|
148
|
-
onSaveCardFailure?: (error: SaveCardError) => void;
|
|
149
|
-
/**
|
|
150
|
-
* This function will be called if a security policy violation is detected.
|
|
151
|
-
*/
|
|
152
|
-
onSecurityPolicyViolation?: (data: SecurityPolicyViolationData) => void;
|
|
153
|
-
}
|
|
154
|
-
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,10 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import { Filters } from "./lib/filter-results";
|
|
3
|
-
export interface AirlineSelectorProps {
|
|
4
|
-
options: Filters["airlines"];
|
|
5
|
-
selected: Filters["airlines"];
|
|
6
|
-
onChange: (airlines: Filters["airlines"]) => void;
|
|
7
|
-
disabled?: boolean;
|
|
8
|
-
targetLabel?: string;
|
|
9
|
-
}
|
|
10
|
-
export declare const AirlineSelector: React.FC<AirlineSelectorProps>;
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
/// <reference types="@duffel/api" />
|
|
2
|
-
import { OfferRequest } from "@duffel/api/types";
|
|
3
|
-
import * as React from "react";
|
|
4
|
-
import { NGSOfferRow } from "./lib/group-offers-for-ngs-view";
|
|
5
|
-
export declare function useSort(): {
|
|
6
|
-
sortOption: "duration-asc" | "duration-desc" | "1-asc" | "1-desc" | "2-asc" | "2-desc" | "3-asc" | "3-desc" | "4-asc" | "4-desc" | "5-asc" | "5-desc" | "recommended";
|
|
7
|
-
setSortOption: React.Dispatch<React.SetStateAction<"duration-asc" | "duration-desc" | "1-asc" | "1-desc" | "2-asc" | "2-desc" | "3-asc" | "3-desc" | "4-asc" | "4-desc" | "5-asc" | "5-desc" | "recommended">>;
|
|
8
|
-
sortingFunction: (rows: NGSOfferRow[]) => NGSOfferRow[];
|
|
9
|
-
};
|
|
10
|
-
export interface DuffelNGSViewProps {
|
|
11
|
-
offerRequest: OfferRequest;
|
|
12
|
-
onSelect: (offerId: string) => void;
|
|
13
|
-
}
|
|
14
|
-
export declare const DuffelNGSView: React.FC<DuffelNGSViewProps>;
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
interface FilterControlProps {
|
|
3
|
-
target: React.ReactNode;
|
|
4
|
-
children: (closePopover: () => void) => React.ReactNode;
|
|
5
|
-
disabled?: boolean;
|
|
6
|
-
popoverWidth?: string;
|
|
7
|
-
popoverMaxHeigh?: string;
|
|
8
|
-
targetWidth: string;
|
|
9
|
-
}
|
|
10
|
-
export declare const FilterControl: React.FC<FilterControlProps>;
|
|
11
|
-
interface FilterControlOptionProps {
|
|
12
|
-
children: React.ReactNode;
|
|
13
|
-
className?: string;
|
|
14
|
-
isSelected: boolean;
|
|
15
|
-
onClick: React.MouseEventHandler<HTMLButtonElement>;
|
|
16
|
-
onKeyDown: React.KeyboardEventHandler<HTMLButtonElement>;
|
|
17
|
-
onDoubleClick?: React.MouseEventHandler<HTMLButtonElement>;
|
|
18
|
-
}
|
|
19
|
-
export declare const FilterControlOption: React.FC<FilterControlOptionProps>;
|
|
20
|
-
export {};
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { Filters } from "./lib/filter-results";
|
|
2
|
-
interface FilterControlsProps {
|
|
3
|
-
selectedOwner?: string;
|
|
4
|
-
airlines: Filters["airlines"];
|
|
5
|
-
airlinesFilter: Filters["airlines"];
|
|
6
|
-
setAirlinesFilter: (airlines: Filters["airlines"]) => void;
|
|
7
|
-
timesFilter: Filters["times"];
|
|
8
|
-
setTimesFilter: (times: Filters["times"]) => void;
|
|
9
|
-
stopsFilter: Filters["stops"];
|
|
10
|
-
setStopsFilter: (stops: Filters["stops"]) => void;
|
|
11
|
-
}
|
|
12
|
-
export declare const FilterControls: React.FC<FilterControlsProps>;
|
|
13
|
-
export {};
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
/// <reference types="@duffel/api" />
|
|
2
|
-
import { Offer } from "@duffel/api/types";
|
|
3
|
-
import * as React from "react";
|
|
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,15 +0,0 @@
|
|
|
1
|
-
/// <reference types="@duffel/api" />
|
|
2
|
-
import * as React from "react";
|
|
3
|
-
import { NGSShelf } from "./lib";
|
|
4
|
-
import { NGSOfferRow } from "./lib/group-offers-for-ngs-view";
|
|
5
|
-
import { OfferRequest } from "@duffel/api/types";
|
|
6
|
-
export interface NGSTableProps {
|
|
7
|
-
offers: OfferRequest["offers"];
|
|
8
|
-
sliceIndex: number;
|
|
9
|
-
previousSliceKeys: string[];
|
|
10
|
-
onSelect: (offerId: string, sliceKey: string, offer: OfferRequest["offers"][number]) => void;
|
|
11
|
-
sortingFunction: (rows: NGSOfferRow[]) => NGSOfferRow[];
|
|
12
|
-
selectedColumn: NGSShelf | null;
|
|
13
|
-
setSelectedColumn: (shelf: NGSShelf | null) => void;
|
|
14
|
-
}
|
|
15
|
-
export declare const NGSTable: React.FC<NGSTableProps>;
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
declare const OPTIONS: {
|
|
3
|
-
readonly "duration-asc": "Duration Shortest to Longest";
|
|
4
|
-
readonly "duration-desc": "Duration Longest to Shortest";
|
|
5
|
-
readonly "1-asc": "Price (Basic) Low to High";
|
|
6
|
-
readonly "1-desc": "Price (Basic) High to Low";
|
|
7
|
-
readonly "2-asc": "Price (Standard) Low to High";
|
|
8
|
-
readonly "2-desc": "Price (Standard) High to Low";
|
|
9
|
-
readonly "3-asc": "Price (Plus) Low to High";
|
|
10
|
-
readonly "3-desc": "Price (Plus) High to Low";
|
|
11
|
-
readonly "4-asc": "Price (Premium) Low to High";
|
|
12
|
-
readonly "4-desc": "Price (Premium) High to Low";
|
|
13
|
-
readonly "5-asc": "Price (Luxury) Low to High";
|
|
14
|
-
readonly "5-desc": "Price (Luxury) High to Low";
|
|
15
|
-
readonly recommended: "Recommended";
|
|
16
|
-
};
|
|
17
|
-
export type SortOption = keyof typeof OPTIONS;
|
|
18
|
-
interface StopsSelectorProps {
|
|
19
|
-
selected: SortOption;
|
|
20
|
-
onChange: (stopFilter: SortOption) => void;
|
|
21
|
-
}
|
|
22
|
-
export declare const SortingControl: React.FC<StopsSelectorProps>;
|
|
23
|
-
export {};
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import { Filters } from "./lib/filter-results";
|
|
3
|
-
interface StopsSelectorProps {
|
|
4
|
-
selected: Filters["stops"];
|
|
5
|
-
onChange: (stopFilter: Filters["stops"]) => void;
|
|
6
|
-
}
|
|
7
|
-
export declare const StopsSelector: React.FC<StopsSelectorProps>;
|
|
8
|
-
export {};
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import { Filters } from "./lib/filter-results";
|
|
3
|
-
interface TimeRangeSelectorProps {
|
|
4
|
-
selected: Filters["times"];
|
|
5
|
-
onChange: (stopFilter: Filters["times"]) => void;
|
|
6
|
-
}
|
|
7
|
-
export declare const TimeRangeSelector: React.FC<TimeRangeSelectorProps>;
|
|
8
|
-
export {};
|
|
@@ -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>, sliceIndex?: number) => 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"], sliceIndex?: number) => Omit<Offer, "available_services">[][];
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
/// <reference types="@duffel/api" />
|
|
2
|
-
import { OfferRequest, OfferSlice } from "@duffel/api/types";
|
|
3
|
-
export declare function doesSliceHaveMixedCabins(slice: OfferSlice): boolean;
|
|
4
|
-
export declare function doOffersHaveMixedCabin(offer: OfferRequest["offers"] | null, sliceIndex?: number): boolean;
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
/// <reference types="@duffel/api" />
|
|
2
|
-
import { NGSTableProps } from "../NGSTable";
|
|
3
|
-
export interface Filters {
|
|
4
|
-
airlines: Array<{
|
|
5
|
-
iata_code: string;
|
|
6
|
-
name: string;
|
|
7
|
-
}>;
|
|
8
|
-
stops: "direct-only" | "1-stop-at-most" | "2-stops-at-most" | "any";
|
|
9
|
-
times: {
|
|
10
|
-
departure: [number, number];
|
|
11
|
-
arrival: [number, number];
|
|
12
|
-
};
|
|
13
|
-
}
|
|
14
|
-
export declare function filterResults(offers: NGSTableProps["offers"], currentSliceIndex: number, filters: Filters): Omit<import("@duffel/api/types").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<NonNullable<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<NonNullable<OfferSlice["ngs_shelf"]>, ShelfInfo>;
|
|
13
|
-
export declare const SEAT_ICONS_MAP: Record<SeatType, IconName>;
|
|
14
|
-
export {};
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import { NGSOfferRow } from "./group-offers-for-ngs-view";
|
|
2
|
-
type DurationSortDirection = "asc" | "desc";
|
|
3
|
-
export type DurationSort = DurationSortDirection | null;
|
|
4
|
-
export declare const sortNGSRowsByDuration: (rows: NGSOfferRow[], sortDirection: DurationSortDirection) => NGSOfferRow[];
|
|
5
|
-
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 sortNGSRowsByShelfPrice: (rows: NGSOfferRow[], sortShelf: NGSShelf, sortDirection: SortDirection) => NGSOfferRow[];
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
/// <reference types="@duffel/api" />
|
|
2
|
-
import { OfferRequest } from "@duffel/api/types";
|
|
3
|
-
export declare function useFilters(offerRequest: OfferRequest, selectedSliceKeys: string[]): {
|
|
4
|
-
airlinesFilterOptions: {
|
|
5
|
-
iata_code: string;
|
|
6
|
-
name: string;
|
|
7
|
-
}[];
|
|
8
|
-
airlinesFilter: {
|
|
9
|
-
iata_code: string;
|
|
10
|
-
name: string;
|
|
11
|
-
}[];
|
|
12
|
-
timesFilter: {
|
|
13
|
-
departure: [number, number];
|
|
14
|
-
arrival: [number, number];
|
|
15
|
-
};
|
|
16
|
-
stopsFilter: "any" | "direct-only" | "1-stop-at-most" | "2-stops-at-most";
|
|
17
|
-
setAirlinesFilter: import("react").Dispatch<import("react").SetStateAction<{
|
|
18
|
-
iata_code: string;
|
|
19
|
-
name: string;
|
|
20
|
-
}[]>>;
|
|
21
|
-
setTimesFilter: import("react").Dispatch<import("react").SetStateAction<{
|
|
22
|
-
departure: [number, number];
|
|
23
|
-
arrival: [number, number];
|
|
24
|
-
}>>;
|
|
25
|
-
setStopsFilter: import("react").Dispatch<import("react").SetStateAction<"any" | "direct-only" | "1-stop-at-most" | "2-stops-at-most">>;
|
|
26
|
-
clearFilters: () => void;
|
|
27
|
-
filteredOffers: Omit<import("@duffel/api/types").Offer, "available_services">[];
|
|
28
|
-
};
|
|
@@ -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 {};
|