@roomstay/frontend 2.1.2 → 2.1.4

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 (555) hide show
  1. package/dist/main.bundle.js +1 -1
  2. package/dist/src/api/AddonAPI.d.ts +3 -3
  3. package/dist/src/api/AddonAPI.js +3 -3
  4. package/dist/src/api/AvailabilityAPI.d.ts +3 -3
  5. package/dist/src/api/AvailabilityAPI.js +5 -5
  6. package/dist/src/api/BaseAPI.js +1 -1
  7. package/dist/src/api/BookingAPI.d.ts +7 -7
  8. package/dist/src/api/BookingAPI.js +7 -7
  9. package/dist/src/api/ExchangeRateAPI.d.ts +2 -2
  10. package/dist/src/api/ExchangeRateAPI.js +1 -1
  11. package/dist/src/api/HotelAPI.d.ts +5 -5
  12. package/dist/src/api/HotelAPI.js +1 -1
  13. package/dist/src/api/MemberAPI.d.ts +1 -1
  14. package/dist/src/api/MemberAPI.js +1 -1
  15. package/dist/src/api/ReservationAPI.d.ts +6 -6
  16. package/dist/src/api/ReservationAPI.js +1 -1
  17. package/dist/src/api/SessionAPI.d.ts +1 -1
  18. package/dist/src/api/SessionAPI.js +1 -1
  19. package/dist/src/api/members-service/MembersServiceAPI.js +1 -1
  20. package/dist/src/components/User/Forms/ForgotPasswordForm.js +7 -7
  21. package/dist/src/components/User/Forms/ForgotPasswordForm.js.map +1 -1
  22. package/dist/src/components/User/Forms/SignInForm.js +10 -10
  23. package/dist/src/components/User/Forms/SignInForm.js.map +1 -1
  24. package/dist/src/components/User/Forms/SignUpForm.js +12 -12
  25. package/dist/src/components/User/Forms/SignUpForm.js.map +1 -1
  26. package/dist/src/components/generic/Alert.d.ts +1 -1
  27. package/dist/src/components/generic/Alert.js +1 -1
  28. package/dist/src/components/generic/BEButton.d.ts +2 -2
  29. package/dist/src/components/generic/BEButton.js +2 -2
  30. package/dist/src/components/generic/BackButton.js +2 -2
  31. package/dist/src/components/generic/BookNowPayLaterInfoBlock.js +4 -4
  32. package/dist/src/components/generic/BookingWizard/BookingWizard.d.ts +2 -2
  33. package/dist/src/components/generic/BookingWizard/BookingWizard.js +1 -1
  34. package/dist/src/components/generic/BookingWizard/BookingWizardContent.d.ts +2 -2
  35. package/dist/src/components/generic/BookingWizard/BookingWizardContent.js +1 -1
  36. package/dist/src/components/generic/BookingWizard/BookingWizardContext.d.ts +1 -1
  37. package/dist/src/components/generic/BookingWizard/BookingWizardDateSelector/BookingWizardDateSelector.js +10 -13
  38. package/dist/src/components/generic/BookingWizard/BookingWizardDateSelector/BookingWizardDateSelector.js.map +1 -1
  39. package/dist/src/components/generic/BookingWizard/BookingWizardGuestSelector/BookingWizardGuestSelector.js +13 -13
  40. package/dist/src/components/generic/BookingWizard/BookingWizardGuestSelector/BookingWizardGuestSelector.js.map +1 -1
  41. package/dist/src/components/generic/BookingWizard/BookingWizardHotelSelector/BookingWizardHotelSelector.d.ts +2 -2
  42. package/dist/src/components/generic/BookingWizard/BookingWizardHotelSelector/BookingWizardHotelSelector.js +5 -5
  43. package/dist/src/components/generic/BookingWizard/BookingWizardHotelSelector/BookingWizardHotelSelector.js.map +1 -1
  44. package/dist/src/components/generic/Card/Card/Card.js +1 -1
  45. package/dist/src/components/generic/Card/IconNavCard/IconNavCard.d.ts +2 -2
  46. package/dist/src/components/generic/Card/IconNavCard/IconNavCard.js +4 -4
  47. package/dist/src/components/generic/Checkbox/Checkbox.js +2 -2
  48. package/dist/src/components/generic/Currency.js +5 -5
  49. package/dist/src/components/generic/DateRangePicker/DateRangePicker.js +4 -4
  50. package/dist/src/components/generic/DateRangePicker/DateRangePickerDay.d.ts +1 -1
  51. package/dist/src/components/generic/DateRangePicker/DateRangePickerDay.js +2 -2
  52. package/dist/src/components/generic/DateRangePicker/DateRangePickerDays.js +3 -3
  53. package/dist/src/components/generic/DateRangePicker/DateRangePickerMonth.js +7 -7
  54. package/dist/src/components/generic/DateRangePicker/FloatingDateRangePicker.d.ts +1 -1
  55. package/dist/src/components/generic/DateRangePicker/FloatingDateRangePicker.js +2 -2
  56. package/dist/src/components/generic/Distance.js +2 -2
  57. package/dist/src/components/generic/Headline.d.ts +2 -2
  58. package/dist/src/components/generic/Icon/Icon.d.ts +1 -1
  59. package/dist/src/components/generic/Icon/Icon.js +1 -1
  60. package/dist/src/components/generic/IconText/IconText.d.ts +2 -2
  61. package/dist/src/components/generic/IconText/IconText.js +3 -3
  62. package/dist/src/components/generic/InputGroup/InputGroup.d.ts +1 -1
  63. package/dist/src/components/generic/Notification.d.ts +1 -1
  64. package/dist/src/components/generic/Notification.js +2 -2
  65. package/dist/src/components/generic/NumberIncrement.d.ts +2 -0
  66. package/dist/src/components/generic/NumberIncrement.js +5 -4
  67. package/dist/src/components/generic/NumberIncrement.js.map +1 -1
  68. package/dist/src/components/generic/Overlay/Overlay.js +3 -3
  69. package/dist/src/components/generic/Overlay/Overlay.js.map +1 -1
  70. package/dist/src/components/generic/PasswordBox/PasswordBox.js +1 -1
  71. package/dist/src/components/generic/PaymentCard/CardTypeSelect.d.ts +1 -1
  72. package/dist/src/components/generic/PaymentCard/CardTypeSelect.js +4 -4
  73. package/dist/src/components/generic/PaymentCard/PaymentCard.d.ts +1 -1
  74. package/dist/src/components/generic/PaymentCard/PaymentCard.js +3 -3
  75. package/dist/src/components/generic/PaymentCard/PaymentCardInput.d.ts +1 -1
  76. package/dist/src/components/generic/PaymentCard/PaymentCardInput.js +10 -10
  77. package/dist/src/components/generic/PaymentCard/PaymentCardInput.js.map +1 -1
  78. package/dist/src/components/generic/Pill.d.ts +1 -1
  79. package/dist/src/components/generic/Pill.js +1 -1
  80. package/dist/src/components/generic/PromoCodeInput.js +6 -6
  81. package/dist/src/components/generic/RadioButtonGroup/RadioButtonGroup.js +2 -2
  82. package/dist/src/components/generic/RadioButtonGroup/RadioButtonGroup.js.map +1 -1
  83. package/dist/src/components/generic/RecentSearchesCard.d.ts +1 -1
  84. package/dist/src/components/generic/RecentSearchesCard.js +7 -7
  85. package/dist/src/components/generic/Select/Select.d.ts +1 -1
  86. package/dist/src/components/generic/Select/Select.js +6 -6
  87. package/dist/src/components/generic/Tabs/TabContext.d.ts +1 -1
  88. package/dist/src/components/generic/Tabs/TabLink.js +3 -3
  89. package/dist/src/components/generic/Tabs/TabRouteContainer.js +2 -2
  90. package/dist/src/components/generic/Tabs/Tabs.js +5 -5
  91. package/dist/src/components/generic/Text.d.ts +2 -2
  92. package/dist/src/components/generic/TextBox.d.ts +1 -1
  93. package/dist/src/components/generic/TextBox.js +1 -1
  94. package/dist/src/components/generic/Tooltip/Tooltip.js +1 -1
  95. package/dist/src/components/generic/badging/SSLSecureBadge.js +2 -2
  96. package/dist/src/components/generic/buttons/NextStepButton.d.ts +1 -1
  97. package/dist/src/components/generic/buttons/NextStepButton.js +5 -5
  98. package/dist/src/components/generic/custom/EnhancedPhoneNumberField/EnhancedPhoneNumberField.js +3 -3
  99. package/dist/src/components/generic/date/DatePicker.js +12 -12
  100. package/dist/src/components/generic/date/DatePickerDay.js +8 -8
  101. package/dist/src/components/generic/date/DatePickerDays.js +4 -4
  102. package/dist/src/components/generic/date/DatePickerMonth.js +6 -6
  103. package/dist/src/components/generic/date/DatePickerWeek.js +9 -9
  104. package/dist/src/components/generic/date/FloatingDatePicker.js +3 -3
  105. package/dist/src/components/generic/date/WeekViewSkeleton.js +3 -3
  106. package/dist/src/components/generic/loader/ImageLoader.d.ts +1 -1
  107. package/dist/src/components/generic/loader/ImageLoader.js +2 -2
  108. package/dist/src/components/generic/loader/LargeLoader.js +1 -1
  109. package/dist/src/components/generic/loader/SmallSpinner.d.ts +1 -1
  110. package/dist/src/components/generic/loader/SmallSpinner.js +2 -2
  111. package/dist/src/components/generic/map/HotelLocationMap.js +2 -2
  112. package/dist/src/components/generic/modal/ConfirmationModal.js +3 -3
  113. package/dist/src/components/generic/modal/ErrorModal.js +3 -3
  114. package/dist/src/components/generic/modal/SigninModal/AuthenticatedUserModal.js +8 -8
  115. package/dist/src/components/generic/modal/SigninModal/UnauthenticatedUserModal.js +12 -12
  116. package/dist/src/components/generic/modal/SigninModal/UnauthenticatedUserModal.js.map +1 -1
  117. package/dist/src/components/generic/modal/SimpleModal.js +8 -8
  118. package/dist/src/components/generic/modal/SimpleModal.js.map +1 -1
  119. package/dist/src/components/generic/modal/TabbedModal.js +1 -1
  120. package/dist/src/components/generic/radio/RadioFields.js +2 -2
  121. package/dist/src/components/members/EditMyProfile.js +7 -7
  122. package/dist/src/components/navigation/Header.js +17 -17
  123. package/dist/src/components/navigation/Header.js.map +1 -1
  124. package/dist/src/components/navigation/StepSelector.js +8 -8
  125. package/dist/src/components/navigation/StepSelectorModal.js +7 -7
  126. package/dist/src/components/pages/Account/Card/MemberCardItem.js +8 -8
  127. package/dist/src/components/pages/PageColorComponent.js +2 -2
  128. package/dist/src/components/reservation/ReservationItem.d.ts +1 -1
  129. package/dist/src/components/reservation/ReservationItem.js +13 -13
  130. package/dist/src/components/reservation/ReservationList.d.ts +2 -2
  131. package/dist/src/components/reservation/ReservationList.js +1 -1
  132. package/dist/src/components/steps/DaysSelectedInformer.js +3 -3
  133. package/dist/src/components/steps/MinimumNightStayPill.js +6 -6
  134. package/dist/src/components/steps/addons/AddonCard.d.ts +1 -1
  135. package/dist/src/components/steps/addons/AddonCard.js +10 -10
  136. package/dist/src/components/steps/addons/AddonList.js +9 -9
  137. package/dist/src/components/steps/addons/AddonsNotFound.js +3 -3
  138. package/dist/src/components/steps/common/CommonAddonSummary/CommonAddonSummary.d.ts +1 -1
  139. package/dist/src/components/steps/common/CommonAddonSummary/CommonAddonSummary.js +4 -4
  140. package/dist/src/components/steps/confirmation/AccountDetails.js +4 -4
  141. package/dist/src/components/steps/confirmation/PaymentDetails/AcceptablePaymentCard.js +3 -3
  142. package/dist/src/components/steps/confirmation/PaymentDetails/ExistingCardPicker.js +3 -3
  143. package/dist/src/components/steps/confirmation/PaymentDetails/StepConfirmationPaymentDetails.js +9 -9
  144. package/dist/src/components/steps/confirmation/PaymentDetails/StepConfirmationPaymentDetails.js.map +1 -1
  145. package/dist/src/components/steps/confirmation/PlanpayPaymentMethod.js +3 -3
  146. package/dist/src/components/steps/confirmation/RoomContactDetails.js +16 -16
  147. package/dist/src/components/steps/confirmation/RoomContactDetails.js.map +1 -1
  148. package/dist/src/components/steps/confirmation/StepConfirmationAcknowledgement.js +8 -8
  149. package/dist/src/components/steps/confirmation/StepConfirmationAcknowledgement.js.map +1 -1
  150. package/dist/src/components/steps/confirmation/StepConfirmationCheckoutDifferencesModal.d.ts +1 -1
  151. package/dist/src/components/steps/confirmation/StepConfirmationCheckoutDifferencesModal.js +11 -11
  152. package/dist/src/components/steps/confirmation/StepConfirmationCommentsComponent.d.ts +1 -1
  153. package/dist/src/components/steps/confirmation/StepConfirmationCommentsComponent.js +4 -4
  154. package/dist/src/components/steps/confirmation/StepConfirmationCountrySelector.js +2 -2
  155. package/dist/src/components/steps/confirmation/StepConfirmationForm.js +27 -27
  156. package/dist/src/components/steps/confirmation/StepConfirmationLimitedOffer.js +6 -6
  157. package/dist/src/components/steps/confirmation/StepConfirmationPoliciesSection.js +3 -3
  158. package/dist/src/components/steps/confirmation/StepConfirmationPolicyBlock.js +2 -2
  159. package/dist/src/components/steps/confirmation/additionalOffers/AdditionalOffers.js +12 -12
  160. package/dist/src/components/steps/confirmation/additionalOffers/AdditionalOffers.js.map +1 -1
  161. package/dist/src/components/steps/confirmation/additionalOffers/AdditionalOffersColumn.d.ts +1 -1
  162. package/dist/src/components/steps/confirmation/additionalOffers/AdditionalOffersColumn.js +3 -3
  163. package/dist/src/components/steps/confirmation/additionalOffers/AdditionalOffersModal.d.ts +2 -2
  164. package/dist/src/components/steps/confirmation/additionalOffers/AdditionalOffersModal.js +9 -9
  165. package/dist/src/components/steps/date/PeoplePicker.js +7 -7
  166. package/dist/src/components/steps/date/PeoplePickerRow.js +6 -6
  167. package/dist/src/components/steps/date/StepDatePricePerRoom.js +9 -9
  168. package/dist/src/components/steps/date/StepOneDateRange.js +4 -4
  169. package/dist/src/components/steps/date/StepOneDateRangePicker.js +4 -4
  170. package/dist/src/components/steps/date/StepOneDateRangePickerLegend.js +4 -4
  171. package/dist/src/components/steps/date/StepOneNextStepButton.js +4 -4
  172. package/dist/src/components/steps/date/StepOneStatusPeople.js +2 -2
  173. package/dist/src/components/steps/hotel/HotelCard.d.ts +1 -1
  174. package/dist/src/components/steps/hotel/HotelCard.js +14 -14
  175. package/dist/src/components/steps/hotel/HotelCardList.d.ts +1 -1
  176. package/dist/src/components/steps/hotel/HotelCardList.js +2 -2
  177. package/dist/src/components/steps/hotel/HotelCardModal.d.ts +1 -1
  178. package/dist/src/components/steps/hotel/HotelCardModal.js +13 -13
  179. package/dist/src/components/steps/hotel/HotelSearchParameters.js +13 -13
  180. package/dist/src/components/steps/hotel/NoHotelsAvailable.js +2 -2
  181. package/dist/src/components/steps/room/AvailableUpgradesModal.js +14 -14
  182. package/dist/src/components/steps/room/ImageGallerySlider.d.ts +1 -1
  183. package/dist/src/components/steps/room/ImageGallerySlider.js +5 -5
  184. package/dist/src/components/steps/room/InactivityWindow.js +13 -13
  185. package/dist/src/components/steps/room/LargeRoomCard.d.ts +1 -1
  186. package/dist/src/components/steps/room/LargeRoomCard.js +11 -11
  187. package/dist/src/components/steps/room/MemberSignInModal/MemberSignInModal.js +15 -15
  188. package/dist/src/components/steps/room/MemberSignInModal/MemberSignInModal.types.d.ts +1 -1
  189. package/dist/src/components/steps/room/NoRoomsFoundBlock.js +13 -13
  190. package/dist/src/components/steps/room/NoRoomsFoundBlock.js.map +1 -1
  191. package/dist/src/components/steps/room/RatesNotFound.js +3 -3
  192. package/dist/src/components/steps/room/RoomList.js +12 -12
  193. package/dist/src/components/steps/room/RoomListAlert.js +3 -3
  194. package/dist/src/components/steps/room/RoomListCrossSellBlock.js +10 -10
  195. package/dist/src/components/steps/room/RoomModal.d.ts +2 -2
  196. package/dist/src/components/steps/room/RoomModal.js +10 -10
  197. package/dist/src/components/steps/room/StepRoomAlertBlocks.js +6 -6
  198. package/dist/src/components/steps/room/StepRoomAlertBlocks.js.map +1 -1
  199. package/dist/src/components/steps/room/StepRoomBestRateAlert.js +5 -5
  200. package/dist/src/components/steps/room/StepRoomErrorForm.js +12 -12
  201. package/dist/src/components/steps/room/StepRoomErrorForm.js.map +1 -1
  202. package/dist/src/components/steps/room/StepRoomHotelDetails.js +5 -5
  203. package/dist/src/components/steps/room/StepRoomNextStepButton.js +3 -3
  204. package/dist/src/components/steps/room/StepRoomSortBy.js +5 -5
  205. package/dist/src/components/steps/room/StepRoomSummaryAndButton.js +6 -6
  206. package/dist/src/components/steps/room/roomBuilderProgress/NumberOfAdultsPicker.d.ts +1 -1
  207. package/dist/src/components/steps/room/roomBuilderProgress/NumberOfAdultsPicker.js +3 -3
  208. package/dist/src/components/steps/room/roomBuilderProgress/NumberOfChildrenPicker.d.ts +1 -1
  209. package/dist/src/components/steps/room/roomBuilderProgress/NumberOfChildrenPicker.js +3 -3
  210. package/dist/src/components/steps/room/roomBuilderProgress/RoomBuilderProgress.js +6 -6
  211. package/dist/src/components/steps/room/roomBuilderProgress/RoomBuilderProgressRow.d.ts +1 -1
  212. package/dist/src/components/steps/room/roomBuilderProgress/RoomBuilderProgressRow.js +15 -15
  213. package/dist/src/components/steps/room/roomDetails/RoomDetails.d.ts +1 -1
  214. package/dist/src/components/steps/room/roomDetails/RoomDetails.js +21 -21
  215. package/dist/src/components/steps/room/roomDetails/RoomDetails.js.map +1 -1
  216. package/dist/src/components/steps/room/roomDetails/RoomDetailsBedsBlock.d.ts +2 -2
  217. package/dist/src/components/steps/room/roomDetails/RoomDetailsBedsBlock.js +4 -4
  218. package/dist/src/components/steps/room/roomDetails/RoomDetailsPerkBlock.d.ts +1 -1
  219. package/dist/src/components/steps/room/roomDetails/RoomDetailsPerkBlock.js +4 -4
  220. package/dist/src/components/steps/room/roomDetails/RoomDetailsPriceBlock.js +8 -8
  221. package/dist/src/components/steps/room/roomDetails/RoomDetailsRetargeting.d.ts +1 -1
  222. package/dist/src/components/steps/room/roomDetails/RoomDetailsRetargeting.js +13 -13
  223. package/dist/src/components/steps/room/roomDetails/roomRates/BookNowButton.d.ts +1 -1
  224. package/dist/src/components/steps/room/roomDetails/roomRates/BookNowButton.js +3 -3
  225. package/dist/src/components/steps/room/roomDetails/roomRates/MembersOnlyRow.js +8 -8
  226. package/dist/src/components/steps/room/roomDetails/roomRates/PriceBreakdownBlock.d.ts +1 -1
  227. package/dist/src/components/steps/room/roomDetails/roomRates/PriceBreakdownBlock.js +10 -10
  228. package/dist/src/components/steps/room/roomDetails/roomRates/RoomRateDescriptionTab.d.ts +1 -1
  229. package/dist/src/components/steps/room/roomDetails/roomRates/RoomRateDescriptionTab.js +10 -10
  230. package/dist/src/components/steps/room/roomDetails/roomRates/RoomRateDetailsAndPriceBreakdownModal.d.ts +1 -1
  231. package/dist/src/components/steps/room/roomDetails/roomRates/RoomRateDetailsAndPriceBreakdownModal.js +4 -4
  232. package/dist/src/components/steps/room/roomDetails/roomRates/RoomRateListPromotion/RoomRateListPromotion.d.ts +1 -1
  233. package/dist/src/components/steps/room/roomDetails/roomRates/RoomRateListPromotion/RoomRateListPromotion.js +6 -6
  234. package/dist/src/components/steps/room/roomDetails/roomRates/RoomRatePills.d.ts +2 -2
  235. package/dist/src/components/steps/room/roomDetails/roomRates/RoomRatePills.js +9 -9
  236. package/dist/src/components/steps/room/roomDetails/roomRates/RoomRateRow.d.ts +1 -1
  237. package/dist/src/components/steps/room/roomDetails/roomRates/RoomRateRow.js +17 -17
  238. package/dist/src/components/steps/room/roomDetails/roomRates/RoomRates.d.ts +1 -1
  239. package/dist/src/components/steps/room/roomDetails/roomRates/RoomRates.js +11 -11
  240. package/dist/src/components/steps/room/roomFilter/AppliedFiltersBlock.js +5 -5
  241. package/dist/src/components/steps/room/roomFilter/RoomFilterOverlay.d.ts +1 -1
  242. package/dist/src/components/steps/room/roomFilter/RoomFilterOverlay.js +15 -15
  243. package/dist/src/components/steps/room/roomFilter/RoomFilterPriceSlider.d.ts +2 -2
  244. package/dist/src/components/steps/room/roomFilter/RoomFilterPriceSlider.js +7 -7
  245. package/dist/src/components/steps/room/roomFilter/RoomFilterRateType.d.ts +2 -2
  246. package/dist/src/components/steps/room/roomFilter/RoomFilterRateType.js +5 -5
  247. package/dist/src/components/steps/room/roomFilter/RoomFilterRoomType.d.ts +2 -2
  248. package/dist/src/components/steps/room/roomFilter/RoomFilterRoomType.js +5 -5
  249. package/dist/src/components/summary/BEMapWidget.js +5 -5
  250. package/dist/src/components/summary/BEMobileSummary.js +11 -11
  251. package/dist/src/components/summary/BEMobileSummaryModal.js +20 -20
  252. package/dist/src/components/summary/BESummary.d.ts +1 -1
  253. package/dist/src/components/summary/BESummary.js +15 -15
  254. package/dist/src/components/summary/BESummaryAddonRow.d.ts +1 -1
  255. package/dist/src/components/summary/BESummaryAddonRow.js +6 -6
  256. package/dist/src/components/summary/BESummaryPerkBlock.js +5 -5
  257. package/dist/src/components/summary/BESummaryPrivacyPolicy.js +4 -4
  258. package/dist/src/components/summary/BESummaryRoomRow.d.ts +1 -1
  259. package/dist/src/components/summary/BESummaryRoomRow.js +12 -12
  260. package/dist/src/components/summary/TransportDistanceFromHotelBlock.d.ts +1 -1
  261. package/dist/src/components/summary/TransportDistanceFromHotelBlock.js +6 -6
  262. package/dist/src/components/temp/Login.js +2 -2
  263. package/dist/src/containers/PrivateRoute.js +1 -1
  264. package/dist/src/contexts/BasketContext/BasketContext.d.ts +1 -1
  265. package/dist/src/contexts/BasketContext/BasketContextType.d.ts +6 -6
  266. package/dist/src/contexts/BasketContext/BasketContextWrapper.js +17 -17
  267. package/dist/src/contexts/BookingEngineContext/BookingEngineContext.d.ts +1 -1
  268. package/dist/src/contexts/BookingEngineContext/BookingEngineContextType.types.d.ts +5 -5
  269. package/dist/src/contexts/BookingEngineContext/BookingEngineContextWrapper.d.ts +1 -1
  270. package/dist/src/contexts/BookingEngineContext/BookingEngineContextWrapper.js +3 -3
  271. package/dist/src/contexts/CompanyContext/CompanyContext.d.ts +1 -1
  272. package/dist/src/contexts/CompanyContext/CompanyContextType.type.d.ts +5 -5
  273. package/dist/src/contexts/CompanyContext/CompanyContextWrapper.d.ts +1 -1
  274. package/dist/src/contexts/CompanyContext/CompanyContextWrapper.js +13 -13
  275. package/dist/src/contexts/ConfirmationStepContext/ConfirmationStepContextWrapper.js +3 -3
  276. package/dist/src/contexts/ErrorContext.js +2 -2
  277. package/dist/src/contexts/FullPageEngineContext/FullPageEngineContext.d.ts +1 -1
  278. package/dist/src/contexts/FullPageEngineContext/FullPageEngineContextTypes.d.ts +1 -1
  279. package/dist/src/contexts/FullPageEngineContext/FullPageEngineContextWrapper.js +22 -22
  280. package/dist/src/contexts/HotelOverridesContext.d.ts +1 -1
  281. package/dist/src/contexts/HotelOverridesContext.js +4 -4
  282. package/dist/src/contexts/Members/AuthenticationContext/AuthenticationContextProvider.js +2 -2
  283. package/dist/src/contexts/Members/RoomstayMemberContext/RoomstayMemberContextProvider.js +2 -2
  284. package/dist/src/contexts/NotificationContext.d.ts +1 -1
  285. package/dist/src/contexts/NotificationContext.js +1 -1
  286. package/dist/src/engines/BaseEngine.d.ts +2 -2
  287. package/dist/src/engines/BaseEngine.js +2 -2
  288. package/dist/src/engines/BookingWizardEngine/BookingWizardEngine.d.ts +4 -4
  289. package/dist/src/engines/BookingWizardEngine/BookingWizardEngine.js +2 -2
  290. package/dist/src/engines/BookingWizardEngine/BookingWizardEngineElement.js +2 -2
  291. package/dist/src/engines/CustomEngine/CustomEngine.d.ts +1 -1
  292. package/dist/src/engines/CustomEngine/CustomEngine.js +1 -1
  293. package/dist/src/engines/FullPageBookingEngine/FullPageBookingEngine.d.ts +2 -2
  294. package/dist/src/engines/FullPageBookingEngine/FullPageBookingEngine.js +3 -3
  295. package/dist/src/engines/FullPageBookingEngine/FullPageBookingEngineElement.d.ts +1 -1
  296. package/dist/src/engines/FullPageBookingEngine/FullPageBookingEngineElement.js +3 -3
  297. package/dist/src/engines/InlineRoomMiniEngine/InlineRoomMiniEngine.d.ts +2 -2
  298. package/dist/src/engines/InlineRoomMiniEngine/InlineRoomMiniEngine.js +3 -3
  299. package/dist/src/engines/InlineRoomMiniEngine/InlineRoomMiniEngineElement.d.ts +1 -1
  300. package/dist/src/engines/InlineRoomMiniEngine/InlineRoomMiniEngineElement.js +24 -24
  301. package/dist/src/engines/InlineRoomMiniEngine/InlineRoomMiniEngineElement.js.map +1 -1
  302. package/dist/src/engines/RecentSearchesEngine/RecentSearchesEngine.d.ts +2 -2
  303. package/dist/src/engines/RecentSearchesEngine/RecentSearchesEngine.js +3 -3
  304. package/dist/src/engines/RecentSearchesEngine/RecentSearchesEngineElement.d.ts +1 -1
  305. package/dist/src/engines/RecentSearchesEngine/RecentSearchesEngineElement.js +10 -10
  306. package/dist/src/errors/GetAvailabilityError.js +2 -2
  307. package/dist/src/events/RoomstayEventManager.d.ts +1 -1
  308. package/dist/src/events/actions/AddToCartEvent.d.ts +2 -2
  309. package/dist/src/events/actions/AddToCartEvent.js +1 -1
  310. package/dist/src/events/actions/GuestSearchEvent.d.ts +1 -1
  311. package/dist/src/events/actions/InitialHotelDetailsEvent.d.ts +1 -1
  312. package/dist/src/events/actions/MemberOnlyFence/MemberOnlyFenceSignUp.d.ts +1 -1
  313. package/dist/src/events/actions/Promotion/PromotionAddedEvent.d.ts +1 -1
  314. package/dist/src/events/actions/Promotion/PromotionClickedEvent.d.ts +1 -1
  315. package/dist/src/events/actions/Promotion/PromotionRemovedEvent.d.ts +1 -1
  316. package/dist/src/events/actions/RemoveFromCartEvent.d.ts +2 -2
  317. package/dist/src/events/actions/RemoveFromCartEvent.js +1 -1
  318. package/dist/src/events/actions/RoomListSearchEvent.d.ts +2 -2
  319. package/dist/src/events/index.d.ts +13 -13
  320. package/dist/src/events/index.js +13 -13
  321. package/dist/src/events/views/FindReservationResultsViewEvent.d.ts +1 -1
  322. package/dist/src/events/views/StepCheckoutViewEvent.d.ts +2 -2
  323. package/dist/src/events/views/StepCheckoutViewEvent.js +1 -1
  324. package/dist/src/events/views/StepThanksViewEvent.d.ts +1 -1
  325. package/dist/src/hooks/CurrentHotelHook.js +1 -1
  326. package/dist/src/hooks/EventHook.d.ts +2 -2
  327. package/dist/src/hooks/EventHook.js +1 -1
  328. package/dist/src/hooks/KeyboardControlOnSelect.d.ts +1 -1
  329. package/dist/src/hooks/LoggedInUserHook.d.ts +3 -3
  330. package/dist/src/hooks/LoggedInUserHook.js +1 -1
  331. package/dist/src/hooks/VGSHooks.d.ts +1 -1
  332. package/dist/src/hooks/VGSHooks.js +1 -1
  333. package/dist/src/hooks/WindowSize.js +2 -2
  334. package/dist/src/hooks/index.d.ts +6 -6
  335. package/dist/src/hooks/index.js +6 -6
  336. package/dist/src/icons/Check.js +1 -1
  337. package/dist/src/index.d.ts +67 -67
  338. package/dist/src/index.js +72 -72
  339. package/dist/src/index.js.map +1 -1
  340. package/dist/src/mockApi/AddonAPI.d.ts +2 -2
  341. package/dist/src/mockApi/AddonAPI.js +2 -2
  342. package/dist/src/mockApi/BookingAPI.d.ts +1 -1
  343. package/dist/src/mockApi/BookingAPI.js +1 -1
  344. package/dist/src/mockApi/ExchangeRateAPI.d.ts +1 -1
  345. package/dist/src/mockApi/HotelAPI.d.ts +2 -2
  346. package/dist/src/mockApi/MockAPI.js +1 -1
  347. package/dist/src/mockApi/ReservationAPI.d.ts +5 -5
  348. package/dist/src/models/Api/HotelDTO.d.ts +6 -6
  349. package/dist/src/models/Api/HotelOverrideDTO.d.ts +1 -1
  350. package/dist/src/models/Api/ReservationsDTO.d.ts +1 -1
  351. package/dist/src/models/Api/RoomNightDTO.d.ts +1 -1
  352. package/dist/src/models/BasketAddonRow.d.ts +1 -1
  353. package/dist/src/models/BasketAddonRow.js +1 -1
  354. package/dist/src/models/BasketRow.d.ts +5 -5
  355. package/dist/src/models/BasketRow.js +1 -1
  356. package/dist/src/models/BookingWizard/BookingWizardProperty.d.ts +1 -1
  357. package/dist/src/models/Client/Hotel/Company.d.ts +2 -2
  358. package/dist/src/models/Client/Hotel/Hotel.d.ts +12 -12
  359. package/dist/src/models/Client/Hotel/HotelPerk.d.ts +1 -1
  360. package/dist/src/models/Room/Filters/BudgetFilter.d.ts +2 -2
  361. package/dist/src/models/Room/Filters/BudgetFilter.js +1 -1
  362. package/dist/src/models/Room/Filters/Filter.d.ts +1 -1
  363. package/dist/src/models/Room/Filters/RateTypeFilter.d.ts +2 -2
  364. package/dist/src/models/Room/Filters/RateTypeFilter.js +1 -1
  365. package/dist/src/models/Room/Filters/RoomTypeFilter.d.ts +2 -2
  366. package/dist/src/models/Room/Filters/RoomTypeFilter.js +1 -1
  367. package/dist/src/models/Room/Room.d.ts +3 -3
  368. package/dist/src/models/Room/Room.js +1 -1
  369. package/dist/src/models/Room/RoomRate.d.ts +4 -4
  370. package/dist/src/models/Room/RoomRate.js +3 -3
  371. package/dist/src/models/Room/RoomRateNight.d.ts +1 -1
  372. package/dist/src/models/Room/RoomRateNight.js +1 -1
  373. package/dist/src/models/RoomstaySession.d.ts +3 -3
  374. package/dist/src/pages/account/AccountHome/AccountHomePage.js +13 -13
  375. package/dist/src/pages/account/AccountRouter.js +9 -9
  376. package/dist/src/pages/account/Details/AccountDetailsCardsPage.js +11 -11
  377. package/dist/src/pages/account/Details/AccountDetailsCardsPage.js.map +1 -1
  378. package/dist/src/pages/account/Details/AccountDetailsNoCardsPage.d.ts +1 -1
  379. package/dist/src/pages/account/Details/AccountDetailsNoCardsPage.js +6 -6
  380. package/dist/src/pages/account/Details/AccountDetailsProfilePage.js +10 -10
  381. package/dist/src/pages/account/Help/AccountHelpPage.js +12 -12
  382. package/dist/src/pages/account/Help/AccountHelpPage.js.map +1 -1
  383. package/dist/src/pages/account/Reservations/AccountReservationCancelledPage.js +14 -14
  384. package/dist/src/pages/account/Reservations/AccountReservationMultiplePage.js +14 -14
  385. package/dist/src/pages/account/Reservations/AccountReservationSinglePage.js +18 -18
  386. package/dist/src/pages/account/Reservations/AccountReservationsPage.js +8 -8
  387. package/dist/src/pages/findReservation/FindReservation.js +21 -21
  388. package/dist/src/pages/findReservation/FindReservation.js.map +1 -1
  389. package/dist/src/pages/findReservation/FindReservationResults.js +16 -16
  390. package/dist/src/pages/findReservation/FindReservationResults.js.map +1 -1
  391. package/dist/src/pages/findReservation/ReservationRow.d.ts +1 -1
  392. package/dist/src/pages/findReservation/ReservationRow.js +13 -13
  393. package/dist/src/pages/findReservation/ReservationRowModal.d.ts +1 -1
  394. package/dist/src/pages/findReservation/ReservationRowModal.js +10 -10
  395. package/dist/src/pages/hotel/HotelInfo.js +11 -11
  396. package/dist/src/pages/hotel/HotelInfoPlaceholder.js +1 -1
  397. package/dist/src/pages/steps/Step.d.ts +4 -4
  398. package/dist/src/pages/steps/StepAddon/StepAddon.d.ts +5 -5
  399. package/dist/src/pages/steps/StepAddon/StepAddon.js +3 -3
  400. package/dist/src/pages/steps/StepAddon/StepAddonComponent.js +11 -11
  401. package/dist/src/pages/steps/StepAddon/StepAddonLoader.js +2 -2
  402. package/dist/src/pages/steps/StepAddon/StepAddonValidator.d.ts +2 -2
  403. package/dist/src/pages/steps/StepAddon/StepAddonValidator.js +1 -1
  404. package/dist/src/pages/steps/StepConfirmation/StepConfirmation.d.ts +6 -6
  405. package/dist/src/pages/steps/StepConfirmation/StepConfirmation.js +3 -3
  406. package/dist/src/pages/steps/StepConfirmation/StepConfirmationComponent.js +15 -15
  407. package/dist/src/pages/steps/StepConfirmation/StepConfirmationLoader.js +2 -2
  408. package/dist/src/pages/steps/StepConfirmation/StepConfirmationValidator.d.ts +2 -2
  409. package/dist/src/pages/steps/StepConfirmation/StepConfirmationValidator.js +1 -1
  410. package/dist/src/pages/steps/StepDate/StepDate.js +3 -3
  411. package/dist/src/pages/steps/StepDate/StepDateComponent.js +17 -17
  412. package/dist/src/pages/steps/StepDate/StepDateValidator.d.ts +1 -1
  413. package/dist/src/pages/steps/StepDate/StepDateValidator.js +1 -1
  414. package/dist/src/pages/steps/StepGuide.d.ts +1 -1
  415. package/dist/src/pages/steps/StepGuide.js +6 -6
  416. package/dist/src/pages/steps/StepHotel/StepHotel.d.ts +4 -4
  417. package/dist/src/pages/steps/StepHotel/StepHotel.js +3 -3
  418. package/dist/src/pages/steps/StepHotel/StepHotelComponent.js +11 -11
  419. package/dist/src/pages/steps/StepHotel/StepHotelLoader.js +5 -5
  420. package/dist/src/pages/steps/StepHotel/StepHotelValidator.d.ts +1 -1
  421. package/dist/src/pages/steps/StepHotel/StepHotelValidator.js +1 -1
  422. package/dist/src/pages/steps/StepRoom/StepRoom.d.ts +6 -6
  423. package/dist/src/pages/steps/StepRoom/StepRoom.js +3 -3
  424. package/dist/src/pages/steps/StepRoom/StepRoomComponent.js +17 -17
  425. package/dist/src/pages/steps/StepRoom/StepRoomLoader.js +2 -2
  426. package/dist/src/pages/steps/StepRoom/StepRoomValidator.d.ts +2 -2
  427. package/dist/src/pages/steps/StepRoom/StepRoomValidator.js +1 -1
  428. package/dist/src/pages/steps/StepThanks/StepThanks.d.ts +6 -6
  429. package/dist/src/pages/steps/StepThanks/StepThanks.js +4 -4
  430. package/dist/src/pages/steps/StepThanks/StepThanksComponent.js +13 -13
  431. package/dist/src/pages/steps/StepThanks/StepThanksValidator.d.ts +2 -2
  432. package/dist/src/pages/steps/StepThanks/StepThanksValidator.js +1 -1
  433. package/dist/src/pages/steps/StepValidator.d.ts +1 -1
  434. package/dist/src/providers/CurrencyProvider.js +3 -3
  435. package/dist/src/providers/DistanceProvider.d.ts +1 -1
  436. package/dist/src/providers/DistanceProvider.js +1 -1
  437. package/dist/src/providers/FeatureProvider.js +8 -8
  438. package/dist/src/providers/FilterProvider.d.ts +3 -3
  439. package/dist/src/providers/FilterProvider.js +1 -1
  440. package/dist/src/providers/LanguageProvider.js +1 -1
  441. package/dist/src/providers/PromotionProvider.d.ts +3 -3
  442. package/dist/src/providers/PromotionProvider.js +7 -7
  443. package/dist/src/providers/RatePillProvider.d.ts +5 -5
  444. package/dist/src/providers/RoomSortProvider.d.ts +1 -1
  445. package/dist/src/providers/RoomstayThemeEngine.d.ts +3 -3
  446. package/dist/src/providers/RoomstayThemeEngine.js +1 -1
  447. package/dist/src/providers/SessionProvider.d.ts +1 -1
  448. package/dist/src/providers/SessionProvider.js +5 -5
  449. package/dist/src/providers/feature/ConfirmationVerifyFeature.d.ts +1 -1
  450. package/dist/src/providers/feature/ConfirmationVerifyFeature.js +1 -1
  451. package/dist/src/providers/feature/DatePickerTypeFeature.d.ts +1 -1
  452. package/dist/src/providers/feature/DatePickerTypeFeature.js +2 -2
  453. package/dist/src/providers/feature/E164PhoneNumberFieldFeature.d.ts +1 -1
  454. package/dist/src/providers/feature/E164PhoneNumberFieldFeature.js +1 -1
  455. package/dist/src/providers/feature/FeaturedPromoFeature.d.ts +1 -1
  456. package/dist/src/providers/feature/FeaturedPromoFeature.js +2 -2
  457. package/dist/src/providers/feature/InlineAddonStepFeature.d.ts +1 -1
  458. package/dist/src/providers/feature/InlineAddonStepFeature.js +3 -3
  459. package/dist/src/providers/feature/MemberPortalFeature.d.ts +1 -1
  460. package/dist/src/providers/feature/MemberPortalFeature.js +1 -1
  461. package/dist/src/providers/feature/RoomUpsellFeature.d.ts +1 -1
  462. package/dist/src/providers/feature/RoomUpsellFeature.js +1 -1
  463. package/dist/src/providers/feature/ShowIATANumberOnCheckoutFeature.d.ts +1 -1
  464. package/dist/src/providers/feature/ShowIATANumberOnCheckoutFeature.js +1 -1
  465. package/dist/src/providers/storage/LocalStorageProvider.d.ts +1 -1
  466. package/dist/src/providers/storage/LocalStorageProvider.js +1 -1
  467. package/dist/src/reducers/BasketReducer.d.ts +2 -2
  468. package/dist/src/reducers/BasketReducer.js +3 -3
  469. package/dist/src/routes/NaturallyProgressedStepRoute.d.ts +1 -1
  470. package/dist/src/routes/NaturallyProgressedStepRoute.js +6 -6
  471. package/dist/src/stories/Alert.stories.d.ts +1 -1
  472. package/dist/src/stories/Alert.stories.js +1 -1
  473. package/dist/src/stories/BackButton.stories.d.ts +1 -1
  474. package/dist/src/stories/BackButton.stories.js +1 -1
  475. package/dist/src/stories/BookNowPayLaterInfoBlock.stories.d.ts +1 -1
  476. package/dist/src/stories/BookNowPayLaterInfoBlock.stories.js +1 -1
  477. package/dist/src/stories/BookingWizard.stories.d.ts +1 -1
  478. package/dist/src/stories/BookingWizard.stories.js +1 -1
  479. package/dist/src/stories/Card.stories.js +1 -1
  480. package/dist/src/stories/CardTypeSelect.stories.d.ts +1 -1
  481. package/dist/src/stories/CardTypeSelect.stories.js +1 -1
  482. package/dist/src/stories/ConfirmationModal.stories.d.ts +1 -1
  483. package/dist/src/stories/ConfirmationModal.stories.js +1 -1
  484. package/dist/src/stories/Countdown.stories.d.ts +1 -1
  485. package/dist/src/stories/Countdown.stories.js +1 -1
  486. package/dist/src/stories/Currency.stories.d.ts +1 -1
  487. package/dist/src/stories/Currency.stories.js +1 -1
  488. package/dist/src/stories/DateRangePicker.stories.d.ts +1 -1
  489. package/dist/src/stories/DateRangePicker.stories.js +1 -1
  490. package/dist/src/stories/Distance.stories.d.ts +1 -1
  491. package/dist/src/stories/Distance.stories.js +1 -1
  492. package/dist/src/stories/ErrorModal.stories.d.ts +1 -1
  493. package/dist/src/stories/ErrorModal.stories.js +1 -1
  494. package/dist/src/stories/FloatingDateRangePicker.stories.d.ts +1 -1
  495. package/dist/src/stories/FloatingDateRangePicker.stories.js +2 -2
  496. package/dist/src/stories/ForwardedSelect.stories.d.ts +1 -1
  497. package/dist/src/stories/ForwardedSelect.stories.js +1 -1
  498. package/dist/src/stories/Headline.stories.d.ts +1 -1
  499. package/dist/src/stories/Headline.stories.js +1 -1
  500. package/dist/src/stories/LineBreak.stories.d.ts +1 -1
  501. package/dist/src/stories/LineBreak.stories.js +1 -1
  502. package/dist/src/stories/Notification.stories.d.ts +1 -1
  503. package/dist/src/stories/Notification.stories.js +2 -2
  504. package/dist/src/stories/NumberIncrement.stories.d.ts +1 -1
  505. package/dist/src/stories/NumberIncrement.stories.js +1 -1
  506. package/dist/src/stories/PaymentCard.stories.d.ts +1 -1
  507. package/dist/src/stories/PaymentCard.stories.js +1 -1
  508. package/dist/src/stories/PaymentCardInput.stories.d.ts +1 -1
  509. package/dist/src/stories/PaymentCardInput.stories.js +1 -1
  510. package/dist/src/stories/Pill.stories.d.ts +1 -1
  511. package/dist/src/stories/Pill.stories.js +1 -1
  512. package/dist/src/stories/Placeholder.stories.d.ts +1 -1
  513. package/dist/src/stories/Placeholder.stories.js +1 -1
  514. package/dist/src/stories/PlanpayButton.stories.d.ts +1 -1
  515. package/dist/src/stories/PlanpayButton.stories.js +1 -1
  516. package/dist/src/stories/PromoCodeInput.stories.d.ts +1 -1
  517. package/dist/src/stories/PromoCodeInput.stories.js +1 -1
  518. package/dist/src/stories/RadioButton.stories.d.ts +1 -1
  519. package/dist/src/stories/RadioButton.stories.js +1 -1
  520. package/dist/src/stories/RadioButtonGroup.stories.d.ts +1 -1
  521. package/dist/src/stories/RadioButtonGroup.stories.js +1 -1
  522. package/dist/src/stories/RadioFields.stories.d.ts +1 -1
  523. package/dist/src/stories/RadioFields.stories.js +1 -1
  524. package/dist/src/stories/Select.stories.d.ts +2 -2
  525. package/dist/src/stories/Select.stories.js +1 -1
  526. package/dist/src/stories/SimpleModal.stories.d.ts +1 -1
  527. package/dist/src/stories/SimpleModal.stories.js +1 -1
  528. package/dist/src/stories/Slider.stories.d.ts +3 -3
  529. package/dist/src/stories/Slider.stories.js +1 -1
  530. package/dist/src/stories/TabbedModal.stories.d.ts +1 -1
  531. package/dist/src/stories/TabbedModal.stories.js +1 -1
  532. package/dist/src/stories/Tabs.stories.d.ts +1 -1
  533. package/dist/src/stories/Tabs.stories.js +2 -2
  534. package/dist/src/stories/Text.stories.d.ts +1 -1
  535. package/dist/src/stories/Text.stories.js +1 -1
  536. package/dist/src/stories/TextArea.stories.js +1 -1
  537. package/dist/src/stories/TextBox.stories.d.ts +1 -1
  538. package/dist/src/stories/TextBox.stories.js +1 -1
  539. package/dist/src/stories/Tooltip.stories.d.ts +1 -1
  540. package/dist/src/stories/Tooltip.stories.js +1 -1
  541. package/dist/src/util/CalendarHelper.d.ts +1 -1
  542. package/dist/src/util/DataLayer.d.ts +6 -6
  543. package/dist/src/util/PaymentCardHelper.d.ts +1 -1
  544. package/dist/src/util/PaymentCardHelper.js +2 -2
  545. package/dist/src/util/StepManager.d.ts +1 -1
  546. package/dist/src/util/StepManager.js +1 -1
  547. package/dist/src/util/TotalCalculator.d.ts +2 -2
  548. package/dist/src/util/TotalCalculator.js +1 -1
  549. package/dist/test.bundle.js +1 -1
  550. package/dist/tests/jest/events/EventManager.test.js +1 -1
  551. package/dist/tests/offline/RoomstayBestRateAlert.js +1 -1
  552. package/dist/tests/offline/entry/RSCompany.js +1 -1
  553. package/dist/tests/offline/entry/ReactWrapper.js +1 -1
  554. package/dist/tests/offline/entry/components/TestPicker.js +5 -5
  555. package/package.json +2 -2
