@duffel/components 3.11.0-canary.3 → 3.11.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/components/DuffelCardForm/lib/getIFrameEventListener.d.ts +1 -1
- package/components/DuffelNGSView/lib/deduplicate-mapped-offers-by-fare-brand.d.ts +2 -2
- package/components/DuffelNGSView/lib/useFilters.d.ts +2 -2
- 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/shared/Icon.d.ts +1 -0
- package/custom-elements.js +9 -9
- package/custom-elements.js.map +4 -4
- package/index.d.ts +1 -0
- package/index.js +22 -22
- package/index.js.map +4 -4
- package/lib/colors.d.ts +3 -0
- package/package.json +5 -3
- package/stories/DuffelNGSView.stories.d.ts +1 -0
- package/stories/StaysCancellationTimeline.stories.d.ts +122 -0
- package/tsconfig.tsbuildinfo +1 -1
- /package/components/{DuffelAncillaries → shared}/Card.d.ts +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { DuffelCardFormProps } from "./types";
|
|
2
2
|
type Inputs = {
|
|
3
|
-
setIFrameHeight: (height:
|
|
3
|
+
setIFrameHeight: (height: number) => void;
|
|
4
4
|
postMessageWithStyles: () => void;
|
|
5
5
|
} & Pick<DuffelCardFormProps, "onValidateSuccess" | "onValidateFailure" | "onCreateCardForTemporaryUseSuccess" | "onCreateCardForTemporaryUseFailure" | "onSaveCardSuccess" | "onSaveCardFailure" | "onSecurityPolicyViolation">;
|
|
6
6
|
export declare function getIFrameEventListener(iFrameURL: URL, { postMessageWithStyles, setIFrameHeight, onValidateSuccess, onValidateFailure, onCreateCardForTemporaryUseSuccess, onCreateCardForTemporaryUseFailure, onSaveCardSuccess, onSaveCardFailure, onSecurityPolicyViolation, }: Inputs): (event: MessageEvent) => void;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/// <reference types="@duffel/api" />
|
|
2
2
|
import { Offer, OfferRequest } from "@duffel/api/types";
|
|
3
3
|
import { NGSOfferRow } from "./group-offers-for-ngs-view";
|
|
4
|
-
export declare const deduplicateMappedOffersByFareBrand: (offersMap: Record<string, NGSOfferRow
|
|
4
|
+
export declare const deduplicateMappedOffersByFareBrand: (offersMap: Record<string, NGSOfferRow>, sliceIndex?: number) => Record<string, NGSOfferRow>;
|
|
5
5
|
export declare const getFareBrandNameForOffer: (offer: Omit<Offer, "available_services">, sliceIndex?: number) => string;
|
|
6
6
|
export declare const getCheapestOffer: (offers: OfferRequest["offers"]) => Omit<Offer, "available_services">;
|
|
7
|
-
export declare const groupByFareBrandName: (offers: OfferRequest["offers"]) => Omit<Offer, "available_services">[][];
|
|
7
|
+
export declare const groupByFareBrandName: (offers: OfferRequest["offers"], sliceIndex?: number) => Omit<Offer, "available_services">[][];
|
|
@@ -13,7 +13,7 @@ export declare function useFilters(offerRequest: OfferRequest, selectedSliceKeys
|
|
|
13
13
|
departure: [number, number];
|
|
14
14
|
arrival: [number, number];
|
|
15
15
|
};
|
|
16
|
-
stopsFilter: "direct-only" | "1-stop-at-most" | "2-stops-at-most"
|
|
16
|
+
stopsFilter: "any" | "direct-only" | "1-stop-at-most" | "2-stops-at-most";
|
|
17
17
|
setAirlinesFilter: import("react").Dispatch<import("react").SetStateAction<{
|
|
18
18
|
iata_code: string;
|
|
19
19
|
name: string;
|
|
@@ -22,7 +22,7 @@ export declare function useFilters(offerRequest: OfferRequest, selectedSliceKeys
|
|
|
22
22
|
departure: [number, number];
|
|
23
23
|
arrival: [number, number];
|
|
24
24
|
}>>;
|
|
25
|
-
setStopsFilter: import("react").Dispatch<import("react").SetStateAction<"direct-only" | "1-stop-at-most" | "2-stops-at-most"
|
|
25
|
+
setStopsFilter: import("react").Dispatch<import("react").SetStateAction<"any" | "direct-only" | "1-stop-at-most" | "2-stops-at-most">>;
|
|
26
26
|
clearFilters: () => void;
|
|
27
27
|
filteredOffers: Omit<import("@duffel/api/types").Offer, "available_services">[];
|
|
28
28
|
};
|
|
@@ -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;
|
|
@@ -28,6 +28,7 @@ export declare const ICON_MAP: {
|
|
|
28
28
|
carry_on_bag_inactive: import("react/jsx-runtime").JSX.Element;
|
|
29
29
|
check: import("react/jsx-runtime").JSX.Element;
|
|
30
30
|
check_circle: import("react/jsx-runtime").JSX.Element;
|
|
31
|
+
check_large: import("react/jsx-runtime").JSX.Element;
|
|
31
32
|
check_small: import("react/jsx-runtime").JSX.Element;
|
|
32
33
|
checked_bag: import("react/jsx-runtime").JSX.Element;
|
|
33
34
|
chevron: import("react/jsx-runtime").JSX.Element;
|