@roomstay/frontend 2.6.22 → 2.6.24
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/370.bundle.js +1 -1
- package/dist/main.bundle.js +1 -1
- package/dist/src/components/generic/Distance.d.ts +2 -1
- package/dist/src/components/generic/Distance.js +6 -3
- package/dist/src/components/generic/Distance.js.map +1 -1
- package/dist/src/components/generic/Icon/Icon.d.ts +4 -1
- package/dist/src/components/generic/Icon/Icon.js +3 -0
- package/dist/src/components/generic/Icon/Icon.js.map +1 -1
- package/dist/src/components/summary/BEMobileSummaryModal.js +1 -1
- package/dist/src/components/summary/BEMobileSummaryModal.js.map +1 -1
- package/dist/src/components/summary/TransportDistanceFromHotelBlock.js +47 -30
- package/dist/src/components/summary/TransportDistanceFromHotelBlock.js.map +1 -1
- package/dist/src/contexts/CompanyContext/CompanyContextWrapper.js +5 -0
- package/dist/src/contexts/CompanyContext/CompanyContextWrapper.js.map +1 -1
- package/dist/src/models/Api/HotelDTO.d.ts +1 -1
- package/dist/src/models/Api/HotelDTO.js.map +1 -1
- package/dist/src/models/Api/HotelOverrideDTO.d.ts +7 -5
- package/dist/src/models/Api/HotelOverrideDTO.js.map +1 -1
- package/dist/src/models/Client/Hotel/Hotel.d.ts +4 -2
- package/dist/src/models/Client/Hotel/Hotel.js.map +1 -1
- package/dist/src/pages/hotel/HotelInfo.js +23 -23
- package/dist/src/pages/hotel/HotelInfo.js.map +1 -1
- package/dist/test.bundle.js +1 -1
- package/dist/tests/offline/entry/OfflineEngineDefaults.js +7 -0
- package/dist/tests/offline/entry/OfflineEngineDefaults.js.map +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"HotelDTO.js","sourceRoot":"/","sources":["src/models/Api/HotelDTO.ts"],"names":[],"mappings":";;;AAMA,uDAA8F;AAwH9F,IAAY,WAOX;AAPD,WAAY,WAAW;IACnB,4BAAa,CAAA;IACb,wCAAyB,CAAA;IACzB,0BAAW,CAAA;IACX,wCAAyB,CAAA;IACzB,uCAAwB,CAAA;IACxB,oCAAqB,CAAA;AACzB,CAAC,EAPW,WAAW,GAAX,mBAAW,KAAX,mBAAW,QAOtB;AAEY,QAAA,0BAA0B,GAAsD;IACzF,CAAC,wBAAgB,CAAC,IAAI,CAAC,EAAE,WAAW,CAAC,IAAI;IACzC,CAAC,wBAAgB,CAAC,UAAU,CAAC,EAAE,WAAW,CAAC,UAAU;IACrD,CAAC,wBAAgB,CAAC,GAAG,CAAC,EAAE,WAAW,CAAC,GAAG;IACvC,CAAC,wBAAgB,CAAC,eAAe,CAAC,EAAE,WAAW,CAAC,eAAe;IAC/D,CAAC,wBAAgB,CAAC,UAAU,CAAC,EAAE,WAAW,CAAC,UAAU;IACrD,CAAC,wBAAgB,CAAC,QAAQ,CAAC,EAAE,WAAW,CAAC,QAAQ;CACpD,CAAC","sourcesContent":["import type { EnvironmentName } from '@planpay/web';\nimport type { EBookingPaymentMethod, EHotelCardProcessor, EHotelStateFieldConfiguration, EIntegration, IAuxiliaryFilter } from '@roomstay/core';\nimport { DeepPartial } from 'react-hook-form';\n\nimport ColorProfile from '@/models/Client/Hotel/ColorProfile';\nimport { DistanceUnitType } from '@/models/Client/Hotel/DistanceUnitType.types';\nimport { AdminHotelConfig, ConfigHotel, EPaymentCardType } from '@/models/Client/Hotel/Hotel';\nimport HotelAddress from '@/models/Client/Hotel/HotelAddress';\nimport { HotelDataSource } from '@/models/Client/Hotel/HotelDataSource.types';\nimport { WeekdayStartsOn } from '@/models/Client/Hotel/WeekdayStartsOn.types';\n\nexport type HotelServiceDTO = {\n detail: string;\n included: boolean;\n name: string;\n onsite: boolean;\n};\n\nexport type HotelRoomsDTO = {\n [roomTypeCode: string]: HotelRoomDTO;\n};\n\nexport type HotelRoomGroupsDTO = {\n groupName: string;\n id: string;\n filters: {\n [id: string]: {\n name: string;\n type: 'select';\n includeAllAbove: boolean;\n requireInput: boolean;\n options: IAuxiliaryFilter['options'];\n };\n };\n}[];\n\nexport type HotelRoomAmenitiesDTO = {\n type: string;\n description: string;\n};\n\nexport type HotelRoomDTO = {\n code: string;\n name: string;\n shortDescription: string;\n longDescription: string;\n images: string[];\n quantity: number;\n maxOccupancy: number;\n bedQuantity: number;\n showBedType?: boolean;\n standardNumBeds: number;\n maxRollaways: number;\n bedType: string;\n amenities: HotelRoomAmenitiesDTO[];\n features: HotelRoomAmenitiesDTO[];\n bedTypeOverride?: string;\n roomGroupId?: string;\n roomSize?: number;\n prePerkDisclaimer?: string;\n perks?: ConfigHotel['perks'];\n};\n\nexport type HotelDTO = {\n id: number;\n name: string;\n chainId: number;\n chainName: string;\n\n address: HotelAddress;\n phone: string;\n\n latitude: string;\n longitude: string;\n\n utcOffset: string;\n\n languageCode: string;\n currencyCode: string;\n\n checkInTime: string;\n checkOutTime: string;\n\n paymentCardTypes: EPaymentCardType[];\n\n description: string;\n locationDescription: string;\n policies: string;\n\n hotelServices: HotelServiceDTO[];\n businessServices: HotelServiceDTO[];\n\n rooms: { [roomTypeCode: string]: HotelRoomDTO };\n dataSource: HotelDataSource;\n\n // Following fields are only present if dataSource = 'roomstay'\n logo?: string;\n colors: DeepPartial<ColorProfile>;\n distanceUnitType?: DistanceUnitType;\n weekdayStartsOn?: WeekdayStartsOn;\n\n crossSellHotelIds?: string[];\n paymentMethods: EBookingPaymentMethod[];\n cardProcessor: EHotelCardProcessor;\n planpay?: {\n username: string;\n minDaysShowPlanpay: number;\n env: EnvironmentName;\n };\n\n email?: string;\n hotelUrl?: string;\n heroImage?: string;\n images?: string[];\n integrations?: EIntegration[];\n roomGroups: HotelRoomGroupsDTO;\n requireDeposit?: boolean;\n availableCountries?: { name: string; value: string }[];\n preventCancellation?: boolean;\n maxAdults?: number;\n maxChildren?: number;\n maxInfants?: number;\n\n stateFieldConfiguration?: EHotelStateFieldConfiguration;\n} & Pick<AdminHotelConfig, 'childConfiguration'>;\n\nexport enum VGSCardName {\n Visa = 'visa',\n Mastercard = 'mastercard',\n JCB = 'jcb',\n DinersClub = 'dinersclub',\n AmericanExpress = 'amex',\n UnionPay = 'unionpay',\n}\n\nexport const SynxisToVGSCardNameMapping: { [synxisName in EPaymentCardType]: VGSCardName } = {\n [EPaymentCardType.Visa]: VGSCardName.Visa,\n [EPaymentCardType.Mastercard]: VGSCardName.Mastercard,\n [EPaymentCardType.JCB]: VGSCardName.JCB,\n [EPaymentCardType.AmericanExpress]: VGSCardName.AmericanExpress,\n [EPaymentCardType.DinersClub]: VGSCardName.DinersClub,\n [EPaymentCardType.UnionPay]: VGSCardName.UnionPay,\n};\n"]}
|
|
1
|
+
{"version":3,"file":"HotelDTO.js","sourceRoot":"/","sources":["src/models/Api/HotelDTO.ts"],"names":[],"mappings":";;;AAMA,uDAA8F;AAwH9F,IAAY,WAOX;AAPD,WAAY,WAAW;IACnB,4BAAa,CAAA;IACb,wCAAyB,CAAA;IACzB,0BAAW,CAAA;IACX,wCAAyB,CAAA;IACzB,uCAAwB,CAAA;IACxB,oCAAqB,CAAA;AACzB,CAAC,EAPW,WAAW,GAAX,mBAAW,KAAX,mBAAW,QAOtB;AAEY,QAAA,0BAA0B,GAAsD;IACzF,CAAC,wBAAgB,CAAC,IAAI,CAAC,EAAE,WAAW,CAAC,IAAI;IACzC,CAAC,wBAAgB,CAAC,UAAU,CAAC,EAAE,WAAW,CAAC,UAAU;IACrD,CAAC,wBAAgB,CAAC,GAAG,CAAC,EAAE,WAAW,CAAC,GAAG;IACvC,CAAC,wBAAgB,CAAC,eAAe,CAAC,EAAE,WAAW,CAAC,eAAe;IAC/D,CAAC,wBAAgB,CAAC,UAAU,CAAC,EAAE,WAAW,CAAC,UAAU;IACrD,CAAC,wBAAgB,CAAC,QAAQ,CAAC,EAAE,WAAW,CAAC,QAAQ;CACpD,CAAC","sourcesContent":["import type { EnvironmentName } from '@planpay/web';\nimport type { EBookingPaymentMethod, EHotelCardProcessor, EHotelStateFieldConfiguration, EIntegration, IAuxiliaryFilter } from '@roomstay/core';\nimport { DeepPartial } from 'react-hook-form';\n\nimport ColorProfile from '@/models/Client/Hotel/ColorProfile';\nimport { DistanceUnitType } from '@/models/Client/Hotel/DistanceUnitType.types';\nimport { AdminHotelConfig, ConfigHotel, EPaymentCardType } from '@/models/Client/Hotel/Hotel';\nimport HotelAddress from '@/models/Client/Hotel/HotelAddress';\nimport { HotelDataSource } from '@/models/Client/Hotel/HotelDataSource.types';\nimport { WeekdayStartsOn } from '@/models/Client/Hotel/WeekdayStartsOn.types';\n\nexport type HotelServiceDTO = {\n detail: string;\n included: boolean;\n name: string;\n onsite: boolean;\n};\n\nexport type HotelRoomsDTO = {\n [roomTypeCode: string]: HotelRoomDTO;\n};\n\nexport type HotelRoomGroupsDTO = {\n groupName: string;\n id: string;\n filters: {\n [id: string]: {\n name: string;\n type: 'select';\n includeAllAbove: boolean;\n requireInput: boolean;\n options: IAuxiliaryFilter['options'];\n };\n };\n}[];\n\nexport type HotelRoomAmenitiesDTO = {\n type: string;\n description: string;\n};\n\nexport type HotelRoomDTO = {\n code: string;\n name: string;\n shortDescription: string;\n longDescription: string;\n images: string[];\n quantity: number;\n maxOccupancy: number;\n bedQuantity: number;\n showBedType?: boolean;\n standardNumBeds: number;\n maxRollaways: number;\n bedType: string;\n amenities: HotelRoomAmenitiesDTO[];\n features: HotelRoomAmenitiesDTO[];\n bedTypeOverride?: string;\n roomGroupId?: string;\n roomSize?: number;\n prePerkDisclaimer?: string;\n perks?: ConfigHotel['perks'];\n};\n\nexport type HotelDTO = {\n id: number;\n name: string;\n chainId: number;\n chainName: string;\n\n address: HotelAddress;\n phone: string;\n\n latitude: string;\n longitude: string;\n\n utcOffset: string;\n\n languageCode: string;\n currencyCode: string;\n\n checkInTime: string;\n checkOutTime: string;\n\n paymentCardTypes: EPaymentCardType[];\n\n description: string;\n locationDescription: string;\n policies: string;\n\n hotelServices: HotelServiceDTO[];\n businessServices: HotelServiceDTO[];\n\n rooms: { [roomTypeCode: string]: HotelRoomDTO };\n dataSource: HotelDataSource;\n\n // Following fields are only present if dataSource = 'roomstay'\n logo?: string;\n colors: DeepPartial<ColorProfile>;\n distanceUnitType?: DistanceUnitType;\n weekdayStartsOn?: WeekdayStartsOn;\n\n crossSellHotelIds?: string[];\n paymentMethods: EBookingPaymentMethod[];\n cardProcessor: EHotelCardProcessor;\n planpay?: {\n username: string;\n minDaysShowPlanpay: number;\n env: EnvironmentName;\n };\n\n email?: string;\n hotelUrl?: string;\n heroImage?: string;\n images?: string[];\n integrations?: EIntegration[];\n roomGroups: HotelRoomGroupsDTO;\n requireDeposit?: boolean;\n availableCountries?: { name: string; value: string }[];\n preventCancellation?: boolean;\n maxAdults?: number;\n maxChildren?: number;\n maxInfants?: number;\n\n stateFieldConfiguration?: EHotelStateFieldConfiguration;\n} & Pick<AdminHotelConfig, 'childConfiguration' | 'countryPrefix' | 'quoteImageDesktop' | 'quoteImageMobile' | 'memberOnlyImage'>;\n\nexport enum VGSCardName {\n Visa = 'visa',\n Mastercard = 'mastercard',\n JCB = 'jcb',\n DinersClub = 'dinersclub',\n AmericanExpress = 'amex',\n UnionPay = 'unionpay',\n}\n\nexport const SynxisToVGSCardNameMapping: { [synxisName in EPaymentCardType]: VGSCardName } = {\n [EPaymentCardType.Visa]: VGSCardName.Visa,\n [EPaymentCardType.Mastercard]: VGSCardName.Mastercard,\n [EPaymentCardType.JCB]: VGSCardName.JCB,\n [EPaymentCardType.AmericanExpress]: VGSCardName.AmericanExpress,\n [EPaymentCardType.DinersClub]: VGSCardName.DinersClub,\n [EPaymentCardType.UnionPay]: VGSCardName.UnionPay,\n};\n"]}
|
|
@@ -4,10 +4,17 @@ export interface TransportDistances {
|
|
|
4
4
|
As they're inputting the string directly now I've changed the Distance component to accept both types and only
|
|
5
5
|
run the conversion on numbers.
|
|
6
6
|
*/
|
|
7
|
+
displayCard?: boolean;
|
|
7
8
|
plane?: string | number;
|
|
8
9
|
train?: string | number;
|
|
9
10
|
bus?: string | number;
|
|
10
11
|
taxi?: string | number;
|
|
12
|
+
car?: string | number;
|
|
13
|
+
carSubTitle?: string;
|
|
14
|
+
ferry?: string | number;
|
|
15
|
+
ferrySubTitle?: string;
|
|
16
|
+
location?: string | number;
|
|
17
|
+
locationSubTitle?: string;
|
|
11
18
|
}
|
|
12
19
|
export interface ShowYearOnCalendarProps {
|
|
13
20
|
showYearOnCalendar?: boolean;
|
|
@@ -17,11 +24,6 @@ export interface ShowPromoCodeAlertProps {
|
|
|
17
24
|
showPromoCodeAlert?: boolean;
|
|
18
25
|
promoCodeAlertType?: 'popup' | 'notification';
|
|
19
26
|
}
|
|
20
|
-
export interface HotelInfoPageProps {
|
|
21
|
-
countryPrefix?: string;
|
|
22
|
-
quoteImageDesktop?: string;
|
|
23
|
-
quoteImageMobile?: string;
|
|
24
|
-
}
|
|
25
27
|
export interface IPageTitle {
|
|
26
28
|
enable: boolean;
|
|
27
29
|
HotelInfo: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"HotelOverrideDTO.js","sourceRoot":"/","sources":["src/models/Api/HotelOverrideDTO.ts"],"names":[],"mappings":"","sourcesContent":["import { DistanceUnitType } from '@/models/Client/Hotel/DistanceUnitType.types';\n\nexport interface TransportDistances {\n /** Seems that the old way had these as numbers, and if the unit wasn't metric done conversions on the number\n As they're inputting the string directly now I've changed the Distance component to accept both types and only\n run the conversion on numbers.\n */\n plane?: string | number;\n train?: string | number;\n bus?: string | number;\n taxi?: string | number;\n}\n\nexport interface ShowYearOnCalendarProps {\n showYearOnCalendar?: boolean;\n yearDisplayOption?: string;\n}\n\nexport interface ShowPromoCodeAlertProps {\n showPromoCodeAlert?: boolean;\n promoCodeAlertType?: 'popup' | 'notification';\n}\
|
|
1
|
+
{"version":3,"file":"HotelOverrideDTO.js","sourceRoot":"/","sources":["src/models/Api/HotelOverrideDTO.ts"],"names":[],"mappings":"","sourcesContent":["import { DistanceUnitType } from '@/models/Client/Hotel/DistanceUnitType.types';\n\nexport interface TransportDistances {\n /** Seems that the old way had these as numbers, and if the unit wasn't metric done conversions on the number\n As they're inputting the string directly now I've changed the Distance component to accept both types and only\n run the conversion on numbers.\n */\n displayCard?: boolean;\n plane?: string | number;\n train?: string | number;\n bus?: string | number;\n taxi?: string | number;\n car?: string | number;\n carSubTitle?: string;\n ferry?: string | number;\n ferrySubTitle?: string;\n location?: string | number;\n locationSubTitle?: string;\n}\n\nexport interface ShowYearOnCalendarProps {\n showYearOnCalendar?: boolean;\n yearDisplayOption?: string;\n}\n\nexport interface ShowPromoCodeAlertProps {\n showPromoCodeAlert?: boolean;\n promoCodeAlertType?: 'popup' | 'notification';\n}\n\nexport interface IPageTitle {\n enable: boolean;\n HotelInfo: string;\n FindReservation: string;\n Date: string;\n Room: string;\n Addon: string;\n Confirmation: string;\n Thanks: string;\n}\nexport interface HotelOverrideDTO extends ShowYearOnCalendarProps, ShowPromoCodeAlertProps {\n hideByLine?: boolean;\n overrideDistanceUnitType?: boolean;\n distanceUnitType?: DistanceUnitType;\n transportDistances?: TransportDistances;\n phoneNumberInSummary?: string;\n enabledEventIds?: string[];\n pageTitle?: IPageTitle;\n}\n"]}
|
|
@@ -3,7 +3,7 @@ import { EBookingPaymentMethod, EHotelCardProcessor, EHotelStateFieldConfigurati
|
|
|
3
3
|
import type { ReactChild } from 'react';
|
|
4
4
|
import type { InternalMemberSignInInputs } from '../../../components/steps/room/MemberSignInModal/InternalMemberSignInModal.types';
|
|
5
5
|
import type { HotelRoomGroupsDTO, HotelRoomsDTO, HotelServiceDTO } from '../../Api/HotelDTO';
|
|
6
|
-
import type {
|
|
6
|
+
import type { TransportDistances } from '../../Api/HotelOverrideDTO';
|
|
7
7
|
import type { HasDatalayerTags } from './Company';
|
|
8
8
|
import type { DistanceUnitType } from './DistanceUnitType.types';
|
|
9
9
|
import type HotelAddress from './HotelAddress';
|
|
@@ -90,7 +90,9 @@ export interface AdminHotelConfig {
|
|
|
90
90
|
};
|
|
91
91
|
preventCancellation?: boolean;
|
|
92
92
|
stateFieldConfiguration?: EHotelStateFieldConfiguration;
|
|
93
|
-
|
|
93
|
+
countryPrefix?: string;
|
|
94
|
+
quoteImageDesktop?: string;
|
|
95
|
+
quoteImageMobile?: string;
|
|
94
96
|
memberOnlyImage?: string;
|
|
95
97
|
}
|
|
96
98
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Hotel.js","sourceRoot":"/","sources":["src/models/Client/Hotel/Hotel.ts"],"names":[],"mappings":";;;AAiBA,IAAY,gBAOX;AAPD,WAAY,gBAAgB;IACxB,+BAAW,CAAA;IACX,qCAAiB,CAAA;IACjB,8BAAU,CAAA;IACV,0CAAsB,CAAA;IACtB,qCAAiB,CAAA;IACjB,mCAAe,CAAA;AACnB,CAAC,EAPW,gBAAgB,GAAhB,wBAAgB,KAAhB,wBAAgB,QAO3B","sourcesContent":["import type { EnvironmentName } from '@planpay/web';\nimport { EBookingPaymentMethod, EHotelCardProcessor, EHotelStateFieldConfiguration, EIntegration, IHotelColorScheme } from '@roomstay/core';\nimport type { ReactChild } from 'react';\n\nimport type { InternalMemberSignInInputs } from '@/components/steps/room/MemberSignInModal/InternalMemberSignInModal.types';\nimport type { HotelRoomGroupsDTO, HotelRoomsDTO, HotelServiceDTO } from '@/models/Api/HotelDTO';\nimport type {
|
|
1
|
+
{"version":3,"file":"Hotel.js","sourceRoot":"/","sources":["src/models/Client/Hotel/Hotel.ts"],"names":[],"mappings":";;;AAiBA,IAAY,gBAOX;AAPD,WAAY,gBAAgB;IACxB,+BAAW,CAAA;IACX,qCAAiB,CAAA;IACjB,8BAAU,CAAA;IACV,0CAAsB,CAAA;IACtB,qCAAiB,CAAA;IACjB,mCAAe,CAAA;AACnB,CAAC,EAPW,gBAAgB,GAAhB,wBAAgB,KAAhB,wBAAgB,QAO3B","sourcesContent":["import type { EnvironmentName } from '@planpay/web';\nimport { EBookingPaymentMethod, EHotelCardProcessor, EHotelStateFieldConfiguration, EIntegration, IHotelColorScheme } from '@roomstay/core';\nimport type { ReactChild } from 'react';\n\nimport type { InternalMemberSignInInputs } from '@/components/steps/room/MemberSignInModal/InternalMemberSignInModal.types';\nimport type { HotelRoomGroupsDTO, HotelRoomsDTO, HotelServiceDTO } from '@/models/Api/HotelDTO';\nimport type { TransportDistances } from '@/models/Api/HotelOverrideDTO';\nimport type { HasDatalayerTags } from '@/models/Client/Hotel/Company';\nimport type { DistanceUnitType } from '@/models/Client/Hotel/DistanceUnitType.types';\nimport type HotelAddress from '@/models/Client/Hotel/HotelAddress';\nimport type { HotelDataSource } from '@/models/Client/Hotel/HotelDataSource.types';\nimport type { HotelPerk } from '@/models/Client/Hotel/HotelPerk';\nimport type { HotelRoomOverwrite } from '@/models/Client/Hotel/HotelRoomOverwrite';\nimport type { WeekdayStartsOn } from '@/models/Client/Hotel/WeekdayStartsOn.types';\nimport type { Language } from '@/providers/LanguageProvider';\nimport { RoomSort } from '@/providers/RoomSortProvider';\n\nexport enum EPaymentCardType {\n Visa = 'VI',\n Mastercard = 'MC',\n JCB = 'JC',\n AmericanExpress = 'AX',\n DinersClub = 'DN',\n UnionPay = 'UP',\n}\n\nexport interface IVGSVaultNames {\n standard: string;\n members: string;\n}\n\n/**\n * This config comes from admin\n */\nexport interface AdminHotelConfig {\n hotelID: string;\n name: string;\n address?: HotelAddress;\n latitude?: number;\n longitude?: number;\n phone?: string;\n email?: string;\n checkInTime?: string;\n checkOutTime?: string;\n paymentCardTypes?: EPaymentCardType[];\n description?: string;\n locationDescription?: string;\n policies?: string;\n hotelServices: HotelServiceDTO[];\n businessServices: HotelServiceDTO[];\n rooms: HotelRoomsDTO;\n hasLoadedDetails?: boolean;\n dataSource: HotelDataSource;\n defaultCurrency: string;\n paymentMethods: EBookingPaymentMethod[];\n planpay?: {\n username: string;\n minDaysShowPlanpay: number;\n env: EnvironmentName;\n };\n hotelUrl: string;\n heroImage: string;\n memberOnlyModalImage?: string;\n images?: string[];\n logo: string | ReactChild;\n colors: IHotelColorScheme;\n distanceUnitType: DistanceUnitType;\n startsWeekOnDay?: WeekdayStartsOn;\n crossSellHotelIds?: string[];\n maxOccupancy?: number;\n maxAdults?: number;\n maxChildren?: number;\n maxInfants?: number;\n hideByLine?: boolean;\n transportDistances?: TransportDistances;\n roomGroups: HotelRoomGroupsDTO;\n cardProcessor: EHotelCardProcessor;\n\n requireDeposit?: boolean;\n availableCountries?: { name: string; value: string }[];\n\n childConfiguration?: {\n supportChildren?: boolean;\n supportInfants: boolean;\n childRange: { min: number; max: number };\n infantRange: { min: number; max: number };\n };\n preventCancellation?: boolean;\n\n stateFieldConfiguration?: EHotelStateFieldConfiguration;\n\n countryPrefix?: string;\n quoteImageDesktop?: string;\n quoteImageMobile?: string;\n memberOnlyImage?: string;\n}\n\n/**\n * This config comes from hard static local file\n */\nexport interface ClientHotelConfig {\n providerHotelID: string;\n shortName?: 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 defaultLanguage: Language;\n privacyPolicyUrl: string;\n bookNowPayLaterUrl?: string;\n bestRateNoBSUrl?: string;\n\n memberOnlyRates?: string[];\n memberOnlyPromoCode?: string;\n memberOnlySignupInputs?: InternalMemberSignInInputs;\n googleMapsImage?: string;\n /**\n * Whether to show the Breakfast / Lunch / Dinner included\n */\n showMealPill?: boolean;\n perks: HotelPerk[];\n /**\n * Hide perks on room row\n */\n perksHideOnRoomRow?: boolean;\n /**\n * Hide perks on room detail modal\n */\n perksHideOnRoomDetail?: boolean;\n perksShowDisclaimer?: boolean;\n /** @deprecated Use the vgs.vaultNames.standard property now */\n vgsVaultName?: string;\n vgs?: {\n vaultNames: IVGSVaultNames;\n };\n showAddonLoader: boolean;\n overwrites?: { [code: string]: Partial<HotelRoomOverwrite> };\n forwardFindReservationToSynxis?: boolean;\n additionalOptions?: { [name: string]: any };\n googleReCaptcha?: {\n loadForMembers?: boolean;\n siteKey?: string;\n };\n /**\n * Show description on RoomDetails\n */\n showDescriptionOnRoomDetails?: boolean;\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 * 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 currentRoomSort?: RoomSort; //override default room sort\n maxAdults?: number; //fixed from frontend\n}\n\nexport interface ConfigHotel extends ClientHotelConfig, AdminHotelConfig, HasDatalayerTags {}\n\nexport type Hotel = ConfigHotel & {\n lowestPrice?: {\n value: number;\n isLoading: boolean;\n };\n integrations?: EIntegration[];\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"]}
|
|
@@ -48,7 +48,7 @@ const Color_1 = require("../../util/Color");
|
|
|
48
48
|
const ScreenSize_1 = __importDefault(require("../../util/ScreenSize"));
|
|
49
49
|
const StepManager_1 = __importDefault(require("../../util/StepManager"));
|
|
50
50
|
function HotelInfo() {
|
|
51
|
-
var _a, _b, _c, _d, _e, _f, _g
|
|
51
|
+
var _a, _b, _c, _d, _e, _f, _g;
|
|
52
52
|
const { hotel } = (0, hooks_1.useCurrentHotel)();
|
|
53
53
|
const historyConsistentPush = (0, HistoryConsistentPush_1.useHistoryConsistentPush)();
|
|
54
54
|
const { t } = (0, react_i18next_1.useTranslation)();
|
|
@@ -95,16 +95,16 @@ function HotelInfo() {
|
|
|
95
95
|
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 }));
|
|
96
96
|
};
|
|
97
97
|
const hotelServices = ((_b = hotel === null || hotel === void 0 ? void 0 : hotel.hotelServices) === null || _b === void 0 ? void 0 : _b.filter(({ name }) => !!name)) || [];
|
|
98
|
-
const quoteImage = isMobile ?
|
|
98
|
+
const quoteImage = isMobile ? hotel === null || hotel === void 0 ? void 0 : hotel.quoteImageMobile : hotel === null || hotel === void 0 ? void 0 : hotel.quoteImageDesktop;
|
|
99
99
|
return (react_1.default.createElement(react_1.default.Fragment, null,
|
|
100
100
|
react_1.default.createElement(PageTitle_1.PageTitle, { step: "HotelInfo" }),
|
|
101
101
|
react_1.default.createElement("div", { style: { backgroundImage: `url('${imageUrl && ImageProvider_1.default.resizeImage(imageUrl, ImageProvider_1.ImageSize.Original)}')` }, className: "c-masthead has-tint" },
|
|
102
102
|
react_1.default.createElement("div", { className: "container" },
|
|
103
103
|
react_1.default.createElement("div", { className: "c-masthead__body u-fill-white u-pad--heavy u-shadow-accent" },
|
|
104
104
|
react_1.default.createElement("h1", { className: "c-masthead__header" }, hotel === null || hotel === void 0 ? void 0 : hotel.name),
|
|
105
|
-
react_1.default.createElement("h2", { className: "c-masthead__sub-header" }, (
|
|
106
|
-
" ", (
|
|
107
|
-
|
|
105
|
+
react_1.default.createElement("h2", { className: "c-masthead__sub-header" }, (_c = hotel === null || hotel === void 0 ? void 0 : hotel.countryPrefix) !== null && _c !== void 0 ? _c : '',
|
|
106
|
+
" ", (_d = hotel === null || hotel === void 0 ? void 0 : hotel.address) === null || _d === void 0 ? void 0 :
|
|
107
|
+
_d.country)))),
|
|
108
108
|
react_1.default.createElement("div", { className: "u-fill-snow u-pad--heavy-med u-pad-top-bottom--heavy@m-" },
|
|
109
109
|
react_1.default.createElement("div", { className: "container" },
|
|
110
110
|
react_1.default.createElement("div", { className: "row" },
|
|
@@ -133,7 +133,7 @@ function HotelInfo() {
|
|
|
133
133
|
react_1.default.createElement("div", { className: "c-overlap" },
|
|
134
134
|
react_1.default.createElement("div", { className: "u-marg-bottom u-marg-bottom--heavy u-marg-top u-marg-top--heavy", style: { height: '240px' } },
|
|
135
135
|
react_1.default.createElement(HotelLocationMap_1.default, null)),
|
|
136
|
-
react_1.default.createElement("div", { className: "u-flex u-flex-column justify-content-center" },
|
|
136
|
+
react_1.default.createElement("div", { className: "u-flex u-flex-column justify-content-center rs-hotelinfo-transport-distance" },
|
|
137
137
|
react_1.default.createElement(TransportDistanceFromHotelBlock_1.default, { hotel: hotel }))))))),
|
|
138
138
|
react_1.default.createElement("div", { className: "u-pad u-pad--heavy-plus u-pad-top-bottom--heavy@m-" },
|
|
139
139
|
react_1.default.createElement("div", { className: "container rs-hotelinfo" },
|
|
@@ -144,14 +144,14 @@ function HotelInfo() {
|
|
|
144
144
|
react_1.default.createElement(Headline_1.default, { className: "rs-hotelinfo-about", bold: true }, t(Translation_1.Translation.Step.Hotel.About))),
|
|
145
145
|
react_1.default.createElement("div", { className: "u-marg-bottom u-marg-bottom--heavy" },
|
|
146
146
|
react_1.default.createElement(Text_1.default, { type: Text_1.TextType.Small },
|
|
147
|
-
react_1.default.createElement("span", { dangerouslySetInnerHTML: { __html: ((
|
|
147
|
+
react_1.default.createElement("span", { dangerouslySetInnerHTML: { __html: ((_e = hotel === null || hotel === void 0 ? void 0 : hotel.description) === null || _e === void 0 ? void 0 : _e.replace('\r\n', '<br/><br/>')) || '' } })),
|
|
148
148
|
!!(hotel === null || hotel === void 0 ? void 0 : hotel.locationDescription) && (react_1.default.createElement(react_1.default.Fragment, null,
|
|
149
149
|
react_1.default.createElement("div", { className: "u-marg-top" },
|
|
150
150
|
react_1.default.createElement(Text_1.default, { type: Text_1.TextType.Small },
|
|
151
151
|
react_1.default.createElement("strong", null, t(Translation_1.Translation.Step.Hotel.Location)))),
|
|
152
152
|
react_1.default.createElement(Text_1.default, { type: Text_1.TextType.Small },
|
|
153
|
-
react_1.default.createElement("span", { dangerouslySetInnerHTML: { __html: (
|
|
154
|
-
!!((
|
|
153
|
+
react_1.default.createElement("span", { dangerouslySetInnerHTML: { __html: (_f = hotel === null || hotel === void 0 ? void 0 : hotel.locationDescription) === null || _f === void 0 ? void 0 : _f.replace('\r\n', '<br/><br/>') } }))))),
|
|
154
|
+
!!((_g = hotel === null || hotel === void 0 ? void 0 : hotel.perks) === null || _g === void 0 ? void 0 : _g.length) && (react_1.default.createElement(react_1.default.Fragment, null,
|
|
155
155
|
react_1.default.createElement("div", { className: "u-marg-bottom u-marg-bottom--heavy" },
|
|
156
156
|
react_1.default.createElement(Text_1.default, { type: Text_1.TextType.Small },
|
|
157
157
|
react_1.default.createElement("strong", { className: "rs-hotelinfo-andyougetall" }, t(Translation_1.Translation.Step.Hotel.AndYouGetAll)))),
|
|
@@ -200,28 +200,28 @@ function HotelInfo() {
|
|
|
200
200
|
}
|
|
201
201
|
exports.default = HotelInfo;
|
|
202
202
|
const QuoteImage = ({ src, className, isMobile }) => {
|
|
203
|
+
const [aspectRatio, setAspectRatio] = (0, react_1.useState)(0);
|
|
203
204
|
const [imageHeight, setImageHeight] = (0, react_1.useState)(0);
|
|
204
205
|
(0, react_1.useEffect)(() => {
|
|
205
|
-
if (isMobile) {
|
|
206
|
+
if (isMobile && src) {
|
|
206
207
|
const img = new Image();
|
|
207
208
|
img.src = src;
|
|
208
|
-
img.onload = () =>
|
|
209
|
-
const aspectRatio = img.height / img.width;
|
|
210
|
-
setImageHeight(window.innerWidth * aspectRatio);
|
|
211
|
-
};
|
|
209
|
+
img.onload = () => setAspectRatio(img.height / img.width);
|
|
212
210
|
img.onerror = () => {
|
|
213
211
|
console.error('Failed to load image');
|
|
214
|
-
|
|
212
|
+
setAspectRatio(0);
|
|
215
213
|
};
|
|
216
214
|
}
|
|
217
215
|
}, [src, isMobile]);
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
216
|
+
(0, react_1.useEffect)(() => {
|
|
217
|
+
if (!isMobile || !window)
|
|
218
|
+
return;
|
|
219
|
+
const updateHeight = () => setImageHeight(window.innerWidth * aspectRatio);
|
|
220
|
+
updateHeight();
|
|
221
|
+
window.addEventListener('resize', updateHeight);
|
|
222
|
+
return () => window.removeEventListener('resize', updateHeight);
|
|
223
|
+
}, [aspectRatio, isMobile]);
|
|
224
|
+
const style = Object.assign({ backgroundImage: `url(${src})`, backgroundSize: 'cover', backgroundPosition: 'center', backgroundRepeat: 'no-repeat', width: '100%' }, (isMobile ? { maxWidth: '100vw', height: imageHeight ? `${imageHeight}px` : 'auto' } : { paddingTop: '75%' }));
|
|
225
|
+
return react_1.default.createElement("div", { className: className, style: style });
|
|
226
226
|
};
|
|
227
227
|
//# sourceMappingURL=HotelInfo.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"HotelInfo.js","sourceRoot":"/","sources":["src/pages/hotel/HotelInfo.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,6CAA0D;AAC1D,2CAA4D;AAC5D,4DAAoC;AACpC,wEAA0C;AAC1C,uEAAuE;AACvE,+CAA+D;AAC/D,iDAA+C;AAC/C,0DAAuD;AAEvD,6EAAqD;AACrD,6EAAqD;AACrD,uEAAgE;AAChE,iGAAyE;AACzE,8DAA2D;AAC3D,kEAA2D;AAC3D,mGAA0E;AAC1E,2HAAmG;AACnG,mCAA+C;AAC/C,2EAAqE;AACrE,wCAAqC;AACrC,mEAA2C;AAC3C,qEAA6C;AAE7C,SAAwB,SAAS;;IAC7B,MAAM,EAAE,KAAK,EAAE,GAAG,IAAA,uBAAe,GAAE,CAAC;IACpC,MAAM,qBAAqB,GAAG,IAAA,gDAAwB,GAAE,CAAC;IACzD,MAAM,EAAE,CAAC,EAAE,GAAG,IAAA,8BAAc,GAAE,CAAC;IAC/B,MAAM,OAAO,GAAG,IAAA,kBAAU,EAAC,4BAAoB,CAAC,CAAC;IACjD,MAAM,QAAQ,GAAG,OAAO,CAAC,UAAU,IAAI,oBAAU,CAAC,KAAK,CAAC;IAExD,MAAM,QAAQ,GAAG,KAAK,aAAL,KAAK,uBAAL,KAAK,CAAE,SAAS,CAAC;IAElC,MAAM,EAAE,KAAK,EAAE,KAAK,EAAE,UAAU,EAAE,OAAO,EAAE,GAAG,MA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AAG,GAAG,EAAE;gBACd,MAAM,WAAW,GAAG,GAAG,CAAC,MAAM,GAAG,GAAG,CAAC,KAAK,CAAC;gBAC3C,cAAc,CAAC,MAAM,CAAC,UAAU,GAAG,WAAW,CAAC,CAAC;YACpD,CAAC,CAAC;YACF,GAAG,CAAC,OAAO,GAAG,GAAG,EAAE;gBACf,OAAO,CAAC,KAAK,CAAC,sBAAsB,CAAC,CAAC;gBACtC,cAAc,CAAC,CAAC,CAAC,CAAC;YACtB,CAAC,CAAC;SACL;IACL,CAAC,EAAE,CAAC,GAAG,EAAE,QAAQ,CAAC,CAAC,CAAC;IAEpB,OAAO,CACH,uCACI,SAAS,EAAE,SAAS,EACpB,KAAK,kBACD,eAAe,EAAE,OAAO,GAAG,GAAG,EAC9B,cAAc,EAAE,OAAO,EACvB,kBAAkB,EAAE,QAAQ,EAC5B,gBAAgB,EAAE,WAAW,EAC7B,KAAK,EAAE,MAAM,IACV,CAAC,QAAQ;YACR,CAAC,CAAC;gBACI,QAAQ,EAAE,OAAO;gBACjB,MAAM,EAAE,WAAW,CAAC,CAAC,CAAC,GAAG,WAAW,IAAI,CAAC,CAAC,CAAC,MAAM;aACpD;YACH,CAAC,CAAC;gBACI,UAAU,EAAE,KAAK;aACpB,CAAC,IAET,CACV,CAAC;AACN,CAAC,CAAC","sourcesContent":["import { StepHotelInfoViewEvent } from '@frontend/events';\nimport { useCurrentHotel, useEvent } from '@frontend/hooks';\nimport classNames from 'classnames';\nimport FsLightbox from 'fslightbox-react';\nimport { useHistoryConsistentPush } from 'hooks/HistoryConsistentPush';\nimport React, { useContext, useEffect, useState } from 'react';\nimport { useTranslation } from 'react-i18next';\nimport { Translation } from 'translations/Translation';\n\nimport BEButton from '@/components/generic/BEButton';\nimport Headline from '@/components/generic/Headline';\nimport Icon, { IconType } from '@/components/generic/Icon/Icon';\nimport HotelLocationMap from '@/components/generic/map/HotelLocationMap';\nimport { PageTitle } from '@/components/generic/PageTitle';\nimport Text, { TextType } from '@/components/generic/Text';\nimport HotelInfoPerkRow from '@/components/steps/hotel/HotelInfoPerksRow';\nimport TransportDistanceFromHotelBlock from '@/components/summary/TransportDistanceFromHotelBlock';\nimport { BookingEngineContext } from '@/index';\nimport ImageProvider, { ImageSize } from '@/providers/ImageProvider';\nimport { Color } from '@/util/Color';\nimport ScreenSize from '@/util/ScreenSize';\nimport StepManager from '@/util/StepManager';\n\nexport default function HotelInfo() {\n const { hotel } = useCurrentHotel();\n const historyConsistentPush = useHistoryConsistentPush();\n const { t } = useTranslation();\n const context = useContext(BookingEngineContext);\n const isMobile = context.screenSize <= ScreenSize.Large;\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 }\n\n 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?.images, hotel?.rooms]);\n\n const onBookNowClick = () => {\n historyConsistentPush(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 const hotelServices = hotel?.hotelServices?.filter(({ name }) => !!name) || [];\n const quoteImage = isMobile ? hotel?.hotelInfo?.quoteImageMobile : hotel?.hotelInfo?.quoteImageDesktop;\n\n return (\n <>\n <PageTitle step=\"HotelInfo\" />\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\">\n {hotel?.hotelInfo?.countryPrefix ?? ''} {hotel?.address?.country}\n </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.Misc.BookNow)}\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 rs-hotelinfo\">\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 className=\"rs-hotelinfo-about\" bold>\n {t(Translation.Step.Hotel.About)}\n </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>{t(Translation.Step.Hotel.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 className=\"rs-hotelinfo-andyougetall\">{t(Translation.Step.Hotel.AndYouGetAll)}</strong>\n </Text>\n </div>\n <div className=\"row\">\n <HotelInfoPerkRow hotel={hotel} />\n </div>\n {hotel?.perksShowDisclaimer && (\n <div className=\"row u-marg-top--lighter\">\n <small className=\"col-12\">{t(Translation.Misc.PerksDisclaimer)}</small>\n </div>\n )}\n </>\n )}\n </div>\n {!!hotelServices.length && (\n <div className=\"u-marg-bottom u-marg-bottom--heavy\">\n <div className=\"u-marg-bottom--heavy\">\n <Headline className=\"rs-hotelinfo-hotelamenities\" bold>\n {t(Translation.Step.Hotel.HotelAmenities)}\n </Headline>\n </div>\n <div className=\"row\">\n {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 className=\"rs-hotelinfo-policies\" bold>\n {t(Translation.Step.Hotel.Policies)}\n </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\n {quoteImage && (\n <div className=\"u-marg-bottom u-marg-bottom--heavy\">\n <QuoteImage\n isMobile={isMobile}\n className={classNames('u-marg-bottom--heavy rs-hotelinfo-quote-images', {\n '--mobile': isMobile,\n '--desktop': !isMobile,\n })}\n src={quoteImage}\n ></QuoteImage>\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 className=\"rs-hotelinfo-gallery\" bold>\n {t(Translation.Step.Hotel.Gallery)}\n </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\nconst QuoteImage = ({ src, className, isMobile }: { src: string; className: string; isMobile: boolean }) => {\n const [imageHeight, setImageHeight] = useState(0);\n useEffect(() => {\n if (isMobile) {\n const img = new Image();\n img.src = src;\n\n img.onload = () => {\n const aspectRatio = img.height / img.width;\n setImageHeight(window.innerWidth * aspectRatio);\n };\n img.onerror = () => {\n console.error('Failed to load image');\n setImageHeight(0);\n };\n }\n }, [src, isMobile]);\n\n return (\n <div\n className={className}\n style={{\n backgroundImage: `url(${src})`,\n backgroundSize: 'cover',\n backgroundPosition: 'center',\n backgroundRepeat: 'no-repeat',\n width: '100%',\n ...(isMobile\n ? {\n maxWidth: '100vw',\n height: imageHeight ? `${imageHeight}px` : 'auto',\n }\n : {\n paddingTop: '75%',\n }),\n }}\n ></div>\n );\n};\n"]}
|
|
1
|
+
{"version":3,"file":"HotelInfo.js","sourceRoot":"/","sources":["src/pages/hotel/HotelInfo.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,6CAA0D;AAC1D,2CAA4D;AAC5D,4DAAoC;AACpC,wEAA0C;AAC1C,uEAAuE;AACvE,+CAA+D;AAC/D,iDAA+C;AAC/C,0DAAuD;AAEvD,6EAAqD;AACrD,6EAAqD;AACrD,uEAAgE;AAChE,iGAAyE;AACzE,8DAA2D;AAC3D,kEAA2D;AAC3D,mGAA0E;AAC1E,2HAAmG;AACnG,mCAA+C;AAC/C,2EAAqE;AACrE,wCAAqC;AACrC,mEAA2C;AAC3C,qEAA6C;AAE7C,SAAwB,SAAS;;IAC7B,MAAM,EAAE,KAAK,EAAE,GAAG,IAAA,uBAAe,GAAE,CAAC;IACpC,MAAM,qBAAqB,GAAG,IAAA,gDAAwB,GAAE,CAAC;IACzD,MAAM,EAAE,CAAC,EAAE,GAAG,IAAA,8BAAc,GAAE,CAAC;IAC/B,MAAM,OAAO,GAAG,IAAA,kBAAU,EAAC,4BAAoB,CAAC,CA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,EAAE,WAAW,CAAC,CAAC,CAAC,GAAG,WAAW,IAAI,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC,CAAC,EAAE,UAAU,EAAE,KAAK,EAAE,CAAC,CACnH,CAAC;IAEF,OAAO,uCAAK,SAAS,EAAE,SAAS,EAAE,KAAK,EAAE,KAAK,GAAQ,CAAC;AAC3D,CAAC,CAAC","sourcesContent":["import { StepHotelInfoViewEvent } from '@frontend/events';\nimport { useCurrentHotel, useEvent } from '@frontend/hooks';\nimport classNames from 'classnames';\nimport FsLightbox from 'fslightbox-react';\nimport { useHistoryConsistentPush } from 'hooks/HistoryConsistentPush';\nimport React, { useContext, useEffect, useState } from 'react';\nimport { useTranslation } from 'react-i18next';\nimport { Translation } from 'translations/Translation';\n\nimport BEButton from '@/components/generic/BEButton';\nimport Headline from '@/components/generic/Headline';\nimport Icon, { IconType } from '@/components/generic/Icon/Icon';\nimport HotelLocationMap from '@/components/generic/map/HotelLocationMap';\nimport { PageTitle } from '@/components/generic/PageTitle';\nimport Text, { TextType } from '@/components/generic/Text';\nimport HotelInfoPerkRow from '@/components/steps/hotel/HotelInfoPerksRow';\nimport TransportDistanceFromHotelBlock from '@/components/summary/TransportDistanceFromHotelBlock';\nimport { BookingEngineContext } from '@/index';\nimport ImageProvider, { ImageSize } from '@/providers/ImageProvider';\nimport { Color } from '@/util/Color';\nimport ScreenSize from '@/util/ScreenSize';\nimport StepManager from '@/util/StepManager';\n\nexport default function HotelInfo() {\n const { hotel } = useCurrentHotel();\n const historyConsistentPush = useHistoryConsistentPush();\n const { t } = useTranslation();\n const context = useContext(BookingEngineContext);\n const isMobile = context.screenSize <= ScreenSize.Large;\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 }\n\n 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?.images, hotel?.rooms]);\n\n const onBookNowClick = () => {\n historyConsistentPush(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 const hotelServices = hotel?.hotelServices?.filter(({ name }) => !!name) || [];\n const quoteImage = isMobile ? hotel?.quoteImageMobile : hotel?.quoteImageDesktop;\n\n return (\n <>\n <PageTitle step=\"HotelInfo\" />\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\">\n {hotel?.countryPrefix ?? ''} {hotel?.address?.country}\n </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.Misc.BookNow)}\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 rs-hotelinfo-transport-distance\">\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 rs-hotelinfo\">\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 className=\"rs-hotelinfo-about\" bold>\n {t(Translation.Step.Hotel.About)}\n </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>{t(Translation.Step.Hotel.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 className=\"rs-hotelinfo-andyougetall\">{t(Translation.Step.Hotel.AndYouGetAll)}</strong>\n </Text>\n </div>\n <div className=\"row\">\n <HotelInfoPerkRow hotel={hotel} />\n </div>\n {hotel?.perksShowDisclaimer && (\n <div className=\"row u-marg-top--lighter\">\n <small className=\"col-12\">{t(Translation.Misc.PerksDisclaimer)}</small>\n </div>\n )}\n </>\n )}\n </div>\n {!!hotelServices.length && (\n <div className=\"u-marg-bottom u-marg-bottom--heavy\">\n <div className=\"u-marg-bottom--heavy\">\n <Headline className=\"rs-hotelinfo-hotelamenities\" bold>\n {t(Translation.Step.Hotel.HotelAmenities)}\n </Headline>\n </div>\n <div className=\"row\">\n {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 className=\"rs-hotelinfo-policies\" bold>\n {t(Translation.Step.Hotel.Policies)}\n </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\n {quoteImage && (\n <div className=\"u-marg-bottom u-marg-bottom--heavy\">\n <QuoteImage\n isMobile={isMobile}\n className={classNames('u-marg-bottom--heavy rs-hotelinfo-quote-images', {\n '--mobile': isMobile,\n '--desktop': !isMobile,\n })}\n src={quoteImage}\n ></QuoteImage>\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 className=\"rs-hotelinfo-gallery\" bold>\n {t(Translation.Step.Hotel.Gallery)}\n </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\nconst QuoteImage = ({ src, className, isMobile }: { src: string; className: string; isMobile: boolean }) => {\n const [aspectRatio, setAspectRatio] = useState(0);\n const [imageHeight, setImageHeight] = useState(0);\n\n useEffect(() => {\n if (isMobile && src) {\n const img = new Image();\n img.src = src;\n img.onload = () => setAspectRatio(img.height / img.width);\n img.onerror = () => {\n console.error('Failed to load image');\n setAspectRatio(0);\n };\n }\n }, [src, isMobile]);\n\n useEffect(() => {\n if (!isMobile || !window) return;\n\n const updateHeight = () => setImageHeight(window.innerWidth * aspectRatio);\n updateHeight();\n\n window.addEventListener('resize', updateHeight);\n return () => window.removeEventListener('resize', updateHeight);\n }, [aspectRatio, isMobile]);\n\n const style = {\n backgroundImage: `url(${src})`,\n backgroundSize: 'cover',\n backgroundPosition: 'center',\n backgroundRepeat: 'no-repeat',\n width: '100%',\n ...(isMobile ? { maxWidth: '100vw', height: imageHeight ? `${imageHeight}px` : 'auto' } : { paddingTop: '75%' }),\n };\n\n return <div className={className} style={style}></div>;\n};\n"]}
|