@roomstay/frontend 2.6.14 → 2.6.15
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/main.bundle.js +1 -1
- package/dist/src/models/Api/HotelOverrideDTO.d.ts +3 -0
- package/dist/src/models/Api/HotelOverrideDTO.js.map +1 -1
- package/dist/src/models/Client/Hotel/Hotel.d.ts +2 -1
- package/dist/src/models/Client/Hotel/Hotel.js.map +1 -1
- package/dist/src/pages/hotel/HotelInfo.js +10 -7
- package/dist/src/pages/hotel/HotelInfo.js.map +1 -1
- package/dist/test.bundle.js +1 -1
- package/dist/tests/offline/entry/OfflineEngineDefaults.js +3 -0
- package/dist/tests/offline/entry/OfflineEngineDefaults.js.map +1 -1
- package/package.json +1 -1
|
@@ -17,6 +17,9 @@ export interface ShowPromoCodeAlertProps {
|
|
|
17
17
|
showPromoCodeAlert?: boolean;
|
|
18
18
|
promoCodeAlertType?: 'popup' | 'notification';
|
|
19
19
|
}
|
|
20
|
+
export interface HotelInfoPageProps {
|
|
21
|
+
countryPrefix?: string;
|
|
22
|
+
}
|
|
20
23
|
export interface IPageTitle {
|
|
21
24
|
enable: boolean;
|
|
22
25
|
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}\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"]}
|
|
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}\nexport interface HotelInfoPageProps {\n countryPrefix?: string;\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, IHotelColorScheme } from '@
|
|
|
3
3
|
import type { ReactChild } from 'react';
|
|
4
4
|
import type { MemberOnlyModalInputs } from '../../../components/steps/room/MemberSignInModal/MemberSignInModal.types';
|
|
5
5
|
import type { EIntegration, HotelRoomGroupsDTO, HotelRoomsDTO, HotelServiceDTO } from '../../Api/HotelDTO';
|
|
6
|
-
import type { TransportDistances } from '../../Api/HotelOverrideDTO';
|
|
6
|
+
import type { HotelInfoPageProps, 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';
|
|
@@ -162,6 +162,7 @@ export type Hotel = ConfigHotel & {
|
|
|
162
162
|
};
|
|
163
163
|
integrations?: EIntegration[];
|
|
164
164
|
maxAdults?: number;
|
|
165
|
+
hotelInfo?: HotelInfoPageProps;
|
|
165
166
|
};
|
|
166
167
|
/**
|
|
167
168
|
* Used for DetailsHotel event
|
|
@@ -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, IHotelColorScheme } from '@roomstay/core';\nimport type { ReactChild } from 'react';\n\nimport type { MemberOnlyModalInputs } from '@/components/steps/room/MemberSignInModal/MemberSignInModal.types';\nimport type { EIntegration, 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\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?: MemberOnlyModalInputs;\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}\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 maxAdults?: number; //fixed from frontend\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,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, IHotelColorScheme } from '@roomstay/core';\nimport type { ReactChild } from 'react';\n\nimport type { MemberOnlyModalInputs } from '@/components/steps/room/MemberSignInModal/MemberSignInModal.types';\nimport type { EIntegration, HotelRoomGroupsDTO, HotelRoomsDTO, HotelServiceDTO } from '@/models/Api/HotelDTO';\nimport type { HotelInfoPageProps, 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\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?: MemberOnlyModalInputs;\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}\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 maxAdults?: number; //fixed from frontend\n hotelInfo?: HotelInfoPageProps; //fixed from frontend\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"]}
|
|
@@ -45,7 +45,7 @@ const ImageProvider_1 = __importStar(require("../../providers/ImageProvider"));
|
|
|
45
45
|
const Color_1 = require("../../util/Color");
|
|
46
46
|
const StepManager_1 = __importDefault(require("../../util/StepManager"));
|
|
47
47
|
function HotelInfo() {
|
|
48
|
-
var _a, _b, _c, _d, _e, _f;
|
|
48
|
+
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
49
49
|
const { hotel } = (0, hooks_1.useCurrentHotel)();
|
|
50
50
|
const historyConsistentPush = (0, HistoryConsistentPush_1.useHistoryConsistentPush)();
|
|
51
51
|
const { t } = (0, react_i18next_1.useTranslation)();
|
|
@@ -89,13 +89,16 @@ function HotelInfo() {
|
|
|
89
89
|
const resizedUrl = ImageProvider_1.default.resizeImage(images[index], ImageProvider_1.ImageSize.Small);
|
|
90
90
|
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 }));
|
|
91
91
|
};
|
|
92
|
+
const hotelServices = ((_b = hotel === null || hotel === void 0 ? void 0 : hotel.hotelServices) === null || _b === void 0 ? void 0 : _b.filter(({ name }) => !!name)) || [];
|
|
92
93
|
return (react_1.default.createElement(react_1.default.Fragment, null,
|
|
93
94
|
react_1.default.createElement(PageTitle_1.PageTitle, { step: "HotelInfo" }),
|
|
94
95
|
react_1.default.createElement("div", { style: { backgroundImage: `url('${imageUrl && ImageProvider_1.default.resizeImage(imageUrl, ImageProvider_1.ImageSize.Original)}')` }, className: "c-masthead has-tint" },
|
|
95
96
|
react_1.default.createElement("div", { className: "container" },
|
|
96
97
|
react_1.default.createElement("div", { className: "c-masthead__body u-fill-white u-pad--heavy u-shadow-accent" },
|
|
97
98
|
react_1.default.createElement("h1", { className: "c-masthead__header" }, hotel === null || hotel === void 0 ? void 0 : hotel.name),
|
|
98
|
-
react_1.default.createElement("h2", { className: "c-masthead__sub-header" }, (
|
|
99
|
+
react_1.default.createElement("h2", { className: "c-masthead__sub-header" }, (_d = (_c = hotel === null || hotel === void 0 ? void 0 : hotel.hotelInfo) === null || _c === void 0 ? void 0 : _c.countryPrefix) !== null && _d !== void 0 ? _d : '',
|
|
100
|
+
" ", (_e = hotel === null || hotel === void 0 ? void 0 : hotel.address) === null || _e === void 0 ? void 0 :
|
|
101
|
+
_e.country)))),
|
|
99
102
|
react_1.default.createElement("div", { className: "u-fill-snow u-pad--heavy-med u-pad-top-bottom--heavy@m-" },
|
|
100
103
|
react_1.default.createElement("div", { className: "container" },
|
|
101
104
|
react_1.default.createElement("div", { className: "row" },
|
|
@@ -135,14 +138,14 @@ function HotelInfo() {
|
|
|
135
138
|
react_1.default.createElement(Headline_1.default, { className: "rs-hotelinfo-about", bold: true }, t(Translation_1.Translation.Step.Hotel.About))),
|
|
136
139
|
react_1.default.createElement("div", { className: "u-marg-bottom u-marg-bottom--heavy" },
|
|
137
140
|
react_1.default.createElement(Text_1.default, { type: Text_1.TextType.Small },
|
|
138
|
-
react_1.default.createElement("span", { dangerouslySetInnerHTML: { __html: ((
|
|
141
|
+
react_1.default.createElement("span", { dangerouslySetInnerHTML: { __html: ((_f = hotel === null || hotel === void 0 ? void 0 : hotel.description) === null || _f === void 0 ? void 0 : _f.replace('\r\n', '<br/><br/>')) || '' } })),
|
|
139
142
|
!!(hotel === null || hotel === void 0 ? void 0 : hotel.locationDescription) && (react_1.default.createElement(react_1.default.Fragment, null,
|
|
140
143
|
react_1.default.createElement("div", { className: "u-marg-top" },
|
|
141
144
|
react_1.default.createElement(Text_1.default, { type: Text_1.TextType.Small },
|
|
142
145
|
react_1.default.createElement("strong", null, t(Translation_1.Translation.Step.Hotel.Location)))),
|
|
143
146
|
react_1.default.createElement(Text_1.default, { type: Text_1.TextType.Small },
|
|
144
|
-
react_1.default.createElement("span", { dangerouslySetInnerHTML: { __html: (
|
|
145
|
-
!!((
|
|
147
|
+
react_1.default.createElement("span", { dangerouslySetInnerHTML: { __html: (_g = hotel === null || hotel === void 0 ? void 0 : hotel.locationDescription) === null || _g === void 0 ? void 0 : _g.replace('\r\n', '<br/><br/>') } }))))),
|
|
148
|
+
!!((_h = hotel === null || hotel === void 0 ? void 0 : hotel.perks) === null || _h === void 0 ? void 0 : _h.length) && (react_1.default.createElement(react_1.default.Fragment, null,
|
|
146
149
|
react_1.default.createElement("div", { className: "u-marg-bottom u-marg-bottom--heavy" },
|
|
147
150
|
react_1.default.createElement(Text_1.default, { type: Text_1.TextType.Small },
|
|
148
151
|
react_1.default.createElement("strong", { className: "rs-hotelinfo-andyougetall" }, t(Translation_1.Translation.Step.Hotel.AndYouGetAll)))),
|
|
@@ -150,10 +153,10 @@ function HotelInfo() {
|
|
|
150
153
|
react_1.default.createElement(HotelInfoPerksRow_1.default, { hotel: hotel })),
|
|
151
154
|
(hotel === null || hotel === void 0 ? void 0 : hotel.perksShowDisclaimer) && (react_1.default.createElement("div", { className: "row u-marg-top--lighter" },
|
|
152
155
|
react_1.default.createElement("small", { className: "col-12" }, t(Translation_1.Translation.Misc.PerksDisclaimer))))))),
|
|
153
|
-
!!
|
|
156
|
+
!!hotelServices.length && (react_1.default.createElement("div", { className: "u-marg-bottom u-marg-bottom--heavy" },
|
|
154
157
|
react_1.default.createElement("div", { className: "u-marg-bottom--heavy" },
|
|
155
158
|
react_1.default.createElement(Headline_1.default, { className: "rs-hotelinfo-hotelamenities", bold: true }, t(Translation_1.Translation.Step.Hotel.HotelAmenities))),
|
|
156
|
-
react_1.default.createElement("div", { className: "row" },
|
|
159
|
+
react_1.default.createElement("div", { className: "row" }, hotelServices.map((hotelService, index) => {
|
|
157
160
|
return (react_1.default.createElement("div", { key: index, className: "col-md-6" },
|
|
158
161
|
react_1.default.createElement("div", { className: "u-flex u-marg-bottom" },
|
|
159
162
|
react_1.default.createElement(Icon_1.default, { icon: Icon_1.IconType.Check, color: Color_1.Color.White, backgroundColor: Color_1.Color.Accent, borderRadius: "round", noPadding: true, size: "16px" }),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"HotelInfo.js","sourceRoot":"/","sources":["src/pages/hotel/HotelInfo.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,6CAA0D;AAC1D,2C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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,CACjB,8BAAC,0BAAU,IACP,OAAO,EAAE,kBAAkB,CAAC,OAAO,EACnC,KAAK,EAAE,kBAAkB,CAAC,KAAK,EAC/B,OAAO,EAAE,MAAM,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,uBAAa,CAAC,WAAW,CAAC,KAAK,EAAE,yBAAS,CAAC,QAAQ,CAAC,CAAC,EACpF,IAAI,EAAC,OAAO,GACd,CACL,CACF,CACN,CAAC;AACN,CAAC;AArPD,4BAqPC","sourcesContent":["import { StepHotelInfoViewEvent } from '@frontend/events';\nimport { useCurrentHotel, useEvent } from '@frontend/hooks';\nimport FsLightbox from 'fslightbox-react';\nimport { useHistoryConsistentPush } from 'hooks/HistoryConsistentPush';\nimport React, { 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 ImageProvider, { ImageSize } from '@/providers/ImageProvider';\nimport { Color } from '@/util/Color';\nimport StepManager from '@/util/StepManager';\n\nexport default function HotelInfo() {\n const { hotel } = useCurrentHotel();\n const historyConsistentPush = useHistoryConsistentPush();\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 }\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 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\">{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.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 {!!hotel?.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 {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 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 </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"]}
|
|
1
|
+
{"version":3,"file":"HotelInfo.js","sourceRoot":"/","sources":["src/pages/hotel/HotelInfo.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,6CAA0D;AAC1D,2CAA4D;AAC5D,wEAA0C;AAC1C,uEAAuE;AACvE,+CAAmD;AACnD,iDAA+C;AAC/C,0DAAuD;AAEvD,6EAAqD;AACrD,6EAAqD;AACrD,uEAAgE;AAChE,iGAAyE;AACzE,8DAA2D;AAC3D,kEAA2D;AAC3D,mGAA0E;AAC1E,2HAAmG;AACnG,2EAAqE;AACrE,wCAAqC;AACrC,qEAA6C;A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AK,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,CACjB,8BAAC,0BAAU,IACP,OAAO,EAAE,kBAAkB,CAAC,OAAO,EACnC,KAAK,EAAE,kBAAkB,CAAC,KAAK,EAC/B,OAAO,EAAE,MAAM,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,uBAAa,CAAC,WAAW,CAAC,KAAK,EAAE,yBAAS,CAAC,QAAQ,CAAC,CAAC,EACpF,IAAI,EAAC,OAAO,GACd,CACL,CACF,CACN,CAAC;AACN,CAAC;AAzPD,4BAyPC","sourcesContent":["import { StepHotelInfoViewEvent } from '@frontend/events';\nimport { useCurrentHotel, useEvent } from '@frontend/hooks';\nimport FsLightbox from 'fslightbox-react';\nimport { useHistoryConsistentPush } from 'hooks/HistoryConsistentPush';\nimport React, { 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 ImageProvider, { ImageSize } from '@/providers/ImageProvider';\nimport { Color } from '@/util/Color';\nimport StepManager from '@/util/StepManager';\n\nexport default function HotelInfo() {\n const { hotel } = useCurrentHotel();\n const historyConsistentPush = useHistoryConsistentPush();\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 }\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\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 </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"]}
|