@qite/tide-booking-component 1.4.95 → 1.4.96

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 (453) hide show
  1. package/README.md +24 -24
  2. package/build/build-cjs/index.js +48813 -29709
  3. package/build/build-cjs/src/booking-product/components/age-select.d.ts +3 -3
  4. package/build/build-cjs/src/booking-product/components/amount-input.d.ts +5 -5
  5. package/build/build-cjs/src/booking-product/components/date-range-picker/calendar-day.d.ts +8 -8
  6. package/build/build-cjs/src/booking-product/components/date-range-picker/calendar.d.ts +14 -14
  7. package/build/build-cjs/src/booking-product/components/date-range-picker/index.d.ts +16 -19
  8. package/build/build-cjs/src/booking-product/components/dates.d.ts +8 -8
  9. package/build/build-cjs/src/booking-product/components/footer.d.ts +5 -5
  10. package/build/build-cjs/src/booking-product/components/header.d.ts +6 -6
  11. package/build/build-cjs/src/booking-product/components/icon.d.ts +5 -5
  12. package/build/build-cjs/src/booking-product/components/list-view.d.ts +2 -2
  13. package/build/build-cjs/src/booking-product/components/product.d.ts +4 -4
  14. package/build/build-cjs/src/booking-product/components/rating.d.ts +1 -1
  15. package/build/build-cjs/src/booking-product/components/rooms.d.ts +4 -4
  16. package/build/build-cjs/src/booking-product/constants.d.ts +1 -1
  17. package/build/build-cjs/src/booking-product/index.d.ts +4 -4
  18. package/build/build-cjs/src/booking-product/settings-context.d.ts +1 -2
  19. package/build/build-cjs/src/booking-product/types.d.ts +21 -21
  20. package/build/build-cjs/src/booking-product/utils/api.d.ts +11 -2
  21. package/build/build-cjs/src/booking-product/utils/price.d.ts +10 -1
  22. package/build/build-cjs/src/booking-wizard/api-settings-slice.d.ts +3 -2
  23. package/build/build-cjs/src/booking-wizard/components/icon.d.ts +5 -5
  24. package/build/build-cjs/src/booking-wizard/components/labeled-input.d.ts +13 -13
  25. package/build/build-cjs/src/booking-wizard/components/labeled-select.d.ts +16 -16
  26. package/build/build-cjs/src/booking-wizard/components/message.d.ts +4 -4
  27. package/build/build-cjs/src/booking-wizard/components/multi-range-filter.d.ts +6 -6
  28. package/build/build-cjs/src/booking-wizard/components/phone-input.d.ts +11 -11
  29. package/build/build-cjs/src/booking-wizard/components/print-offer-button.d.ts +11 -11
  30. package/build/build-cjs/src/booking-wizard/components/product-card.d.ts +3 -3
  31. package/build/build-cjs/src/booking-wizard/components/step-indicator.d.ts +1 -1
  32. package/build/build-cjs/src/booking-wizard/components/step-route.d.ts +3 -3
  33. package/build/build-cjs/src/booking-wizard/features/booking/api.d.ts +26 -7
  34. package/build/build-cjs/src/booking-wizard/features/booking/booking-self-contained.d.ts +3 -3
  35. package/build/build-cjs/src/booking-wizard/features/booking/booking-slice.d.ts +102 -43
  36. package/build/build-cjs/src/booking-wizard/features/booking/booking.d.ts +3 -3
  37. package/build/build-cjs/src/booking-wizard/features/booking/constants.d.ts +8 -1
  38. package/build/build-cjs/src/booking-wizard/features/booking/selectors.d.ts +644 -479
  39. package/build/build-cjs/src/booking-wizard/features/confirmation/confirmation.d.ts +1 -2
  40. package/build/build-cjs/src/booking-wizard/features/error/error.d.ts +1 -2
  41. package/build/build-cjs/src/booking-wizard/features/flight-options/flight-filter.d.ts +3 -3
  42. package/build/build-cjs/src/booking-wizard/features/flight-options/flight-option-flight.d.ts +2 -2
  43. package/build/build-cjs/src/booking-wizard/features/flight-options/flight-option.d.ts +4 -4
  44. package/build/build-cjs/src/booking-wizard/features/flight-options/flight-utils.d.ts +9 -2
  45. package/build/build-cjs/src/booking-wizard/features/flight-options/index.d.ts +1 -2
  46. package/build/build-cjs/src/booking-wizard/features/price-details/price-details-api.d.ts +6 -1
  47. package/build/build-cjs/src/booking-wizard/features/price-details/price-details-slice.d.ts +15 -10
  48. package/build/build-cjs/src/booking-wizard/features/price-details/selectors.d.ts +302 -287
  49. package/build/build-cjs/src/booking-wizard/features/product-options/none-option.d.ts +3 -3
  50. package/build/build-cjs/src/booking-wizard/features/product-options/option-booking-airline-group.d.ts +2 -2
  51. package/build/build-cjs/src/booking-wizard/features/product-options/option-booking-group.d.ts +6 -6
  52. package/build/build-cjs/src/booking-wizard/features/product-options/option-item.d.ts +5 -5
  53. package/build/build-cjs/src/booking-wizard/features/product-options/option-pax-card.d.ts +4 -4
  54. package/build/build-cjs/src/booking-wizard/features/product-options/option-pax-group.d.ts +7 -7
  55. package/build/build-cjs/src/booking-wizard/features/product-options/option-room.d.ts +5 -5
  56. package/build/build-cjs/src/booking-wizard/features/product-options/option-unit-group.d.ts +7 -7
  57. package/build/build-cjs/src/booking-wizard/features/product-options/option-units-card.d.ts +3 -3
  58. package/build/build-cjs/src/booking-wizard/features/product-options/options-form.d.ts +1 -2
  59. package/build/build-cjs/src/booking-wizard/features/room-options/index.d.ts +1 -2
  60. package/build/build-cjs/src/booking-wizard/features/room-options/room-utils.d.ts +19 -6
  61. package/build/build-cjs/src/booking-wizard/features/room-options/room.d.ts +6 -6
  62. package/build/build-cjs/src/booking-wizard/features/room-options/traveler-rooms.d.ts +3 -3
  63. package/build/build-cjs/src/booking-wizard/features/sidebar/index.d.ts +2 -2
  64. package/build/build-cjs/src/booking-wizard/features/sidebar/sidebar-flight.d.ts +2 -2
  65. package/build/build-cjs/src/booking-wizard/features/sidebar/sidebar-util.d.ts +4 -2
  66. package/build/build-cjs/src/booking-wizard/features/sidebar/sidebar.d.ts +24 -24
  67. package/build/build-cjs/src/booking-wizard/features/summary/summary-booking-option-pax.d.ts +1 -1
  68. package/build/build-cjs/src/booking-wizard/features/summary/summary-booking-option-unit.d.ts +1 -1
  69. package/build/build-cjs/src/booking-wizard/features/summary/summary-flight.d.ts +2 -2
  70. package/build/build-cjs/src/booking-wizard/features/summary/summary-per-booking-option-group.d.ts +1 -1
  71. package/build/build-cjs/src/booking-wizard/features/summary/summary-per-pax-option-group.d.ts +1 -1
  72. package/build/build-cjs/src/booking-wizard/features/summary/summary-per-unit-option-group.d.ts +1 -1
  73. package/build/build-cjs/src/booking-wizard/features/summary/summary-slice.d.ts +3 -3
  74. package/build/build-cjs/src/booking-wizard/features/summary/summary.d.ts +1 -2
  75. package/build/build-cjs/src/booking-wizard/features/travelers-form/travelers-form-slice.d.ts +75 -75
  76. package/build/build-cjs/src/booking-wizard/features/travelers-form/travelers-form-util.d.ts +4 -4
  77. package/build/build-cjs/src/booking-wizard/features/travelers-form/travelers-form.d.ts +1 -2
  78. package/build/build-cjs/src/booking-wizard/features/travelers-form/type-ahead-input.d.ts +11 -11
  79. package/build/build-cjs/src/booking-wizard/features/travelers-form/validate-form.d.ts +8 -1
  80. package/build/build-cjs/src/booking-wizard/index.d.ts +6 -6
  81. package/build/build-cjs/src/booking-wizard/settings-context.d.ts +1 -2
  82. package/build/build-cjs/src/booking-wizard/store.d.ts +40 -22
  83. package/build/build-cjs/src/booking-wizard/types.d.ts +240 -240
  84. package/build/build-cjs/src/booking-wizard/use-offer-printer.d.ts +8 -8
  85. package/build/build-cjs/src/content/components/LanguageSwitcher.d.ts +5 -5
  86. package/build/build-cjs/src/content/components/accordion.d.ts +4 -4
  87. package/build/build-cjs/src/content/components/breadcrumb.d.ts +7 -7
  88. package/build/build-cjs/src/content/components/faq.d.ts +4 -4
  89. package/build/build-cjs/src/content/components/gallery.d.ts +6 -6
  90. package/build/build-cjs/src/content/components/icon.d.ts +5 -5
  91. package/build/build-cjs/src/content/components/image-with-text.d.ts +18 -18
  92. package/build/build-cjs/src/content/components/slider.d.ts +5 -5
  93. package/build/build-cjs/src/content/featured-trips/types.d.ts +8 -8
  94. package/build/build-cjs/src/content/features/content-page/content-page-self-contained.d.ts +1 -1
  95. package/build/build-cjs/src/content/footer/types.d.ts +17 -17
  96. package/build/build-cjs/src/content/header/types.d.ts +23 -20
  97. package/build/build-cjs/src/content/image-card-grid/types.d.ts +8 -8
  98. package/build/build-cjs/src/content/image-with-text-section/types.d.ts +15 -15
  99. package/build/build-cjs/src/content/login/login-services.d.ts +6 -1
  100. package/build/build-cjs/src/content/login/types.d.ts +19 -19
  101. package/build/build-cjs/src/content/navbar/placeholderData.d.ts +2 -2
  102. package/build/build-cjs/src/content/navbar/types.d.ts +22 -22
  103. package/build/build-cjs/src/index.d.ts +17 -1
  104. package/build/build-cjs/src/qsm/components/date-range-picker/calendar-day.d.ts +7 -7
  105. package/build/build-cjs/src/qsm/components/date-range-picker/calendar.d.ts +18 -18
  106. package/build/build-cjs/src/qsm/components/date-range-picker/index.d.ts +5 -5
  107. package/build/build-cjs/src/qsm/components/double-search-input-group/index.d.ts +2 -2
  108. package/build/build-cjs/src/qsm/components/icon.d.ts +5 -5
  109. package/build/build-cjs/src/qsm/components/item-picker/index.d.ts +7 -7
  110. package/build/build-cjs/src/qsm/components/search-input/index.d.ts +9 -9
  111. package/build/build-cjs/src/qsm/components/search-input-group/index.d.ts +7 -7
  112. package/build/build-cjs/src/qsm/index.d.ts +1 -1
  113. package/build/build-cjs/src/qsm/store/qsm-slice.d.ts +110 -58
  114. package/build/build-cjs/src/qsm/store/qsm-store.d.ts +20 -7
  115. package/build/build-cjs/src/qsm/types.d.ts +59 -59
  116. package/build/build-cjs/src/search-results/components/filters/filters.d.ts +5 -5
  117. package/build/build-cjs/src/search-results/components/filters/flight-filters.d.ts +3 -3
  118. package/build/build-cjs/src/search-results/components/flight/flight-banner.d.ts +2 -2
  119. package/build/build-cjs/src/search-results/components/flight/flight-card.d.ts +1 -1
  120. package/build/build-cjs/src/search-results/components/flight/flight-leg.d.ts +1 -1
  121. package/build/build-cjs/src/search-results/components/flight/flight-path.d.ts +1 -1
  122. package/build/build-cjs/src/search-results/components/flight/flight-results.d.ts +2 -2
  123. package/build/build-cjs/src/search-results/components/flight/flight-search-context/index.d.ts +29 -29
  124. package/build/build-cjs/src/search-results/components/flight/flight-selection/independent-flight-option.d.ts +5 -5
  125. package/build/build-cjs/src/search-results/components/flight/flight-selection/independent-flight-selection.d.ts +1 -1
  126. package/build/build-cjs/src/search-results/components/flight/flight-selection/index.d.ts +2 -2
  127. package/build/build-cjs/src/search-results/components/flight/flight-selection/paired-flight-option.d.ts +1 -1
  128. package/build/build-cjs/src/search-results/components/flight/flight-selection/paired-flight-selection.d.ts +1 -1
  129. package/build/build-cjs/src/search-results/components/group-tour/group-tour-card.d.ts +3 -3
  130. package/build/build-cjs/src/search-results/components/group-tour/group-tour-results.d.ts +1 -1
  131. package/build/build-cjs/src/search-results/components/hotel/hotel-accommodation-results.d.ts +1 -1
  132. package/build/build-cjs/src/search-results/components/hotel/hotel-card.d.ts +2 -2
  133. package/build/build-cjs/src/search-results/components/icon.d.ts +6 -6
  134. package/build/build-cjs/src/search-results/components/item-picker/index.d.ts +8 -8
  135. package/build/build-cjs/src/search-results/components/itinerary/index.d.ts +3 -3
  136. package/build/build-cjs/src/search-results/components/multi-range-filter.d.ts +6 -6
  137. package/build/build-cjs/src/search-results/components/round-trip/round-trip-results.d.ts +1 -2
  138. package/build/build-cjs/src/search-results/components/search-results-container/flight-search-results.d.ts +1 -1
  139. package/build/build-cjs/src/search-results/components/tab-views/index.d.ts +1 -2
  140. package/build/build-cjs/src/search-results/features/flights/flight-search-results-self-contained.d.ts +1 -2
  141. package/build/build-cjs/src/search-results/features/hotels/hotel-flight-search-results-self-contained.d.ts +1 -2
  142. package/build/build-cjs/src/search-results/features/hotels/hotel-search-results-self-contained.d.ts +1 -2
  143. package/build/build-cjs/src/search-results/features/roundtrips/roundtrip-search-results-self-contained.d.ts +1 -2
  144. package/build/build-cjs/src/search-results/index.d.ts +1 -1
  145. package/build/build-cjs/src/search-results/store/search-results-slice.d.ts +63 -26
  146. package/build/build-cjs/src/search-results/store/search-results-store.d.ts +20 -7
  147. package/build/build-cjs/src/search-results/types.d.ts +104 -104
  148. package/build/build-cjs/src/search-results/utils/flight-utils.d.ts +6 -1
  149. package/build/build-cjs/src/search-results/utils/search-results-utils.d.ts +10 -2
  150. package/build/build-cjs/src/shared/components/flyin/accommodation-flyin.d.ts +3 -3
  151. package/build/build-cjs/src/shared/components/flyin/flights-flyin.d.ts +2 -2
  152. package/build/build-cjs/src/shared/components/flyin/flyin.d.ts +7 -7
  153. package/build/build-cjs/src/shared/components/flyin/group-tour-flyin.d.ts +3 -3
  154. package/build/build-cjs/src/shared/components/icon.d.ts +5 -5
  155. package/build/build-cjs/src/shared/components/loader.d.ts +1 -1
  156. package/build/build-cjs/src/shared/types.d.ts +9 -9
  157. package/build/build-cjs/src/shared/utils/localization-util.d.ts +395 -396
  158. package/build/build-esm/index.js +48531 -29650
  159. package/build/build-esm/src/booking-product/components/age-select.d.ts +3 -3
  160. package/build/build-esm/src/booking-product/components/amount-input.d.ts +5 -5
  161. package/build/build-esm/src/booking-product/components/date-range-picker/calendar-day.d.ts +8 -8
  162. package/build/build-esm/src/booking-product/components/date-range-picker/calendar.d.ts +14 -14
  163. package/build/build-esm/src/booking-product/components/date-range-picker/index.d.ts +16 -19
  164. package/build/build-esm/src/booking-product/components/dates.d.ts +8 -8
  165. package/build/build-esm/src/booking-product/components/footer.d.ts +5 -5
  166. package/build/build-esm/src/booking-product/components/header.d.ts +6 -6
  167. package/build/build-esm/src/booking-product/components/icon.d.ts +5 -5
  168. package/build/build-esm/src/booking-product/components/list-view.d.ts +2 -2
  169. package/build/build-esm/src/booking-product/components/product.d.ts +4 -4
  170. package/build/build-esm/src/booking-product/components/rating.d.ts +1 -1
  171. package/build/build-esm/src/booking-product/components/rooms.d.ts +4 -4
  172. package/build/build-esm/src/booking-product/constants.d.ts +1 -1
  173. package/build/build-esm/src/booking-product/index.d.ts +4 -4
  174. package/build/build-esm/src/booking-product/settings-context.d.ts +1 -2
  175. package/build/build-esm/src/booking-product/types.d.ts +21 -21
  176. package/build/build-esm/src/booking-product/utils/api.d.ts +11 -2
  177. package/build/build-esm/src/booking-product/utils/price.d.ts +10 -1
  178. package/build/build-esm/src/booking-wizard/api-settings-slice.d.ts +3 -2
  179. package/build/build-esm/src/booking-wizard/components/icon.d.ts +5 -5
  180. package/build/build-esm/src/booking-wizard/components/labeled-input.d.ts +13 -13
  181. package/build/build-esm/src/booking-wizard/components/labeled-select.d.ts +16 -16
  182. package/build/build-esm/src/booking-wizard/components/message.d.ts +4 -4
  183. package/build/build-esm/src/booking-wizard/components/multi-range-filter.d.ts +6 -6
  184. package/build/build-esm/src/booking-wizard/components/phone-input.d.ts +11 -11
  185. package/build/build-esm/src/booking-wizard/components/print-offer-button.d.ts +11 -11
  186. package/build/build-esm/src/booking-wizard/components/product-card.d.ts +3 -3
  187. package/build/build-esm/src/booking-wizard/components/step-indicator.d.ts +1 -1
  188. package/build/build-esm/src/booking-wizard/components/step-route.d.ts +3 -3
  189. package/build/build-esm/src/booking-wizard/features/booking/api.d.ts +26 -7
  190. package/build/build-esm/src/booking-wizard/features/booking/booking-self-contained.d.ts +3 -3
  191. package/build/build-esm/src/booking-wizard/features/booking/booking-slice.d.ts +102 -43
  192. package/build/build-esm/src/booking-wizard/features/booking/booking.d.ts +3 -3
  193. package/build/build-esm/src/booking-wizard/features/booking/constants.d.ts +8 -1
  194. package/build/build-esm/src/booking-wizard/features/booking/selectors.d.ts +644 -479
  195. package/build/build-esm/src/booking-wizard/features/confirmation/confirmation.d.ts +1 -2
  196. package/build/build-esm/src/booking-wizard/features/error/error.d.ts +1 -2
  197. package/build/build-esm/src/booking-wizard/features/flight-options/flight-filter.d.ts +3 -3
  198. package/build/build-esm/src/booking-wizard/features/flight-options/flight-option-flight.d.ts +2 -2
  199. package/build/build-esm/src/booking-wizard/features/flight-options/flight-option.d.ts +4 -4
  200. package/build/build-esm/src/booking-wizard/features/flight-options/flight-utils.d.ts +9 -2
  201. package/build/build-esm/src/booking-wizard/features/flight-options/index.d.ts +1 -2
  202. package/build/build-esm/src/booking-wizard/features/price-details/price-details-api.d.ts +6 -1
  203. package/build/build-esm/src/booking-wizard/features/price-details/price-details-slice.d.ts +15 -10
  204. package/build/build-esm/src/booking-wizard/features/price-details/selectors.d.ts +302 -287
  205. package/build/build-esm/src/booking-wizard/features/product-options/none-option.d.ts +3 -3
  206. package/build/build-esm/src/booking-wizard/features/product-options/option-booking-airline-group.d.ts +2 -2
  207. package/build/build-esm/src/booking-wizard/features/product-options/option-booking-group.d.ts +6 -6
  208. package/build/build-esm/src/booking-wizard/features/product-options/option-item.d.ts +5 -5
  209. package/build/build-esm/src/booking-wizard/features/product-options/option-pax-card.d.ts +4 -4
  210. package/build/build-esm/src/booking-wizard/features/product-options/option-pax-group.d.ts +7 -7
  211. package/build/build-esm/src/booking-wizard/features/product-options/option-room.d.ts +5 -5
  212. package/build/build-esm/src/booking-wizard/features/product-options/option-unit-group.d.ts +7 -7
  213. package/build/build-esm/src/booking-wizard/features/product-options/option-units-card.d.ts +3 -3
  214. package/build/build-esm/src/booking-wizard/features/product-options/options-form.d.ts +1 -2
  215. package/build/build-esm/src/booking-wizard/features/room-options/index.d.ts +1 -2
  216. package/build/build-esm/src/booking-wizard/features/room-options/room-utils.d.ts +19 -6
  217. package/build/build-esm/src/booking-wizard/features/room-options/room.d.ts +6 -6
  218. package/build/build-esm/src/booking-wizard/features/room-options/traveler-rooms.d.ts +3 -3
  219. package/build/build-esm/src/booking-wizard/features/sidebar/index.d.ts +2 -2
  220. package/build/build-esm/src/booking-wizard/features/sidebar/sidebar-flight.d.ts +2 -2
  221. package/build/build-esm/src/booking-wizard/features/sidebar/sidebar-util.d.ts +4 -2
  222. package/build/build-esm/src/booking-wizard/features/sidebar/sidebar.d.ts +24 -24
  223. package/build/build-esm/src/booking-wizard/features/summary/summary-booking-option-pax.d.ts +1 -1
  224. package/build/build-esm/src/booking-wizard/features/summary/summary-booking-option-unit.d.ts +1 -1
  225. package/build/build-esm/src/booking-wizard/features/summary/summary-flight.d.ts +2 -2
  226. package/build/build-esm/src/booking-wizard/features/summary/summary-per-booking-option-group.d.ts +1 -1
  227. package/build/build-esm/src/booking-wizard/features/summary/summary-per-pax-option-group.d.ts +1 -1
  228. package/build/build-esm/src/booking-wizard/features/summary/summary-per-unit-option-group.d.ts +1 -1
  229. package/build/build-esm/src/booking-wizard/features/summary/summary-slice.d.ts +3 -3
  230. package/build/build-esm/src/booking-wizard/features/summary/summary.d.ts +1 -2
  231. package/build/build-esm/src/booking-wizard/features/travelers-form/travelers-form-slice.d.ts +75 -75
  232. package/build/build-esm/src/booking-wizard/features/travelers-form/travelers-form-util.d.ts +4 -4
  233. package/build/build-esm/src/booking-wizard/features/travelers-form/travelers-form.d.ts +1 -2
  234. package/build/build-esm/src/booking-wizard/features/travelers-form/type-ahead-input.d.ts +11 -11
  235. package/build/build-esm/src/booking-wizard/features/travelers-form/validate-form.d.ts +8 -1
  236. package/build/build-esm/src/booking-wizard/index.d.ts +6 -6
  237. package/build/build-esm/src/booking-wizard/settings-context.d.ts +1 -2
  238. package/build/build-esm/src/booking-wizard/store.d.ts +40 -22
  239. package/build/build-esm/src/booking-wizard/types.d.ts +240 -240
  240. package/build/build-esm/src/booking-wizard/use-offer-printer.d.ts +8 -8
  241. package/build/build-esm/src/content/components/LanguageSwitcher.d.ts +5 -5
  242. package/build/build-esm/src/content/components/accordion.d.ts +4 -4
  243. package/build/build-esm/src/content/components/breadcrumb.d.ts +7 -7
  244. package/build/build-esm/src/content/components/faq.d.ts +4 -4
  245. package/build/build-esm/src/content/components/gallery.d.ts +6 -6
  246. package/build/build-esm/src/content/components/icon.d.ts +5 -5
  247. package/build/build-esm/src/content/components/image-with-text.d.ts +18 -18
  248. package/build/build-esm/src/content/components/slider.d.ts +5 -5
  249. package/build/build-esm/src/content/featured-trips/types.d.ts +8 -8
  250. package/build/build-esm/src/content/features/content-page/content-page-self-contained.d.ts +1 -1
  251. package/build/build-esm/src/content/footer/types.d.ts +17 -17
  252. package/build/build-esm/src/content/header/types.d.ts +23 -20
  253. package/build/build-esm/src/content/image-card-grid/types.d.ts +8 -8
  254. package/build/build-esm/src/content/image-with-text-section/types.d.ts +15 -15
  255. package/build/build-esm/src/content/login/login-services.d.ts +6 -1
  256. package/build/build-esm/src/content/login/types.d.ts +19 -19
  257. package/build/build-esm/src/content/navbar/placeholderData.d.ts +2 -2
  258. package/build/build-esm/src/content/navbar/types.d.ts +22 -22
  259. package/build/build-esm/src/index.d.ts +17 -1
  260. package/build/build-esm/src/qsm/components/date-range-picker/calendar-day.d.ts +7 -7
  261. package/build/build-esm/src/qsm/components/date-range-picker/calendar.d.ts +18 -18
  262. package/build/build-esm/src/qsm/components/date-range-picker/index.d.ts +5 -5
  263. package/build/build-esm/src/qsm/components/double-search-input-group/index.d.ts +2 -2
  264. package/build/build-esm/src/qsm/components/icon.d.ts +5 -5
  265. package/build/build-esm/src/qsm/components/item-picker/index.d.ts +7 -7
  266. package/build/build-esm/src/qsm/components/search-input/index.d.ts +9 -9
  267. package/build/build-esm/src/qsm/components/search-input-group/index.d.ts +7 -7
  268. package/build/build-esm/src/qsm/index.d.ts +1 -1
  269. package/build/build-esm/src/qsm/store/qsm-slice.d.ts +110 -58
  270. package/build/build-esm/src/qsm/store/qsm-store.d.ts +20 -7
  271. package/build/build-esm/src/qsm/types.d.ts +59 -59
  272. package/build/build-esm/src/search-results/components/filters/filters.d.ts +5 -5
  273. package/build/build-esm/src/search-results/components/filters/flight-filters.d.ts +3 -3
  274. package/build/build-esm/src/search-results/components/flight/flight-banner.d.ts +2 -2
  275. package/build/build-esm/src/search-results/components/flight/flight-card.d.ts +1 -1
  276. package/build/build-esm/src/search-results/components/flight/flight-leg.d.ts +1 -1
  277. package/build/build-esm/src/search-results/components/flight/flight-path.d.ts +1 -1
  278. package/build/build-esm/src/search-results/components/flight/flight-results.d.ts +2 -2
  279. package/build/build-esm/src/search-results/components/flight/flight-search-context/index.d.ts +29 -29
  280. package/build/build-esm/src/search-results/components/flight/flight-selection/independent-flight-option.d.ts +5 -5
  281. package/build/build-esm/src/search-results/components/flight/flight-selection/independent-flight-selection.d.ts +1 -1
  282. package/build/build-esm/src/search-results/components/flight/flight-selection/index.d.ts +2 -2
  283. package/build/build-esm/src/search-results/components/flight/flight-selection/paired-flight-option.d.ts +1 -1
  284. package/build/build-esm/src/search-results/components/flight/flight-selection/paired-flight-selection.d.ts +1 -1
  285. package/build/build-esm/src/search-results/components/group-tour/group-tour-card.d.ts +3 -3
  286. package/build/build-esm/src/search-results/components/group-tour/group-tour-results.d.ts +1 -1
  287. package/build/build-esm/src/search-results/components/hotel/hotel-accommodation-results.d.ts +1 -1
  288. package/build/build-esm/src/search-results/components/hotel/hotel-card.d.ts +2 -2
  289. package/build/build-esm/src/search-results/components/icon.d.ts +6 -6
  290. package/build/build-esm/src/search-results/components/item-picker/index.d.ts +8 -8
  291. package/build/build-esm/src/search-results/components/itinerary/index.d.ts +3 -3
  292. package/build/build-esm/src/search-results/components/multi-range-filter.d.ts +6 -6
  293. package/build/build-esm/src/search-results/components/round-trip/round-trip-results.d.ts +1 -2
  294. package/build/build-esm/src/search-results/components/search-results-container/flight-search-results.d.ts +1 -1
  295. package/build/build-esm/src/search-results/components/tab-views/index.d.ts +1 -2
  296. package/build/build-esm/src/search-results/features/flights/flight-search-results-self-contained.d.ts +1 -2
  297. package/build/build-esm/src/search-results/features/hotels/hotel-flight-search-results-self-contained.d.ts +1 -2
  298. package/build/build-esm/src/search-results/features/hotels/hotel-search-results-self-contained.d.ts +1 -2
  299. package/build/build-esm/src/search-results/features/roundtrips/roundtrip-search-results-self-contained.d.ts +1 -2
  300. package/build/build-esm/src/search-results/index.d.ts +1 -1
  301. package/build/build-esm/src/search-results/store/search-results-slice.d.ts +63 -26
  302. package/build/build-esm/src/search-results/store/search-results-store.d.ts +20 -7
  303. package/build/build-esm/src/search-results/types.d.ts +104 -104
  304. package/build/build-esm/src/search-results/utils/flight-utils.d.ts +6 -1
  305. package/build/build-esm/src/search-results/utils/search-results-utils.d.ts +10 -2
  306. package/build/build-esm/src/shared/components/flyin/accommodation-flyin.d.ts +3 -3
  307. package/build/build-esm/src/shared/components/flyin/flights-flyin.d.ts +2 -2
  308. package/build/build-esm/src/shared/components/flyin/flyin.d.ts +7 -7
  309. package/build/build-esm/src/shared/components/flyin/group-tour-flyin.d.ts +3 -3
  310. package/build/build-esm/src/shared/components/icon.d.ts +5 -5
  311. package/build/build-esm/src/shared/components/loader.d.ts +1 -1
  312. package/build/build-esm/src/shared/types.d.ts +9 -9
  313. package/build/build-esm/src/shared/utils/localization-util.d.ts +395 -396
  314. package/package.json +83 -83
  315. package/rollup.config.js +16 -16
  316. package/src/booking-product/components/date-range-picker/calendar-day.tsx +46 -46
  317. package/src/booking-product/components/date-range-picker/index.tsx +185 -185
  318. package/src/booking-product/components/dates.tsx +153 -153
  319. package/src/booking-product/components/product.tsx +379 -379
  320. package/src/booking-wizard/components/step-indicator.tsx +57 -57
  321. package/src/booking-wizard/components/step-route.tsx +26 -26
  322. package/src/booking-wizard/features/booking/api.ts +44 -44
  323. package/src/booking-wizard/features/booking/booking-self-contained.tsx +318 -318
  324. package/src/booking-wizard/features/booking/booking-slice.ts +633 -633
  325. package/src/booking-wizard/features/booking/booking.tsx +342 -342
  326. package/src/booking-wizard/features/booking/constants.ts +16 -16
  327. package/src/booking-wizard/features/booking/selectors.ts +411 -411
  328. package/src/booking-wizard/features/confirmation/confirmation.tsx +90 -90
  329. package/src/booking-wizard/features/error/error.tsx +71 -71
  330. package/src/booking-wizard/features/flight-options/index.tsx +166 -166
  331. package/src/booking-wizard/features/price-details/price-details-slice.ts +79 -79
  332. package/src/booking-wizard/features/price-details/selectors.ts +118 -118
  333. package/src/booking-wizard/features/product-options/option-units-card.tsx +148 -148
  334. package/src/booking-wizard/features/product-options/options-form.tsx +382 -382
  335. package/src/booking-wizard/features/room-options/index.tsx +132 -132
  336. package/src/booking-wizard/features/sidebar/index.tsx +83 -83
  337. package/src/booking-wizard/features/sidebar/sidebar-util.ts +147 -147
  338. package/src/booking-wizard/features/sidebar/sidebar.tsx +344 -332
  339. package/src/booking-wizard/features/summary/summary.tsx +562 -562
  340. package/src/booking-wizard/features/travelers-form/controls/gender-control.tsx +60 -60
  341. package/src/booking-wizard/features/travelers-form/travelers-form.tsx +1101 -1101
  342. package/src/booking-wizard/settings-context.ts +64 -64
  343. package/src/booking-wizard/types.ts +332 -332
  344. package/src/content/components/breadcrumb.tsx +67 -67
  345. package/src/content/components/faq.tsx +42 -42
  346. package/src/content/components/gallery.tsx +153 -153
  347. package/src/content/components/icon.tsx +695 -695
  348. package/src/content/components/image-with-text.tsx +120 -120
  349. package/src/content/components/login.tsx +162 -162
  350. package/src/content/components/slider.tsx +237 -237
  351. package/src/content/featured-trips/featured-trip-card.tsx +48 -48
  352. package/src/content/featured-trips/index.tsx +19 -19
  353. package/src/content/featured-trips/types.ts +13 -13
  354. package/src/content/features/content-page/content-page-self-contained.tsx +895 -895
  355. package/src/content/footer/index.tsx +159 -159
  356. package/src/content/footer/types.ts +36 -36
  357. package/src/content/image-card-grid/index.tsx +34 -34
  358. package/src/content/image-card-grid/types.ts +13 -13
  359. package/src/content/image-with-text-section/card.tsx +58 -58
  360. package/src/content/image-with-text-section/index.tsx +22 -22
  361. package/src/content/image-with-text-section/types.ts +20 -20
  362. package/src/content/login/confirm-component.tsx +149 -149
  363. package/src/content/login/index.tsx +70 -70
  364. package/src/content/login/login-component.tsx +159 -159
  365. package/src/content/login/login-services.ts +109 -109
  366. package/src/content/login/reset-password-component.tsx +191 -191
  367. package/src/content/login/types.ts +29 -29
  368. package/src/content/navbar/index.tsx +354 -354
  369. package/src/content/navbar/placeholderData.tsx +173 -173
  370. package/src/content/navbar/types.ts +43 -43
  371. package/src/index.ts +44 -44
  372. package/src/qsm/components/QSMContainer/qsm-container.tsx +512 -512
  373. package/src/qsm/components/double-search-input-group/index.tsx +78 -78
  374. package/src/qsm/components/icon.tsx +354 -354
  375. package/src/qsm/components/item-picker/index.tsx +69 -69
  376. package/src/qsm/components/mobile-filter-modal/index.tsx +307 -307
  377. package/src/qsm/components/search-input/index.tsx +91 -91
  378. package/src/qsm/components/search-input-group/index.tsx +199 -199
  379. package/src/qsm/components/travel-class-picker/index.tsx +28 -28
  380. package/src/qsm/components/travel-input/index.tsx +243 -243
  381. package/src/qsm/components/travel-input-group/index.tsx +114 -114
  382. package/src/qsm/components/travel-nationality-picker/index.tsx +28 -28
  383. package/src/qsm/components/travel-type-picker/index.tsx +28 -28
  384. package/src/qsm/qsm-configuration-context.ts +31 -31
  385. package/src/qsm/store/qsm-slice.ts +275 -275
  386. package/src/qsm/types.ts +110 -110
  387. package/src/search-results/components/filters/filters.tsx +230 -230
  388. package/src/search-results/components/filters/flight-filters.tsx +671 -671
  389. package/src/search-results/components/flight/flight-banner.tsx +35 -35
  390. package/src/search-results/components/flight/flight-results.tsx +208 -208
  391. package/src/search-results/components/flight/flight-search-context/index.tsx +628 -628
  392. package/src/search-results/components/flight/flight-selection/independent-flight-option.tsx +147 -147
  393. package/src/search-results/components/flight/flight-selection/independent-flight-selection.tsx +172 -172
  394. package/src/search-results/components/flight/flight-selection/index.tsx +19 -19
  395. package/src/search-results/components/flight/flight-selection/paired-flight-option.tsx +255 -255
  396. package/src/search-results/components/flight/flight-selection/paired-flight-selection.tsx +38 -38
  397. package/src/search-results/components/group-tour/group-tour-card.tsx +105 -105
  398. package/src/search-results/components/group-tour/group-tour-results.tsx +62 -62
  399. package/src/search-results/components/hotel/hotel-accommodation-results.tsx +176 -176
  400. package/src/search-results/components/hotel/hotel-card.tsx +113 -113
  401. package/src/search-results/components/icon.tsx +680 -680
  402. package/src/search-results/components/item-picker/index.tsx +81 -81
  403. package/src/search-results/components/itinerary/index.tsx +310 -310
  404. package/src/search-results/components/round-trip/round-trip-results.tsx +199 -199
  405. package/src/search-results/components/search-results-container/flight-search-results.tsx +137 -137
  406. package/src/search-results/components/search-results-container/search-results-container.tsx +893 -893
  407. package/src/search-results/components/spinner/spinner.tsx +16 -16
  408. package/src/search-results/components/tab-views/index.tsx +53 -53
  409. package/src/search-results/features/flights/flight-search-results-self-contained.tsx +294 -294
  410. package/src/search-results/features/hotels/hotel-flight-search-results-self-contained.tsx +143 -143
  411. package/src/search-results/features/hotels/hotel-search-results-self-contained.tsx +220 -220
  412. package/src/search-results/features/roundtrips/roundtrip-search-results-self-contained.tsx +65 -65
  413. package/src/search-results/store/search-results-slice.ts +158 -158
  414. package/src/search-results/types.ts +181 -181
  415. package/src/search-results/utils/flight-utils.ts +93 -93
  416. package/src/search-results/utils/search-results-utils.ts +251 -251
  417. package/src/shared/components/flyin/accommodation-flyin.tsx +422 -422
  418. package/src/shared/components/flyin/flights-flyin.tsx +503 -503
  419. package/src/shared/components/flyin/flyin.tsx +82 -82
  420. package/src/shared/components/flyin/group-tour-flyin.tsx +293 -293
  421. package/src/shared/components/icon.tsx +826 -826
  422. package/src/shared/translations/ar-SA.json +382 -382
  423. package/src/shared/translations/da-DK.json +382 -382
  424. package/src/shared/translations/de-DE.json +382 -382
  425. package/src/shared/translations/en-GB.json +386 -386
  426. package/src/shared/translations/es-ES.json +382 -382
  427. package/src/shared/translations/fr-BE.json +386 -386
  428. package/src/shared/translations/fr-FR.json +382 -382
  429. package/src/shared/translations/is-IS.json +382 -382
  430. package/src/shared/translations/it-IT.json +382 -382
  431. package/src/shared/translations/ja-JP.json +382 -382
  432. package/src/shared/translations/nl-BE.json +386 -386
  433. package/src/shared/translations/nl-NL.json +382 -382
  434. package/src/shared/translations/no-NO.json +382 -382
  435. package/src/shared/translations/pl-PL.json +382 -382
  436. package/src/shared/translations/pt-PT.json +382 -382
  437. package/src/shared/translations/sv-SE.json +382 -382
  438. package/src/shared/types.ts +31 -31
  439. package/src/shared/utils/localization-util.ts +275 -275
  440. package/styles/booking-search-results-variables.scss +728 -728
  441. package/styles/booking-search-results.scss +53 -53
  442. package/styles/components/_booking.scss +872 -872
  443. package/styles/components/_content.scss +336 -336
  444. package/styles/components/_flyin.scss +727 -727
  445. package/styles/components/_footer.scss +141 -141
  446. package/styles/components/_form.scss +1634 -1634
  447. package/styles/components/_image-with-text.scss +206 -206
  448. package/styles/components/_login.scss +140 -140
  449. package/styles/components/_navbar.scss +765 -765
  450. package/styles/components/_pricing-summary.scss +163 -163
  451. package/styles/components/_search.scss +2009 -2009
  452. package/styles/components/_tree.scss +648 -648
  453. package/styles/content-blocks.scss +64 -64
