@roomstay/frontend 2.6.77-0 → 2.6.77
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{451.bundle.js → 151.bundle.js} +1 -1
- package/dist/177.bundle.js +1 -0
- package/dist/279.bundle.js +1 -0
- package/dist/288.bundle.js +1 -0
- package/dist/370.bundle.js +1 -0
- package/dist/430.bundle.js +1 -0
- package/dist/439.bundle.js +1 -0
- package/dist/446.bundle.js +1 -0
- package/dist/449.bundle.js +1 -0
- package/dist/535.bundle.js +2 -0
- package/dist/{349.bundle.js.LICENSE.txt → 535.bundle.js.LICENSE.txt} +1 -1
- package/dist/537.bundle.js +1 -0
- package/dist/619.bundle.js +1 -0
- package/dist/625.bundle.js +1 -0
- package/dist/659.bundle.js +1 -0
- package/dist/686.bundle.js +1 -0
- package/dist/873.bundle.js +1 -0
- package/dist/972.bundle.js +1 -0
- package/dist/978.bundle.js +1 -0
- package/dist/984.bundle.js +1 -0
- package/dist/main.bundle.js +1 -1
- package/dist/src/animations/AutoAutoHeight.d.ts +1 -1
- package/dist/src/api/HotelAPI.d.ts +0 -2
- package/dist/src/api/HotelAPI.js +0 -7
- package/dist/src/api/HotelAPI.js.map +1 -1
- package/dist/src/api/ReservationAPI.js +9 -12
- package/dist/src/api/ReservationAPI.js.map +1 -1
- package/dist/src/components/User/Forms/ForgotPasswordForm.d.ts +1 -2
- package/dist/src/components/User/Forms/SignUpForm.d.ts +1 -2
- package/dist/src/components/User/Forms/VerifyEmailForm.d.ts +1 -2
- package/dist/src/components/generic/AgedBetweenLabel/AgedBetweenLabel.d.ts +1 -2
- package/dist/src/components/generic/Alert.d.ts +2 -2
- package/dist/src/components/generic/BEButton.d.ts +1 -1
- package/dist/src/components/generic/BackButton.d.ts +1 -2
- package/dist/src/components/generic/BookingWizard/BookingWizard.d.ts +0 -1
- package/dist/src/components/generic/BookingWizard/BookingWizard.js +1 -7
- package/dist/src/components/generic/BookingWizard/BookingWizard.js.map +1 -1
- package/dist/src/components/generic/BookingWizard/BookingWizardBottomSheet/BookingWizardBottomSheet.d.ts +2 -2
- package/dist/src/components/generic/BookingWizard/BookingWizardBottomSheet/BookingWizardBottomSheet.js +1 -0
- package/dist/src/components/generic/BookingWizard/BookingWizardBottomSheet/BookingWizardBottomSheet.js.map +1 -1
- package/dist/src/components/generic/BookingWizard/BookingWizardContent.d.ts +5 -14
- package/dist/src/components/generic/BookingWizard/BookingWizardContent.js +10 -24
- package/dist/src/components/generic/BookingWizard/BookingWizardContent.js.map +1 -1
- package/dist/src/components/generic/BookingWizard/BookingWizardDateSelector/BookingWizardDateSelector.js +1 -1
- package/dist/src/components/generic/BookingWizard/BookingWizardDateSelector/BookingWizardDateSelector.js.map +1 -1
- package/dist/src/components/generic/BookingWizard/BookingWizardHotelSelector/BookingWizardHotelSelector.d.ts +2 -10
- package/dist/src/components/generic/BookingWizard/BookingWizardHotelSelector/BookingWizardHotelSelector.js +22 -187
- package/dist/src/components/generic/BookingWizard/BookingWizardHotelSelector/BookingWizardHotelSelector.js.map +1 -1
- package/dist/src/components/generic/Card/IconNavCard/IconNavCard.d.ts +2 -2
- package/dist/src/components/generic/Countdown.d.ts +1 -2
- package/dist/src/components/generic/Currency.d.ts +1 -2
- package/dist/src/components/generic/DateRangePicker/DateRangePicker.d.ts +1 -2
- package/dist/src/components/generic/DateRangePicker/DateRangePickerDay.d.ts +1 -2
- package/dist/src/components/generic/DateRangePicker/DateRangePickerDays.d.ts +1 -2
- package/dist/src/components/generic/DateRangePicker/DateRangePickerMonth.d.ts +1 -2
- package/dist/src/components/generic/Distance.d.ts +1 -2
- package/dist/src/components/generic/Headline.d.ts +1 -1
- package/dist/src/components/generic/HtmlContentViewer.d.ts +1 -2
- package/dist/src/components/generic/InputGroup/InputGroup.d.ts +2 -2
- package/dist/src/components/generic/LineBreak.d.ts +1 -2
- package/dist/src/components/generic/Notification.d.ts +1 -1
- package/dist/src/components/generic/NumberIncrement.d.ts +1 -2
- package/dist/src/components/generic/Overlay/Overlay.d.ts +2 -2
- package/dist/src/components/generic/PageTitle/index.d.ts +1 -2
- package/dist/src/components/generic/PaymentCard/PaymentCard.d.ts +1 -2
- package/dist/src/components/generic/Pill.d.ts +1 -1
- package/dist/src/components/generic/Placeholder.d.ts +1 -2
- package/dist/src/components/generic/PromoCodeInput.d.ts +1 -2
- package/dist/src/components/generic/RecentSearchesCard.d.ts +1 -2
- package/dist/src/components/generic/RoomstayMark.d.ts +1 -2
- package/dist/src/components/generic/Select/Select.d.ts +1 -2
- package/dist/src/components/generic/Select/Select.js +2 -2
- package/dist/src/components/generic/Select/Select.js.map +1 -1
- package/dist/src/components/generic/Slider/Slider.d.ts +1 -1
- package/dist/src/components/generic/Tabs/TabRouteContainer.d.ts +2 -2
- package/dist/src/components/generic/Tooltip/Tooltip.d.ts +2 -2
- package/dist/src/components/generic/badging/SSLSecureBadge.d.ts +1 -2
- package/dist/src/components/generic/buttons/NextStepButton.d.ts +1 -2
- package/dist/src/components/generic/date/DatePicker.d.ts +1 -2
- package/dist/src/components/generic/date/DatePickerDay.d.ts +1 -2
- package/dist/src/components/generic/date/DatePickerDays.d.ts +1 -2
- package/dist/src/components/generic/date/DatePickerMonth.d.ts +1 -2
- package/dist/src/components/generic/date/DatePickerWeek.d.ts +1 -2
- package/dist/src/components/generic/date/FloatingDatePicker.d.ts +1 -1
- package/dist/src/components/generic/date/WeekViewSkeleton.d.ts +1 -2
- package/dist/src/components/generic/loader/ImageLoader.d.ts +1 -1
- package/dist/src/components/generic/loader/LargeLoader.d.ts +1 -2
- package/dist/src/components/generic/loader/OverlayLoader.d.ts +1 -2
- package/dist/src/components/generic/loader/SmallSpinner.d.ts +1 -2
- package/dist/src/components/generic/map/HotelLocationMap.d.ts +1 -2
- package/dist/src/components/generic/modal/ConfirmationModal.d.ts +1 -2
- package/dist/src/components/generic/modal/ErrorModal.d.ts +1 -1
- package/dist/src/components/generic/modal/SigninModal/UnauthenticatedUserModal.d.ts +1 -2
- package/dist/src/components/generic/modal/SimpleModal.d.ts +1 -1
- package/dist/src/components/generic/modal/TabbedModal.d.ts +1 -1
- package/dist/src/components/generic/radio/RadioFields.d.ts +1 -2
- package/dist/src/components/graphics/TravelerNotfound.d.ts +1 -2
- package/dist/src/components/iconComponents/BookNowPayLaterIcon.d.ts +1 -2
- package/dist/src/components/members/InlineSignUpSection.d.ts +1 -2
- package/dist/src/components/members/SignInModal/ExternalMemberModal.d.ts +1 -2
- package/dist/src/components/members/SignInModal/InternalMemberSignInModal.d.ts +1 -2
- package/dist/src/components/members/SignInModal/MemberPortalSignInModal.d.ts +1 -2
- package/dist/src/components/members/SignInModal/MemberSignInModal.d.ts +1 -2
- package/dist/src/components/navigation/Header.d.ts +1 -2
- package/dist/src/components/navigation/StepSelector.d.ts +1 -2
- package/dist/src/components/navigation/StepSelectorModal.d.ts +1 -2
- package/dist/src/components/pages/Account/Card/MemberCardItem.d.ts +1 -2
- package/dist/src/components/pages/PageColorComponent.d.ts +1 -2
- package/dist/src/components/reservation/ReservationItem.d.ts +1 -2
- package/dist/src/components/steps/DaysSelectedInformer.d.ts +1 -2
- package/dist/src/components/steps/MinimumNightStayPill.d.ts +1 -2
- package/dist/src/components/steps/addons/AddonCard.d.ts +1 -2
- package/dist/src/components/steps/addons/AddonList.d.ts +1 -2
- package/dist/src/components/steps/addons/AddonsNotFoundBlock.d.ts +1 -2
- package/dist/src/components/steps/common/CommonAddonSummary/CommonAddonSummary.d.ts +1 -2
- package/dist/src/components/steps/common/ItemisedFeesListing/ItemisedFeesListing.d.ts +1 -2
- package/dist/src/components/steps/common/ItemisedFeesSummary/ItemisedFeesSummary.d.ts +1 -2
- package/dist/src/components/steps/confirmation/AccountDetails.d.ts +1 -2
- package/dist/src/components/steps/confirmation/PaymentDetails/ExistingCardPicker.d.ts +1 -2
- package/dist/src/components/steps/confirmation/PaymentInformation.d.ts +1 -2
- package/dist/src/components/steps/confirmation/PlanpayLabel.d.ts +1 -2
- package/dist/src/components/steps/confirmation/StepConfirmationAcknowledgement.d.ts +1 -2
- package/dist/src/components/steps/confirmation/StepConfirmationAcknowledgement.js +10 -11
- package/dist/src/components/steps/confirmation/StepConfirmationAcknowledgement.js.map +1 -1
- package/dist/src/components/steps/confirmation/StepConfirmationCheckoutDifferencesModal.d.ts +1 -2
- package/dist/src/components/steps/confirmation/StepConfirmationCommentsComponent.d.ts +1 -2
- package/dist/src/components/steps/confirmation/StepConfirmationForm.d.ts +1 -2
- package/dist/src/components/steps/confirmation/StepConfirmationForm.js +4 -11
- package/dist/src/components/steps/confirmation/StepConfirmationForm.js.map +1 -1
- package/dist/src/components/steps/confirmation/StepConfirmationFormProvider.d.ts +1 -2
- package/dist/src/components/steps/confirmation/StepConfirmationLimitedOffer.d.ts +1 -2
- package/dist/src/components/steps/confirmation/StepConfirmationPoliciesSection.d.ts +1 -2
- package/dist/src/components/steps/confirmation/StepConfirmationPolicyBlock.d.ts +1 -2
- package/dist/src/components/steps/confirmation/additionalOffers/AdditionalOffers.d.ts +1 -2
- package/dist/src/components/steps/confirmation/additionalOffers/AdditionalOffersColumn.d.ts +1 -2
- package/dist/src/components/steps/confirmation/additionalOffers/AdditionalOffersModal.d.ts +1 -2
- package/dist/src/components/steps/date/OccupancyWarningBlock.d.ts +1 -2
- package/dist/src/components/steps/date/PeoplePicker.d.ts +1 -2
- package/dist/src/components/steps/date/PeoplePickerRow.d.ts +1 -2
- package/dist/src/components/steps/date/StepDatePricePerRoom.d.ts +1 -2
- package/dist/src/components/steps/date/StepOneDateRange.d.ts +1 -2
- package/dist/src/components/steps/date/StepOneDateRangePicker.d.ts +1 -2
- package/dist/src/components/steps/date/StepOneDateRangePickerLegend.d.ts +1 -2
- package/dist/src/components/steps/date/StepOneNextStepButton.d.ts +1 -2
- package/dist/src/components/steps/date/StepOneStatusPeople.d.ts +1 -2
- package/dist/src/components/steps/hotel/HotelCard.d.ts +1 -2
- package/dist/src/components/steps/hotel/HotelCardList.d.ts +1 -2
- package/dist/src/components/steps/hotel/HotelCardModal.d.ts +1 -2
- package/dist/src/components/steps/hotel/HotelInfoPerksRow.d.ts +1 -2
- package/dist/src/components/steps/hotel/HotelSearchParameters.d.ts +1 -2
- package/dist/src/components/steps/hotel/NoHotelsAvailable.d.ts +1 -2
- package/dist/src/components/steps/room/AvailableUpgradesModal.js +5 -0
- package/dist/src/components/steps/room/AvailableUpgradesModal.js.map +1 -1
- package/dist/src/components/steps/room/ImageGallerySlider.d.ts +1 -2
- package/dist/src/components/steps/room/InactivityWindow.d.ts +1 -2
- package/dist/src/components/steps/room/LargeRoomCard.d.ts +1 -2
- package/dist/src/components/steps/room/NoRoomsFoundBlock.d.ts +1 -2
- package/dist/src/components/steps/room/RatesNotFoundBlock.d.ts +1 -2
- package/dist/src/components/steps/room/RoomList.d.ts +1 -2
- package/dist/src/components/steps/room/RoomModal.d.ts +1 -2
- package/dist/src/components/steps/room/RoomModalPerkRow.d.ts +1 -2
- package/dist/src/components/steps/room/StepRoomAlertBlocks.d.ts +1 -2
- package/dist/src/components/steps/room/StepRoomBestRateAlert.d.ts +1 -2
- package/dist/src/components/steps/room/StepRoomErrorForm.d.ts +1 -2
- package/dist/src/components/steps/room/StepRoomHotelDetails.d.ts +1 -2
- package/dist/src/components/steps/room/StepRoomSortBy.d.ts +1 -2
- package/dist/src/components/steps/room/StepRoomSummaryAndButton.d.ts +1 -2
- package/dist/src/components/steps/room/TabGroupedRooms/TabGroupedRoomList.d.ts +1 -2
- package/dist/src/components/steps/room/TabGroupedRooms/TabGroupedRooms.d.ts +1 -2
- package/dist/src/components/steps/room/TripteaseLodgingSearchSchema.d.ts +1 -2
- package/dist/src/components/steps/room/UserSearchSummary/PromoCodeVerificationAlert.d.ts +1 -2
- package/dist/src/components/steps/room/UserSearchSummary/UserSearchSummary.d.ts +1 -2
- package/dist/src/components/steps/room/UserSearchSummary/UserSearchSummaryPromocodeInput.d.ts +1 -2
- package/dist/src/components/steps/room/UserSearchSummary/UserSearchSummaryRow.d.ts +1 -2
- package/dist/src/components/steps/room/roomBuilderProgress/NumberOfAdultsPicker.d.ts +1 -2
- package/dist/src/components/steps/room/roomBuilderProgress/NumberOfChildrenPicker.d.ts +1 -2
- package/dist/src/components/steps/room/roomBuilderProgress/NumberOfInfantsPicker.d.ts +1 -2
- package/dist/src/components/steps/room/roomBuilderProgress/RoomBuilderProgress.d.ts +1 -2
- package/dist/src/components/steps/room/roomBuilderProgress/RoomBuilderProgressRow.d.ts +1 -2
- package/dist/src/components/steps/room/roomDetails/RoomDetails.d.ts +1 -2
- package/dist/src/components/steps/room/roomDetails/RoomDetailsBedsBlock.d.ts +1 -2
- package/dist/src/components/steps/room/roomDetails/RoomDetailsPerkBlock.d.ts +1 -2
- package/dist/src/components/steps/room/roomDetails/RoomDetailsPriceBlock.d.ts +1 -2
- package/dist/src/components/steps/room/roomDetails/roomRates/BookNowButton.d.ts +1 -2
- package/dist/src/components/steps/room/roomDetails/roomRates/MembersOnlyRow.d.ts +1 -2
- package/dist/src/components/steps/room/roomDetails/roomRates/PriceBreakdownBlock.d.ts +2 -3
- package/dist/src/components/steps/room/roomDetails/roomRates/PriceBreakdownBlock.js +26 -15
- package/dist/src/components/steps/room/roomDetails/roomRates/PriceBreakdownBlock.js.map +1 -1
- package/dist/src/components/steps/room/roomDetails/roomRates/ReadMoreRoomRateRow.d.ts +1 -2
- package/dist/src/components/steps/room/roomDetails/roomRates/RoomRateDescriptionTab.d.ts +2 -3
- package/dist/src/components/steps/room/roomDetails/roomRates/RoomRateDetailsAndPriceBreakdownModal.d.ts +1 -2
- package/dist/src/components/steps/room/roomDetails/roomRates/RoomRateListPromotion/RoomRateListPromotion.d.ts +1 -2
- package/dist/src/components/steps/room/roomDetails/roomRates/RoomRatePills.d.ts +1 -2
- package/dist/src/components/steps/room/roomDetails/roomRates/RoomRateRow.d.ts +1 -2
- package/dist/src/components/steps/room/roomDetails/roomRates/RoomRates.d.ts +1 -2
- package/dist/src/components/steps/room/roomDetails/unavailableRoom/UnavailableRoom.d.ts +1 -2
- package/dist/src/components/steps/room/roomFilter/AppliedFiltersBlock.d.ts +1 -2
- package/dist/src/components/steps/room/roomFilter/RoomFilterOverlay.d.ts +1 -2
- package/dist/src/components/steps/room/roomFilter/RoomFilterPriceSlider.d.ts +1 -2
- package/dist/src/components/steps/room/roomFilter/RoomFilterRateType.d.ts +1 -2
- package/dist/src/components/steps/room/roomFilter/RoomFilterRoomType.d.ts +1 -2
- package/dist/src/components/summary/BEMobileSummary.d.ts +1 -2
- package/dist/src/components/summary/BEMobileSummaryModal.d.ts +1 -2
- package/dist/src/components/summary/BESummary.d.ts +1 -2
- package/dist/src/components/summary/BESummaryAddonRow.d.ts +1 -2
- package/dist/src/components/summary/BESummaryPerkBlock.d.ts +1 -2
- package/dist/src/components/summary/BESummaryPrivacyPolicy.d.ts +1 -2
- package/dist/src/components/summary/BESummaryRoomRow.d.ts +1 -2
- package/dist/src/components/summary/BESummaryRoomRow.js +1 -1
- package/dist/src/components/summary/BESummaryRoomRow.js.map +1 -1
- package/dist/src/components/summary/TransportDistanceFromHotelBlock.d.ts +1 -2
- package/dist/src/contexts/BasketContext/BasketContextWrapper.d.ts +1 -1
- package/dist/src/contexts/BasketContext/BasketContextWrapper.js +11 -63
- package/dist/src/contexts/BasketContext/BasketContextWrapper.js.map +1 -1
- package/dist/src/contexts/BookingEngineContext/BookingEngineContextWrapper.d.ts +1 -1
- package/dist/src/contexts/CompanyContext/CompanyContextWrapper.d.ts +2 -2
- package/dist/src/contexts/CompanyContext/CompanyContextWrapper.js +0 -1
- package/dist/src/contexts/CompanyContext/CompanyContextWrapper.js.map +1 -1
- package/dist/src/contexts/ConfirmationFormContext.d.ts +1 -1
- package/dist/src/contexts/ConfirmationStepContext/ConfirmationStepContextWrapper.js +2 -3
- package/dist/src/contexts/ConfirmationStepContext/ConfirmationStepContextWrapper.js.map +1 -1
- package/dist/src/contexts/ConfirmationStepContext/ConfirmationStepErrorModal.d.ts +1 -2
- package/dist/src/contexts/ErrorContext.d.ts +1 -1
- package/dist/src/contexts/FullPageEngineContext/EngineBodyLayout.d.ts +1 -2
- package/dist/src/contexts/FullPageEngineContext/EnginePageLayout.d.ts +1 -2
- package/dist/src/contexts/FullPageEngineContext/FullPageEngineContextWrapper.d.ts +1 -2
- package/dist/src/contexts/FullPageEngineContext/FullPageEngineContextWrapper.js +2 -10
- package/dist/src/contexts/FullPageEngineContext/FullPageEngineContextWrapper.js.map +1 -1
- package/dist/src/contexts/HotelOverridesContext.d.ts +1 -1
- package/dist/src/contexts/ModalContext.d.ts +1 -1
- package/dist/src/contexts/NotificationContext.d.ts +1 -1
- package/dist/src/engines/BookingWizardEngine/BookingWizardEngine.d.ts +0 -7
- package/dist/src/engines/BookingWizardEngine/BookingWizardEngine.js.map +1 -1
- package/dist/src/engines/BookingWizardEngine/BookingWizardEngineElement.d.ts +1 -2
- package/dist/src/engines/BookingWizardEngine/BookingWizardEngineElement.js +0 -1
- package/dist/src/engines/BookingWizardEngine/BookingWizardEngineElement.js.map +1 -1
- package/dist/src/engines/FullPageBookingEngine/FullPageBookingEngineElement.d.ts +1 -2
- package/dist/src/engines/InlineRoomMiniEngine/InlineRoomMiniEngineElement.d.ts +2 -2
- package/dist/src/engines/InlineRoomMiniEngine/InlineRoomMiniEngineElement.js +0 -3
- package/dist/src/engines/InlineRoomMiniEngine/InlineRoomMiniEngineElement.js.map +1 -1
- package/dist/src/engines/MemberPortalWidget/MemberPortalWidgetElement.d.ts +1 -2
- package/dist/src/engines/RecentSearchesEngine/RecentSearchesEngineElement.d.ts +1 -2
- package/dist/src/hooks/RoomRateAvailabilityListFromApi.js +0 -1
- package/dist/src/hooks/RoomRateAvailabilityListFromApi.js.map +1 -1
- package/dist/src/hooks/useNextStepAction.d.ts +1 -2
- package/dist/src/icons/Check.d.ts +1 -2
- package/dist/src/index.d.ts +0 -1
- package/dist/src/index.js +2 -4
- package/dist/src/index.js.map +1 -1
- package/dist/src/models/Api/HotelDTO.d.ts +0 -1
- package/dist/src/models/Api/HotelDTO.js.map +1 -1
- package/dist/src/models/BasketRow.d.ts +1 -2
- package/dist/src/models/BasketRow.js +2 -32
- package/dist/src/models/BasketRow.js.map +1 -1
- package/dist/src/models/BookingWizard/BookingWizardProperty.d.ts +0 -13
- package/dist/src/models/BookingWizard/BookingWizardProperty.js.map +1 -1
- package/dist/src/models/Client/Hotel/Hotel.d.ts +0 -1
- package/dist/src/models/Client/Hotel/Hotel.js.map +1 -1
- package/dist/src/models/Room/RoomRate.d.ts +3 -0
- package/dist/src/models/Room/RoomRate.js +6 -1
- package/dist/src/models/Room/RoomRate.js.map +1 -1
- package/dist/src/models/RoomstaySession.d.ts +0 -1
- package/dist/src/models/RoomstaySession.js.map +1 -1
- package/dist/src/pages/account/AccountHome/AccountHomePage.d.ts +1 -2
- package/dist/src/pages/account/AccountOutlet.d.ts +1 -1
- package/dist/src/pages/account/AccountRouter.d.ts +1 -2
- package/dist/src/pages/account/ChangePassword/AccountChangePasswordPage.d.ts +1 -2
- package/dist/src/pages/account/Details/AccountDetailsCardsPage.d.ts +1 -2
- package/dist/src/pages/account/Details/AccountDetailsProfilePage.d.ts +1 -2
- package/dist/src/pages/account/Help/AccountHelpPage.d.ts +1 -2
- package/dist/src/pages/account/Reservations/AccountReservationSinglePage.d.ts +1 -2
- package/dist/src/pages/account/Reservations/AccountReservationsPage.d.ts +1 -2
- package/dist/src/pages/findReservation/FindReservation.d.ts +1 -2
- package/dist/src/pages/findReservation/FindReservationResults.d.ts +1 -2
- package/dist/src/pages/findReservation/ReservationRow.d.ts +1 -2
- package/dist/src/pages/findReservation/ReservationRowModal.d.ts +1 -2
- package/dist/src/pages/hotel/HotelInfo.d.ts +1 -2
- package/dist/src/pages/hotel/HotelInfoPlaceholder.d.ts +1 -2
- package/dist/src/pages/steps/StepAddon/StepAddon.d.ts +1 -2
- package/dist/src/pages/steps/StepAddon/StepAddonComponent.d.ts +1 -2
- package/dist/src/pages/steps/StepAddon/StepAddonLoader.d.ts +1 -2
- package/dist/src/pages/steps/StepConfirmation/StepConfirmationComponent.d.ts +1 -2
- package/dist/src/pages/steps/StepConfirmation/StepConfirmationLoader.d.ts +1 -2
- package/dist/src/pages/steps/StepDate/StepDate.d.ts +1 -2
- package/dist/src/pages/steps/StepDate/StepDateComponent.d.ts +1 -2
- package/dist/src/pages/steps/StepGroupedRoom/StepGroupedRoomComponent.d.ts +1 -2
- package/dist/src/pages/steps/StepGroupedRoom/StepGroupedRoomLoader.d.ts +1 -2
- package/dist/src/pages/steps/StepGuide.d.ts +1 -1
- package/dist/src/pages/steps/StepHotel/StepHotel.d.ts +1 -2
- package/dist/src/pages/steps/StepHotel/StepHotelComponent.d.ts +1 -2
- package/dist/src/pages/steps/StepHotel/StepHotelLoader.d.ts +1 -2
- package/dist/src/pages/steps/StepRoom/StepRoomComponent.d.ts +1 -2
- package/dist/src/pages/steps/StepRoom/StepRoomLoader.d.ts +1 -2
- package/dist/src/pages/steps/StepThanks/StepThanksComponent.d.ts +1 -2
- package/dist/src/providers/DIProvider.d.ts +1 -2
- package/dist/src/providers/FeatureProvider.js +0 -2
- package/dist/src/providers/FeatureProvider.js.map +1 -1
- package/dist/src/providers/feature/Feature.d.ts +0 -2
- package/dist/src/providers/feature/Feature.js +0 -4
- package/dist/src/providers/feature/Feature.js.map +1 -1
- package/dist/src/providers/storage/SessionProvider.js +0 -2
- package/dist/src/providers/storage/SessionProvider.js.map +1 -1
- package/dist/src/routes/NaturallyProgressedStepRoute.d.ts +1 -2
- package/dist/src/stories/BookingWizard.stories.d.ts +1 -1
- package/dist/src/stories/ConfirmationModal.stories.d.ts +1 -2
- package/dist/src/stories/DateRangePicker.stories.d.ts +4 -5
- package/dist/src/stories/ErrorModal.stories.d.ts +1 -2
- package/dist/src/stories/EventCarousel.stories.d.ts +2 -2
- package/dist/src/stories/FloatingDateRangePicker.stories.d.ts +2 -2
- package/dist/src/stories/IconNavCard.stories.d.ts +2 -2
- package/dist/src/stories/NumberIncrement.stories.d.ts +1 -2
- package/dist/src/stories/PaymentCard.stories.d.ts +2 -3
- package/dist/src/stories/RadioButtonGroup.stories.d.ts +3 -3
- package/dist/src/stories/Select.stories.d.ts +3 -3
- package/dist/src/stories/SimpleModal.stories.d.ts +1 -2
- package/dist/src/stories/Slider.stories.d.ts +2 -3
- package/dist/src/stories/TabbedModal.stories.d.ts +1 -2
- package/dist/src/stories/Tabs.stories.d.ts +1 -1
- package/dist/src/translations/Translation.d.ts +1 -6
- package/dist/src/translations/Translation.js +1 -6
- package/dist/src/translations/Translation.js.map +1 -1
- package/dist/src/translations/languages/en-gb.js +1 -6
- package/dist/src/translations/languages/en-gb.js.map +1 -1
- package/dist/src/util/TotalCalculator.js.map +1 -1
- package/dist/test.bundle.js +1 -1
- package/dist/tests/offline/entry/config/hotelSpecDefault.d.ts +1 -2
- package/dist/vendors.bundle.js +1 -1
- package/dist/vendors.bundle.js.LICENSE.txt +6 -6
- package/package.json +2 -2
- package/dist/153.bundle.js +0 -1
- package/dist/176.bundle.js +0 -1
- package/dist/273.bundle.js +0 -1
- package/dist/292.bundle.js +0 -1
- package/dist/316.bundle.js +0 -1
- package/dist/349.bundle.js +0 -2
- package/dist/352.bundle.js +0 -1
- package/dist/41.bundle.js +0 -1
- package/dist/479.bundle.js +0 -1
- package/dist/534.bundle.js +0 -1
- package/dist/557.bundle.js +0 -1
- package/dist/620.bundle.js +0 -1
- package/dist/696.bundle.js +0 -1
- package/dist/734.bundle.js +0 -1
- package/dist/83.bundle.js +0 -1
- package/dist/910.bundle.js +0 -1
- package/dist/922.bundle.js +0 -1
- package/dist/99.bundle.js +0 -1
- package/dist/src/components/steps/confirmation/StepConfirmationImportantInformation.d.ts +0 -7
- package/dist/src/components/steps/confirmation/StepConfirmationImportantInformation.js +0 -54
- package/dist/src/components/steps/confirmation/StepConfirmationImportantInformation.js.map +0 -1
- package/dist/src/providers/feature/ConfirmationImportantInformationFeature.d.ts +0 -10
- package/dist/src/providers/feature/ConfirmationImportantInformationFeature.js +0 -13
- package/dist/src/providers/feature/ConfirmationImportantInformationFeature.js.map +0 -1
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
1
|
export declare enum EFindReservationPath {
|
|
3
2
|
FindReservation = "find-reservation",
|
|
4
3
|
Login = "login",
|
|
5
4
|
Register = "register",
|
|
6
5
|
Forgot = "forgot"
|
|
7
6
|
}
|
|
8
|
-
export default function FindReservation():
|
|
7
|
+
export default function FindReservation(): JSX.Element;
|
|
@@ -1,2 +1 @@
|
|
|
1
|
-
|
|
2
|
-
export default function FindReservationResults(): React.JSX.Element;
|
|
1
|
+
export default function FindReservationResults(): JSX.Element;
|
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
1
|
import { ReservationDTO } from '../../models/Api/ReservationsDTO';
|
|
3
2
|
interface ReservationRowProps {
|
|
4
3
|
reservation: ReservationDTO;
|
|
5
4
|
onCancelled?: () => void;
|
|
6
5
|
}
|
|
7
|
-
export default function ReservationRow(props: ReservationRowProps):
|
|
6
|
+
export default function ReservationRow(props: ReservationRowProps): JSX.Element;
|
|
8
7
|
export {};
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
1
|
import { ReservationDTO } from '../../models/Api/ReservationsDTO';
|
|
3
2
|
interface ReservationRowModalProps {
|
|
4
3
|
reservation: ReservationDTO;
|
|
@@ -6,5 +5,5 @@ interface ReservationRowModalProps {
|
|
|
6
5
|
open: boolean;
|
|
7
6
|
images?: string[];
|
|
8
7
|
}
|
|
9
|
-
export default function ReservationRowModal(props: ReservationRowModalProps):
|
|
8
|
+
export default function ReservationRowModal(props: ReservationRowModalProps): JSX.Element;
|
|
10
9
|
export {};
|
|
@@ -1,2 +1 @@
|
|
|
1
|
-
|
|
2
|
-
export default function HotelInfo(): React.JSX.Element;
|
|
1
|
+
export default function HotelInfo(): JSX.Element;
|
|
@@ -1,2 +1 @@
|
|
|
1
|
-
|
|
2
|
-
export default function HotelInfoPlaceholder(): React.JSX.Element;
|
|
1
|
+
export default function HotelInfoPlaceholder(): JSX.Element;
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
import { IHotelColorScheme } from '@roomstay/core';
|
|
3
2
|
import { Company } from '../../../models/Client/Hotel/Company';
|
|
4
3
|
import { Hotel } from '../../../models/Client/Hotel/Hotel';
|
|
@@ -6,7 +5,7 @@ import Step from '../Step';
|
|
|
6
5
|
import StepAddonValidator from './StepAddonValidator';
|
|
7
6
|
declare class StepAddon extends Step {
|
|
8
7
|
constructor();
|
|
9
|
-
getComponent(): () =>
|
|
8
|
+
getComponent(): () => JSX.Element;
|
|
10
9
|
getValidator(): StepAddonValidator;
|
|
11
10
|
getStepTranslation(): string;
|
|
12
11
|
getColorProfile(company: Company, hotel?: Hotel): IHotelColorScheme | undefined;
|
|
@@ -1,2 +1 @@
|
|
|
1
|
-
|
|
2
|
-
export default function StepAddonComponent(): React.JSX.Element;
|
|
1
|
+
export default function StepAddonComponent(): JSX.Element;
|
|
@@ -1,2 +1 @@
|
|
|
1
|
-
|
|
2
|
-
export default function StepConfirmationLoader(): React.JSX.Element;
|
|
1
|
+
export default function StepConfirmationLoader(): JSX.Element;
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
import { IHotelColorScheme } from '@roomstay/core';
|
|
3
2
|
import { Company } from '../../../models/Client/Hotel/Company';
|
|
4
3
|
import { Hotel } from '../../../models/Client/Hotel/Hotel';
|
|
@@ -6,7 +5,7 @@ import Step from '../Step';
|
|
|
6
5
|
import StepDateValidator from './StepDateValidator';
|
|
7
6
|
declare class StepDate extends Step {
|
|
8
7
|
constructor();
|
|
9
|
-
getComponent(): () =>
|
|
8
|
+
getComponent(): () => JSX.Element;
|
|
10
9
|
getValidator(): StepDateValidator;
|
|
11
10
|
getStepTranslation(): string;
|
|
12
11
|
getColorProfile(company: Company, hotel?: Hotel): IHotelColorScheme | undefined;
|
|
@@ -1,2 +1 @@
|
|
|
1
|
-
|
|
2
|
-
export default function StepGroupedRoomLoader(): React.JSX.Element;
|
|
1
|
+
export default function StepGroupedRoomLoader(): JSX.Element;
|
|
@@ -1,11 +1,10 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
import { IHotelColorScheme } from '@roomstay/core';
|
|
3
2
|
import { Company } from '../../../models/Client/Hotel/Company';
|
|
4
3
|
import Step from '../Step';
|
|
5
4
|
import StepHotelValidator from './StepHotelValidator';
|
|
6
5
|
declare class StepHotel extends Step {
|
|
7
6
|
constructor();
|
|
8
|
-
getComponent(): () =>
|
|
7
|
+
getComponent(): () => JSX.Element;
|
|
9
8
|
getValidator(): StepHotelValidator;
|
|
10
9
|
getStepTranslation(): string;
|
|
11
10
|
getColorProfile(company: Company): IHotelColorScheme;
|
|
@@ -1,2 +1 @@
|
|
|
1
|
-
|
|
2
|
-
export default function StepRoomLoader(): React.JSX.Element;
|
|
1
|
+
export default function StepRoomLoader(): JSX.Element;
|
|
@@ -1,2 +1 @@
|
|
|
1
|
-
|
|
2
|
-
export default function StepThanksComponent(): React.JSX.Element;
|
|
1
|
+
export default function StepThanksComponent(): JSX.Element;
|
|
@@ -1,3 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
export declare function withDI(name: string, OriginalObject: any, props: any): React.JSX.Element;
|
|
1
|
+
export declare function withDI(name: string, OriginalObject: any, props: any): JSX.Element;
|
|
3
2
|
export declare function registerReplacement(name: string, component: any): void;
|
|
@@ -17,7 +17,6 @@ const NumberOfPeopleBookedPillFeature_1 = __importDefault(require("./feature/Num
|
|
|
17
17
|
const PlanPayPricePreviewFeature_1 = __importDefault(require("./feature/PlanPayPricePreviewFeature"));
|
|
18
18
|
const RoomUpsellFeature_1 = __importDefault(require("./feature/RoomUpsellFeature"));
|
|
19
19
|
const ShowIATANumberOnCheckoutFeature_1 = __importDefault(require("./feature/ShowIATANumberOnCheckoutFeature"));
|
|
20
|
-
const ConfirmationImportantInformationFeature_1 = __importDefault(require("./feature/ConfirmationImportantInformationFeature"));
|
|
21
20
|
const DerbysoftClickTrackingFeature_1 = __importDefault(require("./feature/DerbysoftClickTrackingFeature"));
|
|
22
21
|
const RoomRateReadMoreVersionFeature_1 = __importDefault(require("./feature/RoomRateReadMoreVersionFeature"));
|
|
23
22
|
class FeatureProvider {
|
|
@@ -53,7 +52,6 @@ FeatureProvider.features = [
|
|
|
53
52
|
RoomRateReadMoreVersionFeature_1.default,
|
|
54
53
|
DerbysoftClickTrackingFeature_1.default,
|
|
55
54
|
GuestTitleFieldFeature_1.default,
|
|
56
|
-
ConfirmationImportantInformationFeature_1.default,
|
|
57
55
|
HotelGroupFeature_1.default,
|
|
58
56
|
];
|
|
59
57
|
//# sourceMappingURL=FeatureProvider.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FeatureProvider.js","sourceRoot":"/","sources":["src/providers/FeatureProvider.ts"],"names":[],"mappings":";;;;;AAAA,8GAAsF;AACtF,sGAA8E;AAC9E,kHAA0F;AAC1F,oGAA4E;AAC5E,8HAAsG;AACtG,wGAAgF;AAChF,8FAAsE;AACtE,wGAAgF;AAChF,kGAA0E;AAC1E,oGAA4E;AAC5E,0HAAkG;AAClG,gHAAwF;AACxF,8FAAsE;AACtE,0HAAkG;AAElG,
|
|
1
|
+
{"version":3,"file":"FeatureProvider.js","sourceRoot":"/","sources":["src/providers/FeatureProvider.ts"],"names":[],"mappings":";;;;;AAAA,8GAAsF;AACtF,sGAA8E;AAC9E,kHAA0F;AAC1F,oGAA4E;AAC5E,8HAAsG;AACtG,wGAAgF;AAChF,8FAAsE;AACtE,wGAAgF;AAChF,kGAA0E;AAC1E,oGAA4E;AAC5E,0HAAkG;AAClG,gHAAwF;AACxF,8FAAsE;AACtE,0HAAkG;AAElG,4GAAoF;AACpF,8GAAsF;AAEtF,MAAqB,eAAe;IAoBzB,MAAM,CAAC,IAAI,CAAC,IAAuF,EAAE,OAAa;QACrH,KAAK,MAAM,OAAO,IAAI,IAAI,CAAC,QAAQ,EAAE;YACjC,IAAI,OAAO,CAAC,OAAO,EAAE,KAAK,IAAI,IAAI,IAAI,KAAK,OAAO,EAAE;gBAChD,OAAO,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;aACzB;SACJ;IACL,CAAC;IAEM,MAAM,CAAC,MAAM,CAAC,IAAuF;QACxG,KAAK,MAAM,OAAO,IAAI,IAAI,CAAC,QAAQ,EAAE;YACjC,IAAI,OAAO,CAAC,OAAO,EAAE,KAAK,IAAI,IAAI,IAAI,KAAK,OAAO,EAAE;gBAChD,OAAO,CAAC,MAAM,EAAE,CAAC;aACpB;SACJ;IACL,CAAC;;AAlCL,kCAmCC;AAlCkB,wBAAQ,GAAG;IACtB,gCAAsB;IACtB,+BAAqB;IACrB,2BAAiB;IACjB,8BAAoB;IACpB,mCAAyB;IACzB,yCAA+B;IAC/B,qCAA2B;IAC3B,6BAAmB;IACnB,yCAA+B;IAC/B,2CAAiC;IACjC,8BAAoB;IACpB,oCAA0B;IAC1B,wCAA8B;IAC9B,uCAA6B;IAC7B,gCAAsB;IACtB,2BAAiB;CACpB,CAAC","sourcesContent":["import ConfirmationVerifyFeature from '@/providers/feature/ConfirmationVerifyFeature';\nimport DatePickerTypeFeature from '@/providers/feature/DatePickerTypeFeature';\nimport E164PhoneNumberFieldFeature from '@/providers/feature/E164PhoneNumberFieldFeature';\nimport FeaturedPromoFeature from '@/providers/feature/FeaturedPromoFeature';\nimport FullPageEngineSmallSpacingFeature from '@/providers/feature/FullPageEngineSmallSpacingFeature';\nimport GuestTitleFieldFeature from '@/providers/feature/GuestTitleFieldFeature';\nimport HotelGroupFeature from '@/providers/feature/HotelGroupFeature';\nimport InlineAddonStepFeature from '@/providers/feature/InlineAddonStepFeature';\nimport MemberPortalFeature from '@/providers/feature/MemberPortalFeature';\nimport ModifyBookingFeature from '@/providers/feature/ModifyBookingFeature';\nimport NumberOfPeopleBookedPillFeature from '@/providers/feature/NumberOfPeopleBookedPillFeature';\nimport PlanPayPricePreviewFeature from '@/providers/feature/PlanPayPricePreviewFeature';\nimport RoomUpsellFeature from '@/providers/feature/RoomUpsellFeature';\nimport ShowIATANumberOnCheckoutFeature from '@/providers/feature/ShowIATANumberOnCheckoutFeature';\n\nimport DerbysoftClickTrackingFeature from './feature/DerbysoftClickTrackingFeature';\nimport RoomRateReadMoreVersionFeature from './feature/RoomRateReadMoreVersionFeature';\n\nexport default class FeatureProvider {\n private static features = [\n InlineAddonStepFeature,\n DatePickerTypeFeature,\n RoomUpsellFeature,\n FeaturedPromoFeature,\n ConfirmationVerifyFeature,\n ShowIATANumberOnCheckoutFeature,\n E164PhoneNumberFieldFeature,\n MemberPortalFeature,\n NumberOfPeopleBookedPillFeature,\n FullPageEngineSmallSpacingFeature,\n ModifyBookingFeature,\n PlanPayPricePreviewFeature,\n RoomRateReadMoreVersionFeature,\n DerbysoftClickTrackingFeature,\n GuestTitleFieldFeature,\n HotelGroupFeature,\n ];\n\n public static load(name: string | (typeof FeatureProvider.features)[keyof typeof FeatureProvider.features], options?: any) {\n for (const feature of this.features) {\n if (feature.getName() === name || name === feature) {\n feature.load(options);\n }\n }\n }\n\n public static unLoad(name: string | (typeof FeatureProvider.features)[keyof typeof FeatureProvider.features]) {\n for (const feature of this.features) {\n if (feature.getName() === name || name === feature) {\n feature.unLoad();\n }\n }\n }\n}\n"]}
|
|
@@ -1,10 +1,8 @@
|
|
|
1
1
|
export declare abstract class Feature<TOptions = any> {
|
|
2
2
|
private name;
|
|
3
3
|
private active;
|
|
4
|
-
private options?;
|
|
5
4
|
constructor(name: string);
|
|
6
5
|
getName(): string;
|
|
7
|
-
getOptions(): TOptions | undefined;
|
|
8
6
|
isActive(): boolean;
|
|
9
7
|
load(options?: TOptions): void;
|
|
10
8
|
unLoad(): void;
|
|
@@ -9,9 +9,6 @@ class Feature {
|
|
|
9
9
|
getName() {
|
|
10
10
|
return this.name;
|
|
11
11
|
}
|
|
12
|
-
getOptions() {
|
|
13
|
-
return this.options;
|
|
14
|
-
}
|
|
15
12
|
isActive() {
|
|
16
13
|
return this.active;
|
|
17
14
|
}
|
|
@@ -25,7 +22,6 @@ class Feature {
|
|
|
25
22
|
}
|
|
26
23
|
onLoad(options) {
|
|
27
24
|
// Empty function to be overwritten
|
|
28
|
-
this.options = options;
|
|
29
25
|
}
|
|
30
26
|
onUnLoad() {
|
|
31
27
|
// Empty function to be overwritten
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Feature.js","sourceRoot":"/","sources":["src/providers/feature/Feature.ts"],"names":[],"mappings":";;;AAAA,MAAsB,OAAO;
|
|
1
|
+
{"version":3,"file":"Feature.js","sourceRoot":"/","sources":["src/providers/feature/Feature.ts"],"names":[],"mappings":";;;AAAA,MAAsB,OAAO;IAIzB,YAAmB,IAAY;QAC3B,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;QACjB,IAAI,CAAC,MAAM,GAAG,KAAK,CAAC;IACxB,CAAC;IAEM,OAAO;QACV,OAAO,IAAI,CAAC,IAAI,CAAC;IACrB,CAAC;IAEM,QAAQ;QACX,OAAO,IAAI,CAAC,MAAM,CAAC;IACvB,CAAC;IAEM,IAAI,CAAC,OAAkB;QAC1B,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC;QACnB,IAAI,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC;IACzB,CAAC;IAEM,MAAM;QACT,IAAI,CAAC,MAAM,GAAG,KAAK,CAAC;QAEpB,IAAI,CAAC,QAAQ,EAAE,CAAC;IACpB,CAAC;IAES,MAAM,CAAC,OAAkB;QAC/B,mCAAmC;IACvC,CAAC;IAES,QAAQ;QACd,mCAAmC;IACvC,CAAC;CACJ;AAnCD,0BAmCC","sourcesContent":["export abstract class Feature<TOptions = any> {\n private name: string;\n private active: boolean;\n\n public constructor(name: string) {\n this.name = name;\n this.active = false;\n }\n\n public getName() {\n return this.name;\n }\n\n public isActive() {\n return this.active;\n }\n\n public load(options?: TOptions) {\n this.active = true;\n this.onLoad(options);\n }\n\n public unLoad() {\n this.active = false;\n\n this.onUnLoad();\n }\n\n protected onLoad(options?: TOptions): void {\n // Empty function to be overwritten\n }\n\n protected onUnLoad() {\n // Empty function to be overwritten\n }\n}\n"]}
|
|
@@ -209,7 +209,6 @@ class SessionProvider {
|
|
|
209
209
|
children: unSerializeBasketRow.getChildren(),
|
|
210
210
|
infants: unSerializeBasketRow.getInfants(),
|
|
211
211
|
promoCode: unSerializeBasketRow.getPromoCode(),
|
|
212
|
-
roomCode: unSerializeBasketRow.getRoomCode(),
|
|
213
212
|
promoCodeStatus: unSerializeBasketRow.getPromoCodeStatus(),
|
|
214
213
|
rate: serializedRate,
|
|
215
214
|
room: serializedRoom,
|
|
@@ -262,7 +261,6 @@ class SessionProvider {
|
|
|
262
261
|
basketRow.setAdults(serializedBasketRow.adults);
|
|
263
262
|
basketRow.setChildren(serializedBasketRow.children);
|
|
264
263
|
basketRow.setInfants(serializedBasketRow.infants);
|
|
265
|
-
basketRow.setRoomCode(serializedBasketRow.roomCode);
|
|
266
264
|
basketRows.push(basketRow);
|
|
267
265
|
});
|
|
268
266
|
return {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SessionProvider.js","sourceRoot":"/","sources":["src/providers/storage/SessionProvider.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AACA,kDAA0B;AAE1B,mEAA2C;AAC3C,6CAAiD;AACjD,qDAA6D;AAC7D,8DAAkJ;AAClJ,yEAAsE;AACtE,8CAAkD;AAElD;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AAEH,MAAqB,eAAe;IAApC;QAGY,kBAAa,GAA6B,EAAE,CAAC;QAE7C,gBAAW,GAAG,GAAS,EAAE;YAC7B,IAAI;gBACA,MAAM,cAAc,GAAG,MAAM,IAAI,CAAC,UAAU,EAAE,CAAC;gBAC/C,MAAM,aAAa,GAAG,IAAI,CAAC,aAAa,CAAC;gBACzC,IAAI,CAAC,aAAa,GAAG,EAAE,CAAC;gBACxB,MAAM,IAAI,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W,EAAE,OAAO,CAAC,WAAW;YAChC,kBAAkB,EAAE,OAAO,CAAC,kBAAkB;SACjD,CAAC;IACN,CAAC;IAEO,aAAa,CAAC,SAAkB;QACpC,OAAO,WAAW,SAAS,aAAT,SAAS,cAAT,SAAS,GAAI,IAAI,CAAC,gBAAgB,EAAE,CAAC;IAC3D,CAAC;CACJ;AAtQD,kCAsQC","sourcesContent":["import { SignInUser } from '@frontend/contexts';\nimport dayjs from 'dayjs';\n\nimport BasketRow from '@/models/BasketRow';\nimport { IRoom, Room } from '@/models/Room/Room';\nimport { IRoomRate, RoomRate } from '@/models/Room/RoomRate';\nimport { RoomstaySession, SERIALIZED_DATE_FORMAT, SerializedRoomstaySession, SerializedRoomstaySessionBasketRow } from '@/models/RoomstaySession';\nimport { StorageProvider } from '@/providers/storage/StorageProvider';\nimport { debounce, delay } from '@/util/Debounce';\n\n/**\n * Session provider is in charge of handling the loading, saving and passing of the current Engine Session.\n *\n * Desired flow:\n * * App Opened\n * * Session Provider loaded\n * * New User Session Created\n * * User moves through the app, updating the session with vital details (current step, basket context )\n * * User refreshes browser - session is re-loaded and user resumes where they left off\n * * User proceeds to checkout.\n * * Session is saved.\n *\n * Mini Booking Widget:\n * * User loads mini booking widget, selects dates, people\n * * Rates are loaded, and user selects a rate, redirecting to Full Booking Engine\n * * Session Provider creates a SessionID to pass to redirected path\n * * Session Provider loads the passed SessionID and loads the correct session\n * * Resume to Desired Flow\n *\n * Re-targeting:\n * ---Since re-targeting will happen on client site, under client domain, localStorage will be preserved, ergo we can load the previous incomplete sessions back to the user\n * * User lands on client Homepage\n * * Session Provider loads previous incomplete sessions\n * * A slider with details of previous baskets is shown back to the user\n * * User clicks on a previous session and is brought to the Booking Engine\n * * Resume to Desired Flow\n */\n\nexport default class SessionProvider {\n private currentSessionID!: number;\n private hotelID!: string;\n private cachedSession: Partial<RoomstaySession> = {};\n\n private syncSession = async () => {\n try {\n const currentSession = await this.getSession();\n const cachedSession = this.cachedSession;\n this.cachedSession = {};\n await this.saveSession({\n ...currentSession,\n ...cachedSession,\n });\n } catch (error) {\n console.error('Failed to sync session:', error);\n }\n };\n\n private debouncedUpdateSession = debounce(async () => {\n await this.syncSession();\n }, 300);\n\n private async updateSessionWithAsync() {\n await delay(300); // 300 milliseconds delay -- Why is a delay necessary?\n await this.syncSession();\n }\n\n public async setHotelID(hotelID: string) {\n this.hotelID = hotelID;\n this.updateSession({ hotelID });\n }\n\n public async initialize(sessionID?: number, source?: string) {\n await this.setSessionID(sessionID, source);\n }\n\n public async setSessionID(sessionID?: number, source?: string) {\n const foundSession = await this.findOrCreateSessionID(sessionID as number, source as string);\n\n if (foundSession) {\n this.currentSessionID = foundSession;\n\n // Never read?\n const storage = new StorageProvider(sessionStorage);\n await storage.write('currentSession', this.currentSessionID);\n }\n }\n\n /**\n * @returns the current session ID\n */\n public getCurrentSessionID(): number {\n return this.currentSessionID;\n }\n\n public getSession(): RoomstaySession {\n const storage = new StorageProvider();\n\n const sessionFromStorage = storage.read<SerializedRoomstaySession>(this.getSessionKey());\n\n if (sessionFromStorage) {\n return this.unSerializeSession(sessionFromStorage);\n } else {\n return this.generateNewSession('');\n }\n }\n\n public async saveSession(changedSession: RoomstaySession) {\n if (!changedSession) {\n return console.log('Attempted to save empty session');\n }\n\n const storage = new StorageProvider();\n\n const serializedSession = this.serializeSession(changedSession);\n\n await storage.write(this.getSessionKey(serializedSession.id), serializedSession);\n }\n\n public async updateSession(partialSession: Partial<RoomstaySession>) {\n Object.assign(this.cachedSession, partialSession);\n this.debouncedUpdateSession();\n }\n\n public async updateSessionAsync(partialSession: Partial<RoomstaySession>) {\n Object.assign(this.cachedSession, partialSession);\n await this.updateSessionWithAsync();\n }\n\n public async deleteSession() {\n const storage = new StorageProvider();\n storage.delete(this.getSessionKey());\n }\n\n public async getAllSessions() {\n const storage = new StorageProvider();\n const sessionKeys = storage.getAllKeys((name) => name.startsWith('roomstay-session'));\n\n return (await storage.readAll<SerializedRoomstaySession>(sessionKeys)).map((session) => this.unSerializeSession(session));\n }\n\n /**\n * Function to find the right session from session storage, or local storage\n *\n * If one isn't found it is then created.\n */\n private async findOrCreateSessionID(sessionID: number, source: string) {\n let session: RoomstaySession;\n\n if (sessionID) {\n session = (await this.findSession(sessionID)) as RoomstaySession;\n\n if (session) {\n return session.id;\n }\n }\n\n session = await this.generateNewSession(source);\n\n return session.id;\n }\n\n private async findSession(sessionID: number): Promise<RoomstaySession | undefined> {\n const storage = new StorageProvider();\n const session = await storage.read<SerializedRoomstaySession>(this.getSessionKey(sessionID));\n\n if (session) {\n return this.unSerializeSession(session);\n }\n }\n\n private generateNewSession(source: string): RoomstaySession {\n const sessionId = new Date().getTime();\n\n const session: RoomstaySession = {\n id: sessionId,\n startDate: null,\n endDate: null,\n step: '',\n hotelID: this.hotelID ?? null,\n basketRows: [],\n source,\n };\n\n this.saveSession(session);\n\n return session;\n }\n\n private serializeSession(session: RoomstaySession): SerializedRoomstaySession {\n const basketRows: SerializedRoomstaySessionBasketRow[] = [];\n\n // TODO possibly refactor BasketRow to serialize itself, or instead make a serializer that can do all this.\n session.basketRows.forEach((unSerializeBasketRow: BasketRow) => {\n const rate = unSerializeBasketRow.getRate();\n const room = unSerializeBasketRow.getRoom();\n\n let serializedRate = null;\n let serializedRoom = null;\n\n if (rate) {\n serializedRate = rate.serialize();\n }\n\n if (room) {\n serializedRoom = room.serialize();\n }\n\n basketRows.push({\n uniqId: unSerializeBasketRow.getID(),\n startDate: unSerializeBasketRow.getStartDate()?.format(SERIALIZED_DATE_FORMAT),\n endDate: unSerializeBasketRow.getEndDate()?.format(SERIALIZED_DATE_FORMAT),\n adults: unSerializeBasketRow.getAdults(),\n children: unSerializeBasketRow.getChildren(),\n infants: unSerializeBasketRow.getInfants(),\n promoCode: unSerializeBasketRow.getPromoCode(),\n roomCode: unSerializeBasketRow.getRoomCode(),\n promoCodeStatus: unSerializeBasketRow.getPromoCodeStatus(),\n rate: serializedRate as IRoomRate,\n room: serializedRoom as IRoom,\n });\n });\n\n return {\n id: session.id,\n startDate: session.startDate?.format(SERIALIZED_DATE_FORMAT) as string,\n endDate: session.endDate?.format(SERIALIZED_DATE_FORMAT) as string,\n step: session.step,\n hotelID: session.hotelID,\n basketRows,\n source: session.source,\n user: JSON.stringify(session.user),\n memberId: session.memberId,\n reservation: session.reservation,\n reservationRequest: session.reservationRequest,\n };\n }\n\n private unSerializeSession(session: SerializedRoomstaySession): RoomstaySession {\n const basketRows: BasketRow[] = [];\n let startDate: dayjs.Dayjs | null = null;\n let endDate: dayjs.Dayjs | null = null;\n\n if (session.startDate) {\n startDate = dayjs(session.startDate, SERIALIZED_DATE_FORMAT);\n }\n\n if (session.endDate) {\n endDate = dayjs(session.endDate, SERIALIZED_DATE_FORMAT);\n }\n\n session.basketRows?.forEach((serializedBasketRow) => {\n let rate;\n let room;\n\n if (serializedBasketRow.room) {\n room = new Room();\n room.unSerialize(serializedBasketRow.room);\n }\n\n if (serializedBasketRow.rate && room) {\n rate = new RoomRate();\n rate.unSerialize(serializedBasketRow.rate);\n rate.setRoom(room);\n }\n\n const basketRow = new BasketRow(rate, serializedBasketRow.uniqId);\n\n if (serializedBasketRow.startDate) {\n basketRow.setStartDate(dayjs(serializedBasketRow.startDate, SERIALIZED_DATE_FORMAT));\n }\n if (serializedBasketRow.endDate) {\n basketRow.setEndDate(dayjs(serializedBasketRow.endDate, SERIALIZED_DATE_FORMAT));\n }\n\n basketRow.setAdults(serializedBasketRow.adults);\n basketRow.setChildren(serializedBasketRow.children);\n basketRow.setInfants(serializedBasketRow.infants);\n basketRow.setRoomCode(serializedBasketRow.roomCode);\n\n basketRows.push(basketRow);\n });\n\n return {\n id: session.id,\n startDate,\n endDate,\n step: session.step,\n hotelID: session.hotelID,\n basketRows,\n source: session.source,\n user: session.user ? (JSON.parse(session.user) as SignInUser) : undefined,\n memberId: session.memberId,\n reservation: session.reservation,\n reservationRequest: session.reservationRequest,\n };\n }\n\n private getSessionKey(sessionId?: number): string {\n return `session-${sessionId ?? this.currentSessionID}`;\n }\n}\n"]}
|
|
1
|
+
{"version":3,"file":"SessionProvider.js","sourceRoot":"/","sources":["src/providers/storage/SessionProvider.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AACA,kDAA0B;AAE1B,mEAA2C;AAC3C,6CAAiD;AACjD,qDAA6D;AAC7D,8DAAkJ;AAClJ,yEAAsE;AACtE,8CAAkD;AAElD;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AAEH,MAAqB,eAAe;IAApC;QAGY,kBAAa,GAA6B,EAAE,CAAC;QAE7C,gBAAW,GAAG,GAAS,EAAE;YAC7B,IAAI;gBACA,MAAM,cAAc,GAAG,MAAM,IAAI,CAAC,UAAU,EAAE,CAAC;gBAC/C,MAAM,aAAa,GAAG,IAAI,CAAC,aAAa,CAAC;gBACzC,IAAI,CAAC,aAAa,GAAG,EAAE,CAAC;gBACxB,MAAM,IAAI,CAAC,WAAW,iCACf,cAAc,GACd,aAAa,EAClB,CAAC;aACN;YAAC,OAAO,KAAK,EAAE;gBACZ,OAAO,CAAC,KAAK,CAAC,yBAAyB,EAAE,KAAK,CAAC,CAAC;aACnD;QACL,CAAC,CAAA,CAAC;QAEM,2BAAsB,GAAG,IAAA,mBAAQ,EAAC,GAAS,EAAE;YACjD,MAAM,IAAI,CAAC,WAAW,EAAE,CAAC;QAC7B,CAAC,CAAA,EAAE,GAAG,CAAC,CAAC;IA+OZ,CAAC;IA7OiB,sBAAsB;;YAChC,MAAM,IAAA,gBAAK,EAAC,GAAG,CAAC,CAAC,CAAC,sDAAsD;YACxE,MAAM,IAAI,CAAC,WAAW,EAAE,CAAC;QAC7B,CAAC;KAAA;IAEY,UAAU,CAAC,OAAe;;YACnC,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;YACvB,IAAI,CAAC,aAAa,CAAC,EAAE,OAAO,EAAE,CAAC,CAAC;QACpC,CAAC;KAAA;IAEY,UAAU,CAAC,SAAkB,EAAE,MAAe;;YACvD,MAAM,IAAI,CAAC,YAAY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AAC;YAElD,UAAU,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;QAC/B,CAAC,CAAC,CAAC;QAEH,OAAO;YACH,EAAE,EAAE,OAAO,CAAC,EAAE;YACd,SAAS;YACT,OAAO;YACP,IAAI,EAAE,OAAO,CAAC,IAAI;YAClB,OAAO,EAAE,OAAO,CAAC,OAAO;YACxB,UAAU;YACV,MAAM,EAAE,OAAO,CAAC,MAAM;YACtB,IAAI,EAAE,OAAO,CAAC,IAAI,CAAC,CAAC,CAAE,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,IAAI,CAAgB,CAAC,CAAC,CAAC,SAAS;YACzE,QAAQ,EAAE,OAAO,CAAC,QAAQ;YAC1B,WAAW,EAAE,OAAO,CAAC,WAAW;YAChC,kBAAkB,EAAE,OAAO,CAAC,kBAAkB;SACjD,CAAC;IACN,CAAC;IAEO,aAAa,CAAC,SAAkB;QACpC,OAAO,WAAW,SAAS,aAAT,SAAS,cAAT,SAAS,GAAI,IAAI,CAAC,gBAAgB,EAAE,CAAC;IAC3D,CAAC;CACJ;AApQD,kCAoQC","sourcesContent":["import { SignInUser } from '@frontend/contexts';\nimport dayjs from 'dayjs';\n\nimport BasketRow from '@/models/BasketRow';\nimport { IRoom, Room } from '@/models/Room/Room';\nimport { IRoomRate, RoomRate } from '@/models/Room/RoomRate';\nimport { RoomstaySession, SERIALIZED_DATE_FORMAT, SerializedRoomstaySession, SerializedRoomstaySessionBasketRow } from '@/models/RoomstaySession';\nimport { StorageProvider } from '@/providers/storage/StorageProvider';\nimport { debounce, delay } from '@/util/Debounce';\n\n/**\n * Session provider is in charge of handling the loading, saving and passing of the current Engine Session.\n *\n * Desired flow:\n * * App Opened\n * * Session Provider loaded\n * * New User Session Created\n * * User moves through the app, updating the session with vital details (current step, basket context )\n * * User refreshes browser - session is re-loaded and user resumes where they left off\n * * User proceeds to checkout.\n * * Session is saved.\n *\n * Mini Booking Widget:\n * * User loads mini booking widget, selects dates, people\n * * Rates are loaded, and user selects a rate, redirecting to Full Booking Engine\n * * Session Provider creates a SessionID to pass to redirected path\n * * Session Provider loads the passed SessionID and loads the correct session\n * * Resume to Desired Flow\n *\n * Re-targeting:\n * ---Since re-targeting will happen on client site, under client domain, localStorage will be preserved, ergo we can load the previous incomplete sessions back to the user\n * * User lands on client Homepage\n * * Session Provider loads previous incomplete sessions\n * * A slider with details of previous baskets is shown back to the user\n * * User clicks on a previous session and is brought to the Booking Engine\n * * Resume to Desired Flow\n */\n\nexport default class SessionProvider {\n private currentSessionID!: number;\n private hotelID!: string;\n private cachedSession: Partial<RoomstaySession> = {};\n\n private syncSession = async () => {\n try {\n const currentSession = await this.getSession();\n const cachedSession = this.cachedSession;\n this.cachedSession = {};\n await this.saveSession({\n ...currentSession,\n ...cachedSession,\n });\n } catch (error) {\n console.error('Failed to sync session:', error);\n }\n };\n\n private debouncedUpdateSession = debounce(async () => {\n await this.syncSession();\n }, 300);\n\n private async updateSessionWithAsync() {\n await delay(300); // 300 milliseconds delay -- Why is a delay necessary?\n await this.syncSession();\n }\n\n public async setHotelID(hotelID: string) {\n this.hotelID = hotelID;\n this.updateSession({ hotelID });\n }\n\n public async initialize(sessionID?: number, source?: string) {\n await this.setSessionID(sessionID, source);\n }\n\n public async setSessionID(sessionID?: number, source?: string) {\n const foundSession = await this.findOrCreateSessionID(sessionID as number, source as string);\n\n if (foundSession) {\n this.currentSessionID = foundSession;\n\n // Never read?\n const storage = new StorageProvider(sessionStorage);\n await storage.write('currentSession', this.currentSessionID);\n }\n }\n\n /**\n * @returns the current session ID\n */\n public getCurrentSessionID(): number {\n return this.currentSessionID;\n }\n\n public getSession(): RoomstaySession {\n const storage = new StorageProvider();\n\n const sessionFromStorage = storage.read<SerializedRoomstaySession>(this.getSessionKey());\n\n if (sessionFromStorage) {\n return this.unSerializeSession(sessionFromStorage);\n } else {\n return this.generateNewSession('');\n }\n }\n\n public async saveSession(changedSession: RoomstaySession) {\n if (!changedSession) {\n return console.log('Attempted to save empty session');\n }\n\n const storage = new StorageProvider();\n\n const serializedSession = this.serializeSession(changedSession);\n\n await storage.write(this.getSessionKey(serializedSession.id), serializedSession);\n }\n\n public async updateSession(partialSession: Partial<RoomstaySession>) {\n Object.assign(this.cachedSession, partialSession);\n this.debouncedUpdateSession();\n }\n\n public async updateSessionAsync(partialSession: Partial<RoomstaySession>) {\n Object.assign(this.cachedSession, partialSession);\n await this.updateSessionWithAsync();\n }\n\n public async deleteSession() {\n const storage = new StorageProvider();\n storage.delete(this.getSessionKey());\n }\n\n public async getAllSessions() {\n const storage = new StorageProvider();\n const sessionKeys = storage.getAllKeys((name) => name.startsWith('roomstay-session'));\n\n return (await storage.readAll<SerializedRoomstaySession>(sessionKeys)).map((session) => this.unSerializeSession(session));\n }\n\n /**\n * Function to find the right session from session storage, or local storage\n *\n * If one isn't found it is then created.\n */\n private async findOrCreateSessionID(sessionID: number, source: string) {\n let session: RoomstaySession;\n\n if (sessionID) {\n session = (await this.findSession(sessionID)) as RoomstaySession;\n\n if (session) {\n return session.id;\n }\n }\n\n session = await this.generateNewSession(source);\n\n return session.id;\n }\n\n private async findSession(sessionID: number): Promise<RoomstaySession | undefined> {\n const storage = new StorageProvider();\n const session = await storage.read<SerializedRoomstaySession>(this.getSessionKey(sessionID));\n\n if (session) {\n return this.unSerializeSession(session);\n }\n }\n\n private generateNewSession(source: string): RoomstaySession {\n const sessionId = new Date().getTime();\n\n const session: RoomstaySession = {\n id: sessionId,\n startDate: null,\n endDate: null,\n step: '',\n hotelID: this.hotelID ?? null,\n basketRows: [],\n source,\n };\n\n this.saveSession(session);\n\n return session;\n }\n\n private serializeSession(session: RoomstaySession): SerializedRoomstaySession {\n const basketRows: SerializedRoomstaySessionBasketRow[] = [];\n\n // TODO possibly refactor BasketRow to serialize itself, or instead make a serializer that can do all this.\n session.basketRows.forEach((unSerializeBasketRow: BasketRow) => {\n const rate = unSerializeBasketRow.getRate();\n const room = unSerializeBasketRow.getRoom();\n\n let serializedRate = null;\n let serializedRoom = null;\n\n if (rate) {\n serializedRate = rate.serialize();\n }\n\n if (room) {\n serializedRoom = room.serialize();\n }\n\n basketRows.push({\n uniqId: unSerializeBasketRow.getID(),\n startDate: unSerializeBasketRow.getStartDate()?.format(SERIALIZED_DATE_FORMAT),\n endDate: unSerializeBasketRow.getEndDate()?.format(SERIALIZED_DATE_FORMAT),\n adults: unSerializeBasketRow.getAdults(),\n children: unSerializeBasketRow.getChildren(),\n infants: unSerializeBasketRow.getInfants(),\n promoCode: unSerializeBasketRow.getPromoCode(),\n promoCodeStatus: unSerializeBasketRow.getPromoCodeStatus(),\n rate: serializedRate as IRoomRate,\n room: serializedRoom as IRoom,\n });\n });\n\n return {\n id: session.id,\n startDate: session.startDate?.format(SERIALIZED_DATE_FORMAT) as string,\n endDate: session.endDate?.format(SERIALIZED_DATE_FORMAT) as string,\n step: session.step,\n hotelID: session.hotelID,\n basketRows,\n source: session.source,\n user: JSON.stringify(session.user),\n memberId: session.memberId,\n reservation: session.reservation,\n reservationRequest: session.reservationRequest,\n };\n }\n\n private unSerializeSession(session: SerializedRoomstaySession): RoomstaySession {\n const basketRows: BasketRow[] = [];\n let startDate: dayjs.Dayjs | null = null;\n let endDate: dayjs.Dayjs | null = null;\n\n if (session.startDate) {\n startDate = dayjs(session.startDate, SERIALIZED_DATE_FORMAT);\n }\n\n if (session.endDate) {\n endDate = dayjs(session.endDate, SERIALIZED_DATE_FORMAT);\n }\n\n session.basketRows?.forEach((serializedBasketRow) => {\n let rate;\n let room;\n\n if (serializedBasketRow.room) {\n room = new Room();\n room.unSerialize(serializedBasketRow.room);\n }\n\n if (serializedBasketRow.rate && room) {\n rate = new RoomRate();\n rate.unSerialize(serializedBasketRow.rate);\n rate.setRoom(room);\n }\n\n const basketRow = new BasketRow(rate, serializedBasketRow.uniqId);\n\n if (serializedBasketRow.startDate) {\n basketRow.setStartDate(dayjs(serializedBasketRow.startDate, SERIALIZED_DATE_FORMAT));\n }\n if (serializedBasketRow.endDate) {\n basketRow.setEndDate(dayjs(serializedBasketRow.endDate, SERIALIZED_DATE_FORMAT));\n }\n\n basketRow.setAdults(serializedBasketRow.adults);\n basketRow.setChildren(serializedBasketRow.children);\n basketRow.setInfants(serializedBasketRow.infants);\n\n basketRows.push(basketRow);\n });\n\n return {\n id: session.id,\n startDate,\n endDate,\n step: session.step,\n hotelID: session.hotelID,\n basketRows,\n source: session.source,\n user: session.user ? (JSON.parse(session.user) as SignInUser) : undefined,\n memberId: session.memberId,\n reservation: session.reservation,\n reservationRequest: session.reservationRequest,\n };\n }\n\n private getSessionKey(sessionId?: number): string {\n return `session-${sessionId ?? this.currentSessionID}`;\n }\n}\n"]}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
1
|
import Step from '../pages/steps/Step';
|
|
3
2
|
export interface StepRouteProps {
|
|
4
3
|
step: Step;
|
|
5
4
|
}
|
|
6
|
-
declare const StepRoute: (props: StepRouteProps) =>
|
|
5
|
+
declare const StepRoute: (props: StepRouteProps) => JSX.Element;
|
|
7
6
|
export default StepRoute;
|
|
@@ -6,5 +6,5 @@ export default _default;
|
|
|
6
6
|
export declare const Horizontal: ComponentStory<React.FC<BookingWizardProps>>;
|
|
7
7
|
export declare const Vertical: ComponentStory<React.FC<BookingWizardProps>>;
|
|
8
8
|
export declare const Button: ComponentStory<React.FC<BookingWizardProps>>;
|
|
9
|
-
export declare const FixedCompany: ({ properties, ...props }: BookingWizardProps) =>
|
|
9
|
+
export declare const FixedCompany: ({ properties, ...props }: BookingWizardProps) => JSX.Element;
|
|
10
10
|
export declare const ThemeMini: ComponentStory<React.FC<BookingWizardProps>>;
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { ComponentMeta } from '@storybook/react';
|
|
2
|
-
import React from 'react';
|
|
3
2
|
import ConfirmationModal, { ConfirmationModalProps } from '../components/generic/modal/ConfirmationModal';
|
|
4
3
|
declare const _default: ComponentMeta<typeof ConfirmationModal>;
|
|
5
4
|
export default _default;
|
|
6
|
-
export declare const Default: (args: ConfirmationModalProps) =>
|
|
5
|
+
export declare const Default: (args: ConfirmationModalProps) => JSX.Element;
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
import { ComponentMeta } from '@storybook/react';
|
|
2
|
-
import React from 'react';
|
|
3
2
|
import DateRangePicker, { DatePickerProps } from '../components/generic/DateRangePicker/DateRangePicker';
|
|
4
3
|
declare const _default: ComponentMeta<typeof DateRangePicker>;
|
|
5
4
|
export default _default;
|
|
6
|
-
export declare const Primary: (args: DatePickerProps) =>
|
|
7
|
-
export declare const StartDatePopulated: (args: DatePickerProps) =>
|
|
8
|
-
export declare const MultipleMonths: (args: DatePickerProps) =>
|
|
9
|
-
export declare const ThemeSpecific: (args: DatePickerProps) =>
|
|
5
|
+
export declare const Primary: (args: DatePickerProps) => JSX.Element;
|
|
6
|
+
export declare const StartDatePopulated: (args: DatePickerProps) => JSX.Element;
|
|
7
|
+
export declare const MultipleMonths: (args: DatePickerProps) => JSX.Element;
|
|
8
|
+
export declare const ThemeSpecific: (args: DatePickerProps) => JSX.Element;
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { ComponentMeta } from '@storybook/react';
|
|
2
|
-
import React from 'react';
|
|
3
2
|
import ErrorModal from '../components/generic/modal/ErrorModal';
|
|
4
3
|
declare const _default: ComponentMeta<typeof ErrorModal>;
|
|
5
4
|
export default _default;
|
|
6
|
-
export declare const Default: () =>
|
|
5
|
+
export declare const Default: () => JSX.Element;
|
|
@@ -2,5 +2,5 @@ import { ComponentMeta } from '@storybook/react';
|
|
|
2
2
|
import React from 'react';
|
|
3
3
|
declare const _default: ComponentMeta<React.FC<import("../components/generic/Event/EventCarousel").EventCarouselProps>>;
|
|
4
4
|
export default _default;
|
|
5
|
-
export declare const Default: () =>
|
|
6
|
-
export declare const Vertical: () =>
|
|
5
|
+
export declare const Default: () => JSX.Element;
|
|
6
|
+
export declare const Vertical: () => JSX.Element;
|
|
@@ -2,5 +2,5 @@ import { ComponentMeta } from '@storybook/react';
|
|
|
2
2
|
import React from 'react';
|
|
3
3
|
declare const _default: ComponentMeta<React.ForwardRefExoticComponent<import("../components/generic/DateRangePicker/FloatingDateRangePicker").FloatingDateRangePickerProps & React.RefAttributes<import("../components/generic/DateRangePicker/FloatingDateRangePicker").FloatingDateRangePickerHandle>>>;
|
|
4
4
|
export default _default;
|
|
5
|
-
export declare const Primary: () =>
|
|
6
|
-
export declare const ThemeSpecific: () =>
|
|
5
|
+
export declare const Primary: () => JSX.Element;
|
|
6
|
+
export declare const ThemeSpecific: () => JSX.Element;
|
|
@@ -12,7 +12,7 @@ declare const _default: ComponentMeta<(props: {
|
|
|
12
12
|
icon?: "arrow" | "open-new" | undefined;
|
|
13
13
|
color?: Color | undefined;
|
|
14
14
|
} | undefined;
|
|
15
|
-
}) =>
|
|
15
|
+
}) => JSX.Element | null>;
|
|
16
16
|
export default _default;
|
|
17
17
|
export declare const Default: ComponentStory<(props: {
|
|
18
18
|
icon: IconType;
|
|
@@ -24,4 +24,4 @@ export declare const Default: ComponentStory<(props: {
|
|
|
24
24
|
icon?: "arrow" | "open-new" | undefined;
|
|
25
25
|
color?: Color | undefined;
|
|
26
26
|
} | undefined;
|
|
27
|
-
}) =>
|
|
27
|
+
}) => JSX.Element | null>;
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { ComponentMeta } from '@storybook/react';
|
|
2
|
-
import React from 'react';
|
|
3
2
|
import NumberIncrement, { NumberIncrementProps } from '../components/generic/NumberIncrement';
|
|
4
3
|
declare const _default: ComponentMeta<typeof NumberIncrement>;
|
|
5
4
|
export default _default;
|
|
6
|
-
export declare const Default: (args: NumberIncrementProps) =>
|
|
5
|
+
export declare const Default: (args: NumberIncrementProps) => JSX.Element;
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { ComponentMeta, ComponentStory } from '@storybook/react';
|
|
2
|
-
import
|
|
3
|
-
declare const _default: ComponentMeta<({ card }: import("../components/generic/PaymentCard/PaymentCard").PaymentCardProps) => React.JSX.Element>;
|
|
2
|
+
declare const _default: ComponentMeta<({ card }: import("../components/generic/PaymentCard/PaymentCard").PaymentCardProps) => JSX.Element>;
|
|
4
3
|
export default _default;
|
|
5
|
-
export declare const Primary: ComponentStory<({ card }: import("../components/generic/PaymentCard/PaymentCard").PaymentCardProps) =>
|
|
4
|
+
export declare const Primary: ComponentStory<({ card }: import("../components/generic/PaymentCard/PaymentCard").PaymentCardProps) => JSX.Element>;
|
|
@@ -3,6 +3,6 @@ import React from 'react';
|
|
|
3
3
|
import { IRadioButtonGroupProps } from '../components/generic/RadioButtonGroup/RadioButtonGroup';
|
|
4
4
|
declare const _default: ComponentMeta<(<TValue extends string = string>({ options, value: valueProp, onChange, renderChildrenContent, isSubGroup, }: IRadioButtonGroupProps<TValue>) => React.ReactElement<any, string | React.JSXElementConstructor<any>> | null)>;
|
|
5
5
|
export default _default;
|
|
6
|
-
export declare const Default: () =>
|
|
7
|
-
export declare const SelectRadio: () =>
|
|
8
|
-
export declare const DisabledSelectRadio: () =>
|
|
6
|
+
export declare const Default: () => JSX.Element;
|
|
7
|
+
export declare const SelectRadio: () => JSX.Element;
|
|
8
|
+
export declare const DisabledSelectRadio: () => JSX.Element;
|
|
@@ -4,6 +4,6 @@ declare const _default: ComponentMeta<(<TOption extends import("../components/ge
|
|
|
4
4
|
ref?: React.Ref<HTMLDivElement> | undefined;
|
|
5
5
|
}) => JSX.Element)>;
|
|
6
6
|
export default _default;
|
|
7
|
-
export declare const Default: () =>
|
|
8
|
-
export declare const Customized: () =>
|
|
9
|
-
export declare const Group: () =>
|
|
7
|
+
export declare const Default: () => JSX.Element;
|
|
8
|
+
export declare const Customized: () => JSX.Element;
|
|
9
|
+
export declare const Group: () => JSX.Element;
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { ComponentMeta } from '@storybook/react';
|
|
2
|
-
import React from 'react';
|
|
3
2
|
import SimpleModal, { SimpleModalProps } from '../components/generic/modal/SimpleModal';
|
|
4
3
|
declare const _default: ComponentMeta<typeof SimpleModal>;
|
|
5
4
|
export default _default;
|
|
6
|
-
export declare const Primary: (args: SimpleModalProps) =>
|
|
5
|
+
export declare const Primary: (args: SimpleModalProps) => JSX.Element;
|
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
import { ComponentMeta } from '@storybook/react';
|
|
2
|
-
import React from 'react';
|
|
3
2
|
declare const _default: ComponentMeta<(props: {
|
|
4
3
|
min: number;
|
|
5
4
|
max: number;
|
|
6
5
|
onChange?: ((markers: import("../components/generic/Slider/Slider").MarkerType[]) => void) | undefined;
|
|
7
6
|
markers: import("../components/generic/Slider/Slider").MarkerType[];
|
|
8
7
|
backgroundMarkers?: import("../components/generic/Slider/Slider").BackgroundMarkerType[] | undefined;
|
|
9
|
-
}) =>
|
|
8
|
+
}) => JSX.Element>;
|
|
10
9
|
export default _default;
|
|
11
|
-
export declare const Default: () =>
|
|
10
|
+
export declare const Default: () => JSX.Element;
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { ComponentMeta } from '@storybook/react';
|
|
2
|
-
import React from 'react';
|
|
3
2
|
import TabbedModal from '../components/generic/modal/TabbedModal';
|
|
4
3
|
declare const _default: ComponentMeta<typeof TabbedModal>;
|
|
5
4
|
export default _default;
|
|
6
|
-
export declare const Default: () =>
|
|
5
|
+
export declare const Default: () => JSX.Element;
|
|
@@ -2,4 +2,4 @@ import { ComponentMeta } from '@storybook/react';
|
|
|
2
2
|
import React from 'react';
|
|
3
3
|
declare const _default: ComponentMeta<React.FC<import("../components/generic/Tabs/Tabs").TabsProps>>;
|
|
4
4
|
export default _default;
|
|
5
|
-
export declare const Default: () =>
|
|
5
|
+
export declare const Default: () => JSX.Element;
|
|
@@ -288,6 +288,7 @@ export declare const Translation: {
|
|
|
288
288
|
RatesNotFoundLine1: string;
|
|
289
289
|
RatesNotFoundLine2: string;
|
|
290
290
|
YouBookedThisRoomRecently: string;
|
|
291
|
+
FreeNight: string;
|
|
291
292
|
CrossSellBlock: {
|
|
292
293
|
AvailabilityNearBy1: string;
|
|
293
294
|
AvailabilityNearBy2: string;
|
|
@@ -372,10 +373,6 @@ export declare const Translation: {
|
|
|
372
373
|
YouCanAddAndEditRooms: string;
|
|
373
374
|
AddMoreRooms: string;
|
|
374
375
|
EmailSpecialOffers: string;
|
|
375
|
-
ImportantInformation: string;
|
|
376
|
-
ImportantInformationNotes: string;
|
|
377
|
-
ImportantInformationIHaveUnderstood: string;
|
|
378
|
-
ImportantInformationError: string;
|
|
379
376
|
Acknowledgement: string;
|
|
380
377
|
IHaveUnderstoodPrivacyPolicy: string;
|
|
381
378
|
PrivacyPolicy: string;
|
|
@@ -544,8 +541,6 @@ export declare const Translation: {
|
|
|
544
541
|
ChooseHotelMobile: string;
|
|
545
542
|
PleaseSelectHotel: string;
|
|
546
543
|
PleaseSelectHotelMobile: string;
|
|
547
|
-
EmptySearchHotel: string;
|
|
548
|
-
Ungrouped: string;
|
|
549
544
|
Guests: string;
|
|
550
545
|
GuestsPlaceHolder: string;
|
|
551
546
|
Promocode: string;
|
|
@@ -291,6 +291,7 @@ exports.Translation = {
|
|
|
291
291
|
RatesNotFoundLine1: 'Step.Room.RatesNotFoundLine1',
|
|
292
292
|
RatesNotFoundLine2: 'Step.Room.RatesNotFoundLine2',
|
|
293
293
|
YouBookedThisRoomRecently: 'Step.Room.YouBookedThisRoomRecently',
|
|
294
|
+
FreeNight: 'Step.Room.FreeNight',
|
|
294
295
|
CrossSellBlock: {
|
|
295
296
|
AvailabilityNearBy1: 'Step.Room.CrossSellBlock.AvailabilityNearBy1',
|
|
296
297
|
AvailabilityNearBy2: 'Step.Room.CrossSellBlock.AvailabilityNearBy2',
|
|
@@ -375,10 +376,6 @@ exports.Translation = {
|
|
|
375
376
|
YouCanAddAndEditRooms: 'Step.Confirmation.YouCanAddAndEditRooms',
|
|
376
377
|
AddMoreRooms: 'Step.Confirmation.AddMoreRooms',
|
|
377
378
|
EmailSpecialOffers: 'Step.Confirmation.EmailSpecialOffers',
|
|
378
|
-
ImportantInformation: 'Step.Confirmation.ImportantInformation',
|
|
379
|
-
ImportantInformationNotes: 'Step.Confirmation.ImportantInformationNotes',
|
|
380
|
-
ImportantInformationIHaveUnderstood: 'Step.Confirmation.ImportantInformationIHaveUnderstood',
|
|
381
|
-
ImportantInformationError: 'Step.Confirmation.ImportantInformationError',
|
|
382
379
|
Acknowledgement: 'Step.Confirmation.Acknowledgement',
|
|
383
380
|
IHaveUnderstoodPrivacyPolicy: 'Step.Confirmation.IHaveUnderstoodPrivacyPolicy',
|
|
384
381
|
PrivacyPolicy: 'Step.Confirmation.PrivacyPolicy',
|
|
@@ -547,8 +544,6 @@ exports.Translation = {
|
|
|
547
544
|
ChooseHotelMobile: 'Misc.ChooseHotelMobile',
|
|
548
545
|
PleaseSelectHotel: 'Misc.PleaseSelectHotel',
|
|
549
546
|
PleaseSelectHotelMobile: 'Misc.PleaseSelectHotelMobile',
|
|
550
|
-
EmptySearchHotel: 'Misc.EmptySearchHotel',
|
|
551
|
-
Ungrouped: 'Misc.Ungrouped',
|
|
552
547
|
Guests: 'Misc.Guests',
|
|
553
548
|
GuestsPlaceHolder: 'Misc.GuestsPlaceHolder',
|
|
554
549
|
Promocode: 'Misc.Promocode',
|