@cleartrip/ct-platform-hotel-recommendations 1.4.1-beta.10 → 1.4.1-beta.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/HRecommendations.types.d.ts +1 -1
- package/dist/HRecommendations.types.d.ts.map +1 -1
- package/dist/ct-platform-hotel-recommendations.cjs.js +1 -1
- package/dist/ct-platform-hotel-recommendations.cjs.js.map +1 -1
- package/dist/ct-platform-hotel-recommendations.esm.js +1 -1
- package/dist/ct-platform-hotel-recommendations.esm.js.map +1 -1
- package/package.json +4 -4
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"HRecommendations.types.d.ts","sourceRoot":"","sources":["../packages/components/HotelRecommendations/src/HRecommendations.types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,8BAA8B,CAAC;AAEnE,MAAM,WAAW,iCAAiC;IAC9C,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,EAAE,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"HRecommendations.types.d.ts","sourceRoot":"","sources":["../packages/components/HotelRecommendations/src/HRecommendations.types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,8BAA8B,CAAC;AAEnE,MAAM,WAAW,iCAAiC;IAC9C,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,sBAAsB,EAAE,MAAM,CAAC;CAClC;AACD,MAAM,WAAW,8BAA8B;IAC3C,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,IAAI,CAAC,EAAE,6BAA6B,CAAC;CAExC;AAED,MAAM,WAAW,6BAA6B;IAC1C,YAAY,EAAE,MAAM,CAAC;IACrB,aAAa,EAAE,MAAM,CAAC;IACtB,cAAc,EAAE,MAAM,CAAC;IACvB,cAAc,EAAE,MAAM,CAAC;IACvB,eAAe,EAAE,mBAAmB,EAAE,CAAC;CAC1C;AAED,MAAM,WAAW,2BAA2B;IACxC,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,EAAE,MAAM,CAAC;IAClB,QAAQ,EAAE,OAAO,CAAC;IAClB,aAAa,EAAE,MAAM,CAAC;IACtB,gBAAgB,EAAE,MAAM,CAAC;CAC5B;AAED,MAAM,WAAW,8BAA8B;IAC3C,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,EAAE,MAAM,CAAC;IAClB,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,MAAM,CAAC;CACtB;AAED,MAAM,WAAW,2BAA2B;IACxC,YAAY,EAAE,MAAM,CAAC;IACrB,aAAa,EAAE,MAAM,CAAC;CACzB;AAED,MAAM,WAAW,0BAA0B;IACvC,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,MAAM,GAAG,KAAK,GAAG,MAAM,GAAG,SAAS,CAAC;CAClD;AAED,MAAM,WAAW,wBAAyB,SAAQ,mBAAmB;IACjE,WAAW,CAAC,EAAE,MAAM,GAAG,KAAK,GAAG,MAAM,GAAG,SAAS,CAAC;CACrD"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";var e=require("tslib"),i=require("react/jsx-runtime"),a=require("react"),o=require("@cleartrip/ct-design-button"),n=require("@cleartrip/ct-design-typography"),r=require("@cleartrip/ct-platform-utils"),d=require("@cleartrip/ct-platform-assets"),t=require("@cleartrip/ct-design-theme");function l(e,i){void 0===i&&(i={});var a=i.insertAt;if(e&&"undefined"!=typeof document){var o=document.head||document.getElementsByTagName("head")[0],n=document.createElement("style");n.type="text/css","top"===a&&o.firstChild?o.insertBefore(n,o.firstChild):o.appendChild(n),n.styleSheet?n.styleSheet.cssText=e:n.appendChild(document.createTextNode(e))}}var s="index-module_hRecoCardWrapper__FhtJN",c="index-module_hRecoInfoWrapper__4EAyB",_="index-module_hRecoTitleRow__97dd5",p="index-module_hRecoRatingWrapper__mGwia",h="index-module_hRecoPriceWrapper__49o5u",x="index-module_hRecoLoaderWrapper__KXG-6",u="index-module_hidden__CdBrr",m="index-module_hRecoLoaderGradient__c7400",g="index-module_hRecoLoaderTitleRow__cWktU",f="index-module_hRecoLoaderTitle__-Onou",y="index-module_hRecoLoaderRating__Qy5b-",v="index-module_hRecoLoaderSubtitle__l1X3H",R="index-module_hRecoLoaderPricing__KsQ-o";l(".index-module_hRecoCardWrapper__FhtJN{background:#fff;border-radius:16px;height:180px;overflow:hidden;width:200px}.index-module_hRecoInfoWrapper__4EAyB{padding:8px 8px 0}.index-module_hRecoTitleRow__97dd5{display:flex;justify-content:space-between}.index-module_hRecoRatingWrapper__mGwia{align-items:center;background-color:#ecf3ff;border-radius:4px;display:flex;padding:0 4px}.index-module_hRecoPriceWrapper__49o5u{align-items:baseline;display:flex;padding:4px 8px 8px}.index-module_hRecoLoaderWrapper__KXG-6{opacity:1;position:absolute;top:0;transition:opacity .15s ease-in-out}.index-module_hRecoLoaderWrapper__KXG-6.index-module_hidden__CdBrr{opacity:0}.index-module_hRecoLoaderGradient__c7400{background:linear-gradient(90deg,#f1efef -24.18%,#f9f8f8 50.26%,#e7e5e5 114.84%)}.index-module_hRecoLoaderTitleRow__cWktU{align-items:center;display:flex;margin-bottom:4px}.index-module_hRecoLoaderTitle__-Onou{border-radius:6px;height:20px;width:152px}.index-module_hRecoLoaderRating__Qy5b-{border-radius:6px;height:16px;margin-left:8px;width:20px}.index-module_hRecoLoaderSubtitle__l1X3H{border-radius:4px;height:8px;margin-bottom:8px;width:138px}.index-module_hRecoLoaderPricing__KsQ-o{border-radius:6px;height:16px;width:120px}");var b=function(a){var o=a.loading,n=a.priority,r=void 0===n?"low":n;return i.jsxs("div",e.__assign({className:"".concat(s," ").concat(x," ").concat(o?"":u)},{children:[i.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"}),i.jsxs("div",e.__assign({className:c},{children:[i.jsxs("div",e.__assign({className:g},{children:[i.jsx("div",{className:"".concat(f," ").concat(m)}),i.jsx("div",{className:"".concat(y," ").concat(m)})]})),i.jsx("div",{className:"".concat(v," ").concat(m)}),i.jsx("div",{className:"".concat(R," ").concat(m)})]}))]}))},C=function(o){var d=o.heroImage,t=o.staticData,l=o.pricingData,x=o.imgPriority,u=o.hotelLandingUrl,m=a.useCallback((function(){u&&(window.location.href=u)}),[u]);return i.jsxs("div",e.__assign({className:s,onClick:m},{children:[i.jsx("img",{width:200,height:104,src:d.mediaUrl,fetchPriority:x}),i.jsxs("div",e.__assign({className:c},{children:[i.jsxs("div",e.__assign({className:_},{children:[i.jsx(n.Typography,e.__assign({variant:n.TypographyVariant.B2,lineClamp:1},{children:null==t?void 0:t.hotelName})),i.jsx("div",e.__assign({className:p},{children:i.jsx(n.Typography,e.__assign({color:"link",variant:n.TypographyVariant.B3},{children:null==t?void 0:t.userRating}))}))]})),i.jsxs(n.Typography,e.__assign({variant:n.TypographyVariant.P3,lineClamp:1,color:"subheading"},{children:[null==t?void 0:t.starRating," stars hotel in"," ",null==t?void 0:t.locality]}))]})),i.jsxs("div",e.__assign({className:h},{children:[i.jsxs(n.Typography,e.__assign({variant:n.TypographyVariant.HM4},{children:[r.formatCurrency(null==l?void 0:l.perNightPrice)," "]})),i.jsx(n.Typography,e.__assign({isStriked:!0,color:"subheading",variant:n.TypographyVariant.B4},{children:r.formatCurrency(null==l?void 0:l.slashedPrice,!1)})),i.jsx(n.Typography,e.__assign({variant:n.TypographyVariant.B4,color:"subheading"},{children:" / night"}))]}))]}))},j={hRecoWrapper:"index-module_hRecoWrapper__AeUoH",hRecoHeader:"index-module_hRecoHeader__5xuYV",hRecoContent:"index-module_hRecoContent__0kDhm",hRecoSidebar:"index-module_hRecoSidebar__UjWWx",connectedLine:"index-module_connectedLine__Z9VpQ",dottedLine:"index-module_dottedLine__6K0LJ",hRecoCardsWrapper:"index-module_hRecoCardsWrapper__tc4sW",hRecoCardWrapper:"index-module_hRecoCardWrapper__5lhlY",hRecoOfferCallout:"index-module_hRecoOfferCallout__FBOgY",hRecoCouponCallout:"index-module_hRecoCouponCallout__77bdL",hRecoBookingCallout:"index-module_hRecoBookingCallout__GGryo",exploreButton:"index-module_exploreButton__--vcq",sidebarCircle:"index-module_sidebarCircle__-dZZH",hRecoHeaderTextLoader:"index-module_hRecoHeaderTextLoader__tyYPe"};l(".index-module_hRecoWrapper__AeUoH{background:linear-gradient(215deg,#e5fce3 8%,#fff 85.78%);display:flex;padding:16px 0;position:relative}.index-module_hRecoHeader__5xuYV{left:8px;position:relative}.index-module_hRecoContent__0kDhm{left:0;position:absolute;width:100%}.index-module_hRecoSidebar__UjWWx{align-items:center;display:flex;flex-direction:column;padding-left:12px}.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:268px;left:-.5px;opacity:.5;position:relative}.index-module_hRecoCardsWrapper__tc4sW{-ms-overflow-style:none;display:flex;height:180px;overflow:auto;padding:0 16px 16px 40px;scrollbar-width:none;width:calc(100% - 56px)}.index-module_hRecoCardWrapper__5lhlY{border-radius:16px;box-shadow:0 4px 16px 0 rgba(26,26,26,.08);margin-right:12px;min-width:200px;position:relative}.index-module_hRecoCardWrapper__5lhlY:last-child{margin-right:0}.index-module_hRecoCardsWrapper__tc4sW::-webkit-scrollbar{display:none}.index-module_hRecoOfferCallout__FBOgY{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_hRecoCouponCallout__77bdL{padding:8px 0 20px}.index-module_hRecoBookingCallout__GGryo{padding-bottom:16px}.index-module_exploreButton__--vcq{left:40px;margin-top:8px;position:relative;width:calc(100% - 56px)}.index-module_sidebarCircle__-dZZH{border:1px solid #1a1a1a;border-radius:50%;height:8px;margin-top:4px;width:8px}.index-module_hRecoHeaderTextLoader__tyYPe{background:linear-gradient(90deg,#f1efef -24.18%,#f9f8f8 50.26%,#e7e5e5 114.84%);border-radius:4px}");var w="index-module_hRecoBanner__CyUB8",T="index-module_hRecoBannerIcon__cFmbk",N="index-module_hRecoBannerTextsWrapper__0P-pK",B="index-module_hRecoBannerTextRow__qbE8k",L="index-module_hRecoBannerImg__eC0hA";l(".index-module_hRecoBanner__CyUB8{aspect-ratio:304/180;background:#fff;border-radius:16px;box-shadow:0 4px 16px 0 rgba(26,26,26,.08);display:flex;height:180px;margin:0 16px 24px 40px;width:calc(100% - 56px)}.index-module_hRecoBannerIcon__cFmbk{margin-right:8px;min-width:16px;padding-top:1px}.index-module_hRecoBannerTextsWrapper__0P-pK{display:flex;flex-direction:column;justify-content:center;padding:18px 8px 18px 12px}.index-module_hRecoBannerTextRow__qbE8k{display:flex;padding-bottom:16px}.index-module_hRecoBannerTextRow__qbE8k:last-of-type{padding-bottom:0}.index-module_hRecoBannerImg__eC0hA{height:100%}");var k=function(){return i.jsxs("div",e.__assign({className:w},{children:[i.jsxs("div",e.__assign({className:N},{children:[i.jsxs("div",e.__assign({className:B},{children:[i.jsx(d.CheckIcon,{className:T}),i.jsx(n.Typography,e.__assign({variant:n.TypographyVariant.P3},{children:"Free cancellation till check-in time"}))]})),i.jsxs("div",e.__assign({className:B},{children:[i.jsx(d.CheckIcon,{className:T}),i.jsx(n.Typography,e.__assign({variant:n.TypographyVariant.P3},{children:"Exclusive member discount for Flipkart & Myntra"}))]})),i.jsxs("div",e.__assign({className:B},{children:[i.jsx(d.CheckIcon,{className:T}),i.jsx(n.Typography,e.__assign({variant:n.TypographyVariant.P3},{children:"Earn and redeem SuperCoins"}))]}))]})),i.jsx("img",{src:"https://fastui.cltpstatic.com/image/upload/f_auto,q_auto,w_274,h_360/offermgmt/images/Hero-Image.png",className:L})]}))},W=function(r){var d=r.data,t=r.loading,l=r.maxCardsCount,s=void 0===l?5:l,c=a.useMemo((function(){var a,o=Array.from({length:s},(function(e,i){return i+1}));return t||(null===(a=null==d?void 0:d.recommendations)||void 0===a?void 0:a.length)?i.jsx("div",e.__assign({className:j.hRecoCardsWrapper},{children:o.map((function(a,o){var n,r;return i.jsxs("div",e.__assign({className:j.hRecoCardWrapper},{children:[(null===(n=null==d?void 0:d.recommendations)||void 0===n?void 0:n[o])&&i.jsx(C,e.__assign({},null===(r=null==d?void 0:d.recommendations)||void 0===r?void 0:r[o],{imgPriority:0===o?"high":"auto"})),i.jsx(b,{loading:t,priority:0===o?"high":"auto"})]}),a)}))})):i.jsx(k,{})}),[d,t]),_=a.useCallback((function(){var e=null==d?void 0:d.pageLandingUrl;e&&(window.location.href=e)}),[d]);return i.jsxs("div",e.__assign({className:j.hRecoWrapper},{children:[i.jsxs("div",e.__assign({className:j.hRecoSidebar},{children:[i.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"}),i.jsx("div",{className:j.connectedLine}),i.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"}),i.jsx("div",{className:j.dottedLine}),i.jsx("div",{className:j.sidebarCircle})]})),i.jsxs("div",e.__assign({className:j.hRecoMainWrapper},{children:[i.jsxs("div",e.__assign({className:j.hRecoHeader},{children:[t?i.jsx("div",e.__assign({style:{padding:"4px 0",marginBottom:"16px"}},{children:i.jsx("div",{className:j.hRecoHeaderTextLoader,style:{height:"8px",width:"170px"}})})):i.jsx(n.Typography,e.__assign({variant:n.TypographyVariant.P3,className:j.hRecoBookingCallout},{children:null==d?void 0:d.bookingCallOut})),t?i.jsx("div",e.__assign({style:{padding:"8px 0 6px",marginBottom:"8px"}},{children:i.jsx("div",{className:j.hRecoHeaderTextLoader,style:{height:"18px",width:"270px"}})})):i.jsx("div",e.__assign({className:j.hRecoOfferCallout},{children:i.jsx(n.Typography,e.__assign({color:"success",variant:n.TypographyVariant.B4CAPS},{children:null==d?void 0:d.offerCallOut}))})),t?i.jsx("div",e.__assign({style:{marginBottom:"24px"}},{children:i.jsx("div",{className:j.hRecoHeaderTextLoader,style:{height:"16px",width:"260px"}})})):i.jsx(n.Typography,e.__assign({variant:n.TypographyVariant.HM4,className:j.hRecoCouponCallout},{children:null==d?void 0:d.couponCallOut}))]})),i.jsxs("div",e.__assign({className:j.hRecoContent},{children:[c,i.jsx(o.Button,e.__assign({disabled:t,onClick:_,variant:o.ButtonVariant.OUTLINE,className:j.exploreButton},{children:"Book hotel now"}))]}))]}))]}))};exports.HotelRecommendationContainer=function(o){var n=o.location,d=o.vertical,l=void 0===d?"AIR":d,s=o.fallbackPageLandingURL,c=e.__rest(o,["location","vertical","fallbackPageLandingURL"]),_=a.useState(!0)[0],p=a.useState(),h=p[0],x=p[1],u=a.useCallback((function(i){var a;return e.__assign(e.__assign({},i),{bookingCallOut:n?"Since you are flying to ".concat(n,"!"):"Since you are flying for your trip",recommendations:null!==(a=i.recommendations)&&void 0!==a?a:[]})}),[]);return a.useEffect((function(){r.getHotelCrossSellRecos(l,s).then((function(e){var i=u(e);x(i),setTimeout((function(){}),10)}))}),[]),i.jsx(t.ThemeProvider,{children:i.jsx(W,e.__assign({data:h,loading:_},c))})},exports.HotelRecommendationsWidget=W;
|
|
1
|
+
"use strict";var e=require("tslib"),i=require("react/jsx-runtime"),a=require("react"),o=require("@cleartrip/ct-design-button"),n=require("@cleartrip/ct-design-typography"),r=require("@cleartrip/ct-platform-utils"),d=require("@cleartrip/ct-platform-assets"),t=require("@cleartrip/ct-design-theme");function l(e,i){void 0===i&&(i={});var a=i.insertAt;if(e&&"undefined"!=typeof document){var o=document.head||document.getElementsByTagName("head")[0],n=document.createElement("style");n.type="text/css","top"===a&&o.firstChild?o.insertBefore(n,o.firstChild):o.appendChild(n),n.styleSheet?n.styleSheet.cssText=e:n.appendChild(document.createTextNode(e))}}var s="index-module_hRecoCardWrapper__FhtJN",c="index-module_hRecoInfoWrapper__4EAyB",_="index-module_hRecoTitleRow__97dd5",p="index-module_hRecoRatingWrapper__mGwia",h="index-module_hRecoPriceWrapper__49o5u",x="index-module_hRecoLoaderWrapper__KXG-6",u="index-module_hidden__CdBrr",m="index-module_hRecoLoaderGradient__c7400",g="index-module_hRecoLoaderTitleRow__cWktU",f="index-module_hRecoLoaderTitle__-Onou",y="index-module_hRecoLoaderRating__Qy5b-",v="index-module_hRecoLoaderSubtitle__l1X3H",R="index-module_hRecoLoaderPricing__KsQ-o";l(".index-module_hRecoCardWrapper__FhtJN{background:#fff;border-radius:16px;height:180px;overflow:hidden;width:200px}.index-module_hRecoInfoWrapper__4EAyB{padding:8px 8px 0}.index-module_hRecoTitleRow__97dd5{display:flex;justify-content:space-between}.index-module_hRecoRatingWrapper__mGwia{align-items:center;background-color:#ecf3ff;border-radius:4px;display:flex;padding:0 4px}.index-module_hRecoPriceWrapper__49o5u{align-items:baseline;display:flex;padding:4px 8px 8px}.index-module_hRecoLoaderWrapper__KXG-6{opacity:1;position:absolute;top:0;transition:opacity .15s ease-in-out}.index-module_hRecoLoaderWrapper__KXG-6.index-module_hidden__CdBrr{opacity:0}.index-module_hRecoLoaderGradient__c7400{background:linear-gradient(90deg,#f1efef -24.18%,#f9f8f8 50.26%,#e7e5e5 114.84%)}.index-module_hRecoLoaderTitleRow__cWktU{align-items:center;display:flex;margin-bottom:4px}.index-module_hRecoLoaderTitle__-Onou{border-radius:6px;height:20px;width:152px}.index-module_hRecoLoaderRating__Qy5b-{border-radius:6px;height:16px;margin-left:8px;width:20px}.index-module_hRecoLoaderSubtitle__l1X3H{border-radius:4px;height:8px;margin-bottom:8px;width:138px}.index-module_hRecoLoaderPricing__KsQ-o{border-radius:6px;height:16px;width:120px}");var b=function(a){var o=a.loading,n=a.priority,r=void 0===n?"low":n;return i.jsxs("div",e.__assign({className:"".concat(s," ").concat(x," ").concat(o?"":u)},{children:[i.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"}),i.jsxs("div",e.__assign({className:c},{children:[i.jsxs("div",e.__assign({className:g},{children:[i.jsx("div",{className:"".concat(f," ").concat(m)}),i.jsx("div",{className:"".concat(y," ").concat(m)})]})),i.jsx("div",{className:"".concat(v," ").concat(m)}),i.jsx("div",{className:"".concat(R," ").concat(m)})]}))]}))},C=function(o){var d=o.heroImage,t=o.staticData,l=o.pricingData,x=o.imgPriority,u=o.hotelLandingUrl,m=a.useCallback((function(){u&&(window.location.href=u)}),[u]);return i.jsxs("div",e.__assign({className:s,onClick:m},{children:[i.jsx("img",{width:200,height:104,src:d.mediaUrl,fetchPriority:x}),i.jsxs("div",e.__assign({className:c},{children:[i.jsxs("div",e.__assign({className:_},{children:[i.jsx(n.Typography,e.__assign({variant:n.TypographyVariant.B2,lineClamp:1},{children:null==t?void 0:t.hotelName})),i.jsx("div",e.__assign({className:p},{children:i.jsx(n.Typography,e.__assign({color:"link",variant:n.TypographyVariant.B3},{children:null==t?void 0:t.userRating}))}))]})),i.jsxs(n.Typography,e.__assign({variant:n.TypographyVariant.P3,lineClamp:1,color:"subheading"},{children:[null==t?void 0:t.starRating," stars hotel in"," ",null==t?void 0:t.locality]}))]})),i.jsxs("div",e.__assign({className:h},{children:[i.jsxs(n.Typography,e.__assign({variant:n.TypographyVariant.HM4},{children:[r.formatCurrency(null==l?void 0:l.perNightPrice)," "]})),i.jsx(n.Typography,e.__assign({isStriked:!0,color:"subheading",variant:n.TypographyVariant.B4},{children:r.formatCurrency(null==l?void 0:l.slashedPrice,!1)})),i.jsx(n.Typography,e.__assign({variant:n.TypographyVariant.B4,color:"subheading"},{children:" / night"}))]}))]}))},j={hRecoWrapper:"index-module_hRecoWrapper__AeUoH",hRecoHeader:"index-module_hRecoHeader__5xuYV",hRecoContent:"index-module_hRecoContent__0kDhm",hRecoSidebar:"index-module_hRecoSidebar__UjWWx",connectedLine:"index-module_connectedLine__Z9VpQ",dottedLine:"index-module_dottedLine__6K0LJ",hRecoCardsWrapper:"index-module_hRecoCardsWrapper__tc4sW",hRecoCardWrapper:"index-module_hRecoCardWrapper__5lhlY",hRecoOfferCallout:"index-module_hRecoOfferCallout__FBOgY",hRecoCouponCallout:"index-module_hRecoCouponCallout__77bdL",hRecoBookingCallout:"index-module_hRecoBookingCallout__GGryo",exploreButton:"index-module_exploreButton__--vcq",sidebarCircle:"index-module_sidebarCircle__-dZZH",hRecoHeaderTextLoader:"index-module_hRecoHeaderTextLoader__tyYPe"};l(".index-module_hRecoWrapper__AeUoH{background:linear-gradient(215deg,#e5fce3 8%,#fff 85.78%);display:flex;padding:16px 0;position:relative}.index-module_hRecoHeader__5xuYV{left:8px;position:relative}.index-module_hRecoContent__0kDhm{left:0;position:absolute;width:100%}.index-module_hRecoSidebar__UjWWx{align-items:center;display:flex;flex-direction:column;padding-left:12px}.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:268px;left:-.5px;opacity:.5;position:relative}.index-module_hRecoCardsWrapper__tc4sW{-ms-overflow-style:none;box-sizing:content-box;display:flex;height:180px;overflow:auto;padding:0 16px 16px 40px;scrollbar-width:none;width:calc(100% - 56px)}.index-module_hRecoCardWrapper__5lhlY{border-radius:16px;box-shadow:0 4px 16px 0 rgba(26,26,26,.08);margin-right:12px;min-width:200px;position:relative}.index-module_hRecoCardWrapper__5lhlY:last-child{margin-right:0}.index-module_hRecoCardsWrapper__tc4sW::-webkit-scrollbar{display:none}.index-module_hRecoOfferCallout__FBOgY{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_hRecoCouponCallout__77bdL{padding:8px 0 20px}.index-module_hRecoBookingCallout__GGryo{padding-bottom:16px}.index-module_exploreButton__--vcq{left:40px;margin-top:8px;position:relative;width:calc(100% - 56px)}.index-module_sidebarCircle__-dZZH{border:1px solid #1a1a1a;border-radius:50%;height:8px;margin-top:4px;width:8px}.index-module_hRecoHeaderTextLoader__tyYPe{background:linear-gradient(90deg,#f1efef -24.18%,#f9f8f8 50.26%,#e7e5e5 114.84%);border-radius:4px}");var w="index-module_hRecoBanner__CyUB8",T="index-module_hRecoBannerIcon__cFmbk",N="index-module_hRecoBannerTextsWrapper__0P-pK",B="index-module_hRecoBannerTextRow__qbE8k",L="index-module_hRecoBannerImg__eC0hA";l(".index-module_hRecoBanner__CyUB8{aspect-ratio:304/180;background:#fff;border-radius:16px;box-shadow:0 4px 16px 0 rgba(26,26,26,.08);display:flex;height:180px;margin:0 16px 24px 40px;width:calc(100% - 56px)}.index-module_hRecoBannerIcon__cFmbk{margin-right:8px;min-width:16px;padding-top:1px}.index-module_hRecoBannerTextsWrapper__0P-pK{display:flex;flex-direction:column;justify-content:center;padding:18px 8px 18px 12px}.index-module_hRecoBannerTextRow__qbE8k{display:flex;padding-bottom:16px}.index-module_hRecoBannerTextRow__qbE8k:last-of-type{padding-bottom:0}.index-module_hRecoBannerImg__eC0hA{height:100%}");var k=function(){return i.jsxs("div",e.__assign({className:w},{children:[i.jsxs("div",e.__assign({className:N},{children:[i.jsxs("div",e.__assign({className:B},{children:[i.jsx(d.CheckIcon,{className:T}),i.jsx(n.Typography,e.__assign({variant:n.TypographyVariant.P3},{children:"Free cancellation till check-in time"}))]})),i.jsxs("div",e.__assign({className:B},{children:[i.jsx(d.CheckIcon,{className:T}),i.jsx(n.Typography,e.__assign({variant:n.TypographyVariant.P3},{children:"Exclusive member discount for Flipkart & Myntra"}))]})),i.jsxs("div",e.__assign({className:B},{children:[i.jsx(d.CheckIcon,{className:T}),i.jsx(n.Typography,e.__assign({variant:n.TypographyVariant.P3},{children:"Earn and redeem SuperCoins"}))]}))]})),i.jsx("img",{src:"https://fastui.cltpstatic.com/image/upload/f_auto,q_auto,w_274,h_360/offermgmt/images/Hero-Image.png",className:L})]}))},W=function(r){var d=r.data,t=r.loading,l=r.maxCardsCount,s=void 0===l?5:l,c=a.useMemo((function(){var a,o=Array.from({length:s},(function(e,i){return i+1}));return t||(null===(a=null==d?void 0:d.recommendations)||void 0===a?void 0:a.length)?i.jsx("div",e.__assign({className:j.hRecoCardsWrapper},{children:o.map((function(a,o){var n,r;return i.jsxs("div",e.__assign({className:j.hRecoCardWrapper},{children:[(null===(n=null==d?void 0:d.recommendations)||void 0===n?void 0:n[o])&&i.jsx(C,e.__assign({},null===(r=null==d?void 0:d.recommendations)||void 0===r?void 0:r[o],{imgPriority:0===o?"high":"auto"})),i.jsx(b,{loading:t,priority:0===o?"high":"auto"})]}),a)}))})):i.jsx(k,{})}),[d,t]),_=a.useCallback((function(){var e=null==d?void 0:d.pageLandingUrl;e&&(window.location.href=e)}),[d]);return i.jsxs("div",e.__assign({className:j.hRecoWrapper},{children:[i.jsxs("div",e.__assign({className:j.hRecoSidebar},{children:[i.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"}),i.jsx("div",{className:j.connectedLine}),i.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"}),i.jsx("div",{className:j.dottedLine}),i.jsx("div",{className:j.sidebarCircle})]})),i.jsxs("div",e.__assign({className:j.hRecoMainWrapper},{children:[i.jsxs("div",e.__assign({className:j.hRecoHeader},{children:[t?i.jsx("div",e.__assign({style:{padding:"4px 0",marginBottom:"16px"}},{children:i.jsx("div",{className:j.hRecoHeaderTextLoader,style:{height:"8px",width:"170px"}})})):i.jsx(n.Typography,e.__assign({variant:n.TypographyVariant.P3,className:j.hRecoBookingCallout},{children:null==d?void 0:d.bookingCallOut})),t?i.jsx("div",e.__assign({style:{padding:"8px 0 6px",marginBottom:"8px"}},{children:i.jsx("div",{className:j.hRecoHeaderTextLoader,style:{height:"18px",width:"270px"}})})):i.jsx("div",e.__assign({className:j.hRecoOfferCallout},{children:i.jsx(n.Typography,e.__assign({color:"success",variant:n.TypographyVariant.B4CAPS},{children:null==d?void 0:d.offerCallOut}))})),t?i.jsx("div",e.__assign({style:{marginBottom:"24px"}},{children:i.jsx("div",{className:j.hRecoHeaderTextLoader,style:{height:"16px",width:"260px"}})})):i.jsx(n.Typography,e.__assign({variant:n.TypographyVariant.HM4,className:j.hRecoCouponCallout},{children:null==d?void 0:d.couponCallOut}))]})),i.jsxs("div",e.__assign({className:j.hRecoContent},{children:[c,i.jsx(o.Button,e.__assign({disabled:t,onClick:_,variant:o.ButtonVariant.OUTLINE,className:j.exploreButton},{children:"Book hotel now"}))]}))]}))]}))};exports.HotelRecommendationContainer=function(o){var n=o.location,d=o.vertical,l=void 0===d?"AIR":d,s=o.fallbackPageLandingURL,c=e.__rest(o,["location","vertical","fallbackPageLandingURL"]),_=a.useState(!0)[0],p=a.useState(),h=p[0],x=p[1],u=a.useCallback((function(i){var a;return e.__assign(e.__assign({},i),{bookingCallOut:n?"Since you are flying to ".concat(n,"!"):"Since you are flying for your trip",recommendations:null!==(a=i.recommendations)&&void 0!==a?a:[]})}),[]);return a.useEffect((function(){r.getHotelCrossSellRecos(l,s).then((function(e){var i=u(e);x(i),setTimeout((function(){}),10)}))}),[]),i.jsx(t.ThemeProvider,{children:i.jsx(W,e.__assign({data:h,loading:_},c))})},exports.HotelRecommendationsWidget=W;
|
|
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/Banner/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,null],"names":["styleInject","css","ref","insertAt","document","head","getElementsByTagName","style","createElement","type","firstChild","insertBefore","appendChild","styleSheet","cssText","createTextNode","CardLoader","_a","loading","_b","priority","_jsxs","jsxs","__assign","className","concat","styles","children","_jsx","jsx","width","height","fetchPriority","src","alt","Card","heroImage","staticData","pricingData","imgPriority","hotelLandingUrl","handleCardClick","useCallback","window","location","href","onClick","mediaUrl","Typography","variant","TypographyVariant","B2","lineClamp","hotelName","color","B3","userRating","P3","starRating","locality","HM4","formatCurrency","perNightPrice","isStriked","B4","slashedPrice","Banner","CheckIcon","HRecommendationsWidget","data","maxCardsCount","recommendationCards","useMemo","dummyArray","Array","from","length","_","index","recommendations","hRecoCardsWrapper","map","val","hRecoCardWrapper","RecommendationCard","redirectToSRP","url","pageLandingUrl","hRecoWrapper","hRecoSidebar","connectedLine","dottedLine","sidebarCircle","hRecoMainWrapper","hRecoHeader","padding","marginBottom","hRecoHeaderTextLoader","hRecoBookingCallout","bookingCallOut","hRecoOfferCallout","B4CAPS","offerCallOut","hRecoCouponCallout","couponCallOut","hRecoContent","Button","disabled","ButtonVariant","OUTLINE","exploreButton","vertical","fallbackPageLandingURL","props","__rest","useState","_c","setData","formatResponse","recommendationRes","useEffect","getHotelCrossSellRecos","then","formattedData","setTimeout","ThemeProvider"],"mappings":"ySAAA,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,gvDCjBA,IAAMe,EAAmD,SAACC,GACtD,IAAAC,YACAC,EAAAF,EAAAG,SAAAA,OAAQ,IAAAD,EAAG,MAAKA,EAEhB,OACIE,EACIC,KAAA,MAAAC,WAAA,CAAAC,UAAW,GAAAC,OAAGC,EAAuB,KAAAD,OAAIC,EAAyB,KAAAD,OAAIP,EAAU,GAAKQ,IAErF,CAAAC,SAAA,CAAAC,EAAAC,IAAA,MAAA,CACIC,MAAO,IACPC,OAAQ,IACRC,cAAeZ,EACfa,ICZZ,0GDaYC,IAAI,qCAERb,EAAKC,KAAA,MAAAC,EAAAA,SAAA,CAAAC,UAAWE,GACZ,CAAAC,SAAA,CAAAN,EAAAA,KA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,CAAA0B,QAASC,EAAAA,kBAAkBO,GAC3BL,UAAW,EACXE,MAAM,cAAY,CAAA3B,SAAA,CAEjBU,aAAA,EAAAA,EAAYqB,WAA2B,kBAAA,IACvCrB,aAAU,EAAVA,EAAYsB,iBAGrBtC,EAAAA,KAAK,MAAAE,WAAA,CAAAC,UAAWE,GAAwB,CAAAC,SAAA,CACpCN,EAACC,KAAA0B,yBAAWC,QAASC,EAAAA,kBAAkBU,KAAG,CAAAjC,SAAA,CACrCkC,iBAAevB,aAAA,EAAAA,EAAawB,uBAEjClC,MAACoB,EAAAA,WACGzB,EAAAA,SAAA,CAAAwC,WAAW,EACXT,MAAM,aACNL,QAASC,EAAAA,kBAAkBc,IAE1B,CAAArC,SAAAkC,EAAAA,eAAevB,eAAAA,EAAa2B,cAAc,MAE/CrC,EAACC,IAAAmB,aAAWzB,EAAAA,SAAA,CAAA0B,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/Banner/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,null],"names":["styleInject","css","ref","insertAt","document","head","getElementsByTagName","style","createElement","type","firstChild","insertBefore","appendChild","styleSheet","cssText","createTextNode","CardLoader","_a","loading","_b","priority","_jsxs","jsxs","__assign","className","concat","styles","children","_jsx","jsx","width","height","fetchPriority","src","alt","Card","heroImage","staticData","pricingData","imgPriority","hotelLandingUrl","handleCardClick","useCallback","window","location","href","onClick","mediaUrl","Typography","variant","TypographyVariant","B2","lineClamp","hotelName","color","B3","userRating","P3","starRating","locality","HM4","formatCurrency","perNightPrice","isStriked","B4","slashedPrice","Banner","CheckIcon","HRecommendationsWidget","data","maxCardsCount","recommendationCards","useMemo","dummyArray","Array","from","length","_","index","recommendations","hRecoCardsWrapper","map","val","hRecoCardWrapper","RecommendationCard","redirectToSRP","url","pageLandingUrl","hRecoWrapper","hRecoSidebar","connectedLine","dottedLine","sidebarCircle","hRecoMainWrapper","hRecoHeader","padding","marginBottom","hRecoHeaderTextLoader","hRecoBookingCallout","bookingCallOut","hRecoOfferCallout","B4CAPS","offerCallOut","hRecoCouponCallout","couponCallOut","hRecoContent","Button","disabled","ButtonVariant","OUTLINE","exploreButton","vertical","fallbackPageLandingURL","props","__rest","useState","_c","setData","formatResponse","recommendationRes","useEffect","getHotelCrossSellRecos","then","formattedData","setTimeout","ThemeProvider"],"mappings":"ySAAA,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,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AnF,SAAA,+BAQvD,uCCnJsE,SAACV,GACnE,IAAA2B,EAAQ3B,EAAA2B,SACRzB,EAAgBF,EAAA8F,SAAhBA,OAAW,IAAA5F,EAAA,MAAKA,EAChB6F,EAAsB/F,EAAA+F,uBACnBC,EAAKC,EAAAA,OAAAjG,EAJ2D,kDAM5DC,EAAWiG,EAAQA,UAAU,MAC9BC,EAAkBD,aAAjB9C,EAAI+C,EAAA,GAAEC,EAAOD,EAAA,GAIdE,EAAiB5E,eACnB,SACI6E,SAEA,OAAAhG,EAAAA,SAAAA,EAAAA,SAAA,CAAA,EACOgG,GAAiB,CACpBpB,eAAgBvD,EACV,2BAA2BnB,OAAAmB,EAAW,KACtC,qCACNmC,gBAAsD,QAArC9D,EAAAsG,EAAkBxC,uBAAmB,IAAA9D,EAAAA,EAAA,IAE7D,GACD,IAiBJ,OAdAuG,EAAAA,WAAU,WACNC,EAAAA,uBAAuBV,EAAUC,GAAwBU,MACrD,SAACrD,GACG,IAAMsD,EAAgBL,EAAejD,GACrCgD,EAAQM,GAGRC,YAAW,WAEV,GAAE,GACP,GAEP,GAAE,IAGChG,EAAAA,IAACiG,EAAAA,wBACGjG,EAACC,IAAAuC,cACGC,KAAMA,EACNnD,QAASA,GACL+F,KAIpB","x_google_ignoreList":[0]}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{__assign as e,__rest as i}from"tslib";import{jsxs as o,jsx as d}from"react/jsx-runtime";import{useCallback as a,useMemo as r,useState as n,useEffect as t}from"react";import{Button as l,ButtonVariant as c}from"@cleartrip/ct-design-button";import{Typography as p,TypographyVariant as h}from"@cleartrip/ct-design-typography";import{formatCurrency as m,getHotelCrossSellRecos as s}from"@cleartrip/ct-platform-utils";import{CheckIcon as _}from"@cleartrip/ct-platform-assets";import{ThemeProvider as u}from"@cleartrip/ct-design-theme";function x(e,i){void 0===i&&(i={});var o=i.insertAt;if(e&&"undefined"!=typeof document){var d=document.head||document.getElementsByTagName("head")[0],a=document.createElement("style");a.type="text/css","top"===o&&d.firstChild?d.insertBefore(a,d.firstChild):d.appendChild(a),a.styleSheet?a.styleSheet.cssText=e:a.appendChild(document.createTextNode(e))}}var g="index-module_hRecoCardWrapper__FhtJN",f="index-module_hRecoInfoWrapper__4EAyB",v="index-module_hRecoTitleRow__97dd5",R="index-module_hRecoRatingWrapper__mGwia",b="index-module_hRecoPriceWrapper__49o5u",y="index-module_hRecoLoaderWrapper__KXG-6",C="index-module_hidden__CdBrr",w="index-module_hRecoLoaderGradient__c7400",N="index-module_hRecoLoaderTitleRow__cWktU",L="index-module_hRecoLoaderTitle__-Onou",B="index-module_hRecoLoaderRating__Qy5b-",W="index-module_hRecoLoaderSubtitle__l1X3H",k="index-module_hRecoLoaderPricing__KsQ-o";x(".index-module_hRecoCardWrapper__FhtJN{background:#fff;border-radius:16px;height:180px;overflow:hidden;width:200px}.index-module_hRecoInfoWrapper__4EAyB{padding:8px 8px 0}.index-module_hRecoTitleRow__97dd5{display:flex;justify-content:space-between}.index-module_hRecoRatingWrapper__mGwia{align-items:center;background-color:#ecf3ff;border-radius:4px;display:flex;padding:0 4px}.index-module_hRecoPriceWrapper__49o5u{align-items:baseline;display:flex;padding:4px 8px 8px}.index-module_hRecoLoaderWrapper__KXG-6{opacity:1;position:absolute;top:0;transition:opacity .15s ease-in-out}.index-module_hRecoLoaderWrapper__KXG-6.index-module_hidden__CdBrr{opacity:0}.index-module_hRecoLoaderGradient__c7400{background:linear-gradient(90deg,#f1efef -24.18%,#f9f8f8 50.26%,#e7e5e5 114.84%)}.index-module_hRecoLoaderTitleRow__cWktU{align-items:center;display:flex;margin-bottom:4px}.index-module_hRecoLoaderTitle__-Onou{border-radius:6px;height:20px;width:152px}.index-module_hRecoLoaderRating__Qy5b-{border-radius:6px;height:16px;margin-left:8px;width:20px}.index-module_hRecoLoaderSubtitle__l1X3H{border-radius:4px;height:8px;margin-bottom:8px;width:138px}.index-module_hRecoLoaderPricing__KsQ-o{border-radius:6px;height:16px;width:120px}");var P=function(i){var a=i.loading,r=i.priority,n=void 0===r?"low":r;return o("div",e({className:"".concat(g," ").concat(y," ").concat(a?"":C)},{children:[d("img",{width:200,height:104,fetchPriority:n,src:"https://fastui.cltpstatic.com/image/upload/f_auto,q_auto/offermgmt/images/banner/Image-placholder-1.jpg",alt:"Hotel recommendation placeholder"}),o("div",e({className:f},{children:[o("div",e({className:N},{children:[d("div",{className:"".concat(L," ").concat(w)}),d("div",{className:"".concat(B," ").concat(w)})]})),d("div",{className:"".concat(W," ").concat(w)}),d("div",{className:"".concat(k," ").concat(w)})]}))]}))},H=function(i){var r=i.heroImage,n=i.staticData,t=i.pricingData,l=i.imgPriority,c=i.hotelLandingUrl,s=a((function(){c&&(window.location.href=c)}),[c]);return o("div",e({className:g,onClick:s},{children:[d("img",{width:200,height:104,src:r.mediaUrl,fetchPriority:l}),o("div",e({className:f},{children:[o("div",e({className:v},{children:[d(p,e({variant:h.B2,lineClamp:1},{children:null==n?void 0:n.hotelName})),d("div",e({className:R},{children:d(p,e({color:"link",variant:h.B3},{children:null==n?void 0:n.userRating}))}))]})),o(p,e({variant:h.P3,lineClamp:1,color:"subheading"},{children:[null==n?void 0:n.starRating," stars hotel in"," ",null==n?void 0:n.locality]}))]})),o("div",e({className:b},{children:[o(p,e({variant:h.HM4},{children:[m(null==t?void 0:t.perNightPrice)," "]})),d(p,e({isStriked:!0,color:"subheading",variant:h.B4},{children:m(null==t?void 0:t.slashedPrice,!1)})),d(p,e({variant:h.B4,color:"subheading"},{children:" / night"}))]}))]}))},T={hRecoWrapper:"index-module_hRecoWrapper__AeUoH",hRecoHeader:"index-module_hRecoHeader__5xuYV",hRecoContent:"index-module_hRecoContent__0kDhm",hRecoSidebar:"index-module_hRecoSidebar__UjWWx",connectedLine:"index-module_connectedLine__Z9VpQ",dottedLine:"index-module_dottedLine__6K0LJ",hRecoCardsWrapper:"index-module_hRecoCardsWrapper__tc4sW",hRecoCardWrapper:"index-module_hRecoCardWrapper__5lhlY",hRecoOfferCallout:"index-module_hRecoOfferCallout__FBOgY",hRecoCouponCallout:"index-module_hRecoCouponCallout__77bdL",hRecoBookingCallout:"index-module_hRecoBookingCallout__GGryo",exploreButton:"index-module_exploreButton__--vcq",sidebarCircle:"index-module_sidebarCircle__-dZZH",hRecoHeaderTextLoader:"index-module_hRecoHeaderTextLoader__tyYPe"};x(".index-module_hRecoWrapper__AeUoH{background:linear-gradient(215deg,#e5fce3 8%,#fff 85.78%);display:flex;padding:16px 0;position:relative}.index-module_hRecoHeader__5xuYV{left:8px;position:relative}.index-module_hRecoContent__0kDhm{left:0;position:absolute;width:100%}.index-module_hRecoSidebar__UjWWx{align-items:center;display:flex;flex-direction:column;padding-left:12px}.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:268px;left:-.5px;opacity:.5;position:relative}.index-module_hRecoCardsWrapper__tc4sW{-ms-overflow-style:none;display:flex;height:180px;overflow:auto;padding:0 16px 16px 40px;scrollbar-width:none;width:calc(100% - 56px)}.index-module_hRecoCardWrapper__5lhlY{border-radius:16px;box-shadow:0 4px 16px 0 rgba(26,26,26,.08);margin-right:12px;min-width:200px;position:relative}.index-module_hRecoCardWrapper__5lhlY:last-child{margin-right:0}.index-module_hRecoCardsWrapper__tc4sW::-webkit-scrollbar{display:none}.index-module_hRecoOfferCallout__FBOgY{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_hRecoCouponCallout__77bdL{padding:8px 0 20px}.index-module_hRecoBookingCallout__GGryo{padding-bottom:16px}.index-module_exploreButton__--vcq{left:40px;margin-top:8px;position:relative;width:calc(100% - 56px)}.index-module_sidebarCircle__-dZZH{border:1px solid #1a1a1a;border-radius:50%;height:8px;margin-top:4px;width:8px}.index-module_hRecoHeaderTextLoader__tyYPe{background:linear-gradient(90deg,#f1efef -24.18%,#f9f8f8 50.26%,#e7e5e5 114.84%);border-radius:4px}");var U="index-module_hRecoBanner__CyUB8",O="index-module_hRecoBannerIcon__cFmbk",S="index-module_hRecoBannerTextsWrapper__0P-pK",G="index-module_hRecoBannerTextRow__qbE8k",I="index-module_hRecoBannerImg__eC0hA";x(".index-module_hRecoBanner__CyUB8{aspect-ratio:304/180;background:#fff;border-radius:16px;box-shadow:0 4px 16px 0 rgba(26,26,26,.08);display:flex;height:180px;margin:0 16px 24px 40px;width:calc(100% - 56px)}.index-module_hRecoBannerIcon__cFmbk{margin-right:8px;min-width:16px;padding-top:1px}.index-module_hRecoBannerTextsWrapper__0P-pK{display:flex;flex-direction:column;justify-content:center;padding:18px 8px 18px 12px}.index-module_hRecoBannerTextRow__qbE8k{display:flex;padding-bottom:16px}.index-module_hRecoBannerTextRow__qbE8k:last-of-type{padding-bottom:0}.index-module_hRecoBannerImg__eC0hA{height:100%}");var A=function(){return o("div",e({className:U},{children:[o("div",e({className:S},{children:[o("div",e({className:G},{children:[d(_,{className:O}),d(p,e({variant:h.P3},{children:"Free cancellation till check-in time"}))]})),o("div",e({className:G},{children:[d(_,{className:O}),d(p,e({variant:h.P3},{children:"Exclusive member discount for Flipkart & Myntra"}))]})),o("div",e({className:G},{children:[d(_,{className:O}),d(p,e({variant:h.P3},{children:"Earn and redeem SuperCoins"}))]}))]})),d("img",{src:"https://fastui.cltpstatic.com/image/upload/f_auto,q_auto,w_274,h_360/offermgmt/images/Hero-Image.png",className:I})]}))},E=function(i){var n=i.data,t=i.loading,m=i.maxCardsCount,s=void 0===m?5:m,_=r((function(){var i,a=Array.from({length:s},(function(e,i){return i+1}));return t||(null===(i=null==n?void 0:n.recommendations)||void 0===i?void 0:i.length)?d("div",e({className:T.hRecoCardsWrapper},{children:a.map((function(i,a){var r,l;return o("div",e({className:T.hRecoCardWrapper},{children:[(null===(r=null==n?void 0:n.recommendations)||void 0===r?void 0:r[a])&&d(H,e({},null===(l=null==n?void 0:n.recommendations)||void 0===l?void 0:l[a],{imgPriority:0===a?"high":"auto"})),d(P,{loading:t,priority:0===a?"high":"auto"})]}),i)}))})):d(A,{})}),[n,t]),u=a((function(){var e=null==n?void 0:n.pageLandingUrl;e&&(window.location.href=e)}),[n]);return o("div",e({className:T.hRecoWrapper},{children:[o("div",e({className:T.hRecoSidebar},{children:[d("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"}),d("div",{className:T.connectedLine}),d("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"}),d("div",{className:T.dottedLine}),d("div",{className:T.sidebarCircle})]})),o("div",e({className:T.hRecoMainWrapper},{children:[o("div",e({className:T.hRecoHeader},{children:[t?d("div",e({style:{padding:"4px 0",marginBottom:"16px"}},{children:d("div",{className:T.hRecoHeaderTextLoader,style:{height:"8px",width:"170px"}})})):d(p,e({variant:h.P3,className:T.hRecoBookingCallout},{children:null==n?void 0:n.bookingCallOut})),d("div",t?e({style:{padding:"8px 0 6px",marginBottom:"8px"}},{children:d("div",{className:T.hRecoHeaderTextLoader,style:{height:"18px",width:"270px"}})}):e({className:T.hRecoOfferCallout},{children:d(p,e({color:"success",variant:h.B4CAPS},{children:null==n?void 0:n.offerCallOut}))})),t?d("div",e({style:{marginBottom:"24px"}},{children:d("div",{className:T.hRecoHeaderTextLoader,style:{height:"16px",width:"260px"}})})):d(p,e({variant:h.HM4,className:T.hRecoCouponCallout},{children:null==n?void 0:n.couponCallOut}))]})),o("div",e({className:T.hRecoContent},{children:[_,d(l,e({disabled:t,onClick:u,variant:c.OUTLINE,className:T.exploreButton},{children:"Book hotel now"}))]}))]}))]}))},q=function(o){var r=o.location,l=o.vertical,c=void 0===l?"AIR":l,p=o.fallbackPageLandingURL,h=i(o,["location","vertical","fallbackPageLandingURL"]),m=n(!0)[0],_=n(),x=_[0],g=_[1],f=a((function(i){var o;return e(e({},i),{bookingCallOut:r?"Since you are flying to ".concat(r,"!"):"Since you are flying for your trip",recommendations:null!==(o=i.recommendations)&&void 0!==o?o:[]})}),[]);return t((function(){s(c,p).then((function(e){var i=f(e);g(i),setTimeout((function(){}),10)}))}),[]),d(u,{children:d(E,e({data:x,loading:m},h))})};export{q as HotelRecommendationContainer,E as HotelRecommendationsWidget};
|
|
1
|
+
import{__assign as e,__rest as i}from"tslib";import{jsxs as o,jsx as d}from"react/jsx-runtime";import{useCallback as a,useMemo as r,useState as n,useEffect as t}from"react";import{Button as l,ButtonVariant as c}from"@cleartrip/ct-design-button";import{Typography as p,TypographyVariant as h}from"@cleartrip/ct-design-typography";import{formatCurrency as m,getHotelCrossSellRecos as s}from"@cleartrip/ct-platform-utils";import{CheckIcon as _}from"@cleartrip/ct-platform-assets";import{ThemeProvider as u}from"@cleartrip/ct-design-theme";function x(e,i){void 0===i&&(i={});var o=i.insertAt;if(e&&"undefined"!=typeof document){var d=document.head||document.getElementsByTagName("head")[0],a=document.createElement("style");a.type="text/css","top"===o&&d.firstChild?d.insertBefore(a,d.firstChild):d.appendChild(a),a.styleSheet?a.styleSheet.cssText=e:a.appendChild(document.createTextNode(e))}}var g="index-module_hRecoCardWrapper__FhtJN",f="index-module_hRecoInfoWrapper__4EAyB",v="index-module_hRecoTitleRow__97dd5",R="index-module_hRecoRatingWrapper__mGwia",b="index-module_hRecoPriceWrapper__49o5u",y="index-module_hRecoLoaderWrapper__KXG-6",C="index-module_hidden__CdBrr",w="index-module_hRecoLoaderGradient__c7400",N="index-module_hRecoLoaderTitleRow__cWktU",L="index-module_hRecoLoaderTitle__-Onou",B="index-module_hRecoLoaderRating__Qy5b-",W="index-module_hRecoLoaderSubtitle__l1X3H",k="index-module_hRecoLoaderPricing__KsQ-o";x(".index-module_hRecoCardWrapper__FhtJN{background:#fff;border-radius:16px;height:180px;overflow:hidden;width:200px}.index-module_hRecoInfoWrapper__4EAyB{padding:8px 8px 0}.index-module_hRecoTitleRow__97dd5{display:flex;justify-content:space-between}.index-module_hRecoRatingWrapper__mGwia{align-items:center;background-color:#ecf3ff;border-radius:4px;display:flex;padding:0 4px}.index-module_hRecoPriceWrapper__49o5u{align-items:baseline;display:flex;padding:4px 8px 8px}.index-module_hRecoLoaderWrapper__KXG-6{opacity:1;position:absolute;top:0;transition:opacity .15s ease-in-out}.index-module_hRecoLoaderWrapper__KXG-6.index-module_hidden__CdBrr{opacity:0}.index-module_hRecoLoaderGradient__c7400{background:linear-gradient(90deg,#f1efef -24.18%,#f9f8f8 50.26%,#e7e5e5 114.84%)}.index-module_hRecoLoaderTitleRow__cWktU{align-items:center;display:flex;margin-bottom:4px}.index-module_hRecoLoaderTitle__-Onou{border-radius:6px;height:20px;width:152px}.index-module_hRecoLoaderRating__Qy5b-{border-radius:6px;height:16px;margin-left:8px;width:20px}.index-module_hRecoLoaderSubtitle__l1X3H{border-radius:4px;height:8px;margin-bottom:8px;width:138px}.index-module_hRecoLoaderPricing__KsQ-o{border-radius:6px;height:16px;width:120px}");var P=function(i){var a=i.loading,r=i.priority,n=void 0===r?"low":r;return o("div",e({className:"".concat(g," ").concat(y," ").concat(a?"":C)},{children:[d("img",{width:200,height:104,fetchPriority:n,src:"https://fastui.cltpstatic.com/image/upload/f_auto,q_auto/offermgmt/images/banner/Image-placholder-1.jpg",alt:"Hotel recommendation placeholder"}),o("div",e({className:f},{children:[o("div",e({className:N},{children:[d("div",{className:"".concat(L," ").concat(w)}),d("div",{className:"".concat(B," ").concat(w)})]})),d("div",{className:"".concat(W," ").concat(w)}),d("div",{className:"".concat(k," ").concat(w)})]}))]}))},H=function(i){var r=i.heroImage,n=i.staticData,t=i.pricingData,l=i.imgPriority,c=i.hotelLandingUrl,s=a((function(){c&&(window.location.href=c)}),[c]);return o("div",e({className:g,onClick:s},{children:[d("img",{width:200,height:104,src:r.mediaUrl,fetchPriority:l}),o("div",e({className:f},{children:[o("div",e({className:v},{children:[d(p,e({variant:h.B2,lineClamp:1},{children:null==n?void 0:n.hotelName})),d("div",e({className:R},{children:d(p,e({color:"link",variant:h.B3},{children:null==n?void 0:n.userRating}))}))]})),o(p,e({variant:h.P3,lineClamp:1,color:"subheading"},{children:[null==n?void 0:n.starRating," stars hotel in"," ",null==n?void 0:n.locality]}))]})),o("div",e({className:b},{children:[o(p,e({variant:h.HM4},{children:[m(null==t?void 0:t.perNightPrice)," "]})),d(p,e({isStriked:!0,color:"subheading",variant:h.B4},{children:m(null==t?void 0:t.slashedPrice,!1)})),d(p,e({variant:h.B4,color:"subheading"},{children:" / night"}))]}))]}))},T={hRecoWrapper:"index-module_hRecoWrapper__AeUoH",hRecoHeader:"index-module_hRecoHeader__5xuYV",hRecoContent:"index-module_hRecoContent__0kDhm",hRecoSidebar:"index-module_hRecoSidebar__UjWWx",connectedLine:"index-module_connectedLine__Z9VpQ",dottedLine:"index-module_dottedLine__6K0LJ",hRecoCardsWrapper:"index-module_hRecoCardsWrapper__tc4sW",hRecoCardWrapper:"index-module_hRecoCardWrapper__5lhlY",hRecoOfferCallout:"index-module_hRecoOfferCallout__FBOgY",hRecoCouponCallout:"index-module_hRecoCouponCallout__77bdL",hRecoBookingCallout:"index-module_hRecoBookingCallout__GGryo",exploreButton:"index-module_exploreButton__--vcq",sidebarCircle:"index-module_sidebarCircle__-dZZH",hRecoHeaderTextLoader:"index-module_hRecoHeaderTextLoader__tyYPe"};x(".index-module_hRecoWrapper__AeUoH{background:linear-gradient(215deg,#e5fce3 8%,#fff 85.78%);display:flex;padding:16px 0;position:relative}.index-module_hRecoHeader__5xuYV{left:8px;position:relative}.index-module_hRecoContent__0kDhm{left:0;position:absolute;width:100%}.index-module_hRecoSidebar__UjWWx{align-items:center;display:flex;flex-direction:column;padding-left:12px}.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:268px;left:-.5px;opacity:.5;position:relative}.index-module_hRecoCardsWrapper__tc4sW{-ms-overflow-style:none;box-sizing:content-box;display:flex;height:180px;overflow:auto;padding:0 16px 16px 40px;scrollbar-width:none;width:calc(100% - 56px)}.index-module_hRecoCardWrapper__5lhlY{border-radius:16px;box-shadow:0 4px 16px 0 rgba(26,26,26,.08);margin-right:12px;min-width:200px;position:relative}.index-module_hRecoCardWrapper__5lhlY:last-child{margin-right:0}.index-module_hRecoCardsWrapper__tc4sW::-webkit-scrollbar{display:none}.index-module_hRecoOfferCallout__FBOgY{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_hRecoCouponCallout__77bdL{padding:8px 0 20px}.index-module_hRecoBookingCallout__GGryo{padding-bottom:16px}.index-module_exploreButton__--vcq{left:40px;margin-top:8px;position:relative;width:calc(100% - 56px)}.index-module_sidebarCircle__-dZZH{border:1px solid #1a1a1a;border-radius:50%;height:8px;margin-top:4px;width:8px}.index-module_hRecoHeaderTextLoader__tyYPe{background:linear-gradient(90deg,#f1efef -24.18%,#f9f8f8 50.26%,#e7e5e5 114.84%);border-radius:4px}");var U="index-module_hRecoBanner__CyUB8",O="index-module_hRecoBannerIcon__cFmbk",S="index-module_hRecoBannerTextsWrapper__0P-pK",G="index-module_hRecoBannerTextRow__qbE8k",I="index-module_hRecoBannerImg__eC0hA";x(".index-module_hRecoBanner__CyUB8{aspect-ratio:304/180;background:#fff;border-radius:16px;box-shadow:0 4px 16px 0 rgba(26,26,26,.08);display:flex;height:180px;margin:0 16px 24px 40px;width:calc(100% - 56px)}.index-module_hRecoBannerIcon__cFmbk{margin-right:8px;min-width:16px;padding-top:1px}.index-module_hRecoBannerTextsWrapper__0P-pK{display:flex;flex-direction:column;justify-content:center;padding:18px 8px 18px 12px}.index-module_hRecoBannerTextRow__qbE8k{display:flex;padding-bottom:16px}.index-module_hRecoBannerTextRow__qbE8k:last-of-type{padding-bottom:0}.index-module_hRecoBannerImg__eC0hA{height:100%}");var A=function(){return o("div",e({className:U},{children:[o("div",e({className:S},{children:[o("div",e({className:G},{children:[d(_,{className:O}),d(p,e({variant:h.P3},{children:"Free cancellation till check-in time"}))]})),o("div",e({className:G},{children:[d(_,{className:O}),d(p,e({variant:h.P3},{children:"Exclusive member discount for Flipkart & Myntra"}))]})),o("div",e({className:G},{children:[d(_,{className:O}),d(p,e({variant:h.P3},{children:"Earn and redeem SuperCoins"}))]}))]})),d("img",{src:"https://fastui.cltpstatic.com/image/upload/f_auto,q_auto,w_274,h_360/offermgmt/images/Hero-Image.png",className:I})]}))},E=function(i){var n=i.data,t=i.loading,m=i.maxCardsCount,s=void 0===m?5:m,_=r((function(){var i,a=Array.from({length:s},(function(e,i){return i+1}));return t||(null===(i=null==n?void 0:n.recommendations)||void 0===i?void 0:i.length)?d("div",e({className:T.hRecoCardsWrapper},{children:a.map((function(i,a){var r,l;return o("div",e({className:T.hRecoCardWrapper},{children:[(null===(r=null==n?void 0:n.recommendations)||void 0===r?void 0:r[a])&&d(H,e({},null===(l=null==n?void 0:n.recommendations)||void 0===l?void 0:l[a],{imgPriority:0===a?"high":"auto"})),d(P,{loading:t,priority:0===a?"high":"auto"})]}),i)}))})):d(A,{})}),[n,t]),u=a((function(){var e=null==n?void 0:n.pageLandingUrl;e&&(window.location.href=e)}),[n]);return o("div",e({className:T.hRecoWrapper},{children:[o("div",e({className:T.hRecoSidebar},{children:[d("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"}),d("div",{className:T.connectedLine}),d("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"}),d("div",{className:T.dottedLine}),d("div",{className:T.sidebarCircle})]})),o("div",e({className:T.hRecoMainWrapper},{children:[o("div",e({className:T.hRecoHeader},{children:[t?d("div",e({style:{padding:"4px 0",marginBottom:"16px"}},{children:d("div",{className:T.hRecoHeaderTextLoader,style:{height:"8px",width:"170px"}})})):d(p,e({variant:h.P3,className:T.hRecoBookingCallout},{children:null==n?void 0:n.bookingCallOut})),d("div",t?e({style:{padding:"8px 0 6px",marginBottom:"8px"}},{children:d("div",{className:T.hRecoHeaderTextLoader,style:{height:"18px",width:"270px"}})}):e({className:T.hRecoOfferCallout},{children:d(p,e({color:"success",variant:h.B4CAPS},{children:null==n?void 0:n.offerCallOut}))})),t?d("div",e({style:{marginBottom:"24px"}},{children:d("div",{className:T.hRecoHeaderTextLoader,style:{height:"16px",width:"260px"}})})):d(p,e({variant:h.HM4,className:T.hRecoCouponCallout},{children:null==n?void 0:n.couponCallOut}))]})),o("div",e({className:T.hRecoContent},{children:[_,d(l,e({disabled:t,onClick:u,variant:c.OUTLINE,className:T.exploreButton},{children:"Book hotel now"}))]}))]}))]}))},q=function(o){var r=o.location,l=o.vertical,c=void 0===l?"AIR":l,p=o.fallbackPageLandingURL,h=i(o,["location","vertical","fallbackPageLandingURL"]),m=n(!0)[0],_=n(),x=_[0],g=_[1],f=a((function(i){var o;return e(e({},i),{bookingCallOut:r?"Since you are flying to ".concat(r,"!"):"Since you are flying for your trip",recommendations:null!==(o=i.recommendations)&&void 0!==o?o:[]})}),[]);return t((function(){s(c,p).then((function(e){var i=f(e);g(i),setTimeout((function(){}),10)}))}),[]),d(u,{children:d(E,e({data:x,loading:m},h))})};export{q as HotelRecommendationContainer,E 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/Banner/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,null],"names":["styleInject","css","ref","insertAt","document","head","getElementsByTagName","style","createElement","type","firstChild","insertBefore","appendChild","styleSheet","cssText","createTextNode","CardLoader","_a","loading","_b","priority","_jsxs","__assign","className","concat","styles","children","_jsx","width","height","fetchPriority","src","alt","Card","heroImage","staticData","pricingData","imgPriority","hotelLandingUrl","handleCardClick","useCallback","window","location","href","onClick","mediaUrl","Typography","variant","TypographyVariant","B2","lineClamp","hotelName","color","B3","userRating","P3","starRating","locality","HM4","formatCurrency","perNightPrice","isStriked","B4","slashedPrice","Banner","CheckIcon","HRecommendationsWidget","data","maxCardsCount","recommendationCards","useMemo","dummyArray","Array","from","length","_","index","recommendations","hRecoCardsWrapper","map","val","hRecoCardWrapper","RecommendationCard","redirectToSRP","url","pageLandingUrl","hRecoWrapper","hRecoSidebar","connectedLine","dottedLine","sidebarCircle","hRecoMainWrapper","hRecoHeader","padding","marginBottom","hRecoHeaderTextLoader","hRecoBookingCallout","bookingCallOut","hRecoOfferCallout","B4CAPS","offerCallOut","hRecoCouponCallout","couponCallOut","hRecoContent","Button","disabled","ButtonVariant","OUTLINE","exploreButton","HRecommendations","vertical","fallbackPageLandingURL","props","__rest","useState","_c","setData","formatResponse","recommendationRes","useEffect","getHotelCrossSellRecos","then","formattedData","setTimeout","ThemeProvider"],"mappings":"whBAAA,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,gvDCjBA,IAAMe,EAAmD,SAACC,GACtD,IAAAC,YACAC,EAAAF,EAAAG,SAAAA,OAAQ,IAAAD,EAAG,MAAKA,EAEhB,OACIE,EACI,MAAAC,EAAA,CAAAC,UAAW,GAAAC,OAAGC,EAAuB,KAAAD,OAAIC,EAAyB,KAAAD,OAAIN,EAAU,GAAKO,IAErF,CAAAC,SAAA,CAAAC,EAAA,MAAA,CACIC,MAAO,IACPC,OAAQ,IACRC,cAAeV,EACfW,ICZZ,0GDaYC,IAAI,qCAERX,EAAK,MAAAC,EAAA,CAAAC,UAAWE,GACZ,CAAAC,SAAA,CAAAL,EAAA,MAAAC,EAAA,CAAKC,UAAWE,GACZ,CAAAC,SAAA,CAAAC,EAAA,MAAA,CACIJ,UAAW,GAAGC,OAAAC,EAA2B,KAAAD,OAAAC,KAE7CE,EAAA,MAAA,CACIJ,UAAW,GAAGC,OAAAC,EAA4B,KAAAD,OAAAC,SAGlDE,EACI,MAAA,CAAAJ,UAAW,GAAAC,OAAGC,EAA0B,KAAAD,OAAIC,KAEhDE,EACI,MAAA,CAAAJ,UAAW,GAAAC,OAAGC,EAAyB,KAAAD,OAAIC,YAK/D,EEhCMQ,EAA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AAkBc,GAAIV,MAAM,cAEpC,CAAA1B,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/Banner/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,null],"names":["styleInject","css","ref","insertAt","document","head","getElementsByTagName","style","createElement","type","firstChild","insertBefore","appendChild","styleSheet","cssText","createTextNode","CardLoader","_a","loading","_b","priority","_jsxs","__assign","className","concat","styles","children","_jsx","width","height","fetchPriority","src","alt","Card","heroImage","staticData","pricingData","imgPriority","hotelLandingUrl","handleCardClick","useCallback","window","location","href","onClick","mediaUrl","Typography","variant","TypographyVariant","B2","lineClamp","hotelName","color","B3","userRating","P3","starRating","locality","HM4","formatCurrency","perNightPrice","isStriked","B4","slashedPrice","Banner","CheckIcon","HRecommendationsWidget","data","maxCardsCount","recommendationCards","useMemo","dummyArray","Array","from","length","_","index","recommendations","hRecoCardsWrapper","map","val","hRecoCardWrapper","RecommendationCard","redirectToSRP","url","pageLandingUrl","hRecoWrapper","hRecoSidebar","connectedLine","dottedLine","sidebarCircle","hRecoMainWrapper","hRecoHeader","padding","marginBottom","hRecoHeaderTextLoader","hRecoBookingCallout","bookingCallOut","hRecoOfferCallout","B4CAPS","offerCallOut","hRecoCouponCallout","couponCallOut","hRecoContent","Button","disabled","ButtonVariant","OUTLINE","exploreButton","HRecommendations","vertical","fallbackPageLandingURL","props","__rest","useState","_c","setData","formatResponse","recommendationRes","useEffect","getHotelCrossSellRecos","then","formattedData","setTimeout","ThemeProvider"],"mappings":"whBAAA,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,gvDCjBA,IAAMe,EAAmD,SAACC,GACtD,IAAAC,YACAC,EAAAF,EAAAG,SAAAA,OAAQ,IAAAD,EAAG,MAAKA,EAEhB,OACIE,EACI,MAAAC,EAAA,CAAAC,UAAW,GAAAC,OAAGC,EAAuB,KAAAD,OAAIC,EAAyB,KAAAD,OAAIN,EAAU,GAAKO,IAErF,CAAAC,SAAA,CAAAC,EAAA,MAAA,CACIC,MAAO,IACPC,OAAQ,IACRC,cAAeV,EACfW,ICZZ,0GDaYC,IAAI,qCAERX,EAAK,MAAAC,EAAA,CAAAC,UAAWE,GACZ,CAAAC,SAAA,CAAAL,EAAA,MAAAC,EAAA,CAAKC,UAAWE,GACZ,CAAAC,SAAA,CAAAC,EAAA,MAAA,CACIJ,UAAW,GAAGC,OAAAC,EAA2B,KAAAD,OAAAC,KAE7CE,EAAA,MAAA,CACIJ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A3F,EAAA,MAAKA,EAChB4F,EAAsB9F,EAAA8F,uBACnBC,EAAKC,EAAAhG,EAJ2D,kDAM5DC,EAAWgG,GAAkB,MAC9BC,EAAkBD,IAAjB/C,EAAIgD,EAAA,GAAEC,EAAOD,EAAA,GAIdE,EAAiB7E,GACnB,SACI8E,SAEA,OAAAhG,EAAAA,EAAA,CAAA,EACOgG,GAAiB,CACpBrB,eAAgBvD,EACV,2BAA2BlB,OAAAkB,EAAW,KACtC,qCACNmC,gBAAsD,QAArC5D,EAAAqG,EAAkBzC,uBAAmB,IAAA5D,EAAAA,EAAA,IAE7D,GACD,IAiBJ,OAdAsG,GAAU,WACNC,EAAuBV,EAAUC,GAAwBU,MACrD,SAACtD,GACG,IAAMuD,EAAgBL,EAAelD,GACrCiD,EAAQM,GAGRC,YAAW,WAEV,GAAE,GACP,GAEP,GAAE,IAGChG,EAACiG,YACGjG,EAACuC,KACGC,KAAMA,EACNjD,QAASA,GACL8F,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.11",
|
|
4
4
|
"description": "Hotel Recommendations Component",
|
|
5
5
|
"types": "dist/index.d.ts",
|
|
6
6
|
"main": "dist/ct-platform-hotel-recommendations.cjs.js",
|
|
@@ -14,9 +14,9 @@
|
|
|
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-assets": "3.1.1-beta.
|
|
18
|
-
"@cleartrip/ct-platform-
|
|
19
|
-
"@cleartrip/ct-platform-
|
|
17
|
+
"@cleartrip/ct-platform-assets": "3.1.1-beta.8",
|
|
18
|
+
"@cleartrip/ct-platform-utils": "3.6.1-beta.8",
|
|
19
|
+
"@cleartrip/ct-platform-types": "3.2.1-beta.34"
|
|
20
20
|
},
|
|
21
21
|
"peerDependencies": {
|
|
22
22
|
"react": ">=16.8.0",
|