@roomstay/frontend 2.1.16 → 2.1.18

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 (80) hide show
  1. package/dist/201.bundle.js +1 -1
  2. package/dist/535.bundle.js +2 -0
  3. package/dist/559.bundle.js +1 -1
  4. package/dist/760.bundle.js +1 -1
  5. package/dist/882.bundle.js +1 -1
  6. package/dist/main.bundle.js +1 -1
  7. package/dist/src/api/AvailabilityAPI.d.ts +9 -0
  8. package/dist/src/api/AvailabilityAPI.js +12 -0
  9. package/dist/src/api/AvailabilityAPI.js.map +1 -1
  10. package/dist/src/components/generic/BookingWizard/BookingWizard.js.map +1 -1
  11. package/dist/src/components/generic/BookingWizard/BookingWizardContent.js +37 -0
  12. package/dist/src/components/generic/BookingWizard/BookingWizardContent.js.map +1 -1
  13. package/dist/src/components/generic/BookingWizard/BookingWizardContext.d.ts +1 -0
  14. package/dist/src/components/generic/BookingWizard/BookingWizardContext.js.map +1 -1
  15. package/dist/src/components/generic/BookingWizard/BookingWizardGuestSelector/BookingWizardGuestSelector.js +1 -1
  16. package/dist/src/components/generic/BookingWizard/BookingWizardGuestSelector/BookingWizardGuestSelector.js.map +1 -1
  17. package/dist/src/components/generic/BookingWizard/BookingWizardHotelSelector/BookingWizardHotelSelector.js +1 -0
  18. package/dist/src/components/generic/BookingWizard/BookingWizardHotelSelector/BookingWizardHotelSelector.js.map +1 -1
  19. package/dist/src/components/generic/BookingWizard/BookingWizardPromoCode/BookingWizardPromoCode.d.ts +8 -0
  20. package/dist/src/components/generic/BookingWizard/BookingWizardPromoCode/BookingWizardPromoCode.js +64 -0
  21. package/dist/src/components/generic/BookingWizard/BookingWizardPromoCode/BookingWizardPromoCode.js.map +1 -0
  22. package/dist/src/components/generic/PromoCodeInput.d.ts +1 -0
  23. package/dist/src/components/generic/PromoCodeInput.js +1 -1
  24. package/dist/src/components/generic/PromoCodeInput.js.map +1 -1
  25. package/dist/src/components/generic/Select/Select.js +1 -1
  26. package/dist/src/components/generic/Select/Select.js.map +1 -1
  27. package/dist/src/components/generic/TextBox.d.ts +1 -0
  28. package/dist/src/components/generic/TextBox.js +1 -1
  29. package/dist/src/components/generic/TextBox.js.map +1 -1
  30. package/dist/src/components/navigation/Header.js +15 -15
  31. package/dist/src/components/navigation/Header.js.map +1 -1
  32. package/dist/src/components/steps/addons/AddonCard.js +11 -11
  33. package/dist/src/components/steps/addons/AddonCard.js.map +1 -1
  34. package/dist/src/components/steps/confirmation/StepConfirmationAcknowledgement.d.ts +6 -3
  35. package/dist/src/components/steps/confirmation/StepConfirmationAcknowledgement.js +9 -19
  36. package/dist/src/components/steps/confirmation/StepConfirmationAcknowledgement.js.map +1 -1
  37. package/dist/src/components/steps/confirmation/StepConfirmationForm.js +28 -15
  38. package/dist/src/components/steps/confirmation/StepConfirmationForm.js.map +1 -1
  39. package/dist/src/components/steps/confirmation/additionalOffers/AdditionalOffersColumn.js +2 -1
  40. package/dist/src/components/steps/confirmation/additionalOffers/AdditionalOffersColumn.js.map +1 -1
  41. package/dist/src/components/steps/confirmation/additionalOffers/AdditionalOffersModal.js +10 -10
  42. package/dist/src/components/steps/confirmation/additionalOffers/AdditionalOffersModal.js.map +1 -1
  43. package/dist/src/components/steps/room/ImageGallerySlider.js +2 -1
  44. package/dist/src/components/steps/room/ImageGallerySlider.js.map +1 -1
  45. package/dist/src/components/steps/room/MemberSignInModal/MemberSignInModal.js +16 -17
  46. package/dist/src/components/steps/room/MemberSignInModal/MemberSignInModal.js.map +1 -1
  47. package/dist/src/components/steps/room/RoomListCrossSellBlock.js +17 -18
  48. package/dist/src/components/steps/room/RoomListCrossSellBlock.js.map +1 -1
  49. package/dist/src/contexts/ConfirmationStepContext/ConfirmationStepContextTypes.d.ts +1 -1
  50. package/dist/src/contexts/ConfirmationStepContext/ConfirmationStepContextTypes.js.map +1 -1
  51. package/dist/src/contexts/ConfirmationStepContext/ConfirmationStepContextWrapper.js +8 -9
  52. package/dist/src/contexts/ConfirmationStepContext/ConfirmationStepContextWrapper.js.map +1 -1
  53. package/dist/src/contexts/index.d.ts +22 -22
  54. package/dist/src/contexts/index.js +22 -22
  55. package/dist/src/contexts/index.js.map +1 -1
  56. package/dist/src/models/Client/Hotel/Hotel.d.ts +1 -0
  57. package/dist/src/models/Client/Hotel/Hotel.js.map +1 -1
  58. package/dist/src/models/Confirmation.d.ts +0 -2
  59. package/dist/src/models/Confirmation.js.map +1 -1
  60. package/dist/src/pages/findReservation/FindReservation.js +12 -12
  61. package/dist/src/pages/findReservation/FindReservation.js.map +1 -1
  62. package/dist/src/pages/hotel/HotelInfo.js +7 -8
  63. package/dist/src/pages/hotel/HotelInfo.js.map +1 -1
  64. package/dist/src/pages/steps/StepConfirmation/StepConfirmationComponent.js +2 -1
  65. package/dist/src/pages/steps/StepConfirmation/StepConfirmationComponent.js.map +1 -1
  66. package/dist/src/providers/ImageProvider.d.ts +2 -1
  67. package/dist/src/providers/ImageProvider.js +1 -0
  68. package/dist/src/providers/ImageProvider.js.map +1 -1
  69. package/dist/src/translations/Translation.d.ts +6 -0
  70. package/dist/src/translations/Translation.js +6 -0
  71. package/dist/src/translations/Translation.js.map +1 -1
  72. package/dist/src/translations/languages/en-gb.js +6 -0
  73. package/dist/src/translations/languages/en-gb.js.map +1 -1
  74. package/dist/src/util/Color.js +1 -1
  75. package/dist/src/util/Color.js.map +1 -1
  76. package/dist/test.bundle.js +1 -1
  77. package/dist/vendors.bundle.js +1 -1
  78. package/package.json +1 -1
  79. package/dist/399.bundle.js +0 -2
  80. /package/dist/{399.bundle.js.LICENSE.txt → 535.bundle.js.LICENSE.txt} +0 -0
@@ -1,22 +1,22 @@
1
- export * from 'contexts/BasketContext/BasketContext';
2
- export * from 'contexts/BasketContext/BasketContextWrapper';
3
- export * from 'contexts/BasketContext/BasketContextType';
4
- export * from 'contexts/BookingEngineContext/BookingEngineContextType.types';
5
- export * from 'contexts/BookingEngineContext/BookingEngineContextWrapper';
6
- export * from 'contexts/BookingEngineContext/BookingEngineContext';
7
- export * from 'contexts/CompanyContext/CompanyContextType.type';
8
- export * from 'contexts/CompanyContext/CompanyContextWrapper';
9
- export * from 'contexts/CompanyContext/CompanyContext';
10
- export * from 'contexts/Members/AuthenticationContext/AuthenticationContext';
11
- export * from 'contexts/Members/AuthenticationContext/AuthenticationContextProvider';
12
- export * from 'contexts/Members/RoomstayMemberContext/RoomstayMemberContext';
13
- export * from 'contexts/Members/RoomstayMemberContext/RoomstayMemberContextProvider';
14
- export * from 'contexts/ConfirmationFormContext';
15
- export * from 'contexts/DatePickerContext';
16
- export * from 'contexts/ErrorContext';
17
- export * from 'contexts/FullPageEngineContext/FullPageEngineContext';
18
- export * from 'contexts/FullPageEngineContext/FullPageEngineContextTypes';
19
- export * from 'contexts/FullPageEngineContext/FullPageEngineContextWrapper';
20
- export * from 'contexts/HotelOverridesContext';
21
- export * from 'contexts/ModalContext';
22
- export * from 'contexts/NotificationContext';
1
+ export * from './BasketContext/BasketContext';
2
+ export * from './BasketContext/BasketContextWrapper';
3
+ export * from './BasketContext/BasketContextType';
4
+ export * from './BookingEngineContext/BookingEngineContextType.types';
5
+ export * from './BookingEngineContext/BookingEngineContextWrapper';
6
+ export * from './BookingEngineContext/BookingEngineContext';
7
+ export * from './CompanyContext/CompanyContextType.type';
8
+ export * from './CompanyContext/CompanyContextWrapper';
9
+ export * from './CompanyContext/CompanyContext';
10
+ export * from './Members/AuthenticationContext/AuthenticationContext';
11
+ export * from './Members/AuthenticationContext/AuthenticationContextProvider';
12
+ export * from './Members/RoomstayMemberContext/RoomstayMemberContext';
13
+ export * from './Members/RoomstayMemberContext/RoomstayMemberContextProvider';
14
+ export * from './ConfirmationFormContext';
15
+ export * from './DatePickerContext';
16
+ export * from './ErrorContext';
17
+ export * from './FullPageEngineContext/FullPageEngineContext';
18
+ export * from './FullPageEngineContext/FullPageEngineContextTypes';
19
+ export * from './FullPageEngineContext/FullPageEngineContextWrapper';
20
+ export * from './HotelOverridesContext';
21
+ export * from './ModalContext';
22
+ export * from './NotificationContext';
@@ -14,26 +14,26 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
14
  for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
