@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.
Files changed (345) hide show
  1. package/.circleci/config.yml +67 -0
  2. package/.eslintrc.js +47 -0
  3. package/.github/renovate.json +16 -0
  4. package/.github/workflows/autoapprove.yml +18 -0
  5. package/.github/workflows/release.yml +89 -0
  6. package/.husky/post-commit +4 -0
  7. package/.husky/pre-commit +4 -0
  8. package/.nvmrc +1 -0
  9. package/.prettierignore +2 -0
  10. package/.storybook/Storyshots.test.js +3 -0
  11. package/.storybook/__snapshots__/Storyshots.test.js.snap +48318 -0
  12. package/.storybook/main.ts +33 -0
  13. package/.storybook/preview.tsx +28 -0
  14. package/.tool-versions +1 -0
  15. package/CONTRIBUTING.md +83 -0
  16. package/README.md +53 -15
  17. package/__mocks__/styleMock.js +6 -0
  18. package/babel.config.js +20 -0
  19. package/commitlint.config.js +4 -0
  20. package/config/esbuild.base.config.js +18 -0
  21. package/config/esbuild.cdn.config.js +51 -0
  22. package/config/esbuild.dev.config.js +46 -0
  23. package/config/esbuild.react.config.js +42 -0
  24. package/jest.config.ts +14 -0
  25. package/package.json +135 -193
  26. package/react-dist/components/DuffelAncillaries/Card.d.ts +14 -0
  27. package/react-dist/components/DuffelAncillaries/Counter.d.ts +10 -0
  28. package/react-dist/components/DuffelAncillaries/DuffelAncillaries.d.ts +3 -0
  29. package/react-dist/components/DuffelAncillaries/DuffelAncillariesCustomElement.d.ts +13 -0
  30. package/react-dist/components/DuffelAncillaries/bags/BaggageSelectionCard.d.ts +11 -0
  31. package/react-dist/components/DuffelAncillaries/bags/BaggageSelectionController.d.ts +13 -0
  32. package/react-dist/components/DuffelAncillaries/bags/BaggageSelectionModal.d.ts +11 -0
  33. package/react-dist/components/DuffelAncillaries/bags/BaggageSelectionModalBody.d.ts +11 -0
  34. package/react-dist/components/DuffelAncillaries/bags/BaggageSelectionModalBodyPassenger.d.ts +13 -0
  35. package/react-dist/components/DuffelAncillaries/bags/BaggageSelectionModalFooter.d.ts +14 -0
  36. package/react-dist/components/DuffelAncillaries/bags/BaggageSelectionModalHeader.d.ts +9 -0
  37. package/react-dist/components/DuffelAncillaries/bags/IncludedBaggageBanner.d.ts +7 -0
  38. package/react-dist/components/DuffelAncillaries/cancel_for_any_reason/CfarSelectionCard.d.ts +10 -0
  39. package/react-dist/components/DuffelAncillaries/cancel_for_any_reason/CfarSelectionModal.d.ts +11 -0
  40. package/react-dist/components/DuffelAncillaries/cancel_for_any_reason/CfarSelectionModalBody.d.ts +7 -0
  41. package/react-dist/components/DuffelAncillaries/cancel_for_any_reason/CfarSelectionModalBodyListItem.d.ts +4 -0
  42. package/react-dist/components/DuffelAncillaries/cancel_for_any_reason/CfarSelectionModalFooter.d.ts +11 -0
  43. package/react-dist/components/DuffelAncillaries/cancel_for_any_reason/CfarSelectionModalHeader.d.ts +2 -0
  44. package/react-dist/components/DuffelAncillaries/seats/Amenity.d.ts +6 -0
  45. package/react-dist/components/DuffelAncillaries/seats/DeckSelect.d.ts +15 -0
  46. package/react-dist/components/DuffelAncillaries/seats/Element.d.ts +15 -0
  47. package/react-dist/components/DuffelAncillaries/seats/EmptyElement.d.ts +2 -0
  48. package/react-dist/components/DuffelAncillaries/seats/ExitElement.d.ts +6 -0
  49. package/react-dist/components/DuffelAncillaries/seats/Legend.d.ts +12 -0
  50. package/react-dist/components/DuffelAncillaries/seats/Row.d.ts +13 -0
  51. package/react-dist/components/DuffelAncillaries/seats/RowSection.d.ts +17 -0
  52. package/react-dist/components/DuffelAncillaries/seats/SeatElement.d.ts +13 -0
  53. package/react-dist/components/DuffelAncillaries/seats/SeatInfo.d.ts +7 -0
  54. package/react-dist/components/DuffelAncillaries/seats/SeatMap.d.ts +12 -0
  55. package/react-dist/components/DuffelAncillaries/seats/SeatMapUnavailable.d.ts +2 -0
  56. package/react-dist/components/DuffelAncillaries/seats/SeatSelectionCard.d.ts +13 -0
  57. package/react-dist/components/DuffelAncillaries/seats/SeatSelectionModal.d.ts +13 -0
  58. package/react-dist/components/DuffelAncillaries/seats/SeatSelectionModalBody.d.ts +4 -0
  59. package/react-dist/components/DuffelAncillaries/seats/SeatSelectionModalFooter.d.ts +16 -0
  60. package/react-dist/components/DuffelAncillaries/seats/SeatSelectionModalHeader.d.ts +10 -0
  61. package/react-dist/components/DuffelAncillaries/seats/SeatUnavailable.d.ts +5 -0
  62. package/react-dist/components/DuffelPayments/DuffelPayments.d.ts +11 -0
  63. package/react-dist/components/DuffelPayments/DuffelPaymentsCustomElement.d.ts +14 -0
  64. package/react-dist/components/shared/AnimatedLoaderEllipsis.d.ts +2 -0
  65. package/react-dist/components/shared/Button.d.ts +23 -0
  66. package/react-dist/components/shared/ErrorBoundary.d.ts +13 -0
  67. package/react-dist/components/shared/FetchOfferErrorState.d.ts +5 -0
  68. package/react-dist/components/shared/Icon.d.ts +44 -0
  69. package/react-dist/components/shared/IconButton.d.ts +16 -0
  70. package/react-dist/components/shared/Modal.d.ts +11 -0
  71. package/react-dist/components/shared/NonIdealState.d.ts +4 -0
  72. package/react-dist/components/shared/Stamp.d.ts +7 -0
  73. package/react-dist/components/shared/Tabs.d.ts +16 -0
  74. package/react-dist/custom-elements.d.ts +6 -0
  75. package/react-dist/custom-elements.js +37 -0
  76. package/react-dist/custom-elements.js.map +7 -0
  77. package/react-dist/index.d.ts +7 -0
  78. package/react-dist/index.js +37 -0
  79. package/react-dist/index.js.map +7 -0
  80. package/react-dist/lib/captureErrorInSentry.d.ts +1 -0
  81. package/react-dist/lib/compileCreateOrderPayload.d.ts +14 -0
  82. package/react-dist/lib/createPriceFormatters.d.ts +12 -0
  83. package/react-dist/lib/fetchFromDuffelAPI.d.ts +8 -0
  84. package/react-dist/lib/fetchFromFixtures.d.ts +4 -0
  85. package/react-dist/lib/formatAvailableServices.d.ts +12 -0
  86. package/react-dist/lib/formatDate.d.ts +2 -0
  87. package/react-dist/lib/formatSeatMaps.d.ts +4 -0
  88. package/react-dist/lib/getBaggageServiceDescription.d.ts +2 -0
  89. package/react-dist/lib/getCabinsForSegmentAndDeck.d.ts +2 -0
  90. package/react-dist/lib/getCurrencyForSeatMaps.d.ts +10 -0
  91. package/react-dist/lib/getCurrencyForServices.d.ts +11 -0
  92. package/react-dist/lib/getFirstSeatElementMatchingCriteria.d.ts +3 -0
  93. package/react-dist/lib/getPassengerBySegmentList.d.ts +6 -0
  94. package/react-dist/lib/getPassengerInitials.d.ts +1 -0
  95. package/react-dist/lib/getPassengerMapById.d.ts +3 -0
  96. package/react-dist/lib/getPassengerName.d.ts +3 -0
  97. package/react-dist/lib/getRowNumber.d.ts +2 -0
  98. package/react-dist/lib/getSegmentList.d.ts +2 -0
  99. package/react-dist/lib/getServicePriceMapById.d.ts +3 -0
  100. package/react-dist/lib/getSymbols.d.ts +2 -0
  101. package/react-dist/lib/getTotalAmountForServices.d.ts +6 -0
  102. package/react-dist/lib/getTotalQuantity.d.ts +2 -0
  103. package/react-dist/lib/hasService.d.ts +2 -0
  104. package/react-dist/lib/hasServiceOfSameMetadataTypeAlreadyBeenSelected.d.ts +3 -0
  105. package/react-dist/lib/hasWings.d.ts +2 -0
  106. package/react-dist/lib/isBaggageService.d.ts +2 -0
  107. package/react-dist/lib/isCancelForAnyReasonService.d.ts +2 -0
  108. package/react-dist/lib/isFixtureOfferId.d.ts +2 -0
  109. package/react-dist/lib/isPayloadComplete.d.ts +2 -0
  110. package/react-dist/lib/isSeatElement.d.ts +2 -0
  111. package/react-dist/lib/logging.d.ts +46 -0
  112. package/react-dist/lib/moneyStringFormatter.d.ts +8 -0
  113. package/react-dist/lib/offerIsExpired.d.ts +2 -0
  114. package/react-dist/lib/retrieveOffer.d.ts +2 -0
  115. package/react-dist/lib/retrieveOfferFromDuffelAPI.d.ts +1 -0
  116. package/react-dist/lib/retrieveSeatMaps.d.ts +2 -0
  117. package/react-dist/lib/retrieveSeatMapsFromDuffelAPI.d.ts +1 -0
  118. package/react-dist/lib/setBodyScrollability.d.ts +1 -0
  119. package/react-dist/lib/validateProps.d.ts +7 -0
  120. package/react-dist/lib/withPlural.d.ts +1 -0
  121. package/react-dist/types/Aircraft.d.ts +14 -0
  122. package/react-dist/types/Airline.d.ts +14 -0
  123. package/react-dist/types/Airport.d.ts +44 -0
  124. package/react-dist/types/City.d.ts +18 -0
  125. package/react-dist/types/CreateOrderPayload.d.ts +72 -0
  126. package/react-dist/types/CurrencyConversion.d.ts +10 -0
  127. package/react-dist/types/DuffelAncillariesProps.d.ts +70 -0
  128. package/react-dist/types/Offer.d.ts +711 -0
  129. package/react-dist/types/Order.d.ts +8 -0
  130. package/react-dist/types/Place.d.ts +8 -0
  131. package/react-dist/types/SeatMap.d.ts +190 -0
  132. package/react-dist/types/index.d.ts +11 -0
  133. package/scripts/generate-fixture.ts +200 -0
  134. package/scripts/upload-to-cdn.sh +34 -0
  135. package/scripts.tsconfig.json +11 -0
  136. package/src/components/DuffelAncillaries/Card.tsx +126 -0
  137. package/src/components/DuffelAncillaries/Counter.tsx +40 -0
  138. package/src/components/DuffelAncillaries/DuffelAncillaries.tsx +344 -0
  139. package/src/components/DuffelAncillaries/DuffelAncillariesCustomElement.tsx +124 -0
  140. package/src/components/DuffelAncillaries/bags/BaggageSelectionCard.tsx +96 -0
  141. package/src/components/DuffelAncillaries/bags/BaggageSelectionController.tsx +88 -0
  142. package/src/components/DuffelAncillaries/bags/BaggageSelectionModal.tsx +81 -0
  143. package/src/components/DuffelAncillaries/bags/BaggageSelectionModalBody.tsx +60 -0
  144. package/src/components/DuffelAncillaries/bags/BaggageSelectionModalBodyPassenger.tsx +122 -0
  145. package/src/components/DuffelAncillaries/bags/BaggageSelectionModalFooter.tsx +81 -0
  146. package/src/components/DuffelAncillaries/bags/BaggageSelectionModalHeader.tsx +76 -0
  147. package/src/components/DuffelAncillaries/bags/IncludedBaggageBanner.tsx +51 -0
  148. package/src/components/DuffelAncillaries/cancel_for_any_reason/CfarSelectionCard.tsx +90 -0
  149. package/src/components/DuffelAncillaries/cancel_for_any_reason/CfarSelectionModal.tsx +63 -0
  150. package/src/components/DuffelAncillaries/cancel_for_any_reason/CfarSelectionModalBody.tsx +56 -0
  151. package/src/components/DuffelAncillaries/cancel_for_any_reason/CfarSelectionModalBodyListItem.tsx +11 -0
  152. package/src/components/DuffelAncillaries/cancel_for_any_reason/CfarSelectionModalFooter.tsx +74 -0
  153. package/src/components/DuffelAncillaries/cancel_for_any_reason/CfarSelectionModalHeader.tsx +9 -0
  154. package/src/components/DuffelAncillaries/seats/Amenity.tsx +21 -0
  155. package/src/components/DuffelAncillaries/seats/DeckSelect.tsx +27 -0
  156. package/src/components/DuffelAncillaries/seats/Element.tsx +52 -0
  157. package/src/components/DuffelAncillaries/seats/EmptyElement.tsx +5 -0
  158. package/src/components/DuffelAncillaries/seats/ExitElement.tsx +17 -0
  159. package/src/components/DuffelAncillaries/seats/Legend.tsx +60 -0
  160. package/src/components/DuffelAncillaries/seats/Row.tsx +47 -0
  161. package/src/components/DuffelAncillaries/seats/RowSection.tsx +78 -0
  162. package/src/components/DuffelAncillaries/seats/SeatElement.tsx +120 -0
  163. package/src/components/DuffelAncillaries/seats/SeatInfo.tsx +32 -0
  164. package/src/components/DuffelAncillaries/seats/SeatMap.tsx +81 -0
  165. package/src/components/DuffelAncillaries/seats/SeatMapUnavailable.tsx +21 -0
  166. package/src/components/DuffelAncillaries/seats/SeatSelectionCard.tsx +103 -0
  167. package/src/components/DuffelAncillaries/seats/SeatSelectionModal.tsx +142 -0
  168. package/src/components/DuffelAncillaries/seats/SeatSelectionModalBody.tsx +13 -0
  169. package/src/components/DuffelAncillaries/seats/SeatSelectionModalFooter.tsx +82 -0
  170. package/src/components/DuffelAncillaries/seats/SeatSelectionModalHeader.tsx +87 -0
  171. package/src/components/DuffelAncillaries/seats/SeatUnavailable.tsx +14 -0
  172. package/src/components/DuffelPayments/DuffelPayments.tsx +218 -0
  173. package/src/components/DuffelPayments/DuffelPaymentsCustomElement.tsx +130 -0
  174. package/src/components/shared/AnimatedLoaderEllipsis.tsx +5 -0
  175. package/src/components/shared/Button.tsx +63 -0
  176. package/src/components/shared/ErrorBoundary.tsx +54 -0
  177. package/src/components/shared/FetchOfferErrorState.tsx +35 -0
  178. package/src/components/shared/Icon.tsx +152 -0
  179. package/src/components/shared/IconButton.tsx +42 -0
  180. package/src/components/shared/Modal.tsx +40 -0
  181. package/src/components/shared/NonIdealState.tsx +28 -0
  182. package/src/components/shared/Stamp.tsx +29 -0
  183. package/src/components/shared/Tabs.tsx +36 -0
  184. package/src/custom-elements.ts +13 -0
  185. package/src/examples/client-side/README.md +30 -0
  186. package/src/examples/client-side/index.html +57 -0
  187. package/src/examples/full-stack/README.md +34 -0
  188. package/src/examples/full-stack/index.html +48 -0
  189. package/src/examples/full-stack/server.mjs +158 -0
  190. package/src/examples/just-typescript/README.md +37 -0
  191. package/src/examples/just-typescript/package.json +16 -0
  192. package/src/examples/just-typescript/src/index.html +23 -0
  193. package/src/examples/just-typescript/src/index.ts +36 -0
  194. package/src/examples/just-typescript/yarn.lock +154 -0
  195. package/src/examples/payments-custom-element/README.md +17 -0
  196. package/src/examples/payments-custom-element/index.html +43 -0
  197. package/src/examples/payments-just-typescript/README.md +37 -0
  198. package/src/examples/payments-just-typescript/package.json +16 -0
  199. package/src/examples/payments-just-typescript/src/index.html +23 -0
  200. package/src/examples/payments-just-typescript/src/index.ts +18 -0
  201. package/src/examples/payments-just-typescript/yarn.lock +154 -0
  202. package/src/examples/react-app/README.md +37 -0
  203. package/src/examples/react-app/package.json +20 -0
  204. package/src/examples/react-app/src/index.html +19 -0
  205. package/src/examples/react-app/src/index.tsx +48 -0
  206. package/src/examples/react-app/yarn.lock +219 -0
  207. package/src/fixtures/offers/off_0000AUde3KwTztSRK1cznH.json +497 -0
  208. package/src/fixtures/offers/off_0000AVx4lUFFKW8PsPeQeQ.json +307 -0
  209. package/src/fixtures/offers/off_1.json +497 -0
  210. package/src/fixtures/passengers/mock_passengers.ts +26 -0
  211. package/src/fixtures/seat-maps/off_0000AUde3KwTztSRK1cznH.json +6852 -0
  212. package/src/fixtures/seat-maps/off_0000AVx4lUFFKW8PsPeQeQ.json +1 -0
  213. package/src/fixtures/seat-maps/off_1.json +6852 -0
  214. package/src/index.ts +7 -0
  215. package/src/lib/captureErrorInSentry.ts +42 -0
  216. package/src/lib/compileCreateOrderPayload.ts +63 -0
  217. package/src/lib/createPriceFormatters.ts +73 -0
  218. package/src/lib/fetchFromDuffelAPI.ts +54 -0
  219. package/src/lib/fetchFromFixtures.ts +18 -0
  220. package/src/lib/formatAvailableServices.ts +91 -0
  221. package/src/lib/formatDate.ts +20 -0
  222. package/src/lib/formatSeatMaps.ts +81 -0
  223. package/src/lib/getBaggageServiceDescription.ts +42 -0
  224. package/src/lib/getCabinsForSegmentAndDeck.ts +4 -0
  225. package/src/lib/getCurrencyForSeatMaps.ts +22 -0
  226. package/src/lib/getCurrencyForServices.ts +24 -0
  227. package/src/lib/getFirstSeatElementMatchingCriteria.ts +22 -0
  228. package/src/lib/getPassengerBySegmentList.ts +10 -0
  229. package/src/lib/getPassengerInitials.ts +6 -0
  230. package/src/lib/getPassengerMapById.ts +17 -0
  231. package/src/lib/getPassengerName.ts +37 -0
  232. package/src/lib/getRowNumber.ts +16 -0
  233. package/src/lib/getSegmentList.ts +7 -0
  234. package/src/lib/getServicePriceMapById.ts +20 -0
  235. package/src/lib/getSymbols.ts +22 -0
  236. package/src/lib/getTotalAmountForServices.ts +72 -0
  237. package/src/lib/getTotalQuantity.ts +5 -0
  238. package/src/lib/hasService.ts +24 -0
  239. package/src/lib/hasServiceOfSameMetadataTypeAlreadyBeenSelected.ts +35 -0
  240. package/src/lib/hasWings.ts +8 -0
  241. package/src/lib/isBaggageService.ts +8 -0
  242. package/src/lib/isCancelForAnyReasonService.ts +9 -0
  243. package/src/lib/isFixtureOfferId.ts +4 -0
  244. package/src/lib/isPayloadComplete.ts +11 -0
  245. package/src/lib/isSeatElement.ts +10 -0
  246. package/src/lib/logging.ts +120 -0
  247. package/src/lib/moneyStringFormatter.ts +34 -0
  248. package/src/lib/offerIsExpired.ts +5 -0
  249. package/src/lib/retrieveOffer.ts +54 -0
  250. package/src/lib/retrieveOfferFromDuffelAPI.ts +13 -0
  251. package/src/lib/retrieveSeatMaps.ts +55 -0
  252. package/src/lib/retrieveSeatMapsFromDuffelAPI.ts +13 -0
  253. package/src/lib/setBodyScrollability.ts +7 -0
  254. package/src/lib/validateProps.ts +37 -0
  255. package/src/lib/withPlural.ts +8 -0
  256. package/src/stories/BaggageSelectionModalHeader.stories.tsx +21 -0
  257. package/src/stories/Button.stories.tsx +69 -0
  258. package/src/stories/DuffelAncillaries.stories.tsx +126 -0
  259. package/src/stories/DuffelPayments.stories.tsx +34 -0
  260. package/src/stories/Icon.stories.tsx +35 -0
  261. package/src/stories/IconButton.stories.tsx +25 -0
  262. package/src/styles/colors.css +22 -0
  263. package/src/styles/components/Amenity.css +23 -0
  264. package/src/styles/components/BaggageDisplay.css +25 -0
  265. package/src/styles/components/Button.css +161 -0
  266. package/src/styles/components/Card.css +52 -0
  267. package/src/styles/components/CfarSelectionModal.css +34 -0
  268. package/src/styles/components/Counter.css +18 -0
  269. package/src/styles/components/DuffelPayments.css +42 -0
  270. package/src/styles/components/IconButton.css +63 -0
  271. package/src/styles/components/Legend.css +58 -0
  272. package/src/styles/components/Loader.css +37 -0
  273. package/src/styles/components/LoadingState.css +81 -0
  274. package/src/styles/components/Modal.css +84 -0
  275. package/src/styles/components/PassengerSelect.css +93 -0
  276. package/src/styles/components/PassengersLayout.css +90 -0
  277. package/src/styles/components/Row.css +70 -0
  278. package/src/styles/components/Seat.css +57 -0
  279. package/src/styles/components/SeatInfo.css +61 -0
  280. package/src/styles/components/SeatMap.css +24 -0
  281. package/src/styles/components/SeatSelect.css +92 -0
  282. package/src/styles/components/Segment.css +17 -0
  283. package/src/styles/components/SelectionSegment.css +10 -0
  284. package/src/styles/components/Summary.css +70 -0
  285. package/src/styles/components/Tabs.css +49 -0
  286. package/src/styles/flex.css +5 -0
  287. package/src/styles/font-families.css +47 -0
  288. package/src/styles/global.css +51 -0
  289. package/src/styles/margin.css +3 -0
  290. package/src/styles/spacing.css +18 -0
  291. package/src/styles/transitions.css +3 -0
  292. package/src/styles/typography.css +13 -0
  293. package/src/tests/components/DuffelAncillaries.test.tsx +342 -0
  294. package/src/tests/lib/createPriceFormatters.test.tsx +152 -0
  295. package/src/tests/lib/formatAvailableServices.test.tsx +79 -0
  296. package/src/tests/lib/formatSeatMaps.test.tsx +49 -0
  297. package/src/tests/lib/getCurrencyForServices.test.tsx +44 -0
  298. package/src/tests/lib/hasServiceOfSameMetadataTypeAlreadyBeenSelected.test.ts +86 -0
  299. package/src/tests/lib/logging.test.tsx +32 -0
  300. package/src/tests/lib/moneyStringFormatter.test.tsx +12 -0
  301. package/src/tests/lib/validateProps.test.tsx +57 -0
  302. package/src/types/Aircraft.ts +16 -0
  303. package/src/types/Airline.ts +16 -0
  304. package/src/types/Airport.ts +54 -0
  305. package/src/types/City.ts +21 -0
  306. package/src/types/CreateOrderPayload.ts +99 -0
  307. package/src/types/CurrencyConversion.ts +10 -0
  308. package/src/types/DuffelAncillariesProps.ts +108 -0
  309. package/src/types/Offer.ts +851 -0
  310. package/src/types/Order.ts +6 -0
  311. package/src/types/Place.ts +6 -0
  312. package/src/types/SeatMap.ts +231 -0
  313. package/src/types/index.ts +11 -0
  314. package/tsconfig.json +52 -0
  315. package/LICENSE +0 -21
  316. package/dist/AdditionalBaggage.esm.js +0 -1
  317. package/dist/AdditionalBaggage.js +0 -1
  318. package/dist/AdditionalBaggage.min.css +0 -408
  319. package/dist/AdditionalBaggage.umd.min.js +0 -2
  320. package/dist/AdditionalBaggage.umd.min.js.LICENSE.txt +0 -60
  321. package/dist/AdditionalBaggageSelection.esm.js +0 -1
  322. package/dist/AdditionalBaggageSelection.js +0 -1
  323. package/dist/AdditionalBaggageSelection.min.css +0 -744
  324. package/dist/AdditionalBaggageSelection.umd.min.js +0 -2
  325. package/dist/AdditionalBaggageSelection.umd.min.js.LICENSE.txt +0 -93
  326. package/dist/CardPayment.esm.js +0 -2
  327. package/dist/CardPayment.esm.js.LICENSE.txt +0 -6
  328. package/dist/CardPayment.js +0 -2
  329. package/dist/CardPayment.js.LICENSE.txt +0 -6
  330. package/dist/CardPayment.min.css +0 -233
  331. package/dist/CardPayment.umd.min.js +0 -2
  332. package/dist/CardPayment.umd.min.js.LICENSE.txt +0 -61
  333. package/dist/SeatSelection.esm.js +0 -1
  334. package/dist/SeatSelection.js +0 -1
  335. package/dist/SeatSelection.min.css +0 -1127
  336. package/dist/SeatSelection.umd.min.js +0 -2
  337. package/dist/SeatSelection.umd.min.js.LICENSE.txt +0 -60
  338. package/dist/duffel-components.d.ts +0 -1614
  339. package/dist/duffel-components.esm.js +0 -2
  340. package/dist/duffel-components.esm.js.LICENSE.txt +0 -6
  341. package/dist/duffel-components.js +0 -2
  342. package/dist/duffel-components.js.LICENSE.txt +0 -6
  343. package/dist/duffel-components.min.css +0 -1280
  344. package/dist/duffel-components.umd.min.js +0 -2
  345. package/dist/duffel-components.umd.min.js.LICENSE.txt +0 -102