@@ -25,10 +25,10 @@ var __importStar = (this && this.__importStar) || function (mod) {
25
25
  Object.defineProperty(exports, "__esModule", { value: true });
26
26
  exports.ExistingCardPicker = void 0;
27
27
  const React = __importStar(require("react"));
28
- const LoggedInUserHook_1 = require("../../../../../hooks/LoggedInUserHook");
28
+ const LoggedInUserHook_1 = require("../../../../hooks/LoggedInUserHook");
29
29
  const react_1 = require("react");
30
- const contexts_1 = require("../../../../../contexts/index.js");
31
- const MemberCardItem_1 = require("../../../../../components/pages/Account/Card/MemberCardItem");
30
+ const contexts_1 = require("../../../../contexts/index.js");
31
+ const MemberCardItem_1 = require("../../../pages/Account/Card/MemberCardItem");
32
32
  /*
33
33
  Component assumes that parent checks if member is already logged in
34
34
  */
@@ -28,18 +28,18 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
28
28
  Object.defineProperty(exports, "__esModule", { value: true });
29
29
  const React = __importStar(require("react"));
30
30
  const react_1 = require("react");
31
- const InputGroup_1 = __importDefault(require("../../../../../components/generic/InputGroup/InputGroup"));
32
- const AutoAutoHeight_1 = __importDefault(require("animations/AutoAutoHeight"));
33
- const Alert_1 = __importStar(require("../../../../../components/generic/Alert"));
34
- const Icon_1 = require("../../../../../components/generic/Icon/Icon");
35
- const Text_1 = __importStar(require("../../../../../components/generic/Text"));
31
+ const InputGroup_1 = __importDefault(require("../../../generic/InputGroup/InputGroup"));
32
+ const AutoAutoHeight_1 = __importDefault(require("../../../../animations/AutoAutoHeight"));
33
+ const Alert_1 = __importStar(require("../../../generic/Alert"));
34
+ const Icon_1 = require("../../../generic/Icon/Icon");
35
+ const Text_1 = __importStar(require("../../../generic/Text"));
36
36
  const react_i18next_1 = require("react-i18next");
37
37
  const Translation_1 = require("translations/Translation");
38
- const HotelDTO_1 = require("../../../../../models/Api/HotelDTO");
39
- const hooks_1 = require("../../../../../hooks/index.js");
40
- const VGSHooks_1 = require("../../../../../hooks/VGSHooks");
38
+ const HotelDTO_1 = require("../../../../models/Api/HotelDTO");
39
+ const hooks_1 = require("../../../../hooks/index.js");
40
+ const VGSHooks_1 = require("../../../../hooks/VGSHooks");
41
41
  const ExistingCardPicker_1 = require("./ExistingCardPicker");
42
- const AcceptablePaymentCard_1 = __importDefault(require("../../../../../components/steps/confirmation/PaymentDetails/AcceptablePaymentCard"));
42
+ const AcceptablePaymentCard_1 = __importDefault(require("./AcceptablePaymentCard"));
43
43
  function StepConfirmationPaymentDetails(props, ref) {
44
44
  var _a;
45
45
  const { hotel } = (0, hooks_1.useCurrentHotel)();
@@ -1 +1 @@
1
- {"version":3,"file":"StepConfirmationPaymentDetails.js","sourceRoot":"/","sources":["src/components/steps/confirmation/PaymentDetails/StepConfirmationPaymentDetails.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AACA,6CAA+B;AAC/B,iCAAqF;AACrF,4FAAoE;AACpE,+EAAuD;AACvD,oEAA8D;AAC9D,yDAA0D;AAC1D,kEAA2D;AAC3D,iDAA+C;AAC/C,0DAAuD;AACvD,oDAAmE;AACnE,2CAA8E;AAC9E,+CAAiD;AAEjD,6DAA0D;AAC1D,iIAAyG;AAIzG,SAAS,8BAA8B,CAAC,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,KAAK;4BAC/C,oBAAC,cAAI,IAAC,IAAI,EAAE,eAAQ,CAAC,KAAK,IAAG,YAAY,CAAQ,CAC7C,CACN,CACO,CACpB,CAAC;YACN,CAAC,CAAC;YACF,6BAAK,SAAS,EAAC,eAAe;gBAC1B,oBAAC,+BAAqB,IAClB,SAAS,EAAE,CAAC,OAAY,EAAE,EAAE;wBACxB,OAAO,UAAU,CAAC,KAAK,CAAC,QAAQ,KAAK,IAAI,IAAI,SAAS,CAAC,OAAO,CAAC,CAAC,IAAI,KAAK,UAAU,CAAC,KAAK,CAAC,QAAQ,CAAC;oBACvG,CAAC,EACD,SAAS,EAAE,CAAC,OAAY,EAAE,EAAE;wBACxB,OAAO,UAAU,CAAC,KAAK,CAAC,QAAQ,KAAK,IAAI,CAAC;oBAC9C,CAAC,GACH,CACA;YACN,8BAAM,GAAG,EAAE,OAAO;gBACd,oBAAC,oBAAU,IAAC,UAAU,EAAC,KAAK;oBACxB,6BAAK,SAAS,EAAE,UAAU,CAAC,UAAU,EAAE,EAAE,GAAG,EAAE,UAAU,CAAC,GAAG,GAAI;oBAChE,oBAAC,oBAAU,IAAC,UAAU,EAAC,KAAK;wBACxB,6BAAK,SAAS,EAAE,cAAc,CAAC,UAAU,EAAE,EAAE,GAAG,EAAE,cAAc,CAAC,GAAG,GAAI;wBACxE,6BAAK,SAAS,EAAE,YAAY,CAAC,UAAU,EAAE,EAAE,GAAG,EAAE,YAAY,CAAC,GAAG,GAAI,CAC3D,CACJ;gBACb,oBAAC,oBAAU,IAAC,UAAU,EAAC,GAAG;oBACtB,6BAAK,SAAS,EAAE,UAAU,CAAC,UAAU,EAAE,EAAE,GAAG,EAAE,UAAU,CAAC,GAAG,GAAI,CACvD,CACV,CACL,CACJ,CACT,CAAC;AACN,CAAC;AAED,kBAAe,IAAA,kBAAU,EAAC,8BAA8B,CAAC,CAAC","sourcesContent":["import PaymentCard from '@/models/PaymentCard';\nimport * as React from 'react';\nimport { forwardRef, useEffect, useImperativeHandle, useRef, useState } from 'react';\nimport InputGroup from '@/components/generic/InputGroup/InputGroup';\nimport AutoAutoHeight from 'animations/AutoAutoHeight';\nimport Alert, { AlertType } from '@/components/generic/Alert';\nimport { IconType } from '@/components/generic/Icon/Icon';\nimport Text, { TextType } from '@/components/generic/Text';\nimport { useTranslation } from 'react-i18next';\nimport { Translation } from 'translations/Translation';\nimport { SynxisToVGSCardNameMapping } from '@/models/Api/HotelDTO';\nimport { useCurrentHotel, useMember, useWindowScroll } from '@frontend/hooks';\nimport { useVgsCollect } from '@/hooks/VGSHooks';\nimport { IRoomstayMemberCards } from '@roomstay/core';\nimport { ExistingCardPicker } from './ExistingCardPicker';\nimport AcceptablePaymentCard from '@/components/steps/confirmation/PaymentDetails/AcceptablePaymentCard';\n\ntype VGSInputType = 'card-number' | 'text' | 'card-expiration-date' | 'card-security-code';\n\nfunction StepConfirmationPaymentDetails(props: any, ref: any) {\n const { hotel } = useCurrentHotel();\n const member = useMember();\n\n const [errors, setErrors] = useState<{ [x: string]: string }>({});\n\n const { t } = useTranslation();\n\n const { focusElement } = useWindowScroll();\n\n const vgsInputCss = {\n fontSize: '13px',\n lineHeight: '18px',\n '&::placeholder': {\n color: '#8B8F9A',\n opacity: 1,\n },\n };\n\n const {\n fields: [cardNumber, nameOnCard, expirationDate, securityCode],\n triggerFieldUpdate,\n vgsForm,\n } = useVgsCollect([\n {\n label: t(Translation.Step.Confirmation.Inputs.CardNumber),\n name: 'credit-card',\n type: 'card-number',\n vgsProps: {\n autoComplete: ['cc-number'],\n successColor: '#4F8A10',\n errorColor: '#D8000C',\n showCardIcon: false,\n placeholder: t(Translation.Step.Confirmation.Inputs.CardNumber) + ' *',\n validations: ['required', 'validCardNumber'],\n css: vgsInputCss,\n },\n },\n {\n label: t(Translation.Step.Confirmation.Inputs.NameOnCard),\n name: 'card-name',\n type: 'text',\n vgsProps: {\n validations: ['required'],\n css: vgsInputCss,\n placeholder: t(Translation.Step.Confirmation.Inputs.NameOnCard) + ' *',\n },\n },\n {\n label: t(Translation.Step.Confirmation.Inputs.CardExpiry),\n name: 'expiration-date',\n type: 'card-expiration-date',\n vgsProps: {\n placeholder: t(Translation.Step.Confirmation.Inputs.CardExpiry) + ' *',\n validations: ['required', 'validCardExpirationDate'],\n css: vgsInputCss,\n },\n },\n {\n label: t(Translation.Step.Confirmation.Inputs.SecurityCode),\n name: 'security-code',\n type: 'card-security-code',\n vgsProps: {\n placeholder: t(Translation.Step.Confirmation.Inputs.SecurityCode) + ' *',\n validations: ['required', 'validCardSecurityCode'],\n css: vgsInputCss,\n },\n },\n ]);\n\n const setErrorsOnFaults = (faults: any) => {\n const newErrors: { [x: string]: string } = {};\n\n Object.keys(faults).forEach((input) => {\n let name = '';\n\n switch (input) {\n case 'credit-card':\n name = 'Credit Card';\n break;\n case 'expiration-date':\n name = 'Expiration Date';\n break;\n case 'security-code':\n name = 'Security Code';\n break;\n default:\n name = 'Card Name';\n break;\n }\n\n newErrors[input] = name + ' ' + faults[input].errorMessages[faults[input].errorMessages.length - 1];\n });\n\n setErrors(newErrors);\n };\n\n useEffect(() => {\n if (errors && Object.keys(errors).length !== 0 && cardNumber?.ref?.current) {\n focusElement(cardNumber?.ref?.current);\n }\n }, [errors]);\n\n useImperativeHandle(ref, () => ({\n getTokenizedCode: () =>\n new Promise<PaymentCard | IRoomstayMemberCards>((resolve, reject) => {\n if (vgsForm) {\n vgsForm.submit(\n '/post',\n {\n serializer: 'deep',\n methods: 'POST',\n },\n (status: any, response: any) => {\n const cardData = JSON.parse(response.data);\n const expMatch = cardData['expiration-date'].match(/^(\\d+)\\s*\\/\\s*(\\d+)$/);\n if (!expMatch || expMatch[1].length > 2 || (expMatch[2].length !== 4 && expMatch[2].length !== 2)) {\n setErrorsOnFaults({\n 'expiration-date': {\n errorMessages: ['Invalid - it must be in the format MM / YY or MM / YYYY'],\n },\n });\n reject('invalid expiration date');\n return;\n }\n\n const expiration = (expMatch[1].length === 1 ? '0' : '') + expMatch[1] + (expMatch[2].length === 2 ? expMatch[2] : expMatch[2].substr(2));\n\n const card: any = {\n CVV: cardData['security-code'],\n Expiry: expiration,\n Name: cardData['card-name'],\n Number: cardData['credit-card'],\n Type: cardNumber.state.cardType,\n };\n\n resolve(card);\n },\n (error: any) => {\n setErrorsOnFaults(error);\n reject(error);\n }\n );\n } else {\n console.error('VGS not on element, problem has occurred');\n }\n }),\n }));\n\n const formRef = useRef(null);\n\n const inputNames = ['credit-card', 'card-name', 'expiration-date', 'security-code'];\n const cardTypes = (hotel?.paymentCardTypes ?? [])\n .map((card: string) => {\n const mapping = SynxisToVGSCardNameMapping[card];\n if (!mapping) {\n return null;\n }\n\n return {\n name: SynxisToVGSCardNameMapping[card],\n status: false,\n };\n })\n .filter((obj) => obj);\n\n const onMemberCardSelected = (card: IRoomstayMemberCards) => {\n // TODO:\n };\n\n return (\n <div>\n <div>{!!member.user && <ExistingCardPicker onCardSelected={onMemberCardSelected} />}</div>\n <div>\n {inputNames.map((name) => {\n const errorMessage = errors[name];\n return (\n <AutoAutoHeight open={!!errorMessage} key={name}>\n <div className=\"u-flex\">\n <Alert type={AlertType.Danger} icon={IconType.Error}>\n <Text type={TextType.Small}>{errorMessage}</Text>\n </Alert>\n </div>\n </AutoAutoHeight>\n );\n })}\n <div className=\"u-marg-bottom\">\n <AcceptablePaymentCard\n isCurrent={(cardKey: any) => {\n return cardNumber.state.cardType !== null && cardTypes[cardKey].name === cardNumber.state.cardType;\n }}\n isDefault={(cardKey: any) => {\n return cardNumber.state.cardType === null;\n }}\n />\n </div>\n <form ref={formRef}>\n <InputGroup dimensions=\"2/2\">\n <div className={cardNumber.getClasses()} ref={cardNumber.ref} />\n <InputGroup dimensions=\"2/2\">\n <div className={expirationDate.getClasses()} ref={expirationDate.ref} />\n <div className={securityCode.getClasses()} ref={securityCode.ref} />\n </InputGroup>\n </InputGroup>\n <InputGroup dimensions=\"1\">\n <div className={nameOnCard.getClasses()} ref={nameOnCard.ref} />\n </InputGroup>\n </form>\n </div>\n </div>\n );\n}\n\nexport default forwardRef(StepConfirmationPaymentDetails);\n"]}
1
+ {"version":3,"file":"StepConfirmationPaymentDetails.js","sourceRoot":"/","sources":["src/components/steps/confirmation/PaymentDetails/StepConfirmationPaymentDetails.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AACA,6CAA+B;AAC/B,iCAAqF;AACrF,4FAAoE;AACpE,iFAAyD;AACzD,oEAA8D;AAC9D,yDAA0D;AAC1D,kEAA2D;AAC3D,iDAA+C;AAC/C,0DAAuD;AACvD,oDAAmE;AACnE,2CAA8E;AAC9E,+CAAiD;AAEjD,6DAA0D;AAC1D,iIAAyG;AAIzG,SAAS,8BAA8B,CAAC,KAAU,EAAE,GAAQ;;IACxD,MAAM,EAAE,KAAK,EAAE,GAAG,IAAA,uBAAe,GAAE,CAAC;IACpC,MAAM,MAAM,GAAG,IAAA,iBAAS,GAAE,CAAC;IAE3B,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,GAAG,IAAA,gBAAQ,EAA0B,EAAE,CAAC,CAAC;IAElE,MAAM,EAAE,CAAC,EAAE,GAAG,IAAA,8BAAc,GAAE,CAAC;IAE/B,MAAM,EAAE,YAAY,EAAE,GAAG,IAAA,uBAAe,GAAE,CAAC;IAE3C,MAAM,WAAW,GAAG;QAChB,QAAQ,EAAE,MAAM;QAChB,UAAU,EAAE,MAAM;QAClB,gBAAgB,EAAE;YACd,KAAK,EAAE,SAAS;YAChB,OAAO,EAAE,CAAC;SACb;KACJ,CAAC;IAEF,MAAM,EACF,MAAM,EAAE,CAAC,UAAU,EAAE,UAAU,EAAE,cAAc,EAAE,YAAY,CAAC,EAC9D,kBAAkB,EAClB,OAAO,GACV,GAAG,IAAA,wBAAa,EAAC;QACd;YACI,KAAK,EAAE,CAAC,CAAC,yBAAW,CAAC,IAAI,CAAC,YAAY,CAAC,MAAM,CAAC,UAAU,CAAC;YACzD,IAAI,EAAE,aAAa;YACnB,IAAI,EAAE,aAAa;YACnB,QAAQ,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AC,GAAG,GAAI;wBACxE,6BAAK,SAAS,EAAE,YAAY,CAAC,UAAU,EAAE,EAAE,GAAG,EAAE,YAAY,CAAC,GAAG,GAAI,CAC3D,CACJ;gBACb,oBAAC,oBAAU,IAAC,UAAU,EAAC,GAAG;oBACtB,6BAAK,SAAS,EAAE,UAAU,CAAC,UAAU,EAAE,EAAE,GAAG,EAAE,UAAU,CAAC,GAAG,GAAI,CACvD,CACV,CACL,CACJ,CACT,CAAC;AACN,CAAC;AAED,kBAAe,IAAA,kBAAU,EAAC,8BAA8B,CAAC,CAAC","sourcesContent":["import PaymentCard from '@/models/PaymentCard';\nimport * as React from 'react';\nimport { forwardRef, useEffect, useImperativeHandle, useRef, useState } from 'react';\nimport InputGroup from '@/components/generic/InputGroup/InputGroup';\nimport AutoAutoHeight from '@/animations/AutoAutoHeight';\nimport Alert, { AlertType } from '@/components/generic/Alert';\nimport { IconType } from '@/components/generic/Icon/Icon';\nimport Text, { TextType } from '@/components/generic/Text';\nimport { useTranslation } from 'react-i18next';\nimport { Translation } from 'translations/Translation';\nimport { SynxisToVGSCardNameMapping } from '@/models/Api/HotelDTO';\nimport { useCurrentHotel, useMember, useWindowScroll } from '@frontend/hooks';\nimport { useVgsCollect } from '@/hooks/VGSHooks';\nimport { IRoomstayMemberCards } from '@roomstay/core';\nimport { ExistingCardPicker } from './ExistingCardPicker';\nimport AcceptablePaymentCard from '@/components/steps/confirmation/PaymentDetails/AcceptablePaymentCard';\n\ntype VGSInputType = 'card-number' | 'text' | 'card-expiration-date' | 'card-security-code';\n\nfunction StepConfirmationPaymentDetails(props: any, ref: any) {\n const { hotel } = useCurrentHotel();\n const member = useMember();\n\n const [errors, setErrors] = useState<{ [x: string]: string }>({});\n\n const { t } = useTranslation();\n\n const { focusElement } = useWindowScroll();\n\n const vgsInputCss = {\n fontSize: '13px',\n lineHeight: '18px',\n '&::placeholder': {\n color: '#8B8F9A',\n opacity: 1,\n },\n };\n\n const {\n fields: [cardNumber, nameOnCard, expirationDate, securityCode],\n triggerFieldUpdate,\n vgsForm,\n } = useVgsCollect([\n {\n label: t(Translation.Step.Confirmation.Inputs.CardNumber),\n name: 'credit-card',\n type: 'card-number',\n vgsProps: {\n autoComplete: ['cc-number'],\n successColor: '#4F8A10',\n errorColor: '#D8000C',\n showCardIcon: false,\n placeholder: t(Translation.Step.Confirmation.Inputs.CardNumber) + ' *',\n validations: ['required', 'validCardNumber'],\n css: vgsInputCss,\n },\n },\n {\n label: t(Translation.Step.Confirmation.Inputs.NameOnCard),\n name: 'card-name',\n type: 'text',\n vgsProps: {\n validations: ['required'],\n css: vgsInputCss,\n placeholder: t(Translation.Step.Confirmation.Inputs.NameOnCard) + ' *',\n },\n },\n {\n label: t(Translation.Step.Confirmation.Inputs.CardExpiry),\n name: 'expiration-date',\n type: 'card-expiration-date',\n vgsProps: {\n placeholder: t(Translation.Step.Confirmation.Inputs.CardExpiry) + ' *',\n validations: ['required', 'validCardExpirationDate'],\n css: vgsInputCss,\n },\n },\n {\n label: t(Translation.Step.Confirmation.Inputs.SecurityCode),\n name: 'security-code',\n type: 'card-security-code',\n vgsProps: {\n placeholder: t(Translation.Step.Confirmation.Inputs.SecurityCode) + ' *',\n validations: ['required', 'validCardSecurityCode'],\n css: vgsInputCss,\n },\n },\n ]);\n\n const setErrorsOnFaults = (faults: any) => {\n const newErrors: { [x: string]: string } = {};\n\n Object.keys(faults).forEach((input) => {\n let name = '';\n\n switch (input) {\n case 'credit-card':\n name = 'Credit Card';\n break;\n case 'expiration-date':\n name = 'Expiration Date';\n break;\n case 'security-code':\n name = 'Security Code';\n break;\n default:\n name = 'Card Name';\n break;\n }\n\n newErrors[input] = name + ' ' + faults[input].errorMessages[faults[input].errorMessages.length - 1];\n });\n\n setErrors(newErrors);\n };\n\n useEffect(() => {\n if (errors && Object.keys(errors).length !== 0 && cardNumber?.ref?.current) {\n focusElement(cardNumber?.ref?.current);\n }\n }, [errors]);\n\n useImperativeHandle(ref, () => ({\n getTokenizedCode: () =>\n new Promise<PaymentCard | IRoomstayMemberCards>((resolve, reject) => {\n if (vgsForm) {\n vgsForm.submit(\n '/post',\n {\n serializer: 'deep',\n methods: 'POST',\n },\n (status: any, response: any) => {\n const cardData = JSON.parse(response.data);\n const expMatch = cardData['expiration-date'].match(/^(\\d+)\\s*\\/\\s*(\\d+)$/);\n if (!expMatch || expMatch[1].length > 2 || (expMatch[2].length !== 4 && expMatch[2].length !== 2)) {\n setErrorsOnFaults({\n 'expiration-date': {\n errorMessages: ['Invalid - it must be in the format MM / YY or MM / YYYY'],\n },\n });\n reject('invalid expiration date');\n return;\n }\n\n const expiration = (expMatch[1].length === 1 ? '0' : '') + expMatch[1] + (expMatch[2].length === 2 ? expMatch[2] : expMatch[2].substr(2));\n\n const card: any = {\n CVV: cardData['security-code'],\n Expiry: expiration,\n Name: cardData['card-name'],\n Number: cardData['credit-card'],\n Type: cardNumber.state.cardType,\n };\n\n resolve(card);\n },\n (error: any) => {\n setErrorsOnFaults(error);\n reject(error);\n }\n );\n } else {\n console.error('VGS not on element, problem has occurred');\n }\n }),\n }));\n\n const formRef = useRef(null);\n\n const inputNames = ['credit-card', 'card-name', 'expiration-date', 'security-code'];\n const cardTypes = (hotel?.paymentCardTypes ?? [])\n .map((card: string) => {\n const mapping = SynxisToVGSCardNameMapping[card];\n if (!mapping) {\n return null;\n }\n\n return {\n name: SynxisToVGSCardNameMapping[card],\n status: false,\n };\n })\n .filter((obj) => obj);\n\n const onMemberCardSelected = (card: IRoomstayMemberCards) => {\n // TODO:\n };\n\n return (\n <div>\n <div>{!!member.user && <ExistingCardPicker onCardSelected={onMemberCardSelected} />}</div>\n <div>\n {inputNames.map((name) => {\n const errorMessage = errors[name];\n return (\n <AutoAutoHeight open={!!errorMessage} key={name}>\n <div className=\"u-flex\">\n <Alert type={AlertType.Danger} icon={IconType.Error}>\n <Text type={TextType.Small}>{errorMessage}</Text>\n </Alert>\n </div>\n </AutoAutoHeight>\n );\n })}\n <div className=\"u-marg-bottom\">\n <AcceptablePaymentCard\n isCurrent={(cardKey: any) => {\n return cardNumber.state.cardType !== null && cardTypes[cardKey].name === cardNumber.state.cardType;\n }}\n isDefault={(cardKey: any) => {\n return cardNumber.state.cardType === null;\n }}\n />\n </div>\n <form ref={formRef}>\n <InputGroup dimensions=\"2/2\">\n <div className={cardNumber.getClasses()} ref={cardNumber.ref} />\n <InputGroup dimensions=\"2/2\">\n <div className={expirationDate.getClasses()} ref={expirationDate.ref} />\n <div className={securityCode.getClasses()} ref={securityCode.ref} />\n </InputGroup>\n </InputGroup>\n <InputGroup dimensions=\"1\">\n <div className={nameOnCard.getClasses()} ref={nameOnCard.ref} />\n </InputGroup>\n </form>\n </div>\n </div>\n );\n}\n\nexport default forwardRef(StepConfirmationPaymentDetails);\n"]}
@@ -29,10 +29,10 @@ Object.defineProperty(exports, "__esModule", { value: true });
29
29
  exports.PlanpayPaymentMethod = void 0;
30
30
  const React = __importStar(require("react"));
31
31
  const react_1 = require("react");
32
- const contexts_1 = require("../../../../contexts/index.js");
32
+ const contexts_1 = require("../../../contexts/index.js");
33
33
  const web_1 = require("@planpay/web");
34
- const Placeholder_1 = __importDefault(require("../../../../components/generic/Placeholder"));
35
- const CurrentHotelHook_1 = require("../../../../hooks/CurrentHotelHook");
34
+ const Placeholder_1 = __importDefault(require("../../generic/Placeholder"));
35
+ const CurrentHotelHook_1 = require("../../../hooks/CurrentHotelHook");
36
36
  const PlanpayWidgetLoader = () => {
37
37
  return (React.createElement("div", null,
38
38
  React.createElement("div", { className: "row no-gutters" },
@@ -39,28 +39,28 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
39
39
  Object.defineProperty(exports, "__esModule", { value: true });
40
40
  const React = __importStar(require("react"));
41
41
  const react_1 = require("react");
42
- const Text_1 = __importStar(require("../../../../components/generic/Text"));
43
- const InputGroup_1 = __importDefault(require("../../../../components/generic/InputGroup/InputGroup"));
44
- const TextBox_1 = __importDefault(require("../../../../components/generic/TextBox"));
42
+ const Text_1 = __importStar(require("../../generic/Text"));
43
+ const InputGroup_1 = __importDefault(require("../../generic/InputGroup/InputGroup"));
44
+ const TextBox_1 = __importDefault(require("../../generic/TextBox"));
45
45
  const Translation_1 = require("translations/Translation");
46
46
  const react_i18next_1 = require("react-i18next");
47
- const Headline_1 = __importDefault(require("../../../../components/generic/Headline"));
48
- const Icon_1 = __importStar(require("../../../../components/generic/Icon/Icon"));
49
- const Color_1 = require("../../../../util/Color");
50
- const StepConfirmationCountrySelector_1 = __importDefault(require("../../../../components/steps/confirmation/StepConfirmationCountrySelector"));
51
- const StringHelper_1 = __importDefault(require("../../../../util/StringHelper"));
52
- const LineBreak_1 = __importDefault(require("../../../../components/generic/LineBreak"));
47
+ const Headline_1 = __importDefault(require("../../generic/Headline"));
48
+ const Icon_1 = __importStar(require("../../generic/Icon/Icon"));
49
+ const Color_1 = require("../../../util/Color");
50
+ const StepConfirmationCountrySelector_1 = __importDefault(require("./StepConfirmationCountrySelector"));
51
+ const StringHelper_1 = __importDefault(require("../../../util/StringHelper"));
52
+ const LineBreak_1 = __importDefault(require("../../generic/LineBreak"));
53
53
  const react_hook_form_1 = require("react-hook-form");
54
- const Alert_1 = __importStar(require("../../../../components/generic/Alert"));
55
- const AutoAutoHeight_1 = __importDefault(require("animations/AutoAutoHeight"));
56
- const DataLayer_1 = __importStar(require("../../../../util/DataLayer"));
57
- const EnhancedPhoneNumberField_1 = __importDefault(require("../../../../components/generic/custom/EnhancedPhoneNumberField/EnhancedPhoneNumberField"));
58
- const E164PhoneNumberFieldFeature_1 = __importDefault(require("../../../../providers/feature/E164PhoneNumberFieldFeature"));
54
+ const Alert_1 = __importStar(require("../../generic/Alert"));
55
+ const AutoAutoHeight_1 = __importDefault(require("../../../animations/AutoAutoHeight"));
56
+ const DataLayer_1 = __importStar(require("../../../util/DataLayer"));
57
+ const EnhancedPhoneNumberField_1 = __importDefault(require("../../generic/custom/EnhancedPhoneNumberField/EnhancedPhoneNumberField"));
58
+ const E164PhoneNumberFieldFeature_1 = __importDefault(require("../../../providers/feature/E164PhoneNumberFieldFeature"));
59
59
  const Confirmation_1 = require("../../../models/Confirmation");
60
60
  const Checkbox_1 = __importDefault(require("../../generic/Checkbox/Checkbox"));
61
- const contexts_1 = require("../../../../contexts/index.js");
61
+ const contexts_1 = require("../../../contexts/index.js");
62
62
  const core_1 = require("@roomstay/core");
63
- const Validation_1 = require("../../../../util/Validation");
63
+ const Validation_1 = require("../../../util/Validation");
64
64
  const RoomContactDetails = () => {
65
65
  const { register, formState, control, watch, getValues, setValue } = (0, react_hook_form_1.useFormContext)();
66
66
  const basketContext = (0, react_1.useContext)(contexts_1.BasketContext);
@@ -1 +1 @@
1
- {"version":3,"file":"RoomContactDetails.js","sourceRoot":"/","sources":["src/components/steps/confirmation/RoomContactDetails.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,6CAA+B;AAC/B,iCAA4D;AAC5D,kEAA2D;AAC3D,4FAAoE;AACpE,2EAAmD;AACnD,0DAAuD;AACvD,iDAA+C;AAC/C,6EAAqD;AACrD,uEAAgE;AAChE,wCAAqC;AACrC,sIAA8G;AAC9G,uEAA+C;AAC/C,+EAAuD;AACvD,qDAAwF;AACxF,oEAA8D;AAC9D,+EAAuD;AACvD,8DAA+E;AAC/E,6IAAqH;AACrH,kHAA0F;AAC1F,+DAA2F;AAC3F,+EAAuD;AACvD,iDAA0E;AAC1E,yCAAuD;AACvD,kDAAgD;AAEhD,MAAM,kBAAkB,GAAO,GAAG,EAAE;IAChC,MAAM,EAAE,QAAQ,EAAE,SAAS,EAAE,OAAO,EAAE,KAAK,EAAE,SAAS,EAAE,QAAQ,EAAE,GAAG,IAAA,gCAAc,GAA0B,CAAC;IAC9G,MAAM,aAAa,GAAG,IAAA,kBAAU,EAAC,wBAAa,CAAC,CAAC;IAChD,MAAM,UAAU,GAAG,aAAa,CAAC,eAAe,EAAE,CAAC;IACnD,MAAM,eAAe,GAAG,aAAa,CAAC,eAAe,CAA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C,OAAO,CAAC,EAAE,CAAC;qCACxH;iCACJ,EACD,MAAM,EAAE,CAAC,EAAE,KAAK,EAAE,EAAE,EAAE;oCAClB,MAAM,EAAE,GAAG,EAAE,QAAQ,KAAc,KAAK,EAAd,IAAI,UAAK,KAAK,EAAlC,mBAA0B,CAAQ,CAAC;oCACzC,OAAO,CACH,oBAAC,yCAA+B,kBAC5B,QAAQ,EAAE,UAAU,EACpB,gBAAgB,EAAE,kBAAkB,CAAC,kCAAmB,CAAC,OAAO,CAAC,EACjE,QAAQ,EAAE,CAAC,CAAC,EAAE,EAAE;4CACZ,QAAQ,CAAC,CAAC,CAAC,CAAC;4CACZ,aAAa,CAAC,YAAY,CAAC,kCAAmB,CAAC,OAAO,CAAC,EAAE,mBAAmB,CAAC,CAAC,CAAC,CAAC,CAAC;wCACrF,CAAC,IACG,IAAI,EACV,CACL,CAAC;gCACN,CAAC,GACH,CACO,CACX,CACJ;gBACN,oBAAC,mBAAS,OAAG,CACX;YACL,MAAM,CAAC,MAAM,GAAG,CAAC,IAAI,KAAK,KAAK,CAAC,CAAC,CAAC,CAAC,CAChC,6BAAK,SAAS,EAAC,sBAAsB;gBACjC,oBAAC,kBAAQ,kBAAC,KAAK,EAAE,CAAC,CAAC,yBAAW,CAAC,IAAI,CAAC,YAAY,CAAC,yBAAyB,CAAC,IAAM,QAAQ,CAAC,cAAc,CAAC,EAAI,CAC3G,CACT,CAAC,CAAC,CAAC,IAAI,CACN,CACT,CAAC;IACN,CAAC,CAAC,CACH,CACN,CAAC;AACN,CAAC,CAAC;AAEF,kBAAe,kBAAkB,CAAC","sourcesContent":["import * as React from 'react';\nimport { FC, useContext, useEffect, useState } from 'react';\nimport Text, { TextType } from '@/components/generic/Text';\nimport InputGroup from '@/components/generic/InputGroup/InputGroup';\nimport TextBox from '@/components/generic/TextBox';\nimport { Translation } from 'translations/Translation';\nimport { useTranslation } from 'react-i18next';\nimport Headline from '@/components/generic/Headline';\nimport Icon, { IconType } from '@/components/generic/Icon/Icon';\nimport { Color } from '@/util/Color';\nimport StepConfirmationCountrySelector from '@/components/steps/confirmation/StepConfirmationCountrySelector';\nimport StringHelper from '@/util/StringHelper';\nimport LineBreak from '@/components/generic/LineBreak';\nimport { Controller, FieldError, useFieldArray, useFormContext } from 'react-hook-form';\nimport Alert, { AlertType } from '@/components/generic/Alert';\nimport AutoAutoHeight from 'animations/AutoAutoHeight';\nimport DataLayer, { InteractionStep, InteractionType } from '@/util/DataLayer';\nimport EnhancedPhoneNumberField from '@/components/generic/custom/EnhancedPhoneNumberField/EnhancedPhoneNumberField';\nimport E164PhoneNumberFieldFeature from '@/providers/feature/E164PhoneNumberFieldFeature';\nimport { ConfirmationFormValues, EUserProfileFormKey } from '../../../models/Confirmation';\nimport Checkbox from '../../generic/Checkbox/Checkbox';\nimport { BasketContext, RoomstayMemberContext } from '@frontend/contexts';\nimport { EBookingPaymentMethod } from '@roomstay/core';\nimport { EMAIL_REGEX } from '@/util/Validation';\n\nconst RoomContactDetails: FC = () => {\n const { register, formState, control, watch, getValues, setValue } = useFormContext<ConfirmationFormValues>();\n const basketContext = useContext(BasketContext);\n const basketRows = basketContext.getAllValidRows();\n const basketAddonRows = basketContext.basketAddonRows;\n\n const { update, fields } = useFieldArray({\n control,\n name: 'userProfiles',\n });\n const [copyCheckBox, paymentMethod] = watch(['copyCheckBox', 'paymentMethod']);\n\n const errors = formState.errors;\n\n const { t } = useTranslation();\n const { roomstayMember: member } = useContext(RoomstayMemberContext);\n\n useEffect(() => {\n errors.userProfiles?.forEach((_, index) => {\n if (errors.userProfiles[index]) {\n opens[index] = true;\n }\n });\n setOpens(opens.slice(0));\n }, [errors.userProfiles, copyCheckBox]);\n\n useEffect(() => {\n const getDefaultValue = (index: number, potentialDefaultValue = '') => {\n return index === 0 ? potentialDefaultValue : '';\n };\n const userProfiles = basketRows.map((basketRows, index) => {\n return {\n [EUserProfileFormKey.Forename]: getDefaultValue(index, member?.forename),\n [EUserProfileFormKey.Surname]: getDefaultValue(index, member?.surname),\n [EUserProfileFormKey.Email]: getDefaultValue(index, member?.email),\n [EUserProfileFormKey.Phone]: getDefaultValue(index, member?.phoneNumber),\n [EUserProfileFormKey.Address]: getDefaultValue(index, member?.address?.address),\n [EUserProfileFormKey.City]: getDefaultValue(index, member?.address?.city),\n [EUserProfileFormKey.PostCode]: getDefaultValue(index, member?.address?.zip),\n [EUserProfileFormKey.Country]: getDefaultValue(index, member?.address?.country),\n };\n });\n setValue('userProfiles', userProfiles);\n setValue('copyCheckBox', basketRows?.length && basketRows.length > 1);\n }, [member, basketRows?.length]);\n\n const padInputNameByRoomNumber = (name: EUserProfileFormKey, index: number) => `userProfiles.${index}.${name}` as const;\n\n const [opens, setOpens] = useState<boolean[]>(basketRows.map((basketRow, index) => index === 0));\n\n const onInputChange =\n (fieldName: string, interactionName: string) =>\n (event: any): void => {\n DataLayer.instance.sendInteraction(interactionName, InteractionType.FORM_FIELD, InteractionStep.GUEST_DETAILS);\n };\n\n useEffect(() => {\n if (copyCheckBox)\n fields.forEach((basketRow, index) => {\n if (index === 0) return;\n update(index, getValues(`userProfiles.0`));\n });\n }, [copyCheckBox]);\n\n useEffect(() => {\n const { unsubscribe } = watch((allFields, { name, type }) => {\n if (type === 'change' && name.includes('userProfiles') && name.split('.')[1] === '0' && allFields.copyCheckBox) {\n fields.map((field, index) => {\n if (index === 0) return;\n update(index, getValues('userProfiles.0'));\n });\n }\n });\n\n return () => {\n unsubscribe();\n };\n }, [fields]);\n\n useEffect(() => {\n DataLayer.instance.sendCheckoutView(basketRows, basketAddonRows);\n }, []);\n\n const setOpenByIndex = (index: number, value: boolean) => {\n opens.splice(index, 1, value);\n setOpens(opens.slice(0));\n };\n\n return (\n <>\n {fields.map((field, index) => {\n const padInputName = (name: EUserProfileFormKey) => padInputNameByRoomNumber(name, index);\n const getValidationClass = (name: EUserProfileFormKey) => {\n if (!errors.userProfiles || (copyCheckBox && index >= 1)) return null;\n if (errors.userProfiles[index]?.[name]) {\n return 'error';\n } else {\n return 'success';\n }\n };\n\n const openExpandable = () => {\n if (index !== 0) {\n setOpenByIndex(index, !opens[index]);\n }\n };\n\n const basketRow = basketRows[index];\n\n const isDisabled = (copyCheckBox && index >= 1) || paymentMethod === EBookingPaymentMethod.Planpay;\n\n return (\n <div key={field.id}>\n <div className={index === 0 ? '' : 'u-marg-bottom--heavy'}>\n <div className=\"u-marg-bottom\" onClick={openExpandable}>\n <div className=\"u-flex u-marg-bottom align-items-center\">\n <Headline bold={true}>\n {t(Translation.Misc.Room)} {index + 1}\n </Headline>\n {index !== 0 && <Icon icon={opens[index] ? IconType.ArrowDown2 : IconType.ArrowUp2} color={Color.Grey} />}\n </div>\n {basketRow && (\n <div className=\"u-marg-bottom\">\n <Text>\n <strong className=\"u-block@l-\">{basketRow.getRoom().name}</strong> for{' '}\n {StringHelper.pluralWithDictAndCount(basketRow.getAdults(), Translation.Step.Date.Adult, t)}\n ,&nbsp;\n {StringHelper.pluralWithDictAndCount(basketRow.getChildren(), Translation.Step.Date.Child, t)}\n </Text>\n <div className=\"step-one-status--dates u-flex justify-content-start\">\n <Text type={TextType.Small} color={Color.Accent}>\n <strong>{basketRow.getStartDate().format('ddd, MMM D')}</strong>\n </Text>\n <Icon icon={IconType.ArrowRight2} size={'18px'} />\n <Text type={TextType.Small} color={Color.Accent}>\n <strong>{basketRow.getEndDate().format('ddd, MMM D')}</strong>\n </Text>\n </div>\n </div>\n )}\n {errors.userProfiles?.[index] &&\n formState.submitCount >= 1 &&\n (index === 0 || !copyCheckBox) &&\n Object.values(errors.userProfiles[index]).map((error: FieldError, errorIndex) => {\n return (\n <AutoAutoHeight key={errorIndex} open>\n <div className=\"u-flex\">\n <Alert\n icon={IconType.Error}\n type={AlertType.Danger}\n noMargin={errorIndex === Object.keys(errors.userProfiles[index]).length - 1}\n >\n <Text type={TextType.Small}>{error?.message}</Text>\n </Alert>\n </div>\n </AutoAutoHeight>\n );\n })}\n </div>\n <div className=\"room-contact-details--row\" style={{ maxHeight: opens[index] ? '' : 0 }}>\n <div className=\"u-marg-bottom--heavy\">\n <div className=\"u-marg-bottom--light\">\n <Text type={TextType.Small}>\n <strong>{t(Translation.Step.Confirmation.ContactInfo)}</strong>\n </Text>\n </div>\n <InputGroup dimensions=\"2/2\">\n <TextBox\n inputProps={{\n disabled: isDisabled,\n }}\n placeholder={t(Translation.Step.Confirmation.Inputs.Forename) + ' *'}\n wide={true}\n required={true}\n validationStatus={getValidationClass(EUserProfileFormKey.Forename)}\n {...register(padInputName(EUserProfileFormKey.Forename), {\n onChange: onInputChange(padInputName(EUserProfileFormKey.Forename), 'Forename - Contact Info'),\n required: {\n value: true,\n message: t(Translation.Step.Confirmation.Inputs.Required, { field: t(Translation.Step.Confirmation.Inputs.Forename) }),\n },\n })}\n />\n <TextBox\n inputProps={{\n disabled: isDisabled,\n }}\n placeholder={t(Translation.Step.Confirmation.Inputs.Surname) + ' *'}\n wide={true}\n required={true}\n validationStatus={getValidationClass(EUserProfileFormKey.Surname)}\n {...register(padInputName(EUserProfileFormKey.Surname), {\n onChange: onInputChange(padInputName(EUserProfileFormKey.Surname), 'Surname - Contact Info'),\n required: {\n value: true,\n message: t(Translation.Step.Confirmation.Inputs.Required, { field: t(Translation.Step.Confirmation.Inputs.Surname) }),\n },\n })}\n />\n </InputGroup>\n\n <InputGroup dimensions={'2/2'}>\n <TextBox\n inputProps={{\n disabled: isDisabled,\n }}\n placeholder={t(Translation.Step.Confirmation.Inputs.Email) + ' *'}\n wide={true}\n validationStatus={getValidationClass(EUserProfileFormKey.Email)}\n required={true}\n {...register(padInputName(EUserProfileFormKey.Email), {\n onChange: onInputChange(padInputName(EUserProfileFormKey.Email), 'Email - Contact Info'),\n required: {\n value: true,\n message: t(Translation.Step.Confirmation.Inputs.Required, { field: t(Translation.Step.Confirmation.Inputs.Email) }),\n },\n pattern: {\n value: EMAIL_REGEX,\n message: t(Translation.Step.Confirmation.Inputs.InvalidEmail),\n },\n })}\n />\n {E164PhoneNumberFieldFeature.isActive() ? (\n <Controller\n control={control}\n name={padInputName(EUserProfileFormKey.Phone)}\n rules={{\n required: {\n value: true,\n message: t(Translation.Step.Confirmation.Inputs.Required, { field: t(Translation.Step.Confirmation.Inputs.Phone) }),\n },\n minLength: {\n value: 5,\n message: 'Phone number is required',\n },\n maxLength: {\n value: 17,\n message: 'Phone number is too long',\n },\n pattern: {\n value: /^[1-9]( |\\d){1,15}$/g,\n message: 'Incorrect phone number entered',\n },\n }}\n render={({ field }) => {\n return (\n <EnhancedPhoneNumberField\n disabled={isDisabled}\n validationStatus={getValidationClass(EUserProfileFormKey.Phone)}\n {...field}\n onChange={(e: any) => {\n field.onChange(e);\n onInputChange(padInputName(EUserProfileFormKey.Phone), 'Phone - Contact Info')(e);\n }}\n />\n );\n }}\n />\n ) : (\n <TextBox\n inputProps={{\n disabled: isDisabled,\n }}\n placeholder={t(Translation.Step.Confirmation.Inputs.Phone) + ' *'}\n wide={true}\n required={true}\n validationStatus={getValidationClass(EUserProfileFormKey.Phone)}\n {...register(padInputName(EUserProfileFormKey.Phone), {\n onChange: onInputChange(padInputName(EUserProfileFormKey.Phone), 'Phone - Contact Info'),\n required: {\n value: true,\n message: t(Translation.Step.Confirmation.Inputs.Required, { field: t(Translation.Step.Confirmation.Inputs.Phone) }),\n },\n })}\n />\n )}\n </InputGroup>\n </div>\n <div className=\"\">\n <div className=\"u-marg-bottom--light\">\n <Text type={TextType.Small}>\n <strong>{t(Translation.Step.Confirmation.Address)}</strong>\n </Text>\n </div>\n\n <InputGroup dimensions={'3/1'}>\n <TextBox\n inputProps={{\n disabled: isDisabled,\n }}\n placeholder={t(Translation.Step.Confirmation.Inputs.Address) + ' *'}\n wide={true}\n required={true}\n validationStatus={getValidationClass(EUserProfileFormKey.Address)}\n {...register(padInputName(EUserProfileFormKey.Address), {\n onChange: onInputChange(padInputName(EUserProfileFormKey.Address), 'Address - Address'),\n required: {\n value: true,\n message: t(Translation.Step.Confirmation.Inputs.Required, { field: t(Translation.Step.Confirmation.Inputs.Address) }),\n },\n })}\n />\n <TextBox\n inputProps={{\n disabled: isDisabled,\n }}\n placeholder={t(Translation.Step.Confirmation.Inputs.City) + ' *'}\n wide={true}\n required={true}\n validationStatus={getValidationClass(EUserProfileFormKey.City)}\n {...register(padInputName(EUserProfileFormKey.City), {\n onChange: onInputChange(padInputName(EUserProfileFormKey.City), 'City - Address'),\n required: {\n value: true,\n message: t(Translation.Step.Confirmation.Inputs.Required, { field: t(Translation.Step.Confirmation.Inputs.City) }),\n },\n })}\n />\n </InputGroup>\n <InputGroup dimensions={'2/2'}>\n <TextBox\n inputProps={{\n disabled: isDisabled,\n }}\n placeholder={t(Translation.Step.Confirmation.Inputs.PostCode) + ' *'}\n wide={true}\n required={true}\n validationStatus={getValidationClass(EUserProfileFormKey.PostCode)}\n {...register(padInputName(EUserProfileFormKey.PostCode), {\n onChange: onInputChange(padInputName(EUserProfileFormKey.PostCode), 'PostCode - Address'),\n required: {\n value: true,\n message: t(Translation.Step.Confirmation.Inputs.Required, { field: t(Translation.Step.Confirmation.Inputs.PostCode) }),\n },\n })}\n />\n <Controller\n control={control}\n name={padInputName(EUserProfileFormKey.Country)}\n rules={{\n required: {\n value: true,\n message: t(Translation.Step.Confirmation.Inputs.Required, { field: t(Translation.Step.Confirmation.Inputs.Country) }),\n },\n }}\n render={({ field }) => {\n const { ref, onChange, ...rest } = field;\n return (\n <StepConfirmationCountrySelector\n disabled={isDisabled}\n validationStatus={getValidationClass(EUserProfileFormKey.Country)}\n onChange={(e) => {\n onChange(e);\n onInputChange(padInputName(EUserProfileFormKey.Country), 'Country - Address')(e);\n }}\n {...rest}\n />\n );\n }}\n />\n </InputGroup>\n </div>\n </div>\n <LineBreak />\n </div>\n {fields.length > 1 && index === 0 ? (\n <div className=\"u-marg-bottom--heavy\">\n <Checkbox label={t(Translation.Step.Confirmation.ApplySameInfoToOtherRooms)} {...register('copyCheckBox')} />\n </div>\n ) : null}\n </div>\n );\n })}\n </>\n );\n};\n\nexport default RoomContactDetails;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C;4CACZ,aAAa,CAAC,YAAY,CAAC,kCAAmB,CAAC,OAAO,CAAC,EAAE,mBAAmB,CAAC,CAAC,CAAC,CAAC,CAAC;wCACrF,CAAC,IACG,IAAI,EACV,CACL,CAAC;gCACN,CAAC,GACH,CACO,CACX,CACJ;gBACN,oBAAC,mBAAS,OAAG,CACX;YACL,MAAM,CAAC,MAAM,GAAG,CAAC,IAAI,KAAK,KAAK,CAAC,CAAC,CAAC,CAAC,CAChC,6BAAK,SAAS,EAAC,sBAAsB;gBACjC,oBAAC,kBAAQ,kBAAC,KAAK,EAAE,CAAC,CAAC,yBAAW,CAAC,IAAI,CAAC,YAAY,CAAC,yBAAyB,CAAC,IAAM,QAAQ,CAAC,cAAc,CAAC,EAAI,CAC3G,CACT,CAAC,CAAC,CAAC,IAAI,CACN,CACT,CAAC;IACN,CAAC,CAAC,CACH,CACN,CAAC;AACN,CAAC,CAAC;AAEF,kBAAe,kBAAkB,CAAC","sourcesContent":["import * as React from 'react';\nimport { FC, useContext, useEffect, useState } from 'react';\nimport Text, { TextType } from '@/components/generic/Text';\nimport InputGroup from '@/components/generic/InputGroup/InputGroup';\nimport TextBox from '@/components/generic/TextBox';\nimport { Translation } from 'translations/Translation';\nimport { useTranslation } from 'react-i18next';\nimport Headline from '@/components/generic/Headline';\nimport Icon, { IconType } from '@/components/generic/Icon/Icon';\nimport { Color } from '@/util/Color';\nimport StepConfirmationCountrySelector from '@/components/steps/confirmation/StepConfirmationCountrySelector';\nimport StringHelper from '@/util/StringHelper';\nimport LineBreak from '@/components/generic/LineBreak';\nimport { Controller, FieldError, useFieldArray, useFormContext } from 'react-hook-form';\nimport Alert, { AlertType } from '@/components/generic/Alert';\nimport AutoAutoHeight from '@/animations/AutoAutoHeight';\nimport DataLayer, { InteractionStep, InteractionType } from '@/util/DataLayer';\nimport EnhancedPhoneNumberField from '@/components/generic/custom/EnhancedPhoneNumberField/EnhancedPhoneNumberField';\nimport E164PhoneNumberFieldFeature from '@/providers/feature/E164PhoneNumberFieldFeature';\nimport { ConfirmationFormValues, EUserProfileFormKey } from '../../../models/Confirmation';\nimport Checkbox from '../../generic/Checkbox/Checkbox';\nimport { BasketContext, RoomstayMemberContext } from '@frontend/contexts';\nimport { EBookingPaymentMethod } from '@roomstay/core';\nimport { EMAIL_REGEX } from '@/util/Validation';\n\nconst RoomContactDetails: FC = () => {\n const { register, formState, control, watch, getValues, setValue } = useFormContext<ConfirmationFormValues>();\n const basketContext = useContext(BasketContext);\n const basketRows = basketContext.getAllValidRows();\n const basketAddonRows = basketContext.basketAddonRows;\n\n const { update, fields } = useFieldArray({\n control,\n name: 'userProfiles',\n });\n const [copyCheckBox, paymentMethod] = watch(['copyCheckBox', 'paymentMethod']);\n\n const errors = formState.errors;\n\n const { t } = useTranslation();\n const { roomstayMember: member } = useContext(RoomstayMemberContext);\n\n useEffect(() => {\n errors.userProfiles?.forEach((_, index) => {\n if (errors.userProfiles[index]) {\n opens[index] = true;\n }\n });\n setOpens(opens.slice(0));\n }, [errors.userProfiles, copyCheckBox]);\n\n useEffect(() => {\n const getDefaultValue = (index: number, potentialDefaultValue = '') => {\n return index === 0 ? potentialDefaultValue : '';\n };\n const userProfiles = basketRows.map((basketRows, index) => {\n return {\n [EUserProfileFormKey.Forename]: getDefaultValue(index, member?.forename),\n [EUserProfileFormKey.Surname]: getDefaultValue(index, member?.surname),\n [EUserProfileFormKey.Email]: getDefaultValue(index, member?.email),\n [EUserProfileFormKey.Phone]: getDefaultValue(index, member?.phoneNumber),\n [EUserProfileFormKey.Address]: getDefaultValue(index, member?.address?.address),\n [EUserProfileFormKey.City]: getDefaultValue(index, member?.address?.city),\n [EUserProfileFormKey.PostCode]: getDefaultValue(index, member?.address?.zip),\n [EUserProfileFormKey.Country]: getDefaultValue(index, member?.address?.country),\n };\n });\n setValue('userProfiles', userProfiles);\n setValue('copyCheckBox', basketRows?.length && basketRows.length > 1);\n }, [member, basketRows?.length]);\n\n const padInputNameByRoomNumber = (name: EUserProfileFormKey, index: number) => `userProfiles.${index}.${name}` as const;\n\n const [opens, setOpens] = useState<boolean[]>(basketRows.map((basketRow, index) => index === 0));\n\n const onInputChange =\n (fieldName: string, interactionName: string) =>\n (event: any): void => {\n DataLayer.instance.sendInteraction(interactionName, InteractionType.FORM_FIELD, InteractionStep.GUEST_DETAILS);\n };\n\n useEffect(() => {\n if (copyCheckBox)\n fields.forEach((basketRow, index) => {\n if (index === 0) return;\n update(index, getValues(`userProfiles.0`));\n });\n }, [copyCheckBox]);\n\n useEffect(() => {\n const { unsubscribe } = watch((allFields, { name, type }) => {\n if (type === 'change' && name.includes('userProfiles') && name.split('.')[1] === '0' && allFields.copyCheckBox) {\n fields.map((field, index) => {\n if (index === 0) return;\n update(index, getValues('userProfiles.0'));\n });\n }\n });\n\n return () => {\n unsubscribe();\n };\n }, [fields]);\n\n useEffect(() => {\n DataLayer.instance.sendCheckoutView(basketRows, basketAddonRows);\n }, []);\n\n const setOpenByIndex = (index: number, value: boolean) => {\n opens.splice(index, 1, value);\n setOpens(opens.slice(0));\n };\n\n return (\n <>\n {fields.map((field, index) => {\n const padInputName = (name: EUserProfileFormKey) => padInputNameByRoomNumber(name, index);\n const getValidationClass = (name: EUserProfileFormKey) => {\n if (!errors.userProfiles || (copyCheckBox && index >= 1)) return null;\n if (errors.userProfiles[index]?.[name]) {\n return 'error';\n } else {\n return 'success';\n }\n };\n\n const openExpandable = () => {\n if (index !== 0) {\n setOpenByIndex(index, !opens[index]);\n }\n };\n\n const basketRow = basketRows[index];\n\n const isDisabled = (copyCheckBox && index >= 1) || paymentMethod === EBookingPaymentMethod.Planpay;\n\n return (\n <div key={field.id}>\n <div className={index === 0 ? '' : 'u-marg-bottom--heavy'}>\n <div className=\"u-marg-bottom\" onClick={openExpandable}>\n <div className=\"u-flex u-marg-bottom align-items-center\">\n <Headline bold={true}>\n {t(Translation.Misc.Room)} {index + 1}\n </Headline>\n {index !== 0 && <Icon icon={opens[index] ? IconType.ArrowDown2 : IconType.ArrowUp2} color={Color.Grey} />}\n </div>\n {basketRow && (\n <div className=\"u-marg-bottom\">\n <Text>\n <strong className=\"u-block@l-\">{basketRow.getRoom().name}</strong> for{' '}\n {StringHelper.pluralWithDictAndCount(basketRow.getAdults(), Translation.Step.Date.Adult, t)}\n ,&nbsp;\n {StringHelper.pluralWithDictAndCount(basketRow.getChildren(), Translation.Step.Date.Child, t)}\n </Text>\n <div className=\"step-one-status--dates u-flex justify-content-start\">\n <Text type={TextType.Small} color={Color.Accent}>\n <strong>{basketRow.getStartDate().format('ddd, MMM D')}</strong>\n </Text>\n <Icon icon={IconType.ArrowRight2} size={'18px'} />\n <Text type={TextType.Small} color={Color.Accent}>\n <strong>{basketRow.getEndDate().format('ddd, MMM D')}</strong>\n </Text>\n </div>\n </div>\n )}\n {errors.userProfiles?.[index] &&\n formState.submitCount >= 1 &&\n (index === 0 || !copyCheckBox) &&\n Object.values(errors.userProfiles[index]).map((error: FieldError, errorIndex) => {\n return (\n <AutoAutoHeight key={errorIndex} open>\n <div className=\"u-flex\">\n <Alert\n icon={IconType.Error}\n type={AlertType.Danger}\n noMargin={errorIndex === Object.keys(errors.userProfiles[index]).length - 1}\n >\n <Text type={TextType.Small}>{error?.message}</Text>\n </Alert>\n </div>\n </AutoAutoHeight>\n );\n })}\n </div>\n <div className=\"room-contact-details--row\" style={{ maxHeight: opens[index] ? '' : 0 }}>\n <div className=\"u-marg-bottom--heavy\">\n <div className=\"u-marg-bottom--light\">\n <Text type={TextType.Small}>\n <strong>{t(Translation.Step.Confirmation.ContactInfo)}</strong>\n </Text>\n </div>\n <InputGroup dimensions=\"2/2\">\n <TextBox\n inputProps={{\n disabled: isDisabled,\n }}\n placeholder={t(Translation.Step.Confirmation.Inputs.Forename) + ' *'}\n wide={true}\n required={true}\n validationStatus={getValidationClass(EUserProfileFormKey.Forename)}\n {...register(padInputName(EUserProfileFormKey.Forename), {\n onChange: onInputChange(padInputName(EUserProfileFormKey.Forename), 'Forename - Contact Info'),\n required: {\n value: true,\n message: t(Translation.Step.Confirmation.Inputs.Required, { field: t(Translation.Step.Confirmation.Inputs.Forename) }),\n },\n })}\n />\n <TextBox\n inputProps={{\n disabled: isDisabled,\n }}\n placeholder={t(Translation.Step.Confirmation.Inputs.Surname) + ' *'}\n wide={true}\n required={true}\n validationStatus={getValidationClass(EUserProfileFormKey.Surname)}\n {...register(padInputName(EUserProfileFormKey.Surname), {\n onChange: onInputChange(padInputName(EUserProfileFormKey.Surname), 'Surname - Contact Info'),\n required: {\n value: true,\n message: t(Translation.Step.Confirmation.Inputs.Required, { field: t(Translation.Step.Confirmation.Inputs.Surname) }),\n },\n })}\n />\n </InputGroup>\n\n <InputGroup dimensions={'2/2'}>\n <TextBox\n inputProps={{\n disabled: isDisabled,\n }}\n placeholder={t(Translation.Step.Confirmation.Inputs.Email) + ' *'}\n wide={true}\n validationStatus={getValidationClass(EUserProfileFormKey.Email)}\n required={true}\n {...register(padInputName(EUserProfileFormKey.Email), {\n onChange: onInputChange(padInputName(EUserProfileFormKey.Email), 'Email - Contact Info'),\n required: {\n value: true,\n message: t(Translation.Step.Confirmation.Inputs.Required, { field: t(Translation.Step.Confirmation.Inputs.Email) }),\n },\n pattern: {\n value: EMAIL_REGEX,\n message: t(Translation.Step.Confirmation.Inputs.InvalidEmail),\n },\n })}\n />\n {E164PhoneNumberFieldFeature.isActive() ? (\n <Controller\n control={control}\n name={padInputName(EUserProfileFormKey.Phone)}\n rules={{\n required: {\n value: true,\n message: t(Translation.Step.Confirmation.Inputs.Required, { field: t(Translation.Step.Confirmation.Inputs.Phone) }),\n },\n minLength: {\n value: 5,\n message: 'Phone number is required',\n },\n maxLength: {\n value: 17,\n message: 'Phone number is too long',\n },\n pattern: {\n value: /^[1-9]( |\\d){1,15}$/g,\n message: 'Incorrect phone number entered',\n },\n }}\n render={({ field }) => {\n return (\n <EnhancedPhoneNumberField\n disabled={isDisabled}\n validationStatus={getValidationClass(EUserProfileFormKey.Phone)}\n {...field}\n onChange={(e: any) => {\n field.onChange(e);\n onInputChange(padInputName(EUserProfileFormKey.Phone), 'Phone - Contact Info')(e);\n }}\n />\n );\n }}\n />\n ) : (\n <TextBox\n inputProps={{\n disabled: isDisabled,\n }}\n placeholder={t(Translation.Step.Confirmation.Inputs.Phone) + ' *'}\n wide={true}\n required={true}\n validationStatus={getValidationClass(EUserProfileFormKey.Phone)}\n {...register(padInputName(EUserProfileFormKey.Phone), {\n onChange: onInputChange(padInputName(EUserProfileFormKey.Phone), 'Phone - Contact Info'),\n required: {\n value: true,\n message: t(Translation.Step.Confirmation.Inputs.Required, { field: t(Translation.Step.Confirmation.Inputs.Phone) }),\n },\n })}\n />\n )}\n </InputGroup>\n </div>\n <div className=\"\">\n <div className=\"u-marg-bottom--light\">\n <Text type={TextType.Small}>\n <strong>{t(Translation.Step.Confirmation.Address)}</strong>\n </Text>\n </div>\n\n <InputGroup dimensions={'3/1'}>\n <TextBox\n inputProps={{\n disabled: isDisabled,\n }}\n placeholder={t(Translation.Step.Confirmation.Inputs.Address) + ' *'}\n wide={true}\n required={true}\n validationStatus={getValidationClass(EUserProfileFormKey.Address)}\n {...register(padInputName(EUserProfileFormKey.Address), {\n onChange: onInputChange(padInputName(EUserProfileFormKey.Address), 'Address - Address'),\n required: {\n value: true,\n message: t(Translation.Step.Confirmation.Inputs.Required, { field: t(Translation.Step.Confirmation.Inputs.Address) }),\n },\n })}\n />\n <TextBox\n inputProps={{\n disabled: isDisabled,\n }}\n placeholder={t(Translation.Step.Confirmation.Inputs.City) + ' *'}\n wide={true}\n required={true}\n validationStatus={getValidationClass(EUserProfileFormKey.City)}\n {...register(padInputName(EUserProfileFormKey.City), {\n onChange: onInputChange(padInputName(EUserProfileFormKey.City), 'City - Address'),\n required: {\n value: true,\n message: t(Translation.Step.Confirmation.Inputs.Required, { field: t(Translation.Step.Confirmation.Inputs.City) }),\n },\n })}\n />\n </InputGroup>\n <InputGroup dimensions={'2/2'}>\n <TextBox\n inputProps={{\n disabled: isDisabled,\n }}\n placeholder={t(Translation.Step.Confirmation.Inputs.PostCode) + ' *'}\n wide={true}\n required={true}\n validationStatus={getValidationClass(EUserProfileFormKey.PostCode)}\n {...register(padInputName(EUserProfileFormKey.PostCode), {\n onChange: onInputChange(padInputName(EUserProfileFormKey.PostCode), 'PostCode - Address'),\n required: {\n value: true,\n message: t(Translation.Step.Confirmation.Inputs.Required, { field: t(Translation.Step.Confirmation.Inputs.PostCode) }),\n },\n })}\n />\n <Controller\n control={control}\n name={padInputName(EUserProfileFormKey.Country)}\n rules={{\n required: {\n value: true,\n message: t(Translation.Step.Confirmation.Inputs.Required, { field: t(Translation.Step.Confirmation.Inputs.Country) }),\n },\n }}\n render={({ field }) => {\n const { ref, onChange, ...rest } = field;\n return (\n <StepConfirmationCountrySelector\n disabled={isDisabled}\n validationStatus={getValidationClass(EUserProfileFormKey.Country)}\n onChange={(e) => {\n onChange(e);\n onInputChange(padInputName(EUserProfileFormKey.Country), 'Country - Address')(e);\n }}\n {...rest}\n />\n );\n }}\n />\n </InputGroup>\n </div>\n </div>\n <LineBreak />\n </div>\n {fields.length > 1 && index === 0 ? (\n <div className=\"u-marg-bottom--heavy\">\n <Checkbox label={t(Translation.Step.Confirmation.ApplySameInfoToOtherRooms)} {...register('copyCheckBox')} />\n </div>\n ) : null}\n </div>\n );\n })}\n </>\n );\n};\n\nexport default RoomContactDetails;\n"]}
@@ -27,16 +27,16 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
27
27
  };
28
28
  Object.defineProperty(exports, "__esModule", { value: true });
29
29
  const React = __importStar(require("react"));
30
- const Headline_1 = __importDefault(require("../../../../components/generic/Headline"));
30
+ const Headline_1 = __importDefault(require("../../generic/Headline"));
31
31
  const Translation_1 = require("translations/Translation");
32
- const Text_1 = __importStar(require("../../../../components/generic/Text"));
32
+ const Text_1 = __importStar(require("../../generic/Text"));
33
33
  const react_i18next_1 = require("react-i18next");
34
- const Checkbox_1 = __importDefault(require("../../../../components/generic/Checkbox/Checkbox"));
35
- const Color_1 = require("../../../../util/Color");
36
- const AutoAutoHeight_1 = __importDefault(require("animations/AutoAutoHeight"));
37
- const Alert_1 = __importStar(require("../../../../components/generic/Alert"));
38
- const Icon_1 = require("../../../../components/generic/Icon/Icon");
39
- const hooks_1 = require("../../../../hooks/index.js");
34
+ const Checkbox_1 = __importDefault(require("../../generic/Checkbox/Checkbox"));
35
+ const Color_1 = require("../../../util/Color");
36
+ const AutoAutoHeight_1 = __importDefault(require("../../../animations/AutoAutoHeight"));
37
+ const Alert_1 = __importStar(require("../../generic/Alert"));
38
+ const Icon_1 = require("../../generic/Icon/Icon");
39
+ const hooks_1 = require("../../../hooks/index.js");
40
40
  const ConfirmationVerifyFeature_1 = __importDefault(require("../../../providers/feature/ConfirmationVerifyFeature"));
41
41
  const react_hook_form_1 = require("react-hook-form");
42
42
  const StepConfirmationAcknowledgement = () => {
@@ -1 +1 @@
1
- {"version":3,"file":"StepConfirmationAcknowledgement.js","sourceRoot":"/","sources":["src/components/steps/confirmation/StepConfirmationAcknowledgement.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,6CAA+B;AAE/B,6EAAqD;AACrD,0DAAuD;AACvD,kEAA2D;AAC3D,iDAA+C;AAC/C,sFAA8D;AAC9D,wCAAqC;AACrC,+EAAuD;AACvD,oEAA8D;AAC9D,yDAA0D;AAC1D,2CAAkD;AAClD,qHAA6F;AAC7F,qDAA6D;AAG7D,MAAM,+BAA+B,GAAO,GAAG,EAAE;;IAC7C,MAAM,EAAE,CAAC,EAAE,GAAG,IAAA,8BAAc,GAAE,CAAC;IAC/B,MAAM,EAAE,KAAK,EAAE,GAAG,IAAA,uBAAe,GAAE,CAAC;IACpC,MAAM,EAAE,OAAO,EAAE,aAAa,EAAE,GAAG,IAAA,gCAAc,GAA0B,CAAC;IAC5E,MAAM,uBAAuB,GAAG,MAAA,aAAa,CAAC,mBAAmB,CAAC,CAAC,KAAK,0CAAE,OAAO,CAAC;IAElF,OAAO,CACH;QACI,6BAA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C9B,oBAAC,eAAK,IAAC,IAAI,EAAE,iBAAS,CAAC,MAAM,EAAE,IAAI,EAAE,eAAQ,CAAC,KAAK;oBAC/C,oBAAC,cAAI,IAAC,IAAI,EAAE,eAAQ,CAAC,KAAK,IAAG,uBAAuB,CAAQ,CACxD,CACN,CACO,CAClB,CACN,CAAC;AACN,CAAC,CAAC;AAEF,kBAAe,+BAA+B,CAAC","sourcesContent":["import * as React from 'react';\nimport { FC } from 'react';\nimport Headline from '@/components/generic/Headline';\nimport { Translation } from 'translations/Translation';\nimport Text, { TextType } from '@/components/generic/Text';\nimport { useTranslation } from 'react-i18next';\nimport Checkbox from '@/components/generic/Checkbox/Checkbox';\nimport { Color } from '@/util/Color';\nimport AutoAutoHeight from 'animations/AutoAutoHeight';\nimport Alert, { AlertType } from '@/components/generic/Alert';\nimport { IconType } from '@/components/generic/Icon/Icon';\nimport { useCurrentHotel } from '@frontend/hooks';\nimport ConfirmationVerifyFeature from '../../../providers/feature/ConfirmationVerifyFeature';\nimport { Controller, useFormContext } from 'react-hook-form';\nimport { ConfirmationFormValues } from '../../../models/Confirmation';\n\nconst StepConfirmationAcknowledgement: FC = () => {\n const { t } = useTranslation();\n const { hotel } = useCurrentHotel();\n const { control, getFieldState } = useFormContext<ConfirmationFormValues>();\n const confirmationPolicyError = getFieldState('isPolicyConfirmed').error?.message;\n\n return (\n <>\n <div className=\"u-marg-bottom\">\n <Headline bold={true}>{t(Translation.Step.Confirmation.Acknowledgement)}</Headline>\n </div>\n <div>\n <Checkbox label={t(Translation.Step.Confirmation.EmailSpecialOffers)} />\n </div>\n <div className=\"u-marg-top--light\">\n <Controller\n control={control}\n render={({ field: { value, onChange, ref } }) => (\n <Checkbox\n checked={value}\n onChange={onChange}\n ref={ref}\n label={\n <div>\n {t(Translation.Step.Confirmation.IHaveUnderstoodPrivacyPolicy)}{' '}\n <a style={{ color: Color.Accent }} className=\"--underlined\" href={hotel.privacyPolicyUrl} target=\"_blank\" rel=\"noreferrer\">\n {t(Translation.Step.Confirmation.PrivacyPolicy)}\n </a>\n </div>\n }\n />\n )}\n name=\"isPolicyConfirmed\"\n rules={{\n required: {\n value: ConfirmationVerifyFeature.isActive(),\n message: t(Translation.Step.Confirmation.PrivacyPolicyError),\n },\n }}\n />\n </div>\n <AutoAutoHeight open={!!confirmationPolicyError}>\n <div className=\"u-flex u-marg-top\">\n <Alert type={AlertType.Danger} icon={IconType.Error}>\n <Text type={TextType.Small}>{confirmationPolicyError}</Text>\n </Alert>\n </div>\n </AutoAutoHeight>\n </>\n );\n};\n\nexport default StepConfirmationAcknowledgement;\n"]}
1
+ {"version":3,"file":"StepConfirmationAcknowledgement.js","sourceRoot":"/","sources":["src/components/steps/confirmation/StepConfirmationAcknowledgement.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,6CAA+B;AAE/B,6EAAqD;AACrD,0DAAuD;AACvD,kEAA2D;AAC3D,iDAA+C;AAC/C,sFAA8D;AAC9D,wCAAqC;AACrC,iFAAyD;AACzD,oEAA8D;AAC9D,yDAA0D;AAC1D,2CAAkD;AAClD,qHAA6F;AAC7F,qDAA6D;AAG7D,MAAM,+BAA+B,GAAO,GAAG,EAAE;;IAC7C,MAAM,EAAE,CAAC,EAAE,GAAG,IAAA,8BAAc,GAAE,CAAC;IAC/B,MAAM,EAAE,KAAK,EAAE,GAAG,IAAA,uBAAe,GAAE,CAAC;IACpC,MAAM,EAAE,OAAO,EAAE,aAAa,EAAE,GAAG,IAAA,gCAAc,GAA0B,CAAC;IAC5E,MAAM,uBAAuB,GAAG,MAAA,aAAa,CAAC,mBAAmB,CAAC,CAAC,KAAK,0CAAE,OAAO,CAAC;IAElF,OAAO,CACH;QACI,6BAAK,SAAS,EAAC,eAAe;YAC1B,oBAAC,kBAAQ,IAAC,IAAI,EAAE,IAAI,IAAG,CAAC,CAAC,yBAAW,CAAC,IAAI,CAAC,YAAY,CAAC,eAAe,CAAC,CAAY,CACjF;QACN;YACI,oBAAC,k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,CAAQ,CACxD,CACN,CACO,CAClB,CACN,CAAC;AACN,CAAC,CAAC;AAEF,kBAAe,+BAA+B,CAAC","sourcesContent":["import * as React from 'react';\nimport { FC } from 'react';\nimport Headline from '@/components/generic/Headline';\nimport { Translation } from 'translations/Translation';\nimport Text, { TextType } from '@/components/generic/Text';\nimport { useTranslation } from 'react-i18next';\nimport Checkbox from '@/components/generic/Checkbox/Checkbox';\nimport { Color } from '@/util/Color';\nimport AutoAutoHeight from '@/animations/AutoAutoHeight';\nimport Alert, { AlertType } from '@/components/generic/Alert';\nimport { IconType } from '@/components/generic/Icon/Icon';\nimport { useCurrentHotel } from '@frontend/hooks';\nimport ConfirmationVerifyFeature from '../../../providers/feature/ConfirmationVerifyFeature';\nimport { Controller, useFormContext } from 'react-hook-form';\nimport { ConfirmationFormValues } from '../../../models/Confirmation';\n\nconst StepConfirmationAcknowledgement: FC = () => {\n const { t } = useTranslation();\n const { hotel } = useCurrentHotel();\n const { control, getFieldState } = useFormContext<ConfirmationFormValues>();\n const confirmationPolicyError = getFieldState('isPolicyConfirmed').error?.message;\n\n return (\n <>\n <div className=\"u-marg-bottom\">\n <Headline bold={true}>{t(Translation.Step.Confirmation.Acknowledgement)}</Headline>\n </div>\n <div>\n <Checkbox label={t(Translation.Step.Confirmation.EmailSpecialOffers)} />\n </div>\n <div className=\"u-marg-top--light\">\n <Controller\n control={control}\n render={({ field: { value, onChange, ref } }) => (\n <Checkbox\n checked={value}\n onChange={onChange}\n ref={ref}\n label={\n <div>\n {t(Translation.Step.Confirmation.IHaveUnderstoodPrivacyPolicy)}{' '}\n <a style={{ color: Color.Accent }} className=\"--underlined\" href={hotel.privacyPolicyUrl} target=\"_blank\" rel=\"noreferrer\">\n {t(Translation.Step.Confirmation.PrivacyPolicy)}\n </a>\n </div>\n }\n />\n )}\n name=\"isPolicyConfirmed\"\n rules={{\n required: {\n value: ConfirmationVerifyFeature.isActive(),\n message: t(Translation.Step.Confirmation.PrivacyPolicyError),\n },\n }}\n />\n </div>\n <AutoAutoHeight open={!!confirmationPolicyError}>\n <div className=\"u-flex u-marg-top\">\n <Alert type={AlertType.Danger} icon={IconType.Error}>\n <Text type={TextType.Small}>{confirmationPolicyError}</Text>\n </Alert>\n </div>\n </AutoAutoHeight>\n </>\n );\n};\n\nexport default StepConfirmationAcknowledgement;\n"]}
@@ -1,4 +1,4 @@
1
- import BasketRowDifferences from '../../../../models/BasketRowDifferences';
1
+ import BasketRowDifferences from '../../../models/BasketRowDifferences';
2
2
  interface StepConfirmationCheckoutDifferencesModalProps {
3
3
  differences: BasketRowDifferences[];
4
4
  warnings: string[];
@@ -27,19 +27,19 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
27
27
  };
28
28
  Object.defineProperty(exports, "__esModule", { value: true });
29
29
  const React = __importStar(require("react"));
30
- const SimpleModal_1 = __importStar(require("../../../../components/generic/modal/SimpleModal"));
31
- const BEButton_1 = __importDefault(require("../../../../components/generic/BEButton"));
32
- const Currency_1 = __importDefault(require("../../../../components/generic/Currency"));
33
- const Text_1 = __importStar(require("../../../../components/generic/Text"));
34
- const Color_1 = require("../../../../util/Color");
30
+ const SimpleModal_1 = __importStar(require("../../generic/modal/SimpleModal"));
31
+ const BEButton_1 = __importDefault(require("../../generic/BEButton"));
32
+ const Currency_1 = __importDefault(require("../../generic/Currency"));
33
+ const Text_1 = __importStar(require("../../generic/Text"));
34
+ const Color_1 = require("../../../util/Color");
35
35
  const react_1 = require("react");
36
- const contexts_1 = require("../../../../contexts/index.js");
37
- const Headline_1 = __importDefault(require("../../../../components/generic/Headline"));
38
- const LineBreak_1 = __importDefault(require("../../../../components/generic/LineBreak"));
39
- const Icon_1 = require("../../../../components/generic/Icon/Icon");
40
- const Countdown_1 = __importDefault(require("../../../../components/generic/Countdown"));
36
+ const contexts_1 = require("../../../contexts/index.js");
37
+ const Headline_1 = __importDefault(require("../../generic/Headline"));
38
+ const LineBreak_1 = __importDefault(require("../../generic/LineBreak"));
39
+ const Icon_1 = require("../../generic/Icon/Icon");
40
+ const Countdown_1 = __importDefault(require("../../generic/Countdown"));
41
41
  const dayjs_1 = __importDefault(require("dayjs"));
42
- const Pill_1 = __importStar(require("../../../../components/generic/Pill"));
42
+ const Pill_1 = __importStar(require("../../generic/Pill"));
43
43
  function StepConfirmationCheckoutDifferencesModal(props) {
44
44
  var _a, _b;
45
45
  const basketContext = (0, react_1.useContext)(contexts_1.BasketContext);
@@ -1,4 +1,4 @@
1
- import { TextAreaProps } from '../../../../components/generic/TextArea';
1
+ import { TextAreaProps } from '../../generic/TextArea';
2
2
  export interface StepConfirmationCommentsComponentProps extends Omit<TextAreaProps, 'placeholder'> {
3
3
  inputRef: any;
4
4
  }
@@ -40,11 +40,11 @@ Object.defineProperty(exports, "__esModule", { value: true });
40
40
  exports.StepConfirmationCommentsComponent = exports.BE_CONFIRMATION_COMMENTS_BLOCK = void 0;
41
41
  const React = __importStar(require("react"));
42
42
  const react_i18next_1 = require("react-i18next");
43
- const DIProvider_1 = require("../../../../providers/DIProvider");
43
+ const DIProvider_1 = require("../../../providers/DIProvider");
44
44
  const Translation_1 = require("translations/Translation");
45
- const Headline_1 = __importDefault(require("../../../../components/generic/Headline"));
46
- const LineBreak_1 = __importDefault(require("../../../../components/generic/LineBreak"));
47
- const TextArea_1 = __importDefault(require("../../../../components/generic/TextArea"));
45
+ const Headline_1 = __importDefault(require("../../generic/Headline"));
46
+ const LineBreak_1 = __importDefault(require("../../generic/LineBreak"));
47
+ const TextArea_1 = __importDefault(require("../../generic/TextArea"));
48
48
  const OriginalComponent = (_a) => {
49
49
  var { inputRef } = _a, rest = __rest(_a, ["inputRef"]);
50
50
  const { t } = (0, react_i18next_1.useTranslation)();
@@ -30,9 +30,9 @@ const classnames_1 = __importDefault(require("classnames"));
30
30
  const React = __importStar(require("react"));
31
31
  const react_1 = require("react");
32
32
  const react_i18next_1 = require("react-i18next");
33
- const CountryCodesAndNumbers_1 = require("../../../../models/CountryCodesAndNumbers");
33
+ const CountryCodesAndNumbers_1 = require("../../../models/CountryCodesAndNumbers");
34
34
  const Translation_1 = require("translations/Translation");
35
- const Icon_1 = __importStar(require("../../../../components/generic/Icon/Icon"));
35
+ const Icon_1 = __importStar(require("../../generic/Icon/Icon"));
36
36
  require("./StepConfirmationCountrySelector.global.scss");
37
37
  const AutoFocusOnSelect_1 = require("../../../hooks/AutoFocusOnSelect");
38
38
  const Select_1 = require("../../generic/Select/Select");