- __exportStar(require("contexts/BasketContext/BasketContext"), exports);
18
- __exportStar(require("contexts/BasketContext/BasketContextWrapper"), exports);
19
- __exportStar(require("contexts/BasketContext/BasketContextType"), exports);
20
- __exportStar(require("contexts/BookingEngineContext/BookingEngineContextType.types"), exports);
21
- __exportStar(require("contexts/BookingEngineContext/BookingEngineContextWrapper"), exports);
22
- __exportStar(require("contexts/BookingEngineContext/BookingEngineContext"), exports);
23
- __exportStar(require("contexts/CompanyContext/CompanyContextType.type"), exports);
24
- __exportStar(require("contexts/CompanyContext/CompanyContextWrapper"), exports);
25
- __exportStar(require("contexts/CompanyContext/CompanyContext"), exports);
26
- __exportStar(require("contexts/Members/AuthenticationContext/AuthenticationContext"), exports);
27
- __exportStar(require("contexts/Members/AuthenticationContext/AuthenticationContextProvider"), exports);
28
- __exportStar(require("contexts/Members/RoomstayMemberContext/RoomstayMemberContext"), exports);
29
- __exportStar(require("contexts/Members/RoomstayMemberContext/RoomstayMemberContextProvider"), exports);
30
- __exportStar(require("contexts/ConfirmationFormContext"), exports);
31
- __exportStar(require("contexts/DatePickerContext"), exports);
32
- __exportStar(require("contexts/ErrorContext"), exports);
33
- __exportStar(require("contexts/FullPageEngineContext/FullPageEngineContext"), exports);
34
- __exportStar(require("contexts/FullPageEngineContext/FullPageEngineContextTypes"), exports);
35
- __exportStar(require("contexts/FullPageEngineContext/FullPageEngineContextWrapper"), exports);
36
- __exportStar(require("contexts/HotelOverridesContext"), exports);
37
- __exportStar(require("contexts/ModalContext"), exports);
38
- __exportStar(require("contexts/NotificationContext"), exports);
17
+ __exportStar(require("./BasketContext/BasketContext"), exports);
18
+ __exportStar(require("./BasketContext/BasketContextWrapper"), exports);
19
+ __exportStar(require("./BasketContext/BasketContextType"), exports);
20
+ __exportStar(require("./BookingEngineContext/BookingEngineContextType.types"), exports);
21
+ __exportStar(require("./BookingEngineContext/BookingEngineContextWrapper"), exports);
22
+ __exportStar(require("./BookingEngineContext/BookingEngineContext"), exports);
23
+ __exportStar(require("./CompanyContext/CompanyContextType.type"), exports);
24
+ __exportStar(require("./CompanyContext/CompanyContextWrapper"), exports);
25
+ __exportStar(require("./CompanyContext/CompanyContext"), exports);
26
+ __exportStar(require("./Members/AuthenticationContext/AuthenticationContext"), exports);
27
+ __exportStar(require("./Members/AuthenticationContext/AuthenticationContextProvider"), exports);
28
+ __exportStar(require("./Members/RoomstayMemberContext/RoomstayMemberContext"), exports);
29
+ __exportStar(require("./Members/RoomstayMemberContext/RoomstayMemberContextProvider"), exports);
30
+ __exportStar(require("./ConfirmationFormContext"), exports);
31
+ __exportStar(require("./DatePickerContext"), exports);
32
+ __exportStar(require("./ErrorContext"), exports);
33
+ __exportStar(require("./FullPageEngineContext/FullPageEngineContext"), exports);
34
+ __exportStar(require("./FullPageEngineContext/FullPageEngineContextTypes"), exports);
35
+ __exportStar(require("./FullPageEngineContext/FullPageEngineContextWrapper"), exports);
36
+ __exportStar(require("./HotelOverridesContext"), exports);
37
+ __exportStar(require("./ModalContext"), exports);
38
+ __exportStar(require("./NotificationContext"), exports);
39
39
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"/","sources":["src/contexts/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,uEAAqD;AACrD,8EAA4D;AAC5D,2EAAyD;AAEzD,+FAA6E;AAC7E,4FAA0E;AAC1E,qFAAmE;AAEnE,kFAAgE;AAChE,gFAA8D;AAC9D,yEAAuD;AAEvD,+FAA6E;AAC7E,uGAAqF;AACrF,+FAA6E;AAC7E,uGAAqF;AAErF,mEAAiD;AACjD,6DAA2C;AAC3C,wDAAsC;AAEtC,uFAAqE;AACrE,4FAA0E;AAC1E,8FAA4E;AAE5E,iEAA+C;AAC/C,wDAAsC;AACtC,+DAA6C","sourcesContent":["export * from 'contexts/BasketContext/BasketContext';\nexport * from 'contexts/BasketContext/BasketContextWrapper';\nexport * from 'contexts/BasketContext/BasketContextType';\n\nexport * from 'contexts/BookingEngineContext/BookingEngineContextType.types';\nexport * from 'contexts/BookingEngineContext/BookingEngineContextWrapper';\nexport * from 'contexts/BookingEngineContext/BookingEngineContext';\n\nexport * from 'contexts/CompanyContext/CompanyContextType.type';\nexport * from 'contexts/CompanyContext/CompanyContextWrapper';\nexport * from 'contexts/CompanyContext/CompanyContext';\n\nexport * from 'contexts/Members/AuthenticationContext/AuthenticationContext';\nexport * from 'contexts/Members/AuthenticationContext/AuthenticationContextProvider';\nexport * from 'contexts/Members/RoomstayMemberContext/RoomstayMemberContext';\nexport * from 'contexts/Members/RoomstayMemberContext/RoomstayMemberContextProvider';\n\nexport * from 'contexts/ConfirmationFormContext';\nexport * from 'contexts/DatePickerContext';\nexport * from 'contexts/ErrorContext';\n\nexport * from 'contexts/FullPageEngineContext/FullPageEngineContext';\nexport * from 'contexts/FullPageEngineContext/FullPageEngineContextTypes';\nexport * from 'contexts/FullPageEngineContext/FullPageEngineContextWrapper';\n\nexport * from 'contexts/HotelOverridesContext';\nexport * from 'contexts/ModalContext';\nexport * from 'contexts/NotificationContext';\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"/","sources":["src/contexts/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,yEAAuD;AACvD,gFAA8D;AAC9D,6EAA2D;AAE3D,iGAA+E;AAC/E,8FAA4E;AAC5E,uFAAqE;AAErE,oFAAkE;AAClE,kFAAgE;AAChE,2EAAyD;AAEzD,iGAA+E;AAC/E,yGAAuF;AACvF,iGAA+E;AAC/E,yGAAuF;AAEvF,qEAAmD;AACnD,+DAA6C;AAC7C,0DAAwC;AAExC,yFAAuE;AACvE,8FAA4E;AAC5E,gGAA8E;AAE9E,mEAAiD;AACjD,0DAAwC;AACxC,iEAA+C","sourcesContent":["export * from '@/contexts/BasketContext/BasketContext';\nexport * from '@/contexts/BasketContext/BasketContextWrapper';\nexport * from '@/contexts/BasketContext/BasketContextType';\n\nexport * from '@/contexts/BookingEngineContext/BookingEngineContextType.types';\nexport * from '@/contexts/BookingEngineContext/BookingEngineContextWrapper';\nexport * from '@/contexts/BookingEngineContext/BookingEngineContext';\n\nexport * from '@/contexts/CompanyContext/CompanyContextType.type';\nexport * from '@/contexts/CompanyContext/CompanyContextWrapper';\nexport * from '@/contexts/CompanyContext/CompanyContext';\n\nexport * from '@/contexts/Members/AuthenticationContext/AuthenticationContext';\nexport * from '@/contexts/Members/AuthenticationContext/AuthenticationContextProvider';\nexport * from '@/contexts/Members/RoomstayMemberContext/RoomstayMemberContext';\nexport * from '@/contexts/Members/RoomstayMemberContext/RoomstayMemberContextProvider';\n\nexport * from '@/contexts/ConfirmationFormContext';\nexport * from '@/contexts/DatePickerContext';\nexport * from '@/contexts/ErrorContext';\n\nexport * from '@/contexts/FullPageEngineContext/FullPageEngineContext';\nexport * from '@/contexts/FullPageEngineContext/FullPageEngineContextTypes';\nexport * from '@/contexts/FullPageEngineContext/FullPageEngineContextWrapper';\n\nexport * from '@/contexts/HotelOverridesContext';\nexport * from '@/contexts/ModalContext';\nexport * from '@/contexts/NotificationContext';\n"]}
@@ -23,6 +23,7 @@ export interface ConfigHotel extends HasDatalayerTags {
23
23
  hotelID: number | string;
24
24
  providerHotelID: string;
25
25
  name: string;
26
+ shortName?: string;
26
27
  description?: string;
27
28
  locationDescription?: string;
28
29
  address?: HotelAddress;
@@ -1 +1 @@
1
- {"version":3,"file":"Hotel.js","sourceRoot":"/","sources":["src/models/Client/Hotel/Hotel.ts"],"names":[],"mappings":";;;AAiBA,IAAY,gBAKX;AALD,WAAY,gBAAgB;IACxB,+BAAW,CAAA;IACX,qCAAiB,CAAA;IACjB,8BAAU,CAAA;IACV,yCAAqB,CAAA;AACzB,CAAC,EALW,gBAAgB,GAAhB,wBAAgB,KAAhB,wBAAgB,QAK3B","sourcesContent":["import type { ReactChild } from 'react';\n\nimport type { Language } from '@/providers/LanguageProvider';\nimport type { HotelPerk } from '@/models/Client/Hotel/HotelPerk';\nimport type { HotelRoomOverwrite } from '@/models/Client/Hotel/HotelRoomOverwrite';\nimport type ColorProfile from '@/models/Client/Hotel/ColorProfile';\nimport type HotelAddress from '@/models/Client/Hotel/HotelAddress';\nimport type { HotelRoomsDTO, HotelServiceDTO } from '@/models/Api/HotelDTO';\nimport type { HasDatalayerTags } from '@/models/Client/Hotel/Company';\nimport type { TransportDistances } from '@/models/Api/HotelOverrideDTO';\nimport type { MemberOnlyModalInputs } from '@/components/steps/room/MemberSignInModal/MemberSignInModal.types';\nimport type { DistanceUnitType } from '@/models/Client/Hotel/DistanceUnitType.types';\nimport type { WeekdayStartsOn } from '@/models/Client/Hotel/WeekdayStartsOn.types';\nimport type { HotelDataSource } from '@/models/Client/Hotel/HotelDataSource.types';\nimport { EBookingPaymentMethod } from '@roomstay/core';\nimport type { PlanPayEnvironment } from '@planpay/web';\n\nexport enum EPaymentCardType {\n Visa = 'VI',\n Mastercard = 'MC',\n JCB = 'JC',\n AmericanExpress = 'X',\n}\n\nexport interface ConfigHotel extends HasDatalayerTags {\n hotelID: number | string;\n providerHotelID: string;\n\n /* Fields subject to change when pulled from API */\n name: string;\n description?: string;\n locationDescription?: string;\n\n address?: HotelAddress;\n latitude?: number;\n longitude?: number;\n\n phone?: string;\n\n checkInTime?: string;\n checkOutTime?: string;\n\n paymentCardTypes?: EPaymentCardType[];\n\n policies?: string;\n\n maxOccupancy?: number;\n\n /* End of Changing Fields */\n\n startsWeekOnDay?: WeekdayStartsOn;\n\n hotelUrl: string;\n defaultDatepickerType?: 'Month' | 'Week';\n // TODO: need to do magic to see if we need to append / prepend stuff, for now we assume that it's only used while on the site.\n checkoutUrl?: string;\n defaultCurrency: string;\n defaultLanguage: Language;\n logo: string | ReactChild;\n heroImage: string;\n privacyPolicyUrl: string;\n bookNowPayLaterUrl?: string;\n bestRateNoBSUrl?: string;\n\n colors: ColorProfile;\n memberOnlyRates?: string[];\n memberOnlyPromoCode?: string;\n\n memberOnlySignupInputs?: MemberOnlyModalInputs;\n\n crossSellHotelIds?: string[];\n\n googleMapsImage?: string;\n\n hideByLine?: boolean;\n\n /**\n * Wether to show the Breakfast / Lunch / Dinner included\n */\n showMealPill?: boolean;\n\n /**\n * Distances for the Summary, and Hotel Info pages\n */\n transportDistances?: TransportDistances;\n\n distanceUnitType: DistanceUnitType;\n perks: HotelPerk[];\n\n vgsVaultName: string;\n showAddonLoader: boolean;\n overwrites?: { [code: string]: Partial<HotelRoomOverwrite> };\n\n forwardFindReservationToSynxis?: boolean;\n\n additionalOptions?: { [name: string]: any };\n\n images?: string[];\n\n googleReCaptcha?: {\n loadForMembers?: boolean;\n siteKey?: string;\n };\n\n paymentMethods: EBookingPaymentMethod[];\n\n planpay?: {\n minDaysShowPlanpay: number;\n env: PlanPayEnvironment;\n };\n\n /**\n * Customize the Member modal colours. Specifically replacing the green (success) with the primary color of hotel (accent)\n */\n memberOnlyModalUsePrimaryColor?: boolean;\n\n /**\n * Callback to trigger specific events on load of a hotel.\n *\n * This is where you can specify custom fields, language overrides, feature toggles etc.\n */\n onLoad?: () => void;\n}\n\nexport type Hotel = ConfigHotel & {\n hotelID: string;\n\n hasLoadedDetails?: boolean;\n\n hotelServices: HotelServiceDTO[];\n businessServices: HotelServiceDTO[];\n rooms: HotelRoomsDTO;\n dataSource: HotelDataSource;\n\n lowestPrice?: {\n value: number;\n isLoading: boolean;\n };\n};\n\n/**\n * Used for DetailsHotel event\n */\nexport type InitialHotelDetailsEventPayload = {\n name: string;\n hotelID: number | string;\n hotelUrl: string;\n currency: string;\n language: Language;\n address?: HotelAddress;\n};\n"]}
1
+ {"version":3,"file":"Hotel.js","sourceRoot":"/","sources":["src/models/Client/Hotel/Hotel.ts"],"names":[],"mappings":";;;AAiBA,IAAY,gBAKX;AALD,WAAY,gBAAgB;IACxB,+BAAW,CAAA;IACX,qCAAiB,CAAA;IACjB,8BAAU,CAAA;IACV,yCAAqB,CAAA;AACzB,CAAC,EALW,gBAAgB,GAAhB,wBAAgB,KAAhB,wBAAgB,QAK3B","sourcesContent":["import type { ReactChild } from 'react';\n\nimport type { Language } from '@/providers/LanguageProvider';\nimport type { HotelPerk } from '@/models/Client/Hotel/HotelPerk';\nimport type { HotelRoomOverwrite } from '@/models/Client/Hotel/HotelRoomOverwrite';\nimport type ColorProfile from '@/models/Client/Hotel/ColorProfile';\nimport type HotelAddress from '@/models/Client/Hotel/HotelAddress';\nimport type { HotelRoomsDTO, HotelServiceDTO } from '@/models/Api/HotelDTO';\nimport type { HasDatalayerTags } from '@/models/Client/Hotel/Company';\nimport type { TransportDistances } from '@/models/Api/HotelOverrideDTO';\nimport type { MemberOnlyModalInputs } from '@/components/steps/room/MemberSignInModal/MemberSignInModal.types';\nimport type { DistanceUnitType } from '@/models/Client/Hotel/DistanceUnitType.types';\nimport type { WeekdayStartsOn } from '@/models/Client/Hotel/WeekdayStartsOn.types';\nimport type { HotelDataSource } from '@/models/Client/Hotel/HotelDataSource.types';\nimport { EBookingPaymentMethod } from '@roomstay/core';\nimport type { PlanPayEnvironment } from '@planpay/web';\n\nexport enum EPaymentCardType {\n Visa = 'VI',\n Mastercard = 'MC',\n JCB = 'JC',\n AmericanExpress = 'X',\n}\n\nexport interface ConfigHotel extends HasDatalayerTags {\n hotelID: number | string;\n providerHotelID: string;\n\n /* Fields subject to change when pulled from API */\n name: string;\n shortName?: string;\n description?: string;\n locationDescription?: string;\n\n address?: HotelAddress;\n latitude?: number;\n longitude?: number;\n\n phone?: string;\n\n checkInTime?: string;\n checkOutTime?: string;\n\n paymentCardTypes?: EPaymentCardType[];\n\n policies?: string;\n\n maxOccupancy?: number;\n\n /* End of Changing Fields */\n\n startsWeekOnDay?: WeekdayStartsOn;\n\n hotelUrl: string;\n defaultDatepickerType?: 'Month' | 'Week';\n // TODO: need to do magic to see if we need to append / prepend stuff, for now we assume that it's only used while on the site.\n checkoutUrl?: string;\n defaultCurrency: string;\n defaultLanguage: Language;\n logo: string | ReactChild;\n heroImage: string;\n privacyPolicyUrl: string;\n bookNowPayLaterUrl?: string;\n bestRateNoBSUrl?: string;\n\n colors: ColorProfile;\n memberOnlyRates?: string[];\n memberOnlyPromoCode?: string;\n\n memberOnlySignupInputs?: MemberOnlyModalInputs;\n\n crossSellHotelIds?: string[];\n\n googleMapsImage?: string;\n\n hideByLine?: boolean;\n\n /**\n * Wether to show the Breakfast / Lunch / Dinner included\n */\n showMealPill?: boolean;\n\n /**\n * Distances for the Summary, and Hotel Info pages\n */\n transportDistances?: TransportDistances;\n\n distanceUnitType: DistanceUnitType;\n perks: HotelPerk[];\n\n vgsVaultName: string;\n showAddonLoader: boolean;\n overwrites?: { [code: string]: Partial<HotelRoomOverwrite> };\n\n forwardFindReservationToSynxis?: boolean;\n\n additionalOptions?: { [name: string]: any };\n\n images?: string[];\n\n googleReCaptcha?: {\n loadForMembers?: boolean;\n siteKey?: string;\n };\n\n paymentMethods: EBookingPaymentMethod[];\n\n planpay?: {\n minDaysShowPlanpay: number;\n env: PlanPayEnvironment;\n };\n\n /**\n * Customize the Member modal colours. Specifically replacing the green (success) with the primary color of hotel (accent)\n */\n memberOnlyModalUsePrimaryColor?: boolean;\n\n /**\n * Callback to trigger specific events on load of a hotel.\n *\n * This is where you can specify custom fields, language overrides, feature toggles etc.\n */\n onLoad?: () => void;\n}\n\nexport type Hotel = ConfigHotel & {\n hotelID: string;\n\n hasLoadedDetails?: boolean;\n\n hotelServices: HotelServiceDTO[];\n businessServices: HotelServiceDTO[];\n rooms: HotelRoomsDTO;\n dataSource: HotelDataSource;\n\n lowestPrice?: {\n value: number;\n isLoading: boolean;\n };\n};\n\n/**\n * Used for DetailsHotel event\n */\nexport type InitialHotelDetailsEventPayload = {\n name: string;\n hotelID: number | string;\n hotelUrl: string;\n currency: string;\n language: Language;\n address?: HotelAddress;\n};\n"]}
@@ -15,8 +15,6 @@ export type TUserProfileFormValues = {
15
15
  [userProfileKey in EUserProfileFormKey]: string;
16
16
  };
17
17
  export interface ConfirmationFormValues {
18
- isPolicyConfirmed?: boolean;
19
- comment?: string;
20
18
  IATANumber?: string;
21
19
  userProfiles: TUserProfileFormValues[];
22
20
  copyCheckBox?: boolean;
@@ -1 +1 @@
1
- {"version":3,"file":"Confirmation.js","sourceRoot":"/","sources":["src/models/Confirmation.ts"],"names":[],"mappings":";;;AAIA,IAAY,mBASX;AATD,WAAY,mBAAmB;IAC3B,4CAAqB,CAAA;IACrB,0CAAmB,CAAA;IACnB,sCAAe,CAAA;IACf,sCAAe,CAAA;IACf,0CAAmB,CAAA;IACnB,oCAAa,CAAA;IACb,4CAAqB,CAAA;IACrB,0CAAmB,CAAA;AACvB,CAAC,EATW,mBAAmB,GAAnB,2BAAmB,KAAnB,2BAAmB,QAS9B","sourcesContent":["import BasketRowDifferences from './BasketRowDifferences';\nimport ReservationsDTO from './Api/ReservationsDTO';\nimport { EBookingPaymentMethod, IBookingPayment } from '@roomstay/core';\n\nexport enum EUserProfileFormKey {\n Forename = 'Forename',\n Surname = 'Surname',\n Email = 'Email',\n Phone = 'Phone',\n Address = 'Address',\n City = 'City',\n PostCode = 'PostCode',\n Country = 'Country',\n}\n\nexport type TUserProfileFormValues = {\n [userProfileKey in EUserProfileFormKey]: string;\n};\n\nexport interface ConfirmationFormValues {\n isPolicyConfirmed?: boolean;\n comment?: string;\n IATANumber?: string;\n userProfiles: TUserProfileFormValues[];\n copyCheckBox?: boolean;\n paymentMethod: EBookingPaymentMethod;\n}\n\nexport interface IBookValidationResult {\n differences: BasketRowDifferences[];\n warnings: string[];\n}\n\nexport type FBookValidationCallback = (validationResult?: IBookValidationResult) => void;\nexport type FBookSuccessCallback = (data: ReservationsDTO) => void;\nexport type FBookValidateFunction = () => Promise<boolean>;\nexport type FBookGetPaymentDetails = () => Promise<IBookingPayment>;\n"]}
1
+ {"version":3,"file":"Confirmation.js","sourceRoot":"/","sources":["src/models/Confirmation.ts"],"names":[],"mappings":";;;AAIA,IAAY,mBASX;AATD,WAAY,mBAAmB;IAC3B,4CAAqB,CAAA;IACrB,0CAAmB,CAAA;IACnB,sCAAe,CAAA;IACf,sCAAe,CAAA;IACf,0CAAmB,CAAA;IACnB,oCAAa,CAAA;IACb,4CAAqB,CAAA;IACrB,0CAAmB,CAAA;AACvB,CAAC,EATW,mBAAmB,GAAnB,2BAAmB,KAAnB,2BAAmB,QAS9B","sourcesContent":["import BasketRowDifferences from './BasketRowDifferences';\nimport ReservationsDTO from './Api/ReservationsDTO';\nimport { EBookingPaymentMethod, IBookingPayment } from '@roomstay/core';\n\nexport enum EUserProfileFormKey {\n Forename = 'Forename',\n Surname = 'Surname',\n Email = 'Email',\n Phone = 'Phone',\n Address = 'Address',\n City = 'City',\n PostCode = 'PostCode',\n Country = 'Country',\n}\n\nexport type TUserProfileFormValues = {\n [userProfileKey in EUserProfileFormKey]: string;\n};\n\nexport interface ConfirmationFormValues {\n IATANumber?: string;\n userProfiles: TUserProfileFormValues[];\n copyCheckBox?: boolean;\n paymentMethod: EBookingPaymentMethod;\n}\n\nexport interface IBookValidationResult {\n differences: BasketRowDifferences[];\n warnings: string[];\n}\n\nexport type FBookValidationCallback = (validationResult?: IBookValidationResult) => void;\nexport type FBookSuccessCallback = (data: ReservationsDTO) => void;\nexport type FBookValidateFunction = () => Promise<boolean>;\nexport type FBookGetPaymentDetails = () => Promise<IBookingPayment>;\n"]}
@@ -36,8 +36,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
36
36
  };
37
37
  Object.defineProperty(exports, "__esModule", { value: true });
38
38
  exports.EFindReservationPath = exports.QUERY_PARAM_NAME = void 0;
39
- const react_1 = __importDefault(require("react"));
40
- const react_2 = require("react");
39
+ const react_1 = __importStar(require("react"));
41
40
  const react_i18next_1 = require("react-i18next");
42
41
  const Headline_1 = __importDefault(require("../../components/generic/Headline"));
43
42
  const TextBox_1 = __importDefault(require("../../components/generic/TextBox"));
@@ -61,6 +60,7 @@ const UnauthenticatedUserModal_1 = require("../../components/generic/modal/Signi
61
60
  const MemberPortalFeature_1 = __importDefault(require("../../providers/feature/MemberPortalFeature"));
62
61
  const Validation_1 = require("../../util/Validation");
63
62
  const SmallSpinner_1 = __importDefault(require("../../components/generic/loader/SmallSpinner"));
63
+ const ImageProvider_1 = __importStar(require("../../providers/ImageProvider"));
64
64
  const SignInForm = react_1.default.lazy(() => Promise.resolve().then(() => __importStar(require('../../components/User/Forms/SignInForm'))).then(({ SignInForm }) => ({
65
65
  default: SignInForm,
66
66
  })));
@@ -102,12 +102,12 @@ function FindReservation() {
102
102
  }
103
103
  };
104
104
  const { path } = (0, react_router_dom_1.useParams)();
105
- const firstTime = (0, react_2.useRef)(true);
106
- const nextViewingScreen = (0, react_2.useRef)(null);
107
- const [isLoading, setIsLoading] = (0, react_2.useState)(false);
108
- const [apiErrorMessages, setApiErrorMessages] = (0, react_2.useState)('');
109
- const [viewingScreen, setViewingScreen] = (0, react_2.useState)(pathToScreenMapping[path]);
110
- (0, react_2.useEffect)(() => {
105
+ const firstTime = (0, react_1.useRef)(true);
106
+ const nextViewingScreen = (0, react_1.useRef)(null);
107
+ const [isLoading, setIsLoading] = (0, react_1.useState)(false);
108
+ const [apiErrorMessages, setApiErrorMessages] = (0, react_1.useState)('');
109
+ const [viewingScreen, setViewingScreen] = (0, react_1.useState)(pathToScreenMapping[path]);
110
+ (0, react_1.useEffect)(() => {
111
111
  if (firstTime.current) {
112
112
  firstTime.current = false;
113
113
  setViewingScreen(pathToScreenMapping[path]);
@@ -132,10 +132,10 @@ function FindReservation() {
132
132
  });
133
133
  };
134
134
  const { raise } = (0, hooks_1.useEvent)();
135
- (0, react_2.useEffect)(() => {
135
+ (0, react_1.useEffect)(() => {
136
136
  const background = document.createElement('div');
137
137
  background.classList.add('dbe-background');
138
- background.style.backgroundImage = `url('${hotel === null || hotel === void 0 ? void 0 : hotel.heroImage}')`;
138
+ background.style.backgroundImage = `url('${(hotel === null || hotel === void 0 ? void 0 : hotel.heroImage) && ImageProvider_1.default.resizeImage(hotel === null || hotel === void 0 ? void 0 : hotel.heroImage, ImageProvider_1.ImageSize.Original)}')`;
139
139
  RoomstayThemeEngine_1.default.EngineContainer.classList.add('--transparent-bg');
140
140
  RoomstayThemeEngine_1.default.EngineContainer.appendChild(background);
141
141
  const event = new events_1.FindReservationViewEvent();
@@ -150,7 +150,7 @@ function FindReservation() {
150
150
  }
151
151
  };
152
152
  }, []);
153
- (0, react_2.useEffect)(() => {
153
+ (0, react_1.useEffect)(() => {
154
154
  if (hotel === null || hotel === void 0 ? void 0 : hotel.forwardFindReservationToSynxis) {
155
155
  window.open(`https://be.synxis.com/signin?hotel=` + hotel.hotelID);
156
156
  }
@@ -246,7 +246,7 @@ function FindReservation() {
246
246
  react_1.default.createElement("div", { className: "col-md-6 col-xl-4 u-fill-white u-pad--heavy u-shadow-accent-large u-border-rounded" },
247
247
  react_1.default.createElement(AutoAutoHeight_1.default, { open: true, startOpen: true },
248
248
  react_1.default.createElement(Fade_1.default, { open: viewingScreen === 'Default', onExitCompletely: onExit }, defaultContents),
249
- react_1.default.createElement(react_2.Suspense, { fallback: SmallSpinner_1.default },
249
+ react_1.default.createElement(react_1.Suspense, { fallback: SmallSpinner_1.default },
250
250
  react_1.default.createElement(Fade_1.default, { open: viewingScreen === 'SignIn', onExitCompletely: onExit }, signInForm),
251
251
  react_1.default.createElement(Fade_1.default, { open: viewingScreen === 'SignUp', onExitCompletely: onExit }, signUpForm),
252
252
  react_1.default.createElement(Fade_1.default, { open: viewingScreen === 'ForgotPassword', onExitCompletely: onExit }, forgotPasswordForm))))))));
@@ -1 +1 @@
1
- {"version":3,"file":"FindReservation.js","sourceRoot":"/","sources":["src/pages/findReservation/FindReservation.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,kDAA0B;AAC1B,iCAA8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uCAAK,SAAS,EAAC,oFAAoF;oBAC/F,8BAAC,wBAAc,IAAC,IAAI,QAAC,SAAS;wBAC1B,8BAAC,cAAa,IAAC,IAAI,EAAE,aAAa,KAAK,SAAS,EAAE,gBAAgB,EAAE,MAAM,IACrE,eAAe,CACJ;wBAChB,8BAAC,gBAAQ,IAAC,QAAQ,EAAE,sBAAY;4BAC5B,8BAAC,cAAa,IAAC,IAAI,EAAE,aAAa,KAAK,QAAQ,EAAE,gBAAgB,EAAE,MAAM,IACpE,UAAU,CACC;4BAChB,8BAAC,cAAa,IAAC,IAAI,EAAE,aAAa,KAAK,QAAQ,EAAE,gBAAgB,EAAE,MAAM,IACpE,UAAU,CACC;4BAChB,8BAAC,cAAa,IAAC,IAAI,EAAE,aAAa,KAAK,gBAAgB,EAAE,gBAAgB,EAAE,MAAM,IAC5E,kBAAkB,CACP,CACT,CACE,CACf,CACJ,CACJ,CACJ,CACT,CAAC;AACN,CAAC;AA5QD,kCA4QC","sourcesContent":["import React from 'react';\nimport { useEffect, useRef, useState, Suspense } from 'react';\nimport { useTranslation } from 'react-i18next';\nimport Headline from '@/components/generic/Headline';\nimport TextBox from '@/components/generic/TextBox';\nimport Text, { TextType } from '@/components/generic/Text';\nimport { Color } from '@/util/Color';\nimport BEButton from '@/components/generic/BEButton';\nimport { useForm } from 'react-hook-form';\nimport { IconType } from '@/components/generic/Icon/Icon';\nimport API from '@/api/BookingAPI';\nimport AutoAutoHeight from '@/animations/AutoAutoHeight';\nimport Alert, { AlertType } from '@/components/generic/Alert';\nimport { useHistory, useParams } from 'react-router-dom';\nimport RoomstayThemeEngine from '@/providers/RoomstayThemeEngine';\nimport LineBreak from '@/components/generic/LineBreak';\nimport { useCurrentHotel, useEvent } from '@frontend/hooks';\nimport { Translation } from 'translations/Translation';\nimport StepManager from '@/util/StepManager';\nimport FadeAnimation from '@/animations/Fade';\nimport { FindReservationViewEvent } from '@frontend/events';\nimport { EViewingScreen } from '@/components/generic/modal/SigninModal/UnauthenticatedUserModal';\nimport MemberPortalFeature from '@/providers/feature/MemberPortalFeature';\nimport { EMAIL_REGEX } from '@/util/Validation';\nimport SmallSpinner from '@/components/generic/loader/SmallSpinner';\n\nconst SignInForm = React.lazy(() =>\n import('@/components/User/Forms/SignInForm').then(({ SignInForm }) => ({\n default: SignInForm,\n }))\n);\nconst SignUpForm = React.lazy(() =>\n import('@/components/User/Forms/SignUpForm').then(({ SignUpForm }) => ({\n default: SignUpForm,\n }))\n);\nconst ForgotPasswordForm = React.lazy(() =>\n import('@/components/User/Forms/ForgotPasswordForm').then(({ ForgotPasswordForm }) => ({\n default: ForgotPasswordForm,\n }))\n);\n\nexport const QUERY_PARAM_NAME = 'path';\n\nexport enum EFindReservationPath {\n FindReservation = 'find-reservation',\n Login = 'login',\n Register = 'register',\n Forgot = 'forgot',\n}\n\nconst pathToScreenMapping: { [path in EFindReservationPath]: EViewingScreen } = {\n [EFindReservationPath.FindReservation]: EViewingScreen.Default,\n [EFindReservationPath.Login]: EViewingScreen.SignIn,\n [EFindReservationPath.Register]: EViewingScreen.SignUp,\n [EFindReservationPath.Forgot]: EViewingScreen.ForgotPassword,\n};\n\ninterface IQueryParams {\n [QUERY_PARAM_NAME]: EFindReservationPath;\n}\n\nexport default function FindReservation() {\n const { hotel } = useCurrentHotel();\n\n const { t } = useTranslation();\n\n const { register, formState, handleSubmit, getValues } = useForm({\n mode: 'onChange',\n });\n\n const errors = formState.errors;\n\n const getValidationClass = (name: string) => {\n if (errors && formState.touchedFields[name]) {\n if (errors[name]) {\n return 'error';\n } else {\n return 'success';\n }\n }\n };\n\n const { path }: IQueryParams = useParams<IQueryParams>();\n const firstTime = useRef<boolean>(true);\n const nextViewingScreen = useRef<EViewingScreen | null>(null);\n\n const [isLoading, setIsLoading] = useState(false);\n const [apiErrorMessages, setApiErrorMessages] = useState('');\n const [viewingScreen, setViewingScreen] = useState<EViewingScreen | null>(pathToScreenMapping[path]);\n\n useEffect(() => {\n if (firstTime.current) {\n firstTime.current = false;\n setViewingScreen(pathToScreenMapping[path]);\n } else {\n setViewingScreen(null);\n nextViewingScreen.current = pathToScreenMapping[path];\n }\n }, [path]);\n\n const history = useHistory();\n\n const onSubmit = () => {\n setIsLoading(true);\n setApiErrorMessages('');\n\n API.Reservation.findReservation(getValues('Ref'), getValues('Email'), hotel?.hotelID as string)\n .then((data) => {\n history.push(`/find-reservation/${getValues('Ref')}/${getValues('Email')}`);\n })\n .catch(({ Message }) => {\n console.log(Message);\n setApiErrorMessages(Message);\n setIsLoading(false);\n });\n };\n\n const { raise } = useEvent();\n\n useEffect(() => {\n const background = document.createElement('div');\n background.classList.add('dbe-background');\n background.style.backgroundImage = `url('${hotel?.heroImage}')`;\n\n RoomstayThemeEngine.EngineContainer.classList.add('--transparent-bg');\n RoomstayThemeEngine.EngineContainer.appendChild(background);\n\n const event = new FindReservationViewEvent();\n raise(event);\n\n return () => {\n try {\n RoomstayThemeEngine.EngineContainer.removeChild(background);\n RoomstayThemeEngine.EngineContainer.classList.remove('--transparent-bg');\n } catch (ex) {\n console.log('Unable to remove bg');\n }\n };\n }, []);\n\n useEffect(() => {\n if (hotel?.forwardFindReservationToSynxis) {\n window.open(`https://be.synxis.com/signin?hotel=` + hotel.hotelID);\n }\n }, [hotel]);\n\n const onBack = async () => {\n history.push(StepManager.getFirstStep().getStepUrl());\n };\n\n const handleSubmitOnClick = () => {\n handleSubmit(onSubmit)();\n };\n\n const onSignInClicked = () => {\n history.push(`/${EFindReservationPath.Login}`);\n };\n\n const onBackToItineraryClicked = () => {\n history.push(`/${EFindReservationPath.FindReservation}`);\n };\n\n const onSignUpClicked = () => {\n history.push(`/${EFindReservationPath.Register}`);\n };\n\n const onForgotPasswordClicked = () => {\n history.push(`/${EFindReservationPath.Forgot}`);\n };\n\n const onExit = () => {\n setViewingScreen(nextViewingScreen.current);\n };\n\n const defaultContents = (\n <form onSubmit={handleSubmit(onSubmit)}>\n <div className=\"u-marg-bottom--heavy\">\n <Headline size=\"extra-large\">{t(Translation.FindReservation.FindYourReservation)}</Headline>\n </div>\n <AutoAutoHeight open={!!apiErrorMessages}>\n <div className=\"u-flex\">\n <Alert type={AlertType.Danger} icon={IconType.Error}>\n <Text type={TextType.Small}>{apiErrorMessages}</Text>\n </Alert>\n </div>\n </AutoAutoHeight>\n <div className=\"u-marg-bottom\">\n <div className=\"u-marg-bottom--light\">\n <Text type={TextType.Label} color={Color.Navy}>\n <strong>{t(Translation.FindReservation.Confirmation)}</strong>\n </Text>\n </div>\n <TextBox\n placeholder=\"51244AB23101\"\n required\n validationStatus={getValidationClass('Ref')}\n {...register('Ref', {\n required: true,\n })}\n />\n </div>\n <div className=\"u-marg-bottom\">\n <div className=\"u-marg-bottom--light\">\n <Text type={TextType.Label} color={Color.Navy}>\n <strong>{t(Translation.FindReservation.EmailAddress)}</strong>\n </Text>\n </div>\n <TextBox\n placeholder=\"example@mail.com\"\n required\n validationStatus={getValidationClass('Email')}\n {...register('Email', {\n required: true,\n pattern: {\n value: EMAIL_REGEX,\n message: t(Translation.FindReservation.InvalidEmailAddress),\n },\n })}\n />\n </div>\n <div className=\"u-flex justify-content-end w-100\">\n <BEButton primary filled mobileWidth isLoading={isLoading} icon={IconType.ArrowRight} iconPosition=\"right\" onClick={handleSubmitOnClick}>\n {t(Translation.FindReservation.FindReservation)}\n </BEButton>\n <button type=\"submit\" className=\"u-none\">\n {t(Translation.FindReservation.Submit)}\n </button>\n </div>\n <LineBreak />\n {MemberPortalFeature.isActive() && (\n <div className=\"u-marg-bottom--heavy\">\n <BEButton isText primary size=\"small\" onClick={onSignInClicked}>\n Or sign in for more\n </BEButton>\n </div>\n )}\n <div className=\"u-marg-bottom--light\">\n <Text type={TextType.Small}>\n <strong>{t(Translation.FindReservation.Question)}</strong>\n </Text>\n </div>\n <Text type={TextType.Small}>{t(Translation.FindReservation.Answer1)}</Text>\n <Text type={TextType.Small}>{t(Translation.FindReservation.Answer2)}</Text>\n <LineBreak />\n <BEButton textColor={Color.Accent} primary={false} filled={false} mobileWidth size=\"small\" icon={IconType.ArrowLeft2} iconPosition=\"left\" onClick={onBack} isText>\n {t(Translation.FindReservation.Back)}\n </BEButton>\n </form>\n );\n\n const signInForm = (\n <>\n <SignInForm onForgotPassword={onForgotPasswordClicked} />\n <LineBreak />\n <div className=\"u-marg-bottom--heavy\">\n <BEButton isText primary size=\"small\" onClick={onBackToItineraryClicked}>\n Or use Confirmation/Itinerary Number\n </BEButton>\n </div>\n <Text type={TextType.Small} bold className=\"u-marg-bottom--light\">\n No online account?\n </Text>\n <Text type={TextType.Small}>\n <BEButton isText size=\"small\" primary onClick={onSignUpClicked}>\n Sign up\n </BEButton>{' '}\n to save time on your next booking.\n </Text>\n </>\n );\n\n const signUpForm = (\n <>\n <SignUpForm />\n <LineBreak />\n <Text type={TextType.Small} bold className=\"u-marg-bottom--light\">\n Already have an account?\n </Text>\n <Text type={TextType.Small}>\n <BEButton isText size=\"small\" primary onClick={onSignInClicked}>\n Sign in\n </BEButton>{' '}\n to login with your account.\n </Text>\n </>\n );\n\n const forgotPasswordForm = (\n <>\n <ForgotPasswordForm onCancelled={onSignInClicked} />\n <LineBreak />\n <Text type={TextType.Small} bold className=\"u-marg-bottom--light\">\n No online account?\n </Text>\n <Text type={TextType.Small}>\n <BEButton isText size=\"small\" primary onClick={onSignUpClicked}>\n Sign up\n </BEButton>{' '}\n to save time on your next booking.\n </Text>\n </>\n );\n\n return (\n <div className=\"u-pad-left u-pad-right\">\n <div className=\"container u-marg-top--heavy u-pad-bottom--massive\">\n <div className=\"row u-pad-bottom--massive\">\n <div className=\"col-md-6 col-xl-4 u-fill-white u-pad--heavy u-shadow-accent-large u-border-rounded\">\n <AutoAutoHeight open startOpen>\n <FadeAnimation open={viewingScreen === 'Default'} onExitCompletely={onExit}>\n {defaultContents}\n </FadeAnimation>\n <Suspense fallback={SmallSpinner}>\n <FadeAnimation open={viewingScreen === 'SignIn'} onExitCompletely={onExit}>\n {signInForm}\n </FadeAnimation>\n <FadeAnimation open={viewingScreen === 'SignUp'} onExitCompletely={onExit}>\n {signUpForm}\n </FadeAnimation>\n <FadeAnimation open={viewingScreen === 'ForgotPassword'} onExitCompletely={onExit}>\n {forgotPasswordForm}\n </FadeAnimation>\n </Suspense>\n </AutoAutoHeight>\n </div>\n </div>\n </div>\n </div>\n );\n}\n"]}
1
+ {"version":3,"file":"FindReservation.js","sourceRoot":"/","sources":["src/pages/findReservation/FindReservation.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,+CAAqE;AACrE,iDAA+C;AAC/C,6EAAqD;AACrD,2EAAmD;AACnD,kEAA2D;AAC3D,wCAAqC;AACrC,6EAAqD;AACrD,qDAA0C;AAC1C,yDAA0D;AAC1D,kEAAmC;AACnC,iFAAyD;AACzD,oEAA8D;AAC9D,uDAAyD;AACzD,0FAAkE;AAClE,+EAAuD;AACvD,2CAA4D;AAC5D,0DAAuD;AACvD,qEAA6C;AAC7C,6DAA8C;AAC9C,6CAA4D;AAC5D,8GAAiG;AACjG,kGAA0E;AAC1E,kDAAgD;AAChD,4FAAoE;AACpE,2EAAqE;AAErE,MAAM,UAAU,GAAG,eAAK,CAAC,IAAI,CAAC,GAAG,EAAE,CAC/B,kDAAO,oCAAoC,IAAE,IAAI,CAAC,CAAC,EAAE,UAAU,EAAE,EAAE,EAAE,CAAC,CAAC;IACnE,OAAO,EAAE,UAAU;CACtB,CAAC,CAAC,CACN,CAAC;AACF,MAAM,UAAU,GAAG,eAAK,CAAC,IAAI,CAAC,GAAG,EAAE,CAC/B,kDAAO,oCAAoC,IAAE,IAAI,CAAC,CAAC,EAAE,UAAU,EAAE,EAAE,EAAE,CAAC,CAAC;IACnE,OAAO,EAAE,UAAU;CACtB,CAAC,CAAC,CACN,CAAC;AACF,MAAM,kBAAkB,GAAG,eAAK,CAAC,IAAI,CAAC,GAAG,EAAE,CACvC,kDAAO,4CAA4C,IAAE,IAAI,CAAC,CAAC,EAAE,kBAAkB,EAAE,EAAE,EA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AE,eAAe,GAAI;QACpD,8BAAC,mBAAS,OAAG;QACb,8BAAC,cAAI,IAAC,IAAI,EAAE,eAAQ,CAAC,KAAK,EAAE,IAAI,QAAC,SAAS,EAAC,sBAAsB,yBAE1D;QACP,8BAAC,cAAI,IAAC,IAAI,EAAE,eAAQ,CAAC,KAAK;YACtB,8BAAC,kBAAQ,IAAC,MAAM,QAAC,IAAI,EAAC,OAAO,EAAC,OAAO,QAAC,OAAO,EAAE,eAAe,cAEnD;YAAC,GAAG;iDAEZ,CACR,CACN,CAAC;IAEF,OAAO,CACH,uCAAK,SAAS,EAAC,wBAAwB;QACnC,uCAAK,SAAS,EAAC,mDAAmD;YAC9D,uCAAK,SAAS,EAAC,2BAA2B;gBACtC,uCAAK,SAAS,EAAC,oFAAoF;oBAC/F,8BAAC,wBAAc,IAAC,IAAI,QAAC,SAAS;wBAC1B,8BAAC,cAAa,IAAC,IAAI,EAAE,aAAa,KAAK,SAAS,EAAE,gBAAgB,EAAE,MAAM,IACrE,eAAe,CACJ;wBAChB,8BAAC,gBAAQ,IAAC,QAAQ,EAAE,sBAAY;4BAC5B,8BAAC,cAAa,IAAC,IAAI,EAAE,aAAa,KAAK,QAAQ,EAAE,gBAAgB,EAAE,MAAM,IACpE,UAAU,CACC;4BAChB,8BAAC,cAAa,IAAC,IAAI,EAAE,aAAa,KAAK,QAAQ,EAAE,gBAAgB,EAAE,MAAM,IACpE,UAAU,CACC;4BAChB,8BAAC,cAAa,IAAC,IAAI,EAAE,aAAa,KAAK,gBAAgB,EAAE,gBAAgB,EAAE,MAAM,IAC5E,kBAAkB,CACP,CACT,CACE,CACf,CACJ,CACJ,CACJ,CACT,CAAC;AACN,CAAC;AA5QD,kCA4QC","sourcesContent":["import React, { Suspense, useEffect, useRef, useState } from 'react';\nimport { useTranslation } from 'react-i18next';\nimport Headline from '@/components/generic/Headline';\nimport TextBox from '@/components/generic/TextBox';\nimport Text, { TextType } from '@/components/generic/Text';\nimport { Color } from '@/util/Color';\nimport BEButton from '@/components/generic/BEButton';\nimport { useForm } from 'react-hook-form';\nimport { IconType } from '@/components/generic/Icon/Icon';\nimport API from '@/api/BookingAPI';\nimport AutoAutoHeight from '@/animations/AutoAutoHeight';\nimport Alert, { AlertType } from '@/components/generic/Alert';\nimport { useHistory, useParams } from 'react-router-dom';\nimport RoomstayThemeEngine from '@/providers/RoomstayThemeEngine';\nimport LineBreak from '@/components/generic/LineBreak';\nimport { useCurrentHotel, useEvent } from '@frontend/hooks';\nimport { Translation } from 'translations/Translation';\nimport StepManager from '@/util/StepManager';\nimport FadeAnimation from '@/animations/Fade';\nimport { FindReservationViewEvent } from '@frontend/events';\nimport { EViewingScreen } from '@/components/generic/modal/SigninModal/UnauthenticatedUserModal';\nimport MemberPortalFeature from '@/providers/feature/MemberPortalFeature';\nimport { EMAIL_REGEX } from '@/util/Validation';\nimport SmallSpinner from '@/components/generic/loader/SmallSpinner';\nimport ImageProvider, { ImageSize } from '@/providers/ImageProvider';\n\nconst SignInForm = React.lazy(() =>\n import('@/components/User/Forms/SignInForm').then(({ SignInForm }) => ({\n default: SignInForm,\n }))\n);\nconst SignUpForm = React.lazy(() =>\n import('@/components/User/Forms/SignUpForm').then(({ SignUpForm }) => ({\n default: SignUpForm,\n }))\n);\nconst ForgotPasswordForm = React.lazy(() =>\n import('@/components/User/Forms/ForgotPasswordForm').then(({ ForgotPasswordForm }) => ({\n default: ForgotPasswordForm,\n }))\n);\n\nexport const QUERY_PARAM_NAME = 'path';\n\nexport enum EFindReservationPath {\n FindReservation = 'find-reservation',\n Login = 'login',\n Register = 'register',\n Forgot = 'forgot',\n}\n\nconst pathToScreenMapping: { [path in EFindReservationPath]: EViewingScreen } = {\n [EFindReservationPath.FindReservation]: EViewingScreen.Default,\n [EFindReservationPath.Login]: EViewingScreen.SignIn,\n [EFindReservationPath.Register]: EViewingScreen.SignUp,\n [EFindReservationPath.Forgot]: EViewingScreen.ForgotPassword,\n};\n\ninterface IQueryParams {\n [QUERY_PARAM_NAME]: EFindReservationPath;\n}\n\nexport default function FindReservation() {\n const { hotel } = useCurrentHotel();\n\n const { t } = useTranslation();\n\n const { register, formState, handleSubmit, getValues } = useForm({\n mode: 'onChange',\n });\n\n const errors = formState.errors;\n\n const getValidationClass = (name: string) => {\n if (errors && formState.touchedFields[name]) {\n if (errors[name]) {\n return 'error';\n } else {\n return 'success';\n }\n }\n };\n\n const { path }: IQueryParams = useParams<IQueryParams>();\n const firstTime = useRef<boolean>(true);\n const nextViewingScreen = useRef<EViewingScreen | null>(null);\n\n const [isLoading, setIsLoading] = useState(false);\n const [apiErrorMessages, setApiErrorMessages] = useState('');\n const [viewingScreen, setViewingScreen] = useState<EViewingScreen | null>(pathToScreenMapping[path]);\n\n useEffect(() => {\n if (firstTime.current) {\n firstTime.current = false;\n setViewingScreen(pathToScreenMapping[path]);\n } else {\n setViewingScreen(null);\n nextViewingScreen.current = pathToScreenMapping[path];\n }\n }, [path]);\n\n const history = useHistory();\n\n const onSubmit = () => {\n setIsLoading(true);\n setApiErrorMessages('');\n\n API.Reservation.findReservation(getValues('Ref'), getValues('Email'), hotel?.hotelID as string)\n .then((data) => {\n history.push(`/find-reservation/${getValues('Ref')}/${getValues('Email')}`);\n })\n .catch(({ Message }) => {\n console.log(Message);\n setApiErrorMessages(Message);\n setIsLoading(false);\n });\n };\n\n const { raise } = useEvent();\n\n useEffect(() => {\n const background = document.createElement('div');\n background.classList.add('dbe-background');\n background.style.backgroundImage = `url('${hotel?.heroImage && ImageProvider.resizeImage(hotel?.heroImage, ImageSize.Original)}')`;\n\n RoomstayThemeEngine.EngineContainer.classList.add('--transparent-bg');\n RoomstayThemeEngine.EngineContainer.appendChild(background);\n\n const event = new FindReservationViewEvent();\n raise(event);\n\n return () => {\n try {\n RoomstayThemeEngine.EngineContainer.removeChild(background);\n RoomstayThemeEngine.EngineContainer.classList.remove('--transparent-bg');\n } catch (ex) {\n console.log('Unable to remove bg');\n }\n };\n }, []);\n\n useEffect(() => {\n if (hotel?.forwardFindReservationToSynxis) {\n window.open(`https://be.synxis.com/signin?hotel=` + hotel.hotelID);\n }\n }, [hotel]);\n\n const onBack = async () => {\n history.push(StepManager.getFirstStep().getStepUrl());\n };\n\n const handleSubmitOnClick = () => {\n handleSubmit(onSubmit)();\n };\n\n const onSignInClicked = () => {\n history.push(`/${EFindReservationPath.Login}`);\n };\n\n const onBackToItineraryClicked = () => {\n history.push(`/${EFindReservationPath.FindReservation}`);\n };\n\n const onSignUpClicked = () => {\n history.push(`/${EFindReservationPath.Register}`);\n };\n\n const onForgotPasswordClicked = () => {\n history.push(`/${EFindReservationPath.Forgot}`);\n };\n\n const onExit = () => {\n setViewingScreen(nextViewingScreen.current);\n };\n\n const defaultContents = (\n <form onSubmit={handleSubmit(onSubmit)}>\n <div className=\"u-marg-bottom--heavy\">\n <Headline size=\"extra-large\">{t(Translation.FindReservation.FindYourReservation)}</Headline>\n </div>\n <AutoAutoHeight open={!!apiErrorMessages}>\n <div className=\"u-flex\">\n <Alert type={AlertType.Danger} icon={IconType.Error}>\n <Text type={TextType.Small}>{apiErrorMessages}</Text>\n </Alert>\n </div>\n </AutoAutoHeight>\n <div className=\"u-marg-bottom\">\n <div className=\"u-marg-bottom--light\">\n <Text type={TextType.Label} color={Color.Navy}>\n <strong>{t(Translation.FindReservation.Confirmation)}</strong>\n </Text>\n </div>\n <TextBox\n placeholder=\"51244AB23101\"\n required\n validationStatus={getValidationClass('Ref')}\n {...register('Ref', {\n required: true,\n })}\n />\n </div>\n <div className=\"u-marg-bottom\">\n <div className=\"u-marg-bottom--light\">\n <Text type={TextType.Label} color={Color.Navy}>\n <strong>{t(Translation.FindReservation.EmailAddress)}</strong>\n </Text>\n </div>\n <TextBox\n placeholder=\"example@mail.com\"\n required\n validationStatus={getValidationClass('Email')}\n {...register('Email', {\n required: true,\n pattern: {\n value: EMAIL_REGEX,\n message: t(Translation.FindReservation.InvalidEmailAddress),\n },\n })}\n />\n </div>\n <div className=\"u-flex justify-content-end w-100\">\n <BEButton primary filled mobileWidth isLoading={isLoading} icon={IconType.ArrowRight} iconPosition=\"right\" onClick={handleSubmitOnClick}>\n {t(Translation.FindReservation.FindReservation)}\n </BEButton>\n <button type=\"submit\" className=\"u-none\">\n {t(Translation.FindReservation.Submit)}\n </button>\n </div>\n <LineBreak />\n {MemberPortalFeature.isActive() && (\n <div className=\"u-marg-bottom--heavy\">\n <BEButton isText primary size=\"small\" onClick={onSignInClicked}>\n Or sign in for more\n </BEButton>\n </div>\n )}\n <div className=\"u-marg-bottom--light\">\n <Text type={TextType.Small}>\n <strong>{t(Translation.FindReservation.Question)}</strong>\n </Text>\n </div>\n <Text type={TextType.Small}>{t(Translation.FindReservation.Answer1)}</Text>\n <Text type={TextType.Small}>{t(Translation.FindReservation.Answer2)}</Text>\n <LineBreak />\n <BEButton textColor={Color.Accent} primary={false} filled={false} mobileWidth size=\"small\" icon={IconType.ArrowLeft2} iconPosition=\"left\" onClick={onBack} isText>\n {t(Translation.FindReservation.Back)}\n </BEButton>\n </form>\n );\n\n const signInForm = (\n <>\n <SignInForm onForgotPassword={onForgotPasswordClicked} />\n <LineBreak />\n <div className=\"u-marg-bottom--heavy\">\n <BEButton isText primary size=\"small\" onClick={onBackToItineraryClicked}>\n Or use Confirmation/Itinerary Number\n </BEButton>\n </div>\n <Text type={TextType.Small} bold className=\"u-marg-bottom--light\">\n No online account?\n </Text>\n <Text type={TextType.Small}>\n <BEButton isText size=\"small\" primary onClick={onSignUpClicked}>\n Sign up\n </BEButton>{' '}\n to save time on your next booking.\n </Text>\n </>\n );\n\n const signUpForm = (\n <>\n <SignUpForm />\n <LineBreak />\n <Text type={TextType.Small} bold className=\"u-marg-bottom--light\">\n Already have an account?\n </Text>\n <Text type={TextType.Small}>\n <BEButton isText size=\"small\" primary onClick={onSignInClicked}>\n Sign in\n </BEButton>{' '}\n to login with your account.\n </Text>\n </>\n );\n\n const forgotPasswordForm = (\n <>\n <ForgotPasswordForm onCancelled={onSignInClicked} />\n <LineBreak />\n <Text type={TextType.Small} bold className=\"u-marg-bottom--light\">\n No online account?\n </Text>\n <Text type={TextType.Small}>\n <BEButton isText size=\"small\" primary onClick={onSignUpClicked}>\n Sign up\n </BEButton>{' '}\n to save time on your next booking.\n </Text>\n </>\n );\n\n return (\n <div className=\"u-pad-left u-pad-right\">\n <div className=\"container u-marg-top--heavy u-pad-bottom--massive\">\n <div className=\"row u-pad-bottom--massive\">\n <div className=\"col-md-6 col-xl-4 u-fill-white u-pad--heavy u-shadow-accent-large u-border-rounded\">\n <AutoAutoHeight open startOpen>\n <FadeAnimation open={viewingScreen === 'Default'} onExitCompletely={onExit}>\n {defaultContents}\n </FadeAnimation>\n <Suspense fallback={SmallSpinner}>\n <FadeAnimation open={viewingScreen === 'SignIn'} onExitCompletely={onExit}>\n {signInForm}\n </FadeAnimation>\n <FadeAnimation open={viewingScreen === 'SignUp'} onExitCompletely={onExit}>\n {signUpForm}\n </FadeAnimation>\n <FadeAnimation open={viewingScreen === 'ForgotPassword'} onExitCompletely={onExit}>\n {forgotPasswordForm}\n </FadeAnimation>\n </Suspense>\n </AutoAutoHeight>\n </div>\n </div>\n </div>\n </div>\n );\n}\n"]}
@@ -26,13 +26,12 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
26
26
  return (mod && mod.__esModule) ? mod : { "default": mod };
27
27
  };
28
28
  Object.defineProperty(exports, "__esModule", { value: true });
29
- const react_1 = __importDefault(require("react"));
29
+ const react_1 = __importStar(require("react"));
30
30
  const Color_1 = require("../../util/Color");
31
31
  const Icon_1 = __importStar(require("../../components/generic/Icon/Icon"));
32
32
  const Text_1 = __importStar(require("../../components/generic/Text"));
33
33
  const Headline_1 = __importDefault(require("../../components/generic/Headline"));
34
34
  const HotelLocationMap_1 = __importDefault(require("../../components/generic/map/HotelLocationMap"));
35
- const react_2 = require("react");
36
35
  const fslightbox_react_1 = __importDefault(require("fslightbox-react"));
37
36
  const TransportDistanceFromHotelBlock_1 = __importDefault(require("../../components/summary/TransportDistanceFromHotelBlock"));
38
37
  const hooks_1 = require("../../hooks/index.js");
@@ -50,8 +49,8 @@ function HotelInfo() {
50
49
  const { t } = (0, react_i18next_1.useTranslation)();
51
50
  const imageUrl = hotel === null || hotel === void 0 ? void 0 : hotel.heroImage;
52
51
  const { line1, line2, postalCode, country } = (_a = hotel === null || hotel === void 0 ? void 0 : hotel.address) !== null && _a !== void 0 ? _a : {};
53
- const [lightboxController, setLightboxController] = (0, react_2.useState)({ toggler: false, slide: 1 });
54
- const [images, setImages] = (0, react_2.useState)([]);
52
+ const [lightboxController, setLightboxController] = (0, react_1.useState)({ toggler: false, slide: 1 });
53
+ const [images, setImages] = (0, react_1.useState)([]);
55
54
  const openSlider = (slide) => {
56
55
  setLightboxController((controller) => ({ toggler: !controller.toggler, slide: slide + 1 }));
57
56
  };
@@ -59,11 +58,11 @@ function HotelInfo() {
59
58
  openSlider(4);
60
59
  };
61
60
  const { raise } = (0, hooks_1.useEvent)();
62
- (0, react_2.useEffect)(() => {
61
+ (0, react_1.useEffect)(() => {
63
62
  const event = new events_1.StepHotelInfoViewEvent();
64
63
  raise(event);
65
64
  }, []);
66
- (0, react_2.useEffect)(() => {
65
+ (0, react_1.useEffect)(() => {
67
66
  var _a, _b;
68
67
  const newImages = [];
69
68
  if ((_a = hotel === null || hotel === void 0 ? void 0 : hotel.images) === null || _a === void 0 ? void 0 : _a.length) {
@@ -89,7 +88,7 @@ function HotelInfo() {
89
88
  return (react_1.default.createElement("div", { style: { backgroundImage: `url('${resizedUrl}')`, paddingTop: '75%' }, className: "c-images u-block u-w-100 u-marg-bottom u-marg-bottom--heavy", onClick: openSliderOnClickHandler }));
90
89
  };
91
90
  return (react_1.default.createElement(react_1.default.Fragment, null,
92
- react_1.default.createElement("div", { style: { backgroundImage: `url('${imageUrl}')` }, className: "c-masthead has-tint" },
91
+ react_1.default.createElement("div", { style: { backgroundImage: `url('${imageUrl && ImageProvider_1.default.resizeImage(imageUrl, ImageProvider_1.ImageSize.Original)}')` }, className: "c-masthead has-tint" },
93
92
  react_1.default.createElement("div", { className: "container" },
94
93
  react_1.default.createElement("div", { className: "c-masthead__body u-fill-white u-pad--heavy u-shadow-accent" },
95
94
  react_1.default.createElement("h1", { className: "c-masthead__header" }, hotel === null || hotel === void 0 ? void 0 : hotel.name),
@@ -183,7 +182,7 @@ function HotelInfo() {
183
182
  react_1.default.createElement("span", null,
184
183
  "+ ",
185
184
  images.length - 5)))))))))),
186
- !!(images === null || images === void 0 ? void 0 : images.length) && react_1.default.createElement(fslightbox_react_1.default, { toggler: lightboxController.toggler, slide: lightboxController.slide, sources: images, type: "image" })));
185
+ !!(images === null || images === void 0 ? void 0 : images.length) && (react_1.default.createElement(fslightbox_react_1.default, { toggler: lightboxController.toggler, slide: lightboxController.slide, sources: images.map((image) => ImageProvider_1.default.resizeImage(image, ImageProvider_1.ImageSize.Original)), type: "image" }))));
187
186
  }
188
187
  exports.default = HotelInfo;
189
188
  //# sourceMappingURL=HotelInfo.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"HotelInfo.js","sourceRoot":"/","sources":["src/pages/hotel/HotelInfo.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,kDAA0B;AAC1B,wCAAqC;AACrC,uEAAgE;AAChE,kEAA2D;AAC3D,6EAAqD;AACrD,iGAAyE;AACzE,iCAA4C;AAC5C,wEAA0C;AAC1C,2HAAmG;AACnG,2CAA4D;AAC5D,6EAAqD;AACrD,uDAA8C;AAC9C,qEAA6C;AAC7C,iDAA+C;AAC/C,0DAAuD;AACvD,2EAAqE;AACrE,6CAA0D;AAE1D,SAAwB,SAAS;;IAC7B,MAAM,EAAE,KAAK,EAAE,GAAG,IAAA,uBAAe,GAAE,CAAC;IACpC,MAAM,OAAO,GAAG,IAAA,6BAAU,GAAE,CAAC;IAC7B,MAAM,EAAE,CAAC,EAAE,GAAG,IAAA,8BAAc,GAAE,CAAC;IAE/B,MAAM,QAAQ,GAAG,KAAK,aAAL,KAAK,uBAAL,KAA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C,UAAU;wBACrB,uCAAK,SAAS,EAAC,oCAAoC;4BAC/C,uCAAK,SAAS,EAAC,oCAAoC;gCAC/C,8BAAC,kBAAQ,IAAC,IAAI,oBAAmB,CAC/B;4BACL,MAAM,CAAC,MAAM,IAAI,CAAC,IAAI,QAAQ,CAAC,CAAC,CAAC;4BAClC,uCAAK,SAAS,EAAC,KAAK;gCACf,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE;oCACrB,IAAI,MAAM,CAAC,MAAM,GAAG,KAAK,EAAE;wCACvB,OAAO,CACH,uCAAK,GAAG,EAAE,KAAK,EAAE,SAAS,EAAC,OAAO,IAC7B,QAAQ,CAAC,KAAK,CAAC,CACd,CACT,CAAC;qCACL;gCACL,CAAC,CAAC;gCACD,MAAM,CAAC,MAAM,GAAG,CAAC,IAAI,CAClB,uCAAK,SAAS,EAAC,OAAO;oCAClB,uCAAK,SAAS,EAAC,yBAAyB,EAAC,OAAO,EAAE,iBAAiB;wCAC9D,QAAQ,CAAC,CAAC,CAAC;wCACZ;;4CAAS,MAAM,CAAC,MAAM,GAAG,CAAC,CAAQ,CAChC,CACJ,CACT,CACC,CACJ,CACJ,CACJ,CACJ,CACJ;QACL,CAAC,CAAC,CAAA,MAAM,aAAN,MAAM,uBAAN,MAAM,CAAE,MAAM,CAAA,IAAI,8BAAC,0BAAU,IAAC,OAAO,EAAE,kBAAkB,CAAC,OAAO,EAAE,KAAK,EAAE,kBAAkB,CAAC,KAAK,EAAE,OAAO,EAAE,MAAM,EAAE,IAAI,EAAC,OAAO,GAAG,CACxI,CACN,CAAC;AACN,CAAC;AAzOD,4BAyOC","sourcesContent":["import React from 'react';\nimport { Color } from '@/util/Color';\nimport Icon, { IconType } from '@/components/generic/Icon/Icon';\nimport Text, { TextType } from '@/components/generic/Text';\nimport Headline from '@/components/generic/Headline';\nimport HotelLocationMap from '@/components/generic/map/HotelLocationMap';\nimport { useState, useEffect } from 'react';\nimport FsLightbox from 'fslightbox-react';\nimport TransportDistanceFromHotelBlock from '@/components/summary/TransportDistanceFromHotelBlock';\nimport { useCurrentHotel, useEvent } from '@frontend/hooks';\nimport BEButton from '@/components/generic/BEButton';\nimport { useHistory } from 'react-router-dom';\nimport StepManager from '@/util/StepManager';\nimport { useTranslation } from 'react-i18next';\nimport { Translation } from 'translations/Translation';\nimport ImageProvider, { ImageSize } from '@/providers/ImageProvider';\nimport { StepHotelInfoViewEvent } from '@frontend/events';\n\nexport default function HotelInfo() {\n const { hotel } = useCurrentHotel();\n const history = useHistory();\n const { t } = useTranslation();\n\n const imageUrl = hotel?.heroImage;\n\n const { line1, line2, postalCode, country } = hotel?.address ?? {};\n\n const [lightboxController, setLightboxController] = useState({ toggler: false, slide: 1 });\n const [images, setImages] = useState<string[]>([]);\n\n const openSlider = (slide: number) => {\n setLightboxController((controller) => ({ toggler: !controller.toggler, slide: slide + 1 }));\n };\n const openSliderOnClick = () => {\n openSlider(4);\n };\n\n const { raise } = useEvent();\n\n useEffect(() => {\n const event = new StepHotelInfoViewEvent();\n raise(event);\n }, []);\n\n useEffect(() => {\n const newImages: string[] = [];\n\n if (hotel?.images?.length) {\n newImages.push(...hotel.images);\n } else if (hotel?.rooms) {\n for (const room of Object.values(hotel?.rooms)) {\n room.images?.forEach((image) => {\n newImages.push(image);\n });\n }\n }\n\n setImages(newImages);\n }, [hotel?.rooms]);\n\n const onBookNowClick = () => {\n history.push(StepManager.getFirstStep().getStepUrl());\n };\n\n const getImage = (index: number) => {\n const openSliderOnClickHandler = () => {\n openSlider(index);\n };\n\n const resizedUrl = ImageProvider.resizeImage(images[index], ImageSize.Small);\n\n return (\n <div\n style={{ backgroundImage: `url('${resizedUrl}')`, paddingTop: '75%' }}\n className=\"c-images u-block u-w-100 u-marg-bottom u-marg-bottom--heavy\"\n onClick={openSliderOnClickHandler}\n />\n );\n };\n\n return (\n <>\n <div style={{ backgroundImage: `url('${imageUrl}')` }} className=\"c-masthead has-tint\">\n <div className=\"container\">\n <div className=\"c-masthead__body u-fill-white u-pad--heavy u-shadow-accent\">\n <h1 className=\"c-masthead__header\">{hotel?.name}</h1>\n <h2 className=\"c-masthead__sub-header\">{hotel?.address?.country}</h2>\n </div>\n </div>\n </div>\n <div className=\"u-fill-snow u-pad--heavy-med u-pad-top-bottom--heavy@m-\">\n <div className=\"container\">\n <div className=\"row\">\n <div className=\"col-md-6 u-flex align-items-center\">\n <ul>\n <li className=\"u-flex u-marg-bottom--heavy\">\n <Icon icon={IconType.Map} size=\"1.3em\" color={Color.Accent} />\n <span className=\"u-flex__item u-marg-left\">\n {line1}\n <br />\n {line2} {postalCode}, {country}\n </span>\n </li>\n <li className=\"u-flex u-marg-bottom--heavy\">\n <Icon icon={IconType.Phone} size=\"1.3em\" color={Color.Accent} />\n <span className=\"u-flex__item u-marg-left\">{hotel?.phone}</span>\n </li>\n <li className=\"u-flex u-marg-bottom--heavy\">\n <Icon icon={IconType.Hotel2} size=\"1.3em\" color={Color.Accent} />\n <span className=\"u-flex__item u-marg-left\">\n <a href={hotel?.hotelUrl} style={{ color: 'var(--rs-color-accent-1)' }}>\n {hotel?.name}\n </a>\n </span>\n </li>\n <li className=\"u-flex\">\n <BEButton icon={IconType.ArrowRight} primary filled iconPosition=\"right\" onClick={onBookNowClick}>\n {t(Translation.HotelInfo.BookNowButton)}\n </BEButton>\n </li>\n </ul>\n </div>\n <div className=\"col-md-6\">\n <div className=\"c-overlap\">\n <div className=\"u-marg-bottom u-marg-bottom--heavy u-marg-top u-marg-top--heavy\" style={{ height: '240px' }}>\n <HotelLocationMap />\n </div>\n <div className=\"u-flex u-flex-column justify-content-center\">\n <TransportDistanceFromHotelBlock hotel={hotel} />\n </div>\n </div>\n </div>\n </div>\n </div>\n </div>\n <div className=\"u-pad u-pad--heavy-plus u-pad-top-bottom--heavy@m-\">\n <div className=\"container\">\n <div className=\"row\">\n <div className=\"col-lg-6\">\n <div className=\"u-marg-bottom u-marg-bottom--heavy\">\n <div className=\"u-marg-bottom u-marg-bottom--heavy\">\n <Headline bold>About</Headline>\n </div>\n <div className=\"u-marg-bottom u-marg-bottom--heavy\">\n <Text type={TextType.Small}>\n <span dangerouslySetInnerHTML={{ __html: hotel?.description?.replace('\\r\\n', '<br/><br/>') || '' }} />\n </Text>\n {!!hotel?.locationDescription && (\n <>\n <div className=\"u-marg-top\">\n <Text type={TextType.Small}>\n <strong>Location</strong>\n </Text>\n </div>\n <Text type={TextType.Small}>\n <span dangerouslySetInnerHTML={{ __html: hotel?.locationDescription?.replace('\\r\\n', '<br/><br/>') }} />\n </Text>\n </>\n )}\n </div>\n {!!hotel?.perks?.length && (\n <>\n <div className=\"u-marg-bottom u-marg-bottom--heavy\">\n <Text type={TextType.Small}>\n <strong>And you get all these for free:</strong>\n </Text>\n </div>\n <div className=\"row\">\n {hotel?.perks.map((perk) => {\n return (\n <div className=\"col-6 col-md-4\" key={perk.name}>\n <div className=\"u-flex u-marg-bottom\">\n <div className=\"room-perk-icon\">{perk.iconElement ? perk.iconElement : <Icon icon={perk.icon as IconType} />}</div>\n <span className=\"u-flex__item\">\n <Text type={TextType.Small}>{perk.name}</Text>\n </span>\n </div>\n </div>\n );\n })}\n </div>\n </>\n )}\n </div>\n {!!hotel?.hotelServices?.length && (\n <div className=\"u-marg-bottom u-marg-bottom--heavy\">\n <div className=\"u-marg-bottom--heavy\">\n <Headline bold>Hotel Amenities</Headline>\n </div>\n <div className=\"row\">\n {hotel?.hotelServices.map((hotelService, index) => {\n return (\n <div key={index} className=\"col-md-6\">\n <div className=\"u-flex u-marg-bottom\">\n <Icon icon={IconType.Check} color={Color.White} backgroundColor={Color.Accent} borderRadius=\"round\" noPadding size=\"16px\" />\n <span className=\"u-flex__item u-marg-left--light\">\n <Text type={TextType.Small}>{hotelService.name}</Text>\n </span>\n </div>\n </div>\n );\n })}\n </div>\n </div>\n )}\n {!!hotel?.policies && (\n <div className=\"u-marg-bottom u-marg-bottom--heavy\">\n <div className=\"u-marg-bottom--heavy\">\n <Headline bold>Policies</Headline>\n </div>\n <Text type={TextType.Small}>\n <a href={hotel?.policies} target=\"_blank\" style={{ color: hotel?.colors.accent }} rel=\"noreferrer\">\n {hotel?.policies}\n </a>\n </Text>\n </div>\n )}\n </div>\n <div className=\"col-lg-6\">\n <div className=\"u-marg-bottom u-marg-bottom--heavy\">\n <div className=\"u-marg-bottom u-marg-bottom--heavy\">\n <Headline bold>Gallery</Headline>\n </div>\n {images.length >= 1 && getImage(0)}\n <div className=\"row\">\n {[1, 2, 3].map((index) => {\n if (images.length > index) {\n return (\n <div key={index} className=\"col-6\">\n {getImage(index)}\n </div>\n );\n }\n })}\n {images.length > 5 && (\n <div className=\"col-6\">\n <div className=\"c-images c-images--more\" onClick={openSliderOnClick}>\n {getImage(4)}\n <span>+ {images.length - 5}</span>\n </div>\n </div>\n )}\n </div>\n </div>\n </div>\n </div>\n </div>\n </div>\n {!!images?.length && <FsLightbox toggler={lightboxController.toggler} slide={lightboxController.slide} sources={images} type=\"image\" />}\n </>\n );\n}\n"]}
1
+ {"version":3,"file":"HotelInfo.js","sourceRoot":"/","sources":["src/pages/hotel/HotelInfo.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,+CAAmD;AACnD,wCAAqC;AACrC,uEAAgE;AAChE,kEAA2D;AAC3D,6EAAqD;AACrD,iGAAyE;AACzE,wEAA0C;AAC1C,2HAAmG;AACnG,2CAA4D;AAC5D,6EAAqD;AACrD,uDAA8C;AAC9C,qEAA6C;AAC7C,iDAA+C;AAC/C,0DAAuD;AACvD,2EAAqE;AACrE,6CAA0D;AAE1D,SAAwB,SAAS;;IAC7B,MAAM,EAAE,KAAK,EAAE,GAAG,IAAA,uBAAe,GAAE,CAAC;IACpC,MAAM,OAAO,GAAG,IAAA,6BAAU,GAAE,CAAC;IAC7B,MAAM,EAAE,CAAC,EAAE,GAAG,IAAA,8BAAc,GAAE,CAAC;IAE/B,MAAM,QAAQ,GAAG,KAAK,a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,CACN,CAAC;AACN,CAAC;AAhPD,4BAgPC","sourcesContent":["import React, { useEffect, useState } from 'react';\nimport { Color } from '@/util/Color';\nimport Icon, { IconType } from '@/components/generic/Icon/Icon';\nimport Text, { TextType } from '@/components/generic/Text';\nimport Headline from '@/components/generic/Headline';\nimport HotelLocationMap from '@/components/generic/map/HotelLocationMap';\nimport FsLightbox from 'fslightbox-react';\nimport TransportDistanceFromHotelBlock from '@/components/summary/TransportDistanceFromHotelBlock';\nimport { useCurrentHotel, useEvent } from '@frontend/hooks';\nimport BEButton from '@/components/generic/BEButton';\nimport { useHistory } from 'react-router-dom';\nimport StepManager from '@/util/StepManager';\nimport { useTranslation } from 'react-i18next';\nimport { Translation } from 'translations/Translation';\nimport ImageProvider, { ImageSize } from '@/providers/ImageProvider';\nimport { StepHotelInfoViewEvent } from '@frontend/events';\n\nexport default function HotelInfo() {\n const { hotel } = useCurrentHotel();\n const history = useHistory();\n const { t } = useTranslation();\n\n const imageUrl = hotel?.heroImage;\n\n const { line1, line2, postalCode, country } = hotel?.address ?? {};\n\n const [lightboxController, setLightboxController] = useState({ toggler: false, slide: 1 });\n const [images, setImages] = useState<string[]>([]);\n\n const openSlider = (slide: number) => {\n setLightboxController((controller) => ({ toggler: !controller.toggler, slide: slide + 1 }));\n };\n const openSliderOnClick = () => {\n openSlider(4);\n };\n\n const { raise } = useEvent();\n\n useEffect(() => {\n const event = new StepHotelInfoViewEvent();\n raise(event);\n }, []);\n\n useEffect(() => {\n const newImages: string[] = [];\n\n if (hotel?.images?.length) {\n newImages.push(...hotel.images);\n } else if (hotel?.rooms) {\n for (const room of Object.values(hotel?.rooms)) {\n room.images?.forEach((image) => {\n newImages.push(image);\n });\n }\n }\n\n setImages(newImages);\n }, [hotel?.rooms]);\n\n const onBookNowClick = () => {\n history.push(StepManager.getFirstStep().getStepUrl());\n };\n\n const getImage = (index: number) => {\n const openSliderOnClickHandler = () => {\n openSlider(index);\n };\n\n const resizedUrl = ImageProvider.resizeImage(images[index], ImageSize.Small);\n\n return (\n <div\n style={{ backgroundImage: `url('${resizedUrl}')`, paddingTop: '75%' }}\n className=\"c-images u-block u-w-100 u-marg-bottom u-marg-bottom--heavy\"\n onClick={openSliderOnClickHandler}\n />\n );\n };\n\n return (\n <>\n <div style={{ backgroundImage: `url('${imageUrl && ImageProvider.resizeImage(imageUrl, ImageSize.Original)}')` }} className=\"c-masthead has-tint\">\n <div className=\"container\">\n <div className=\"c-masthead__body u-fill-white u-pad--heavy u-shadow-accent\">\n <h1 className=\"c-masthead__header\">{hotel?.name}</h1>\n <h2 className=\"c-masthead__sub-header\">{hotel?.address?.country}</h2>\n </div>\n </div>\n </div>\n <div className=\"u-fill-snow u-pad--heavy-med u-pad-top-bottom--heavy@m-\">\n <div className=\"container\">\n <div className=\"row\">\n <div className=\"col-md-6 u-flex align-items-center\">\n <ul>\n <li className=\"u-flex u-marg-bottom--heavy\">\n <Icon icon={IconType.Map} size=\"1.3em\" color={Color.Accent} />\n <span className=\"u-flex__item u-marg-left\">\n {line1}\n <br />\n {line2} {postalCode}, {country}\n </span>\n </li>\n <li className=\"u-flex u-marg-bottom--heavy\">\n <Icon icon={IconType.Phone} size=\"1.3em\" color={Color.Accent} />\n <span className=\"u-flex__item u-marg-left\">{hotel?.phone}</span>\n </li>\n <li className=\"u-flex u-marg-bottom--heavy\">\n <Icon icon={IconType.Hotel2} size=\"1.3em\" color={Color.Accent} />\n <span className=\"u-flex__item u-marg-left\">\n <a href={hotel?.hotelUrl} style={{ color: 'var(--rs-color-accent-1)' }}>\n {hotel?.name}\n </a>\n </span>\n </li>\n <li className=\"u-flex\">\n <BEButton icon={IconType.ArrowRight} primary filled iconPosition=\"right\" onClick={onBookNowClick}>\n {t(Translation.HotelInfo.BookNowButton)}\n </BEButton>\n </li>\n </ul>\n </div>\n <div className=\"col-md-6\">\n <div className=\"c-overlap\">\n <div className=\"u-marg-bottom u-marg-bottom--heavy u-marg-top u-marg-top--heavy\" style={{ height: '240px' }}>\n <HotelLocationMap />\n </div>\n <div className=\"u-flex u-flex-column justify-content-center\">\n <TransportDistanceFromHotelBlock hotel={hotel} />\n </div>\n </div>\n </div>\n </div>\n </div>\n </div>\n <div className=\"u-pad u-pad--heavy-plus u-pad-top-bottom--heavy@m-\">\n <div className=\"container\">\n <div className=\"row\">\n <div className=\"col-lg-6\">\n <div className=\"u-marg-bottom u-marg-bottom--heavy\">\n <div className=\"u-marg-bottom u-marg-bottom--heavy\">\n <Headline bold>About</Headline>\n </div>\n <div className=\"u-marg-bottom u-marg-bottom--heavy\">\n <Text type={TextType.Small}>\n <span dangerouslySetInnerHTML={{ __html: hotel?.description?.replace('\\r\\n', '<br/><br/>') || '' }} />\n </Text>\n {!!hotel?.locationDescription && (\n <>\n <div className=\"u-marg-top\">\n <Text type={TextType.Small}>\n <strong>Location</strong>\n </Text>\n </div>\n <Text type={TextType.Small}>\n <span dangerouslySetInnerHTML={{ __html: hotel?.locationDescription?.replace('\\r\\n', '<br/><br/>') }} />\n </Text>\n </>\n )}\n </div>\n {!!hotel?.perks?.length && (\n <>\n <div className=\"u-marg-bottom u-marg-bottom--heavy\">\n <Text type={TextType.Small}>\n <strong>And you get all these for free:</strong>\n </Text>\n </div>\n <div className=\"row\">\n {hotel?.perks.map((perk) => {\n return (\n <div className=\"col-6 col-md-4\" key={perk.name}>\n <div className=\"u-flex u-marg-bottom\">\n <div className=\"room-perk-icon\">{perk.iconElement ? perk.iconElement : <Icon icon={perk.icon as IconType} />}</div>\n <span className=\"u-flex__item\">\n <Text type={TextType.Small}>{perk.name}</Text>\n </span>\n </div>\n </div>\n );\n })}\n </div>\n </>\n )}\n </div>\n {!!hotel?.hotelServices?.length && (\n <div className=\"u-marg-bottom u-marg-bottom--heavy\">\n <div className=\"u-marg-bottom--heavy\">\n <Headline bold>Hotel Amenities</Headline>\n </div>\n <div className=\"row\">\n {hotel?.hotelServices.map((hotelService, index) => {\n return (\n <div key={index} className=\"col-md-6\">\n <div className=\"u-flex u-marg-bottom\">\n <Icon icon={IconType.Check} color={Color.White} backgroundColor={Color.Accent} borderRadius=\"round\" noPadding size=\"16px\" />\n <span className=\"u-flex__item u-marg-left--light\">\n <Text type={TextType.Small}>{hotelService.name}</Text>\n </span>\n </div>\n </div>\n );\n })}\n </div>\n </div>\n )}\n {!!hotel?.policies && (\n <div className=\"u-marg-bottom u-marg-bottom--heavy\">\n <div className=\"u-marg-bottom--heavy\">\n <Headline bold>Policies</Headline>\n </div>\n <Text type={TextType.Small}>\n <a href={hotel?.policies} target=\"_blank\" style={{ color: hotel?.colors.accent }} rel=\"noreferrer\">\n {hotel?.policies}\n </a>\n </Text>\n </div>\n )}\n </div>\n <div className=\"col-lg-6\">\n <div className=\"u-marg-bottom u-marg-bottom--heavy\">\n <div className=\"u-marg-bottom u-marg-bottom--heavy\">\n <Headline bold>Gallery</Headline>\n </div>\n {images.length >= 1 && getImage(0)}\n <div className=\"row\">\n {[1, 2, 3].map((index) => {\n if (images.length > index) {\n return (\n <div key={index} className=\"col-6\">\n {getImage(index)}\n </div>\n );\n }\n })}\n {images.length > 5 && (\n <div className=\"col-6\">\n <div className=\"c-images c-images--more\" onClick={openSliderOnClick}>\n {getImage(4)}\n <span>+ {images.length - 5}</span>\n </div>\n </div>\n )}\n </div>\n </div>\n </div>\n </div>\n </div>\n </div>\n {!!images?.length && (\n <FsLightbox\n toggler={lightboxController.toggler}\n slide={lightboxController.slide}\n sources={images.map((image) => ImageProvider.resizeImage(image, ImageSize.Original))}\n type=\"image\"\n />\n )}\n </>\n );\n}\n"]}
@@ -76,7 +76,8 @@ function StepConfirmationComponent() {
76
76
  react_1.default.createElement(StepLayout_1.StepLayoutLeftContent, null,
77
77
  react_1.default.createElement("div", { className: "block-container" },
78
78
  !InlineAddonStepFeature_1.default.isActive() && react_1.default.createElement(AdditionalOffers_1.default, null),
79
- react_1.default.createElement(StepConfirmationFormProvider_1.default, null))),
79
+ react_1.default.createElement(contexts_1.ConfirmationFormContextWrapper, null,
80
+ react_1.default.createElement(StepConfirmationFormProvider_1.default, null)))),
80
81
  context.screenSize > ScreenSize_1.default.Medium && (react_1.default.createElement(StepLayout_1.StepLayoutRightContent, null,
81
82
  react_1.default.createElement(StepConfirmationLimitedOffer_1.default, { endDate: (0, dayjs_1.default)().add(10, 'minute') }),
82
83
  react_1.default.createElement(BESummary_1.BESummary, { showImages: true }))))));
@@ -1 +1 @@
1
- {"version":3,"file":"StepConfirmationComponent.js","sourceRoot":"/","sources":["src/pages/steps/StepConfirmation/StepConfirmationComponent.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,+CAAqD;AACrD,6EAAqD;AACrD,qEAA6C;AAC7C,8DAA2D;AAC3D,uDAAwC;AACxC,+EAAuD;AACvD,iFAAyD;AACzD,0DAAuD;AACvD,2FAAmE;AAEnE,mEAA2C;AAE3C,wGAAgF;AAChF,iDAA+C;AAC/C,yHAAiG;AACjG,gIAAwG;AACxG,kDAA0B;AAC1B,0GAAkF;AAClF,wGAAgF;AAChF,iDAA6C;AAC7C,6CAAyD;AACzD,iDAAgG;AAChG,uIAA+G;AAC/G,uEAA4H;AAE5H,SAAS,yBAAyB;IAC9B,MAAM,OAAO,GAAG,IAAA,kBAAU,EAAC,+BAAoB,CAAC,CAAC;IACjD,MAAM,EAAE,WAAW,EAAE,GAAG,IAAA,kBAAU,EAAC,gCAAqB,CAAC,CAAC;IAC1D,MAAM,EAAE,iBAAiB,EAAE,GAAG,IAAA,kBAAU,EAAC,wBAAa,CAAC,CAAC;IAExD,MAAM,EAAE,CAAC,EAAE,GAAG,IAAA,8BAAc,GAAE,CAAC;IAE/B,MAAM,EAAE,KAAK,EAAE,GAAG,IAAA,oBAAQ,GAAE,CAAC;IAE7B,IAAA,iBAAS,EAAC,GAAG,EAAE;QACX,MAAM,KAAK,GAAG,IAAI,8BAAqB,CAAC,iBAAiB,CAAC,CAAC;QAC3D,KAAK,CAAC,KAAK,CAAC,CAAC;IACjB,CAAC,EAAE,EAAE,CAAC,CAAC;IAEP,OAAO,CACH,uCAAK,SAAS,EAAC,WAAW;QACtB,8BAAC,yBAAe,OAAG;QACnB,8BAAC,gCAAmB;YAChB,8BAAC,kCAAqB;gBACjB,OAAO,CAAC,UAAU,GAAG,oBAAU,CAAC,MAAM,IAAI,CACvC;oBACI,8BAAC,uBAAI,IAAC,EAAE,EAAE,qBAAW,CAAC,kBAAkB,CAAC,WAAW,CAAC;wBACjD,8BAAC,oBAAU,OAAG,CACX;oBACP,uCAAK,SAAS,EAAC,wCAAwC;wBACnD,8BAAC,kBAAQ,IAAC,IAAI,UAAE,CAAC,CAAC,yBAAW,CAAC,UAAU,CAAC,KAAK,CAAC,YAAY,CAAC,CAAY,CACtE,CACP,CACN;gBAED,uCAAK,SAAS,EAAC,eAAe;oBAC1B,8BAAC,+BAAqB,OAAG,CACvB,CACc;YACvB,OAAO,CAAC,UAAU,GAAG,oBAAU,CAAC,MAAM,IAAI,CACvC,8BAAC,mCAAsB;gBACnB,8BAAC,8BAAoB,OAAG,CACH,CAC5B,CACiB;QACtB,8BAAC,mBAAS,OAAG;QACb,8BAAC,gCAAmB;YAChB,8BAAC,kCAAqB;gBAClB,uCAAK,SAAS,EAAC,iBAAiB;oBAC3B,CAAC,gCAAsB,CAAC,QAAQ,EAAE,IAAI,8BAAC,0BAAgB,OAAG;oBAC3D,8BAAC,sCAA4B,OAAG,CAC9B,CACc;YAEvB,OAAO,CAAC,UAAU,GAAG,oBAAU,CAAC,MAAM,IAAI,CACvC,8BAAC,mCAAsB;gBACnB,8BAAC,sCAA4B,IAAC,OAAO,EAAE,IAAA,eAAK,GAAE,CAAC,GAAG,CAAC,EAAE,EAAE,QAAQ,CAAC,GAAI;gBACpE,8BAAC,qBAAS,IAAC,UAAU,SAAG,CACH,CAC5B,CACiB,CACpB,CACT,CAAC;AACN,CAAC;AAED,kBAAe,yBAAyB,CAAC","sourcesContent":["import React, { useContext, useEffect } from 'react';\nimport Headline from '@/components/generic/Headline';\nimport StepManager from '@/util/StepManager';\nimport { BESummary } from '@/components/summary/BESummary';\nimport { Link } from 'react-router-dom';\nimport LineBreak from '@/components/generic/LineBreak';\nimport BackButton from '@/components/generic/BackButton';\nimport { Translation } from 'translations/Translation';\nimport BEMobileSummary from '@/components/summary/BEMobileSummary';\n\nimport ScreenSize from '@/util/ScreenSize';\n\nimport StepRoomHotelDetails from '@/components/steps/room/StepRoomHotelDetails';\nimport { useTranslation } from 'react-i18next';\nimport AdditionalOffers from '@/components/steps/confirmation/additionalOffers/AdditionalOffers';\nimport StepConfirmationLimitedOffer from '@/components/steps/confirmation/StepConfirmationLimitedOffer';\nimport dayjs from 'dayjs';\nimport StepRoomBestRateAlert from '@/components/steps/room/StepRoomBestRateAlert';\nimport InlineAddonStepFeature from '@/providers/feature/InlineAddonStepFeature';\nimport { useEvent } from '@/hooks/EventHook';\nimport { StepCheckoutViewEvent } from '@frontend/events';\nimport { BasketContext, BookingEngineContext, FullPageEngineContext } from '@frontend/contexts';\nimport StepConfirmationFormProvider from '../../../components/steps/confirmation/StepConfirmationFormProvider';\nimport { StepLayoutContainer, StepLayoutLeftContent, StepLayoutRightContent } from '@/components/generic/Layout/StepLayout';\n\nfunction StepConfirmationComponent() {\n const context = useContext(BookingEngineContext);\n const { currentStep } = useContext(FullPageEngineContext);\n const { currentBasketRows } = useContext(BasketContext);\n\n const { t } = useTranslation();\n\n const { raise } = useEvent();\n\n useEffect(() => {\n const event = new StepCheckoutViewEvent(currentBasketRows);\n raise(event);\n }, []);\n\n return (\n <div className=\"container\">\n <BEMobileSummary />\n <StepLayoutContainer>\n <StepLayoutLeftContent>\n {context.screenSize > ScreenSize.Medium && (\n <>\n <Link to={StepManager.getPreviousStepUrl(currentStep)}>\n <BackButton />\n </Link>\n <div className=\"u-marg-top--light u-marg-bottom--heavy\">\n <Headline bold>{t(Translation.Navigation.Steps.Confirmation)}</Headline>\n </div>\n </>\n )}\n\n <div className=\"u-marg-top@m-\">\n <StepRoomBestRateAlert />\n </div>\n </StepLayoutLeftContent>\n {context.screenSize > ScreenSize.Medium && (\n <StepLayoutRightContent>\n <StepRoomHotelDetails />\n </StepLayoutRightContent>\n )}\n </StepLayoutContainer>\n <LineBreak />\n <StepLayoutContainer>\n <StepLayoutLeftContent>\n <div className=\"block-container\">\n {!InlineAddonStepFeature.isActive() && <AdditionalOffers />}\n <StepConfirmationFormProvider />\n </div>\n </StepLayoutLeftContent>\n\n {context.screenSize > ScreenSize.Medium && (\n <StepLayoutRightContent>\n <StepConfirmationLimitedOffer endDate={dayjs().add(10, 'minute')} />\n <BESummary showImages />\n </StepLayoutRightContent>\n )}\n </StepLayoutContainer>\n </div>\n );\n}\n\nexport default StepConfirmationComponent;\n"]}
1
+ {"version":3,"file":"StepConfirmationComponent.js","sourceRoot":"/","sources":["src/pages/steps/StepConfirmation/StepConfirmationComponent.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,+CAAqD;AACrD,6EAAqD;AACrD,qEAA6C;AAC7C,8DAA2D;AAC3D,uDAAwC;AACxC,+EAAuD;AACvD,iFAAyD;AACzD,0DAAuD;AACvD,2FAAmE;AAEnE,mEAA2C;AAE3C,wGAAgF;AAChF,iDAA+C;AAC/C,yHAAiG;AACjG,gIAAwG;AACxG,kDAA0B;AAC1B,0GAAkF;AAClF,wGAAgF;AAChF,iDAA6C;AAC7C,6CAAyD;AACzD,iDAAgI;AAChI,uIAA+G;AAC/G,uEAA4H;AAE5H,SAAS,yBAAyB;IAC9B,MAAM,OAAO,GAAG,IAAA,kBAAU,EAAC,+BAAoB,CAAC,CAAC;IACjD,MAAM,EAAE,WAAW,EAAE,GAAG,IAAA,kBAAU,EAAC,gCAAqB,CAAC,CAAC;IAC1D,MAAM,EAAE,iBAAiB,EAAE,GAAG,IAAA,kBAAU,EAAC,wBAAa,CAAC,CAAC;IAExD,MAAM,EAAE,CAAC,EAAE,GAAG,IAAA,8BAAc,GAAE,CAAC;IAE/B,MAAM,EAAE,KAAK,EAAE,GAAG,IAA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AAC,EAAE,EAAE,QAAQ,CAAC,GAAI;gBACpE,8BAAC,qBAAS,IAAC,UAAU,SAAG,CACH,CAC5B,CACiB,CACpB,CACT,CAAC;AACN,CAAC;AAED,kBAAe,yBAAyB,CAAC","sourcesContent":["import React, { useContext, useEffect } from 'react';\nimport Headline from '@/components/generic/Headline';\nimport StepManager from '@/util/StepManager';\nimport { BESummary } from '@/components/summary/BESummary';\nimport { Link } from 'react-router-dom';\nimport LineBreak from '@/components/generic/LineBreak';\nimport BackButton from '@/components/generic/BackButton';\nimport { Translation } from 'translations/Translation';\nimport BEMobileSummary from '@/components/summary/BEMobileSummary';\n\nimport ScreenSize from '@/util/ScreenSize';\n\nimport StepRoomHotelDetails from '@/components/steps/room/StepRoomHotelDetails';\nimport { useTranslation } from 'react-i18next';\nimport AdditionalOffers from '@/components/steps/confirmation/additionalOffers/AdditionalOffers';\nimport StepConfirmationLimitedOffer from '@/components/steps/confirmation/StepConfirmationLimitedOffer';\nimport dayjs from 'dayjs';\nimport StepRoomBestRateAlert from '@/components/steps/room/StepRoomBestRateAlert';\nimport InlineAddonStepFeature from '@/providers/feature/InlineAddonStepFeature';\nimport { useEvent } from '@/hooks/EventHook';\nimport { StepCheckoutViewEvent } from '@frontend/events';\nimport { BasketContext, BookingEngineContext, ConfirmationFormContextWrapper, FullPageEngineContext } from '@frontend/contexts';\nimport StepConfirmationFormProvider from '../../../components/steps/confirmation/StepConfirmationFormProvider';\nimport { StepLayoutContainer, StepLayoutLeftContent, StepLayoutRightContent } from '@/components/generic/Layout/StepLayout';\n\nfunction StepConfirmationComponent() {\n const context = useContext(BookingEngineContext);\n const { currentStep } = useContext(FullPageEngineContext);\n const { currentBasketRows } = useContext(BasketContext);\n\n const { t } = useTranslation();\n\n const { raise } = useEvent();\n\n useEffect(() => {\n const event = new StepCheckoutViewEvent(currentBasketRows);\n raise(event);\n }, []);\n\n return (\n <div className=\"container\">\n <BEMobileSummary />\n <StepLayoutContainer>\n <StepLayoutLeftContent>\n {context.screenSize > ScreenSize.Medium && (\n <>\n <Link to={StepManager.getPreviousStepUrl(currentStep)}>\n <BackButton />\n </Link>\n <div className=\"u-marg-top--light u-marg-bottom--heavy\">\n <Headline bold>{t(Translation.Navigation.Steps.Confirmation)}</Headline>\n </div>\n </>\n )}\n\n <div className=\"u-marg-top@m-\">\n <StepRoomBestRateAlert />\n </div>\n </StepLayoutLeftContent>\n {context.screenSize > ScreenSize.Medium && (\n <StepLayoutRightContent>\n <StepRoomHotelDetails />\n </StepLayoutRightContent>\n )}\n </StepLayoutContainer>\n <LineBreak />\n <StepLayoutContainer>\n <StepLayoutLeftContent>\n <div className=\"block-container\">\n {!InlineAddonStepFeature.isActive() && <AdditionalOffers />}\n <ConfirmationFormContextWrapper>\n <StepConfirmationFormProvider />\n </ConfirmationFormContextWrapper>\n </div>\n </StepLayoutLeftContent>\n\n {context.screenSize > ScreenSize.Medium && (\n <StepLayoutRightContent>\n <StepConfirmationLimitedOffer endDate={dayjs().add(10, 'minute')} />\n <BESummary showImages />\n </StepLayoutRightContent>\n )}\n </StepLayoutContainer>\n </div>\n );\n}\n\nexport default StepConfirmationComponent;\n"]}
@@ -4,7 +4,8 @@ export declare enum ImageSize {
4
4
  Small = 512,
5
5
  Medium = 768,
6
6
  Large = 1024,
7
- ExtraLarge = 1600
7
+ ExtraLarge = 1600,
8
+ Original = 1920
8
9
  }
9
10
  declare class ImageProvider {
10
11
  private imageMap;