@@ -0,0 +1,497 @@
1
+ {
2
+ "_description": "This fixture was generated by scripts/generate-fixture.ts. It includes an offer with 2 passengers and 2 slices: JFK,LAX ⇢ LAX,JFK",
3
+ "updated_at": "2023-04-14T09:28:21.569186Z",
4
+ "total_emissions_kg": "806",
5
+ "total_currency": "GBP",
6
+ "total_amount": "652.64",
7
+ "tax_currency": "GBP",
8
+ "tax_amount": "99.56",
9
+ "slices": [
10
+ {
11
+ "segments": [
12
+ {
13
+ "stops": [],
14
+ "passengers": [
15
+ {
16
+ "passenger_id": "pas_0000AUde3KY1SptM6ABSfT",
17
+ "fare_basis_code": "Y20LGTN2",
18
+ "cabin_class_marketing_name": "Economy",
19
+ "cabin_class": "economy",
20
+ "baggages": [
21
+ {
22
+ "type": "checked",
23
+ "quantity": 1
24
+ },
25
+ {
26
+ "type": "carry_on",
27
+ "quantity": 1
28
+ }
29
+ ]
30
+ },
31
+ {
32
+ "passenger_id": "pas_0000AUde3KY1SptM6ABSfU",
33
+ "fare_basis_code": "Y20LGTN2",
34
+ "cabin_class_marketing_name": "Economy",
35
+ "cabin_class": "economy",
36
+ "baggages": [
37
+ {
38
+ "type": "checked",
39
+ "quantity": 1
40
+ },
41
+ {
42
+ "type": "carry_on",
43
+ "quantity": 1
44
+ }
45
+ ]
46
+ }
47
+ ],
48
+ "origin_terminal": "2",
49
+ "origin": {
50
+ "type": "airport",
51
+ "time_zone": "America/New_York",
52
+ "name": "John F. Kennedy International Airport",
53
+ "longitude": -73.778519,
54
+ "latitude": 40.640556,
55
+ "id": "arp_jfk_us",
56
+ "icao_code": "KJFK",
57
+ "iata_country_code": "US",
58
+ "iata_code": "JFK",
59
+ "iata_city_code": "NYC",
60
+ "city_name": "New York",
61
+ "city": {
62
+ "type": "city",
63
+ "time_zone": null,
64
+ "name": "New York",
65
+ "longitude": null,
66
+ "latitude": null,
67
+ "id": "cit_nyc_us",
68
+ "icao_code": null,
69
+ "iata_country_code": "US",
70
+ "iata_code": "NYC",
71
+ "iata_city_code": "NYC",
72
+ "city_name": null
73
+ },
74
+ "airports": null
75
+ },
76
+ "operating_carrier_flight_number": "9902",
77
+ "operating_carrier": {
78
+ "name": "Duffel Airways",
79
+ "logo_symbol_url": "https://assets.duffel.com/img/airlines/for-light-background/full-color-logo/ZZ.svg",
80
+ "logo_lockup_url": null,
81
+ "id": "arl_00009VME7D6ivUu8dn35WK",
82
+ "iata_code": "ZZ",
83
+ "conditions_of_carriage_url": null
84
+ },
85
+ "marketing_carrier_flight_number": "9902",
86
+ "marketing_carrier": {
87
+ "name": "Duffel Airways",
88
+ "logo_symbol_url": "https://assets.duffel.com/img/airlines/for-light-background/full-color-logo/ZZ.svg",
89
+ "logo_lockup_url": null,
90
+ "id": "arl_00009VME7D6ivUu8dn35WK",
91
+ "iata_code": "ZZ",
92
+ "conditions_of_carriage_url": null
93
+ },
94
+ "id": "seg_0000AUde3Kw81DArIvSiF0",
95
+ "duration": "PT6H1M",
96
+ "distance": "4075.389138263169",
97
+ "destination_terminal": "1",
98
+ "destination": {
99
+ "type": "airport",
100
+ "time_zone": "America/Los_Angeles",
101
+ "name": "Los Angeles International Airport",
102
+ "longitude": -118.408263,
103
+ "latitude": 33.942045,
104
+ "id": "arp_lax_us",
105
+ "icao_code": "KLAX",
106
+ "iata_country_code": "US",
107
+ "iata_code": "LAX",
108
+ "iata_city_code": "LAX",
109
+ "city_name": "Los Angeles",
110
+ "city": {
111
+ "type": "city",
112
+ "time_zone": null,
113
+ "name": "Los Angeles",
114
+ "longitude": null,
115
+ "latitude": null,
116
+ "id": "cit_lax_us",
117
+ "icao_code": null,
118
+ "iata_country_code": "US",
119
+ "iata_code": "LAX",
120
+ "iata_city_code": "LAX",
121
+ "city_name": null
122
+ },
123
+ "airports": null
124
+ },
125
+ "departing_at": "2023-04-21T15:29:00",
126
+ "arriving_at": "2023-04-21T18:30:00",
127
+ "aircraft": {
128
+ "name": "Boeing 777-300",
129
+ "id": "arc_00009VMF8AhXSSRnQDI6HE",
130
+ "iata_code": "773"
131
+ }
132
+ }
133
+ ],
134
+ "origin_type": "airport",
135
+ "origin": {
136
+ "type": "airport",
137
+ "time_zone": "America/New_York",
138
+ "name": "John F. Kennedy International Airport",
139
+ "longitude": -73.778519,
140
+ "latitude": 40.640556,
141
+ "id": "arp_jfk_us",
142
+ "icao_code": "KJFK",
143
+ "iata_country_code": "US",
144
+ "iata_code": "JFK",
145
+ "iata_city_code": "NYC",
146
+ "city_name": "New York",
147
+ "city": {
148
+ "type": "city",
149
+ "time_zone": null,
150
+ "name": "New York",
151
+ "longitude": null,
152
+ "latitude": null,
153
+ "id": "cit_nyc_us",
154
+ "icao_code": null,
155
+ "iata_country_code": "US",
156
+ "iata_code": "NYC",
157
+ "iata_city_code": "NYC",
158
+ "city_name": null
159
+ },
160
+ "airports": null
161
+ },
162
+ "id": "sli_0000AUde3KwTztSRK1cznE",
163
+ "fare_brand_name": "Basic",
164
+ "duration": "PT6H1M",
165
+ "destination_type": "airport",
166
+ "destination": {
167
+ "type": "airport",
168
+ "time_zone": "America/Los_Angeles",
169
+ "name": "Los Angeles International Airport",
170
+ "longitude": -118.408263,
171
+ "latitude": 33.942045,
172
+ "id": "arp_lax_us",
173
+ "icao_code": "KLAX",
174
+ "iata_country_code": "US",
175
+ "iata_code": "LAX",
176
+ "iata_city_code": "LAX",
177
+ "city_name": "Los Angeles",
178
+ "city": {
179
+ "type": "city",
180
+ "time_zone": null,
181
+ "name": "Los Angeles",
182
+ "longitude": null,
183
+ "latitude": null,
184
+ "id": "cit_lax_us",
185
+ "icao_code": null,
186
+ "iata_country_code": "US",
187
+ "iata_code": "LAX",
188
+ "iata_city_code": "LAX",
189
+ "city_name": null
190
+ },
191
+ "airports": null
192
+ },
193
+ "conditions": {
194
+ "change_before_departure": {
195
+ "penalty_currency": null,
196
+ "penalty_amount": null,
197
+ "allowed": false
198
+ }
199
+ }
200
+ },
201
+ {
202
+ "segments": [
203
+ {
204
+ "stops": [],
205
+ "passengers": [
206
+ {
207
+ "passenger_id": "pas_0000AUde3KY1SptM6ABSfT",
208
+ "fare_basis_code": "Y20LGTN2",
209
+ "cabin_class_marketing_name": "Economy",
210
+ "cabin_class": "economy",
211
+ "baggages": [
212
+ {
213
+ "type": "checked",
214
+ "quantity": 1
215
+ },
216
+ {
217
+ "type": "carry_on",
218
+ "quantity": 1
219
+ }
220
+ ]
221
+ },
222
+ {
223
+ "passenger_id": "pas_0000AUde3KY1SptM6ABSfU",
224
+ "fare_basis_code": "Y20LGTN2",
225
+ "cabin_class_marketing_name": "Economy",
226
+ "cabin_class": "economy",
227
+ "baggages": [
228
+ {
229
+ "type": "checked",
230
+ "quantity": 1
231
+ },
232
+ {
233
+ "type": "carry_on",
234
+ "quantity": 1
235
+ }
236
+ ]
237
+ }
238
+ ],
239
+ "origin_terminal": "2",
240
+ "origin": {
241
+ "type": "airport",
242
+ "time_zone": "America/Los_Angeles",
243
+ "name": "Los Angeles International Airport",
244
+ "longitude": -118.408263,
245
+ "latitude": 33.942045,
246
+ "id": "arp_lax_us",
247
+ "icao_code": "KLAX",
248
+ "iata_country_code": "US",
249
+ "iata_code": "LAX",
250
+ "iata_city_code": "LAX",
251
+ "city_name": "Los Angeles",
252
+ "city": {
253
+ "type": "city",
254
+ "time_zone": null,
255
+ "name": "Los Angeles",
256
+ "longitude": null,
257
+ "latitude": null,
258
+ "id": "cit_lax_us",
259
+ "icao_code": null,
260
+ "iata_country_code": "US",
261
+ "iata_code": "LAX",
262
+ "iata_city_code": "LAX",
263
+ "city_name": null
264
+ },
265
+ "airports": null
266
+ },
267
+ "operating_carrier_flight_number": "9902",
268
+ "operating_carrier": {
269
+ "name": "Duffel Airways",
270
+ "logo_symbol_url": "https://assets.duffel.com/img/airlines/for-light-background/full-color-logo/ZZ.svg",
271
+ "logo_lockup_url": null,
272
+ "id": "arl_00009VME7D6ivUu8dn35WK",
273
+ "iata_code": "ZZ",
274
+ "conditions_of_carriage_url": null
275
+ },
276
+ "marketing_carrier_flight_number": "9902",
277
+ "marketing_carrier": {
278
+ "name": "Duffel Airways",
279
+ "logo_symbol_url": "https://assets.duffel.com/img/airlines/for-light-background/full-color-logo/ZZ.svg",
280
+ "logo_lockup_url": null,
281
+ "id": "arl_00009VME7D6ivUu8dn35WK",
282
+ "iata_code": "ZZ",
283
+ "conditions_of_carriage_url": null
284
+ },
285
+ "id": "seg_0000AUde3KwTztSRK1cznF",
286
+ "duration": "PT6H1M",
287
+ "distance": "4075.389138263169",
288
+ "destination_terminal": "1",
289
+ "destination": {
290
+ "type": "airport",
291
+ "time_zone": "America/New_York",
292
+ "name": "John F. Kennedy International Airport",
293
+ "longitude": -73.778519,
294
+ "latitude": 40.640556,
295
+ "id": "arp_jfk_us",
296
+ "icao_code": "KJFK",
297
+ "iata_country_code": "US",
298
+ "iata_code": "JFK",
299
+ "iata_city_code": "NYC",
300
+ "city_name": "New York",
301
+ "city": {
302
+ "type": "city",
303
+ "time_zone": null,
304
+ "name": "New York",
305
+ "longitude": null,
306
+ "latitude": null,
307
+ "id": "cit_nyc_us",
308
+ "icao_code": null,
309
+ "iata_country_code": "US",
310
+ "iata_code": "NYC",
311
+ "iata_city_code": "NYC",
312
+ "city_name": null
313
+ },
314
+ "airports": null
315
+ },
316
+ "departing_at": "2023-04-28T20:54:00",
317
+ "arriving_at": "2023-04-29T05:55:00",
318
+ "aircraft": {
319
+ "name": "Boeing 777-300",
320
+ "id": "arc_00009VMF8AhXSSRnQDI6HE",
321
+ "iata_code": "773"
322
+ }
323
+ }
324
+ ],
325
+ "origin_type": "airport",
326
+ "origin": {
327
+ "type": "airport",
328
+ "time_zone": "America/Los_Angeles",
329
+ "name": "Los Angeles International Airport",
330
+ "longitude": -118.408263,
331
+ "latitude": 33.942045,
332
+ "id": "arp_lax_us",
333
+ "icao_code": "KLAX",
334
+ "iata_country_code": "US",
335
+ "iata_code": "LAX",
336
+ "iata_city_code": "LAX",
337
+ "city_name": "Los Angeles",
338
+ "city": {
339
+ "type": "city",
340
+ "time_zone": null,
341
+ "name": "Los Angeles",
342
+ "longitude": null,
343
+ "latitude": null,
344
+ "id": "cit_lax_us",
345
+ "icao_code": null,
346
+ "iata_country_code": "US",
347
+ "iata_code": "LAX",
348
+ "iata_city_code": "LAX",
349
+ "city_name": null
350
+ },
351
+ "airports": null
352
+ },
353
+ "id": "sli_0000AUde3KwTztSRK1cznG",
354
+ "fare_brand_name": "Basic",
355
+ "duration": "PT6H1M",
356
+ "destination_type": "airport",
357
+ "destination": {
358
+ "type": "airport",
359
+ "time_zone": "America/New_York",
360
+ "name": "John F. Kennedy International Airport",
361
+ "longitude": -73.778519,
362
+ "latitude": 40.640556,
363
+ "id": "arp_jfk_us",
364
+ "icao_code": "KJFK",
365
+ "iata_country_code": "US",
366
+ "iata_code": "JFK",
367
+ "iata_city_code": "NYC",
368
+ "city_name": "New York",
369
+ "city": {
370
+ "type": "city",
371
+ "time_zone": null,
372
+ "name": "New York",
373
+ "longitude": null,
374
+ "latitude": null,
375
+ "id": "cit_nyc_us",
376
+ "icao_code": null,
377
+ "iata_country_code": "US",
378
+ "iata_code": "NYC",
379
+ "iata_city_code": "NYC",
380
+ "city_name": null
381
+ },
382
+ "airports": null
383
+ },
384
+ "conditions": {
385
+ "change_before_departure": {
386
+ "penalty_currency": null,
387
+ "penalty_amount": null,
388
+ "allowed": false
389
+ }
390
+ }
391
+ }
392
+ ],
393
+ "private_fares": [],
394
+ "payment_requirements": {
395
+ "requires_instant_payment": false,
396
+ "price_guarantee_expires_at": "2023-04-16T09:28:21Z",
397
+ "payment_required_by": "2023-04-17T09:28:21Z"
398
+ },
399
+ "passengers": [
400
+ {
401
+ "type": "adult",
402
+ "loyalty_programme_accounts": [],
403
+ "id": "pas_0000AUde3KY1SptM6ABSfT",
404
+ "given_name": null,
405
+ "family_name": null,
406
+ "age": null
407
+ },
408
+ {
409
+ "type": "adult",
410
+ "loyalty_programme_accounts": [],
411
+ "id": "pas_0000AUde3KY1SptM6ABSfU",
412
+ "given_name": null,
413
+ "family_name": null,
414
+ "age": null
415
+ }
416
+ ],
417
+ "passenger_identity_documents_required": false,
418
+ "partial": false,
419
+ "owner": {
420
+ "name": "Duffel Airways",
421
+ "logo_symbol_url": "https://assets.duffel.com/img/airlines/for-light-background/full-color-logo/ZZ.svg",
422
+ "logo_lockup_url": null,
423
+ "id": "arl_00009VME7D6ivUu8dn35WK",
424
+ "iata_code": "ZZ",
425
+ "conditions_of_carriage_url": null
426
+ },
427
+ "live_mode": false,
428
+ "id": "off_1",
429
+ "expires_at": "2043-04-14T09:58:21.400481Z",
430
+ "created_at": "2023-04-14T09:28:21.405707Z",
431
+ "conditions": {
432
+ "refund_before_departure": {
433
+ "penalty_currency": "GBP",
434
+ "penalty_amount": "110.00",
435
+ "allowed": true
436
+ },
437
+ "change_before_departure": {
438
+ "penalty_currency": null,
439
+ "penalty_amount": null,
440
+ "allowed": false
441
+ }
442
+ },
443
+ "base_currency": "GBP",
444
+ "base_amount": "553.08",
445
+ "available_services": [
446
+ {
447
+ "type": "baggage",
448
+ "total_currency": "GBP",
449
+ "total_amount": "20.00",
450
+ "segment_ids": ["seg_0000AUde3KwTztSRK1cznF"],
451
+ "passenger_ids": ["pas_0000AUde3KY1SptM6ABSfT"],
452
+ "metadata": {
453
+ "type": "checked",
454
+ "maximum_weight_kg": 23,
455
+ "maximum_length_cm": null,
456
+ "maximum_height_cm": null,
457
+ "maximum_depth_cm": null
458
+ },
459
+ "maximum_quantity": 1,
460
+ "id": "ase_0000AUde3M2LtBE9WNJZYW"
461
+ },
462
+ {
463
+ "type": "baggage",
464
+ "total_currency": "GBP",
465
+ "total_amount": "20.00",
466
+ "segment_ids": ["seg_0000AUde3KwTztSRK1cznF"],
467
+ "passenger_ids": ["pas_0000AUde3KY1SptM6ABSfU"],
468
+ "metadata": {
469
+ "type": "checked",
470
+ "maximum_weight_kg": 23,
471
+ "maximum_length_cm": null,
472
+ "maximum_height_cm": null,
473
+ "maximum_depth_cm": null
474
+ },
475
+ "maximum_quantity": 1,
476
+ "id": "ase_0000AUde3M2LtBE9WNJZYZ"
477
+ },
478
+ {
479
+ "type": "cancel_for_any_reason",
480
+ "total_currency": "GBP",
481
+ "total_amount": "97.45",
482
+ "segment_ids": ["seg_0000AUde3KwTztSRK1cznF"],
483
+ "passenger_ids": [
484
+ "pas_0000AUde3KY1SptM6ABSfT",
485
+ "pas_0000AUde3KY1SptM6ABSfU"
486
+ ],
487
+ "metadata": {
488
+ "terms_and_conditions_url": "https://duffel.com/cfar_terms_and_conditions",
489
+ "refund_amount": "489.48",
490
+ "merchant_copy": "Cancel for any reason - Provided in partnership with Duffel\nIf you purchase this product we can refund up to 75% of your base fare if you cancel 24 hours before your first scheduled departure. To cancel, please contact us using the details in your email confirmation.\n\nNote this is not insurance and may be purchased in addition to your travel insurance. See the CFAR terms and conditions here: https://duffel.com/cfar_terms_and_conditions.\n"
491
+ },
492
+ "maximum_quantity": 1,
493
+ "id": "cfa_0000AUde3MAVOrkVvf85GT"
494
+ }
495
+ ],
496
+ "allowed_passenger_identity_document_types": []
497
+ }
@@ -0,0 +1,26 @@
1
+ import { CreateOrderPayload } from "../../types/CreateOrderPayload";
2
+
3
+ const mockPassengers: CreateOrderPayload["passengers"] = [
4
+ {
5
+ id: "pas_0000AUde3KY1SptM6ABSfU",
6
+ given_name: "Mae",
7
+ family_name: "Jemison",
8
+ gender: "F",
9
+ title: "dr",
10
+ born_on: "1956-10-17",
11
+ email: "m.jemison@nasa.gov",
12
+ phone_number: "+16177562626",
13
+ },
14
+ {
15
+ id: "pas_0000AUde3KY1SptM6ABSfT",
16
+ given_name: "Dorothy",
17
+ family_name: "Green",
18
+ gender: "F",
19
+ title: "dr",
20
+ born_on: "1942-10-17",
21
+ email: "m.jemison@nasa.gov",
22
+ phone_number: "+16177562626",
23
+ },
24
+ ];
25
+
26
+ export default mockPassengers;