@cleartrip/ct-platform-book-zero-trip-widget 1.0.6-beta.5 → 1.0.6-beta.51

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,4 +1,4 @@
1
1
  import { IBookZeroTripCardProps } from '@cleartrip/ct-platform-types';
2
- declare const BookZeroTripCard: ({ card }: IBookZeroTripCardProps) => import("react/jsx-runtime").JSX.Element;
2
+ declare const BookZeroTripCard: ({ card, onPayNow, pageName, vertical, }: IBookZeroTripCardProps) => import("react/jsx-runtime").JSX.Element;
3
3
  export default BookZeroTripCard;
4
4
  //# sourceMappingURL=BookZeroTripCard.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"BookZeroTripCard.d.ts","sourceRoot":"","sources":["../packages/components/BookZeroTripWidget/src/BookZeroTripCard.tsx"],"names":[],"mappings":"AAMA,OAAO,EAAE,sBAAsB,EAAE,MAAM,8BAA8B,CAAC;AAWtE,QAAA,MAAM,gBAAgB,aAAc,sBAAsB,4CA+FzD,CAAC;AAEF,eAAe,gBAAgB,CAAC"}
1
+ {"version":3,"file":"BookZeroTripCard.d.ts","sourceRoot":"","sources":["../packages/components/BookZeroTripWidget/src/BookZeroTripCard.tsx"],"names":[],"mappings":"AAMA,OAAO,EAAE,sBAAsB,EAAE,MAAM,8BAA8B,CAAC;AActE,QAAA,MAAM,gBAAgB,4CAKnB,sBAAsB,4CAgJxB,CAAC;AAEF,eAAe,gBAAgB,CAAC"}
@@ -1,5 +1,5 @@
1
1
  import { IBookZeroTripWidgetProps } from '@cleartrip/ct-platform-types';
2
2
  import './index.scss';
3
- declare const BookZeroTripWidget: ({ title, cards, }: IBookZeroTripWidgetProps) => import("react/jsx-runtime").JSX.Element | null;
3
+ declare const BookZeroTripWidget: ({ title, cards, pageName, vertical, onPayNow, onImpression, hasBgColor, }: IBookZeroTripWidgetProps) => import("react/jsx-runtime").JSX.Element | null;
4
4
  export default BookZeroTripWidget;
5
5
  //# sourceMappingURL=BookZeroTripWidget.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"BookZeroTripWidget.d.ts","sourceRoot":"","sources":["../packages/components/BookZeroTripWidget/src/BookZeroTripWidget.tsx"],"names":[],"mappings":"AAOA,OAAO,EAEH,wBAAwB,EAC3B,MAAM,8BAA8B,CAAC;AAGtC,OAAO,cAAc,CAAC;AAUtB,QAAA,MAAM,kBAAkB,sBAGrB,wBAAwB,mDA+E1B,CAAC;AAEF,eAAe,kBAAkB,CAAC"}
