@duffel/components 3.12.0 → 3.12.1
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/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 +12 -0
- package/components/DuffelAncillaries/bags/BaggageSelectionController.d.ts +14 -0
- package/components/DuffelAncillaries/bags/BaggageSelectionModal.d.ts +12 -0
- package/components/DuffelAncillaries/bags/BaggageSelectionModalBody.d.ts +12 -0
- package/components/DuffelAncillaries/bags/BaggageSelectionModalBodyPassenger.d.ts +14 -0
- package/components/DuffelAncillaries/bags/BaggageSelectionModalFooter.d.ts +15 -0
- package/components/DuffelAncillaries/bags/BaggageSelectionModalHeader.d.ts +10 -0
- package/components/DuffelAncillaries/bags/IncludedBaggageBanner.d.ts +8 -0
- package/components/DuffelAncillaries/cancel_for_any_reason/CfarSelectionCard.d.ts +11 -0
- package/components/DuffelAncillaries/cancel_for_any_reason/CfarSelectionModal.d.ts +12 -0
- package/components/DuffelAncillaries/cancel_for_any_reason/CfarSelectionModalBody.d.ts +8 -0
- package/components/DuffelAncillaries/cancel_for_any_reason/CfarSelectionModalBodyListItem.d.ts +4 -0
- package/components/DuffelAncillaries/cancel_for_any_reason/CfarSelectionModalFooter.d.ts +12 -0
- package/components/DuffelAncillaries/cancel_for_any_reason/CfarSelectionModalHeader.d.ts +2 -0
- package/components/DuffelAncillaries/seats/Amenity.d.ts +7 -0
- package/components/DuffelAncillaries/seats/DeckSelect.d.ts +15 -0
- package/components/DuffelAncillaries/seats/Element.d.ts +16 -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 +13 -0
- package/components/DuffelAncillaries/seats/Row.d.ts +14 -0
- package/components/DuffelAncillaries/seats/RowSection.d.ts +18 -0
- package/components/DuffelAncillaries/seats/SeatElement.d.ts +14 -0
- package/components/DuffelAncillaries/seats/SeatInfo.d.ts +8 -0
- package/components/DuffelAncillaries/seats/SeatMap.d.ts +13 -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 +15 -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 +11 -0
- package/components/DuffelAncillaries/seats/SeatUnavailable.d.ts +6 -0
- package/components/DuffelCardForm/DuffelCardForm.d.ts +4 -0
- package/components/DuffelCardForm/DuffelCardFormCustomElement.d.ts +34 -0
- package/components/DuffelCardForm/lib/getIFrameEventListener.d.ts +7 -0
- package/components/DuffelCardForm/lib/getIFrameOriginForEnvironment.d.ts +2 -0
- package/components/DuffelCardForm/lib/getIframeURL.d.ts +2 -0
- package/components/DuffelCardForm/lib/getPathnameForIntent.d.ts +2 -0
- package/components/DuffelCardForm/lib/getTokenFromClientKey.d.ts +1 -0
- package/components/DuffelCardForm/lib/postMessageToCreateCardForTemporaryUse.d.ts +1 -0
- package/components/DuffelCardForm/lib/postMessageToSaveCard.d.ts +1 -0
- package/components/DuffelCardForm/lib/postMessageWithStyles.d.ts +2 -0
- package/components/DuffelCardForm/lib/types.d.ts +154 -0
- package/components/DuffelCardForm/lib/useDuffelCardFormActions.d.ts +24 -0
- package/components/DuffelNGSView/AirlineSelector.d.ts +10 -0
- package/components/DuffelNGSView/DuffelNGSView.d.ts +14 -0
- package/components/DuffelNGSView/FilterControl.d.ts +20 -0
- package/components/DuffelNGSView/FilterControls.d.ts +13 -0
- package/components/DuffelNGSView/NGSShelfInfoCard.d.ts +7 -0
- package/components/DuffelNGSView/NGSSliceFareCard.d.ts +10 -0
- package/components/DuffelNGSView/NGSTable.d.ts +15 -0
- package/components/DuffelNGSView/SliceSummary.d.ts +7 -0
- package/components/DuffelNGSView/SortingControl.d.ts +23 -0
- package/components/DuffelNGSView/StopsSelector.d.ts +8 -0
- package/components/DuffelNGSView/TimeRangeSelector.d.ts +8 -0
- package/components/DuffelNGSView/lib/deduplicate-mapped-offers-by-fare-brand.d.ts +7 -0
- package/components/DuffelNGSView/lib/does-slice-have-mixed-cabins.d.ts +4 -0
- package/components/DuffelNGSView/lib/filter-results.d.ts +14 -0
- package/components/DuffelNGSView/lib/get-initial-filter-values.d.ts +4 -0
- package/components/DuffelNGSView/lib/get-max-baggages-for-offer-slice.d.ts +8 -0
- package/components/DuffelNGSView/lib/getAirlines.d.ts +4 -0
- package/components/DuffelNGSView/lib/group-offers-for-ngs-view.d.ts +6 -0
- package/components/DuffelNGSView/lib/index.d.ts +14 -0
- package/components/DuffelNGSView/lib/sort-ngs-rows-by-duration.d.ts +5 -0
- package/components/DuffelNGSView/lib/sort-ngs-rows-by-recommended.d.ts +2 -0
- package/components/DuffelNGSView/lib/sort-ngs-rows-by-shelf-price.d.ts +6 -0
- package/components/DuffelNGSView/lib/useFilters.d.ts +28 -0
- package/components/DuffelPayments/DuffelPayments.d.ts +11 -0
- package/components/DuffelPayments/DuffelPaymentsCustomElement.d.ts +13 -0
- package/components/MapboxPlacesLookup/MapboxPlacesLookup.d.ts +12 -0
- package/components/MapboxPlacesLookup/MapboxPlacesLookupCustomElement.d.ts +13 -0
- package/components/MapboxPlacesLookup/lib/getPlacesFromMapboxClient.d.ts +7 -0
- package/components/OfferSlice/OfferSlice.d.ts +7 -0
- package/components/OfferSlice/OfferSliceConditions.d.ts +7 -0
- package/components/OfferSlice/OfferSliceDetailItem.d.ts +7 -0
- package/components/OfferSlice/OfferSliceDetailLayoverItem.d.ts +8 -0
- package/components/OfferSlice/OfferSliceDetailTravelItem.d.ts +9 -0
- package/components/OfferSlice/lib/getHighlightStyles.d.ts +7 -0
- package/components/OfferSliceModal/OfferSliceModal.d.ts +7 -0
- package/components/PlacesLookup/PlacesLookup.d.ts +20 -0
- package/components/Stays/StaysAmenities.d.ts +9 -0
- package/components/Stays/StaysAmenitiesCustomElement.d.ts +12 -0
- package/components/Stays/StaysCancellationTimeline/Policy.d.ts +8 -0
- package/components/Stays/StaysCancellationTimeline/StaysCancellationTimeline.d.ts +12 -0
- package/components/Stays/StaysCancellationTimeline/StaysCancellationTimelineDeposit.d.ts +12 -0
- package/components/Stays/StaysCancellationTimeline/StaysCancellationTimelineGuarantee.d.ts +12 -0
- package/components/Stays/StaysCancellationTimeline/StaysCancellationTimelinePayNow.d.ts +12 -0
- package/components/Stays/StaysCancellationTimeline/TimelineItem.d.ts +15 -0
- package/components/Stays/StaysCancellationTimeline/lib/isTimezoneDate.d.ts +4 -0
- package/components/Stays/StaysCancellationTimeline/lib/renderTimelineDateTime.d.ts +1 -0
- package/components/Stays/StaysRating.d.ts +6 -0
- package/components/Stays/StaysRatingCustomElement.d.ts +14 -0
- package/components/Stays/StaysRoomRateCard.d.ts +13 -0
- package/components/Stays/StaysRoomRateCardCustomElement.d.ts +14 -0
- package/components/Stays/StaysSummary.d.ts +12 -0
- package/components/Stays/StaysSummaryCustomElement.d.ts +12 -0
- package/components/Stays/lib/getRateLabel.d.ts +2 -0
- package/components/Stays/lib/types.d.ts +29 -0
- package/components/shared/AirlineLogo.d.ts +8 -0
- package/components/shared/AnimatedLoaderEllipsis.d.ts +2 -0
- package/components/shared/Button.d.ts +23 -0
- package/components/shared/Card.d.ts +14 -0
- package/components/shared/ErrorBoundary.d.ts +13 -0
- package/components/shared/FetchOfferErrorState.d.ts +5 -0
- package/components/shared/HSpace.d.ts +28 -0
- package/components/shared/Icon.d.ts +98 -0
- package/components/shared/IconButton.d.ts +16 -0
- package/components/shared/Modal.d.ts +14 -0
- package/components/shared/NonIdealState.d.ts +4 -0
- package/components/shared/RadioButton.d.ts +7 -0
- package/components/shared/SliceCarriersTitle.d.ts +8 -0
- package/components/shared/Stamp.d.ts +7 -0
- package/components/shared/Tabs.d.ts +16 -0
- package/components/shared/VSpace.d.ts +14 -0
- package/components/shared/WithComponentStyles.d.ts +7 -0
- package/custom-elements.d.ts +12 -0
- package/custom-elements.js +70 -0
- package/custom-elements.js.map +7 -0
- package/fixtures/offer-requests/orq_duplicates.d.ts +2 -0
- package/fixtures/passengers/mock_passengers.d.ts +4 -0
- package/functions/createThreeDSecureSession/client.d.ts +43 -0
- package/functions/createThreeDSecureSession/createThreeDSecureSession.d.ts +25 -0
- package/functions/createThreeDSecureSession/initEvervault.d.ts +1 -0
- package/functions/createThreeDSecureSession/loadEvervaultScript.d.ts +1 -0
- package/functions/hasService.d.ts +3 -0
- package/functions.d.ts +10 -0
- package/index.d.ts +19 -0
- package/index.js +55 -0
- package/index.js.map +7 -0
- package/lib/captureErrorInSentry.d.ts +1 -0
- package/lib/colors.d.ts +31 -0
- package/lib/compileCreateOrderPayload.d.ts +13 -0
- package/lib/convertDurationToString.d.ts +1 -0
- package/lib/createPriceFormatters.d.ts +12 -0
- package/lib/fetchFromDuffelAPI.d.ts +8 -0
- package/lib/fetchFromFixtures.d.ts +3 -0
- package/lib/formatAvailableServices.d.ts +12 -0
- package/lib/formatDate.d.ts +2 -0
- package/lib/formatSeatMaps.d.ts +4 -0
- package/lib/getAirlinesText.d.ts +2 -0
- package/lib/getBaggageServiceDescription.d.ts +2 -0
- package/lib/getCabinsForSegmentAndDeck.d.ts +3 -0
- package/lib/getCarriers.d.ts +6 -0
- package/lib/getCurrencyForSeatMaps.d.ts +10 -0
- package/lib/getCurrencyForServices.d.ts +11 -0
- package/lib/getDateObject.d.ts +10 -0
- package/lib/getDateString.d.ts +73 -0
- package/lib/getDayDiff.d.ts +5 -0
- package/lib/getDurationString.d.ts +1 -0
- package/lib/getFareBrandName.d.ts +2 -0
- package/lib/getFirstSeatElementMatchingCriteria.d.ts +4 -0
- package/lib/getLayoverOriginDestinationKey.d.ts +1 -0
- package/lib/getPassengerBySegmentList.d.ts +7 -0
- package/lib/getPassengerInitials.d.ts +1 -0
- package/lib/getPassengerMapById.d.ts +4 -0
- package/lib/getPassengerName.d.ts +2 -0
- package/lib/getRowNumber.d.ts +2 -0
- package/lib/getSegmentDates.d.ts +5 -0
- package/lib/getSegmentFlightNumber.d.ts +2 -0
- package/lib/getSegmentList.d.ts +3 -0
- package/lib/getServicePriceMapById.d.ts +4 -0
- package/lib/getSliceDetails.d.ts +3 -0
- package/lib/getSymbols.d.ts +2 -0
- package/lib/getTimeString.d.ts +1 -0
- package/lib/getTotalAmountForServices.d.ts +4 -0
- package/lib/getTotalQuantity.d.ts +2 -0
- package/lib/getTravelItem.d.ts +3 -0
- package/lib/hasAvailableSeatService.d.ts +3 -0
- package/lib/hasBaggageServiceOfSameMetadataTypeAlreadyBeenSelected.d.ts +4 -0
- package/lib/hasHighLuminance.d.ts +1 -0
- package/lib/hasService.d.ts +2 -0
- package/lib/hasWings.d.ts +2 -0
- package/lib/isAmenityElement.d.ts +3 -0
- package/lib/isBaggageService.d.ts +3 -0
- package/lib/isCancelForAnyReasonService.d.ts +3 -0
- package/lib/isFixtureOfferId.d.ts +2 -0
- package/lib/isISO8601Duration.d.ts +2 -0
- package/lib/isPayloadComplete.d.ts +3 -0
- package/lib/isSeatElement.d.ts +3 -0
- package/lib/isValidDateString.d.ts +6 -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 +3 -0
- package/lib/retrieveOfferFromDuffelAPI.d.ts +1 -0
- package/lib/retrieveSeatMaps.d.ts +3 -0
- package/lib/retrieveSeatMapsFromDuffelAPI.d.ts +1 -0
- package/lib/setBodyScrollability.d.ts +1 -0
- package/lib/toUTCDate.d.ts +1 -0
- package/lib/validateProps.d.ts +7 -0
- package/lib/withPlural.d.ts +1 -0
- package/package.json +1 -1
- package/stories/AirlineLogo.stories.d.ts +3 -0
- package/stories/AirlineSelector.stories.d.ts +3 -0
- package/stories/BaggageSelectionModalHeader.stories.d.ts +6 -0
- package/stories/Button.stories.d.ts +15 -0
- package/stories/DuffelAncillaries.stories.d.ts +24 -0
- package/stories/DuffelCardForm.stories.d.ts +7 -0
- package/stories/DuffelNGSView.stories.d.ts +8 -0
- package/stories/DuffelPayments.stories.d.ts +7 -0
- package/stories/Icon.stories.d.ts +3 -0
- package/stories/IconButton.stories.d.ts +8 -0
- package/stories/MapboxPlacesLookup.stories.d.ts +5 -0
- package/stories/NGSShelfInfoCard.stories.d.ts +3 -0
- package/stories/NGSSliceFareCard.stories.d.ts +3 -0
- package/stories/OfferSlice.stories.d.ts +5 -0
- package/stories/OfferSliceModal.stories.d.ts +6 -0
- package/stories/PlacesLookup.stories.d.ts +3 -0
- package/stories/SeatMap.stories.d.ts +4 -0
- package/stories/SliceCarriersTitle.stories.d.ts +10 -0
- package/stories/SliceSummary.stories.d.ts +5 -0
- package/stories/StaysAmenities.stories.d.ts +10 -0
- package/stories/StaysCancellationTimeline.stories.d.ts +122 -0
- package/stories/StaysRating.stories.d.ts +16 -0
- package/stories/StaysRoomRateCard.stories.d.ts +141 -0
- package/stories/StaysSummary.stories.d.ts +47 -0
- package/tests/components/DuffelAncillaries.test.d.ts +1 -0
- package/tests/functions/createThreeDSecureSession.test.d.ts +1 -0
- package/tests/lib/convertDurationToString.test.d.ts +1 -0
- package/tests/lib/createPriceFormatters.test.d.ts +1 -0
- package/tests/lib/formatAvailableServices.test.d.ts +1 -0
- package/tests/lib/formatSeatMaps.test.d.ts +1 -0
- package/tests/lib/getAirlines.test.d.ts +1 -0
- package/tests/lib/getAirlinesText.test.d.ts +1 -0
- package/tests/lib/getCarriers.test.d.ts +1 -0
- package/tests/lib/getCurrencyForServices.test.d.ts +1 -0
- package/tests/lib/getDateObject.test.d.ts +1 -0
- package/tests/lib/getDateString.spec.d.ts +1 -0
- package/tests/lib/getDayDiff.test.d.ts +1 -0
- package/tests/lib/getDurationString.test.d.ts +1 -0
- package/tests/lib/getFareBrandName.test.d.ts +1 -0
- package/tests/lib/getLayoverOriginDestinationKey.test.d.ts +1 -0
- package/tests/lib/getRateLabel.spec.d.ts +1 -0
- package/tests/lib/getSegmentDates.d.ts +1 -0
- package/tests/lib/getSegmentDates.test.d.ts +1 -0
- package/tests/lib/getSegmentFlightNumber.test.d.ts +1 -0
- package/tests/lib/getSliceDetails.test.d.ts +1 -0
- package/tests/lib/getTimeString.test.d.ts +1 -0
- package/tests/lib/getTravelItem.test.d.ts +1 -0
- package/tests/lib/groupOffersForNGSView.test.d.ts +1 -0
- package/tests/lib/hasAvailableSeatService.test.d.ts +1 -0
- package/tests/lib/hasBaggageServiceOfSameMetadataTypeAlreadyBeenSelected.test.d.ts +1 -0
- package/tests/lib/isValidDateString.test.d.ts +1 -0
- package/tests/lib/logging.test.d.ts +1 -0
- package/tests/lib/moneyStringFormatter.test.d.ts +1 -0
- package/tests/lib/toUTCDate.test.d.ts +1 -0
- package/tests/lib/validateProps.test.d.ts +5 -0
- package/tsconfig.tsbuildinfo +1 -0
- package/types/CurrencyConversion.d.ts +10 -0
- package/types/DuffelAncillariesProps.d.ts +127 -0
- package/types/TravelDetails.d.ts +77 -0
- package/types/index.d.ts +4 -0
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/// <reference types="@duffel/api" />
|
|
2
|
+
import * as React from "react";
|
|
3
|
+
import { StaysRate, StaysRateCancellationTimeline } from "@duffel/api/types";
|
|
4
|
+
export interface StaysCancellationTimelineProps {
|
|
5
|
+
paymentType?: StaysRate["payment_type"];
|
|
6
|
+
cancellationTimeline: StaysRateCancellationTimeline[];
|
|
7
|
+
totalAmount: string;
|
|
8
|
+
bookingDate: string;
|
|
9
|
+
checkInDate: string;
|
|
10
|
+
checkInAfterTime?: string;
|
|
11
|
+
}
|
|
12
|
+
export declare const StaysCancellationTimeline: React.FC<StaysCancellationTimelineProps>;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/// <reference types="@duffel/api" />
|
|
2
|
+
import * as React from "react";
|
|
3
|
+
import { StaysRateCancellationTimeline } from "@duffel/api/types";
|
|
4
|
+
interface StaysCancellationTimelineDepositProps {
|
|
5
|
+
cancellationTimeline: StaysRateCancellationTimeline[];
|
|
6
|
+
totalAmount: string;
|
|
7
|
+
bookingDate: string;
|
|
8
|
+
checkInDate: string;
|
|
9
|
+
checkInAfterTime?: string;
|
|
10
|
+
}
|
|
11
|
+
export declare const StaysCancellationTimelineDeposit: React.FC<StaysCancellationTimelineDepositProps>;
|
|
12
|
+
export {};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/// <reference types="@duffel/api" />
|
|
2
|
+
import * as React from "react";
|
|
3
|
+
import { StaysRateCancellationTimeline } from "@duffel/api/types";
|
|
4
|
+
interface StaysCancellationTimelineGuaranteeProps {
|
|
5
|
+
cancellationTimeline: StaysRateCancellationTimeline[];
|
|
6
|
+
totalAmount: string;
|
|
7
|
+
bookingDate: string;
|
|
8
|
+
checkInDate: string;
|
|
9
|
+
checkInAfterTime?: string;
|
|
10
|
+
}
|
|
11
|
+
export declare const StaysCancellationTimelineGuarantee: React.FC<StaysCancellationTimelineGuaranteeProps>;
|
|
12
|
+
export {};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/// <reference types="@duffel/api" />
|
|
2
|
+
import * as React from "react";
|
|
3
|
+
import { StaysRateCancellationTimeline } from "@duffel/api/types";
|
|
4
|
+
interface StaysCancellationTimelinePayNowProps {
|
|
5
|
+
cancellationTimeline: StaysRateCancellationTimeline[];
|
|
6
|
+
totalAmount: string;
|
|
7
|
+
bookingDate: string;
|
|
8
|
+
checkInDate: string;
|
|
9
|
+
checkInAfterTime?: string;
|
|
10
|
+
}
|
|
11
|
+
export declare const StaysCancellationTimelinePayNow: React.FC<StaysCancellationTimelinePayNowProps>;
|
|
12
|
+
export {};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { Color } from "@lib/colors";
|
|
3
|
+
export interface TimelineItemProps {
|
|
4
|
+
label?: string | React.ReactNode;
|
|
5
|
+
description?: string;
|
|
6
|
+
dot?: boolean;
|
|
7
|
+
dotColor?: Color;
|
|
8
|
+
lineColorLeft?: Color;
|
|
9
|
+
lineColorRight?: Color;
|
|
10
|
+
size?: "extra-small" | "small" | "medium" | "large" | "extra-large";
|
|
11
|
+
tooltip?: string | boolean;
|
|
12
|
+
aboveDot?: React.ReactNode;
|
|
13
|
+
date?: string;
|
|
14
|
+
}
|
|
15
|
+
export declare const TimelineItem: React.ForwardRefExoticComponent<TimelineItemProps & React.RefAttributes<HTMLDivElement>>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const renderTimelineDateTime: (date: string, showTime?: boolean, dateTimeZone?: string) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,14 @@
|
|
|
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 {};
|
|
@@ -0,0 +1,13 @@
|
|
|
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
|
+
hidePaymentMethod?: boolean;
|
|
11
|
+
hideSource?: boolean;
|
|
12
|
+
}
|
|
13
|
+
export declare const StaysRoomRateCard: React.FC<StaysRoomRateCardProps>;
|
|
@@ -0,0 +1,14 @@
|
|
|
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 {};
|
|
@@ -0,0 +1,12 @@
|
|
|
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>>;
|
|
@@ -0,0 +1,12 @@
|
|
|
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 {};
|
|
@@ -0,0 +1,29 @@
|
|
|
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;
|
|
@@ -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,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,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,28 @@
|
|
|
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 {};
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
import { Color } from "@lib/colors";
|
|
2
|
+
import * as React from "react";
|
|
3
|
+
export declare const ICON_MAP: {
|
|
4
|
+
accessible: import("react/jsx-runtime").JSX.Element;
|
|
5
|
+
add: import("react/jsx-runtime").JSX.Element;
|
|
6
|
+
airline_seat_flat: import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
airline_seat_individual_suite: import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
airline_seat_legroom_extra: import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
airline_seat_recline_extra: import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
airline_seat_recline_normal: import("react/jsx-runtime").JSX.Element;
|
|
11
|
+
airline_stops: import("react/jsx-runtime").JSX.Element;
|
|
12
|
+
airplane_ticket: import("react/jsx-runtime").JSX.Element;
|
|
13
|
+
apartment: import("react/jsx-runtime").JSX.Element;
|
|
14
|
+
arrow_downward: import("react/jsx-runtime").JSX.Element;
|
|
15
|
+
arrow_drop_down: import("react/jsx-runtime").JSX.Element;
|
|
16
|
+
arrow_forward: import("react/jsx-runtime").JSX.Element;
|
|
17
|
+
arrow_left: import("react/jsx-runtime").JSX.Element;
|
|
18
|
+
arrow_right: import("react/jsx-runtime").JSX.Element;
|
|
19
|
+
arrow_upward: import("react/jsx-runtime").JSX.Element;
|
|
20
|
+
atm: import("react/jsx-runtime").JSX.Element;
|
|
21
|
+
autorenew: import("react/jsx-runtime").JSX.Element;
|
|
22
|
+
bakery_dining: import("react/jsx-runtime").JSX.Element;
|
|
23
|
+
bassinet: import("react/jsx-runtime").JSX.Element;
|
|
24
|
+
bedroom_parent: import("react/jsx-runtime").JSX.Element;
|
|
25
|
+
brunch_dining: import("react/jsx-runtime").JSX.Element;
|
|
26
|
+
cabin_bag: import("react/jsx-runtime").JSX.Element;
|
|
27
|
+
calendar_month: import("react/jsx-runtime").JSX.Element;
|
|
28
|
+
carry_on_bag_inactive: import("react/jsx-runtime").JSX.Element;
|
|
29
|
+
check: import("react/jsx-runtime").JSX.Element;
|
|
30
|
+
check_circle: import("react/jsx-runtime").JSX.Element;
|
|
31
|
+
check_large: import("react/jsx-runtime").JSX.Element;
|
|
32
|
+
check_small: import("react/jsx-runtime").JSX.Element;
|
|
33
|
+
checked_bag: import("react/jsx-runtime").JSX.Element;
|
|
34
|
+
chevron: import("react/jsx-runtime").JSX.Element;
|
|
35
|
+
child_care: import("react/jsx-runtime").JSX.Element;
|
|
36
|
+
close: import("react/jsx-runtime").JSX.Element;
|
|
37
|
+
closet: import("react/jsx-runtime").JSX.Element;
|
|
38
|
+
concierge: import("react/jsx-runtime").JSX.Element;
|
|
39
|
+
credit_card: import("react/jsx-runtime").JSX.Element;
|
|
40
|
+
currency_exchange: import("react/jsx-runtime").JSX.Element;
|
|
41
|
+
dinner_dining: import("react/jsx-runtime").JSX.Element;
|
|
42
|
+
exit_row: import("react/jsx-runtime").JSX.Element;
|
|
43
|
+
exit_row_right: import("react/jsx-runtime").JSX.Element;
|
|
44
|
+
expand_content: import("react/jsx-runtime").JSX.Element;
|
|
45
|
+
fitness_center: import("react/jsx-runtime").JSX.Element;
|
|
46
|
+
flight: import("react/jsx-runtime").JSX.Element;
|
|
47
|
+
flight_class: import("react/jsx-runtime").JSX.Element;
|
|
48
|
+
flight_landing: import("react/jsx-runtime").JSX.Element;
|
|
49
|
+
flight_takeoff: import("react/jsx-runtime").JSX.Element;
|
|
50
|
+
galley: import("react/jsx-runtime").JSX.Element;
|
|
51
|
+
hearing: import("react/jsx-runtime").JSX.Element;
|
|
52
|
+
image_not_supported: import("react/jsx-runtime").JSX.Element;
|
|
53
|
+
info_outline: import("react/jsx-runtime").JSX.Element;
|
|
54
|
+
laundry: import("react/jsx-runtime").JSX.Element;
|
|
55
|
+
lavatory: import("react/jsx-runtime").JSX.Element;
|
|
56
|
+
lie_flat_seat: import("react/jsx-runtime").JSX.Element;
|
|
57
|
+
local_bar: import("react/jsx-runtime").JSX.Element;
|
|
58
|
+
local_parking: import("react/jsx-runtime").JSX.Element;
|
|
59
|
+
loyalty: import("react/jsx-runtime").JSX.Element;
|
|
60
|
+
luggage: import("react/jsx-runtime").JSX.Element;
|
|
61
|
+
meeting_room: import("react/jsx-runtime").JSX.Element;
|
|
62
|
+
minus: import("react/jsx-runtime").JSX.Element;
|
|
63
|
+
no_airplane: import("react/jsx-runtime").JSX.Element;
|
|
64
|
+
no_bag: import("react/jsx-runtime").JSX.Element;
|
|
65
|
+
no_seat: import("react/jsx-runtime").JSX.Element;
|
|
66
|
+
no_stroller: import("react/jsx-runtime").JSX.Element;
|
|
67
|
+
north_east: import("react/jsx-runtime").JSX.Element;
|
|
68
|
+
pet_supplies: import("react/jsx-runtime").JSX.Element;
|
|
69
|
+
pool: import("react/jsx-runtime").JSX.Element;
|
|
70
|
+
refund: import("react/jsx-runtime").JSX.Element;
|
|
71
|
+
restaurant: import("react/jsx-runtime").JSX.Element;
|
|
72
|
+
room_service: import("react/jsx-runtime").JSX.Element;
|
|
73
|
+
seat: import("react/jsx-runtime").JSX.Element;
|
|
74
|
+
seat_paid_indicator: import("react/jsx-runtime").JSX.Element;
|
|
75
|
+
shield_with_moon: import("react/jsx-runtime").JSX.Element;
|
|
76
|
+
shopfront: import("react/jsx-runtime").JSX.Element;
|
|
77
|
+
shopping_bag: import("react/jsx-runtime").JSX.Element;
|
|
78
|
+
spa: import("react/jsx-runtime").JSX.Element;
|
|
79
|
+
stairs: import("react/jsx-runtime").JSX.Element;
|
|
80
|
+
star: import("react/jsx-runtime").JSX.Element;
|
|
81
|
+
unfold_more: import("react/jsx-runtime").JSX.Element;
|
|
82
|
+
wallet: import("react/jsx-runtime").JSX.Element;
|
|
83
|
+
warning: import("react/jsx-runtime").JSX.Element;
|
|
84
|
+
wifi: import("react/jsx-runtime").JSX.Element;
|
|
85
|
+
};
|
|
86
|
+
export type IconName = keyof typeof ICON_MAP;
|
|
87
|
+
interface IconProps {
|
|
88
|
+
name: IconName;
|
|
89
|
+
className?: string;
|
|
90
|
+
color?: Color;
|
|
91
|
+
size?: number;
|
|
92
|
+
onClick?: (event: React.MouseEvent<SVGSVGElement, MouseEvent>) => void;
|
|
93
|
+
ml?: string;
|
|
94
|
+
viewBox?: string;
|
|
95
|
+
style?: React.CSSProperties;
|
|
96
|
+
}
|
|
97
|
+
export declare const Icon: React.FunctionComponent<IconProps>;
|
|
98
|
+
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,14 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
export interface ModalProps {
|
|
3
|
+
onClose: () => void;
|
|
4
|
+
isOpen: boolean;
|
|
5
|
+
children: React.ReactNode;
|
|
6
|
+
}
|
|
7
|
+
export declare const Modal: React.FC<ModalProps>;
|
|
8
|
+
interface ModalBodyProps {
|
|
9
|
+
tall?: boolean;
|
|
10
|
+
noPadding?: boolean;
|
|
11
|
+
children: React.ReactNode;
|
|
12
|
+
}
|
|
13
|
+
export declare const ModalBody: React.FC<ModalBodyProps>;
|
|
14
|
+
export {};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/// <reference types="@duffel/api" />
|
|
2
|
+
import { OfferSlice, OfferSliceSegment } from "@duffel/api/types";
|
|
3
|
+
import * as React from "react";
|
|
4
|
+
export interface SliceCarriersTitleProps {
|
|
5
|
+
slice: OfferSlice;
|
|
6
|
+
}
|
|
7
|
+
export declare const SliceCarriersTitle: React.FC<SliceCarriersTitleProps>;
|
|
8
|
+
export declare function getSegmentCarriersTitle(segment: OfferSliceSegment): string;
|
|
@@ -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>;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
type DivProps = JSX.IntrinsicElements["div"];
|
|
3
|
+
export interface VSpaceProps 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 | 24;
|
|
12
|
+
}
|
|
13
|
+
export declare const VSpace: React.FC<VSpaceProps>;
|
|
14
|
+
export {};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file is one of the entry points for the library -- `@duffel/components/custom-elements`.
|
|
3
|
+
* If you'd like to expose other custom element functions, please add them here.
|
|
4
|
+
*/
|
|
5
|
+
export { onDuffelAncillariesPayloadReady, renderDuffelAncillariesCustomElement, } from "./components/DuffelAncillaries/DuffelAncillariesCustomElement";
|
|
6
|
+
export { createCardForTemporaryUse, onCreateCardForTemporaryUseFailure, onCreateCardForTemporaryUseSuccess, onSaveCardFailure, onSaveCardSuccess, onSecurityPolicyViolation, renderDuffelCardFormCustomElement, saveCard, } from "./components/DuffelCardForm/DuffelCardFormCustomElement";
|
|
7
|
+
export { onDuffelPaymentsFailedPayment, onDuffelPaymentsSuccessfulPayment, renderDuffelPaymentsCustomElement, } from "./components/DuffelPayments/DuffelPaymentsCustomElement";
|
|
8
|
+
export { onMapboxPlacesLookupPlaceSelected, renderMapboxPlacesLookupCustomElement, } from "./components/MapboxPlacesLookup/MapboxPlacesLookupCustomElement";
|
|
9
|
+
export { renderDuffelStaysAmenitiesCustomElement } from "./components/Stays/StaysAmenitiesCustomElement";
|
|
10
|
+
export { renderDuffelStaysRatingCustomElement } from "./components/Stays/StaysRatingCustomElement";
|
|
11
|
+
export { renderDuffelStaysRoomRateCardCustomElement } from "./components/Stays/StaysRoomRateCardCustomElement";
|
|
12
|
+
export { renderDuffelStaysSummaryCustomElement } from "./components/Stays/StaysSummaryCustomElement";
|