@duffel/components 3.1.2 → 3.1.3
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/.github/ISSUE_TEMPLATE/bug_report.md +29 -0
- package/.tool-versions +1 -1
- package/README.md +4 -0
- package/package.json +1 -1
- package/react-dist/index.js +18 -47
- package/src/examples/next/README.md +28 -0
- package/src/examples/next/next-env.d.ts +5 -0
- package/src/examples/next/next.config.js +4 -0
- package/src/examples/next/package.json +24 -0
- package/src/examples/next/src/app/DuffelComponents.tsx +40 -0
- package/src/examples/next/src/app/layout.tsx +18 -0
- package/src/examples/next/src/app/page.tsx +9 -0
- package/src/examples/next/tsconfig.json +27 -0
- package/src/examples/react-app/src/index.tsx +1 -1
- package/src/index.ts +0 -1
- package/react-dist/components/DuffelAncillaries/Card.d.ts +0 -14
- package/react-dist/components/DuffelAncillaries/Counter.d.ts +0 -10
- package/react-dist/components/DuffelAncillaries/DuffelAncillaries.d.ts +0 -3
- package/react-dist/components/DuffelAncillaries/DuffelAncillariesCustomElement.d.ts +0 -13
- package/react-dist/components/DuffelAncillaries/bags/BaggageSelectionCard.d.ts +0 -11
- package/react-dist/components/DuffelAncillaries/bags/BaggageSelectionController.d.ts +0 -13
- package/react-dist/components/DuffelAncillaries/bags/BaggageSelectionModal.d.ts +0 -11
- package/react-dist/components/DuffelAncillaries/bags/BaggageSelectionModalBody.d.ts +0 -11
- package/react-dist/components/DuffelAncillaries/bags/BaggageSelectionModalBodyPassenger.d.ts +0 -13
- package/react-dist/components/DuffelAncillaries/bags/BaggageSelectionModalFooter.d.ts +0 -14
- package/react-dist/components/DuffelAncillaries/bags/BaggageSelectionModalHeader.d.ts +0 -9
- package/react-dist/components/DuffelAncillaries/bags/IncludedBaggageBanner.d.ts +0 -7
- package/react-dist/components/DuffelAncillaries/cancel_for_any_reason/CfarSelectionCard.d.ts +0 -10
- package/react-dist/components/DuffelAncillaries/cancel_for_any_reason/CfarSelectionModal.d.ts +0 -11
- package/react-dist/components/DuffelAncillaries/cancel_for_any_reason/CfarSelectionModalBody.d.ts +0 -7
- package/react-dist/components/DuffelAncillaries/cancel_for_any_reason/CfarSelectionModalBodyListItem.d.ts +0 -4
- package/react-dist/components/DuffelAncillaries/cancel_for_any_reason/CfarSelectionModalFooter.d.ts +0 -11
- package/react-dist/components/DuffelAncillaries/cancel_for_any_reason/CfarSelectionModalHeader.d.ts +0 -2
- package/react-dist/components/DuffelAncillaries/seats/Amenity.d.ts +0 -6
- package/react-dist/components/DuffelAncillaries/seats/DeckSelect.d.ts +0 -15
- package/react-dist/components/DuffelAncillaries/seats/Element.d.ts +0 -15
- package/react-dist/components/DuffelAncillaries/seats/EmptyElement.d.ts +0 -2
- package/react-dist/components/DuffelAncillaries/seats/ExitElement.d.ts +0 -6
- package/react-dist/components/DuffelAncillaries/seats/Legend.d.ts +0 -12
- package/react-dist/components/DuffelAncillaries/seats/Row.d.ts +0 -13
- package/react-dist/components/DuffelAncillaries/seats/RowSection.d.ts +0 -17
- package/react-dist/components/DuffelAncillaries/seats/SeatElement.d.ts +0 -13
- package/react-dist/components/DuffelAncillaries/seats/SeatInfo.d.ts +0 -7
- package/react-dist/components/DuffelAncillaries/seats/SeatMap.d.ts +0 -12
- package/react-dist/components/DuffelAncillaries/seats/SeatMapUnavailable.d.ts +0 -2
- package/react-dist/components/DuffelAncillaries/seats/SeatSelectionCard.d.ts +0 -13
- package/react-dist/components/DuffelAncillaries/seats/SeatSelectionModal.d.ts +0 -13
- package/react-dist/components/DuffelAncillaries/seats/SeatSelectionModalBody.d.ts +0 -4
- package/react-dist/components/DuffelAncillaries/seats/SeatSelectionModalFooter.d.ts +0 -16
- package/react-dist/components/DuffelAncillaries/seats/SeatSelectionModalHeader.d.ts +0 -10
- package/react-dist/components/DuffelAncillaries/seats/SeatUnavailable.d.ts +0 -5
- package/react-dist/components/DuffelPayments/DuffelPayments.d.ts +0 -11
- package/react-dist/components/DuffelPayments/DuffelPaymentsCustomElement.d.ts +0 -14
- package/react-dist/components/PlacesLookup/PlacesLookup.d.ts +0 -20
- package/react-dist/components/shared/AnimatedLoaderEllipsis.d.ts +0 -2
- package/react-dist/components/shared/Button.d.ts +0 -23
- package/react-dist/components/shared/ErrorBoundary.d.ts +0 -13
- package/react-dist/components/shared/FetchOfferErrorState.d.ts +0 -5
- package/react-dist/components/shared/Icon.d.ts +0 -46
- package/react-dist/components/shared/IconButton.d.ts +0 -16
- package/react-dist/components/shared/Modal.d.ts +0 -11
- package/react-dist/components/shared/NonIdealState.d.ts +0 -4
- package/react-dist/components/shared/Stamp.d.ts +0 -7
- package/react-dist/components/shared/Tabs.d.ts +0 -16
- package/react-dist/custom-elements.d.ts +0 -6
- package/react-dist/custom-elements.js +0 -37
- package/react-dist/custom-elements.js.map +0 -7
- package/react-dist/index.d.ts +0 -8
- package/react-dist/index.js.map +0 -7
- package/react-dist/lib/captureErrorInSentry.d.ts +0 -1
- package/react-dist/lib/compileCreateOrderPayload.d.ts +0 -14
- package/react-dist/lib/createPriceFormatters.d.ts +0 -12
- package/react-dist/lib/fetchFromDuffelAPI.d.ts +0 -8
- package/react-dist/lib/fetchFromFixtures.d.ts +0 -4
- package/react-dist/lib/formatAvailableServices.d.ts +0 -12
- package/react-dist/lib/formatDate.d.ts +0 -2
- package/react-dist/lib/formatSeatMaps.d.ts +0 -4
- package/react-dist/lib/getBaggageServiceDescription.d.ts +0 -2
- package/react-dist/lib/getCabinsForSegmentAndDeck.d.ts +0 -2
- package/react-dist/lib/getCurrencyForSeatMaps.d.ts +0 -10
- package/react-dist/lib/getCurrencyForServices.d.ts +0 -11
- package/react-dist/lib/getFirstSeatElementMatchingCriteria.d.ts +0 -3
- package/react-dist/lib/getPassengerBySegmentList.d.ts +0 -6
- package/react-dist/lib/getPassengerInitials.d.ts +0 -1
- package/react-dist/lib/getPassengerMapById.d.ts +0 -3
- package/react-dist/lib/getPassengerName.d.ts +0 -3
- package/react-dist/lib/getRowNumber.d.ts +0 -2
- package/react-dist/lib/getSegmentList.d.ts +0 -2
- package/react-dist/lib/getServicePriceMapById.d.ts +0 -3
- package/react-dist/lib/getSymbols.d.ts +0 -2
- package/react-dist/lib/getTotalAmountForServices.d.ts +0 -6
- package/react-dist/lib/getTotalQuantity.d.ts +0 -2
- package/react-dist/lib/hasHighLuminance.d.ts +0 -1
- package/react-dist/lib/hasService.d.ts +0 -2
- package/react-dist/lib/hasServiceOfSameMetadataTypeAlreadyBeenSelected.d.ts +0 -3
- package/react-dist/lib/hasWings.d.ts +0 -2
- package/react-dist/lib/isBaggageService.d.ts +0 -2
- package/react-dist/lib/isCancelForAnyReasonService.d.ts +0 -2
- package/react-dist/lib/isFixtureOfferId.d.ts +0 -2
- package/react-dist/lib/isPayloadComplete.d.ts +0 -2
- package/react-dist/lib/isSeatElement.d.ts +0 -2
- package/react-dist/lib/logging.d.ts +0 -46
- package/react-dist/lib/moneyStringFormatter.d.ts +0 -8
- package/react-dist/lib/offerIsExpired.d.ts +0 -2
- package/react-dist/lib/retrieveOffer.d.ts +0 -2
- package/react-dist/lib/retrieveOfferFromDuffelAPI.d.ts +0 -1
- package/react-dist/lib/retrieveSeatMaps.d.ts +0 -2
- package/react-dist/lib/retrieveSeatMapsFromDuffelAPI.d.ts +0 -1
- package/react-dist/lib/setBodyScrollability.d.ts +0 -1
- package/react-dist/lib/validateProps.d.ts +0 -7
- package/react-dist/lib/withPlural.d.ts +0 -1
- package/react-dist/types/Aircraft.d.ts +0 -14
- package/react-dist/types/Airline.d.ts +0 -14
- package/react-dist/types/Airport.d.ts +0 -44
- package/react-dist/types/City.d.ts +0 -18
- package/react-dist/types/CreateOrderPayload.d.ts +0 -72
- package/react-dist/types/CurrencyConversion.d.ts +0 -10
- package/react-dist/types/DuffelAncillariesProps.d.ts +0 -70
- package/react-dist/types/Offer.d.ts +0 -711
- package/react-dist/types/Order.d.ts +0 -8
- package/react-dist/types/Place.d.ts +0 -8
- package/react-dist/types/SeatMap.d.ts +0 -190
- package/react-dist/types/index.d.ts +0 -11
- package/src/examples/just-typescript/yarn.lock +0 -154
- package/src/examples/payments-just-typescript/yarn.lock +0 -154
- package/src/examples/react-app/yarn.lock +0 -219
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
This is a [Next.js](https://nextjs.org/) project bootstrapped with [`create-next-app`](https://github.com/vercel/next.js/tree/canary/packages/create-next-app).
|
|
2
|
+
|
|
3
|
+
## Getting Started
|
|
4
|
+
|
|
5
|
+
First, run the development server:
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
npm run dev
|
|
9
|
+
# or
|
|
10
|
+
yarn dev
|
|
11
|
+
# or
|
|
12
|
+
pnpm dev
|
|
13
|
+
# or
|
|
14
|
+
bun dev
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
Open [http://localhost:3000](http://localhost:3000) with your browser to see the result.
|
|
18
|
+
|
|
19
|
+
You can start editing the page by modifying `app/page.tsx`. The page auto-updates as you edit the file.
|
|
20
|
+
|
|
21
|
+
## Learn More
|
|
22
|
+
|
|
23
|
+
To learn more about Next.js, take a look at the following resources:
|
|
24
|
+
|
|
25
|
+
- [Next.js Documentation](https://nextjs.org/docs) - learn about Next.js features and API.
|
|
26
|
+
- [Learn Next.js](https://nextjs.org/learn) - an interactive Next.js tutorial.
|
|
27
|
+
|
|
28
|
+
You can check out [the Next.js GitHub repository](https://github.com/vercel/next.js/) - your feedback and contributions are welcome!
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "my-app",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"private": true,
|
|
5
|
+
"scripts": {
|
|
6
|
+
"dev": "next dev",
|
|
7
|
+
"build": "next build",
|
|
8
|
+
"start": "next start",
|
|
9
|
+
"lint": "next lint"
|
|
10
|
+
},
|
|
11
|
+
"dependencies": {
|
|
12
|
+
"duffel-components": "../../../../duffel-components/react-dist",
|
|
13
|
+
"next": "13.5.6",
|
|
14
|
+
"react": "^18",
|
|
15
|
+
"react-dom": "^18"
|
|
16
|
+
},
|
|
17
|
+
"devDependencies": {
|
|
18
|
+
"@types/node": "~18",
|
|
19
|
+
"@types/react": "^18",
|
|
20
|
+
"@types/react-dom": "^18",
|
|
21
|
+
"next-transpile-modules": "^10.0.1",
|
|
22
|
+
"typescript": "^5"
|
|
23
|
+
}
|
|
24
|
+
}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
import { DuffelAncillaries, DuffelPayments } from "duffel-components";
|
|
4
|
+
|
|
5
|
+
export const DuffelComponents = () => (
|
|
6
|
+
<>
|
|
7
|
+
<DuffelAncillaries
|
|
8
|
+
debug={true}
|
|
9
|
+
offer_id="fixture_off_1"
|
|
10
|
+
services={["bags", "seats"]}
|
|
11
|
+
passengers={[
|
|
12
|
+
{
|
|
13
|
+
id: "pas_0000AUde3KY1SptM6ABSfU",
|
|
14
|
+
given_name: "Mae",
|
|
15
|
+
family_name: "Jemison",
|
|
16
|
+
gender: "F",
|
|
17
|
+
title: "dr",
|
|
18
|
+
born_on: "1956-10-17",
|
|
19
|
+
email: "m.jemison@nasa.gov",
|
|
20
|
+
phone_number: "+16177562626",
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
id: "pas_0000AUde3KY1SptM6ABSfT",
|
|
24
|
+
given_name: "Dorothy",
|
|
25
|
+
family_name: "Green",
|
|
26
|
+
gender: "F",
|
|
27
|
+
title: "dr",
|
|
28
|
+
born_on: "1942-10-17",
|
|
29
|
+
},
|
|
30
|
+
]}
|
|
31
|
+
onPayloadReady={console.log}
|
|
32
|
+
/>
|
|
33
|
+
|
|
34
|
+
<DuffelPayments
|
|
35
|
+
paymentIntentClientToken="eyJjbGllbnRfc2VjcmV0IjoicGlfM0psczlVQWcySmhFeTh2WTBSTm1MU0JkX3NlY3JldF9QUW9yZXNuU3laeWJadGRiejZwNzBCbUdPIiwicHVibGlzaGFibGVfa2V5IjoicGtfdGVzdF9EQUJLY0E2Vzh6OTc0cTdPSWY0YmJ2MVQwMEpwRmMyOUpWIn0="
|
|
36
|
+
onSuccessfulPayment={console.log}
|
|
37
|
+
onFailedPayment={console.log}
|
|
38
|
+
/>
|
|
39
|
+
</>
|
|
40
|
+
);
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { Metadata } from "next";
|
|
2
|
+
|
|
3
|
+
export const metadata: Metadata = {
|
|
4
|
+
title: "Create Next App",
|
|
5
|
+
description: "Generated by create next app",
|
|
6
|
+
};
|
|
7
|
+
|
|
8
|
+
export default function RootLayout({
|
|
9
|
+
children,
|
|
10
|
+
}: {
|
|
11
|
+
children: React.ReactNode;
|
|
12
|
+
}) {
|
|
13
|
+
return (
|
|
14
|
+
<html lang="en">
|
|
15
|
+
<body>{children}</body>
|
|
16
|
+
</html>
|
|
17
|
+
);
|
|
18
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
{
|
|
2
|
+
"compilerOptions": {
|
|
3
|
+
"target": "es5",
|
|
4
|
+
"lib": ["dom", "dom.iterable", "esnext"],
|
|
5
|
+
"allowJs": true,
|
|
6
|
+
"skipLibCheck": true,
|
|
7
|
+
"strict": true,
|
|
8
|
+
"noEmit": true,
|
|
9
|
+
"esModuleInterop": true,
|
|
10
|
+
"module": "esnext",
|
|
11
|
+
"moduleResolution": "node",
|
|
12
|
+
"resolveJsonModule": true,
|
|
13
|
+
"isolatedModules": true,
|
|
14
|
+
"jsx": "preserve",
|
|
15
|
+
"incremental": true,
|
|
16
|
+
"plugins": [
|
|
17
|
+
{
|
|
18
|
+
"name": "next"
|
|
19
|
+
}
|
|
20
|
+
],
|
|
21
|
+
"paths": {
|
|
22
|
+
"@/*": ["./src/*"]
|
|
23
|
+
}
|
|
24
|
+
},
|
|
25
|
+
"include": ["next-env.d.ts", "**/*.ts", "**/*.tsx", ".next/types/**/*.ts"],
|
|
26
|
+
"exclude": ["node_modules"]
|
|
27
|
+
}
|
package/src/index.ts
CHANGED
|
@@ -1,14 +0,0 @@
|
|
|
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>;
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
import { DuffelAncillariesPropsWithClientKeyAndOfferId, DuffelAncillariesPropsWithOfferIdForFixture, DuffelAncillariesPropsWithOffersAndSeatMaps, DuffelAncillariesPropWithOfferAndClientKey, OnPayloadReady } from "../../types/DuffelAncillariesProps";
|
|
3
|
-
declare global {
|
|
4
|
-
namespace JSX {
|
|
5
|
-
interface IntrinsicElements {
|
|
6
|
-
"duffel-ancillaries": React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>;
|
|
7
|
-
}
|
|
8
|
-
}
|
|
9
|
-
}
|
|
10
|
-
type DuffelAncillariesCustomElementRenderArguments = Omit<DuffelAncillariesPropsWithOfferIdForFixture, "onPayloadReady"> | Omit<DuffelAncillariesPropsWithClientKeyAndOfferId, "onPayloadReady"> | Omit<DuffelAncillariesPropWithOfferAndClientKey, "onPayloadReady"> | Omit<DuffelAncillariesPropsWithOffersAndSeatMaps, "onPayloadReady">;
|
|
11
|
-
export declare function renderDuffelAncillariesCustomElement(props: DuffelAncillariesCustomElementRenderArguments): void;
|
|
12
|
-
export declare function onDuffelAncillariesPayloadReady(onPayloadReady: OnPayloadReady): void;
|
|
13
|
-
export {};
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import { CreateOrderPayload, CreateOrderPayloadServices } from "../../../types/CreateOrderPayload";
|
|
3
|
-
import { Offer } from "../../../types/Offer";
|
|
4
|
-
export interface BaggageSelectionCardProps {
|
|
5
|
-
isLoading: boolean;
|
|
6
|
-
offer?: Offer;
|
|
7
|
-
passengers: CreateOrderPayload["passengers"];
|
|
8
|
-
selectedServices: CreateOrderPayloadServices;
|
|
9
|
-
setSelectedServices: (selectedServices: CreateOrderPayloadServices) => void;
|
|
10
|
-
}
|
|
11
|
-
export declare const BaggageSelectionCard: React.FC<BaggageSelectionCardProps>;
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import { CreateOrderPayloadServices } from "../../../types/CreateOrderPayload";
|
|
3
|
-
import { OfferAvailableServiceBaggage } from "../../../types/Offer";
|
|
4
|
-
interface BaggageSelectionControllerProps {
|
|
5
|
-
segmentId: string;
|
|
6
|
-
passengerId: string;
|
|
7
|
-
availableService: OfferAvailableServiceBaggage;
|
|
8
|
-
selectedServices: CreateOrderPayloadServices;
|
|
9
|
-
quantity: number;
|
|
10
|
-
onQuantityChanged: (quantity: number) => void;
|
|
11
|
-
}
|
|
12
|
-
export declare const BaggageSelectionController: React.FC<BaggageSelectionControllerProps>;
|
|
13
|
-
export {};
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import { CreateOrderPayload, CreateOrderPayloadServices } from "../../../types/CreateOrderPayload";
|
|
3
|
-
import { Offer } from "../../../types/Offer";
|
|
4
|
-
export interface BaggageSelectionModalProps {
|
|
5
|
-
isOpen: boolean;
|
|
6
|
-
offer?: Offer;
|
|
7
|
-
passengers: CreateOrderPayload["passengers"];
|
|
8
|
-
selectedServices: CreateOrderPayloadServices;
|
|
9
|
-
onClose: (selectedServices: CreateOrderPayloadServices) => void;
|
|
10
|
-
}
|
|
11
|
-
export declare const BaggageSelectionModal: React.FC<BaggageSelectionModalProps>;
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import { CreateOrderPayloadPassenger, CreateOrderPayloadServices } from "../../../types/CreateOrderPayload";
|
|
3
|
-
import { Offer, OfferSliceSegment } from "../../../types/Offer";
|
|
4
|
-
export interface BaggageSelectionModalBodyProps {
|
|
5
|
-
offer: Offer;
|
|
6
|
-
segment: OfferSliceSegment;
|
|
7
|
-
passengersById: Record<CreateOrderPayloadPassenger["id"], CreateOrderPayloadPassenger>;
|
|
8
|
-
selectedServices: CreateOrderPayloadServices;
|
|
9
|
-
setSelectedServices: (selectedServices: CreateOrderPayloadServices) => void;
|
|
10
|
-
}
|
|
11
|
-
export declare const BaggageSelectionModalBody: React.FC<BaggageSelectionModalBodyProps>;
|
package/react-dist/components/DuffelAncillaries/bags/BaggageSelectionModalBodyPassenger.d.ts
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import { CreateOrderPayloadServices } from "../../../types/CreateOrderPayload";
|
|
3
|
-
import { OfferAvailableServiceBaggage, OfferSliceSegmentPassengerBaggage } from "../../../types/Offer";
|
|
4
|
-
export interface BaggageSelectionModalBodyPassengerProps {
|
|
5
|
-
segmentId: string;
|
|
6
|
-
passengerId: string;
|
|
7
|
-
passengerName: string;
|
|
8
|
-
includedBaggage: OfferSliceSegmentPassengerBaggage[];
|
|
9
|
-
passengerServicesForSegment: OfferAvailableServiceBaggage[];
|
|
10
|
-
selectedServices: CreateOrderPayloadServices;
|
|
11
|
-
setSelectedServices: (selectedServices: CreateOrderPayloadServices) => void;
|
|
12
|
-
}
|
|
13
|
-
export declare const BaggageSelectionModalBodyPassenger: React.FC<BaggageSelectionModalBodyPassengerProps>;
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { ServicePriceMapById } from "@lib/getServicePriceMapById";
|
|
2
|
-
import React from "react";
|
|
3
|
-
import { CreateOrderPayloadServices } from "../../../types/CreateOrderPayload";
|
|
4
|
-
export interface BaggageSelectionModalFooterProps {
|
|
5
|
-
currency: string;
|
|
6
|
-
selectedServices: CreateOrderPayloadServices;
|
|
7
|
-
servicePrices: ServicePriceMapById;
|
|
8
|
-
isFirstSegment: boolean;
|
|
9
|
-
isLastSegment: boolean;
|
|
10
|
-
onNextSegmentButtonClicked: () => void;
|
|
11
|
-
onPreviousSegmentButtonClicked: () => void;
|
|
12
|
-
onClose: () => void;
|
|
13
|
-
}
|
|
14
|
-
export declare const BaggageSelectionModalFooter: React.FC<BaggageSelectionModalFooterProps>;
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import { OfferSliceSegment } from "../../../types/Offer";
|
|
3
|
-
export interface BaggageSelectionModalHeaderProps {
|
|
4
|
-
segmentCount: number;
|
|
5
|
-
currentSegmentIndex: number;
|
|
6
|
-
currentSegment: OfferSliceSegment;
|
|
7
|
-
setCurrentSegmentIndex: (index: number) => void;
|
|
8
|
-
}
|
|
9
|
-
export declare const BaggageSelectionModalHeader: React.FC<BaggageSelectionModalHeaderProps>;
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import { OfferSliceSegmentPassengerBaggage } from "../../../types/Offer";
|
|
3
|
-
interface IncludedBaggageBannerProps {
|
|
4
|
-
includedBaggage: OfferSliceSegmentPassengerBaggage[];
|
|
5
|
-
}
|
|
6
|
-
export declare const IncludedBaggageBanner: React.FC<IncludedBaggageBannerProps>;
|
|
7
|
-
export {};
|
package/react-dist/components/DuffelAncillaries/cancel_for_any_reason/CfarSelectionCard.d.ts
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import { CreateOrderPayloadServices } from "../../../types/CreateOrderPayload";
|
|
3
|
-
import { Offer } from "../../../types/Offer";
|
|
4
|
-
export interface CfarSelectionCardProps {
|
|
5
|
-
isLoading: boolean;
|
|
6
|
-
offer?: Offer;
|
|
7
|
-
selectedServices: CreateOrderPayloadServices;
|
|
8
|
-
setSelectedServices: (selectedServices: CreateOrderPayloadServices) => void;
|
|
9
|
-
}
|
|
10
|
-
export declare const CfarSelectionCard: React.FC<CfarSelectionCardProps>;
|
package/react-dist/components/DuffelAncillaries/cancel_for_any_reason/CfarSelectionModal.d.ts
DELETED
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import { CreateOrderPayloadServices } from "../../../types/CreateOrderPayload";
|
|
3
|
-
import { Offer, OfferAvailableServiceCancelForAnyReason } from "../../../types/Offer";
|
|
4
|
-
export interface CfarSelectionModalProps {
|
|
5
|
-
isOpen: boolean;
|
|
6
|
-
offerCurrency?: Offer["base_currency"];
|
|
7
|
-
service?: OfferAvailableServiceCancelForAnyReason;
|
|
8
|
-
selectedServices: CreateOrderPayloadServices;
|
|
9
|
-
onClose: (selectedServices: CreateOrderPayloadServices) => void;
|
|
10
|
-
}
|
|
11
|
-
export declare const CfarSelectionModal: React.FC<CfarSelectionModalProps>;
|
package/react-dist/components/DuffelAncillaries/cancel_for_any_reason/CfarSelectionModalBody.d.ts
DELETED
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import { Offer, OfferAvailableServiceCancelForAnyReason } from "../../../types/Offer";
|
|
3
|
-
export interface CfarSelectionModalBodyProps {
|
|
4
|
-
offerCurrency: Offer["base_currency"];
|
|
5
|
-
service: OfferAvailableServiceCancelForAnyReason;
|
|
6
|
-
}
|
|
7
|
-
export declare const CfarSelectionModalBody: React.FC<CfarSelectionModalBodyProps>;
|
package/react-dist/components/DuffelAncillaries/cancel_for_any_reason/CfarSelectionModalFooter.d.ts
DELETED
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import { CreateOrderPayloadServices } from "../../../types/CreateOrderPayload";
|
|
3
|
-
import { OfferAvailableServiceCancelForAnyReason } from "../../../types/Offer";
|
|
4
|
-
export interface CfarSelectionModalFooterProps {
|
|
5
|
-
service: OfferAvailableServiceCancelForAnyReason;
|
|
6
|
-
selectedServices: CreateOrderPayloadServices;
|
|
7
|
-
onAddCfarService: () => void;
|
|
8
|
-
onRemoveCfarService: () => void;
|
|
9
|
-
onClose: () => void;
|
|
10
|
-
}
|
|
11
|
-
export declare const CfarSelectionModalFooter: React.FC<CfarSelectionModalFooterProps>;
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import * as React from "react";
|
|
2
|
-
export interface DeckSelectProps {
|
|
3
|
-
/**
|
|
4
|
-
* The currently selected deck number
|
|
5
|
-
*/
|
|
6
|
-
value: number;
|
|
7
|
-
/**
|
|
8
|
-
* What to do when the user selects a deck
|
|
9
|
-
*/
|
|
10
|
-
setValue: (value: number) => void;
|
|
11
|
-
}
|
|
12
|
-
/**
|
|
13
|
-
* The deck selection component for the seat map.
|
|
14
|
-
*/
|
|
15
|
-
export declare const DeckSelect: React.FC<DeckSelectProps>;
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import * as React from "react";
|
|
2
|
-
import { CreateOrderPayloadSeatService } from "../../../types/CreateOrderPayload";
|
|
3
|
-
import { SeatMapCabinRowSectionElement } from "../../../types/SeatMap";
|
|
4
|
-
interface ElementProps {
|
|
5
|
-
sectionIndex: number;
|
|
6
|
-
elementIndex: number;
|
|
7
|
-
element: SeatMapCabinRowSectionElement;
|
|
8
|
-
selectedServicesMap: Record<string, CreateOrderPayloadSeatService>;
|
|
9
|
-
onSeatToggled: (seatService: CreateOrderPayloadSeatService) => void;
|
|
10
|
-
currentPassengerId: string;
|
|
11
|
-
currentSegmentId: string;
|
|
12
|
-
currentPassengerName: string;
|
|
13
|
-
}
|
|
14
|
-
export declare const Element: React.FC<ElementProps>;
|
|
15
|
-
export {};
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import * as React from "react";
|
|
2
|
-
import { SeatMapCabinRowSectionElementAmenity } from "../../../types/SeatMap";
|
|
3
|
-
export interface LegendProps {
|
|
4
|
-
/**
|
|
5
|
-
* The set of additional symbols to display
|
|
6
|
-
*/
|
|
7
|
-
symbols: Set<SeatMapCabinRowSectionElementAmenity>;
|
|
8
|
-
}
|
|
9
|
-
/**
|
|
10
|
-
* The legend for the seat map.
|
|
11
|
-
*/
|
|
12
|
-
export declare const Legend: React.FC<LegendProps>;
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import * as React from "react";
|
|
2
|
-
import { CreateOrderPayloadSeatService } from "../../../types/CreateOrderPayload";
|
|
3
|
-
import { SeatMapCabinRow } from "../../../types/SeatMap";
|
|
4
|
-
export interface RowProps {
|
|
5
|
-
row: SeatMapCabinRow;
|
|
6
|
-
hasWings: boolean;
|
|
7
|
-
selectedServicesMap: Record<string, CreateOrderPayloadSeatService>;
|
|
8
|
-
onSeatToggled: (seatService: CreateOrderPayloadSeatService) => void;
|
|
9
|
-
currentPassengerId: string;
|
|
10
|
-
currentPassengerName: string;
|
|
11
|
-
currentSegmentId: string;
|
|
12
|
-
}
|
|
13
|
-
export declare const Row: React.FC<RowProps>;
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import * as React from "react";
|
|
2
|
-
import { CreateOrderPayloadSeatService } from "../../../types/CreateOrderPayload";
|
|
3
|
-
import { SeatMapCabinRow, SeatMapCabinRowSection } from "../../../types/SeatMap";
|
|
4
|
-
interface RowSectionProps {
|
|
5
|
-
row: SeatMapCabinRow;
|
|
6
|
-
rowNumber: string | null;
|
|
7
|
-
hasWings: boolean;
|
|
8
|
-
section: SeatMapCabinRowSection;
|
|
9
|
-
sectionIndex: number;
|
|
10
|
-
selectedServicesMap: Record<string, CreateOrderPayloadSeatService>;
|
|
11
|
-
onSeatToggled: (seatService: CreateOrderPayloadSeatService) => void;
|
|
12
|
-
currentPassengerId: string;
|
|
13
|
-
currentPassengerName: string;
|
|
14
|
-
currentSegmentId: string;
|
|
15
|
-
}
|
|
16
|
-
export declare const RowSection: React.FC<RowSectionProps>;
|
|
17
|
-
export {};
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import * as React from "react";
|
|
2
|
-
import { CreateOrderPayloadSeatService } from "../../../types/CreateOrderPayload";
|
|
3
|
-
import { SeatMapCabinRowSectionElementSeat } from "../../../types/SeatMap";
|
|
4
|
-
interface SeatElementProps {
|
|
5
|
-
element: SeatMapCabinRowSectionElementSeat;
|
|
6
|
-
currentSegmentId: string;
|
|
7
|
-
currentPassengerId: string;
|
|
8
|
-
currentPassengerName: string;
|
|
9
|
-
onSeatToggled: (seatService: CreateOrderPayloadSeatService) => void;
|
|
10
|
-
selectedServicesMap: Record<string, CreateOrderPayloadSeatService>;
|
|
11
|
-
}
|
|
12
|
-
export declare const SeatElement: React.FC<SeatElementProps>;
|
|
13
|
-
export {};
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import * as React from "react";
|
|
2
|
-
import { SeatMapCabinRowSectionAvailableService, SeatMapCabinRowSectionElementSeat } from "../../../types/SeatMap";
|
|
3
|
-
export interface SeatInfoProps {
|
|
4
|
-
seat: SeatMapCabinRowSectionElementSeat | null;
|
|
5
|
-
service: SeatMapCabinRowSectionAvailableService | undefined;
|
|
6
|
-
}
|
|
7
|
-
export declare const SeatInfo: React.FC<SeatInfoProps>;
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import * as React from "react";
|
|
2
|
-
import { CreateOrderPayloadSeatService } from "../../../types/CreateOrderPayload";
|
|
3
|
-
import { SeatMap as SeatMapType } from "../../../types/SeatMap";
|
|
4
|
-
export interface SeatMapProps {
|
|
5
|
-
seatMap: SeatMapType;
|
|
6
|
-
selectedServicesMap: Record<string, CreateOrderPayloadSeatService>;
|
|
7
|
-
onSeatToggled: (seatService: CreateOrderPayloadSeatService) => void;
|
|
8
|
-
currentPassengerId: string;
|
|
9
|
-
currentPassengerName: string;
|
|
10
|
-
currentSegmentId: string;
|
|
11
|
-
}
|
|
12
|
-
export declare const SeatMap: React.FC<SeatMapProps>;
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import { CreateOrderPayload, CreateOrderPayloadServices } from "../../../types/CreateOrderPayload";
|
|
3
|
-
import { Offer } from "../../../types/Offer";
|
|
4
|
-
import { SeatMap } from "../../../types/SeatMap";
|
|
5
|
-
export interface SeatSelectionCardProps {
|
|
6
|
-
isLoading: boolean;
|
|
7
|
-
offer?: Offer;
|
|
8
|
-
seatMaps?: SeatMap[];
|
|
9
|
-
passengers: CreateOrderPayload["passengers"];
|
|
10
|
-
selectedServices: CreateOrderPayloadServices;
|
|
11
|
-
setSelectedServices: (selectedServices: CreateOrderPayloadServices) => void;
|
|
12
|
-
}
|
|
13
|
-
export declare const SeatSelectionCard: React.FC<SeatSelectionCardProps>;
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import { CreateOrderPayload, CreateOrderPayloadSeatService } from "../../../types/CreateOrderPayload";
|
|
3
|
-
import { Offer } from "../../../types/Offer";
|
|
4
|
-
import { SeatMap } from "../../../types/SeatMap";
|
|
5
|
-
export interface SeatSelectionModalProps {
|
|
6
|
-
isOpen: boolean;
|
|
7
|
-
offer?: Offer;
|
|
8
|
-
seatMaps?: SeatMap[];
|
|
9
|
-
selectedServices: CreateOrderPayloadSeatService[];
|
|
10
|
-
passengers: CreateOrderPayload["passengers"];
|
|
11
|
-
onClose: (selectedServices: CreateOrderPayloadSeatService[]) => void;
|
|
12
|
-
}
|
|
13
|
-
export declare const SeatSelectionModal: React.FC<SeatSelectionModalProps>;
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { ServicePriceMapById } from "@lib/getServicePriceMapById";
|
|
2
|
-
import React from "react";
|
|
3
|
-
import { CreateOrderPayloadServices } from "../../../types/CreateOrderPayload";
|
|
4
|
-
import { SeatMap } from "../../../types/SeatMap";
|
|
5
|
-
export interface SeatSelectionModalFooterProps {
|
|
6
|
-
currency: string;
|
|
7
|
-
selectedServices: CreateOrderPayloadServices;
|
|
8
|
-
servicePrices: ServicePriceMapById;
|
|
9
|
-
isFirstSegment: boolean;
|
|
10
|
-
isLastSegment: boolean;
|
|
11
|
-
onNextSegmentButtonClicked: () => void;
|
|
12
|
-
onPreviousSegmentButtonClicked: () => void;
|
|
13
|
-
onClose: () => void;
|
|
14
|
-
seatMaps: SeatMap[];
|
|
15
|
-
}
|
|
16
|
-
export declare const SeatSelectionModalFooter: React.FC<SeatSelectionModalFooterProps>;
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import { OfferSliceSegment } from "../../../types/Offer";
|
|
3
|
-
export interface SeatSelectionModalHeaderProps {
|
|
4
|
-
segmentAndPassengerPermutationsCount: number;
|
|
5
|
-
currentSegment: OfferSliceSegment;
|
|
6
|
-
currentPassengerName: string;
|
|
7
|
-
currentSegmentAndPassengerPermutationsIndex: number;
|
|
8
|
-
setCurrentSegmentAndPassengerPermutationsIndex: (index: number) => void;
|
|
9
|
-
}
|
|
10
|
-
export declare const SeatSelectionModalHeader: React.FC<SeatSelectionModalHeaderProps>;
|
|
@@ -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,14 +0,0 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
import { DuffelPaymentsProps } from "./DuffelPayments";
|
|
3
|
-
declare global {
|
|
4
|
-
namespace JSX {
|
|
5
|
-
interface IntrinsicElements {
|
|
6
|
-
"duffel-payments": React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>;
|
|
7
|
-
}
|
|
8
|
-
}
|
|
9
|
-
}
|
|
10
|
-
type DuffelPaymentsCustomElementRenderArguments = Pick<DuffelPaymentsProps, "paymentIntentClientToken" | "styles">;
|
|
11
|
-
export declare function renderDuffelPaymentsCustomElement(props: DuffelPaymentsCustomElementRenderArguments): void;
|
|
12
|
-
export declare function onDuffelPaymentsSuccessfulPayment(onSuccessfulPayment: DuffelPaymentsProps["onSuccessfulPayment"]): void;
|
|
13
|
-
export declare function onDuffelPaymentsFailedPayment(onFailedPayment: DuffelPaymentsProps["onFailedPayment"]): void;
|
|
14
|
-
export {};
|