@duffel/components 2.7.20 → 3.0.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/.circleci/config.yml +67 -0
- package/.eslintrc.js +47 -0
- package/.github/renovate.json +16 -0
- package/.github/workflows/autoapprove.yml +18 -0
- package/.github/workflows/release.yml +89 -0
- package/.husky/post-commit +4 -0
- package/.husky/pre-commit +4 -0
- package/.nvmrc +1 -0
- package/.prettierignore +2 -0
- package/.storybook/Storyshots.test.js +3 -0
- package/.storybook/__snapshots__/Storyshots.test.js.snap +48318 -0
- package/.storybook/main.ts +33 -0
- package/.storybook/preview.tsx +28 -0
- package/.tool-versions +1 -0
- package/CONTRIBUTING.md +83 -0
- package/README.md +53 -15
- package/__mocks__/styleMock.js +6 -0
- package/babel.config.js +20 -0
- package/commitlint.config.js +4 -0
- package/config/esbuild.base.config.js +18 -0
- package/config/esbuild.cdn.config.js +51 -0
- package/config/esbuild.dev.config.js +46 -0
- package/config/esbuild.react.config.js +42 -0
- package/jest.config.ts +14 -0
- package/package.json +135 -193
- package/react-dist/components/DuffelAncillaries/Card.d.ts +14 -0
- package/react-dist/components/DuffelAncillaries/Counter.d.ts +10 -0
- package/react-dist/components/DuffelAncillaries/DuffelAncillaries.d.ts +3 -0
- package/react-dist/components/DuffelAncillaries/DuffelAncillariesCustomElement.d.ts +13 -0
- package/react-dist/components/DuffelAncillaries/bags/BaggageSelectionCard.d.ts +11 -0
- package/react-dist/components/DuffelAncillaries/bags/BaggageSelectionController.d.ts +13 -0
- package/react-dist/components/DuffelAncillaries/bags/BaggageSelectionModal.d.ts +11 -0
- package/react-dist/components/DuffelAncillaries/bags/BaggageSelectionModalBody.d.ts +11 -0
- package/react-dist/components/DuffelAncillaries/bags/BaggageSelectionModalBodyPassenger.d.ts +13 -0
- package/react-dist/components/DuffelAncillaries/bags/BaggageSelectionModalFooter.d.ts +14 -0
- package/react-dist/components/DuffelAncillaries/bags/BaggageSelectionModalHeader.d.ts +9 -0
- package/react-dist/components/DuffelAncillaries/bags/IncludedBaggageBanner.d.ts +7 -0
- package/react-dist/components/DuffelAncillaries/cancel_for_any_reason/CfarSelectionCard.d.ts +10 -0
- package/react-dist/components/DuffelAncillaries/cancel_for_any_reason/CfarSelectionModal.d.ts +11 -0
- package/react-dist/components/DuffelAncillaries/cancel_for_any_reason/CfarSelectionModalBody.d.ts +7 -0
- package/react-dist/components/DuffelAncillaries/cancel_for_any_reason/CfarSelectionModalBodyListItem.d.ts +4 -0
- package/react-dist/components/DuffelAncillaries/cancel_for_any_reason/CfarSelectionModalFooter.d.ts +11 -0
- package/react-dist/components/DuffelAncillaries/cancel_for_any_reason/CfarSelectionModalHeader.d.ts +2 -0
- package/react-dist/components/DuffelAncillaries/seats/Amenity.d.ts +6 -0
- package/react-dist/components/DuffelAncillaries/seats/DeckSelect.d.ts +15 -0
- package/react-dist/components/DuffelAncillaries/seats/Element.d.ts +15 -0
- package/react-dist/components/DuffelAncillaries/seats/EmptyElement.d.ts +2 -0
- package/react-dist/components/DuffelAncillaries/seats/ExitElement.d.ts +6 -0
- package/react-dist/components/DuffelAncillaries/seats/Legend.d.ts +12 -0
- package/react-dist/components/DuffelAncillaries/seats/Row.d.ts +13 -0
- package/react-dist/components/DuffelAncillaries/seats/RowSection.d.ts +17 -0
- package/react-dist/components/DuffelAncillaries/seats/SeatElement.d.ts +13 -0
- package/react-dist/components/DuffelAncillaries/seats/SeatInfo.d.ts +7 -0
- package/react-dist/components/DuffelAncillaries/seats/SeatMap.d.ts +12 -0
- package/react-dist/components/DuffelAncillaries/seats/SeatMapUnavailable.d.ts +2 -0
- package/react-dist/components/DuffelAncillaries/seats/SeatSelectionCard.d.ts +13 -0
- package/react-dist/components/DuffelAncillaries/seats/SeatSelectionModal.d.ts +13 -0
- package/react-dist/components/DuffelAncillaries/seats/SeatSelectionModalBody.d.ts +4 -0
- package/react-dist/components/DuffelAncillaries/seats/SeatSelectionModalFooter.d.ts +16 -0
- package/react-dist/components/DuffelAncillaries/seats/SeatSelectionModalHeader.d.ts +10 -0
- package/react-dist/components/DuffelAncillaries/seats/SeatUnavailable.d.ts +5 -0
- package/react-dist/components/DuffelPayments/DuffelPayments.d.ts +11 -0
- package/react-dist/components/DuffelPayments/DuffelPaymentsCustomElement.d.ts +14 -0
- package/react-dist/components/shared/AnimatedLoaderEllipsis.d.ts +2 -0
- package/react-dist/components/shared/Button.d.ts +23 -0
- package/react-dist/components/shared/ErrorBoundary.d.ts +13 -0
- package/react-dist/components/shared/FetchOfferErrorState.d.ts +5 -0
- package/react-dist/components/shared/Icon.d.ts +44 -0
- package/react-dist/components/shared/IconButton.d.ts +16 -0
- package/react-dist/components/shared/Modal.d.ts +11 -0
- package/react-dist/components/shared/NonIdealState.d.ts +4 -0
- package/react-dist/components/shared/Stamp.d.ts +7 -0
- package/react-dist/components/shared/Tabs.d.ts +16 -0
- package/react-dist/custom-elements.d.ts +6 -0
- package/react-dist/custom-elements.js +37 -0
- package/react-dist/custom-elements.js.map +7 -0
- package/react-dist/index.d.ts +7 -0
- package/react-dist/index.js +37 -0
- package/react-dist/index.js.map +7 -0
- package/react-dist/lib/captureErrorInSentry.d.ts +1 -0
- package/react-dist/lib/compileCreateOrderPayload.d.ts +14 -0
- package/react-dist/lib/createPriceFormatters.d.ts +12 -0
- package/react-dist/lib/fetchFromDuffelAPI.d.ts +8 -0
- package/react-dist/lib/fetchFromFixtures.d.ts +4 -0
- package/react-dist/lib/formatAvailableServices.d.ts +12 -0
- package/react-dist/lib/formatDate.d.ts +2 -0
- package/react-dist/lib/formatSeatMaps.d.ts +4 -0
- package/react-dist/lib/getBaggageServiceDescription.d.ts +2 -0
- package/react-dist/lib/getCabinsForSegmentAndDeck.d.ts +2 -0
- package/react-dist/lib/getCurrencyForSeatMaps.d.ts +10 -0
- package/react-dist/lib/getCurrencyForServices.d.ts +11 -0
- package/react-dist/lib/getFirstSeatElementMatchingCriteria.d.ts +3 -0
- package/react-dist/lib/getPassengerBySegmentList.d.ts +6 -0
- package/react-dist/lib/getPassengerInitials.d.ts +1 -0
- package/react-dist/lib/getPassengerMapById.d.ts +3 -0
- package/react-dist/lib/getPassengerName.d.ts +3 -0
- package/react-dist/lib/getRowNumber.d.ts +2 -0
- package/react-dist/lib/getSegmentList.d.ts +2 -0
- package/react-dist/lib/getServicePriceMapById.d.ts +3 -0
- package/react-dist/lib/getSymbols.d.ts +2 -0
- package/react-dist/lib/getTotalAmountForServices.d.ts +6 -0
- package/react-dist/lib/getTotalQuantity.d.ts +2 -0
- package/react-dist/lib/hasService.d.ts +2 -0
- package/react-dist/lib/hasServiceOfSameMetadataTypeAlreadyBeenSelected.d.ts +3 -0
- package/react-dist/lib/hasWings.d.ts +2 -0
- package/react-dist/lib/isBaggageService.d.ts +2 -0
- package/react-dist/lib/isCancelForAnyReasonService.d.ts +2 -0
- package/react-dist/lib/isFixtureOfferId.d.ts +2 -0
- package/react-dist/lib/isPayloadComplete.d.ts +2 -0
- package/react-dist/lib/isSeatElement.d.ts +2 -0
- package/react-dist/lib/logging.d.ts +46 -0
- package/react-dist/lib/moneyStringFormatter.d.ts +8 -0
- package/react-dist/lib/offerIsExpired.d.ts +2 -0
- package/react-dist/lib/retrieveOffer.d.ts +2 -0
- package/react-dist/lib/retrieveOfferFromDuffelAPI.d.ts +1 -0
- package/react-dist/lib/retrieveSeatMaps.d.ts +2 -0
- package/react-dist/lib/retrieveSeatMapsFromDuffelAPI.d.ts +1 -0
- package/react-dist/lib/setBodyScrollability.d.ts +1 -0
- package/react-dist/lib/validateProps.d.ts +7 -0
- package/react-dist/lib/withPlural.d.ts +1 -0
- package/react-dist/types/Aircraft.d.ts +14 -0
- package/react-dist/types/Airline.d.ts +14 -0
- package/react-dist/types/Airport.d.ts +44 -0
- package/react-dist/types/City.d.ts +18 -0
- package/react-dist/types/CreateOrderPayload.d.ts +72 -0
- package/react-dist/types/CurrencyConversion.d.ts +10 -0
- package/react-dist/types/DuffelAncillariesProps.d.ts +70 -0
- package/react-dist/types/Offer.d.ts +711 -0
- package/react-dist/types/Order.d.ts +8 -0
- package/react-dist/types/Place.d.ts +8 -0
- package/react-dist/types/SeatMap.d.ts +190 -0
- package/react-dist/types/index.d.ts +11 -0
- package/scripts/generate-fixture.ts +200 -0
- package/scripts/upload-to-cdn.sh +34 -0
- package/scripts.tsconfig.json +11 -0
- package/src/components/DuffelAncillaries/Card.tsx +126 -0
- package/src/components/DuffelAncillaries/Counter.tsx +40 -0
- package/src/components/DuffelAncillaries/DuffelAncillaries.tsx +344 -0
- package/src/components/DuffelAncillaries/DuffelAncillariesCustomElement.tsx +124 -0
- package/src/components/DuffelAncillaries/bags/BaggageSelectionCard.tsx +96 -0
- package/src/components/DuffelAncillaries/bags/BaggageSelectionController.tsx +88 -0
- package/src/components/DuffelAncillaries/bags/BaggageSelectionModal.tsx +81 -0
- package/src/components/DuffelAncillaries/bags/BaggageSelectionModalBody.tsx +60 -0
- package/src/components/DuffelAncillaries/bags/BaggageSelectionModalBodyPassenger.tsx +122 -0
- package/src/components/DuffelAncillaries/bags/BaggageSelectionModalFooter.tsx +81 -0
- package/src/components/DuffelAncillaries/bags/BaggageSelectionModalHeader.tsx +76 -0
- package/src/components/DuffelAncillaries/bags/IncludedBaggageBanner.tsx +51 -0
- package/src/components/DuffelAncillaries/cancel_for_any_reason/CfarSelectionCard.tsx +90 -0
- package/src/components/DuffelAncillaries/cancel_for_any_reason/CfarSelectionModal.tsx +63 -0
- package/src/components/DuffelAncillaries/cancel_for_any_reason/CfarSelectionModalBody.tsx +56 -0
- package/src/components/DuffelAncillaries/cancel_for_any_reason/CfarSelectionModalBodyListItem.tsx +11 -0
- package/src/components/DuffelAncillaries/cancel_for_any_reason/CfarSelectionModalFooter.tsx +74 -0
- package/src/components/DuffelAncillaries/cancel_for_any_reason/CfarSelectionModalHeader.tsx +9 -0
- package/src/components/DuffelAncillaries/seats/Amenity.tsx +21 -0
- package/src/components/DuffelAncillaries/seats/DeckSelect.tsx +27 -0
- package/src/components/DuffelAncillaries/seats/Element.tsx +52 -0
- package/src/components/DuffelAncillaries/seats/EmptyElement.tsx +5 -0
- package/src/components/DuffelAncillaries/seats/ExitElement.tsx +17 -0
- package/src/components/DuffelAncillaries/seats/Legend.tsx +60 -0
- package/src/components/DuffelAncillaries/seats/Row.tsx +47 -0
- package/src/components/DuffelAncillaries/seats/RowSection.tsx +78 -0
- package/src/components/DuffelAncillaries/seats/SeatElement.tsx +120 -0
- package/src/components/DuffelAncillaries/seats/SeatInfo.tsx +32 -0
- package/src/components/DuffelAncillaries/seats/SeatMap.tsx +81 -0
- package/src/components/DuffelAncillaries/seats/SeatMapUnavailable.tsx +21 -0
- package/src/components/DuffelAncillaries/seats/SeatSelectionCard.tsx +103 -0
- package/src/components/DuffelAncillaries/seats/SeatSelectionModal.tsx +142 -0
- package/src/components/DuffelAncillaries/seats/SeatSelectionModalBody.tsx +13 -0
- package/src/components/DuffelAncillaries/seats/SeatSelectionModalFooter.tsx +82 -0
- package/src/components/DuffelAncillaries/seats/SeatSelectionModalHeader.tsx +87 -0
- package/src/components/DuffelAncillaries/seats/SeatUnavailable.tsx +14 -0
- package/src/components/DuffelPayments/DuffelPayments.tsx +218 -0
- package/src/components/DuffelPayments/DuffelPaymentsCustomElement.tsx +130 -0
- package/src/components/shared/AnimatedLoaderEllipsis.tsx +5 -0
- package/src/components/shared/Button.tsx +63 -0
- package/src/components/shared/ErrorBoundary.tsx +54 -0
- package/src/components/shared/FetchOfferErrorState.tsx +35 -0
- package/src/components/shared/Icon.tsx +152 -0
- package/src/components/shared/IconButton.tsx +42 -0
- package/src/components/shared/Modal.tsx +40 -0
- package/src/components/shared/NonIdealState.tsx +28 -0
- package/src/components/shared/Stamp.tsx +29 -0
- package/src/components/shared/Tabs.tsx +36 -0
- package/src/custom-elements.ts +13 -0
- package/src/examples/client-side/README.md +30 -0
- package/src/examples/client-side/index.html +57 -0
- package/src/examples/full-stack/README.md +34 -0
- package/src/examples/full-stack/index.html +48 -0
- package/src/examples/full-stack/server.mjs +158 -0
- package/src/examples/just-typescript/README.md +37 -0
- package/src/examples/just-typescript/package.json +16 -0
- package/src/examples/just-typescript/src/index.html +23 -0
- package/src/examples/just-typescript/src/index.ts +36 -0
- package/src/examples/just-typescript/yarn.lock +154 -0
- 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/payments-just-typescript/yarn.lock +154 -0
- package/src/examples/react-app/README.md +37 -0
- package/src/examples/react-app/package.json +20 -0
- package/src/examples/react-app/src/index.html +19 -0
- package/src/examples/react-app/src/index.tsx +48 -0
- package/src/examples/react-app/yarn.lock +219 -0
- package/src/fixtures/offers/off_0000AUde3KwTztSRK1cznH.json +497 -0
- package/src/fixtures/offers/off_0000AVx4lUFFKW8PsPeQeQ.json +307 -0
- package/src/fixtures/offers/off_1.json +497 -0
- package/src/fixtures/passengers/mock_passengers.ts +26 -0
- package/src/fixtures/seat-maps/off_0000AUde3KwTztSRK1cznH.json +6852 -0
- package/src/fixtures/seat-maps/off_0000AVx4lUFFKW8PsPeQeQ.json +1 -0
- package/src/fixtures/seat-maps/off_1.json +6852 -0
- package/src/index.ts +7 -0
- package/src/lib/captureErrorInSentry.ts +42 -0
- package/src/lib/compileCreateOrderPayload.ts +63 -0
- package/src/lib/createPriceFormatters.ts +73 -0
- package/src/lib/fetchFromDuffelAPI.ts +54 -0
- package/src/lib/fetchFromFixtures.ts +18 -0
- package/src/lib/formatAvailableServices.ts +91 -0
- package/src/lib/formatDate.ts +20 -0
- package/src/lib/formatSeatMaps.ts +81 -0
- package/src/lib/getBaggageServiceDescription.ts +42 -0
- package/src/lib/getCabinsForSegmentAndDeck.ts +4 -0
- package/src/lib/getCurrencyForSeatMaps.ts +22 -0
- package/src/lib/getCurrencyForServices.ts +24 -0
- package/src/lib/getFirstSeatElementMatchingCriteria.ts +22 -0
- package/src/lib/getPassengerBySegmentList.ts +10 -0
- package/src/lib/getPassengerInitials.ts +6 -0
- package/src/lib/getPassengerMapById.ts +17 -0
- package/src/lib/getPassengerName.ts +37 -0
- package/src/lib/getRowNumber.ts +16 -0
- package/src/lib/getSegmentList.ts +7 -0
- package/src/lib/getServicePriceMapById.ts +20 -0
- package/src/lib/getSymbols.ts +22 -0
- package/src/lib/getTotalAmountForServices.ts +72 -0
- package/src/lib/getTotalQuantity.ts +5 -0
- package/src/lib/hasService.ts +24 -0
- package/src/lib/hasServiceOfSameMetadataTypeAlreadyBeenSelected.ts +35 -0
- package/src/lib/hasWings.ts +8 -0
- package/src/lib/isBaggageService.ts +8 -0
- package/src/lib/isCancelForAnyReasonService.ts +9 -0
- package/src/lib/isFixtureOfferId.ts +4 -0
- package/src/lib/isPayloadComplete.ts +11 -0
- package/src/lib/isSeatElement.ts +10 -0
- package/src/lib/logging.ts +120 -0
- package/src/lib/moneyStringFormatter.ts +34 -0
- package/src/lib/offerIsExpired.ts +5 -0
- package/src/lib/retrieveOffer.ts +54 -0
- package/src/lib/retrieveOfferFromDuffelAPI.ts +13 -0
- package/src/lib/retrieveSeatMaps.ts +55 -0
- package/src/lib/retrieveSeatMapsFromDuffelAPI.ts +13 -0
- package/src/lib/setBodyScrollability.ts +7 -0
- package/src/lib/validateProps.ts +37 -0
- package/src/lib/withPlural.ts +8 -0
- package/src/stories/BaggageSelectionModalHeader.stories.tsx +21 -0
- package/src/stories/Button.stories.tsx +69 -0
- package/src/stories/DuffelAncillaries.stories.tsx +126 -0
- package/src/stories/DuffelPayments.stories.tsx +34 -0
- package/src/stories/Icon.stories.tsx +35 -0
- package/src/stories/IconButton.stories.tsx +25 -0
- package/src/styles/colors.css +22 -0
- package/src/styles/components/Amenity.css +23 -0
- package/src/styles/components/BaggageDisplay.css +25 -0
- package/src/styles/components/Button.css +161 -0
- package/src/styles/components/Card.css +52 -0
- package/src/styles/components/CfarSelectionModal.css +34 -0
- package/src/styles/components/Counter.css +18 -0
- package/src/styles/components/DuffelPayments.css +42 -0
- package/src/styles/components/IconButton.css +63 -0
- package/src/styles/components/Legend.css +58 -0
- package/src/styles/components/Loader.css +37 -0
- package/src/styles/components/LoadingState.css +81 -0
- package/src/styles/components/Modal.css +84 -0
- package/src/styles/components/PassengerSelect.css +93 -0
- package/src/styles/components/PassengersLayout.css +90 -0
- package/src/styles/components/Row.css +70 -0
- package/src/styles/components/Seat.css +57 -0
- package/src/styles/components/SeatInfo.css +61 -0
- package/src/styles/components/SeatMap.css +24 -0
- package/src/styles/components/SeatSelect.css +92 -0
- package/src/styles/components/Segment.css +17 -0
- package/src/styles/components/SelectionSegment.css +10 -0
- package/src/styles/components/Summary.css +70 -0
- package/src/styles/components/Tabs.css +49 -0
- package/src/styles/flex.css +5 -0
- package/src/styles/font-families.css +47 -0
- package/src/styles/global.css +51 -0
- package/src/styles/margin.css +3 -0
- package/src/styles/spacing.css +18 -0
- package/src/styles/transitions.css +3 -0
- package/src/styles/typography.css +13 -0
- package/src/tests/components/DuffelAncillaries.test.tsx +342 -0
- package/src/tests/lib/createPriceFormatters.test.tsx +152 -0
- package/src/tests/lib/formatAvailableServices.test.tsx +79 -0
- package/src/tests/lib/formatSeatMaps.test.tsx +49 -0
- package/src/tests/lib/getCurrencyForServices.test.tsx +44 -0
- package/src/tests/lib/hasServiceOfSameMetadataTypeAlreadyBeenSelected.test.ts +86 -0
- package/src/tests/lib/logging.test.tsx +32 -0
- package/src/tests/lib/moneyStringFormatter.test.tsx +12 -0
- package/src/tests/lib/validateProps.test.tsx +57 -0
- package/src/types/Aircraft.ts +16 -0
- package/src/types/Airline.ts +16 -0
- package/src/types/Airport.ts +54 -0
- package/src/types/City.ts +21 -0
- package/src/types/CreateOrderPayload.ts +99 -0
- package/src/types/CurrencyConversion.ts +10 -0
- package/src/types/DuffelAncillariesProps.ts +108 -0
- package/src/types/Offer.ts +851 -0
- package/src/types/Order.ts +6 -0
- package/src/types/Place.ts +6 -0
- package/src/types/SeatMap.ts +231 -0
- package/src/types/index.ts +11 -0
- package/tsconfig.json +52 -0
- package/LICENSE +0 -21
- package/dist/AdditionalBaggage.esm.js +0 -1
- package/dist/AdditionalBaggage.js +0 -1
- package/dist/AdditionalBaggage.min.css +0 -408
- package/dist/AdditionalBaggage.umd.min.js +0 -2
- package/dist/AdditionalBaggage.umd.min.js.LICENSE.txt +0 -60
- package/dist/AdditionalBaggageSelection.esm.js +0 -1
- package/dist/AdditionalBaggageSelection.js +0 -1
- package/dist/AdditionalBaggageSelection.min.css +0 -744
- package/dist/AdditionalBaggageSelection.umd.min.js +0 -2
- package/dist/AdditionalBaggageSelection.umd.min.js.LICENSE.txt +0 -93
- package/dist/CardPayment.esm.js +0 -2
- package/dist/CardPayment.esm.js.LICENSE.txt +0 -6
- package/dist/CardPayment.js +0 -2
- package/dist/CardPayment.js.LICENSE.txt +0 -6
- package/dist/CardPayment.min.css +0 -233
- package/dist/CardPayment.umd.min.js +0 -2
- package/dist/CardPayment.umd.min.js.LICENSE.txt +0 -61
- package/dist/SeatSelection.esm.js +0 -1
- package/dist/SeatSelection.js +0 -1
- package/dist/SeatSelection.min.css +0 -1127
- package/dist/SeatSelection.umd.min.js +0 -2
- package/dist/SeatSelection.umd.min.js.LICENSE.txt +0 -60
- package/dist/duffel-components.d.ts +0 -1614
- package/dist/duffel-components.esm.js +0 -2
- package/dist/duffel-components.esm.js.LICENSE.txt +0 -6
- package/dist/duffel-components.js +0 -2
- package/dist/duffel-components.js.LICENSE.txt +0 -6
- package/dist/duffel-components.min.css +0 -1280
- package/dist/duffel-components.umd.min.js +0 -2
- package/dist/duffel-components.umd.min.js.LICENSE.txt +0 -102
package/package.json
CHANGED
|
@@ -1,221 +1,163 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@duffel/components",
|
|
3
|
-
"version": "
|
|
4
|
-
"
|
|
5
|
-
"
|
|
6
|
-
"
|
|
7
|
-
"
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
3
|
+
"version": "3.0.0",
|
|
4
|
+
"private": false,
|
|
5
|
+
"license": "MIT",
|
|
6
|
+
"main": "react-dist/index.js",
|
|
7
|
+
"exports": {
|
|
8
|
+
".": "./react-dist/index.js",
|
|
9
|
+
"./custom-elements": "./react-dist/custom-elements.js"
|
|
10
|
+
},
|
|
11
|
+
"maintainers": [
|
|
12
|
+
{
|
|
13
|
+
"name": "Duffel",
|
|
14
|
+
"email": "hello@duffel.com",
|
|
15
|
+
"url": "https://duffel.com"
|
|
16
|
+
}
|
|
17
|
+
],
|
|
11
18
|
"scripts": {
|
|
12
|
-
"
|
|
13
|
-
"build": "
|
|
14
|
-
"
|
|
15
|
-
"
|
|
16
|
-
"
|
|
19
|
+
"precdn-build": "rm -rf ./cdn-dist",
|
|
20
|
+
"cdn-build": "node config/esbuild.cdn.config.js",
|
|
21
|
+
"build-storybook": "storybook build",
|
|
22
|
+
"check-types": "tsc --project tsconfig.json --noEmit --emitDeclarationOnly false",
|
|
23
|
+
"dev": "node config/esbuild.dev.config.js",
|
|
24
|
+
"generate-fixture": "esbuild ./scripts/generate-fixture.ts --outfile=dist/scripts/generate-fixture.cjs --format=cjs --platform=node --bundle --tsconfig=scripts.tsconfig.json",
|
|
25
|
+
"postgenerate-fixture": "node dist/scripts/generate-fixture.cjs",
|
|
26
|
+
"generate-type-declarations": "tsc --project tsconfig.json",
|
|
27
|
+
"commit": "cz",
|
|
28
|
+
"lint": "eslint . --ext .ts,.tsx,.mjs,.js --max-warnings=0",
|
|
29
|
+
"pre-commit-check": "concurrently --raw \"yarn check-types\" \"yarn lint-staged\"",
|
|
30
|
+
"post-commit-check": "yarn commitlint --from main",
|
|
17
31
|
"prepare": "husky install",
|
|
18
|
-
"get-version": "echo $npm_package_version",
|
|
19
|
-
"release": "npx semantic-release --debug",
|
|
20
|
-
"commit": "git-cz",
|
|
21
|
-
"commitlint": "commitlint",
|
|
22
|
-
"storybook": "start-storybook -p 6006",
|
|
23
|
-
"build-storybook": "build-storybook",
|
|
24
|
-
"chromatic": "npx chromatic",
|
|
25
|
-
"create-dts": "dts-bundle-generator -o dist/duffel-components.d.ts src/index.ts --no-check",
|
|
26
|
-
"server": "http-server -p 1234",
|
|
27
|
-
"e2e": "npx playwright test",
|
|
28
|
-
"e2e:debug": "PWDEBUG=1 npx playwright test",
|
|
29
32
|
"prettier": "prettier --write --loglevel=warn .",
|
|
30
33
|
"prettier-check": "prettier --check .",
|
|
31
|
-
"
|
|
32
|
-
"
|
|
34
|
+
"prereact-build": "rm -rf ./react-dist",
|
|
35
|
+
"react-build": "node config/esbuild.react.config.js",
|
|
36
|
+
"postreact-build": "yarn generate-type-declarations",
|
|
37
|
+
"run-client-side-server": "http-server src/examples/client-side --port=6262",
|
|
38
|
+
"run-example:client-side": "concurrently \"yarn dev\" \"yarn run-client-side-server\"",
|
|
39
|
+
"run-example:full-stack": "concurrently \"yarn dev\" \"yarn run-full-stack-server\"",
|
|
40
|
+
"run-full-stack-server": "node src/examples/full-stack/server.mjs",
|
|
41
|
+
"storybook": "storybook dev -p 6006",
|
|
42
|
+
"test": "LANG='en_US' TZ=UTC yarn jest",
|
|
43
|
+
"preupload-to-cdn": "yarn cdn-build",
|
|
44
|
+
"upload-to-cdn": "bash ./scripts/upload-to-cdn.sh",
|
|
45
|
+
"prerelease": "yarn react-build",
|
|
46
|
+
"release": "yarn semantic-release",
|
|
47
|
+
"get-version": "cat package.json | jq '.version'"
|
|
33
48
|
},
|
|
34
|
-
"
|
|
35
|
-
"
|
|
36
|
-
"
|
|
49
|
+
"husky": {
|
|
50
|
+
"hooks": {
|
|
51
|
+
"pre-commit": "yarn pre-commit-check",
|
|
52
|
+
"post-commit": "yarn post-commit"
|
|
37
53
|
}
|
|
38
54
|
},
|
|
39
55
|
"lint-staged": {
|
|
40
|
-
"*.{ts,tsx}": [
|
|
41
|
-
"eslint",
|
|
42
|
-
"prettier --write"
|
|
43
|
-
],
|
|
44
|
-
"*.{js,jsx,md,yml,yaml}": [
|
|
56
|
+
"*.{ts,tsx,mjs,js}": [
|
|
57
|
+
"eslint --fix",
|
|
45
58
|
"prettier --write"
|
|
46
59
|
]
|
|
47
60
|
},
|
|
48
|
-
"files": [
|
|
49
|
-
"dist/**"
|
|
50
|
-
],
|
|
51
|
-
"peerDependencies": {
|
|
52
|
-
"react": "^16.8.0 || ^17 || ^18",
|
|
53
|
-
"react-dom": "^16.8.0 || ^17 || ^18"
|
|
54
|
-
},
|
|
55
61
|
"dependencies": {
|
|
56
|
-
"@
|
|
57
|
-
"@stripe/react-stripe-js": "1.
|
|
58
|
-
"@stripe/stripe-js": "^1.
|
|
59
|
-
"
|
|
60
|
-
"
|
|
61
|
-
"
|
|
62
|
-
"ieee754": "1.2.1",
|
|
63
|
-
"prop-types": "15.8.1",
|
|
64
|
-
"react-popper": "2.2.5",
|
|
65
|
-
"smoothscroll-polyfill": "0.4.4"
|
|
62
|
+
"@sentry/browser": "^7.43.0",
|
|
63
|
+
"@stripe/react-stripe-js": "^2.1.0",
|
|
64
|
+
"@stripe/stripe-js": "^1.54.0",
|
|
65
|
+
"classnames": "^2.3.2",
|
|
66
|
+
"react": "18.2.0",
|
|
67
|
+
"react-dom": "18.2.0"
|
|
66
68
|
},
|
|
67
69
|
"devDependencies": {
|
|
68
|
-
"@babel/core": "7.21.4",
|
|
69
|
-
"@babel/
|
|
70
|
-
"@babel/
|
|
71
|
-
"@babel/preset-
|
|
72
|
-
"@
|
|
73
|
-
"@
|
|
74
|
-
"@
|
|
75
|
-
"@
|
|
76
|
-
"@
|
|
77
|
-
"@
|
|
78
|
-
"@
|
|
79
|
-
"@
|
|
80
|
-
"@
|
|
81
|
-
"@storybook/
|
|
82
|
-
"@storybook/
|
|
83
|
-
"@storybook/
|
|
84
|
-
"@
|
|
85
|
-
"@
|
|
86
|
-
"@
|
|
87
|
-
"@
|
|
88
|
-
"@
|
|
89
|
-
"@
|
|
90
|
-
"@
|
|
91
|
-
"@
|
|
92
|
-
"
|
|
93
|
-
"
|
|
94
|
-
"
|
|
95
|
-
"
|
|
96
|
-
"
|
|
97
|
-
"
|
|
98
|
-
"
|
|
99
|
-
"
|
|
100
|
-
"
|
|
101
|
-
"
|
|
102
|
-
"
|
|
103
|
-
"
|
|
104
|
-
"
|
|
105
|
-
"
|
|
106
|
-
"
|
|
107
|
-
"
|
|
108
|
-
"
|
|
109
|
-
"
|
|
110
|
-
"
|
|
111
|
-
"
|
|
112
|
-
"
|
|
113
|
-
"
|
|
114
|
-
"
|
|
115
|
-
"
|
|
116
|
-
"
|
|
117
|
-
"
|
|
118
|
-
"
|
|
119
|
-
"
|
|
120
|
-
"node-polyfill-webpack-plugin": "2.0.1",
|
|
121
|
-
"postcss": "8.4.21",
|
|
122
|
-
"postcss-combine-duplicated-selectors": "10.0.3",
|
|
123
|
-
"postcss-discard-duplicates": "5.1.0",
|
|
124
|
-
"postcss-import": "14.1.0",
|
|
125
|
-
"postcss-loader": "7.0.2",
|
|
126
|
-
"postcss-nested": "5.0.6",
|
|
127
|
-
"prettier": "2.7.1",
|
|
128
|
-
"react": "18.2.0",
|
|
129
|
-
"react-dom": "18.2.0",
|
|
130
|
-
"semantic-release": "19.0.5",
|
|
131
|
-
"ts-jest": "26.5.6",
|
|
132
|
-
"ts-loader": "9.3.1",
|
|
133
|
-
"ts-node": "10.9.1",
|
|
134
|
-
"tslib": "2.4.0",
|
|
135
|
-
"types-webpack-bundler": "1.0.2",
|
|
136
|
-
"typescript": "4.7.4",
|
|
137
|
-
"webpack": "5.76.0",
|
|
138
|
-
"webpack-cli": "4.10.0",
|
|
139
|
-
"webpack-node-externals": "3.0.0"
|
|
70
|
+
"@babel/core": "^7.21.4",
|
|
71
|
+
"@babel/preset-env": "^7.21.4",
|
|
72
|
+
"@babel/preset-react": "^7.18.6",
|
|
73
|
+
"@babel/preset-typescript": "^7.21.4",
|
|
74
|
+
"@commitlint/cli": "^17.6.5",
|
|
75
|
+
"@commitlint/config-conventional": "^17.6.5",
|
|
76
|
+
"@duffel/api": "^1.26.0",
|
|
77
|
+
"@sentry/esbuild-plugin": "^0.7.0",
|
|
78
|
+
"@storybook/addon-essentials": "^7.0.2",
|
|
79
|
+
"@storybook/addon-interactions": "^7.0.2",
|
|
80
|
+
"@storybook/addon-links": "^7.0.2",
|
|
81
|
+
"@storybook/addon-storyshots": "^7.0.4",
|
|
82
|
+
"@storybook/blocks": "^7.0.2",
|
|
83
|
+
"@storybook/react": "^7.0.2",
|
|
84
|
+
"@storybook/react-webpack5": "^7.0.2",
|
|
85
|
+
"@storybook/testing-library": "^0.1.0",
|
|
86
|
+
"@testing-library/react": "^14.0.0",
|
|
87
|
+
"@types/jest": "^29.5.0",
|
|
88
|
+
"@types/node": "^18.15.11",
|
|
89
|
+
"@types/prompts": "^2.4.4",
|
|
90
|
+
"@types/react": "^18.0.32",
|
|
91
|
+
"@types/react-dom": "^18.0.11",
|
|
92
|
+
"@typescript-eslint/eslint-plugin": "^5.43.0",
|
|
93
|
+
"@typescript-eslint/parser": "^5.57.0",
|
|
94
|
+
"babel-jest": "^29.5.0",
|
|
95
|
+
"commitizen": "^4.3.0",
|
|
96
|
+
"concurrently": "^8.0.0",
|
|
97
|
+
"cz-conventional-changelog": "^3.3.0",
|
|
98
|
+
"dotenv": "^16.0.3",
|
|
99
|
+
"esbuild": "0.17.19",
|
|
100
|
+
"esbuild-copy-static-files": "^0.1.0",
|
|
101
|
+
"eslint": "^8.0.1",
|
|
102
|
+
"eslint-config-prettier": "^8.8.0",
|
|
103
|
+
"eslint-plugin-import": "^2.25.2",
|
|
104
|
+
"eslint-plugin-jsx-a11y": "^6.7.1",
|
|
105
|
+
"eslint-plugin-react": "^7.32.2",
|
|
106
|
+
"eslint-plugin-react-hooks": "^4.6.0",
|
|
107
|
+
"eslint-plugin-storybook": "^0.6.11",
|
|
108
|
+
"http-server": "^14.1.1",
|
|
109
|
+
"husky": "^8.0.3",
|
|
110
|
+
"jest": "^29.5.0",
|
|
111
|
+
"jest-environment-jsdom": "^29.5.0",
|
|
112
|
+
"lint-staged": "^13.2.0",
|
|
113
|
+
"prettier": "^2.8.7",
|
|
114
|
+
"prettier-plugin-organize-imports": "^3.2.2",
|
|
115
|
+
"prompts": "^2.4.2",
|
|
116
|
+
"prop-types": "^15.8.1",
|
|
117
|
+
"semantic-release": "^21.0.3",
|
|
118
|
+
"storybook": "^7.0.2",
|
|
119
|
+
"ts-node": "^10.9.1",
|
|
120
|
+
"tsconfig-paths-webpack-plugin": "^4.0.1",
|
|
121
|
+
"typescript": "5.0.4"
|
|
140
122
|
},
|
|
141
123
|
"engines": {
|
|
142
|
-
"node": "
|
|
124
|
+
"node": "~18.*"
|
|
125
|
+
},
|
|
126
|
+
"config": {
|
|
127
|
+
"commitizen": {
|
|
128
|
+
"path": "./node_modules/cz-conventional-changelog"
|
|
129
|
+
}
|
|
143
130
|
},
|
|
131
|
+
"plugins": [
|
|
132
|
+
[
|
|
133
|
+
"@semantic-release/commit-analyzer"
|
|
134
|
+
],
|
|
135
|
+
[
|
|
136
|
+
"@semantic-release/release-notes-generator"
|
|
137
|
+
],
|
|
138
|
+
"@semantic-release/npm",
|
|
139
|
+
"@semantic-release/github"
|
|
140
|
+
],
|
|
144
141
|
"release": {
|
|
145
142
|
"branches": [
|
|
146
|
-
|
|
147
|
-
"name": "main"
|
|
148
|
-
}
|
|
149
|
-
],
|
|
150
|
-
"plugins": [
|
|
151
|
-
[
|
|
152
|
-
"@semantic-release/commit-analyzer",
|
|
153
|
-
{
|
|
154
|
-
"preset": "angular",
|
|
155
|
-
"releaseRules": [
|
|
156
|
-
{
|
|
157
|
-
"type": "docs",
|
|
158
|
-
"scope": "readme",
|
|
159
|
-
"release": "patch"
|
|
160
|
-
},
|
|
161
|
-
{
|
|
162
|
-
"type": "refactor",
|
|
163
|
-
"release": "patch"
|
|
164
|
-
},
|
|
165
|
-
{
|
|
166
|
-
"breaking": true,
|
|
167
|
-
"release": "major"
|
|
168
|
-
},
|
|
169
|
-
{
|
|
170
|
-
"type": "build",
|
|
171
|
-
"scope": "deps",
|
|
172
|
-
"release": "patch"
|
|
173
|
-
}
|
|
174
|
-
]
|
|
175
|
-
}
|
|
176
|
-
],
|
|
177
|
-
[
|
|
178
|
-
"@semantic-release/release-notes-generator"
|
|
179
|
-
],
|
|
180
|
-
[
|
|
181
|
-
"@semantic-release/git",
|
|
182
|
-
{
|
|
183
|
-
"assets": [
|
|
184
|
-
"CHANGELOG.md"
|
|
185
|
-
]
|
|
186
|
-
}
|
|
187
|
-
],
|
|
188
|
-
"@semantic-release/npm",
|
|
189
|
-
"@semantic-release/github"
|
|
143
|
+
"main"
|
|
190
144
|
]
|
|
191
145
|
},
|
|
192
|
-
"
|
|
193
|
-
|
|
194
|
-
"
|
|
195
|
-
"
|
|
196
|
-
"glob-parent": "^6.0.0",
|
|
197
|
-
"browserslist": "^4.16.5",
|
|
198
|
-
"trim": "^1.0.0",
|
|
199
|
-
"@types/react-dom": "18.0.11",
|
|
200
|
-
"@types/react": "18.0.34",
|
|
201
|
-
"loader-utils": "^2.0.4"
|
|
146
|
+
"description": "Component library to build your travel product with Duffel.",
|
|
147
|
+
"repository": {
|
|
148
|
+
"type": "git",
|
|
149
|
+
"url": "git+https://github.com/duffelhq/duffel-checkout.git"
|
|
202
150
|
},
|
|
203
151
|
"keywords": [
|
|
204
|
-
"
|
|
205
|
-
"
|
|
206
|
-
"
|
|
207
|
-
"
|
|
208
|
-
"seat",
|
|
209
|
-
"selections",
|
|
210
|
-
"duffel",
|
|
211
|
-
"duffelhq",
|
|
212
|
-
"seat",
|
|
213
|
-
"seatmap",
|
|
214
|
-
"payment",
|
|
215
|
-
"payments",
|
|
152
|
+
"Duffel",
|
|
153
|
+
"ancillaries",
|
|
154
|
+
"seats",
|
|
155
|
+
"seat maps",
|
|
216
156
|
"baggage",
|
|
217
|
-
"
|
|
157
|
+
"travel"
|
|
218
158
|
],
|
|
219
|
-
"
|
|
220
|
-
|
|
159
|
+
"bugs": {
|
|
160
|
+
"url": "https://github.com/duffelhq/duffel-checkout/issues"
|
|
161
|
+
},
|
|
162
|
+
"homepage": "https://github.com/duffelhq/duffel-checkout#readme"
|
|
221
163
|
}
|
|
@@ -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
|
+
/// <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 {};
|
|
@@ -0,0 +1,11 @@
|
|
|
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>;
|
|
@@ -0,0 +1,13 @@
|
|
|
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 {};
|
|
@@ -0,0 +1,11 @@
|
|
|
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>;
|
|
@@ -0,0 +1,11 @@
|
|
|
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>;
|
|
@@ -0,0 +1,13 @@
|
|
|
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>;
|
|
@@ -0,0 +1,14 @@
|
|
|
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>;
|
|
@@ -0,0 +1,9 @@
|
|
|
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>;
|
|
@@ -0,0 +1,7 @@
|
|
|
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 {};
|
|
@@ -0,0 +1,10 @@
|
|
|
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>;
|
|
@@ -0,0 +1,11 @@
|
|
|
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
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
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
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
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>;
|
|
@@ -0,0 +1,15 @@
|
|
|
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>;
|
|
@@ -0,0 +1,15 @@
|
|
|
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 {};
|
|
@@ -0,0 +1,12 @@
|
|
|
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>;
|