@cleartrip/ct-platform-hotel-recommendations 1.4.1-beta.0 → 1.4.1-beta.2
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.
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";var e=require("tslib"),a=require("react/jsx-runtime"),i=require("react"),t=require("@cleartrip/ct-design-button"),o=require("@cleartrip/ct-design-typography"),r=require("@cleartrip/ct-platform-lazy-image"),n=require("@cleartrip/ct-platform-utils"),l=require("@cleartrip/ct-design-theme");function d(e,a){void 0===a&&(a={});var i=a.insertAt;if(e&&"undefined"!=typeof document){var t=document.head||document.getElementsByTagName("head")[0],o=document.createElement("style");o.type="text/css","top"===i&&t.firstChild?t.insertBefore(o,t.firstChild):t.appendChild(o),o.styleSheet?o.styleSheet.cssText=e:o.appendChild(document.createTextNode(e))}}var s="index-module_cardWrapper__gNp5L",c="index-module_infoWrapper__SbSyr",p="index-module_titleRow__1g79Q",u="index-module_ratingWrapper__5VWjY",m="index-module_priceWrapper__lHaFH",g="index-module_loaderWrapper__qpkZL",_="index-module_hidden__CdBrr";d(".index-module_cardWrapper__gNp5L{background:#fff;border-radius:16px;height:192px;overflow-x:hidden;width:200px}.index-module_infoWrapper__SbSyr{padding:8px}.index-module_titleRow__1g79Q{display:flex;justify-content:space-between;padding-bottom:4px}.index-module_ratingWrapper__5VWjY{align-items:center;background-color:#ecf3ff;border-radius:4px;display:flex;padding:0 4px}.index-module_priceWrapper__lHaFH{align-items:baseline;display:flex;padding:4px 8px 8px}.index-module_slashedPrice__Sr26j{padding:0 2px}.index-module_loaderWrapper__qpkZL{opacity:1;position:absolute;top:0;transition:opacity .15s ease-in-out}.index-module_loaderWrapper__qpkZL.index-module_hidden__CdBrr{opacity:0}");var h=function(i){var t=i.loading,o=i.priority,r=void 0===o?"low":o;return a.jsx("div",e.__assign({className:"".concat(s," ").concat(g," ").concat(t?"":_)},{children:a.jsx("img",{width:200,height:104,fetchPriority:r,src:"https://fastui.cltpstatic.com/image/upload/f_auto,q_auto/offermgmt/images/banner/Image-placholder-1.jpg",alt:"Hotel recommendation placeholder"})}))},x=function(t){var l=t.heroImage,d=t.staticData,g=t.pricingData,_=t.hotelLandingUrl,h=i.useCallback((function(){_&&(window.location.href=_)}),[_]);return a.jsxs("div",e.__assign({className:s,onClick:h},{children:[a.jsx(r.LazyImage,{width:200,height:104,src:l.mediaUrl}),a.jsxs("div",e.__assign({className:c},{children:[a.jsxs("div",e.__assign({className:p},{children:[a.jsx(o.Typography,e.__assign({variant:o.TypographyVariant.B2,lineClamp:1},{children:null==d?void 0:d.hotelName})),a.jsx("div",e.__assign({className:u},{children:a.jsx(o.Typography,e.__assign({color:"link",variant:o.TypographyVariant.B3},{children:null==d?void 0:d.userRating}))}))]})),a.jsxs(o.Typography,e.__assign({variant:o.TypographyVariant.P3,lineClamp:1,color:"subheading"},{children:[null==d?void 0:d.starRating," stars hotel in"," ",null==d?void 0:d.locality]}))]})),a.jsxs("div",e.__assign({className:m},{children:[a.jsxs(o.Typography,e.__assign({variant:o.TypographyVariant.HM4},{children:[n.formatCurrency(null==g?void 0:g.perNightPrice)," "]})),a.jsx(o.Typography,e.__assign({isStriked:!0,color:"subheading",variant:o.TypographyVariant.B4},{children:n.formatCurrency(null==g?void 0:g.slashedPrice,!1)})),a.jsx(o.Typography,e.__assign({variant:o.TypographyVariant.B4,color:"subheading"},{children:" / night"}))]}))]}))},f={hRecomWrapper:"index-module_hRecomWrapper__TL8eh",hRecomHeader:"index-module_hRecomHeader__RpSVO",hRecomContent:"index-module_hRecomContent__JoNi0",hRecomSidebar:"index-module_hRecomSidebar__rZAvT",connectedLine:"index-module_connectedLine__Z9VpQ",dottedLine:"index-module_dottedLine__6K0LJ",hRecomCardsWrapper:"index-module_hRecomCardsWrapper__6du4Z",hRecomCardWrapper:"index-module_hRecomCardWrapper__-IKwU",hRecomCouponCallout:"index-module_hRecomCouponCallout__Y2GEF",hRecomOfferCallout:"index-module_hRecomOfferCallout__a25nf",hRecomBookingCallout:"index-module_hRecomBookingCallout__XHOB5",exploreButton:"index-module_exploreButton__--vcq",sidebarCircle:"index-module_sidebarCircle__-dZZH"};d(".index-module_hRecomWrapper__TL8eh{background:linear-gradient(215deg,#e5fce3 8%,#fff 85.78%);display:flex;overflow:hidden;padding:16px 0;position:relative}.index-module_hRecomHeader__RpSVO{left:16px;position:relative}.index-module_hRecomContent__JoNi0{left:0;position:absolute;width:100%}.index-module_hRecomSidebar__rZAvT{align-items:center;display:flex;flex-direction:column;padding-left:16px}.index-module_connectedLine__Z9VpQ{border-left:1px solid grey;height:18px;left:-.5px;opacity:.3;position:relative}.index-module_dottedLine__6K0LJ{border-left:1px dotted grey;height:280px;left:-.5px;opacity:.5;position:relative}.index-module_hRecomCardsWrapper__6du4Z{-ms-overflow-style:none;box-sizing:border-box;display:flex;height:208px;overflow:auto;padding:0 16px 16px 52px;scrollbar-width:none;width:100%}.index-module_hRecomCardWrapper__-IKwU{border-radius:16px;box-shadow:0 4px 16px 0 rgba(26,26,26,.08);margin-right:12px;min-width:200px;position:relative}.index-module_hRecomCardWrapper__-IKwU:last-child{margin-right:0}.index-module_hRecomCardsWrapper__6du4Z::-webkit-scrollbar{display:none}.index-module_hRecomCouponCallout__Y2GEF{background:linear-gradient(90deg,#cafbcc 5.15%,rgba(212,255,218,.62) 41.66%,rgba(218,255,224,.23) 77.81%,hsla(0,0%,100%,0));border-radius:24px;padding:10px 12px}.index-module_hRecomOfferCallout__a25nf{padding:8px 0 20px}.index-module_hRecomBookingCallout__XHOB5{padding-bottom:16px}.index-module_exploreButton__--vcq{left:52px;margin-top:8px;position:relative;width:calc(100% - 68px)}.index-module_sidebarCircle__-dZZH{border:1px solid #1a1a1a;border-radius:50%;height:8px;margin-top:4px;width:8px}");var y=function(r){var n=r.data,l=r.loading,d=r.maxCardsCount,s=void 0===d?5:d,c=i.useMemo((function(){var i=Array.from({length:s},(function(e,a){return a+1}));return a.jsx("div",e.__assign({className:f.hRecomCardsWrapper},{children:i.map((function(i,t){var o,r;return a.jsxs("div",e.__assign({className:f.hRecomCardWrapper},{children:[(null===(o=null==n?void 0:n.hotels)||void 0===o?void 0:o[t])&&a.jsx(x,e.__assign({},null===(r=null==n?void 0:n.hotels)||void 0===r?void 0:r[t])),a.jsx(h,{loading:l,priority:0===t?"high":"auto"})]}),i)}))}))}),[n,l]),p=i.useCallback((function(){var e=null==n?void 0:n.pageLandingUrl;e&&(window.location.href=e)}),[n]);return a.jsxs("div",e.__assign({className:f.hRecomWrapper},{children:[a.jsxs("div",e.__assign({className:f.hRecomSidebar},{children:[a.jsx("img",{width:20,height:20,src:"https://fastui.cltpstatic.com/image/upload/f_auto,q_auto,w_20,h_20,dpr_2/offermgmt/images/banner/Flight%20%281%29.png",fetchPriority:"low"}),a.jsx("div",{className:f.connectedLine}),a.jsx("img",{width:20,height:20,src:"https://fastui.cltpstatic.com/image/upload/f_auto,q_auto,w_20,h_20,dpr_2/offermgmt/images/banner/Gift%20%281%29.png",fetchPriority:"low"}),a.jsx("div",{className:f.dottedLine}),a.jsx("div",{className:f.sidebarCircle})]})),a.jsxs("div",e.__assign({className:f.hRecomMainWrapper},{children:[a.jsxs("div",e.__assign({className:f.hRecomHeader},{children:[a.jsx(o.Typography,e.__assign({variant:o.TypographyVariant.P3,className:f.hRecomBookingCallout},{children:null==n?void 0:n.bookingCallout})),a.jsx("div",e.__assign({className:f.hRecomCouponCallout},{children:a.jsx(o.Typography,e.__assign({color:"success",variant:o.TypographyVariant.B4CAPS},{children:null==n?void 0:n.couponCallout}))})),a.jsx(o.Typography,e.__assign({variant:o.TypographyVariant.HM4,className:f.hRecomOfferCallout},{children:null==n?void 0:n.offerCallout}))]})),a.jsxs("div",e.__assign({className:f.hRecomContent},{children:[c,a.jsx(t.Button,e.__assign({onClick:p,variant:t.ButtonVariant.OUTLINE,className:f.exploreButton},{children:"Explore hotels"}))]}))]}))]}))},C={hotels:[{hotelId:"717883",heroImage:{mediaUrl:"https://fastui.cltpstatic.com/image/upload/f_auto,q_auto/offermgmt/images/banner/HotelsCS1.jpeg",mediaType:"PHOTO",mediaCategory:"Property Pictures",featured:!1,mediaSubCategory:"Hotel Exterior"},staticData:{hotelName:"Fairfield By Marriott Bengaluru Rajajinagar",locality:"MG Road",city:"Bangalore",starRating:5,userRating:4.2},pricingData:{perNightPrice:1499,slashedPrice:2e3},hotelLandingUrl:""},{hotelId:"717881",heroImage:{mediaUrl:"https://fastui.cltpstatic.com/image/upload/f_auto,q_auto/offermgmt/images/banner/HotelsCS1.jpeg",mediaType:"PHOTO",mediaCategory:"Property Pictures",featured:!1,mediaSubCategory:"Hotel Exterior"},staticData:{hotelName:"Fairfield By Marriott Bengaluru Rajajinagar",locality:"MG Road",city:"Bangalore",starRating:5,userRating:4.2},pricingData:{perNightPrice:1499,slashedPrice:2e3},hotelLandingUrl:"https://www.cleartrip.com/hotels/results?num_rooms=1&adults=2&childs=0&adults1=2&children1=0&chk_in=20%2F06%2F2024&chk_out=21%2F06%2F2024&city=Bangalore&dest_code=32550&country=IN&state=Karnataka&poi=&localityId=&localityName=&baseLocation=CITY-32550&version=V2&utm_source=XSELL-AIR&hotelId=717881"},{hotelId:"717883",heroImage:{mediaUrl:"https://fastui.cltpstatic.com/image/upload/f_auto,q_auto/offermgmt/images/banner/HotelsCS1.jpeg",mediaType:"PHOTO",mediaCategory:"Property Pictures",featured:!1,mediaSubCategory:"Hotel Exterior"},staticData:{hotelName:"Fairfield By Marriott Bengaluru Rajajinagar",locality:"MG Road",city:"Bangalore",starRating:5,userRating:4.2},pricingData:{perNightPrice:1499,slashedPrice:2e3},hotelLandingUrl:""},{hotelId:"717884",heroImage:{mediaUrl:"https://fastui.cltpstatic.com/image/upload/f_auto,q_auto/offermgmt/images/banner/HotelsCS1.jpeg",mediaType:"PHOTO",mediaCategory:"Property Pictures",featured:!1,mediaSubCategory:"Hotel Exterior"},staticData:{hotelName:"Fairfield By Marriott Bengaluru Rajajinagar",locality:"MG Road",city:"Bangalore",starRating:5,userRating:4.2},pricingData:{perNightPrice:1499,slashedPrice:2e3},hotelLandingUrl:""},{hotelId:"717883",heroImage:{mediaUrl:"https://fastui.cltpstatic.com/image/upload/f_auto,q_auto/offermgmt/images/banner/HotelsCS1.jpeg",mediaType:"PHOTO",mediaCategory:"Property Pictures",featured:!1,mediaSubCategory:"Hotel Exterior"},staticData:{hotelName:"Fairfield By Marriott Bengaluru Rajajinagar",locality:"MG Road",city:"Bangalore",starRating:5,userRating:4.2},pricingData:{perNightPrice:1499,slashedPrice:2e3},hotelLandingUrl:""}],couponCallout:"CTBEST COUPON UNLOCKED!",bookingCallout:"Yay! Your flight to Goa is booked!",offerCallout:"Flat 20% off applied on hotel stays",pageLandingUrl:"https://www.cleartrip.com/hotels/results?num_rooms=1&adults=2&childs=0&adults1=2&children1=0&chk_in=20%2F06%2F2024&chk_out=21%2F06%2F2024&city=Bangalore&dest_code=32550&country=IN&state=Karnataka&poi=&localityId=&localityName=&baseLocation=CITY-32550&version=V2&utm_source=XSELL-AIR"};exports.HotelRecommendationContainer=function(t){var o=i.useState(!0),r=o[0],n=o[1],d=i.useState(e.__assign(e.__assign({},C),{hotels:[]})),s=d[0],c=d[1];return i.useEffect((function(){setTimeout((function(){c(C)}),300),setTimeout((function(){n(!1)}),310)}),[]),a.jsx(l.ThemeProvider,{children:a.jsx(y,e.__assign({data:s,loading:r},t))})},exports.HotelRecommendationsWidget=y;
|
|
1
|
+
"use strict";var e=require("tslib"),a=require("react/jsx-runtime"),i=require("react"),t=require("@cleartrip/ct-design-button"),o=require("@cleartrip/ct-design-typography"),r=require("@cleartrip/ct-platform-lazy-image"),n=require("@cleartrip/ct-platform-utils"),l=require("@cleartrip/ct-design-theme");function d(e,a){void 0===a&&(a={});var i=a.insertAt;if(e&&"undefined"!=typeof document){var t=document.head||document.getElementsByTagName("head")[0],o=document.createElement("style");o.type="text/css","top"===i&&t.firstChild?t.insertBefore(o,t.firstChild):t.appendChild(o),o.styleSheet?o.styleSheet.cssText=e:o.appendChild(document.createTextNode(e))}}var s="index-module_cardWrapper__gNp5L",c="index-module_infoWrapper__SbSyr",p="index-module_titleRow__1g79Q",u="index-module_ratingWrapper__5VWjY",m="index-module_priceWrapper__lHaFH",g="index-module_loaderWrapper__qpkZL",_="index-module_hidden__CdBrr";d(".index-module_cardWrapper__gNp5L{background:#fff;border-radius:16px;height:192px;overflow-x:hidden;width:200px}.index-module_infoWrapper__SbSyr{padding:8px}.index-module_titleRow__1g79Q{display:flex;justify-content:space-between;padding-bottom:4px}.index-module_ratingWrapper__5VWjY{align-items:center;background-color:#ecf3ff;border-radius:4px;display:flex;padding:0 4px}.index-module_priceWrapper__lHaFH{align-items:baseline;display:flex;padding:4px 8px 8px}.index-module_slashedPrice__Sr26j{padding:0 2px}.index-module_loaderWrapper__qpkZL{opacity:1;position:absolute;top:0;transition:opacity .15s ease-in-out}.index-module_loaderWrapper__qpkZL.index-module_hidden__CdBrr{opacity:0}");var h=function(i){var t=i.loading,o=i.priority,r=void 0===o?"low":o;return a.jsx("div",e.__assign({className:"".concat(s," ").concat(g," ").concat(t?"":_)},{children:a.jsx("img",{width:200,height:104,fetchPriority:r,src:"https://fastui.cltpstatic.com/image/upload/f_auto,q_auto/offermgmt/images/banner/Image-placholder-1.jpg",alt:"Hotel recommendation placeholder"})}))},x=function(t){var l=t.heroImage,d=t.staticData,g=t.pricingData,_=t.hotelLandingUrl,h=i.useCallback((function(){_&&(window.location.href=_)}),[_]);return a.jsxs("div",e.__assign({className:s,onClick:h},{children:[a.jsx(r.LazyImage,{width:200,height:104,src:l.mediaUrl}),a.jsxs("div",e.__assign({className:c},{children:[a.jsxs("div",e.__assign({className:p},{children:[a.jsx(o.Typography,e.__assign({variant:o.TypographyVariant.B2,lineClamp:1},{children:null==d?void 0:d.hotelName})),a.jsx("div",e.__assign({className:u},{children:a.jsx(o.Typography,e.__assign({color:"link",variant:o.TypographyVariant.B3},{children:null==d?void 0:d.userRating}))}))]})),a.jsxs(o.Typography,e.__assign({variant:o.TypographyVariant.P3,lineClamp:1,color:"subheading"},{children:[null==d?void 0:d.starRating," stars hotel in"," ",null==d?void 0:d.locality]}))]})),a.jsxs("div",e.__assign({className:m},{children:[a.jsxs(o.Typography,e.__assign({variant:o.TypographyVariant.HM4},{children:[n.formatCurrency(null==g?void 0:g.perNightPrice)," "]})),a.jsx(o.Typography,e.__assign({isStriked:!0,color:"subheading",variant:o.TypographyVariant.B4},{children:n.formatCurrency(null==g?void 0:g.slashedPrice,!1)})),a.jsx(o.Typography,e.__assign({variant:o.TypographyVariant.B4,color:"subheading"},{children:" / night"}))]}))]}))},f={hRecomWrapper:"index-module_hRecomWrapper__TL8eh",hRecomHeader:"index-module_hRecomHeader__RpSVO",hRecomContent:"index-module_hRecomContent__JoNi0",hRecomSidebar:"index-module_hRecomSidebar__rZAvT",connectedLine:"index-module_connectedLine__Z9VpQ",dottedLine:"index-module_dottedLine__6K0LJ",hRecomCardsWrapper:"index-module_hRecomCardsWrapper__6du4Z",hRecomCardWrapper:"index-module_hRecomCardWrapper__-IKwU",hRecomCouponCallout:"index-module_hRecomCouponCallout__Y2GEF",hRecomOfferCallout:"index-module_hRecomOfferCallout__a25nf",hRecomBookingCallout:"index-module_hRecomBookingCallout__XHOB5",exploreButton:"index-module_exploreButton__--vcq",sidebarCircle:"index-module_sidebarCircle__-dZZH"};d(".index-module_hRecomWrapper__TL8eh{background:linear-gradient(215deg,#e5fce3 8%,#fff 85.78%);display:flex;padding:16px 0;position:relative}.index-module_hRecomHeader__RpSVO{left:16px;position:relative}.index-module_hRecomContent__JoNi0{left:0;position:absolute;width:100%}.index-module_hRecomSidebar__rZAvT{align-items:center;display:flex;flex-direction:column;padding-left:16px}.index-module_connectedLine__Z9VpQ{border-left:1px solid grey;height:18px;left:-.5px;opacity:.3;position:relative}.index-module_dottedLine__6K0LJ{border-left:1px dotted grey;height:280px;left:-.5px;opacity:.5;position:relative}.index-module_hRecomCardsWrapper__6du4Z{-ms-overflow-style:none;box-sizing:border-box;display:flex;height:208px;overflow:auto;padding:0 16px 16px 52px;scrollbar-width:none;width:100%}.index-module_hRecomCardWrapper__-IKwU{border-radius:16px;box-shadow:0 4px 16px 0 rgba(26,26,26,.08);margin-right:12px;min-width:200px;position:relative}.index-module_hRecomCardWrapper__-IKwU:last-child{margin-right:0}.index-module_hRecomCardsWrapper__6du4Z::-webkit-scrollbar{display:none}.index-module_hRecomCouponCallout__Y2GEF{background:linear-gradient(90deg,#cafbcc 5.15%,rgba(212,255,218,.62) 41.66%,rgba(218,255,224,.23) 77.81%,hsla(0,0%,100%,0));border-radius:24px;padding:10px 12px}.index-module_hRecomOfferCallout__a25nf{padding:8px 0 20px}.index-module_hRecomBookingCallout__XHOB5{padding-bottom:16px}.index-module_exploreButton__--vcq{left:52px;margin-top:8px;position:relative;width:calc(100% - 68px)}.index-module_sidebarCircle__-dZZH{border:1px solid #1a1a1a;border-radius:50%;height:8px;margin-top:4px;width:8px}");var y=function(r){var n=r.data,l=r.loading,d=r.maxCardsCount,s=void 0===d?5:d,c=i.useMemo((function(){var i=Array.from({length:s},(function(e,a){return a+1}));return a.jsx("div",e.__assign({className:f.hRecomCardsWrapper},{children:i.map((function(i,t){var o,r;return a.jsxs("div",e.__assign({className:f.hRecomCardWrapper},{children:[(null===(o=null==n?void 0:n.hotels)||void 0===o?void 0:o[t])&&a.jsx(x,e.__assign({},null===(r=null==n?void 0:n.hotels)||void 0===r?void 0:r[t])),a.jsx(h,{loading:l,priority:0===t?"high":"auto"})]}),i)}))}))}),[n,l]),p=i.useCallback((function(){var e=null==n?void 0:n.pageLandingUrl;e&&(window.location.href=e)}),[n]);return a.jsxs("div",e.__assign({className:f.hRecomWrapper},{children:[a.jsxs("div",e.__assign({className:f.hRecomSidebar},{children:[a.jsx("img",{width:20,height:20,src:"https://fastui.cltpstatic.com/image/upload/f_auto,q_auto,w_20,h_20,dpr_2/offermgmt/images/banner/Flight%20%281%29.png",fetchPriority:"low"}),a.jsx("div",{className:f.connectedLine}),a.jsx("img",{width:20,height:20,src:"https://fastui.cltpstatic.com/image/upload/f_auto,q_auto,w_20,h_20,dpr_2/offermgmt/images/banner/Gift%20%281%29.png",fetchPriority:"low"}),a.jsx("div",{className:f.dottedLine}),a.jsx("div",{className:f.sidebarCircle})]})),a.jsxs("div",e.__assign({className:f.hRecomMainWrapper},{children:[a.jsxs("div",e.__assign({className:f.hRecomHeader},{children:[a.jsx(o.Typography,e.__assign({variant:o.TypographyVariant.P3,className:f.hRecomBookingCallout},{children:null==n?void 0:n.bookingCallout})),a.jsx("div",e.__assign({className:f.hRecomCouponCallout},{children:a.jsx(o.Typography,e.__assign({color:"success",variant:o.TypographyVariant.B4CAPS},{children:null==n?void 0:n.couponCallout}))})),a.jsx(o.Typography,e.__assign({variant:o.TypographyVariant.HM4,className:f.hRecomOfferCallout},{children:null==n?void 0:n.offerCallout}))]})),a.jsxs("div",e.__assign({className:f.hRecomContent},{children:[c,a.jsx(t.Button,e.__assign({onClick:p,variant:t.ButtonVariant.OUTLINE,className:f.exploreButton},{children:"Explore hotels"}))]}))]}))]}))},C={hotels:[{hotelId:"717883",heroImage:{mediaUrl:"https://fastui.cltpstatic.com/image/upload/f_auto,q_auto/offermgmt/images/banner/HotelsCS1.jpeg",mediaType:"PHOTO",mediaCategory:"Property Pictures",featured:!1,mediaSubCategory:"Hotel Exterior"},staticData:{hotelName:"Fairfield By Marriott Bengaluru Rajajinagar",locality:"MG Road",city:"Bangalore",starRating:5,userRating:4.2},pricingData:{perNightPrice:1499,slashedPrice:2e3},hotelLandingUrl:""},{hotelId:"717881",heroImage:{mediaUrl:"https://fastui.cltpstatic.com/image/upload/f_auto,q_auto/offermgmt/images/banner/HotelsCS1.jpeg",mediaType:"PHOTO",mediaCategory:"Property Pictures",featured:!1,mediaSubCategory:"Hotel Exterior"},staticData:{hotelName:"Fairfield By Marriott Bengaluru Rajajinagar",locality:"MG Road",city:"Bangalore",starRating:5,userRating:4.2},pricingData:{perNightPrice:1499,slashedPrice:2e3},hotelLandingUrl:"https://www.cleartrip.com/hotels/results?num_rooms=1&adults=2&childs=0&adults1=2&children1=0&chk_in=20%2F06%2F2024&chk_out=21%2F06%2F2024&city=Bangalore&dest_code=32550&country=IN&state=Karnataka&poi=&localityId=&localityName=&baseLocation=CITY-32550&version=V2&utm_source=XSELL-AIR&hotelId=717881"},{hotelId:"717883",heroImage:{mediaUrl:"https://fastui.cltpstatic.com/image/upload/f_auto,q_auto/offermgmt/images/banner/HotelsCS1.jpeg",mediaType:"PHOTO",mediaCategory:"Property Pictures",featured:!1,mediaSubCategory:"Hotel Exterior"},staticData:{hotelName:"Fairfield By Marriott Bengaluru Rajajinagar",locality:"MG Road",city:"Bangalore",starRating:5,userRating:4.2},pricingData:{perNightPrice:1499,slashedPrice:2e3},hotelLandingUrl:""},{hotelId:"717884",heroImage:{mediaUrl:"https://fastui.cltpstatic.com/image/upload/f_auto,q_auto/offermgmt/images/banner/HotelsCS1.jpeg",mediaType:"PHOTO",mediaCategory:"Property Pictures",featured:!1,mediaSubCategory:"Hotel Exterior"},staticData:{hotelName:"Fairfield By Marriott Bengaluru Rajajinagar",locality:"MG Road",city:"Bangalore",starRating:5,userRating:4.2},pricingData:{perNightPrice:1499,slashedPrice:2e3},hotelLandingUrl:""},{hotelId:"717883",heroImage:{mediaUrl:"https://fastui.cltpstatic.com/image/upload/f_auto,q_auto/offermgmt/images/banner/HotelsCS1.jpeg",mediaType:"PHOTO",mediaCategory:"Property Pictures",featured:!1,mediaSubCategory:"Hotel Exterior"},staticData:{hotelName:"Fairfield By Marriott Bengaluru Rajajinagar",locality:"MG Road",city:"Bangalore",starRating:5,userRating:4.2},pricingData:{perNightPrice:1499,slashedPrice:2e3},hotelLandingUrl:""}],couponCallout:"CTBEST COUPON UNLOCKED!",bookingCallout:"Yay! Your flight to Goa is booked!",offerCallout:"Flat 20% off applied on hotel stays",pageLandingUrl:"https://www.cleartrip.com/hotels/results?num_rooms=1&adults=2&childs=0&adults1=2&children1=0&chk_in=20%2F06%2F2024&chk_out=21%2F06%2F2024&city=Bangalore&dest_code=32550&country=IN&state=Karnataka&poi=&localityId=&localityName=&baseLocation=CITY-32550&version=V2&utm_source=XSELL-AIR"};exports.HotelRecommendationContainer=function(t){var o=i.useState(!0),r=o[0],n=o[1],d=i.useState(e.__assign(e.__assign({},C),{hotels:[]})),s=d[0],c=d[1];return i.useEffect((function(){setTimeout((function(){c(C)}),300),setTimeout((function(){n(!1)}),310)}),[]),a.jsx(l.ThemeProvider,{children:a.jsx(y,e.__assign({data:s,loading:r},t))})},exports.HotelRecommendationsWidget=y;
|
|
2
2
|
//# sourceMappingURL=ct-platform-hotel-recommendations.cjs.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ct-platform-hotel-recommendations.cjs.js","sources":["../../../../node_modules/.pnpm/style-inject@0.3.0/node_modules/style-inject/dist/style-inject.es.js","../packages/components/HotelRecommendations/src/Card/loader.tsx","../packages/components/HotelRecommendations/src/constants.ts","../packages/components/HotelRecommendations/src/Card/index.tsx","../packages/components/HotelRecommendations/src/Widget/index.tsx","../packages/components/HotelRecommendations/src/HRecommendations.tsx"],"sourcesContent":["function styleInject(css, ref) {\n if ( ref === void 0 ) ref = {};\n var insertAt = ref.insertAt;\n\n if (!css || typeof document === 'undefined') { return; }\n\n var head = document.head || document.getElementsByTagName('head')[0];\n var style = document.createElement('style');\n style.type = 'text/css';\n\n if (insertAt === 'top') {\n if (head.firstChild) {\n head.insertBefore(style, head.firstChild);\n } else {\n head.appendChild(style);\n }\n } else {\n head.appendChild(style);\n }\n\n if (style.styleSheet) {\n style.styleSheet.cssText = css;\n } else {\n style.appendChild(document.createTextNode(css));\n }\n}\n\nexport default styleInject;\n",null,null,null,null,null],"names":["styleInject","css","ref","insertAt","document","head","getElementsByTagName","style","createElement","type","firstChild","insertBefore","appendChild","styleSheet","cssText","createTextNode","CardLoader","_a","loading","_b","priority","_jsx","className","styles","concat","children","width","height","fetchPriority","src","alt","Card","heroImage","staticData","pricingData","hotelLandingUrl","handleCardClick","useCallback","window","location","href","_jsxs","onClick","LazyImage","mediaUrl","Typography","__assign","variant","TypographyVariant","B2","lineClamp","hotelName","color","B3","userRating","P3","starRating","locality","HM4","formatCurrency","perNightPrice","isStriked","B4","slashedPrice","jsx","HRecommendationsWidget","data","maxCardsCount","recommendationCards","useMemo","dummyArray","Array","from","length","_","index","hRecomCardsWrapper","map","val","hRecomCardWrapper","hotels","RecommendationCard","redirectToSRP","url","pageLandingUrl","hRecomWrapper","jsxs","hRecomSidebar","connectedLine","dottedLine","sidebarCircle","hRecomMainWrapper","hRecomHeader","hRecomBookingCallout","bookingCallout","hRecomCouponCallout","B4CAPS","couponCallout","hRecomOfferCallout","offerCallout","hRecomContent","Button","ButtonVariant","OUTLINE","exploreButton","API_RESPONSE","hotelId","mediaType","mediaCategory","featured","mediaSubCategory","city","props","useState","setLoading","setData","useEffect","setTimeout","ThemeProvider"],"mappings":"6SAAA,SAASA,EAAYC,EAAKC,QACX,IAARA,IAAiBA,EAAM,CAAA,GAC5B,IAAIC,EAAWD,EAAIC,SAEnB,GAAKF,GAA2B,oBAAbG,SAAnB,CAEA,IAAIC,EAAOD,SAASC,MAAQD,SAASE,qBAAqB,QAAQ,GAC9DC,EAAQH,SAASI,cAAc,SACnCD,EAAME,KAAO,WAEI,QAAbN,GACEE,EAAKK,WACPL,EAAKM,aAAaJ,EAAOF,EAAKK,YAKhCL,EAAKO,YAAYL,GAGfA,EAAMM,WACRN,EAAMM,WAAWC,QAAUb,EAE3BM,EAAMK,YAAYR,SAASW,eAAed,GAnBW,CAqBzD,i7BCjBA,IAAMe,EAAmD,SAACC,GACtD,IAAAC,YACAC,EAAAF,EAAAG,SAAAA,OAAQ,IAAAD,EAAG,MAAKA,EAGhB,OAEIE,EAAAA,sBACIC,UAAW,UAAGC,EAAkB,KAAAC,OAAID,EAAwB,KAAAC,OAAAN,EAAU,GAAKK,IAG3E,CAAAE,SAAAJ,EAAAA,IAAA,MAAA,C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PC,EAAAA,SAAA,CAAAe,WAAW,EACXT,MAAM,aACNL,QAASC,oBAAkBc,IAE1B,CAAArC,SAAAkC,EAAAA,eAAezB,eAAAA,EAAa6B,cAAc,MAE/C1C,EAAC2C,IAAAnB,aAAWC,EAAAA,SAAA,CAAAC,QAASC,oBAAkBc,GAAIV,MAAM,cAEpC,CAAA3B,SAAA,qBAI7B,
|
|
1
|
+
{"version":3,"file":"ct-platform-hotel-recommendations.cjs.js","sources":["../../../../node_modules/.pnpm/style-inject@0.3.0/node_modules/style-inject/dist/style-inject.es.js","../packages/components/HotelRecommendations/src/Card/loader.tsx","../packages/components/HotelRecommendations/src/constants.ts","../packages/components/HotelRecommendations/src/Card/index.tsx","../packages/components/HotelRecommendations/src/Widget/index.tsx","../packages/components/HotelRecommendations/src/HRecommendations.tsx"],"sourcesContent":["function styleInject(css, ref) {\n if ( ref === void 0 ) ref = {};\n var insertAt = ref.insertAt;\n\n if (!css || typeof document === 'undefined') { return; }\n\n var head = document.head || document.getElementsByTagName('head')[0];\n var style = document.createElement('style');\n style.type = 'text/css';\n\n if (insertAt === 'top') {\n if (head.firstChild) {\n head.insertBefore(style, head.firstChild);\n } else {\n head.appendChild(style);\n }\n } else {\n head.appendChild(style);\n }\n\n if (style.styleSheet) {\n style.styleSheet.cssText = css;\n } else {\n style.appendChild(document.createTextNode(css));\n }\n}\n\nexport default styleInject;\n",null,null,null,null,null],"names":["styleInject","css","ref","insertAt","document","head","getElementsByTagName","style","createElement","type","firstChild","insertBefore","appendChild","styleSheet","cssText","createTextNode","CardLoader","_a","loading","_b","priority","_jsx","className","styles","concat","children","width","height","fetchPriority","src","alt","Card","heroImage","staticData","pricingData","hotelLandingUrl","handleCardClick","useCallback","window","location","href","_jsxs","onClick","LazyImage","mediaUrl","Typography","__assign","variant","TypographyVariant","B2","lineClamp","hotelName","color","B3","userRating","P3","starRating","locality","HM4","formatCurrency","perNightPrice","isStriked","B4","slashedPrice","jsx","HRecommendationsWidget","data","maxCardsCount","recommendationCards","useMemo","dummyArray","Array","from","length","_","index","hRecomCardsWrapper","map","val","hRecomCardWrapper","hotels","RecommendationCard","redirectToSRP","url","pageLandingUrl","hRecomWrapper","jsxs","hRecomSidebar","connectedLine","dottedLine","sidebarCircle","hRecomMainWrapper","hRecomHeader","hRecomBookingCallout","bookingCallout","hRecomCouponCallout","B4CAPS","couponCallout","hRecomOfferCallout","offerCallout","hRecomContent","Button","ButtonVariant","OUTLINE","exploreButton","API_RESPONSE","hotelId","mediaType","mediaCategory","featured","mediaSubCategory","city","props","useState","setLoading","setData","useEffect","setTimeout","ThemeProvider"],"mappings":"6SAAA,SAASA,EAAYC,EAAKC,QACX,IAARA,IAAiBA,EAAM,CAAA,GAC5B,IAAIC,EAAWD,EAAIC,SAEnB,GAAKF,GAA2B,oBAAbG,SAAnB,CAEA,IAAIC,EAAOD,SAASC,MAAQD,SAASE,qBAAqB,QAAQ,GAC9DC,EAAQH,SAASI,cAAc,SACnCD,EAAME,KAAO,WAEI,QAAbN,GACEE,EAAKK,WACPL,EAAKM,aAAaJ,EAAOF,EAAKK,YAKhCL,EAAKO,YAAYL,GAGfA,EAAMM,WACRN,EAAMM,WAAWC,QAAUb,EAE3BM,EAAMK,YAAYR,SAASW,eAAed,GAnBW,CAqBzD,i7BCjBA,IAAMe,EAAmD,SAACC,GACtD,IAAAC,YACAC,EAAAF,EAAAG,SAAAA,OAAQ,IAAAD,EAAG,MAAKA,EAGhB,OAEIE,EAAAA,sBACIC,UAAW,UAAGC,EAAkB,KAAAC,OAAID,EAAwB,KAAAC,OAAAN,EAAU,GAAKK,IAG3E,CAAAE,SAAAJ,EAAAA,IAAA,MAAA,CACIK,MAAO,IACPC,OAAQ,IACRC,cAAeR,EACfS,ICfZ,0GDgBYC,IAAI,uCAIpB,EElBMC,EAA2C,SAACd,OAC9Ce,EAASf,EAAAe,UACTC,EAAUhB,EAAAgB,WACVC,EAAWjB,EAAAiB,YACXC,EAAelB,EAAAkB,gBAETC,EAAkBC,EAA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zB,OAAQ,MAFLd,EAAI/C,EAAA,GAAEgG,OAcb,OATAC,EAAAA,WAAU,WACNC,YAAW,WACPF,EAAQV,EACX,GAAE,KACHY,YAAW,WACPH,GAAW,EACd,GAAE,IACN,GAAE,IAGC7F,EAAAA,IAACiG,EAAAA,wBACGjG,EAAC2C,IAAAC,cACGC,KAAMA,EACNhD,QAASA,GACL8F,KAIpB","x_google_ignoreList":[0]}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{__assign as e}from"tslib";import{jsx as a,jsxs as i}from"react/jsx-runtime";import{useCallback as t,useMemo as o,useState as r,useEffect as l}from"react";import{Button as d,ButtonVariant as n}from"@cleartrip/ct-design-button";import{Typography as c,TypographyVariant as p}from"@cleartrip/ct-design-typography";import{LazyImage as m}from"@cleartrip/ct-platform-lazy-image";import{formatCurrency as s}from"@cleartrip/ct-platform-utils";import{ThemeProvider as u}from"@cleartrip/ct-design-theme";function h(e,a){void 0===a&&(a={});var i=a.insertAt;if(e&&"undefined"!=typeof document){var t=document.head||document.getElementsByTagName("head")[0],o=document.createElement("style");o.type="text/css","top"===i&&t.firstChild?t.insertBefore(o,t.firstChild):t.appendChild(o),o.styleSheet?o.styleSheet.cssText=e:o.appendChild(document.createTextNode(e))}}var g="index-module_cardWrapper__gNp5L",_="index-module_infoWrapper__SbSyr",f="index-module_titleRow__1g79Q",x="index-module_ratingWrapper__5VWjY",y="index-module_priceWrapper__lHaFH",v="index-module_loaderWrapper__qpkZL",C="index-module_hidden__CdBrr";h(".index-module_cardWrapper__gNp5L{background:#fff;border-radius:16px;height:192px;overflow-x:hidden;width:200px}.index-module_infoWrapper__SbSyr{padding:8px}.index-module_titleRow__1g79Q{display:flex;justify-content:space-between;padding-bottom:4px}.index-module_ratingWrapper__5VWjY{align-items:center;background-color:#ecf3ff;border-radius:4px;display:flex;padding:0 4px}.index-module_priceWrapper__lHaFH{align-items:baseline;display:flex;padding:4px 8px 8px}.index-module_slashedPrice__Sr26j{padding:0 2px}.index-module_loaderWrapper__qpkZL{opacity:1;position:absolute;top:0;transition:opacity .15s ease-in-out}.index-module_loaderWrapper__qpkZL.index-module_hidden__CdBrr{opacity:0}");var R=function(i){var t=i.loading,o=i.priority,r=void 0===o?"low":o;return a("div",e({className:"".concat(g," ").concat(v," ").concat(t?"":C)},{children:a("img",{width:200,height:104,fetchPriority:r,src:"https://fastui.cltpstatic.com/image/upload/f_auto,q_auto/offermgmt/images/banner/Image-placholder-1.jpg",alt:"Hotel recommendation placeholder"})}))},b=function(o){var r=o.heroImage,l=o.staticData,d=o.pricingData,n=o.hotelLandingUrl,u=t((function(){n&&(window.location.href=n)}),[n]);return i("div",e({className:g,onClick:u},{children:[a(m,{width:200,height:104,src:r.mediaUrl}),i("div",e({className:_},{children:[i("div",e({className:f},{children:[a(c,e({variant:p.B2,lineClamp:1},{children:null==l?void 0:l.hotelName})),a("div",e({className:x},{children:a(c,e({color:"link",variant:p.B3},{children:null==l?void 0:l.userRating}))}))]})),i(c,e({variant:p.P3,lineClamp:1,color:"subheading"},{children:[null==l?void 0:l.starRating," stars hotel in"," ",null==l?void 0:l.locality]}))]})),i("div",e({className:y},{children:[i(c,e({variant:p.HM4},{children:[s(null==d?void 0:d.perNightPrice)," "]})),a(c,e({isStriked:!0,color:"subheading",variant:p.B4},{children:s(null==d?void 0:d.slashedPrice,!1)})),a(c,e({variant:p.B4,color:"subheading"},{children:" / night"}))]}))]}))},N={hRecomWrapper:"index-module_hRecomWrapper__TL8eh",hRecomHeader:"index-module_hRecomHeader__RpSVO",hRecomContent:"index-module_hRecomContent__JoNi0",hRecomSidebar:"index-module_hRecomSidebar__rZAvT",connectedLine:"index-module_connectedLine__Z9VpQ",dottedLine:"index-module_dottedLine__6K0LJ",hRecomCardsWrapper:"index-module_hRecomCardsWrapper__6du4Z",hRecomCardWrapper:"index-module_hRecomCardWrapper__-IKwU",hRecomCouponCallout:"index-module_hRecomCouponCallout__Y2GEF",hRecomOfferCallout:"index-module_hRecomOfferCallout__a25nf",hRecomBookingCallout:"index-module_hRecomBookingCallout__XHOB5",exploreButton:"index-module_exploreButton__--vcq",sidebarCircle:"index-module_sidebarCircle__-dZZH"};h(".index-module_hRecomWrapper__TL8eh{background:linear-gradient(215deg,#e5fce3 8%,#fff 85.78%);display:flex;overflow:hidden;padding:16px 0;position:relative}.index-module_hRecomHeader__RpSVO{left:16px;position:relative}.index-module_hRecomContent__JoNi0{left:0;position:absolute;width:100%}.index-module_hRecomSidebar__rZAvT{align-items:center;display:flex;flex-direction:column;padding-left:16px}.index-module_connectedLine__Z9VpQ{border-left:1px solid grey;height:18px;left:-.5px;opacity:.3;position:relative}.index-module_dottedLine__6K0LJ{border-left:1px dotted grey;height:280px;left:-.5px;opacity:.5;position:relative}.index-module_hRecomCardsWrapper__6du4Z{-ms-overflow-style:none;box-sizing:border-box;display:flex;height:208px;overflow:auto;padding:0 16px 16px 52px;scrollbar-width:none;width:100%}.index-module_hRecomCardWrapper__-IKwU{border-radius:16px;box-shadow:0 4px 16px 0 rgba(26,26,26,.08);margin-right:12px;min-width:200px;position:relative}.index-module_hRecomCardWrapper__-IKwU:last-child{margin-right:0}.index-module_hRecomCardsWrapper__6du4Z::-webkit-scrollbar{display:none}.index-module_hRecomCouponCallout__Y2GEF{background:linear-gradient(90deg,#cafbcc 5.15%,rgba(212,255,218,.62) 41.66%,rgba(218,255,224,.23) 77.81%,hsla(0,0%,100%,0));border-radius:24px;padding:10px 12px}.index-module_hRecomOfferCallout__a25nf{padding:8px 0 20px}.index-module_hRecomBookingCallout__XHOB5{padding-bottom:16px}.index-module_exploreButton__--vcq{left:52px;margin-top:8px;position:relative;width:calc(100% - 68px)}.index-module_sidebarCircle__-dZZH{border:1px solid #1a1a1a;border-radius:50%;height:8px;margin-top:4px;width:8px}");var w=function(r){var l=r.data,m=r.loading,s=r.maxCardsCount,u=void 0===s?5:s,h=o((function(){var t=Array.from({length:u},(function(e,a){return a+1}));return a("div",e({className:N.hRecomCardsWrapper},{children:t.map((function(t,o){var r,d;return i("div",e({className:N.hRecomCardWrapper},{children:[(null===(r=null==l?void 0:l.hotels)||void 0===r?void 0:r[o])&&a(b,e({},null===(d=null==l?void 0:l.hotels)||void 0===d?void 0:d[o])),a(R,{loading:m,priority:0===o?"high":"auto"})]}),t)}))}))}),[l,m]),g=t((function(){var e=null==l?void 0:l.pageLandingUrl;e&&(window.location.href=e)}),[l]);return i("div",e({className:N.hRecomWrapper},{children:[i("div",e({className:N.hRecomSidebar},{children:[a("img",{width:20,height:20,src:"https://fastui.cltpstatic.com/image/upload/f_auto,q_auto,w_20,h_20,dpr_2/offermgmt/images/banner/Flight%20%281%29.png",fetchPriority:"low"}),a("div",{className:N.connectedLine}),a("img",{width:20,height:20,src:"https://fastui.cltpstatic.com/image/upload/f_auto,q_auto,w_20,h_20,dpr_2/offermgmt/images/banner/Gift%20%281%29.png",fetchPriority:"low"}),a("div",{className:N.dottedLine}),a("div",{className:N.sidebarCircle})]})),i("div",e({className:N.hRecomMainWrapper},{children:[i("div",e({className:N.hRecomHeader},{children:[a(c,e({variant:p.P3,className:N.hRecomBookingCallout},{children:null==l?void 0:l.bookingCallout})),a("div",e({className:N.hRecomCouponCallout},{children:a(c,e({color:"success",variant:p.B4CAPS},{children:null==l?void 0:l.couponCallout}))})),a(c,e({variant:p.HM4,className:N.hRecomOfferCallout},{children:null==l?void 0:l.offerCallout}))]})),i("div",e({className:N.hRecomContent},{children:[h,a(d,e({onClick:g,variant:n.OUTLINE,className:N.exploreButton},{children:"Explore hotels"}))]}))]}))]}))},B={hotels:[{hotelId:"717883",heroImage:{mediaUrl:"https://fastui.cltpstatic.com/image/upload/f_auto,q_auto/offermgmt/images/banner/HotelsCS1.jpeg",mediaType:"PHOTO",mediaCategory:"Property Pictures",featured:!1,mediaSubCategory:"Hotel Exterior"},staticData:{hotelName:"Fairfield By Marriott Bengaluru Rajajinagar",locality:"MG Road",city:"Bangalore",starRating:5,userRating:4.2},pricingData:{perNightPrice:1499,slashedPrice:2e3},hotelLandingUrl:""},{hotelId:"717881",heroImage:{mediaUrl:"https://fastui.cltpstatic.com/image/upload/f_auto,q_auto/offermgmt/images/banner/HotelsCS1.jpeg",mediaType:"PHOTO",mediaCategory:"Property Pictures",featured:!1,mediaSubCategory:"Hotel Exterior"},staticData:{hotelName:"Fairfield By Marriott Bengaluru Rajajinagar",locality:"MG Road",city:"Bangalore",starRating:5,userRating:4.2},pricingData:{perNightPrice:1499,slashedPrice:2e3},hotelLandingUrl:"https://www.cleartrip.com/hotels/results?num_rooms=1&adults=2&childs=0&adults1=2&children1=0&chk_in=20%2F06%2F2024&chk_out=21%2F06%2F2024&city=Bangalore&dest_code=32550&country=IN&state=Karnataka&poi=&localityId=&localityName=&baseLocation=CITY-32550&version=V2&utm_source=XSELL-AIR&hotelId=717881"},{hotelId:"717883",heroImage:{mediaUrl:"https://fastui.cltpstatic.com/image/upload/f_auto,q_auto/offermgmt/images/banner/HotelsCS1.jpeg",mediaType:"PHOTO",mediaCategory:"Property Pictures",featured:!1,mediaSubCategory:"Hotel Exterior"},staticData:{hotelName:"Fairfield By Marriott Bengaluru Rajajinagar",locality:"MG Road",city:"Bangalore",starRating:5,userRating:4.2},pricingData:{perNightPrice:1499,slashedPrice:2e3},hotelLandingUrl:""},{hotelId:"717884",heroImage:{mediaUrl:"https://fastui.cltpstatic.com/image/upload/f_auto,q_auto/offermgmt/images/banner/HotelsCS1.jpeg",mediaType:"PHOTO",mediaCategory:"Property Pictures",featured:!1,mediaSubCategory:"Hotel Exterior"},staticData:{hotelName:"Fairfield By Marriott Bengaluru Rajajinagar",locality:"MG Road",city:"Bangalore",starRating:5,userRating:4.2},pricingData:{perNightPrice:1499,slashedPrice:2e3},hotelLandingUrl:""},{hotelId:"717883",heroImage:{mediaUrl:"https://fastui.cltpstatic.com/image/upload/f_auto,q_auto/offermgmt/images/banner/HotelsCS1.jpeg",mediaType:"PHOTO",mediaCategory:"Property Pictures",featured:!1,mediaSubCategory:"Hotel Exterior"},staticData:{hotelName:"Fairfield By Marriott Bengaluru Rajajinagar",locality:"MG Road",city:"Bangalore",starRating:5,userRating:4.2},pricingData:{perNightPrice:1499,slashedPrice:2e3},hotelLandingUrl:""}],couponCallout:"CTBEST COUPON UNLOCKED!",bookingCallout:"Yay! Your flight to Goa is booked!",offerCallout:"Flat 20% off applied on hotel stays",pageLandingUrl:"https://www.cleartrip.com/hotels/results?num_rooms=1&adults=2&childs=0&adults1=2&children1=0&chk_in=20%2F06%2F2024&chk_out=21%2F06%2F2024&city=Bangalore&dest_code=32550&country=IN&state=Karnataka&poi=&localityId=&localityName=&baseLocation=CITY-32550&version=V2&utm_source=XSELL-AIR"},P=function(i){var t=r(!0),o=t[0],d=t[1],n=r(e(e({},B),{hotels:[]})),c=n[0],p=n[1];return l((function(){setTimeout((function(){p(B)}),300),setTimeout((function(){d(!1)}),310)}),[]),a(u,{children:a(w,e({data:c,loading:o},i))})};export{P as HotelRecommendationContainer,w as HotelRecommendationsWidget};
|
|
1
|
+
import{__assign as e}from"tslib";import{jsx as a,jsxs as i}from"react/jsx-runtime";import{useCallback as t,useMemo as o,useState as r,useEffect as l}from"react";import{Button as d,ButtonVariant as n}from"@cleartrip/ct-design-button";import{Typography as c,TypographyVariant as p}from"@cleartrip/ct-design-typography";import{LazyImage as m}from"@cleartrip/ct-platform-lazy-image";import{formatCurrency as s}from"@cleartrip/ct-platform-utils";import{ThemeProvider as u}from"@cleartrip/ct-design-theme";function h(e,a){void 0===a&&(a={});var i=a.insertAt;if(e&&"undefined"!=typeof document){var t=document.head||document.getElementsByTagName("head")[0],o=document.createElement("style");o.type="text/css","top"===i&&t.firstChild?t.insertBefore(o,t.firstChild):t.appendChild(o),o.styleSheet?o.styleSheet.cssText=e:o.appendChild(document.createTextNode(e))}}var g="index-module_cardWrapper__gNp5L",_="index-module_infoWrapper__SbSyr",f="index-module_titleRow__1g79Q",x="index-module_ratingWrapper__5VWjY",y="index-module_priceWrapper__lHaFH",C="index-module_loaderWrapper__qpkZL",v="index-module_hidden__CdBrr";h(".index-module_cardWrapper__gNp5L{background:#fff;border-radius:16px;height:192px;overflow-x:hidden;width:200px}.index-module_infoWrapper__SbSyr{padding:8px}.index-module_titleRow__1g79Q{display:flex;justify-content:space-between;padding-bottom:4px}.index-module_ratingWrapper__5VWjY{align-items:center;background-color:#ecf3ff;border-radius:4px;display:flex;padding:0 4px}.index-module_priceWrapper__lHaFH{align-items:baseline;display:flex;padding:4px 8px 8px}.index-module_slashedPrice__Sr26j{padding:0 2px}.index-module_loaderWrapper__qpkZL{opacity:1;position:absolute;top:0;transition:opacity .15s ease-in-out}.index-module_loaderWrapper__qpkZL.index-module_hidden__CdBrr{opacity:0}");var R=function(i){var t=i.loading,o=i.priority,r=void 0===o?"low":o;return a("div",e({className:"".concat(g," ").concat(C," ").concat(t?"":v)},{children:a("img",{width:200,height:104,fetchPriority:r,src:"https://fastui.cltpstatic.com/image/upload/f_auto,q_auto/offermgmt/images/banner/Image-placholder-1.jpg",alt:"Hotel recommendation placeholder"})}))},b=function(o){var r=o.heroImage,l=o.staticData,d=o.pricingData,n=o.hotelLandingUrl,u=t((function(){n&&(window.location.href=n)}),[n]);return i("div",e({className:g,onClick:u},{children:[a(m,{width:200,height:104,src:r.mediaUrl}),i("div",e({className:_},{children:[i("div",e({className:f},{children:[a(c,e({variant:p.B2,lineClamp:1},{children:null==l?void 0:l.hotelName})),a("div",e({className:x},{children:a(c,e({color:"link",variant:p.B3},{children:null==l?void 0:l.userRating}))}))]})),i(c,e({variant:p.P3,lineClamp:1,color:"subheading"},{children:[null==l?void 0:l.starRating," stars hotel in"," ",null==l?void 0:l.locality]}))]})),i("div",e({className:y},{children:[i(c,e({variant:p.HM4},{children:[s(null==d?void 0:d.perNightPrice)," "]})),a(c,e({isStriked:!0,color:"subheading",variant:p.B4},{children:s(null==d?void 0:d.slashedPrice,!1)})),a(c,e({variant:p.B4,color:"subheading"},{children:" / night"}))]}))]}))},N={hRecomWrapper:"index-module_hRecomWrapper__TL8eh",hRecomHeader:"index-module_hRecomHeader__RpSVO",hRecomContent:"index-module_hRecomContent__JoNi0",hRecomSidebar:"index-module_hRecomSidebar__rZAvT",connectedLine:"index-module_connectedLine__Z9VpQ",dottedLine:"index-module_dottedLine__6K0LJ",hRecomCardsWrapper:"index-module_hRecomCardsWrapper__6du4Z",hRecomCardWrapper:"index-module_hRecomCardWrapper__-IKwU",hRecomCouponCallout:"index-module_hRecomCouponCallout__Y2GEF",hRecomOfferCallout:"index-module_hRecomOfferCallout__a25nf",hRecomBookingCallout:"index-module_hRecomBookingCallout__XHOB5",exploreButton:"index-module_exploreButton__--vcq",sidebarCircle:"index-module_sidebarCircle__-dZZH"};h(".index-module_hRecomWrapper__TL8eh{background:linear-gradient(215deg,#e5fce3 8%,#fff 85.78%);display:flex;padding:16px 0;position:relative}.index-module_hRecomHeader__RpSVO{left:16px;position:relative}.index-module_hRecomContent__JoNi0{left:0;position:absolute;width:100%}.index-module_hRecomSidebar__rZAvT{align-items:center;display:flex;flex-direction:column;padding-left:16px}.index-module_connectedLine__Z9VpQ{border-left:1px solid grey;height:18px;left:-.5px;opacity:.3;position:relative}.index-module_dottedLine__6K0LJ{border-left:1px dotted grey;height:280px;left:-.5px;opacity:.5;position:relative}.index-module_hRecomCardsWrapper__6du4Z{-ms-overflow-style:none;box-sizing:border-box;display:flex;height:208px;overflow:auto;padding:0 16px 16px 52px;scrollbar-width:none;width:100%}.index-module_hRecomCardWrapper__-IKwU{border-radius:16px;box-shadow:0 4px 16px 0 rgba(26,26,26,.08);margin-right:12px;min-width:200px;position:relative}.index-module_hRecomCardWrapper__-IKwU:last-child{margin-right:0}.index-module_hRecomCardsWrapper__6du4Z::-webkit-scrollbar{display:none}.index-module_hRecomCouponCallout__Y2GEF{background:linear-gradient(90deg,#cafbcc 5.15%,rgba(212,255,218,.62) 41.66%,rgba(218,255,224,.23) 77.81%,hsla(0,0%,100%,0));border-radius:24px;padding:10px 12px}.index-module_hRecomOfferCallout__a25nf{padding:8px 0 20px}.index-module_hRecomBookingCallout__XHOB5{padding-bottom:16px}.index-module_exploreButton__--vcq{left:52px;margin-top:8px;position:relative;width:calc(100% - 68px)}.index-module_sidebarCircle__-dZZH{border:1px solid #1a1a1a;border-radius:50%;height:8px;margin-top:4px;width:8px}");var w=function(r){var l=r.data,m=r.loading,s=r.maxCardsCount,u=void 0===s?5:s,h=o((function(){var t=Array.from({length:u},(function(e,a){return a+1}));return a("div",e({className:N.hRecomCardsWrapper},{children:t.map((function(t,o){var r,d;return i("div",e({className:N.hRecomCardWrapper},{children:[(null===(r=null==l?void 0:l.hotels)||void 0===r?void 0:r[o])&&a(b,e({},null===(d=null==l?void 0:l.hotels)||void 0===d?void 0:d[o])),a(R,{loading:m,priority:0===o?"high":"auto"})]}),t)}))}))}),[l,m]),g=t((function(){var e=null==l?void 0:l.pageLandingUrl;e&&(window.location.href=e)}),[l]);return i("div",e({className:N.hRecomWrapper},{children:[i("div",e({className:N.hRecomSidebar},{children:[a("img",{width:20,height:20,src:"https://fastui.cltpstatic.com/image/upload/f_auto,q_auto,w_20,h_20,dpr_2/offermgmt/images/banner/Flight%20%281%29.png",fetchPriority:"low"}),a("div",{className:N.connectedLine}),a("img",{width:20,height:20,src:"https://fastui.cltpstatic.com/image/upload/f_auto,q_auto,w_20,h_20,dpr_2/offermgmt/images/banner/Gift%20%281%29.png",fetchPriority:"low"}),a("div",{className:N.dottedLine}),a("div",{className:N.sidebarCircle})]})),i("div",e({className:N.hRecomMainWrapper},{children:[i("div",e({className:N.hRecomHeader},{children:[a(c,e({variant:p.P3,className:N.hRecomBookingCallout},{children:null==l?void 0:l.bookingCallout})),a("div",e({className:N.hRecomCouponCallout},{children:a(c,e({color:"success",variant:p.B4CAPS},{children:null==l?void 0:l.couponCallout}))})),a(c,e({variant:p.HM4,className:N.hRecomOfferCallout},{children:null==l?void 0:l.offerCallout}))]})),i("div",e({className:N.hRecomContent},{children:[h,a(d,e({onClick:g,variant:n.OUTLINE,className:N.exploreButton},{children:"Explore hotels"}))]}))]}))]}))},B={hotels:[{hotelId:"717883",heroImage:{mediaUrl:"https://fastui.cltpstatic.com/image/upload/f_auto,q_auto/offermgmt/images/banner/HotelsCS1.jpeg",mediaType:"PHOTO",mediaCategory:"Property Pictures",featured:!1,mediaSubCategory:"Hotel Exterior"},staticData:{hotelName:"Fairfield By Marriott Bengaluru Rajajinagar",locality:"MG Road",city:"Bangalore",starRating:5,userRating:4.2},pricingData:{perNightPrice:1499,slashedPrice:2e3},hotelLandingUrl:""},{hotelId:"717881",heroImage:{mediaUrl:"https://fastui.cltpstatic.com/image/upload/f_auto,q_auto/offermgmt/images/banner/HotelsCS1.jpeg",mediaType:"PHOTO",mediaCategory:"Property Pictures",featured:!1,mediaSubCategory:"Hotel Exterior"},staticData:{hotelName:"Fairfield By Marriott Bengaluru Rajajinagar",locality:"MG Road",city:"Bangalore",starRating:5,userRating:4.2},pricingData:{perNightPrice:1499,slashedPrice:2e3},hotelLandingUrl:"https://www.cleartrip.com/hotels/results?num_rooms=1&adults=2&childs=0&adults1=2&children1=0&chk_in=20%2F06%2F2024&chk_out=21%2F06%2F2024&city=Bangalore&dest_code=32550&country=IN&state=Karnataka&poi=&localityId=&localityName=&baseLocation=CITY-32550&version=V2&utm_source=XSELL-AIR&hotelId=717881"},{hotelId:"717883",heroImage:{mediaUrl:"https://fastui.cltpstatic.com/image/upload/f_auto,q_auto/offermgmt/images/banner/HotelsCS1.jpeg",mediaType:"PHOTO",mediaCategory:"Property Pictures",featured:!1,mediaSubCategory:"Hotel Exterior"},staticData:{hotelName:"Fairfield By Marriott Bengaluru Rajajinagar",locality:"MG Road",city:"Bangalore",starRating:5,userRating:4.2},pricingData:{perNightPrice:1499,slashedPrice:2e3},hotelLandingUrl:""},{hotelId:"717884",heroImage:{mediaUrl:"https://fastui.cltpstatic.com/image/upload/f_auto,q_auto/offermgmt/images/banner/HotelsCS1.jpeg",mediaType:"PHOTO",mediaCategory:"Property Pictures",featured:!1,mediaSubCategory:"Hotel Exterior"},staticData:{hotelName:"Fairfield By Marriott Bengaluru Rajajinagar",locality:"MG Road",city:"Bangalore",starRating:5,userRating:4.2},pricingData:{perNightPrice:1499,slashedPrice:2e3},hotelLandingUrl:""},{hotelId:"717883",heroImage:{mediaUrl:"https://fastui.cltpstatic.com/image/upload/f_auto,q_auto/offermgmt/images/banner/HotelsCS1.jpeg",mediaType:"PHOTO",mediaCategory:"Property Pictures",featured:!1,mediaSubCategory:"Hotel Exterior"},staticData:{hotelName:"Fairfield By Marriott Bengaluru Rajajinagar",locality:"MG Road",city:"Bangalore",starRating:5,userRating:4.2},pricingData:{perNightPrice:1499,slashedPrice:2e3},hotelLandingUrl:""}],couponCallout:"CTBEST COUPON UNLOCKED!",bookingCallout:"Yay! Your flight to Goa is booked!",offerCallout:"Flat 20% off applied on hotel stays",pageLandingUrl:"https://www.cleartrip.com/hotels/results?num_rooms=1&adults=2&childs=0&adults1=2&children1=0&chk_in=20%2F06%2F2024&chk_out=21%2F06%2F2024&city=Bangalore&dest_code=32550&country=IN&state=Karnataka&poi=&localityId=&localityName=&baseLocation=CITY-32550&version=V2&utm_source=XSELL-AIR"},P=function(i){var t=r(!0),o=t[0],d=t[1],n=r(e(e({},B),{hotels:[]})),c=n[0],p=n[1];return l((function(){setTimeout((function(){p(B)}),300),setTimeout((function(){d(!1)}),310)}),[]),a(u,{children:a(w,e({data:c,loading:o},i))})};export{P as HotelRecommendationContainer,w as HotelRecommendationsWidget};
|
|
2
2
|
//# sourceMappingURL=ct-platform-hotel-recommendations.esm.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ct-platform-hotel-recommendations.esm.js","sources":["../../../../node_modules/.pnpm/style-inject@0.3.0/node_modules/style-inject/dist/style-inject.es.js","../packages/components/HotelRecommendations/src/Card/loader.tsx","../packages/components/HotelRecommendations/src/constants.ts","../packages/components/HotelRecommendations/src/Card/index.tsx","../packages/components/HotelRecommendations/src/Widget/index.tsx","../packages/components/HotelRecommendations/src/HRecommendations.tsx"],"sourcesContent":["function styleInject(css, ref) {\n if ( ref === void 0 ) ref = {};\n var insertAt = ref.insertAt;\n\n if (!css || typeof document === 'undefined') { return; }\n\n var head = document.head || document.getElementsByTagName('head')[0];\n var style = document.createElement('style');\n style.type = 'text/css';\n\n if (insertAt === 'top') {\n if (head.firstChild) {\n head.insertBefore(style, head.firstChild);\n } else {\n head.appendChild(style);\n }\n } else {\n head.appendChild(style);\n }\n\n if (style.styleSheet) {\n style.styleSheet.cssText = css;\n } else {\n style.appendChild(document.createTextNode(css));\n }\n}\n\nexport default styleInject;\n",null,null,null,null,null],"names":["styleInject","css","ref","insertAt","document","head","getElementsByTagName","style","createElement","type","firstChild","insertBefore","appendChild","styleSheet","cssText","createTextNode","CardLoader","_a","loading","_b","priority","_jsx","className","styles","concat","children","width","height","fetchPriority","src","alt","Card","heroImage","staticData","pricingData","hotelLandingUrl","handleCardClick","useCallback","window","location","href","_jsxs","onClick","LazyImage","mediaUrl","Typography","__assign","variant","TypographyVariant","B2","lineClamp","hotelName","color","B3","userRating","P3","starRating","locality","HM4","formatCurrency","perNightPrice","isStriked","B4","slashedPrice","HRecommendationsWidget","data","maxCardsCount","recommendationCards","useMemo","dummyArray","Array","from","length","_","index","hRecomCardsWrapper","map","val","hRecomCardWrapper","hotels","RecommendationCard","redirectToSRP","url","pageLandingUrl","hRecomWrapper","hRecomSidebar","connectedLine","dottedLine","sidebarCircle","hRecomMainWrapper","hRecomHeader","hRecomBookingCallout","bookingCallout","hRecomCouponCallout","B4CAPS","couponCallout","hRecomOfferCallout","offerCallout","hRecomContent","Button","ButtonVariant","OUTLINE","exploreButton","API_RESPONSE","hotelId","mediaType","mediaCategory","featured","mediaSubCategory","city","HRecommendations","props","useState","setLoading","setData","useEffect","setTimeout","ThemeProvider"],"mappings":"ofAAA,SAASA,EAAYC,EAAKC,QACX,IAARA,IAAiBA,EAAM,CAAA,GAC5B,IAAIC,EAAWD,EAAIC,SAEnB,GAAKF,GAA2B,oBAAbG,SAAnB,CA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YqB,qBAIzBb,EAACI,EAAUC,EAAA,CACPC,QAASC,EAAkBO,GAC3BL,UAAW,EACXE,MAAM,cAEL,CAAA3B,SAAA,CAAAQ,eAAAA,EAAYuB,WAA2B,kBAAA,IACvCvB,aAAU,EAAVA,EAAYwB,iBAGrBhB,EAAK,MAAAK,EAAA,CAAAxB,UAAWC,GAAmB,CAAAE,SAAA,CAC/BgB,EAACI,KAAWE,QAASC,EAAkBU,KAAG,CAAAjC,SAAA,CACrCkC,EAAezB,aAAA,EAAAA,EAAa0B,uBAEjCvC,EAACwB,EACGC,EAAA,CAAAe,WAAW,EACXT,MAAM,aACNL,QAASC,EAAkBc,IAE1B,CAAArC,SAAAkC,EAAezB,eAAAA,EAAa6B,cAAc,MAE/C1C,EAACwB,EAAWC,EAAA,CAAAC,QAASC,EAAkBc,GAAIV,MAAM,cAEpC,CAAA3B,SAAA,qBAI7B,
|
|
1
|
+
{"version":3,"file":"ct-platform-hotel-recommendations.esm.js","sources":["../../../../node_modules/.pnpm/style-inject@0.3.0/node_modules/style-inject/dist/style-inject.es.js","../packages/components/HotelRecommendations/src/Card/loader.tsx","../packages/components/HotelRecommendations/src/constants.ts","../packages/components/HotelRecommendations/src/Card/index.tsx","../packages/components/HotelRecommendations/src/Widget/index.tsx","../packages/components/HotelRecommendations/src/HRecommendations.tsx"],"sourcesContent":["function styleInject(css, ref) {\n if ( ref === void 0 ) ref = {};\n var insertAt = ref.insertAt;\n\n if (!css || typeof document === 'undefined') { return; }\n\n var head = document.head || document.getElementsByTagName('head')[0];\n var style = document.createElement('style');\n style.type = 'text/css';\n\n if (insertAt === 'top') {\n if (head.firstChild) {\n head.insertBefore(style, head.firstChild);\n } else {\n head.appendChild(style);\n }\n } else {\n head.appendChild(style);\n }\n\n if (style.styleSheet) {\n style.styleSheet.cssText = css;\n } else {\n style.appendChild(document.createTextNode(css));\n }\n}\n\nexport default styleInject;\n",null,null,null,null,null],"names":["styleInject","css","ref","insertAt","document","head","getElementsByTagName","style","createElement","type","firstChild","insertBefore","appendChild","styleSheet","cssText","createTextNode","CardLoader","_a","loading","_b","priority","_jsx","className","styles","concat","children","width","height","fetchPriority","src","alt","Card","heroImage","staticData","pricingData","hotelLandingUrl","handleCardClick","useCallback","window","location","href","_jsxs","onClick","LazyImage","mediaUrl","Typography","__assign","variant","TypographyVariant","B2","lineClamp","hotelName","color","B3","userRating","P3","starRating","locality","HM4","formatCurrency","perNightPrice","isStriked","B4","slashedPrice","HRecommendationsWidget","data","maxCardsCount","recommendationCards","useMemo","dummyArray","Array","from","length","_","index","hRecomCardsWrapper","map","val","hRecomCardWrapper","hotels","RecommendationCard","redirectToSRP","url","pageLandingUrl","hRecomWrapper","hRecomSidebar","connectedLine","dottedLine","sidebarCircle","hRecomMainWrapper","hRecomHeader","hRecomBookingCallout","bookingCallout","hRecomCouponCallout","B4CAPS","couponCallout","hRecomOfferCallout","offerCallout","hRecomContent","Button","ButtonVariant","OUTLINE","exploreButton","API_RESPONSE","hotelId","mediaType","mediaCategory","featured","mediaSubCategory","city","HRecommendations","props","useState","setLoading","setData","useEffect","setTimeout","ThemeProvider"],"mappings":"ofAAA,SAASA,EAAYC,EAAKC,QACX,IAARA,IAAiBA,EAAM,CAAA,GAC5B,IAAIC,EAAWD,EAAIC,SAEnB,GAAKF,GAA2B,oBAAbG,SAAnB,CAEA,IAAIC,EAAOD,SAASC,MAAQD,SAASE,qBAAqB,QAAQ,GAC9DC,EAAQH,SAASI,cAAc,SACnCD,EAAME,KAAO,WAEI,QAAbN,GACEE,EAAKK,WACPL,EAAKM,aAAaJ,EAAOF,EAAKK,YAKhCL,EAAKO,YAAYL,GAGfA,EAAMM,WACRN,EAAMM,WAAWC,QAAUb,EAE3BM,EAAMK,YAAYR,SAASW,eAAed,GAnBW,CAqBzD,i7BCjBA,IAAMe,EAAmD,SAACC,GACtD,IAAAC,YACAC,EAAAF,EAAAG,SAAAA,OAAQ,IAAAD,EAAG,MAAKA,EAGhB,OAEIE,WACIC,UAAW,UAAG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C5F,EAACgG,YACGhG,EAAC2C,KACGC,KAAMA,EACN/C,QAASA,GACL6F,KAIpB","x_google_ignoreList":[0]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cleartrip/ct-platform-hotel-recommendations",
|
|
3
|
-
"version": "1.4.1-beta.
|
|
3
|
+
"version": "1.4.1-beta.2",
|
|
4
4
|
"description": "Hotel Recommendations Component",
|
|
5
5
|
"types": "dist/index.d.ts",
|
|
6
6
|
"main": "dist/ct-platform-hotel-recommendations.cjs.js",
|
|
@@ -14,8 +14,8 @@
|
|
|
14
14
|
"@cleartrip/ct-design-theme": "3.7.0",
|
|
15
15
|
"@cleartrip/ct-design-typography": "3.7.0",
|
|
16
16
|
"classnames": "^2.5.1",
|
|
17
|
-
"@cleartrip/ct-platform-
|
|
18
|
-
"@cleartrip/ct-platform-
|
|
17
|
+
"@cleartrip/ct-platform-lazy-image": "3.2.1-beta.9",
|
|
18
|
+
"@cleartrip/ct-platform-utils": "3.5.1-beta.9"
|
|
19
19
|
},
|
|
20
20
|
"peerDependencies": {
|
|
21
21
|
"react": ">=16.8.0",
|