1
+ {"version":3,"file":"BookZeroTripWidget.d.ts","sourceRoot":"","sources":["../packages/components/BookZeroTripWidget/src/BookZeroTripWidget.tsx"],"names":[],"mappings":"AAOA,OAAO,EACH,wBAAwB,EAG3B,MAAM,8BAA8B,CAAC;AAatC,OAAO,cAAc,CAAC;AAGtB,QAAA,MAAM,kBAAkB,8EAQrB,wBAAwB,mDAiI1B,CAAC;AAEF,eAAe,kBAAkB,CAAC"}
@@ -0,0 +1,6 @@
1
+ export declare const BOOK_ZERO_TRIP_CARD_HEIGHT = 157;
2
+ export declare const BOOK_ZERO_TRIP_CARD_WIDTH = 295;
3
+ export declare const BOOK_ZERO_DEFAULT_TITLE = "Complete your payment";
4
+ export declare const BOOK_ZERO_DEFAULT_STATUS = "Booked with \u20B90 payment";
5
+ export declare const BOOK_ZERO_TRIP_DETAILS_PREFIX_URL = "/hotels/trips";
6
+ //# sourceMappingURL=constants.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../packages/components/BookZeroTripWidget/src/constants.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,0BAA0B,MAAM,CAAC;AAC9C,eAAO,MAAM,yBAAyB,MAAM,CAAC;AAE7C,eAAO,MAAM,uBAAuB,0BAA0B,CAAC;AAC/D,eAAO,MAAM,wBAAwB,gCAA2B,CAAC;AAEjE,eAAO,MAAM,iCAAiC,kBAAkB,CAAC"}
@@ -1,2 +1,2 @@
1
- "use strict";var e=require("tslib"),i=require("react/jsx-runtime"),t=require("react"),n=require("@cleartrip/ct-platform-io-hoc"),a=require("@cleartrip/ct-platform-merch-carousel"),d=require("classnames"),o=require("@cleartrip/ct-design-typography"),r=require("@cleartrip/ct-design-button"),l=require("@cleartrip/ct-platform-assets"),s=require("@cleartrip/ct-platform-utils");function _(e){return e&&e.__esModule?e:{default:e}}var u=_(d);var c="index-module_bztContainer__eDkV4",x="index-module_bztWrapper__ISRXL",m="index-module_bztTitle__Gghfq",p="index-module_bztContentWrapper__YjHdZ",g="index-module_bztCard__nDyiw",h="index-module_bztCardTop__NsU0I",b="index-module_bztThumb__s-7EQ",f="index-module_bztCardTitle__BINAl",y="index-module_bztCardTextCol__wheg1",w="index-module_bztDivider__M-QEW",z="index-module_bztCardBottom__Tjcmq",v="index-module_bztPriceBlock__9GkVf",C="index-module_bztTextEllipsis__d3TSs",j="index-module_bztDateMuted__kS6-O",T="index-module_bztAmountLabel__OD-eO",N="index-module_bztCountdownRow__8Vniy",D="index-module_bztCountdownIcon__BltvK",k="index-module_bztCountdownLabel__cfr0-";!function(e,i){void 0===i&&(i={});var t=i.insertAt;if("undefined"!=typeof document){var n=document.head||document.getElementsByTagName("head")[0],a=document.createElement("style");a.type="text/css","top"===t&&n.firstChild?n.insertBefore(a,n.firstChild):n.appendChild(a),a.styleSheet?a.styleSheet.cssText=e:a.appendChild(document.createTextNode(e))}}(".index-module_bztContainer__eDkV4{height:100%;position:relative;width:100%}.index-module_bztWrapper__ISRXL{height:100%;padding:16px 0;width:100%}.index-module_bztTitle__Gghfq{color:#1a1a1a;font-size:16px;font-weight:600;line-height:22px;margin:0;padding-bottom:12px;padding-left:16px;width:100%}.index-module_bztContentWrapper__YjHdZ{position:relative;width:100%}.index-module_bztCard__nDyiw{background:#fff;border:1.17px solid rgba(26,26,26,.08);border-radius:16px;box-sizing:border-box;display:flex;flex-direction:column;height:157px;outline:none;overflow:hidden;padding:12px;width:295px}.index-module_bztCard__nDyiw:focus,.index-module_bztCard__nDyiw:focus-visible{outline:none}.index-module_bztCardTop__NsU0I{align-items:flex-start;display:flex;flex-direction:row;gap:8px;padding-bottom:12px}.index-module_bztCard__nDyiw .index-module_bztThumb__s-7EQ{background:#f2f2f2;border-radius:8px;flex-shrink:0;height:58px;max-height:58px;max-width:58px;object-fit:cover;width:58px}.index-module_bztCardTitle__BINAl{line-height:22px}.index-module_bztCardTextCol__wheg1{display:flex;flex:1;flex-direction:column;gap:4px;min-width:0}.index-module_bztDivider__M-QEW{border:0;border-top:1px dashed rgba(0,0,0,.1);margin:0 0 12px}.index-module_bztCardBottom__Tjcmq{align-items:flex-end;display:flex;flex-direction:row;gap:12px;justify-content:space-between}.index-module_bztPriceBlock__9GkVf{display:flex;flex-direction:column;gap:4px;min-width:0}.index-module_bztTextEllipsis__d3TSs{max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.index-module_bztDateMuted__kS6-O{color:grey}.index-module_bztAmountLabel__OD-eO{line-height:24px}.index-module_bztCountdownRow__8Vniy{align-items:center;display:flex;flex-direction:row;gap:4px;margin-bottom:4px}.index-module_bztCountdownIcon__BltvK{flex-shrink:0}.index-module_bztCountdownLabel__cfr0-{color:#cd1719}");var B=function(n){var a,d=n.card,_=d.metaData,c=d.landingUrl,x=t.useMemo((function(){return s.formatBookZeroStayDateRange(_.stayStartDate,_.stayEndDate)}),[_.stayStartDate,_.stayEndDate]),m=t.useMemo((function(){return s.formatBookZeroPaymentDueLabel(_.paymentExpiryTime)}),[_.paymentExpiryTime]),p=s.formatRemainingMsAsHoursCountdown(_.paymentExpiryTime),B=null!==(a=_.bookZeroStatusLabel)&&void 0!==a?a:"Booked with ₹0 payment";return i.jsxs("div",e.__assign({className:g},{children:[i.jsxs("div",e.__assign({className:h},{children:[i.jsx("img",{className:b,src:d.imageUrl,loading:"lazy"}),i.jsxs("div",e.__assign({className:y},{children:[i.jsx(o.Typography,e.__assign({variant:"L3",color:"success"},{children:B})),i.jsx(o.Typography,e.__assign({variant:"HM3",className:u.default(C,f)},{children:d.title})),x?i.jsx(o.Typography,e.__assign({variant:"B3",className:u.default(C,j)},{children:x})):null]}))]})),i.jsx("hr",{className:w}),i.jsxs("div",e.__assign({className:z},{children:[i.jsxs("div",e.__assign({className:v},{children:[i.jsx(o.Typography,e.__assign({variant:"HM2",className:T},{children:_.amountDueLabel})),p?i.jsxs("div",e.__assign({className:N},{children:[i.jsx(l.HourGlass,{className:D,"aria-hidden":!0}),i.jsx(o.Typography,e.__assign({variant:"B4",className:k},{children:p}))]})):i.jsx(o.Typography,e.__assign({variant:"L3"},{children:m}))]})),i.jsx(r.Button,e.__assign({variant:"contained",size:"medium",color:"secondary",onClick:function(){window.location.href=c}},{children:"Pay now"}))]}))]}))};exports.BookZeroTripWidget=function(d){var o=d.title,r=void 0===o?"Complete your payment":o,l=d.cards,s=t.useRef(!1),_=t.useCallback((function(){!s.current&&(null==l?void 0:l.length)&&(s.current=!0)}),[null==l?void 0:l.length]),u=t.useMemo((function(){return(null!=l?l:[]).map((function(i){return e.__assign(e.__assign({},i),{itemId:i.id,image:{url:i.imageUrl,alt:""}})}))}),[l]),g=!1,h=t.useCallback((function(){return{width:"auto",height:"auto"}}),[]),b=t.useCallback((function(e){var t=e.slideData;return i.jsx(B,{card:t})}),[]);return(null==l?void 0:l.length)?i.jsx(n.IntersectionObserverHOC,e.__assign({onIntersection:_},{children:i.jsx("section",e.__assign({className:c,"aria-label":r},{children:i.jsxs("div",e.__assign({className:x},{children:[i.jsx("div",e.__assign({className:m},{children:r})),i.jsx("div",e.__assign({className:p},{children:i.jsx(a.MerchCarousel,{isFreeSwipe:!1,isCentered:!1,isInfinite:!1,isAutoplay:!1,lazyLoad:!0,lazyWidget:g,isLoopAdditionalSlides:!0,showNavigation:!1,showPagination:!1,startingSlide:0,spacingBetween:12,slidesToDisplay:"auto",slides:u,getSlideStyles:h,renderSlideItem:b,styleConfig:{swipperWrapper:{paddingLeft:"16px",paddingRight:"16px"}}})}))]}))}))})):null};
1
+ "use strict";var e=require("tslib"),i=require("react/jsx-runtime"),n=require("react"),t=require("@cleartrip/ct-platform-io-hoc"),a=require("@cleartrip/ct-platform-merch-carousel"),o=require("@cleartrip/ct-platform-utils"),r=require("classnames"),l=require("@cleartrip/ct-design-typography"),d=require("@cleartrip/ct-design-button"),s=require("@cleartrip/ct-platform-assets"),_=require("@cleartrip/ct-platform-constants");function c(e){return e&&e.__esModule?e:{default:e}}var u=c(r);var p="index-module_bztContainer__eDkV4",m="index-module_bztWrapper__ISRXL",x="index-module_bztTitle__Gghfq",g="index-module_bztContentWrapper__YjHdZ",h="index-module_bztCard__nDyiw",f="index-module_bztCardTop__NsU0I",v="index-module_bztThumb__s-7EQ",b="index-module_bztCardTitle__BINAl",y="index-module_bztCardTextCol__wheg1",w="index-module_bztDivider__M-QEW",C="index-module_bztCardBottom__Tjcmq",T="index-module_bztPriceBlock__9GkVf",z="index-module_bztTextEllipsis__d3TSs",N="index-module_bztAmountLabel__OD-eO",E="index-module_bztCountdownRow__8Vniy",I="index-module_bztCountdownIcon__BltvK",D="index-module_bztCountdownLabel__cfr0-";!function(e,i){void 0===i&&(i={});var n=i.insertAt;if("undefined"!=typeof document){var t=document.head||document.getElementsByTagName("head")[0],a=document.createElement("style");a.type="text/css","top"===n&&t.firstChild?t.insertBefore(a,t.firstChild):t.appendChild(a),a.styleSheet?a.styleSheet.cssText=e:a.appendChild(document.createTextNode(e))}}(".index-module_bztContainer__eDkV4{height:100%;position:relative;width:100%}.index-module_bztWrapper__ISRXL{height:100%;padding:16px 0;width:100%}.index-module_bztTitle__Gghfq{font-size:16px;font-weight:600;line-height:22px;margin:0;padding-bottom:12px;padding-left:16px;width:100%}.index-module_bztContentWrapper__YjHdZ{position:relative;width:100%}.index-module_bztCard__nDyiw{background:#fff;border:1.17px solid rgba(26,26,26,.08);border-radius:16px;box-sizing:border-box;display:flex;flex-direction:column;height:100%;outline:none;overflow:hidden;padding:12px;width:100%}.index-module_bztCard__nDyiw:focus,.index-module_bztCard__nDyiw:focus-visible{outline:none}.index-module_bztCardTop__NsU0I{align-items:flex-start;display:flex;flex-direction:row;gap:8px;padding-bottom:12px}.index-module_bztCard__nDyiw .index-module_bztThumb__s-7EQ{background:#f2f2f2;border-radius:8px;flex-shrink:0;height:58px;max-height:58px;max-width:58px;object-fit:cover;width:58px}.index-module_bztCardTitle__BINAl{font-weight:600;line-height:22px}.index-module_bztCardTextCol__wheg1{display:flex;flex:1;flex-direction:column;gap:4px;min-width:0}.index-module_bztDivider__M-QEW{border:0;border-top:1px dashed rgba(0,0,0,.1);margin:0 0 12px}.index-module_bztCardBottom__Tjcmq{align-items:flex-end;display:flex;flex-direction:row;gap:12px;justify-content:space-between}.index-module_bztPriceBlock__9GkVf{display:flex;flex-direction:column;gap:4px;min-width:0}.index-module_bztTextEllipsis__d3TSs{max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.index-module_bztDateMuted__kS6-O{color:grey}.index-module_bztAmountLabel__OD-eO{line-height:24px}.index-module_bztCountdownRow__8Vniy{align-items:center;display:flex;flex-direction:row;gap:4px;margin-bottom:4px}.index-module_bztCountdownIcon__BltvK{flex-shrink:0}.index-module_bztCountdownLabel__cfr0-{color:#cd1719}");var R=function(t){var a=t.card,r=t.onPayNow,c=t.pageName,p=t.vertical,m=a.metaData,x=a.landingUrl,g=a.tripId,R=m||{},j=R.hotelImageUrl,A=R.packageImageUrl,O=R.travelDates,B=o.constructHotelImage(j||A||""),k=n.useMemo((function(){var e;return o.formatBookZeroStayDateRange(O.start,null!==(e=null==O?void 0:O.end)&&void 0!==e?e:"")}),[O.start,O.end]),P=n.useMemo((function(){return o.formatBookZeroPaymentDueLabel(m.paymentExpiry)}),[m.paymentExpiry]),L=o.formatRemainingMsAsHoursCountdown(m.paymentExpiry),S="₹".concat(Number(null==m?void 0:m.pendingAmount).toLocaleString("en-IN")),U="PENDING_PACKAGE_FD_JOURNEY"===a.type,q=U?a.subtitle:_.BOOK_ZERO_DEFAULT_STATUS,G=n.useCallback((function(e){var i=e.currentTarget;i.src=_.DEFAULT_IMAGE_URL,i.onerror=null}),[]);return i.jsxs("div",e.__assign({className:h,onClick:function(){if(g){var e=U?_.PACKAGE_FD_PREFIX_PAY_NOW_URL:_.BOOK_ZERO_TRIP_DETAILS_PREFIX_URL;window.location.href="".concat(e,"/").concat(g)}}},{children:[i.jsxs("div",e.__assign({className:f},{children:[i.jsx("img",{className:v,src:B,loading:"lazy",onError:G}),i.jsxs("div",e.__assign({className:y},{children:[i.jsx(l.Typography,e.__assign({variant:"L3",color:"success"},{children:q})),i.jsx(l.Typography,e.__assign({variant:"HM3",className:u.default(z,b)},{children:a.title})),k?i.jsx(l.Typography,e.__assign({variant:"B3",color:l.TypographyColor.SUBHEADING,className:u.default(z)},{children:k})):null]}))]})),i.jsx("hr",{className:w}),i.jsxs("div",e.__assign({className:C},{children:[i.jsxs("div",e.__assign({className:T},{children:[i.jsx(l.Typography,e.__assign({variant:"HM2",className:N},{children:S})),L?i.jsxs("div",e.__assign({className:E},{children:[i.jsx(s.HourGlass,{className:I,"aria-hidden":!0}),i.jsx(l.Typography,e.__assign({variant:"B4",className:D},{children:L}))]})):i.jsx(l.Typography,e.__assign({variant:"L3"},{children:P}))]})),i.jsx(d.Button,e.__assign({variant:"contained",size:"medium",color:"secondary",onClick:function(e){var i;e.stopPropagation();var n=o.mapBookZeroRavenEventActionName(p||"");if(n){var t={action_name:"pay_now_clicked",action_type:"click",page_name:c||"",platform:null===(i=o.getDevicePlatform())||void 0===i?void 0:i.toLowerCase(),vertical:p||"",last_page_name:"",h_trip_id:g||""};o.ravenSDKTrigger(n,t)}r&&r(),U?g&&(window.location.href="".concat(_.PACKAGE_FD_PREFIX_PAY_NOW_URL,"/").concat(g)):x&&(window.location.href=x)}},{children:"Pay now"}))]}))]}))};exports.BookZeroTripWidget=function(r){var l=r.title,d=void 0===l?_.BOOK_ZERO_DEFAULT_TITLE:l,s=r.cards,c=r.pageName,u=r.vertical,h=r.onPayNow,f=r.onImpression,v=r.hasBgColor,b=void 0!==v&&v,y=n.useRef(!1),w=n.useCallback((function(){!y.current&&(null==s?void 0:s.length)&&(y.current=!0,null==f||f(s.length),E(0))}),[null==s?void 0:s.length]),C=function(e){var i,n;return"PENDING_PACKAGE_FD_JOURNEY"===e.type?null===(i=null==e?void 0:e.metaData)||void 0===i?void 0:i.packageImageUrl:null===(n=null==e?void 0:e.metaData)||void 0===n?void 0:n.hotelImageUrl},T=n.useMemo((function(){return(null!=s?s:[]).map((function(i){return e.__assign(e.__assign({},i),{itemId:i.id,image:{url:C(i)||"",alt:""}})}))}),[s]),z=n.useCallback((function(){var i={background:"transparent",overflow:"hidden",borderRadius:"16px"};return 1===(null==s?void 0:s.length)?e.__assign({width:"100%",height:_.BOOK_ZERO_TRIP_CARD_HEIGHT},i):e.__assign({width:_.BOOK_ZERO_TRIP_CARD_WIDTH,height:_.BOOK_ZERO_TRIP_CARD_HEIGHT},i)}),[]),N=n.useCallback((function(e){var n=e.slideData;return i.jsx(R,{card:n,onPayNow:h,pageName:c,vertical:u})}),[h,c,u]);if(!(null==s?void 0:s.length))return null;var E=function(e){var i,n=s[e],t=o.mapBookZeroRavenEventImpressionName(u||"");if(n&&t){var a={page_name:c||"",platform:null===(i=o.getDevicePlatform())||void 0===i?void 0:i.toLowerCase(),vertical:u||"",last_page_name:"",h_trip_id:(null==n?void 0:n.tripId)||""};o.ravenSDKTrigger(t,a)}};return console.log("hasBgColor",b,b?"#ffffff":"#1a1a1a"),i.jsx(t.IntersectionObserverHOC,e.__assign({onIntersection:w},{children:i.jsx("section",e.__assign({className:p,"aria-label":d},{children:i.jsxs("div",e.__assign({className:m},{children:[i.jsx("div",e.__assign({className:x,style:{color:b?"#ffffff":"#1a1a1a"}},{children:d})),i.jsx("div",e.__assign({className:g},{children:i.jsx(a.MerchCarousel,{onCarouselSlideChange:function(e){E(e.activeIndex)},isFreeSwipe:!1,isCentered:!1,isInfinite:!1,isAutoplay:!1,lazyLoad:!0,lazyWidget:!1,isLoopAdditionalSlides:!0,showNavigation:!1,showPagination:!1,startingSlide:0,spacingBetween:12,slidesToDisplay:"auto",slides:T,getSlideStyles:z,renderSlideItem:N,styleConfig:{swipperWrapper:{paddingLeft:"16px",paddingRight:"16px"}}})}))]}))}))}))};
2
2
  //# sourceMappingURL=ct-platform-book-zero-trip-widget.cjs.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"ct-platform-book-zero-trip-widget.cjs.js","sources":["../../../../node_modules/.pnpm/style-inject@0.3.0/node_modules/style-inject/dist/style-inject.es.js","../packages/components/BookZeroTripWidget/src/BookZeroTripCard.tsx","../packages/components/BookZeroTripWidget/src/BookZeroTripWidget.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],"names":["css","ref","insertAt","document","head","getElementsByTagName","style","createElement","type","firstChild","insertBefore","appendChild","styleSheet","cssText","createTextNode","BookZeroTripCard","_a","card","metaData","landingUrl","stayDateLabel","useMemo","formatBookZeroStayDateRange","stayStartDate","stayEndDate","paymentDueLabel","formatBookZeroPaymentDueLabel","paymentExpiryTime","paymentCountdownText","formatRemainingMsAsHoursCountdown","statusLabel","_b","bookZeroStatusLabel","_jsxs","__assign","className","styles","children","_jsx","src","imageUrl","loading","jsxs","jsx","Typography","variant","color","classNames","default","title","amountDueLabel","HourGlass","Button","size","onClick","window","location","href","cards","hasImpressionFiredRef","useRef","handleIntersection","useCallback","current","length","slides","map","itemId","id","image","url","alt","lazyWidget","getSlideStyles","width","height","renderSlideItem","slideData","IntersectionObserverHOC","onIntersection","MerchCarousel","isFreeSwipe","isCentered","isInfinite","isAutoplay","lazyLoad","isLoopAdditionalSlides","showNavigation","showPagination","startingSlide","spacingBetween","slidesToDisplay","styleConfig","swipperWrapper","paddingLeft","paddingRight"],"mappings":"2lCAAA,SAAqBA,EAAKC,QACX,IAARA,IAAiBA,EAAM,CAAA,GAC5B,IAAIC,EAAWD,EAAIC,SAEnB,GAAgC,oBAAbC,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,80DCVA,IAEMe,EAAmB,SAACC,SAAEC,EAAID,EAAAC,KACpBC,EAAyBD,EAAIC,SAAnBC,EAAeF,EAAIE,WAE/BC,EAAgBC,EAAAA,SAClB,WACI,OAAAC,EAA2BA,4BACvBJ,EAASK,cACTL,EAASM,YACZ,GACL,CAACN,EAASK,cAAeL,EAASM,cAGhCC,EAAkBJ,EAAAA,SACpB,WAAM,OAAAK,EAAAA,8BAA8BR,EAASS,kBAAkB,GAC/D,CAACT,EAASS,oBAGRC,EAAuBC,EAAAA,kCACzBX,EAASS,mBAGPG,EAA0C,QAA5BC,EAAAb,EAASc,2BAAmB,IAAAD,EAAAA,EAvB7B,yBA6BnB,OACIE,OAAK,MAAAC,EAAAA,SAAA,CAAAC,UAAWC,GAAc,CAAAC,SAAA,CAC1BJ,OAAK,MAAAC,EAAAA,SAAA,CAAAC,UAAWC,GAAiB,CAAAC,SAAA,CAC7BC,MACI,MAAA,CAAAH,UAAWC,EACXG,IAAKtB,EAAKuB,SACVC,QAAQ,SAEZR,EAAAS,KAAA,MAAAR,E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":["../../../../node_modules/.pnpm/style-inject@0.3.0/node_modules/style-inject/dist/style-inject.es.js","../packages/components/BookZeroTripWidget/src/BookZeroTripCard.tsx","../packages/components/BookZeroTripWidget/src/BookZeroTripWidget.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],"names":["css","ref","insertAt","document","head","getElementsByTagName","style","createElement","type","firstChild","insertBefore","appendChild","styleSheet","cssText","createTextNode","BookZeroTripCard","_a","card","onPayNow","pageName","vertical","metaData","landingUrl","tripId","_b","hotelImageUrl","packageImageUrl","travelDates","constructedHotelImageUrl","constructHotelImage","stayDateLabel","useMemo","formatBookZeroStayDateRange","start","end","paymentDueLabel","formatBookZeroPaymentDueLabel","paymentExpiry","paymentCountdownText","formatRemainingMsAsHoursCountdown","pendingAmountLabel","concat","Number","pendingAmount","toLocaleString","isPackageFd","statusLabel","subtitle","BOOK_ZERO_DEFAULT_STATUS","handleImageError","useCallback","currentTarget","src","DEFAULT_IMAGE_URL","onerror","_jsxs","__assign","className","styles","onClick","prefix","PACKAGE_FD_PREFIX_PAY_NOW_URL","BOOK_ZERO_TRIP_DETAILS_PREFIX_URL","window","location","href","children","_jsx","loading","onError","Typography","variant","color","jsx","classNames","default","title","TypographyColor","SUBHEADING","jsxs","HourGlass","Button","size","e","stopPropagation","ravenEventName","mapBookZeroRavenEventActionName","ravenPayload","action_name","action_type","page_name","platform","getDevicePlatform","toLowerCase","last_page_name","h_trip_id","ravenSDKTrigger","BOOK_ZERO_DEFAULT_TITLE","cards","onImpression","_c","hasBgColor","hasImpressionFiredRef","useRef","handleIntersection","current","length","handleFireCardImpression","getImageUrl","slides","map","itemId","id","image","url","alt","getSlideStyles","sharedSlideStyles","background","overflow","borderRadius","width","height","BOOK_ZERO_TRIP_CARD_HEIGHT","BOOK_ZERO_TRIP_CARD_WIDTH","renderSlideItem","slideData","index","mapBookZeroRavenEventImpressionName","console","log","IntersectionObserverHOC","onIntersection","MerchCarousel","onCarouselSlideChange","swiper","activeIndex","isFreeSwipe","isCentered","isInfinite","isAutoplay","lazyLoad","lazyWidget","isLoopAdditionalSlides","showNavigation","showPagination","startingSlide","spacingBetween","slidesToDisplay","styleConfig","swipperWrapper","paddingLeft","paddingRight"],"mappings":"omCAAA,SAAqBA,EAAKC,QACX,IAARA,IAAiBA,EAAM,CAAA,GAC5B,IAAIC,EAAWD,EAAIC,SAEnB,GAAgC,oBAAbC,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,80DCLA,IAAMe,EAAmB,SAACC,OACtBC,EAAID,EAAAC,KACJC,EAAQF,EAAAE,SACRC,EAAQH,EAAAG,SACRC,EAAQJ,EAAAI,SAEAC,EAAiCJ,EAAII,SAA3BC,EAAuBL,EAAIK,WAAfC,EAAWN,SAEnCO,EAAkDH,GAAY,GAA5DI,EAAaD,EAAAC,cAAEC,EAAeF,EAAAE,gBAAEC,gBAElCC,EAA2BC,EAAmBA,oBAACJ,GAAiBC,GAAmB,IAEnFI,EAAgBC,EAAAA,SAClB,iBACI,OAAAC,EAA2BA,4BACvBL,EAAYM,MACQ,QAApBjB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AChBvC,OAAQA,EACRO,eAAgBA,EAChBS,gBAAiBA,EACjBwB,YAAa,CACTC,eAAgB,CACZC,YAAa,OACbC,aAAc,uBASlD","x_google_ignoreList":[0]}