@@ -1,411 +1,411 @@
1
- import JsonURL from '@jsonurl/jsonurl';
2
- import { Gender } from '@qite/tide-client';
3
- import { BookingPackageAddress, BookingPackageBookRequest, BookingPackagePax, BookingPackageRequest } from '@qite/tide-client/build/types';
4
- import { createSelector } from '@reduxjs/toolkit';
5
- import { format, parseISO } from 'date-fns';
6
- import { omit } from 'lodash';
7
- import { getTranslations } from '../../../shared/utils/localization-util';
8
- import { RootState } from '../../store';
9
- import { FlightInfo, Room, Traveler } from '../../types';
10
- import { selectNotifications } from '../price-details/price-details-slice';
11
- import { selectAgentId, selectTravelersFormValues } from '../travelers-form/travelers-form-slice';
12
-
13
- export const selectHasMounted = (state: RootState) => state.booking.hasMounted;
14
-
15
- export const selectIsFetching = (state: RootState) => state.booking.isFetching;
16
-
17
- export const selectCurrentStep = (state: RootState) => state.booking.currentStep;
18
-
19
- export const selectGeneratePaymentUrl = (state: RootState) => state.booking.generatePaymentUrl;
20
-
21
- export const selectSkipPaymentWithAgent = (state: RootState) => state.booking.skipPaymentWithAgent;
22
-
23
- export const selectIsFetchingProductOptions = (state: RootState) => state.booking.isBusy;
24
-
25
- export const selectDepartureFlight = (state: RootState) => state.booking.package?.outwardFlights?.find((x) => x.isSelected);
26
-
27
- export const selectReturnFlight = (state: RootState) => state.booking.package?.returnFlights?.find((x) => x.isSelected);
28
-
29
- export const selectPackageRooms = (state: RootState) => state.booking.package?.options.find((x) => x.isSelected)?.rooms;
30
-
31
- export const selectIncludedServiceTypes = (state: RootState) => selectActiveOption(state)?.includedServiceTypes;
32
-
33
- export const selectAvailabilities = (state: RootState) => state.booking.package?.options.find((x) => x.isSelected)?.availabilities;
34
-
35
- export const selectPackageTags = (state: RootState) => state.booking.package?.tags;
36
-
37
- export const selectIsOnRequest = (state: RootState) => state.booking.package?.options.find((x) => x.isSelected)?.isOnRequest;
38
-
39
- export const selectPackageOptionUnits = (state: RootState) => state.booking.package?.options.find((x) => x.isSelected)?.optionUnits;
40
-
41
- export const selectPackageOptionPax = (state: RootState) => state.booking.package?.options.find((x) => x.isSelected)?.optionPax;
42
-
43
- export const selectPackageGroups = (state: RootState) => state.booking.package?.options.find((x) => x.isSelected)?.groups;
44
-
45
- export const selectPackageDetails = (state: RootState) => state.booking.package;
46
-
47
- export const selectPackageFlights = (state: RootState) => ({
48
- outward: state.booking.package?.outwardFlights,
49
- return: state.booking.package?.returnFlights
50
- });
51
-
52
- export const selectFlightMetaData = (state: RootState) => state.booking.package?.flightInfo.metaData;
53
-
54
- export const selectActiveOption = (state: RootState) => state.booking.package?.options.find((x) => x.isSelected);
55
-
56
- export const selectPackageAirlineGroups = createSelector(
57
- selectActiveOption,
58
- selectDepartureFlight,
59
- selectReturnFlight,
60
- (option, departureFlight, returnFlight) =>
61
- option?.airlineGroups.filter((x) => x.flightIds.includes(departureFlight?.entryLineGuid ?? '') || x.flightIds.includes(returnFlight?.entryLineGuid ?? ''))
62
- );
63
-
64
- export const selectPackageAirportGroups = createSelector(
65
- selectActiveOption,
66
- selectDepartureFlight,
67
- selectReturnFlight,
68
- (option, departureFlight, returnFlight) =>
69
- option?.airportGroups.filter((x) => x.flightIds.includes(departureFlight?.entryLineGuid ?? '') || x.flightIds.includes(returnFlight?.entryLineGuid ?? ''))
70
- );
71
-
72
- export const selectRoomOptionDepartureFlightsMetaData = createSelector(selectActiveOption, selectFlightMetaData, (ativeOption, flightMetaData) => {
73
- const roomOptions = ativeOption?.rooms.map((r) => r.options.filter((o) => o.isSelected).shift());
74
- return roomOptions?.map((ro) => flightMetaData?.find((f) => f.entryLineGuid === ro?.entryLineGuid)?.flightMetaData).filter((f) => f !== undefined) ?? [];
75
- });
76
-
77
- export const selectRoomOptionReturnFlightsMetaData = createSelector(selectActiveOption, selectFlightMetaData, (ativeOption, flightMetaData) => {
78
- const selectedRoomOptions = ativeOption?.rooms.map((r) => r.options.filter((o) => o.isSelected));
79
- // check if there are return flights selected
80
- if (selectedRoomOptions?.some((ro) => ro.length > 1)) {
81
- const roomOptions = ativeOption?.rooms.map((r) =>
82
- r.options
83
- .filter((o) => o.isSelected)
84
- .reverse()
85
- .shift()
86
- );
87
- return roomOptions?.map((ro) => flightMetaData?.find((f) => f.entryLineGuid === ro?.entryLineGuid)?.flightMetaData).filter((f) => f !== undefined) ?? [];
88
- }
89
- return undefined;
90
- });
91
-
92
- export const selectApiSettings = (state: RootState) => state.apiSettings;
93
-
94
- export const selectIsUnavailable = (state: RootState) => state.booking.isUnavailable;
95
-
96
- export const selectRequestRooms = (state: RootState) => state.booking.package?.options.find((x) => x.isSelected)?.requestRooms;
97
-
98
- export const selectOfficeId = (state: RootState) => state.booking.officeId;
99
-
100
- export const selectLanguageCode = (state: RootState) => state.booking.languageCode;
101
-
102
- export const selectCurrencyCode = (state: RootState) => state.booking.package?.currencyCode ?? 'EUR';
103
-
104
- export const selectDefaultStaticTranslations = (state: RootState) => getTranslations(state.booking.languageCode) as Record<string, any>;
105
-
106
- export const selectLanguage = (state: RootState) => state.booking.languageCode;
107
-
108
- export const selectAllDynamicTranslations = (state: RootState) => state.booking.translations;
109
-
110
- export const selectDynamicTranslations = createSelector([selectAllDynamicTranslations, selectLanguage], (allDynamicTranslations, language) => {
111
- return allDynamicTranslations?.find((x) => x.language == language)?.value ?? {};
112
- });
113
-
114
- export const selectTranslations = createSelector(
115
- [selectDefaultStaticTranslations, selectDynamicTranslations],
116
- (defaultStaticTranslations, dynamicTranslations) => {
117
- const merged = {} as Record<string, any>;
118
-
119
- for (const key of Array.from(new Set([...Object.keys(defaultStaticTranslations), ...Object.keys(dynamicTranslations)]))) {
120
- merged[key] = {
121
- ...(defaultStaticTranslations[key] || {}),
122
- ...(dynamicTranslations[key] || {})
123
- };
124
- }
125
-
126
- return merged;
127
- }
128
- );
129
-
130
- export const selectBookingOptions = (state: RootState) => state.booking.bookingOptions;
131
-
132
- export const selectBookingType = (state: RootState) => state.booking.bookingType;
133
-
134
- export const selectTagIds = (state: RootState) => state.booking.tagIds;
135
-
136
- export const selectAgentAdressId = (state: RootState) => state.booking.agentAdressId;
137
-
138
- export const selectProductAttributes = (state: RootState) => state.booking.productAttributes;
139
-
140
- export const selectBookingAttributes = (state: RootState) => state.booking.bookingAttributes;
141
-
142
- export const selectBookingNumber = (state: RootState) => state.booking.bookingNumber;
143
-
144
- export const selectIsOption = (state: RootState) => state.booking.isOption;
145
-
146
- export const selectBookingRooms = (state: RootState) => state.booking.bookingAttributes?.rooms;
147
-
148
- export const selectBookingRemarks = (state: RootState) => state.booking.remarks;
149
-
150
- export const selectVoucherCodes = (state: RootState) => state.booking.voucherCodes;
151
-
152
- export const selectCalculateDeposit = (state: RootState) => state.booking.calculateDeposit;
153
-
154
- export const selectShowCommission = (state: RootState) => state.booking.showCommission;
155
-
156
- export const selectIsRetry = (state: RootState) => state.booking.isRetry;
157
-
158
- export const selectStartDate = (state: RootState) => state.booking.package?.options.find((x) => x.isSelected)?.fromDate;
159
-
160
- export const selectAgents = (state: RootState) => state.booking.agents;
161
-
162
- export const selectCountries = (state: RootState) => state.booking.countries;
163
-
164
- export const selectProductCode = (state: RootState) => state.booking.productAttributes?.productCode;
165
-
166
- export const selectAccommodationCodes = (state: RootState) => {
167
- const accommodationCodes: string[] = [];
168
- state.booking.package?.options.forEach((o) => {
169
- o.rooms.forEach((r) =>
170
- r.options.forEach((ro) => {
171
- if (!accommodationCodes.some((y) => y === ro.accommodationCode)) {
172
- accommodationCodes.push(ro.accommodationCode);
173
- }
174
- })
175
- );
176
- });
177
- return accommodationCodes;
178
- };
179
-
180
- export const selectAccommodationViews = (state: RootState) => state.booking.accommodationViews;
181
-
182
- export const selectBookingQuery = (state: RootState) => {
183
- const bookingAttributes = state.booking.bookingAttributes;
184
-
185
- if (!bookingAttributes) {
186
- return undefined;
187
- }
188
-
189
- const params: Record<string, string> = {};
190
- Object.entries(bookingAttributes).forEach(([key, value]) => {
191
- if (key === 'startDate' || key === 'endDate') {
192
- value = format(parseISO(value), 'yyyy-MM-dd');
193
- }
194
-
195
- if (key === 'rooms') {
196
- value = JsonURL.stringify(
197
- (value as Room[]).map((room) => omit(room, ['children'])),
198
- {
199
- AQF: true
200
- }
201
- );
202
- }
203
-
204
- if (key === 'allotmentIds' && !value.length) {
205
- value = undefined;
206
- }
207
-
208
- if (key === 'flight' && value) {
209
- var flightInfo = value as FlightInfo;
210
- value = JsonURL.stringify(flightInfo, { AQF: true });
211
- }
212
-
213
- if (value) {
214
- params[key] = value;
215
- }
216
- });
217
-
218
- return params;
219
- };
220
-
221
- export const selectBookingQueryString = createSelector(selectBookingQuery, (params) => {
222
- if (!params) {
223
- return undefined;
224
- }
225
-
226
- return Object.keys(params)
227
- .filter((key) => typeof params[key] !== 'undefined')
228
- .map((key) => `${key}=${params[key]}`)
229
- .join('&');
230
- });
231
-
232
- export const selectMainBookerId = createSelector(selectTravelersFormValues, (formValues) => formValues?.mainBookerId);
233
-
234
- export const selectBookingPackagePax = createSelector(selectTravelersFormValues, (formValues) => {
235
- var pax: BookingPackagePax[] = [];
236
-
237
- formValues?.rooms.forEach((r) =>
238
- r.adults.forEach((x) => {
239
- const adultPax = buildPax(x, formValues?.mainBookerId);
240
-
241
- if (adultPax.isMainBooker) {
242
- adultPax.mobilePhone = formValues?.phone;
243
- adultPax.email = formValues?.email;
244
- }
245
-
246
- pax.push(adultPax);
247
- })
248
- );
249
-
250
- formValues?.rooms.forEach((r) =>
251
- r.children.forEach((x) => {
252
- pax.push(buildPax(x));
253
- })
254
- );
255
-
256
- return pax;
257
- });
258
-
259
- export const selectBookingAddress = createSelector(selectTravelersFormValues, selectBookingPackagePax, selectBookingType, (formValues, pax, bookingType) => {
260
- const mainBooker = pax.find((x) => x.isMainBooker);
261
- if (!mainBooker || bookingType == 'b2b') return undefined;
262
-
263
- return {
264
- name: `${mainBooker.firstName} ${mainBooker.lastName}`,
265
- street: formValues?.street,
266
- number: formValues?.houseNumber,
267
- box: formValues?.box,
268
- postalCode: formValues?.zipCode,
269
- location: formValues?.place,
270
- country: formValues?.country,
271
- mobilePhone: formValues?.phone,
272
- email: formValues?.email
273
- } as BookingPackageAddress;
274
- });
275
-
276
- export const selectBookingPackageRequest = createSelector(selectOfficeId, selectAgentId, selectAgentAdressId, (officeId, agentId, agentAdressId) => {
277
- const agencyId = (agentId ?? agentAdressId ?? 0) > 0 ? agentId ?? agentAdressId : null;
278
-
279
- return {
280
- officeId: officeId,
281
- agentId: agencyId,
282
- payload: null
283
- } as BookingPackageRequest<any>;
284
- });
285
-
286
- export const selectBookingPackageBookRequest = createSelector(
287
- selectBookingPackageRequest,
288
- selectBookingOptions,
289
- selectBookingType,
290
- selectBookingPackagePax,
291
- selectBookingAddress,
292
- selectPackageDetails,
293
- selectCalculateDeposit,
294
- selectShowCommission,
295
- selectAgentId,
296
- selectGeneratePaymentUrl,
297
- selectSkipPaymentWithAgent,
298
- selectNotifications,
299
- selectTagIds,
300
- selectBookingRemarks,
301
- selectVoucherCodes,
302
- (
303
- bookingPackageRequest: BookingPackageRequest<BookingPackageBookRequest>,
304
- bookingOptions,
305
- bookingType,
306
- pax,
307
- address,
308
- packageDetails,
309
- calculateDeposit,
310
- showCommission,
311
- agentId,
312
- generatePaymentUrl,
313
- skipPaymentWithAgent,
314
- notifications,
315
- tagIds,
316
- remarks,
317
- voucherCodes
318
- ) => {
319
- if (!packageDetails) return null;
320
-
321
- let returnPaymentUrl = false;
322
-
323
- if (generatePaymentUrl && (!skipPaymentWithAgent || (agentId ?? 0) == 0)) {
324
- returnPaymentUrl = true;
325
- }
326
-
327
- var entryStatus = 0;
328
- var customEntryStatusId = undefined;
329
-
330
- switch (bookingType) {
331
- case 'b2b':
332
- if (bookingOptions.b2b.tagIds && bookingOptions.b2b.tagIds.length > 0) {
333
- tagIds = tagIds?.concat(bookingOptions.b2b.tagIds);
334
- }
335
- if (bookingOptions.b2b.entryStatus) {
336
- entryStatus = bookingOptions.b2b.entryStatus;
337
- }
338
- if (bookingOptions.b2b.customEntryStatusId) {
339
- customEntryStatusId = bookingOptions.b2b.customEntryStatusId;
340
- }
341
- break;
342
- case 'b2b2c':
343
- if (bookingOptions.b2b2c.tagIds && bookingOptions.b2b2c.tagIds.length > 0) {
344
- tagIds = tagIds?.concat(bookingOptions.b2b2c.tagIds);
345
- }
346
- if (bookingOptions.b2b2c.entryStatus) {
347
- entryStatus = bookingOptions.b2b2c.entryStatus;
348
- }
349
- if (bookingOptions.b2b2c.customEntryStatusId) {
350
- customEntryStatusId = bookingOptions.b2b2c.customEntryStatusId;
351
- }
352
- break;
353
- default:
354
- if (bookingOptions.b2c.tagIds && bookingOptions.b2c.tagIds.length > 0) {
355
- tagIds = tagIds?.concat(bookingOptions.b2c.tagIds);
356
- }
357
- if (bookingOptions.b2c.entryStatus) {
358
- entryStatus = bookingOptions.b2c.entryStatus;
359
- }
360
- if (bookingOptions.b2c.customEntryStatusId) {
361
- customEntryStatusId = bookingOptions.b2c.customEntryStatusId;
362
- }
363
- break;
364
- }
365
-
366
- bookingPackageRequest.payload = {
367
- package: packageDetails,
368
- status: entryStatus,
369
- customStatusId: customEntryStatusId,
370
- address: address,
371
- pax: pax?.length != 0 ? pax : packageDetails.options[0].requestRooms.flatMap((x) => x.pax),
372
- nonTravelPax: [],
373
- calculateDeposit: calculateDeposit,
374
- showCommission: showCommission,
375
- returnPaymentUrl: returnPaymentUrl,
376
- notifications: notifications,
377
- tagIds: tagIds,
378
- remarks: remarks,
379
- voucherCodes: voucherCodes,
380
- customerRequests: []
381
- };
382
-
383
- return bookingPackageRequest;
384
- }
385
- );
386
-
387
- export const selectTravelersFirstStep = (state: any) => state.booking.travelersFirstStep;
388
-
389
- const buildPax = (traveler: Traveler, mainBookerId?: number) => {
390
- return {
391
- id: traveler.id,
392
- gender: parseGender(traveler.gender),
393
- firstName: traveler.firstName,
394
- lastName: traveler.lastName,
395
- dateOfBirth: traveler.birthDate,
396
- age: traveler.birthDate ? null : traveler.age,
397
- isMainBooker: traveler.id == mainBookerId
398
- } as BookingPackagePax;
399
- };
400
-
401
- const parseGender = (gender: string): number => {
402
- switch (gender) {
403
- case 'm':
404
- return Gender.male;
405
- case 'f':
406
- return Gender.female;
407
- case 'x':
408
- default:
409
- return Gender.other;
410
- }
411
- };
1
+ import JsonURL from '@jsonurl/jsonurl';
2
+ import { Gender } from '@qite/tide-client';
3
+ import { BookingPackageAddress, BookingPackageBookRequest, BookingPackagePax, BookingPackageRequest } from '@qite/tide-client/build/types';
4
+ import { createSelector } from '@reduxjs/toolkit';
5
+ import { format, parseISO } from 'date-fns';
6
+ import { omit } from 'lodash';
7
+ import { getTranslations } from '../../../shared/utils/localization-util';
8
+ import { RootState } from '../../store';
9
+ import { FlightInfo, Room, Traveler } from '../../types';
10
+ import { selectNotifications } from '../price-details/price-details-slice';
11
+ import { selectAgentId, selectTravelersFormValues } from '../travelers-form/travelers-form-slice';
12
+
13
+ export const selectHasMounted = (state: RootState) => state.booking.hasMounted;
14
+
15
+ export const selectIsFetching = (state: RootState) => state.booking.isFetching;
16
+
17
+ export const selectCurrentStep = (state: RootState) => state.booking.currentStep;
18
+
19
+ export const selectGeneratePaymentUrl = (state: RootState) => state.booking.generatePaymentUrl;
20
+
21
+ export const selectSkipPaymentWithAgent = (state: RootState) => state.booking.skipPaymentWithAgent;
22
+
23
+ export const selectIsFetchingProductOptions = (state: RootState) => state.booking.isBusy;
24
+
25
+ export const selectDepartureFlight = (state: RootState) => state.booking.package?.outwardFlights?.find((x) => x.isSelected);
26
+
27
+ export const selectReturnFlight = (state: RootState) => state.booking.package?.returnFlights?.find((x) => x.isSelected);
28
+
29
+ export const selectPackageRooms = (state: RootState) => state.booking.package?.options.find((x) => x.isSelected)?.rooms;
30
+
31
+ export const selectIncludedServiceTypes = (state: RootState) => selectActiveOption(state)?.includedServiceTypes;
32
+
33
+ export const selectAvailabilities = (state: RootState) => state.booking.package?.options.find((x) => x.isSelected)?.availabilities;
34
+
35
+ export const selectPackageTags = (state: RootState) => state.booking.package?.tags;
36
+
37
+ export const selectIsOnRequest = (state: RootState) => state.booking.package?.options.find((x) => x.isSelected)?.isOnRequest;
38
+
39
+ export const selectPackageOptionUnits = (state: RootState) => state.booking.package?.options.find((x) => x.isSelected)?.optionUnits;
40
+
41
+ export const selectPackageOptionPax = (state: RootState) => state.booking.package?.options.find((x) => x.isSelected)?.optionPax;
42
+
43
+ export const selectPackageGroups = (state: RootState) => state.booking.package?.options.find((x) => x.isSelected)?.groups;
44
+
45
+ export const selectPackageDetails = (state: RootState) => state.booking.package;
46
+
47
+ export const selectPackageFlights = (state: RootState) => ({
48
+ outward: state.booking.package?.outwardFlights,
49
+ return: state.booking.package?.returnFlights
50
+ });
51
+
52
+ export const selectFlightMetaData = (state: RootState) => state.booking.package?.flightInfo.metaData;
53
+
54
+ export const selectActiveOption = (state: RootState) => state.booking.package?.options.find((x) => x.isSelected);
55
+
56
+ export const selectPackageAirlineGroups = createSelector(
57
+ selectActiveOption,
58
+ selectDepartureFlight,
59
+ selectReturnFlight,
60
+ (option, departureFlight, returnFlight) =>
61
+ option?.airlineGroups.filter((x) => x.flightIds.includes(departureFlight?.entryLineGuid ?? '') || x.flightIds.includes(returnFlight?.entryLineGuid ?? ''))
62
+ );
63
+
64
+ export const selectPackageAirportGroups = createSelector(
65
+ selectActiveOption,
66
+ selectDepartureFlight,
67
+ selectReturnFlight,
68
+ (option, departureFlight, returnFlight) =>
69
+ option?.airportGroups.filter((x) => x.flightIds.includes(departureFlight?.entryLineGuid ?? '') || x.flightIds.includes(returnFlight?.entryLineGuid ?? ''))
70
+ );
71
+
72
+ export const selectRoomOptionDepartureFlightsMetaData = createSelector(selectActiveOption, selectFlightMetaData, (ativeOption, flightMetaData) => {
73
+ const roomOptions = ativeOption?.rooms.map((r) => r.options.filter((o) => o.isSelected).shift());
74
+ return roomOptions?.map((ro) => flightMetaData?.find((f) => f.entryLineGuid === ro?.entryLineGuid)?.flightMetaData).filter((f) => f !== undefined) ?? [];
75
+ });
76
+
77
+ export const selectRoomOptionReturnFlightsMetaData = createSelector(selectActiveOption, selectFlightMetaData, (ativeOption, flightMetaData) => {
78
+ const selectedRoomOptions = ativeOption?.rooms.map((r) => r.options.filter((o) => o.isSelected));
79
+ // check if there are return flights selected
80
+ if (selectedRoomOptions?.some((ro) => ro.length > 1)) {
81
+ const roomOptions = ativeOption?.rooms.map((r) =>
82
+ r.options
83
+ .filter((o) => o.isSelected)
84
+ .reverse()
85
+ .shift()
86
+ );
87
+ return roomOptions?.map((ro) => flightMetaData?.find((f) => f.entryLineGuid === ro?.entryLineGuid)?.flightMetaData).filter((f) => f !== undefined) ?? [];
88
+ }
89
+ return undefined;
90
+ });
91
+
92
+ export const selectApiSettings = (state: RootState) => state.apiSettings;
93
+
94
+ export const selectIsUnavailable = (state: RootState) => state.booking.isUnavailable;
95
+
96
+ export const selectRequestRooms = (state: RootState) => state.booking.package?.options.find((x) => x.isSelected)?.requestRooms;
97
+
98
+ export const selectOfficeId = (state: RootState) => state.booking.officeId;
99
+
100
+ export const selectLanguageCode = (state: RootState) => state.booking.languageCode;
101
+
102
+ export const selectCurrencyCode = (state: RootState) => state.booking.package?.currencyCode ?? 'EUR';
103
+
104
+ export const selectDefaultStaticTranslations = (state: RootState) => getTranslations(state.booking.languageCode) as Record<string, any>;
105
+
106
+ export const selectLanguage = (state: RootState) => state.booking.languageCode;
107
+
108
+ export const selectAllDynamicTranslations = (state: RootState) => state.booking.translations;
109
+
110
+ export const selectDynamicTranslations = createSelector([selectAllDynamicTranslations, selectLanguage], (allDynamicTranslations, language) => {
111
+ return allDynamicTranslations?.find((x) => x.language == language)?.value ?? {};
112
+ });
113
+
114
+ export const selectTranslations = createSelector(
115
+ [selectDefaultStaticTranslations, selectDynamicTranslations],
116
+ (defaultStaticTranslations, dynamicTranslations) => {
117
+ const merged = {} as Record<string, any>;
118
+
119
+ for (const key of Array.from(new Set([...Object.keys(defaultStaticTranslations), ...Object.keys(dynamicTranslations)]))) {
120
+ merged[key] = {
121
+ ...(defaultStaticTranslations[key] || {}),
122
+ ...(dynamicTranslations[key] || {})
123
+ };
124
+ }
125
+
126
+ return merged;
127
+ }
128
+ );
129
+
130
+ export const selectBookingOptions = (state: RootState) => state.booking.bookingOptions;
131
+
132
+ export const selectBookingType = (state: RootState) => state.booking.bookingType;
133
+
134
+ export const selectTagIds = (state: RootState) => state.booking.tagIds;
135
+
136
+ export const selectAgentAdressId = (state: RootState) => state.booking.agentAdressId;
137
+
138
+ export const selectProductAttributes = (state: RootState) => state.booking.productAttributes;
139
+
140
+ export const selectBookingAttributes = (state: RootState) => state.booking.bookingAttributes;
141
+
142
+ export const selectBookingNumber = (state: RootState) => state.booking.bookingNumber;
143
+
144
+ export const selectIsOption = (state: RootState) => state.booking.isOption;
145
+
146
+ export const selectBookingRooms = (state: RootState) => state.booking.bookingAttributes?.rooms;
147
+
148
+ export const selectBookingRemarks = (state: RootState) => state.booking.remarks;
149
+
150
+ export const selectVoucherCodes = (state: RootState) => state.booking.voucherCodes;
151
+
152
+ export const selectCalculateDeposit = (state: RootState) => state.booking.calculateDeposit;
153
+
154
+ export const selectShowCommission = (state: RootState) => state.booking.showCommission;
155
+
156
+ export const selectIsRetry = (state: RootState) => state.booking.isRetry;
157
+
158
+ export const selectStartDate = (state: RootState) => state.booking.package?.options.find((x) => x.isSelected)?.fromDate;
159
+
160
+ export const selectAgents = (state: RootState) => state.booking.agents;
161
+
162
+ export const selectCountries = (state: RootState) => state.booking.countries;
163
+
164
+ export const selectProductCode = (state: RootState) => state.booking.productAttributes?.productCode;
165
+
166
+ export const selectAccommodationCodes = (state: RootState) => {
167
+ const accommodationCodes: string[] = [];
168
+ state.booking.package?.options.forEach((o) => {
169
+ o.rooms.forEach((r) =>
170
+ r.options.forEach((ro) => {
171
+ if (!accommodationCodes.some((y) => y === ro.accommodationCode)) {
172
+ accommodationCodes.push(ro.accommodationCode);
173
+ }
174
+ })
175
+ );
176
+ });
177
+ return accommodationCodes;
178
+ };
179
+
180
+ export const selectAccommodationViews = (state: RootState) => state.booking.accommodationViews;
181
+
182
+ export const selectBookingQuery = (state: RootState) => {
183
+ const bookingAttributes = state.booking.bookingAttributes;
184
+
185
+ if (!bookingAttributes) {
186
+ return undefined;
187
+ }
188
+
189
+ const params: Record<string, string> = {};
190
+ Object.entries(bookingAttributes).forEach(([key, value]) => {
191
+ if (key === 'startDate' || key === 'endDate') {
192
+ value = format(parseISO(value), 'yyyy-MM-dd');
193
+ }
194
+
195
+ if (key === 'rooms') {
196
+ value = JsonURL.stringify(
197
+ (value as Room[]).map((room) => omit(room, ['children'])),
198
+ {
199
+ AQF: true
200
+ }
201
+ );
202
+ }
203
+
204
+ if (key === 'allotmentIds' && !value.length) {
205
+ value = undefined;
206
+ }
207
+
208
+ if (key === 'flight' && value) {
209
+ var flightInfo = value as FlightInfo;
210
+ value = JsonURL.stringify(flightInfo, { AQF: true });
211
+ }
212
+
213
+ if (value) {
214
+ params[key] = value;
215
+ }
216
+ });
217
+
218
+ return params;
219
+ };
220
+
221
+ export const selectBookingQueryString = createSelector(selectBookingQuery, (params) => {
222
+ if (!params) {
223
+ return undefined;
224
+ }
225
+
226
+ return Object.keys(params)
227
+ .filter((key) => typeof params[key] !== 'undefined')
228
+ .map((key) => `${key}=${params[key]}`)
229
+ .join('&');
230
+ });
231
+
232
+ export const selectMainBookerId = createSelector(selectTravelersFormValues, (formValues) => formValues?.mainBookerId);
233
+
234
+ export const selectBookingPackagePax = createSelector(selectTravelersFormValues, (formValues) => {
235
+ var pax: BookingPackagePax[] = [];
236
+
237
+ formValues?.rooms.forEach((r) =>
238
+ r.adults.forEach((x) => {
239
+ const adultPax = buildPax(x, formValues?.mainBookerId);
240
+
241
+ if (adultPax.isMainBooker) {
242
+ adultPax.mobilePhone = formValues?.phone;
243
+ adultPax.email = formValues?.email;
244
+ }
245
+
246
+ pax.push(adultPax);
247
+ })
248
+ );
249
+
250
+ formValues?.rooms.forEach((r) =>
251
+ r.children.forEach((x) => {
252
+ pax.push(buildPax(x));
253
+ })
254
+ );
255
+
256
+ return pax;
257
+ });
258
+
259
+ export const selectBookingAddress = createSelector(selectTravelersFormValues, selectBookingPackagePax, selectBookingType, (formValues, pax, bookingType) => {
260
+ const mainBooker = pax.find((x) => x.isMainBooker);
261
+ if (!mainBooker || bookingType == 'b2b') return undefined;
262
+
263
+ return {
264
+ name: `${mainBooker.firstName} ${mainBooker.lastName}`,
265
+ street: formValues?.street,
266
+ number: formValues?.houseNumber,
267
+ box: formValues?.box,
268
+ postalCode: formValues?.zipCode,
269
+ location: formValues?.place,
270
+ country: formValues?.country,
271
+ mobilePhone: formValues?.phone,
272
+ email: formValues?.email
273
+ } as BookingPackageAddress;
274
+ });
275
+
276
+ export const selectBookingPackageRequest = createSelector(selectOfficeId, selectAgentId, selectAgentAdressId, (officeId, agentId, agentAdressId) => {
277
+ const agencyId = (agentId ?? agentAdressId ?? 0) > 0 ? agentId ?? agentAdressId : null;
278
+
279
+ return {
280
+ officeId: officeId,
281
+ agentId: agencyId,
282
+ payload: null
283
+ } as BookingPackageRequest<any>;
284
+ });
285
+
286
+ export const selectBookingPackageBookRequest = createSelector(
287
+ selectBookingPackageRequest,
288
+ selectBookingOptions,
289
+ selectBookingType,
290
+ selectBookingPackagePax,
291
+ selectBookingAddress,
292
+ selectPackageDetails,
293
+ selectCalculateDeposit,
294
+ selectShowCommission,
295
+ selectAgentId,
296
+ selectGeneratePaymentUrl,
297
+ selectSkipPaymentWithAgent,
298
+ selectNotifications,
299
+ selectTagIds,
300
+ selectBookingRemarks,
301
+ selectVoucherCodes,
302
+ (
303
+ bookingPackageRequest: BookingPackageRequest<BookingPackageBookRequest>,
304
+ bookingOptions,
305
+ bookingType,
306
+ pax,
307
+ address,
308
+ packageDetails,
309
+ calculateDeposit,
310
+ showCommission,
311
+ agentId,
312
+ generatePaymentUrl,
313
+ skipPaymentWithAgent,
314
+ notifications,
315
+ tagIds,
316
+ remarks,
317
+ voucherCodes
318
+ ) => {
319
+ if (!packageDetails) return null;
320
+
321
+ let returnPaymentUrl = false;
322
+
323
+ if (generatePaymentUrl && (!skipPaymentWithAgent || (agentId ?? 0) == 0)) {
324
+ returnPaymentUrl = true;
325
+ }
326
+
327
+ var entryStatus = 0;
328
+ var customEntryStatusId = undefined;
329
+
330
+ switch (bookingType) {
331
+ case 'b2b':
332
+ if (bookingOptions.b2b.tagIds && bookingOptions.b2b.tagIds.length > 0) {
333
+ tagIds = tagIds?.concat(bookingOptions.b2b.tagIds);
334
+ }
335
+ if (bookingOptions.b2b.entryStatus) {
336
+ entryStatus = bookingOptions.b2b.entryStatus;
337
+ }
338
+ if (bookingOptions.b2b.customEntryStatusId) {
339
+ customEntryStatusId = bookingOptions.b2b.customEntryStatusId;
340
+ }
341
+ break;
342
+ case 'b2b2c':
343
+ if (bookingOptions.b2b2c.tagIds && bookingOptions.b2b2c.tagIds.length > 0) {
344
+ tagIds = tagIds?.concat(bookingOptions.b2b2c.tagIds);
345
+ }
346
+ if (bookingOptions.b2b2c.entryStatus) {
347
+ entryStatus = bookingOptions.b2b2c.entryStatus;
348
+ }
349
+ if (bookingOptions.b2b2c.customEntryStatusId) {
350
+ customEntryStatusId = bookingOptions.b2b2c.customEntryStatusId;
351
+ }
352
+ break;
353
+ default:
354
+ if (bookingOptions.b2c.tagIds && bookingOptions.b2c.tagIds.length > 0) {
355
+ tagIds = tagIds?.concat(bookingOptions.b2c.tagIds);
356
+ }
357
+ if (bookingOptions.b2c.entryStatus) {
358
+ entryStatus = bookingOptions.b2c.entryStatus;
359
+ }
360
+ if (bookingOptions.b2c.customEntryStatusId) {
361
+ customEntryStatusId = bookingOptions.b2c.customEntryStatusId;
362
+ }
363
+ break;
364
+ }
365
+
366
+ bookingPackageRequest.payload = {
367
+ package: packageDetails,
368
+ status: entryStatus,
369
+ customStatusId: customEntryStatusId,
370
+ address: address,
371
+ pax: pax?.length != 0 ? pax : packageDetails.options[0].requestRooms.flatMap((x) => x.pax),
372
+ nonTravelPax: [],
373
+ calculateDeposit: calculateDeposit,
374
+ showCommission: showCommission,
375
+ returnPaymentUrl: returnPaymentUrl,
376
+ notifications: notifications,
377
+ tagIds: tagIds,
378
+ remarks: remarks,
379
+ voucherCodes: voucherCodes,
380
+ customerRequests: []
381
+ };
382
+
383
+ return bookingPackageRequest;
384
+ }
385
+ );
386
+
387
+ export const selectTravelersFirstStep = (state: any) => state.booking.travelersFirstStep;
388
+
389
+ const buildPax = (traveler: Traveler, mainBookerId?: number) => {
390
+ return {
391
+ id: traveler.id,
392
+ gender: parseGender(traveler.gender),
393
+ firstName: traveler.firstName,
394
+ lastName: traveler.lastName,
395
+ dateOfBirth: traveler.birthDate,
396
+ age: traveler.birthDate ? null : traveler.age,
397
+ isMainBooker: traveler.id == mainBookerId
398
+ } as BookingPackagePax;
399
+ };
400
+
401
+ const parseGender = (gender: string): number => {
402
+ switch (gender) {
403
+ case 'm':
404
+ return Gender.male;
405
+ case 'f':
406
+ return Gender.female;
407
+ case 'x':
408
+ default:
409
+ return Gender.other;
410
+ }
411
+ };