@roomstay/frontend 2.3.35 → 2.3.38

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.
@@ -37,6 +37,7 @@ const BEButton_1 = __importDefault(require("../../../generic/BEButton"));
37
37
  const Currency_1 = __importDefault(require("../../../generic/Currency"));
38
38
  const Headline_1 = __importDefault(require("../../../generic/Headline"));
39
39
  const Icon_1 = require("../../../generic/Icon/Icon");
40
+ const LineBreak_1 = __importDefault(require("../../../generic/LineBreak"));
40
41
  const PlanpayPrice_1 = require("../../../generic/PlanpayPrice/PlanpayPrice");
41
42
  const Text_1 = __importStar(require("../../../generic/Text"));
42
43
  const ImageGallerySlider_1 = __importDefault(require("../ImageGallerySlider"));
@@ -137,15 +138,21 @@ function RoomDetails(props) {
137
138
  react_1.default.createElement("div", { className: "room-details--content-title u-marg-bottom--light" },
138
139
  react_1.default.createElement(Headline_1.default, { bold: true }, room.name)),
139
140
  react_1.default.createElement(RoomDetailsBedsBlock_1.RoomDetailsBedsBlock, { room: room }),
140
- react_1.default.createElement("div", { className: "room-details--content-description u-marg-bottom--light" },
141
+ (trimmedDescription === null || trimmedDescription === void 0 ? void 0 : trimmedDescription.replace(/<br(\/|)>/g, '')) && (react_1.default.createElement("div", { className: "room-details--content-description u-marg-bottom--light" },
141
142
  react_1.default.createElement(Text_1.default, { color: Color_1.Color.DarkGrey, type: Text_1.TextType.Small },
142
- react_1.default.createElement("span", { dangerouslySetInnerHTML: { __html: (trimmedDescription === null || trimmedDescription === void 0 ? void 0 : trimmedDescription.replace(/<br(\/|)>/g, '')) || '' } })))),
143
+ react_1.default.createElement("span", { dangerouslySetInnerHTML: { __html: (trimmedDescription === null || trimmedDescription === void 0 ? void 0 : trimmedDescription.replace(/<br(\/|)>/g, '')) || '' } }))))),
143
144
  react_1.default.createElement("div", { className: "row" },
144
- react_1.default.createElement("div", { className: "col-md-6 u-flex u-marg-bottom@m- flex-column align-items-start" },
145
- !(hotel === null || hotel === void 0 ? void 0 : hotel.perksHideOnRoomRow) && (react_1.default.createElement("div", { className: "room-details--content-perks u-marg-bottom@m-" },
145
+ !(hotel === null || hotel === void 0 ? void 0 : hotel.perksHideOnRoomRow) && (react_1.default.createElement("div", { className: "col-12 u-flex u-marg-bottom@m- flex-column align-items-start" },
146
+ react_1.default.createElement("div", { className: "room-details--content-perks u-marg-bottom@m-" },
146
147
  isMobile && (react_1.default.createElement("div", { className: "u-marg-bottom" },
147
148
  react_1.default.createElement(Text_1.default, { type: Text_1.TextType.Small, bold: true, color: Color_1.Color.Accent }, t(Translation_1.Translation.Misc.Perks.AndYouGetAll)))),
148
- react_1.default.createElement(RoomDetailsPerkBlock_1.RoomDetailsPerkBlock, { perks: perks }))),
149
+ react_1.default.createElement(RoomDetailsPerkBlock_1.RoomDetailsPerkBlock, { perks: perks })))),
150
+ (hotel === null || hotel === void 0 ? void 0 : hotel.showDescriptionOnRoomDetails) && (react_1.default.createElement("div", { className: "col-12" },
151
+ react_1.default.createElement(LineBreak_1.default, { noMargins: true }),
152
+ react_1.default.createElement("div", { className: "u-marg-top u-text-overflow-ellipsis-3 u-marg-bottom" },
153
+ react_1.default.createElement(Text_1.default, { type: Text_1.TextType.Small, color: Color_1.Color.Graphite },
154
+ react_1.default.createElement("span", { dangerouslySetInnerHTML: { __html: props.room.getLongDescription() || '' } }))))),
155
+ react_1.default.createElement("div", { className: "col-md-6 u-flex u-marg-bottom@m- flex-column align-items-start" },
149
156
  react_1.default.createElement(BEButton_1.default, { icon: Icon_1.IconType.ArrowRight2, isText: true, primary: true, size: "tiny", iconPosition: "right", onClick: moreDetailsOnClick }, t(Translation_1.Translation.Step.Room.RoomInfo.MoreDetails))),
150
157
  react_1.default.createElement("div", { className: "col-md-6 u-flex justify-content-end flex-column align-items-start align-items-md-end" },
151
158
  react_1.default.createElement(Text_1.default, { type: Text_1.TextType.Small, color: Color_1.Color.Navy, inline: true }, t(Translation_1.Translation.Misc.From)),
@@ -1 +1 @@
1
- {"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AI,CAAC,SAAS,CAAC;gBACZ,UAAU,EAAE,oBAAoB;gBAChC,OAAO,EAAE,OAAO;gBAChB,WAAW,EAAE;oBACT,OAAO,EAAE,WAAW;oBACpB,IAAI,EAAE,IAAI,CAAC,IAAI;iBAClB;gBACD,IAAI,EAAE,IAAI,CAAC,IAAI;gBACf,UAAU,EAAE,IAAI,CAAC,IAAI;gBACrB,kBAAkB,EAAE;oBAChB,OAAO,EAAE,wBAAwB;oBACjC,KAAK,EAAE,oBAAoB,CAAC,IAAI,CAAC,eAAe,CAAC,IAAI,CAAC,CAAC;oBACvD,SAAS,EAAE,oBAAoB,CAAC,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,CAAC;oBACzD,UAAU,EAAE,oBAAoB,CAAC,IAAI,CAAC,eAAe,EAAE,CAAC;oBACxD,aAAa,EAAE,GAAG,CAAC,eAAe;oBAClC,QAAQ,EAAE,SAAS;iBACtB;aACJ,CAAC,CACG,CACZ,CAAC;QACN,CAAC,CAAC,CACA,CACT,CAAC;AACN,CAAC;AA5MD,8BA4MC","sourcesContent":["import { BasketContext, BookingEngineContext, CompanyContext } from '@frontend/contexts';\nimport { useCurrentHotel } from '@frontend/hooks';\nimport classNames from 'classnames';\nimport React, { useContext, useEffect, useState } from 'react';\nimport { useTranslation } from 'react-i18next';\nimport { Translation } from 'translations/Translation';\n\nimport AutoAutoHeight from '@/animations/AutoAutoHeight';\nimport BEButton from '@/components/generic/BEButton';\nimport Currency from '@/components/generic/Currency';\nimport Headline from '@/components/generic/Headline';\nimport { IconType } from '@/components/generic/Icon/Icon';\nimport { PlanpayPrice } from '@/components/generic/PlanpayPrice/PlanpayPrice';\nimport Text, { TextType } from '@/components/generic/Text';\nimport ImageGallerySlider from '@/components/steps/room/ImageGallerySlider';\nimport { RoomDetailsBedsBlock } from '@/components/steps/room/roomDetails/RoomDetailsBedsBlock';\nimport { RoomDetailsPerkBlock } from '@/components/steps/room/roomDetails/RoomDetailsPerkBlock';\nimport RoomRatePills from '@/components/steps/room/roomDetails/roomRates/RoomRatePills';\nimport RoomRates from '@/components/steps/room/roomDetails/roomRates/RoomRates';\nimport RoomModal from '@/components/steps/room/RoomModal';\nimport useCurrency from '@/hooks/Currency';\nimport usePlanpay from '@/hooks/Planpay';\nimport { HotelPerk } from '@/models/Client/Hotel/HotelPerk';\nimport { Room } from '@/models/Room/Room';\nimport { RoomRate, RoomRatePriceInclusion } from '@/models/Room/RoomRate';\nimport FeaturedPromoFeature from '@/providers/feature/FeaturedPromoFeature';\nimport { ImageSize } from '@/providers/ImageProvider';\nimport { Color, getContrastTextColor } from '@/util/Color';\nimport * as currencyHelper from '@/util/CurrencyHelper';\nimport DataLayer, { InteractionStep, InteractionType } from '@/util/DataLayer';\nimport ScreenSize from '@/util/ScreenSize';\n\nexport interface RoomDetailsProps {\n room: Room;\n disableMarginBottom?: boolean;\n}\n\nexport default function RoomDetails(props: RoomDetailsProps) {\n const [featuredRates, setFeaturedRates] = useState<RoomRate[]>([]);\n const [standardRates, setStandardRates] = useState<RoomRate[]>([]);\n\n const [viewingRates, setViewingRates] = useState<boolean | number | null>(null);\n const [viewingDescription, setViewingDescription] = useState(false);\n\n const { t } = useTranslation();\n\n const context = useContext(BookingEngineContext);\n const basketContext = useContext(BasketContext);\n const ccx = useContext(CompanyContext);\n const { hotel } = useCurrentHotel();\n\n const { room } = props;\n\n const classes = classNames('room-details', {\n ['+is-open']: viewingRates,\n });\n\n useEffect(() => {\n if (basketContext.selectedBasketRow?.getRoom() && basketContext.selectedBasketRow.getRoom().code === props.room.code) {\n setViewingRates(true);\n }\n\n DataLayer.instance.addRoomImpression(room);\n }, [basketContext.selectedBasketRow]);\n\n useEffect(() => {\n let nonPromoRates: RoomRate[] = [];\n const toSetFeaturedRate: RoomRate[] = [];\n\n if (FeaturedPromoFeature.isActive()) {\n for (const currentRate of room.getRates()) {\n if (currentRate.promoCode?.toLowerCase() === basketContext.selectedBasketRow?.getPromoCode()?.toLowerCase()) {\n toSetFeaturedRate.unshift(currentRate);\n } else {\n nonPromoRates.push(currentRate);\n }\n }\n\n if (toSetFeaturedRate.length > 0) {\n setViewingRates(true);\n setFeaturedRates(toSetFeaturedRate);\n }\n } else {\n nonPromoRates = room.getRates();\n }\n\n setStandardRates(nonPromoRates);\n }, [room.getRates()]);\n\n const perks = hotel?.perks?.slice(0, 5);\n\n const trimmedDescription = room.getShortDescription();\n\n const isMobile = context.screenSize <= ScreenSize.Large;\n\n const ratesOpen = viewingRates || (context.screenSize <= ScreenSize.Medium && viewingRates === null);\n const moreDetailsOnClick = () => {\n DataLayer.instance.sendInteraction('More Room Details', InteractionType.LINK, InteractionStep.ROOMS);\n setViewingDescription(true);\n };\n const sendRoomClickOnClick = () => {\n if (!ratesOpen) {\n DataLayer.instance.sendRoomClick(room, basketContext.startDate, basketContext.endDate);\n }\n setViewingRates(!ratesOpen);\n };\n const closeDescriptionOnClose = () => {\n setViewingDescription(false);\n };\n\n const lowestPrice = Math.round(room.getLowestPrice(false, true));\n const currencySize = context.screenSize > ScreenSize.Medium && lowestPrice.toLocaleString().length < 7 ? 'large' : 'normal';\n\n const convertCurrencyPrice = (value: number) => Math.round(currencyHelper.convertPrice(value, true, ccx.currentCurrency, hotel?.defaultCurrency as string));\n\n const { value: price, isLoading } = useCurrency({\n hideDecimals: true,\n children: lowestPrice,\n });\n\n const selectedRow = basketContext.selectedBasketRow;\n\n const { hasPricePreview } = usePlanpay();\n\n return (\n <div className={`room-details-container ${props.disableMarginBottom ? '' : 'u-marg-bottom'}`}>\n <div className={classes}>\n <div className=\"room-details--image\">\n <ImageGallerySlider images={props.room.getImages()} imageSize={ImageSize.Medium} />\n </div>\n <div className=\"room-details--content u-pad--heavy u-pad@l-\">\n <div className=\"u-marg-bottom\">\n {context.screenSize > ScreenSize.Large && (\n <>\n <div className=\"u-marg-bottom\">\n <RoomRatePills room={room} limit={2} />\n </div>\n </>\n )}\n <div className=\"room-details--content-title u-marg-bottom--light\">\n <Headline bold>{room.name}</Headline>\n </div>\n <RoomDetailsBedsBlock room={room} />\n <div className=\"room-details--content-description u-marg-bottom--light\">\n <Text color={Color.DarkGrey} type={TextType.Small}>\n <span dangerouslySetInnerHTML={{ __html: trimmedDescription?.replace(/<br(\\/|)>/g, '') || '' }} />\n </Text>\n </div>\n </div>\n\n <div className=\"row\">\n <div className=\"col-md-6 u-flex u-marg-bottom@m- flex-column align-items-start\">\n {!hotel?.perksHideOnRoomRow && (\n <div className=\"room-details--content-perks u-marg-bottom@m-\">\n {isMobile && (\n <div className=\"u-marg-bottom\">\n <Text type={TextType.Small} bold color={Color.Accent}>\n {t(Translation.Misc.Perks.AndYouGetAll)}\n </Text>\n </div>\n )}\n <RoomDetailsPerkBlock perks={perks as HotelPerk[]} />\n </div>\n )}\n <BEButton icon={IconType.ArrowRight2} isText primary size=\"tiny\" iconPosition=\"right\" onClick={moreDetailsOnClick}>\n {t(Translation.Step.Room.RoomInfo.MoreDetails)}\n </BEButton>\n </div>\n <div className=\"col-md-6 u-flex justify-content-end flex-column align-items-start align-items-md-end\">\n <Text type={TextType.Small} color={Color.Navy} inline>\n {t(Translation.Misc.From)}\n </Text>\n <div className=\"room-details--content-price flex-row align-items-end\">\n <Headline size={currencySize} bold>\n <Currency hideDecimals>{lowestPrice}</Currency>\n </Headline>\n <Text color={Color.DarkGrey} inline>\n /{t(Translation.Misc.Night)}\n </Text>\n </div>\n <Text type={TextType.Small} color={Color.Grey} inline className=\"u-nowrap\">\n {room.getLowestPriceType() === RoomRatePriceInclusion.IncludingFeesAndTaxes\n ? t(Translation.Step.Room.RoomInfo.IncludesTaxes)\n : t(Translation.Step.Room.ExcludingTaxes)}\n </Text>\n </div>\n </div>\n <div className=\"u-flex-direction-column u-flex u-flex-align-flex-end u-flex-align-flex-start@m- u-w-100@m-\">\n {!isLoading && hasPricePreview ? (\n <div className=\"u-marg-top--light\">\n <PlanpayPrice price={price} checkin={(selectedRow?.getStartDate() || basketContext.endDate).format('YYYY-MM-DD')} currency={ccx.currentCurrency} />\n </div>\n ) : null}\n <BEButton\n className=\"u-marg-top--light\"\n name=\"ViewRatesNowButton\"\n primary\n primaryActive={!!ratesOpen}\n filled\n stopIconAnimation\n icon={ratesOpen ? IconType.ArrowUp2 : IconType.ArrowDown2}\n iconPosition=\"right\"\n onClick={sendRoomClickOnClick}\n wide={context.screenSize <= ScreenSize.Large}\n textColor={getContrastTextColor(ratesOpen ? hotel?.colors.accent3 : hotel?.colors.accent)}\n >\n {ratesOpen ? t(Translation.Step.Room.RoomInfo.CloseRates) : t(Translation.Step.Room.RoomInfo.ViewRates)}\n </BEButton>\n </div>\n </div>\n </div>\n <AutoAutoHeight open={!!ratesOpen}>\n <RoomRates roomCode={room.code as string} rates={standardRates} featuredRates={featuredRates} />\n </AutoAutoHeight>\n <RoomModal open={viewingDescription} room={props.room} rates={standardRates} featuredRates={featuredRates} onClose={closeDescriptionOnClose} />\n {room.getRates().map((rate) => {\n return (\n <script key={room.code + '-' + rate.code} type=\"application/ld+json\">\n {JSON.stringify({\n '@context': 'http://schema.org/',\n '@type': 'Offer',\n itemOffered: {\n '@type': 'HotelRoom',\n name: room.name,\n },\n name: rate.name,\n identifier: rate.code,\n priceSpecification: {\n '@type': 'UnitPriceSpecification',\n price: convertCurrencyPrice(rate.getAveragePrice(true)),\n basePrice: convertCurrencyPrice(rate.getTotalPrice(true)),\n totalPrice: convertCurrencyPrice(rate.getAveragePrice()),\n priceCurrency: ccx.currentCurrency,\n unitText: 'Nightly',\n },\n })}\n </script>\n );\n })}\n </div>\n );\n}\n"]}
1
+ {"version":3,"file":"RoomDetails.js","sourceRoot":"/","sources":["src/components/steps/room/roomDetails/RoomDetails.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,iDAAyF;AACzF,2CAAkD;AAClD,4DAAoC;AACpC,+CAA+D;AAC/D,iDAA+C;AAC/C,0DAAuD;AAEvD,iFAAyD;AACzD,6EAAqD;AACrD,6EAAqD;AACrD,6EAAqD;AACrD,yDAA0D;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E,KAAK,EAAE,aAAa,EAAE,aAAa,EAAE,aAAa,EAAE,OAAO,EAAE,uBAAuB,GAAI;QAC9I,IAAI,CAAC,QAAQ,EAAE,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE;YAC1B,OAAO,CACH,0CAAQ,GAAG,EAAE,IAAI,CAAC,IAAI,GAAG,GAAG,GAAG,IAAI,CAAC,IAAI,EAAE,IAAI,EAAC,qBAAqB,IAC/D,IAAI,CAAC,SAAS,CAAC;gBACZ,UAAU,EAAE,oBAAoB;gBAChC,OAAO,EAAE,OAAO;gBAChB,WAAW,EAAE;oBACT,OAAO,EAAE,WAAW;oBACpB,IAAI,EAAE,IAAI,CAAC,IAAI;iBAClB;gBACD,IAAI,EAAE,IAAI,CAAC,IAAI;gBACf,UAAU,EAAE,IAAI,CAAC,IAAI;gBACrB,kBAAkB,EAAE;oBAChB,OAAO,EAAE,wBAAwB;oBACjC,KAAK,EAAE,oBAAoB,CAAC,IAAI,CAAC,eAAe,CAAC,IAAI,CAAC,CAAC;oBACvD,SAAS,EAAE,oBAAoB,CAAC,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,CAAC;oBACzD,UAAU,EAAE,oBAAoB,CAAC,IAAI,CAAC,eAAe,EAAE,CAAC;oBACxD,aAAa,EAAE,GAAG,CAAC,eAAe;oBAClC,QAAQ,EAAE,SAAS;iBACtB;aACJ,CAAC,CACG,CACZ,CAAC;QACN,CAAC,CAAC,CACA,CACT,CAAC;AACN,CAAC;AA1ND,8BA0NC","sourcesContent":["import { BasketContext, BookingEngineContext, CompanyContext } from '@frontend/contexts';\nimport { useCurrentHotel } from '@frontend/hooks';\nimport classNames from 'classnames';\nimport React, { useContext, useEffect, useState } from 'react';\nimport { useTranslation } from 'react-i18next';\nimport { Translation } from 'translations/Translation';\n\nimport AutoAutoHeight from '@/animations/AutoAutoHeight';\nimport BEButton from '@/components/generic/BEButton';\nimport Currency from '@/components/generic/Currency';\nimport Headline from '@/components/generic/Headline';\nimport { IconType } from '@/components/generic/Icon/Icon';\nimport LineBreak from '@/components/generic/LineBreak';\nimport { PlanpayPrice } from '@/components/generic/PlanpayPrice/PlanpayPrice';\nimport Text, { TextType } from '@/components/generic/Text';\nimport ImageGallerySlider from '@/components/steps/room/ImageGallerySlider';\nimport { RoomDetailsBedsBlock } from '@/components/steps/room/roomDetails/RoomDetailsBedsBlock';\nimport { RoomDetailsPerkBlock } from '@/components/steps/room/roomDetails/RoomDetailsPerkBlock';\nimport RoomRatePills from '@/components/steps/room/roomDetails/roomRates/RoomRatePills';\nimport RoomRates from '@/components/steps/room/roomDetails/roomRates/RoomRates';\nimport RoomModal from '@/components/steps/room/RoomModal';\nimport useCurrency from '@/hooks/Currency';\nimport usePlanpay from '@/hooks/Planpay';\nimport { HotelPerk } from '@/models/Client/Hotel/HotelPerk';\nimport { Room } from '@/models/Room/Room';\nimport { RoomRate, RoomRatePriceInclusion } from '@/models/Room/RoomRate';\nimport FeaturedPromoFeature from '@/providers/feature/FeaturedPromoFeature';\nimport { ImageSize } from '@/providers/ImageProvider';\nimport { Color, getContrastTextColor } from '@/util/Color';\nimport * as currencyHelper from '@/util/CurrencyHelper';\nimport DataLayer, { InteractionStep, InteractionType } from '@/util/DataLayer';\nimport ScreenSize from '@/util/ScreenSize';\n\nexport interface RoomDetailsProps {\n room: Room;\n disableMarginBottom?: boolean;\n}\n\nexport default function RoomDetails(props: RoomDetailsProps) {\n const [featuredRates, setFeaturedRates] = useState<RoomRate[]>([]);\n const [standardRates, setStandardRates] = useState<RoomRate[]>([]);\n\n const [viewingRates, setViewingRates] = useState<boolean | number | null>(null);\n const [viewingDescription, setViewingDescription] = useState(false);\n\n const { t } = useTranslation();\n\n const context = useContext(BookingEngineContext);\n const basketContext = useContext(BasketContext);\n const ccx = useContext(CompanyContext);\n const { hotel } = useCurrentHotel();\n\n const { room } = props;\n\n const classes = classNames('room-details', {\n ['+is-open']: viewingRates,\n });\n\n useEffect(() => {\n if (basketContext.selectedBasketRow?.getRoom() && basketContext.selectedBasketRow.getRoom().code === props.room.code) {\n setViewingRates(true);\n }\n\n DataLayer.instance.addRoomImpression(room);\n }, [basketContext.selectedBasketRow]);\n\n useEffect(() => {\n let nonPromoRates: RoomRate[] = [];\n const toSetFeaturedRate: RoomRate[] = [];\n\n if (FeaturedPromoFeature.isActive()) {\n for (const currentRate of room.getRates()) {\n if (currentRate.promoCode?.toLowerCase() === basketContext.selectedBasketRow?.getPromoCode()?.toLowerCase()) {\n toSetFeaturedRate.unshift(currentRate);\n } else {\n nonPromoRates.push(currentRate);\n }\n }\n\n if (toSetFeaturedRate.length > 0) {\n setViewingRates(true);\n setFeaturedRates(toSetFeaturedRate);\n }\n } else {\n nonPromoRates = room.getRates();\n }\n\n setStandardRates(nonPromoRates);\n }, [room.getRates()]);\n\n const perks = hotel?.perks?.slice(0, 5);\n\n const trimmedDescription = room.getShortDescription();\n\n const isMobile = context.screenSize <= ScreenSize.Large;\n\n const ratesOpen = viewingRates || (context.screenSize <= ScreenSize.Medium && viewingRates === null);\n const moreDetailsOnClick = () => {\n DataLayer.instance.sendInteraction('More Room Details', InteractionType.LINK, InteractionStep.ROOMS);\n setViewingDescription(true);\n };\n const sendRoomClickOnClick = () => {\n if (!ratesOpen) {\n DataLayer.instance.sendRoomClick(room, basketContext.startDate, basketContext.endDate);\n }\n setViewingRates(!ratesOpen);\n };\n const closeDescriptionOnClose = () => {\n setViewingDescription(false);\n };\n\n const lowestPrice = Math.round(room.getLowestPrice(false, true));\n const currencySize = context.screenSize > ScreenSize.Medium && lowestPrice.toLocaleString().length < 7 ? 'large' : 'normal';\n\n const convertCurrencyPrice = (value: number) => Math.round(currencyHelper.convertPrice(value, true, ccx.currentCurrency, hotel?.defaultCurrency as string));\n\n const { value: price, isLoading } = useCurrency({\n hideDecimals: true,\n children: lowestPrice,\n });\n\n const selectedRow = basketContext.selectedBasketRow;\n\n const { hasPricePreview } = usePlanpay();\n\n return (\n <div className={`room-details-container ${props.disableMarginBottom ? '' : 'u-marg-bottom'}`}>\n <div className={classes}>\n <div className=\"room-details--image\">\n <ImageGallerySlider images={props.room.getImages()} imageSize={ImageSize.Medium} />\n </div>\n <div className=\"room-details--content u-pad--heavy u-pad@l-\">\n <div className=\"u-marg-bottom\">\n {context.screenSize > ScreenSize.Large && (\n <>\n <div className=\"u-marg-bottom\">\n <RoomRatePills room={room} limit={2} />\n </div>\n </>\n )}\n <div className=\"room-details--content-title u-marg-bottom--light\">\n <Headline bold>{room.name}</Headline>\n </div>\n <RoomDetailsBedsBlock room={room} />\n {trimmedDescription?.replace(/<br(\\/|)>/g, '') && (\n <div className=\"room-details--content-description u-marg-bottom--light\">\n <Text color={Color.DarkGrey} type={TextType.Small}>\n <span dangerouslySetInnerHTML={{ __html: trimmedDescription?.replace(/<br(\\/|)>/g, '') || '' }} />\n </Text>\n </div>\n )}\n </div>\n\n <div className=\"row\">\n {!hotel?.perksHideOnRoomRow && (\n <div className=\"col-12 u-flex u-marg-bottom@m- flex-column align-items-start\">\n <div className=\"room-details--content-perks u-marg-bottom@m-\">\n {isMobile && (\n <div className=\"u-marg-bottom\">\n <Text type={TextType.Small} bold color={Color.Accent}>\n {t(Translation.Misc.Perks.AndYouGetAll)}\n </Text>\n </div>\n )}\n <RoomDetailsPerkBlock perks={perks as HotelPerk[]} />\n </div>\n </div>\n )}\n {hotel?.showDescriptionOnRoomDetails && (\n <div className=\"col-12\">\n <LineBreak noMargins />\n <div className=\"u-marg-top u-text-overflow-ellipsis-3 u-marg-bottom\">\n <Text type={TextType.Small} color={Color.Graphite}>\n <span dangerouslySetInnerHTML={{ __html: props.room.getLongDescription() || '' }} />\n </Text>\n </div>\n </div>\n )}\n <div className=\"col-md-6 u-flex u-marg-bottom@m- flex-column align-items-start\">\n <BEButton icon={IconType.ArrowRight2} isText primary size=\"tiny\" iconPosition=\"right\" onClick={moreDetailsOnClick}>\n {t(Translation.Step.Room.RoomInfo.MoreDetails)}\n </BEButton>\n </div>\n <div className=\"col-md-6 u-flex justify-content-end flex-column align-items-start align-items-md-end\">\n <Text type={TextType.Small} color={Color.Navy} inline>\n {t(Translation.Misc.From)}\n </Text>\n <div className=\"room-details--content-price flex-row align-items-end\">\n <Headline size={currencySize} bold>\n <Currency hideDecimals>{lowestPrice}</Currency>\n </Headline>\n <Text color={Color.DarkGrey} inline>\n /{t(Translation.Misc.Night)}\n </Text>\n </div>\n <Text type={TextType.Small} color={Color.Grey} inline className=\"u-nowrap\">\n {room.getLowestPriceType() === RoomRatePriceInclusion.IncludingFeesAndTaxes\n ? t(Translation.Step.Room.RoomInfo.IncludesTaxes)\n : t(Translation.Step.Room.ExcludingTaxes)}\n </Text>\n </div>\n </div>\n <div className=\"u-flex-direction-column u-flex u-flex-align-flex-end u-flex-align-flex-start@m- u-w-100@m-\">\n {!isLoading && hasPricePreview ? (\n <div className=\"u-marg-top--light\">\n <PlanpayPrice price={price} checkin={(selectedRow?.getStartDate() || basketContext.endDate).format('YYYY-MM-DD')} currency={ccx.currentCurrency} />\n </div>\n ) : null}\n <BEButton\n className=\"u-marg-top--light\"\n name=\"ViewRatesNowButton\"\n primary\n primaryActive={!!ratesOpen}\n filled\n stopIconAnimation\n icon={ratesOpen ? IconType.ArrowUp2 : IconType.ArrowDown2}\n iconPosition=\"right\"\n onClick={sendRoomClickOnClick}\n wide={context.screenSize <= ScreenSize.Large}\n textColor={getContrastTextColor(ratesOpen ? hotel?.colors.accent3 : hotel?.colors.accent)}\n >\n {ratesOpen ? t(Translation.Step.Room.RoomInfo.CloseRates) : t(Translation.Step.Room.RoomInfo.ViewRates)}\n </BEButton>\n </div>\n </div>\n </div>\n <AutoAutoHeight open={!!ratesOpen}>\n <RoomRates roomCode={room.code as string} rates={standardRates} featuredRates={featuredRates} />\n </AutoAutoHeight>\n <RoomModal open={viewingDescription} room={props.room} rates={standardRates} featuredRates={featuredRates} onClose={closeDescriptionOnClose} />\n {room.getRates().map((rate) => {\n return (\n <script key={room.code + '-' + rate.code} type=\"application/ld+json\">\n {JSON.stringify({\n '@context': 'http://schema.org/',\n '@type': 'Offer',\n itemOffered: {\n '@type': 'HotelRoom',\n name: room.name,\n },\n name: rate.name,\n identifier: rate.code,\n priceSpecification: {\n '@type': 'UnitPriceSpecification',\n price: convertCurrencyPrice(rate.getAveragePrice(true)),\n basePrice: convertCurrencyPrice(rate.getTotalPrice(true)),\n totalPrice: convertCurrencyPrice(rate.getAveragePrice()),\n priceCurrency: ccx.currentCurrency,\n unitText: 'Nightly',\n },\n })}\n </script>\n );\n })}\n </div>\n );\n}\n"]}
@@ -59,6 +59,7 @@ export { useFormContext } from 'react-hook-form';
59
59
  export { default as API } from './api/BookingAPI';
60
60
  export * from './models/Api/HotelDTO';
61
61
  export * from './models/Api/HotelOverrideDTO';
62
+ export type { BookingWizardProperty } from './models/BookingWizard/BookingWizardProperty';
62
63
  export * from './models/Client/Hotel/Company';
63
64
  export * from './models/Client/Hotel/DistanceUnitType.types';
64
65
  export * from './models/Client/Hotel/Hotel';
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"/","sources":["src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA,kCAAkC;AAClC,kDAA6B;AAE7B,uGAA+E;AAC/E,+EAAuD;AACvD,+EAAuD;AACvD,qFAA6D;AAC7D,qEAA6C;AAE7C,yFAAiE;AAEpD,QAAA,KAAK,GAAG,eAAQ,CAAC;AAE9B,+CAA+C;AAAtC,+GAAA,cAAc,OAAA;AACvB,qDAAwC;AAA/B,wGAAA,IAAI,OAAA;AAEb,aAAa;AACb,8DAAwE;AAA/D,iIAAA,OAAO,OAAkB;AAClC,6DAA2C;AAC3C,oDAA8D;AAArD,+GAAA,OAAO,OAAS;AACzB,0DAAoE;AAA3D,qHAAA,OAAO,OAAY;AAC5B,mEAA6E;AAApE,qHAAA,OAAO,OAAY;AAC5B,0DAAoE;AAA3D,qHAAA,OAAO,OAAY;AAC5B,uDAAiE;AAAxD,6GAAA,OAAO,OAAQ;AACxB,iEAA+C;AAC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B;IACpB,EAAE,EAAE,oBAAU;CACjB,CAAC","sourcesContent":["// TODO: Look into resolving this.\nimport ReactRaw from 'react';\n\nimport StepConfirmation from '@/pages/steps/StepConfirmation/StepConfirmation';\nimport StepDate from '@/pages/steps/StepDate/StepDate';\nimport StepRoom from '@/pages/steps/StepRoom/StepRoom';\nimport StepThanks from '@/pages/steps/StepThanks/StepThanks';\nimport StepManager from '@/util/StepManager';\n\nimport RoomstayEventManager from './events/RoomstayEventManager';\n\nexport const react = ReactRaw;\n\nexport { useTranslation } from 'react-i18next';\nexport { Link } from 'react-router-dom';\n\n// Components\nexport { default as AutoAutoHeight } from '@/animations/AutoAutoHeight';\nexport * from '@/components/generic/Alert';\nexport { default as Alert } from '@/components/generic/Alert';\nexport { default as BEButton } from '@/components/generic/BEButton';\nexport { default as Checkbox } from '@/components/generic/Checkbox/Checkbox';\nexport { default as Headline } from '@/components/generic/Headline';\nexport { default as Icon } from '@/components/generic/Icon/Icon';\nexport * from '@/components/generic/Icon/Icon';\nexport { default as InputGroup } from '@/components/generic/InputGroup/InputGroup';\nexport { default as LineBreak } from '@/components/generic/LineBreak';\nexport { default as RadioFields } from '@/components/generic/radio/RadioFields';\nexport * from '@/components/generic/Select/index';\nexport * from '@/components/generic/Text';\nexport { default as TextArea } from '@/components/generic/TextArea';\nexport { default as TextBox } from '@/components/generic/TextBox';\nexport * from '@/components/steps/confirmation/StepConfirmationCommentsComponent';\nexport { default as StepConfirmationCountrySelector } from '@/components/steps/confirmation/StepConfirmationCountrySelector';\nexport { BE_NO_ROOMS_FOUND_BLOCK } from '@/components/steps/room/NoRoomsFoundBlock';\nexport { default as NoRoomsFoundBlock } from '@/components/steps/room/NoRoomsFoundBlock';\nexport * from '@/components/steps/room/StepRoomBestRateAlert';\nexport { default as StepNoRoomBestRateAlert } from '@/components/steps/room/StepRoomBestRateAlert';\nexport * from '@/components/summary/BESummary';\nexport * from '@/components/summary/BESummaryPerkBlock';\nexport * from '@/engines/BookingWizardEngine/BookingWizardEngine';\nexport * from '@/engines/CustomEngine/CustomEngine';\nexport * from '@/engines/FullPageBookingEngine/FullPageBookingEngine';\nexport * from '@/engines/InlineRoomMiniEngine/InlineRoomMiniEngine';\nexport * from '@/engines/RecentSearchesEngine/RecentSearchesEngine';\n\n// Loaders\nexport { default as SmallSpinner } from '@/components/generic/loader/SmallSpinner';\n\n// Providers\nexport * from '@/providers/CurrencyProvider';\nexport { default as CurrencyProvider } from '@/providers/CurrencyProvider';\nexport { default as FeatureProvider } from '@/providers/FeatureProvider';\nexport * from '@/providers/LanguageProvider';\nexport * from '@/providers/PromotionProvider';\nexport { default as RatePillProvider } from '@/providers/RatePillProvider';\n\n// Features\n\nexport { default as ConfirmationVerifyFeature } from '@/providers/feature/ConfirmationVerifyFeature';\nexport { default as DatePickerTypeFeature } from '@/providers/feature/DatePickerTypeFeature';\nexport { default as E164PhoneNumberFieldFeature } from '@/providers/feature/E164PhoneNumberFieldFeature';\nexport { default as FeaturedPromoFeature } from '@/providers/feature/FeaturedPromoFeature';\nexport { default as FullPageEngineSmallSpacingFeature } from '@/providers/feature/FullPageEngineSmallSpacingFeature';\nexport { default as InlineAddonStepFeature } from '@/providers/feature/InlineAddonStepFeature';\nexport { default as PlanPayPricePreviewFeature } from '@/providers/feature/PlanPayPricePreviewFeature';\nexport { default as RoomUpsellFeature } from '@/providers/feature/RoomUpsellFeature';\nexport { default as ShowIATANumberOnCheckoutFeature } from '@/providers/feature/ShowIATANumberOnCheckoutFeature';\n\n// Contexts\nexport { registerReplacement, withDI } from '@/providers/DIProvider';\nexport * from '@/providers/RoomstayThemeEngine';\nexport { default as RoomstayThemeEngine } from '@/providers/RoomstayThemeEngine';\nexport { default as SessionProvider } from '@/providers/SessionProvider';\nexport { default as DataLayer } from '@/util/DataLayer';\nexport * from '@/util/DataLayer';\nexport * from '@/util/DefaultValueManager';\nexport * from '@/util/RouteManager';\nexport * from '@frontend/contexts';\nexport { useFormContext } from 'react-hook-form';\n\n// Models\nexport { default as API } from '@/api/BookingAPI';\nexport * from '@/models/Api/HotelDTO';\nexport * from '@/models/Api/HotelOverrideDTO';\nexport * from '@/models/Client/Hotel/Company';\nexport * from '@/models/Client/Hotel/DistanceUnitType.types';\nexport * from '@/models/Client/Hotel/Hotel';\nexport { HotelDataSource } from '@/models/Client/Hotel/HotelDataSource.types';\nexport * from '@/models/Client/Hotel/HotelPerk';\nexport * from '@/models/Client/Hotel/WeekdayStartsOn.types';\n\n// Steps\nexport { default as StepAddon } from '@/pages/steps/StepAddon/StepAddon';\nexport { default as StepConfirmation } from '@/pages/steps/StepConfirmation/StepConfirmation';\nexport { default as StepDate } from '@/pages/steps/StepDate/StepDate';\nexport { default as StepGroupedRoom } from '@/pages/steps/StepGroupedRoom/StepGroupedRoom';\nexport { default as StepHotel } from '@/pages/steps/StepHotel/StepHotel';\nexport { default as StepRoom } from '@/pages/steps/StepRoom/StepRoom';\nexport { default as StepThanks } from '@/pages/steps/StepThanks/StepThanks';\nexport * from '@/translations/Translation';\nexport { default as StepManager } from '@/util/StepManager';\n\n// Util\n\nexport type { default as ColorProfile } from '@/models/Client/Hotel/ColorProfile';\nexport * from '@/util/Color';\nexport * from '@/util/Debounce';\n\n// Hooks\n\nexport * from '@/events/index';\nexport * from '@/hooks/CurrentHotelHook';\nexport * from '@/hooks/EventHook';\n\n/** @deprecated use `roomstay.events` instead */\nexport { default as RoomstayEventManager } from '@/events/RoomstayEventManager';\n\nexport const events = {\n on: RoomstayEventManager.addEvent,\n raise: RoomstayEventManager.raise,\n};\n\ndeclare const RS_VERSION: string;\nexport const Version = RS_VERSION;\n\nStepManager.currentSteps = {\n 0: StepDate,\n 10: StepRoom,\n 20: StepConfirmation,\n 30: StepThanks,\n};\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"/","sources":["src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA,kCAAkC;AAClC,kDAA6B;AAE7B,uGAA+E;AAC/E,+EAAuD;AACvD,+EAAuD;AACvD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,6DAA2C;AAC3C,kDAA4D;AAAnD,2HAAA,OAAO,OAAe;AAK/B,+CAA6B;AAC7B,kDAAgC;AAEhC,QAAQ;AAER,iDAA+B;AAC/B,2DAAyC;AACzC,oDAAkC;AAElC,gDAAgD;AAChD,sEAAgF;AAAvE,6IAAA,OAAO,OAAwB;AAE3B,QAAA,MAAM,GAAG;IAClB,EAAE,EAAE,8BAAoB,CAAC,QAAQ;IACjC,KAAK,EAAE,8BAAoB,CAAC,KAAK;CACpC,CAAC;AAGW,QAAA,OAAO,GAAG,UAAU,CAAC;AAElC,qBAAW,CAAC,YAAY,GAAG;IACvB,CAAC,EAAE,kBAAQ;IACX,EAAE,EAAE,kBAAQ;IACZ,EAAE,EAAE,0BAAgB;IACpB,EAAE,EAAE,oBAAU;CACjB,CAAC","sourcesContent":["// TODO: Look into resolving this.\nimport ReactRaw from 'react';\n\nimport StepConfirmation from '@/pages/steps/StepConfirmation/StepConfirmation';\nimport StepDate from '@/pages/steps/StepDate/StepDate';\nimport StepRoom from '@/pages/steps/StepRoom/StepRoom';\nimport StepThanks from '@/pages/steps/StepThanks/StepThanks';\nimport StepManager from '@/util/StepManager';\n\nimport RoomstayEventManager from './events/RoomstayEventManager';\n\nexport const react = ReactRaw;\n\nexport { useTranslation } from 'react-i18next';\nexport { Link } from 'react-router-dom';\n\n// Components\nexport { default as AutoAutoHeight } from '@/animations/AutoAutoHeight';\nexport * from '@/components/generic/Alert';\nexport { default as Alert } from '@/components/generic/Alert';\nexport { default as BEButton } from '@/components/generic/BEButton';\nexport { default as Checkbox } from '@/components/generic/Checkbox/Checkbox';\nexport { default as Headline } from '@/components/generic/Headline';\nexport { default as Icon } from '@/components/generic/Icon/Icon';\nexport * from '@/components/generic/Icon/Icon';\nexport { default as InputGroup } from '@/components/generic/InputGroup/InputGroup';\nexport { default as LineBreak } from '@/components/generic/LineBreak';\nexport { default as RadioFields } from '@/components/generic/radio/RadioFields';\nexport * from '@/components/generic/Select/index';\nexport * from '@/components/generic/Text';\nexport { default as TextArea } from '@/components/generic/TextArea';\nexport { default as TextBox } from '@/components/generic/TextBox';\nexport * from '@/components/steps/confirmation/StepConfirmationCommentsComponent';\nexport { default as StepConfirmationCountrySelector } from '@/components/steps/confirmation/StepConfirmationCountrySelector';\nexport { BE_NO_ROOMS_FOUND_BLOCK } from '@/components/steps/room/NoRoomsFoundBlock';\nexport { default as NoRoomsFoundBlock } from '@/components/steps/room/NoRoomsFoundBlock';\nexport * from '@/components/steps/room/StepRoomBestRateAlert';\nexport { default as StepNoRoomBestRateAlert } from '@/components/steps/room/StepRoomBestRateAlert';\nexport * from '@/components/summary/BESummary';\nexport * from '@/components/summary/BESummaryPerkBlock';\nexport * from '@/engines/BookingWizardEngine/BookingWizardEngine';\nexport * from '@/engines/CustomEngine/CustomEngine';\nexport * from '@/engines/FullPageBookingEngine/FullPageBookingEngine';\nexport * from '@/engines/InlineRoomMiniEngine/InlineRoomMiniEngine';\nexport * from '@/engines/RecentSearchesEngine/RecentSearchesEngine';\n\n// Loaders\nexport { default as SmallSpinner } from '@/components/generic/loader/SmallSpinner';\n\n// Providers\nexport * from '@/providers/CurrencyProvider';\nexport { default as CurrencyProvider } from '@/providers/CurrencyProvider';\nexport { default as FeatureProvider } from '@/providers/FeatureProvider';\nexport * from '@/providers/LanguageProvider';\nexport * from '@/providers/PromotionProvider';\nexport { default as RatePillProvider } from '@/providers/RatePillProvider';\n\n// Features\n\nexport { default as ConfirmationVerifyFeature } from '@/providers/feature/ConfirmationVerifyFeature';\nexport { default as DatePickerTypeFeature } from '@/providers/feature/DatePickerTypeFeature';\nexport { default as E164PhoneNumberFieldFeature } from '@/providers/feature/E164PhoneNumberFieldFeature';\nexport { default as FeaturedPromoFeature } from '@/providers/feature/FeaturedPromoFeature';\nexport { default as FullPageEngineSmallSpacingFeature } from '@/providers/feature/FullPageEngineSmallSpacingFeature';\nexport { default as InlineAddonStepFeature } from '@/providers/feature/InlineAddonStepFeature';\nexport { default as PlanPayPricePreviewFeature } from '@/providers/feature/PlanPayPricePreviewFeature';\nexport { default as RoomUpsellFeature } from '@/providers/feature/RoomUpsellFeature';\nexport { default as ShowIATANumberOnCheckoutFeature } from '@/providers/feature/ShowIATANumberOnCheckoutFeature';\n\n// Contexts\nexport { registerReplacement, withDI } from '@/providers/DIProvider';\nexport * from '@/providers/RoomstayThemeEngine';\nexport { default as RoomstayThemeEngine } from '@/providers/RoomstayThemeEngine';\nexport { default as SessionProvider } from '@/providers/SessionProvider';\nexport { default as DataLayer } from '@/util/DataLayer';\nexport * from '@/util/DataLayer';\nexport * from '@/util/DefaultValueManager';\nexport * from '@/util/RouteManager';\nexport * from '@frontend/contexts';\nexport { useFormContext } from 'react-hook-form';\n\n// Models\nexport { default as API } from '@/api/BookingAPI';\nexport * from '@/models/Api/HotelDTO';\nexport * from '@/models/Api/HotelOverrideDTO';\nexport type { BookingWizardProperty } from '@/models/BookingWizard/BookingWizardProperty';\nexport * from '@/models/Client/Hotel/Company';\nexport * from '@/models/Client/Hotel/DistanceUnitType.types';\nexport * from '@/models/Client/Hotel/Hotel';\nexport { HotelDataSource } from '@/models/Client/Hotel/HotelDataSource.types';\nexport * from '@/models/Client/Hotel/HotelPerk';\nexport * from '@/models/Client/Hotel/WeekdayStartsOn.types';\n\n// Steps\nexport { default as StepAddon } from '@/pages/steps/StepAddon/StepAddon';\nexport { default as StepConfirmation } from '@/pages/steps/StepConfirmation/StepConfirmation';\nexport { default as StepDate } from '@/pages/steps/StepDate/StepDate';\nexport { default as StepGroupedRoom } from '@/pages/steps/StepGroupedRoom/StepGroupedRoom';\nexport { default as StepHotel } from '@/pages/steps/StepHotel/StepHotel';\nexport { default as StepRoom } from '@/pages/steps/StepRoom/StepRoom';\nexport { default as StepThanks } from '@/pages/steps/StepThanks/StepThanks';\nexport * from '@/translations/Translation';\nexport { default as StepManager } from '@/util/StepManager';\n\n// Util\n\nexport type { default as ColorProfile } from '@/models/Client/Hotel/ColorProfile';\nexport * from '@/util/Color';\nexport * from '@/util/Debounce';\n\n// Hooks\n\nexport * from '@/events/index';\nexport * from '@/hooks/CurrentHotelHook';\nexport * from '@/hooks/EventHook';\n\n/** @deprecated use `roomstay.events` instead */\nexport { default as RoomstayEventManager } from '@/events/RoomstayEventManager';\n\nexport const events = {\n on: RoomstayEventManager.addEvent,\n raise: RoomstayEventManager.raise,\n};\n\ndeclare const RS_VERSION: string;\nexport const Version = RS_VERSION;\n\nStepManager.currentSteps = {\n 0: StepDate,\n 10: StepRoom,\n 20: StepConfirmation,\n 30: StepThanks,\n};\n"]}
@@ -113,6 +113,10 @@ export interface ClientHotelConfig {
113
113
  loadForMembers?: boolean;
114
114
  siteKey?: string;
115
115
  };
116
+ /**
117
+ * Show description on RoomDetails
118
+ */
119
+ showDescriptionOnRoomDetails?: boolean;
116
120
  /**
117
121
  * Customize the Member modal colours. Specifically replacing the green (success) with the primary color of hotel (accent)
118
122
  */
@@ -1 +1 @@
1
- {"version":3,"file":"Hotel.js","sourceRoot":"/","sources":["src/models/Client/Hotel/Hotel.ts"],"names":[],"mappings":";;;AAgBA,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, IHotelColorScheme } from '@roomstay/core';\nimport type { ReactChild } from 'react';\n\nimport type { MemberOnlyModalInputs } from '@/components/steps/room/MemberSignInModal/MemberSignInModal.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';\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 hideByLine?: boolean;\n transportDistances?: TransportDistances;\n roomGroups: HotelRoomGroupsDTO;\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 /** @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 * 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}\n\nexport interface ConfigHotel extends ClientHotelConfig, AdminHotelConfig, HasDatalayerTags {}\n\nexport type Hotel = ConfigHotel & {\n lowestPrice?: {\n value: number;\n isLoading: boolean;\n };\n};\n\n/**\n * Used for DetailsHotel event\n */\nexport type InitialHotelDetailsEventPayload = {\n name: string;\n hotelID: number | string;\n hotelUrl: string;\n currency: string;\n language: Language;\n address?: HotelAddress;\n};\n"]}
1
+ {"version":3,"file":"Hotel.js","sourceRoot":"/","sources":["src/models/Client/Hotel/Hotel.ts"],"names":[],"mappings":";;;AAgBA,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, IHotelColorScheme } from '@roomstay/core';\nimport type { ReactChild } from 'react';\n\nimport type { MemberOnlyModalInputs } from '@/components/steps/room/MemberSignInModal/MemberSignInModal.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';\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 hideByLine?: boolean;\n transportDistances?: TransportDistances;\n roomGroups: HotelRoomGroupsDTO;\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 /** @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}\n\nexport interface ConfigHotel extends ClientHotelConfig, AdminHotelConfig, HasDatalayerTags {}\n\nexport type Hotel = ConfigHotel & {\n lowestPrice?: {\n value: number;\n isLoading: boolean;\n };\n};\n\n/**\n * Used for DetailsHotel event\n */\nexport type InitialHotelDetailsEventPayload = {\n name: string;\n hotelID: number | string;\n hotelUrl: string;\n currency: string;\n language: Language;\n address?: HotelAddress;\n};\n"]}