@@ -1,2 +1,2 @@
1
- import{__assign as e}from"tslib";import{jsxs as i,jsx as t}from"react/jsx-runtime";import{useMemo as d,useRef as n,useCallback as o}from"react";import{IntersectionObserverHOC as l}from"@cleartrip/ct-platform-io-hoc";import{MerchCarousel as a}from"@cleartrip/ct-platform-merch-carousel";import r from"classnames";import{Typography as m}from"@cleartrip/ct-design-typography";import{Button as s}from"@cleartrip/ct-design-button";import{HourGlass as c}from"@cleartrip/ct-platform-assets";import{formatBookZeroStayDateRange as _,formatBookZeroPaymentDueLabel as p,formatRemainingMsAsHoursCountdown as u}from"@cleartrip/ct-platform-utils";var x="index-module_bztContainer__eDkV4",h="index-module_bztWrapper__ISRXL",f="index-module_bztTitle__Gghfq",b="index-module_bztContentWrapper__YjHdZ",g="index-module_bztCard__nDyiw",w="index-module_bztCardTop__NsU0I",y="index-module_bztThumb__s-7EQ",z="index-module_bztCardTitle__BINAl",v="index-module_bztCardTextCol__wheg1",C="index-module_bztDivider__M-QEW",N="index-module_bztCardBottom__Tjcmq",T="index-module_bztPriceBlock__9GkVf",D="index-module_bztTextEllipsis__d3TSs",S="index-module_bztDateMuted__kS6-O",k="index-module_bztAmountLabel__OD-eO",B="index-module_bztCountdownRow__8Vniy",E="index-module_bztCountdownIcon__BltvK",L="index-module_bztCountdownLabel__cfr0-";!function(e,i){void 0===i&&(i={});var t=i.insertAt;if("undefined"!=typeof document){var d=document.head||document.getElementsByTagName("head")[0],n=document.createElement("style");n.type="text/css","top"===t&&d.firstChild?d.insertBefore(n,d.firstChild):d.appendChild(n),n.styleSheet?n.styleSheet.cssText=e:n.appendChild(document.createTextNode(e))}}(".index-module_bztContainer__eDkV4{height:100%;position:relative;width:100%}.index-module_bztWrapper__ISRXL{height:100%;padding:16px 0;width:100%}.index-module_bztTitle__Gghfq{color:#1a1a1a;font-size:16px;font-weight:600;line-height:22px;margin:0;padding-bottom:12px;padding-left:16px;width:100%}.index-module_bztContentWrapper__YjHdZ{position:relative;width:100%}.index-module_bztCard__nDyiw{background:#fff;border:1.17px solid rgba(26,26,26,.08);border-radius:16px;box-sizing:border-box;display:flex;flex-direction:column;height:157px;outline:none;overflow:hidden;padding:12px;width:295px}.index-module_bztCard__nDyiw:focus,.index-module_bztCard__nDyiw:focus-visible{outline:none}.index-module_bztCardTop__NsU0I{align-items:flex-start;display:flex;flex-direction:row;gap:8px;padding-bottom:12px}.index-module_bztCard__nDyiw .index-module_bztThumb__s-7EQ{background:#f2f2f2;border-radius:8px;flex-shrink:0;height:58px;max-height:58px;max-width:58px;object-fit:cover;width:58px}.index-module_bztCardTitle__BINAl{line-height:22px}.index-module_bztCardTextCol__wheg1{display:flex;flex:1;flex-direction:column;gap:4px;min-width:0}.index-module_bztDivider__M-QEW{border:0;border-top:1px dashed rgba(0,0,0,.1);margin:0 0 12px}.index-module_bztCardBottom__Tjcmq{align-items:flex-end;display:flex;flex-direction:row;gap:12px;justify-content:space-between}.index-module_bztPriceBlock__9GkVf{display:flex;flex-direction:column;gap:4px;min-width:0}.index-module_bztTextEllipsis__d3TSs{max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.index-module_bztDateMuted__kS6-O{color:grey}.index-module_bztAmountLabel__OD-eO{line-height:24px}.index-module_bztCountdownRow__8Vniy{align-items:center;display:flex;flex-direction:row;gap:4px;margin-bottom:4px}.index-module_bztCountdownIcon__BltvK{flex-shrink:0}.index-module_bztCountdownLabel__cfr0-{color:#cd1719}");var I=function(n){var o,l=n.card,a=l.metaData,x=l.landingUrl,h=d((function(){return _(a.stayStartDate,a.stayEndDate)}),[a.stayStartDate,a.stayEndDate]),f=d((function(){return p(a.paymentExpiryTime)}),[a.paymentExpiryTime]),b=u(a.paymentExpiryTime),I=null!==(o=a.bookZeroStatusLabel)&&void 0!==o?o:"Booked with ₹0 payment";return i("div",e({className:g},{children:[i("div",e({className:w},{children:[t("img",{className:y,src:l.imageUrl,loading:"lazy"}),i("div",e({className:v},{children:[t(m,e({variant:"L3",color:"success"},{children:I})),t(m,e({variant:"HM3",className:r(D,z)},{children:l.title})),h?t(m,e({variant:"B3",className:r(D,S)},{children:h})):null]}))]})),t("hr",{className:C}),i("div",e({className:N},{children:[i("div",e({className:T},{children:[t(m,e({variant:"HM2",className:k},{children:a.amountDueLabel})),b?i("div",e({className:B},{children:[t(c,{className:E,"aria-hidden":!0}),t(m,e({variant:"B4",className:L},{children:b}))]})):t(m,e({variant:"L3"},{children:f}))]})),t(s,e({variant:"contained",size:"medium",color:"secondary",onClick:function(){window.location.href=x}},{children:"Pay now"}))]}))]}))},W=function(r){var m=r.title,s=void 0===m?"Complete your payment":m,c=r.cards,_=n(!1),p=o((function(){!_.current&&(null==c?void 0:c.length)&&(_.current=!0)}),[null==c?void 0:c.length]),u=d((function(){return(null!=c?c:[]).map((function(i){return e(e({},i),{itemId:i.id,image:{url:i.imageUrl,alt:""}})}))}),[c]),g=!1,w=o((function(){return{width:"auto",height:"auto"}}),[]),y=o((function(e){var i=e.slideData;return t(I,{card:i})}),[]);return(null==c?void 0:c.length)?t(l,e({onIntersection:p},{children:t("section",e({className:x,"aria-label":s},{children:i("div",e({className:h},{children:[t("div",e({className:f},{children:s})),t("div",e({className:b},{children:t(a,{isFreeSwipe:!1,isCentered:!1,isInfinite:!1,isAutoplay:!1,lazyLoad:!0,lazyWidget:g,isLoopAdditionalSlides:!0,showNavigation:!1,showPagination:!1,startingSlide:0,spacingBetween:12,slidesToDisplay:"auto",slides:u,getSlideStyles:w,renderSlideItem:y,styleConfig:{swipperWrapper:{paddingLeft:"16px",paddingRight:"16px"}}})}))]}))}))})):null};export{W as BookZeroTripWidget};
1
+ import{__assign as e}from"tslib";import{jsxs as i,jsx as t}from"react/jsx-runtime";import{useMemo as n,useCallback as o,useRef as a}from"react";import{IntersectionObserverHOC as d}from"@cleartrip/ct-platform-io-hoc";import{MerchCarousel as l}from"@cleartrip/ct-platform-merch-carousel";import{constructHotelImage as r,formatBookZeroStayDateRange as c,formatBookZeroPaymentDueLabel as m,formatRemainingMsAsHoursCountdown as s,mapBookZeroRavenEventActionName as p,getDevicePlatform as _,ravenSDKTrigger as u,mapBookZeroRavenEventImpressionName as f}from"@cleartrip/ct-platform-utils";import x from"classnames";import{Typography as h,TypographyColor as g}from"@cleartrip/ct-design-typography";import{Button as v}from"@cleartrip/ct-design-button";import{HourGlass as b}from"@cleartrip/ct-platform-assets";import{BOOK_ZERO_DEFAULT_STATUS as w,DEFAULT_IMAGE_URL as y,PACKAGE_FD_PREFIX_PAY_NOW_URL as z,BOOK_ZERO_TRIP_DETAILS_PREFIX_URL as C,BOOK_ZERO_TRIP_CARD_HEIGHT as N,BOOK_ZERO_TRIP_CARD_WIDTH as I,BOOK_ZERO_DEFAULT_TITLE as D}from"@cleartrip/ct-platform-constants";var T="index-module_bztContainer__eDkV4",E="index-module_bztWrapper__ISRXL",k="index-module_bztTitle__Gghfq",B="index-module_bztContentWrapper__YjHdZ",S="index-module_bztCard__nDyiw",L="index-module_bztCardTop__NsU0I",A="index-module_bztThumb__s-7EQ",P="index-module_bztCardTitle__BINAl",U="index-module_bztCardTextCol__wheg1",G="index-module_bztDivider__M-QEW",R="index-module_bztCardBottom__Tjcmq",W="index-module_bztPriceBlock__9GkVf",j="index-module_bztTextEllipsis__d3TSs",O="index-module_bztAmountLabel__OD-eO",V="index-module_bztCountdownRow__8Vniy",H="index-module_bztCountdownIcon__BltvK",M="index-module_bztCountdownLabel__cfr0-";!function(e,i){void 0===i&&(i={});var t=i.insertAt;if("undefined"!=typeof document){var n=document.head||document.getElementsByTagName("head")[0],o=document.createElement("style");o.type="text/css","top"===t&&n.firstChild?n.insertBefore(o,n.firstChild):n.appendChild(o),o.styleSheet?o.styleSheet.cssText=e:o.appendChild(document.createTextNode(e))}}(".index-module_bztContainer__eDkV4{height:100%;position:relative;width:100%}.index-module_bztWrapper__ISRXL{height:100%;padding:16px 0;width:100%}.index-module_bztTitle__Gghfq{font-size:16px;font-weight:600;line-height:22px;margin:0;padding-bottom:12px;padding-left:16px;width:100%}.index-module_bztContentWrapper__YjHdZ{position:relative;width:100%}.index-module_bztCard__nDyiw{background:#fff;border:1.17px solid rgba(26,26,26,.08);border-radius:16px;box-sizing:border-box;display:flex;flex-direction:column;height:100%;outline:none;overflow:hidden;padding:12px;width:100%}.index-module_bztCard__nDyiw:focus,.index-module_bztCard__nDyiw:focus-visible{outline:none}.index-module_bztCardTop__NsU0I{align-items:flex-start;display:flex;flex-direction:row;gap:8px;padding-bottom:12px}.index-module_bztCard__nDyiw .index-module_bztThumb__s-7EQ{background:#f2f2f2;border-radius:8px;flex-shrink:0;height:58px;max-height:58px;max-width:58px;object-fit:cover;width:58px}.index-module_bztCardTitle__BINAl{font-weight:600;line-height:22px}.index-module_bztCardTextCol__wheg1{display:flex;flex:1;flex-direction:column;gap:4px;min-width:0}.index-module_bztDivider__M-QEW{border:0;border-top:1px dashed rgba(0,0,0,.1);margin:0 0 12px}.index-module_bztCardBottom__Tjcmq{align-items:flex-end;display:flex;flex-direction:row;gap:12px;justify-content:space-between}.index-module_bztPriceBlock__9GkVf{display:flex;flex-direction:column;gap:4px;min-width:0}.index-module_bztTextEllipsis__d3TSs{max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.index-module_bztDateMuted__kS6-O{color:grey}.index-module_bztAmountLabel__OD-eO{line-height:24px}.index-module_bztCountdownRow__8Vniy{align-items:center;display:flex;flex-direction:row;gap:4px;margin-bottom:4px}.index-module_bztCountdownIcon__BltvK{flex-shrink:0}.index-module_bztCountdownLabel__cfr0-{color:#cd1719}");var q=function(a){var d=a.card,l=a.onPayNow,f=a.pageName,N=a.vertical,I=d.metaData,D=d.landingUrl,T=d.tripId,E=I||{},k=E.hotelImageUrl,B=E.packageImageUrl,q=E.travelDates,K=r(k||B||""),Q=n((function(){var e;return c(q.start,null!==(e=null==q?void 0:q.end)&&void 0!==e?e:"")}),[q.start,q.end]),Y=n((function(){return m(I.paymentExpiry)}),[I.paymentExpiry]),F=s(I.paymentExpiry),J="₹".concat(Number(null==I?void 0:I.pendingAmount).toLocaleString("en-IN")),X="PENDING_PACKAGE_FD_JOURNEY"===d.type,Z=X?d.subtitle:w,$=o((function(e){var i=e.currentTarget;i.src=y,i.onerror=null}),[]);return i("div",e({className:S,onClick:function(){if(T){var e=X?z:C;window.location.href="".concat(e,"/").concat(T)}}},{children:[i("div",e({className:L},{children:[t("img",{className:A,src:K,loading:"lazy",onError:$}),i("div",e({className:U},{children:[t(h,e({variant:"L3",color:"success"},{children:Z})),t(h,e({variant:"HM3",className:x(j,P)},{children:d.title})),Q?t(h,e({variant:"B3",color:g.SUBHEADING,className:x(j)},{children:Q})):null]}))]})),t("hr",{className:G}),i("div",e({className:R},{children:[i("div",e({className:W},{children:[t(h,e({variant:"HM2",className:O},{children:J})),F?i("div",e({className:V},{children:[t(b,{className:H,"aria-hidden":!0}),t(h,e({variant:"B4",className:M},{children:F}))]})):t(h,e({variant:"L3"},{children:Y}))]})),t(v,e({variant:"contained",size:"medium",color:"secondary",onClick:function(e){var i;e.stopPropagation();var t=p(N||"");if(t){var n={action_name:"pay_now_clicked",action_type:"click",page_name:f||"",platform:null===(i=_())||void 0===i?void 0:i.toLowerCase(),vertical:N||"",last_page_name:"",h_trip_id:T||""};u(t,n)}l&&l(),X?T&&(window.location.href="".concat(z,"/").concat(T)):D&&(window.location.href=D)}},{children:"Pay now"}))]}))]}))},K=function(r){var c=r.title,m=void 0===c?D:c,s=r.cards,p=r.pageName,x=r.vertical,h=r.onPayNow,g=r.onImpression,v=r.hasBgColor,b=void 0!==v&&v,w=a(!1),y=o((function(){!w.current&&(null==s?void 0:s.length)&&(w.current=!0,null==g||g(s.length),A(0))}),[null==s?void 0:s.length]),z=function(e){var i,t;return"PENDING_PACKAGE_FD_JOURNEY"===e.type?null===(i=null==e?void 0:e.metaData)||void 0===i?void 0:i.packageImageUrl:null===(t=null==e?void 0:e.metaData)||void 0===t?void 0:t.hotelImageUrl},C=n((function(){return(null!=s?s:[]).map((function(i){return e(e({},i),{itemId:i.id,image:{url:z(i)||"",alt:""}})}))}),[s]),S=o((function(){var i=1===(null==s?void 0:s.length),t={background:"transparent",overflow:"hidden",borderRadius:"16px"};return e(i?{width:"100%",height:N}:{width:I,height:N},t)}),[]),L=o((function(e){var i=e.slideData;return t(q,{card:i,onPayNow:h,pageName:p,vertical:x})}),[h,p,x]);if(!(null==s?void 0:s.length))return null;var A=function(e){var i,t=s[e],n=f(x||"");if(t&&n){var o={page_name:p||"",platform:null===(i=_())||void 0===i?void 0:i.toLowerCase(),vertical:x||"",last_page_name:"",h_trip_id:(null==t?void 0:t.tripId)||""};u(n,o)}};return console.log("hasBgColor",b,b?"#ffffff":"#1a1a1a"),t(d,e({onIntersection:y},{children:t("section",e({className:T,"aria-label":m},{children:i("div",e({className:E},{children:[t("div",e({className:k,style:{color:b?"#ffffff":"#1a1a1a"}},{children:m})),t("div",e({className:B},{children:t(l,{onCarouselSlideChange:function(e){A(e.activeIndex)},isFreeSwipe:!1,isCentered:!1,isInfinite:!1,isAutoplay:!1,lazyLoad:!0,lazyWidget:!1,isLoopAdditionalSlides:!0,showNavigation:!1,showPagination:!1,startingSlide:0,spacingBetween:12,slidesToDisplay:"auto",slides:C,getSlideStyles:S,renderSlideItem:L,styleConfig:{swipperWrapper:{paddingLeft:"16px",paddingRight:"16px"}}})}))]}))}))}))};export{K as BookZeroTripWidget};
2
2
  //# sourceMappingURL=ct-platform-book-zero-trip-widget.esm.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"ct-platform-book-zero-trip-widget.esm.js","sources":["../../../../node_modules/.pnpm/style-inject@0.3.0/node_modules/style-inject/dist/style-inject.es.js","../packages/components/BookZeroTripWidget/src/BookZeroTripCard.tsx","../packages/components/BookZeroTripWidget/src/BookZeroTripWidget.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],"names":["css","ref","insertAt","document","head","getElementsByTagName","style","createElement","type","firstChild","insertBefore","appendChild","styleSheet","cssText","createTextNode","BookZeroTripCard","_a","card","metaData","landingUrl","stayDateLabel","useMemo","formatBookZeroStayDateRange","stayStartDate","stayEndDate","paymentDueLabel","formatBookZeroPaymentDueLabel","paymentExpiryTime","paymentCountdownText","formatRemainingMsAsHoursCountdown","statusLabel","_b","bookZeroStatusLabel","_jsxs","__assign","className","styles","children","_jsx","src","imageUrl","loading","Typography","variant","color","classNames","title","amountDueLabel","HourGlass","Button","size","onClick","window","location","href","BookZeroTripWidget","cards","hasImpressionFiredRef","useRef","handleIntersection","useCallback","current","length","slides","map","itemId","id","image","url","alt","lazyWidget","getSlideStyles","width","height","renderSlideItem","slideData","IntersectionObserverHOC","onIntersection","MerchCarousel","isFreeSwipe","isCentered","isInfinite","isAutoplay","lazyLoad","isLoopAdditionalSlides","showNavigation","showPagination","startingSlide","spacingBetween","slidesToDisplay","styleConfig","swipperWrapper","paddingLeft","paddingRight"],"mappings":"+xCAAA,SAAqBA,EAAKC,QACX,IAARA,IAAiBA,EAAM,CAAA,GAC5B,IAAIC,EAAWD,EAAIC,SAEnB,GAAgC,oBAAbC,SAAnB,CAEA,IAAIC,EAAOD,SAASC,MAAQD,SAASE,qBAAqB,QAAQ,GAC9DC,EAAQH,SAASI,cAAc,SACnCD,EAAME,KAAO,WAEI,QAAbN,GACEE,EAAKK,WACPL,EAAKM,aAAaJ,EAA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A,MAAAJ,EAAA,CAAKC,UAAWC,GAAe,CAAAC,SAAGS,KAClCR,EAAK,MAAAJ,EAAA,CAAAC,UAAWC,GAAwB,CAAAC,SACpCC,EAACwC,EACG,CAAAC,aAAa,EACbC,YAAY,EACZC,YAAY,EACZC,YAAY,EACZC,UACA,EAAAb,WAAYA,EACZc,wBAAwB,EACxBC,gBAAgB,EAChBC,gBAAgB,EAChBC,cAAe,EACfC,eAAgB,GAChBC,gBAAgB,OAChB1B,OAAQA,EACRQ,eAAgBA,EAChBG,gBAAiBA,EACjBgB,YAAa,CACTC,eAAgB,CACZC,YAAa,OACbC,aAAc,wBA/BnC,IAwCf","x_google_ignoreList":[0]}
