@duffel/components 3.0.7-canary → 3.1.2--prototype
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/.eslintrc.js +8 -0
- package/.github/CODEOWNERS +4 -0
- package/.github/ISSUE_TEMPLATE/bug_report.md +29 -0
- package/.github/renovate.json +1 -5
- package/.github/workflows/release.yml +3 -0
- package/.storybook/__snapshots__/Storyshots.test.js.snap +20384 -533
- package/.tool-versions +1 -1
- package/README.md +16 -2
- package/config/esbuild.base.config.js +6 -2
- package/config/esbuild.cdn.config.js +2 -1
- package/config/esbuild.dev.config.js +2 -1
- package/config/esbuild.react.config.js +1 -1
- package/data/airports.csv +9084 -0
- package/data/cities.csv +256 -0
- package/package.json +11 -1
- package/react-dist/index.js +51 -21
- package/scripts/generate-fixture.ts +13 -8
- package/scripts/setup-suggestion-data.ts +100 -0
- package/scripts/upload-to-cdn.sh +1 -1
- package/src/components/{Card.tsx → DuffelAncillaries/Card.tsx} +1 -1
- package/src/components/{Counter.tsx → DuffelAncillaries/Counter.tsx} +1 -1
- package/src/components/{DuffelAncillaries.tsx → DuffelAncillaries/DuffelAncillaries.tsx} +68 -64
- package/src/components/{DuffelAncillariesCustomElement.tsx → DuffelAncillaries/DuffelAncillariesCustomElement.tsx} +2 -2
- package/src/components/{bags → DuffelAncillaries/bags}/BaggageSelectionCard.tsx +10 -5
- package/src/components/{bags → DuffelAncillaries/bags}/BaggageSelectionController.tsx +2 -2
- package/src/components/{bags → DuffelAncillaries/bags}/BaggageSelectionModal.tsx +4 -4
- package/src/components/{bags → DuffelAncillaries/bags}/BaggageSelectionModalBody.tsx +3 -3
- package/src/components/{bags → DuffelAncillaries/bags}/BaggageSelectionModalBodyPassenger.tsx +4 -4
- package/src/components/{bags → DuffelAncillaries/bags}/BaggageSelectionModalFooter.tsx +23 -16
- package/src/components/{bags → DuffelAncillaries/bags}/BaggageSelectionModalHeader.tsx +24 -18
- package/src/components/{bags → DuffelAncillaries/bags}/IncludedBaggageBanner.tsx +1 -1
- package/src/components/{cancel_for_any_reason → DuffelAncillaries/cancel_for_any_reason}/CfarSelectionCard.tsx +4 -4
- package/src/components/{cancel_for_any_reason → DuffelAncillaries/cancel_for_any_reason}/CfarSelectionModal.tsx +3 -3
- package/src/components/{cancel_for_any_reason → DuffelAncillaries/cancel_for_any_reason}/CfarSelectionModalBody.tsx +3 -3
- package/src/components/{cancel_for_any_reason → DuffelAncillaries/cancel_for_any_reason}/CfarSelectionModalBodyListItem.tsx +1 -1
- package/src/components/{cancel_for_any_reason → DuffelAncillaries/cancel_for_any_reason}/CfarSelectionModalFooter.tsx +5 -5
- package/src/components/{seats → DuffelAncillaries/seats}/Amenity.tsx +2 -2
- package/src/components/{seats → DuffelAncillaries/seats}/DeckSelect.tsx +1 -1
- package/src/components/{seats → DuffelAncillaries/seats}/Element.tsx +2 -2
- package/src/components/{seats → DuffelAncillaries/seats}/ExitElement.tsx +1 -1
- package/src/components/{seats → DuffelAncillaries/seats}/Legend.tsx +2 -2
- package/src/components/{seats → DuffelAncillaries/seats}/Row.tsx +2 -2
- package/src/components/{seats → DuffelAncillaries/seats}/RowSection.tsx +5 -2
- package/src/components/{seats → DuffelAncillaries/seats}/SeatElement.tsx +3 -3
- package/src/components/{seats → DuffelAncillaries/seats}/SeatInfo.tsx +1 -1
- package/src/components/{seats → DuffelAncillaries/seats}/SeatMap.tsx +6 -2
- package/src/components/{seats → DuffelAncillaries/seats}/SeatMapUnavailable.tsx +1 -1
- package/src/components/{seats → DuffelAncillaries/seats}/SeatSelectionCard.tsx +5 -5
- package/src/components/{seats → DuffelAncillaries/seats}/SeatSelectionModal.tsx +5 -5
- package/src/components/{seats → DuffelAncillaries/seats}/SeatSelectionModalBody.tsx +1 -1
- package/src/components/{seats → DuffelAncillaries/seats}/SeatSelectionModalFooter.tsx +24 -17
- package/src/components/{seats → DuffelAncillaries/seats}/SeatSelectionModalHeader.tsx +30 -20
- package/src/components/{seats → DuffelAncillaries/seats}/SeatUnavailable.tsx +2 -2
- package/src/components/DuffelPayments/DuffelPayments.tsx +224 -0
- package/src/components/DuffelPayments/DuffelPaymentsCustomElement.tsx +130 -0
- package/src/components/PlacesLookup/PlacesLookup.tsx +123 -0
- package/src/components/ShowData/ShowData.tsx +38 -0
- package/src/components/ShowData/ShowDataCustomElement.tsx +85 -0
- package/src/components/{Button.tsx → shared/Button.tsx} +4 -3
- package/src/components/{ErrorBoundary.tsx → shared/ErrorBoundary.tsx} +2 -2
- package/src/components/{Icon.tsx → shared/Icon.tsx} +11 -11
- package/src/components/{IconButton.tsx → shared/IconButton.tsx} +1 -1
- package/src/components/{Modal.tsx → shared/Modal.tsx} +5 -1
- package/src/components/{NonIdealState.tsx → shared/NonIdealState.tsx} +1 -1
- package/src/custom-elements.ts +6 -1
- package/src/examples/client-side/index.html +1 -1
- package/src/examples/full-stack/index.html +1 -1
- package/src/examples/full-stack/server.mjs +1 -0
- package/src/examples/just-typescript/src/index.html +2 -2
- package/src/examples/just-typescript/src/index.ts +2 -1
- package/src/examples/payments-custom-element/README.md +17 -0
- package/src/examples/payments-custom-element/index.html +43 -0
- package/src/examples/payments-just-typescript/README.md +37 -0
- package/src/examples/payments-just-typescript/package.json +16 -0
- package/src/examples/payments-just-typescript/src/index.html +23 -0
- package/src/examples/payments-just-typescript/src/index.ts +18 -0
- package/src/examples/react-app/src/index.tsx +11 -6
- package/src/fixtures/offers/off_1.json +1 -10
- package/src/index.ts +3 -1
- package/src/lib/captureErrorInSentry.ts +2 -20
- package/src/lib/fetchFromDuffelAPI.ts +36 -6
- package/src/lib/formatDate.ts +3 -4
- package/src/lib/getBaggageServiceDescription.ts +1 -6
- package/src/lib/getPassengerName.ts +4 -0
- package/src/lib/getTotalAmountForServices.ts +1 -1
- package/src/lib/hasHighLuminance.ts +9 -0
- package/src/lib/logging.ts +52 -32
- package/src/lib/retrieveOffer.ts +13 -6
- package/src/lib/retrieveSeatMaps.ts +13 -8
- package/src/stories/BaggageSelectionModalHeader.stories.tsx +1 -1
- package/src/stories/Button.stories.tsx +33 -2
- package/src/stories/DuffelAncillaries.stories.tsx +42 -2
- package/src/stories/DuffelPayments.stories.tsx +34 -0
- package/src/stories/Icon.stories.tsx +3 -2
- package/src/stories/IconButton.stories.tsx +1 -1
- package/src/stories/PlacesLookup.stories.tsx +22 -0
- package/src/stories/ShowData.stories.tsx +16 -0
- package/src/styles/components/Button.css +11 -3
- package/src/styles/components/Card.css +3 -3
- package/src/styles/components/CfarSelectionModal.css +1 -1
- package/src/styles/components/DuffelPayments.css +42 -0
- package/src/styles/components/Legend.css +10 -6
- package/src/styles/components/LoadingState.css +8 -2
- package/src/styles/components/Modal.css +2 -1
- package/src/styles/components/PassengerSelect.css +8 -2
- package/src/styles/components/PlacesLookup.css +36 -0
- package/src/styles/components/Seat.css +9 -7
- package/src/styles/components/SeatInfo.css +1 -1
- package/src/styles/components/Tabs.css +5 -2
- package/src/styles/global.css +2 -0
- package/src/tests/components/DuffelAncillaries.test.tsx +1 -1
- package/src/tests/lib/createPriceFormatters.test.tsx +1 -1
- package/src/tests/lib/formatAvailableServices.test.tsx +1 -1
- package/src/tests/lib/formatSeatMaps.test.tsx +2 -2
- package/src/tests/lib/getCurrencyForServices.test.tsx +1 -1
- package/src/tests/lib/hasServiceOfSameMetadataTypeAlreadyBeenSelected.test.ts +1 -1
- package/src/tests/lib/logging.test.tsx +14 -14
- package/src/tests/lib/moneyStringFormatter.test.tsx +1 -1
- package/src/tests/lib/validateProps.test.tsx +1 -1
- package/src/types/DuffelAncillariesProps.ts +1 -1
- package/react-dist/components/AnimatedLoaderEllipsis.d.ts +0 -2
- package/react-dist/components/Button.d.ts +0 -23
- package/react-dist/components/Card.d.ts +0 -14
- package/react-dist/components/Counter.d.ts +0 -10
- package/react-dist/components/DuffelAncillaries.d.ts +0 -3
- package/react-dist/components/DuffelAncillariesCustomElement.d.ts +0 -13
- package/react-dist/components/ErrorBoundary.d.ts +0 -13
- package/react-dist/components/FetchOfferErrorState.d.ts +0 -5
- package/react-dist/components/Icon.d.ts +0 -44
- package/react-dist/components/IconButton.d.ts +0 -16
- package/react-dist/components/Modal.d.ts +0 -11
- package/react-dist/components/NonIdealState.d.ts +0 -4
- package/react-dist/components/Stamp.d.ts +0 -7
- package/react-dist/components/Tabs.d.ts +0 -16
- package/react-dist/components/bags/BaggageSelectionCard.d.ts +0 -11
- package/react-dist/components/bags/BaggageSelectionController.d.ts +0 -13
- package/react-dist/components/bags/BaggageSelectionModal.d.ts +0 -11
- package/react-dist/components/bags/BaggageSelectionModalBody.d.ts +0 -11
- package/react-dist/components/bags/BaggageSelectionModalBodyPassenger.d.ts +0 -13
- package/react-dist/components/bags/BaggageSelectionModalFooter.d.ts +0 -14
- package/react-dist/components/bags/BaggageSelectionModalHeader.d.ts +0 -9
- package/react-dist/components/bags/IncludedBaggageBanner.d.ts +0 -7
- package/react-dist/components/cancel_for_any_reason/CfarSelectionCard.d.ts +0 -10
- package/react-dist/components/cancel_for_any_reason/CfarSelectionModal.d.ts +0 -11
- package/react-dist/components/cancel_for_any_reason/CfarSelectionModalBody.d.ts +0 -7
- package/react-dist/components/cancel_for_any_reason/CfarSelectionModalBodyListItem.d.ts +0 -4
- package/react-dist/components/cancel_for_any_reason/CfarSelectionModalFooter.d.ts +0 -11
- package/react-dist/components/cancel_for_any_reason/CfarSelectionModalHeader.d.ts +0 -2
- package/react-dist/components/seats/Amenity.d.ts +0 -6
- package/react-dist/components/seats/DeckSelect.d.ts +0 -15
- package/react-dist/components/seats/Element.d.ts +0 -15
- package/react-dist/components/seats/EmptyElement.d.ts +0 -2
- package/react-dist/components/seats/ExitElement.d.ts +0 -6
- package/react-dist/components/seats/Legend.d.ts +0 -12
- package/react-dist/components/seats/Row.d.ts +0 -13
- package/react-dist/components/seats/RowSection.d.ts +0 -17
- package/react-dist/components/seats/SeatElement.d.ts +0 -13
- package/react-dist/components/seats/SeatInfo.d.ts +0 -7
- package/react-dist/components/seats/SeatMap.d.ts +0 -12
- package/react-dist/components/seats/SeatMapUnavailable.d.ts +0 -2
- package/react-dist/components/seats/SeatSelectionCard.d.ts +0 -13
- package/react-dist/components/seats/SeatSelectionModal.d.ts +0 -13
- package/react-dist/components/seats/SeatSelectionModalBody.d.ts +0 -4
- package/react-dist/components/seats/SeatSelectionModalFooter.d.ts +0 -16
- package/react-dist/components/seats/SeatSelectionModalHeader.d.ts +0 -10
- package/react-dist/components/seats/SeatUnavailable.d.ts +0 -5
- package/react-dist/custom-elements.d.ts +0 -5
- package/react-dist/custom-elements.js +0 -36
- package/react-dist/custom-elements.js.map +0 -7
- package/react-dist/index.d.ts +0 -6
- 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 -1
- 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/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 -53
- 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/react-app/yarn.lock +0 -219
- /package/src/components/{cancel_for_any_reason → DuffelAncillaries/cancel_for_any_reason}/CfarSelectionModalHeader.tsx +0 -0
- /package/src/components/{seats → DuffelAncillaries/seats}/EmptyElement.tsx +0 -0
- /package/src/components/{AnimatedLoaderEllipsis.tsx → shared/AnimatedLoaderEllipsis.tsx} +0 -0
- /package/src/components/{FetchOfferErrorState.tsx → shared/FetchOfferErrorState.tsx} +0 -0
- /package/src/components/{Stamp.tsx → shared/Stamp.tsx} +0 -0
- /package/src/components/{Tabs.tsx → shared/Tabs.tsx} +0 -0
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from "@storybook/react";
|
|
2
|
+
import {
|
|
3
|
+
DuffelPayments,
|
|
4
|
+
DuffelPaymentsProps,
|
|
5
|
+
} from "../components/DuffelPayments/DuffelPayments";
|
|
6
|
+
|
|
7
|
+
export default {
|
|
8
|
+
title: "DuffelPayments",
|
|
9
|
+
component: DuffelPayments,
|
|
10
|
+
} as Meta;
|
|
11
|
+
|
|
12
|
+
type DuffelPaymentsStory = StoryObj<typeof DuffelPayments>;
|
|
13
|
+
|
|
14
|
+
const defaultProps: DuffelPaymentsProps = {
|
|
15
|
+
paymentIntentClientToken:
|
|
16
|
+
"eyJjbGllbnRfc2VjcmV0IjoicGlfM0psczlVQWcySmhFeTh2WTBSTm1MU0JkX3NlY3JldF9QUW9yZXNuU3laeWJadGRiejZwNzBCbUdPIiwicHVibGlzaGFibGVfa2V5IjoicGtfdGVzdF9EQUJLY0E2Vzh6OTc0cTdPSWY0YmJ2MVQwMEpwRmMyOUpWIn0=",
|
|
17
|
+
onSuccessfulPayment: () => {}, // eslint-disable-line @typescript-eslint/no-empty-function
|
|
18
|
+
onFailedPayment: () => {}, // eslint-disable-line @typescript-eslint/no-empty-function
|
|
19
|
+
};
|
|
20
|
+
|
|
21
|
+
export const Default: DuffelPaymentsStory = {
|
|
22
|
+
args: defaultProps,
|
|
23
|
+
};
|
|
24
|
+
|
|
25
|
+
export const WithCustomStyles: DuffelPaymentsStory = {
|
|
26
|
+
args: {
|
|
27
|
+
...defaultProps,
|
|
28
|
+
styles: {
|
|
29
|
+
accentColor: "29, 78, 216",
|
|
30
|
+
fontFamily: "monospace",
|
|
31
|
+
buttonCornerRadius: "15px",
|
|
32
|
+
},
|
|
33
|
+
},
|
|
34
|
+
};
|
|
@@ -1,12 +1,13 @@
|
|
|
1
|
-
import { Icon, ICON_MAP, IconName } from "@components/Icon";
|
|
2
1
|
import { Meta } from "@storybook/react";
|
|
2
|
+
import React from "react";
|
|
3
|
+
import { Icon, ICON_MAP, IconName } from "../components/shared/Icon";
|
|
3
4
|
|
|
4
5
|
export default {
|
|
5
6
|
title: "Icon",
|
|
6
7
|
component: Icon,
|
|
7
8
|
} as Meta;
|
|
8
9
|
|
|
9
|
-
export const FullList = () => (
|
|
10
|
+
export const FullList: React.FC = () => (
|
|
10
11
|
<div
|
|
11
12
|
style={{
|
|
12
13
|
display: "grid",
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import type { Meta } from "@storybook/react";
|
|
2
|
+
import React from "react";
|
|
3
|
+
import {
|
|
4
|
+
PlacesLookup,
|
|
5
|
+
PlacesLookupProps,
|
|
6
|
+
} from "../components/PlacesLookup/PlacesLookup";
|
|
7
|
+
|
|
8
|
+
export default {
|
|
9
|
+
title: "PlacesLookup",
|
|
10
|
+
component: PlacesLookup,
|
|
11
|
+
} as Meta;
|
|
12
|
+
|
|
13
|
+
const defaultProps: PlacesLookupProps = {
|
|
14
|
+
onPlaceSelected: (selection) =>
|
|
15
|
+
alert(`Selected: ${JSON.stringify(selection)}`),
|
|
16
|
+
};
|
|
17
|
+
|
|
18
|
+
export const Default: React.FC = () => (
|
|
19
|
+
<div style={{ width: "350px" }}>
|
|
20
|
+
<PlacesLookup {...defaultProps} />
|
|
21
|
+
</div>
|
|
22
|
+
);
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { Meta, StoryObj } from "@storybook/react";
|
|
2
|
+
import { ShowData, ShowDataProps } from "../components/ShowData/ShowData";
|
|
3
|
+
|
|
4
|
+
export default {
|
|
5
|
+
title: "ShowData",
|
|
6
|
+
component: ShowData,
|
|
7
|
+
} as Meta;
|
|
8
|
+
|
|
9
|
+
const defaultProps: ShowDataProps = {
|
|
10
|
+
data: { heres: "some test data" },
|
|
11
|
+
onFinished: console.log,
|
|
12
|
+
};
|
|
13
|
+
|
|
14
|
+
export const AllServices: StoryObj<typeof ShowData> = {
|
|
15
|
+
args: defaultProps,
|
|
16
|
+
};
|
|
@@ -62,7 +62,7 @@ button:-moz-focusring,
|
|
|
62
62
|
}
|
|
63
63
|
|
|
64
64
|
.button {
|
|
65
|
-
--button-color: white;
|
|
65
|
+
--button-color: var(--SECONDARY, white);
|
|
66
66
|
|
|
67
67
|
box-sizing: border-box;
|
|
68
68
|
border-radius: var(--BUTTON-RADIUS, 6px);
|
|
@@ -80,6 +80,8 @@ button:-moz-focusring,
|
|
|
80
80
|
box-shadow: 0px 0px 0px rgba(0, 0, 0, 0.25), 0px 0px 0px #e9e9eb;
|
|
81
81
|
|
|
82
82
|
border: 1px solid rgba(var(--ACCENT), var(--ACCENT-LIGHT-1000));
|
|
83
|
+
/* Will give the button an outline if the accent color has high luminance */
|
|
84
|
+
border: 1px solid var(--SECONDARY);
|
|
83
85
|
transition: background-color 0.3s var(--TRANSITION-CUBIC-BEZIER),
|
|
84
86
|
box-shadow 0.3s var(--TRANSITION-CUBIC-BEZIER),
|
|
85
87
|
color 0.3s var(--TRANSITION-CUBIC-BEZIER);
|
|
@@ -128,13 +130,19 @@ button:-moz-focusring,
|
|
|
128
130
|
|
|
129
131
|
.button--primary:not(:disabled):hover {
|
|
130
132
|
background-color: rgba(var(--ACCENT), var(--ACCENT-LIGHT-800));
|
|
131
|
-
border-color:
|
|
133
|
+
border-color: (
|
|
134
|
+
var(--SECONDARY),
|
|
135
|
+
rgba(var(--ACCENT), var(--ACCENT-LIGHT-800))
|
|
136
|
+
);
|
|
132
137
|
box-shadow: 0px 2px 4px 1px rgba(0, 0, 0, 0.15), 0px 0px 0px 2px #e9e9eb;
|
|
133
138
|
}
|
|
134
139
|
|
|
135
140
|
.button--primary:not(:disabled):active {
|
|
136
141
|
background-color: rgba(var(--ACCENT), var(--ACCENT-LIGHT-1000));
|
|
137
|
-
border-color:
|
|
142
|
+
border-color: (
|
|
143
|
+
var(--SECONDARY),
|
|
144
|
+
rgba(var(--ACCENT), var(--ACCENT-LIGHT-1000))
|
|
145
|
+
);
|
|
138
146
|
box-shadow: 0px 1px 2px 1px rgba(0, 0, 0, 0.25), 0px 0px 0px 1px #dcdcde;
|
|
139
147
|
}
|
|
140
148
|
|
|
@@ -33,18 +33,18 @@
|
|
|
33
33
|
.ancillary-card:not(:disabled):not(.ancillary-card--loading):hover,
|
|
34
34
|
.ancillary-card:not(:disabled):not(.ancillary-card--loading):focus-visible {
|
|
35
35
|
/* important is needed here to override the inline border style from Card.tsx */
|
|
36
|
-
border-color: rgb(var(--ACCENT)) !important;
|
|
36
|
+
border-color: var(--SECONDARY, rgb(var(--ACCENT))) !important;
|
|
37
37
|
}
|
|
38
38
|
|
|
39
39
|
.ancillary-card:not(:disabled):not(.ancillary-card--loading):hover
|
|
40
40
|
.ancillary-card__expand-icon,
|
|
41
41
|
.ancillary-card:not(:disabled):not(.ancillary-card--loading):focus-visible
|
|
42
42
|
.ancillary-card__expand-icon {
|
|
43
|
-
color: rgb(var(--ACCENT));
|
|
43
|
+
color: var(--SECONDARY, rgb(var(--ACCENT)));
|
|
44
44
|
}
|
|
45
45
|
|
|
46
46
|
.ancillary-card__selected-icon {
|
|
47
|
-
background-color: rgb(var(--ACCENT));
|
|
47
|
+
background-color: var(--SECONDARY, rgb(var(--ACCENT)));
|
|
48
48
|
border-radius: 20px;
|
|
49
49
|
color: rgb(var(--WHITE));
|
|
50
50
|
height: 24px;
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
.card-payment__container {
|
|
2
|
+
width: 480px;
|
|
3
|
+
height: auto;
|
|
4
|
+
max-width: 480px;
|
|
5
|
+
box-sizing: border-box;
|
|
6
|
+
margin: var(--SPACING-XS-3);
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
.card-payment__container--invalid {
|
|
10
|
+
margin-top: var(--SPACING-SM-1);
|
|
11
|
+
font-size: var(--FONT-SIZES-C2);
|
|
12
|
+
color: var(--RED);
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
.card-payment__container--invalid {
|
|
16
|
+
height: 16px;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
.card-details {
|
|
20
|
+
background-color: rgb(var(--WHITE));
|
|
21
|
+
border: 1px solid var(--GREY-200);
|
|
22
|
+
border-radius: 5px;
|
|
23
|
+
padding: var(--SPACING-SM-2);
|
|
24
|
+
width: auto;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
.card-details.StripeElement--invalid {
|
|
28
|
+
border: 1px solid var(--RED);
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
.card-payment__pay-button {
|
|
32
|
+
width: 100%;
|
|
33
|
+
margin-top: var(--SPACING-SM-3);
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
.card-payment--in-progress {
|
|
37
|
+
display: block;
|
|
38
|
+
z-index: 3;
|
|
39
|
+
width: 100vw;
|
|
40
|
+
height: 100vh;
|
|
41
|
+
position: absolute;
|
|
42
|
+
}
|
|
@@ -27,8 +27,9 @@
|
|
|
27
27
|
width: var(--SPACING-MD-1);
|
|
28
28
|
height: var(--SPACING-MD-1);
|
|
29
29
|
border-radius: 5px;
|
|
30
|
-
border: 2px solid var(--GREY-
|
|
31
|
-
color: var(--GREY-
|
|
30
|
+
border: 2px solid var(--GREY-200);
|
|
31
|
+
color: var(--GREY-600);
|
|
32
|
+
background-color: var(--GREY-100);
|
|
32
33
|
display: flex;
|
|
33
34
|
align-items: center;
|
|
34
35
|
justify-content: center;
|
|
@@ -37,22 +38,25 @@
|
|
|
37
38
|
|
|
38
39
|
.seat-map__legend-seat--fee-payable {
|
|
39
40
|
background-color: rgba(var(--ACCENT), var(--ACCENT-LIGHT-100));
|
|
40
|
-
border: 2px solid
|
|
41
|
+
border: 2px solid
|
|
42
|
+
var(--TERTIARY, rgba(var(--ACCENT), var(--ACCENT-LIGHT-200)));
|
|
41
43
|
}
|
|
42
44
|
|
|
43
45
|
.seat-map__legend-seat--fee-payable-indicator {
|
|
44
46
|
position: relative;
|
|
45
47
|
top: var(--SPACING-XS-2);
|
|
46
48
|
left: var(--SPACING-XS-2);
|
|
47
|
-
color: rgba(var(--ACCENT), var(--ACCENT-LIGHT-300));
|
|
49
|
+
color: var(--TERTIARY, rgba(var(--ACCENT), var(--ACCENT-LIGHT-300)));
|
|
48
50
|
}
|
|
49
51
|
|
|
50
52
|
.seat-map__legend-seat--included {
|
|
51
53
|
background-color: rgba(var(--ACCENT), var(--ACCENT-LIGHT-100));
|
|
52
|
-
border: 2px solid
|
|
54
|
+
border: 2px solid
|
|
55
|
+
var(--TERTIARY, rgba(var(--ACCENT), var(--ACCENT-LIGHT-200)));
|
|
53
56
|
}
|
|
54
57
|
|
|
55
58
|
.seat-map__legend-seat--selected {
|
|
56
59
|
background-color: rgba(var(--ACCENT), var(--ACCENT-LIGHT-1000));
|
|
57
|
-
border: 2px solid
|
|
60
|
+
border: 2px solid
|
|
61
|
+
var(--SECONDARY, rgba(var(--ACCENT), var(--ACCENT-LIGHT-1000)));
|
|
58
62
|
}
|
|
@@ -24,7 +24,10 @@
|
|
|
24
24
|
margin: var(--SPACING-SM-3) 0;
|
|
25
25
|
border-radius: 999px;
|
|
26
26
|
width: calc(100% - var(--SPACING-SM-1));
|
|
27
|
-
background-color:
|
|
27
|
+
background-color: var(
|
|
28
|
+
--SECONDARY,
|
|
29
|
+
rgba(var(--ACCENT), var(--ACCENT-LIGHT-100))
|
|
30
|
+
);
|
|
28
31
|
position: relative;
|
|
29
32
|
transition: var(--TRANSITIONS-CUBIC-BEZIER);
|
|
30
33
|
}
|
|
@@ -33,7 +36,10 @@
|
|
|
33
36
|
display: block;
|
|
34
37
|
height: 100%;
|
|
35
38
|
border-radius: 999px;
|
|
36
|
-
background-color:
|
|
39
|
+
background-color: var(
|
|
40
|
+
--TERTIARY,
|
|
41
|
+
rgba(var(--ACCENT), var(--ACCENT-LIGHT-1000))
|
|
42
|
+
);
|
|
37
43
|
position: relative;
|
|
38
44
|
animation: fillstatus 1s linear;
|
|
39
45
|
}
|
|
@@ -43,7 +43,10 @@
|
|
|
43
43
|
.passenger-selection-passenger:hover,
|
|
44
44
|
.passenger-selection-passenger:focus,
|
|
45
45
|
.passenger-selection-passenger:active {
|
|
46
|
-
background-color:
|
|
46
|
+
background-color: var(
|
|
47
|
+
--SECONDARY,
|
|
48
|
+
rgba(var(--ACCENT), var(--ACCENT-LIGHT-100))
|
|
49
|
+
);
|
|
47
50
|
}
|
|
48
51
|
|
|
49
52
|
.passenger-selection-passenger__identifier,
|
|
@@ -78,7 +81,10 @@
|
|
|
78
81
|
.passenger-selection-passenger--selected {
|
|
79
82
|
box-shadow: 4px 0px 0px 0px rgba(var(--ACCENT), var(--ACCENT-LIGHT-1000))
|
|
80
83
|
inset;
|
|
81
|
-
background-color:
|
|
84
|
+
background-color: var(
|
|
85
|
+
--SECONDARY,
|
|
86
|
+
rgba(var(--ACCENT), var(--ACCENT-LIGHT-100))
|
|
87
|
+
);
|
|
82
88
|
}
|
|
83
89
|
|
|
84
90
|
.passenger-selection-segment {
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
.places-lookup-input {
|
|
2
|
+
width: 100%;
|
|
3
|
+
}
|
|
4
|
+
|
|
5
|
+
.places-lookup-popover {
|
|
6
|
+
background-color: var(--WHITE);
|
|
7
|
+
box-shadow: 0px 1px 4px rgba(59, 64, 86, 0.3);
|
|
8
|
+
border-radius: 4px;
|
|
9
|
+
margin-top: 4px;
|
|
10
|
+
width: 100%;
|
|
11
|
+
padding: 4px;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
.places-lookup-popover__item {
|
|
15
|
+
display: flex;
|
|
16
|
+
align-items: center;
|
|
17
|
+
justify-content: space-between;
|
|
18
|
+
padding: 0.5rem;
|
|
19
|
+
cursor: pointer;
|
|
20
|
+
column-gap: var(--SPACING-XS-2);
|
|
21
|
+
background-color: transparent;
|
|
22
|
+
border: none;
|
|
23
|
+
border-radius: 4px;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
.places-lookup-popover__item:hover,
|
|
27
|
+
.places-lookup-popover__item:focus {
|
|
28
|
+
background-color: var(--GREY-100);
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
.places-lookup-popover__icon-and-name-container {
|
|
32
|
+
column-gap: var(--SPACING-SM-1);
|
|
33
|
+
display: flex;
|
|
34
|
+
align-items: flex-start;
|
|
35
|
+
text-align: start;
|
|
36
|
+
}
|
|
@@ -21,16 +21,17 @@
|
|
|
21
21
|
}
|
|
22
22
|
|
|
23
23
|
.map-element--available {
|
|
24
|
-
border: 2px solid
|
|
24
|
+
border: 2px solid
|
|
25
|
+
var(--TERTIARY, rgba(var(--ACCENT), var(--ACCENT-LIGHT-200)));
|
|
25
26
|
background-color: rgba(var(--ACCENT), var(--ACCENT-LIGHT-100));
|
|
26
|
-
color: rgba(var(--ACCENT), var(--ACCENT-LIGHT-300));
|
|
27
|
+
color: var(--TERTIARY, rgba(var(--ACCENT), var(--ACCENT-LIGHT-300)));
|
|
27
28
|
}
|
|
28
29
|
|
|
29
30
|
.map-element--fee-payable {
|
|
30
31
|
position: absolute;
|
|
31
32
|
bottom: -2px;
|
|
32
33
|
right: -2px;
|
|
33
|
-
color: rgba(var(--ACCENT), var(--ACCENT-LIGHT-300));
|
|
34
|
+
color: var(--TERTIARY, rgba(var(--ACCENT), var(--ACCENT-LIGHT-300)));
|
|
34
35
|
}
|
|
35
36
|
|
|
36
37
|
@media (hover: hover) and (pointer: fine) {
|
|
@@ -40,18 +41,19 @@
|
|
|
40
41
|
|
|
41
42
|
.map-element--actionable:not(.map-element--selected):hover {
|
|
42
43
|
background-color: rgba(var(--ACCENT), var(--ACCENT-LIGHT-200));
|
|
43
|
-
color: rgba(var(--ACCENT), var(--ACCENT-LIGHT-1000));
|
|
44
|
+
color: var(--SECONDARY, rgba(var(--ACCENT), var(--ACCENT-LIGHT-1000)));
|
|
44
45
|
transition: var(--TRANSITIONS-CUBIC-BEZIER);
|
|
45
46
|
}
|
|
46
47
|
|
|
47
48
|
.map-element--fee-payable {
|
|
48
|
-
color: rgba(var(--ACCENT), var(--ACCENT-LIGHT-1000));
|
|
49
|
+
color: var(--TERTIARY, rgba(var(--ACCENT), var(--ACCENT-LIGHT-1000)));
|
|
49
50
|
transition: var(--TRANSITIONS-CUBIC-BEZIER);
|
|
50
51
|
}
|
|
51
52
|
}
|
|
52
53
|
|
|
53
54
|
.map-element--selected {
|
|
54
55
|
background-color: rgba(var(--ACCENT), var(--ACCENT-LIGHT-1000));
|
|
55
|
-
border: 2px solid
|
|
56
|
-
|
|
56
|
+
border: 2px solid
|
|
57
|
+
var(--SECONDARY, rgba(var(--ACCENT), var(--ACCENT-LIGHT-1000)));
|
|
58
|
+
color: var(--SECONDARY, rgba(var(--WHITE), 1));
|
|
57
59
|
}
|
|
@@ -28,8 +28,11 @@
|
|
|
28
28
|
.seat-map__tab-select-option:hover,
|
|
29
29
|
.seat-map__tab-select-option:focus,
|
|
30
30
|
.seat-map__tab-select-option:active {
|
|
31
|
-
color: rgba(var(--ACCENT), var(--ACCENT-LIGHT-1000));
|
|
32
|
-
background-color:
|
|
31
|
+
color: var(--SECONDARY, rgba(var(--ACCENT), var(--ACCENT-LIGHT-1000)));
|
|
32
|
+
background-color: var(
|
|
33
|
+
--TERTIARY,
|
|
34
|
+
rgba(var(--ACCENT), var(--ACCENT-LIGHT-200))
|
|
35
|
+
);
|
|
33
36
|
transition: var(--TRANSITIONS-CUBIC-BEZIER);
|
|
34
37
|
}
|
|
35
38
|
|
package/src/styles/global.css
CHANGED
|
@@ -12,6 +12,7 @@
|
|
|
12
12
|
@import "./components/CfarSelectionModal.css";
|
|
13
13
|
@import "./components/Card.css";
|
|
14
14
|
@import "./components/Counter.css";
|
|
15
|
+
@import "./components/DuffelPayments.css";
|
|
15
16
|
@import "./components/IconButton.css";
|
|
16
17
|
@import "./components/Legend.css";
|
|
17
18
|
@import "./components/Loader.css";
|
|
@@ -19,6 +20,7 @@
|
|
|
19
20
|
@import "./components/Modal.css";
|
|
20
21
|
@import "./components/PassengerSelect.css";
|
|
21
22
|
@import "./components/PassengersLayout.css";
|
|
23
|
+
@import "./components/PlacesLookup.css";
|
|
22
24
|
@import "./components/Row.css";
|
|
23
25
|
@import "./components/Seat.css";
|
|
24
26
|
@import "./components/SeatInfo.css";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { fireEvent, render } from "@testing-library/react";
|
|
2
2
|
import React from "react";
|
|
3
|
-
import { DuffelAncillaries } from "../../components/DuffelAncillaries";
|
|
3
|
+
import { DuffelAncillaries } from "../../components/DuffelAncillaries/DuffelAncillaries";
|
|
4
4
|
import mockPassengers from "../../fixtures/passengers/mock_passengers";
|
|
5
5
|
import {
|
|
6
6
|
DuffelAncillariesPropsWithOffersAndSeatMaps,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { createPriceFormatters } from "
|
|
1
|
+
import { createPriceFormatters } from "../../lib/createPriceFormatters";
|
|
2
2
|
|
|
3
3
|
describe("createPriceFormatters", () => {
|
|
4
4
|
it("should return an empty object if neither markup nor priceFormatters are supplied", () => {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { formatAvailableServices } from "
|
|
1
|
+
import { formatAvailableServices } from "../../lib/formatAvailableServices";
|
|
2
2
|
import { OfferAvailableServiceBaggage } from "../../types/Offer";
|
|
3
3
|
|
|
4
4
|
/* eslint-disable @typescript-eslint/no-var-requires */
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { formatSeatMaps } from "
|
|
2
|
-
import { getFirstSeatElementMatchingCriteria } from "
|
|
1
|
+
import { formatSeatMaps } from "../../lib/formatSeatMaps";
|
|
2
|
+
import { getFirstSeatElementMatchingCriteria } from "../../lib/getFirstSeatElementMatchingCriteria";
|
|
3
3
|
import { SeatMapCabinRowSectionElementSeat } from "../../types/SeatMap";
|
|
4
4
|
|
|
5
5
|
/* eslint-disable @typescript-eslint/no-var-requires */
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { hasServiceOfSameMetadataTypeAlreadyBeenSelected } from "
|
|
1
|
+
import { hasServiceOfSameMetadataTypeAlreadyBeenSelected } from "../../lib/hasServiceOfSameMetadataTypeAlreadyBeenSelected";
|
|
2
2
|
import { CreateOrderPayloadService } from "../../types/CreateOrderPayload";
|
|
3
3
|
import { OfferAvailableBaggageService } from "../../types/Offer";
|
|
4
4
|
|
|
@@ -1,32 +1,32 @@
|
|
|
1
|
-
import { initializeLogger } from "
|
|
1
|
+
import { initializeLogger, log, logGroup } from "../../lib/logging";
|
|
2
2
|
|
|
3
3
|
const consoleSpies = {
|
|
4
|
-
log: jest.spyOn(console, "
|
|
4
|
+
log: jest.spyOn(console, "info"),
|
|
5
5
|
groupCollapsed: jest.spyOn(console, "groupCollapsed"),
|
|
6
6
|
groupEnd: jest.spyOn(console, "groupEnd"),
|
|
7
7
|
};
|
|
8
8
|
|
|
9
|
-
describe("
|
|
9
|
+
describe("logging", () => {
|
|
10
10
|
it("should return functions that do nothing when debugMode is false", () => {
|
|
11
|
-
|
|
12
|
-
|
|
11
|
+
initializeLogger(false);
|
|
12
|
+
log("This should not be logged");
|
|
13
13
|
expect(consoleSpies.log).not.toHaveBeenCalled();
|
|
14
14
|
});
|
|
15
15
|
|
|
16
16
|
it("should return functions that log a message when debugMode is true", () => {
|
|
17
|
-
|
|
18
|
-
|
|
17
|
+
initializeLogger(true);
|
|
18
|
+
log("This should be logged");
|
|
19
19
|
|
|
20
|
-
//
|
|
21
|
-
//
|
|
22
|
-
expect(consoleSpies.log).toHaveBeenCalledTimes(
|
|
20
|
+
// Once because initializeLogger was initialised on the test above
|
|
21
|
+
// And so, the initialisation message would not show up twice.
|
|
22
|
+
expect(consoleSpies.log).toHaveBeenCalledTimes(1);
|
|
23
23
|
|
|
24
|
-
|
|
24
|
+
logGroup("This should be logged", ["one", "two"]);
|
|
25
25
|
expect(consoleSpies.groupCollapsed).toHaveBeenCalledTimes(1);
|
|
26
26
|
expect(consoleSpies.groupEnd).toHaveBeenCalledTimes(1);
|
|
27
27
|
|
|
28
|
-
//
|
|
29
|
-
//
|
|
30
|
-
expect(consoleSpies.log).toHaveBeenCalledTimes(
|
|
28
|
+
// once for the call to `log` above and then
|
|
29
|
+
// twice for the array passed to logGroup
|
|
30
|
+
expect(consoleSpies.log).toHaveBeenCalledTimes(3);
|
|
31
31
|
});
|
|
32
32
|
});
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* that we can test functions with invalid props.
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
|
-
import { hasCommonRequiredProps } from "
|
|
7
|
+
import { hasCommonRequiredProps } from "../../lib/validateProps";
|
|
8
8
|
import { Ancillaries } from "../../types/DuffelAncillariesProps";
|
|
9
9
|
|
|
10
10
|
describe("hasCommonRequiredProps", () => {
|
|
@@ -75,7 +75,7 @@ export type DuffelAncillariesPriceFormatterForCancelForAnyReason = (
|
|
|
75
75
|
amount: number,
|
|
76
76
|
currency: string,
|
|
77
77
|
service: OfferAvailableServiceCancelForAnyReason
|
|
78
|
-
) => { amount: number; currency
|
|
78
|
+
) => { amount: number; currency?: string };
|
|
79
79
|
|
|
80
80
|
export interface DuffelAncillariesPriceFormatters {
|
|
81
81
|
bags?: DuffelAncillariesPriceFormatterForBags;
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import { IconName } from "@components/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"> {
|
|
17
|
-
"data-testid"?: string;
|
|
18
|
-
iconBefore?: IconName;
|
|
19
|
-
variant?: ButtonVariants;
|
|
20
|
-
size?: ButtonSizes;
|
|
21
|
-
}
|
|
22
|
-
export declare const Button: React.FC<ButtonProps>;
|
|
23
|
-
export {};
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import * as React from "react";
|
|
2
|
-
import { IconName } from "./Icon";
|
|
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,13 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
export declare class ErrorBoundary extends React.Component<{
|
|
3
|
-
children: React.ReactNode | React.ReactNode[];
|
|
4
|
-
}> {
|
|
5
|
-
state: {
|
|
6
|
-
hasError: boolean;
|
|
7
|
-
};
|
|
8
|
-
static getDerivedStateFromError(): {
|
|
9
|
-
hasError: boolean;
|
|
10
|
-
};
|
|
11
|
-
componentDidCatch(error: Error, context: Record<any, any>): void;
|
|
12
|
-
render(): string | number | boolean | Iterable<React.ReactNode> | import("react/jsx-runtime").JSX.Element | null | undefined;
|
|
13
|
-
}
|