1
+ {"version":3,"file":"ct-platform-book-zero-trip-widget.esm.js","sources":["../../../../node_modules/.pnpm/style-inject@0.3.0/node_modules/style-inject/dist/style-inject.es.js","../packages/components/BookZeroTripWidget/src/BookZeroTripCard.tsx","../packages/components/BookZeroTripWidget/src/BookZeroTripWidget.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],"names":["css","ref","insertAt","document","head","getElementsByTagName","style","createElement","type","firstChild","insertBefore","appendChild","styleSheet","cssText","createTextNode","BookZeroTripCard","_a","card","onPayNow","pageName","vertical","metaData","landingUrl","tripId","_b","hotelImageUrl","packageImageUrl","travelDates","constructedHotelImageUrl","constructHotelImage","stayDateLabel","useMemo","formatBookZeroStayDateRange","start","end","paymentDueLabel","formatBookZeroPaymentDueLabel","paymentExpiry","paymentCountdownText","formatRemainingMsAsHoursCountdown","pendingAmountLabel","concat","Number","pendingAmount","toLocaleString","isPackageFd","statusLabel","subtitle","BOOK_ZERO_DEFAULT_STATUS","handleImageError","useCallback","currentTarget","src","DEFAULT_IMAGE_URL","onerror","_jsxs","__assign","className","styles","onClick","prefix","PACKAGE_FD_PREFIX_PAY_NOW_URL","BOOK_ZERO_TRIP_DETAILS_PREFIX_URL","window","location","href","children","_jsx","loading","onError","Typography","variant","color","classNames","title","TypographyColor","SUBHEADING","HourGlass","Button","size","e","stopPropagation","ravenEventName","mapBookZeroRavenEventActionName","ravenPayload","action_name","action_type","page_name","platform","getDevicePlatform","toLowerCase","last_page_name","h_trip_id","ravenSDKTrigger","BookZeroTripWidget","BOOK_ZERO_DEFAULT_TITLE","cards","onImpression","_c","hasBgColor","hasImpressionFiredRef","useRef","handleIntersection","current","length","handleFireCardImpression","getImageUrl","slides","map","itemId","id","image","url","alt","getSlideStyles","isSingleCard","sharedSlideStyles","background","overflow","borderRadius","width","height","BOOK_ZERO_TRIP_CARD_HEIGHT","BOOK_ZERO_TRIP_CARD_WIDTH","renderSlideItem","slideData","index","mapBookZeroRavenEventImpressionName","console","log","IntersectionObserverHOC","onIntersection","MerchCarousel","onCarouselSlideChange","swiper","activeIndex","isFreeSwipe","isCentered","isInfinite","isAutoplay","lazyLoad","lazyWidget","isLoopAdditionalSlides","showNavigation","showPagination","startingSlide","spacingBetween","slidesToDisplay","styleConfig","swipperWrapper","paddingLeft","paddingRight"],"mappings":"2qDAAA,SAAqBA,EAAKC,QACX,IAARA,IAAiBA,EAAM,CAAA,GAC5B,IAAIC,EAAWD,EAAIC,SAEnB,GAAgC,oBAAbC,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,EAAK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EACfC,eAAgB,GAChBC,gBAAgB,OAChBxC,OAAQA,EACRO,eAAgBA,EAChBU,gBAAiBA,EACjBwB,YAAa,CACTC,eAAgB,CACZC,YAAa,OACbC,aAAc,uBASlD","x_google_ignoreList":[0]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cleartrip/ct-platform-book-zero-trip-widget",
3
- "version": "1.0.6-beta.5",
3
+ "version": "1.0.6-beta.51",
4
4
  "description": "Book Zero Trip Widget Component",
5
5
  "types": "dist/index.d.ts",
6
6
  "main": "dist/ct-platform-book-zero-trip-widget.cjs.js",
@@ -10,19 +10,19 @@
10
10
  "dist"
11
11
  ],
12
12
  "dependencies": {
13
- "@cleartrip/ct-design-button": "2.6.0",
13
+ "@cleartrip/ct-design-button": "3.7.0",
14
14
  "@cleartrip/ct-design-container": "3.7.0",
15
15
  "@cleartrip/ct-design-theme": "3.7.0",
16
16
  "@cleartrip/ct-design-typography": "3.7.0",
17
17
  "classnames": "^2.5.1",
18
18
  "swiper": "6.8.4",
19
19
  "uuid": "^9.0.1",
20
- "@cleartrip/ct-platform-assets": "4.2.0-beta.80",
21
- "@cleartrip/ct-platform-merch-carousel": "4.2.0-beta.80",
22
- "@cleartrip/ct-platform-io-hoc": "4.2.0-beta.80",
23
- "@cleartrip/ct-platform-types": "4.2.0-beta.80",
24
- "@cleartrip/ct-platform-constants": "4.2.0-beta.80",
25
- "@cleartrip/ct-platform-utils": "4.2.0-beta.80"
20
+ "@cleartrip/ct-platform-merch-carousel": "4.2.0-beta.126",
21
+ "@cleartrip/ct-platform-assets": "4.2.0-beta.126",
22
+ "@cleartrip/ct-platform-types": "4.2.0-beta.126",
23
+ "@cleartrip/ct-platform-io-hoc": "4.2.0-beta.126",
24
+ "@cleartrip/ct-platform-constants": "4.2.0-beta.126",
25
+ "@cleartrip/ct-platform-utils": "4.2.0-beta.126"
26
26
  },
27
27
  "peerDependencies": {
28
28
  "react": ">=16.8.0",