@cleartrip/ct-platform-book-zero-trip-widget 1.0.6-beta.9 → 1.0.7

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,4CA4GxB,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, }: 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;AAWtB,QAAA,MAAM,kBAAkB,sBAGrB,wBAAwB,mDAsF1B,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,EAE3B,MAAM,8BAA8B,CAAC;AAKtC,OAAO,cAAc,CAAC;AAGtB,QAAA,MAAM,kBAAkB,kEAOrB,wBAAwB,mDA6G1B,CAAC;AAEF,eAAe,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"),r=require("@cleartrip/ct-design-typography"),o=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",m="index-module_bztWrapper__ISRXL",x="index-module_bztTitle__Gghfq",p="index-module_bztContentWrapper__YjHdZ",h="index-module_bztCard__nDyiw",g="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",v="index-module_bztCardBottom__Tjcmq",z="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: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{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,m=t.useMemo((function(){return s.formatBookZeroStayDateRange(_.stayStartDate,_.stayEndDate)}),[_.stayStartDate,_.stayEndDate]),x=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:h},{children:[i.jsxs("div",e.__assign({className:g},{children:[i.jsx("img",{className:b,src:d.imageUrl,loading:"lazy"}),i.jsxs("div",e.__assign({className:y},{children:[i.jsx(r.Typography,e.__assign({variant:"L3",color:"success"},{children:B})),i.jsx(r.Typography,e.__assign({variant:"HM3",className:u.default(C,f)},{children:d.title})),m?i.jsx(r.Typography,e.__assign({variant:"B3",className:u.default(C,j)},{children:m})):null]}))]})),i.jsx("hr",{className:w}),i.jsxs("div",e.__assign({className:v},{children:[i.jsxs("div",e.__assign({className:z},{children:[i.jsx(r.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(r.Typography,e.__assign({variant:"B4",className:k},{children:p}))]})):i.jsx(r.Typography,e.__assign({variant:"L3"},{children:x}))]})),i.jsx(o.Button,e.__assign({variant:"contained",size:"medium",color:"secondary",onClick:function(){window.location.href=c}},{children:"Pay now"}))]}))]}))};exports.BookZeroTripWidget=function(d){var r=d.title,o=void 0===r?"Complete your payment":r,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]),h=!1,g=t.useCallback((function(){return 1===(null==l?void 0:l.length)?{width:"100%",height:157}:{width:295,height:157}}),[]),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":o},{children:i.jsxs("div",e.__assign({className:m},{children:[i.jsx("div",e.__assign({className:x},{children:o})),i.jsx("div",e.__assign({className:p},{children:i.jsx(a.MerchCarousel,{isFreeSwipe:!1,isCentered:!1,isInfinite:!1,isAutoplay:!1,lazyLoad:!0,lazyWidget:h,isLoopAdditionalSlides:!0,showNavigation:!1,showPagination:!1,startingSlide:0,spacingBetween:12,slidesToDisplay:"auto",slides:u,getSlideStyles:g,renderSlideItem:b,styleConfig:{swipperWrapper:{paddingLeft:"16px",paddingRight:"16px"}}})}))]}))}))})):null};
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"),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 m="index-module_bztContainer__eDkV4",p="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",z="index-module_bztPriceBlock__9GkVf",T="index-module_bztTextEllipsis__d3TSs",N="index-module_bztAmountLabel__OD-eO",I="index-module_bztCountdownRow__8Vniy",D="index-module_bztCountdownIcon__BltvK",j="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: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 E=function(n){var a=n.card,r=n.onPayNow,c=n.pageName,m=n.vertical,p=a.metaData,x=a.landingUrl,g=a.tripId,E=p||{},B=E.hotelImageUrl,O=E.travelDates,R=o.constructHotelImage(B),k=t.useMemo((function(){var e;return o.formatBookZeroStayDateRange(O.start,null!==(e=O.end)&&void 0!==e?e:"")}),[O.start,O.end]),S=t.useMemo((function(){return o.formatBookZeroPaymentDueLabel(p.paymentExpiry)}),[p.paymentExpiry]),L=o.formatRemainingMsAsHoursCountdown(p.paymentExpiry),A="₹".concat(Number(null==p?void 0:p.pendingAmount).toLocaleString("en-IN")),P=_.BOOK_ZERO_DEFAULT_STATUS;return i.jsxs("div",e.__assign({className:h,onClick:function(){g&&(window.location.href="".concat(_.BOOK_ZERO_TRIP_DETAILS_PREFIX_URL,"/").concat(g))}},{children:[i.jsxs("div",e.__assign({className:f},{children:[i.jsx("img",{className:v,src:R,loading:"lazy"}),i.jsxs("div",e.__assign({className:y},{children:[i.jsx(l.Typography,e.__assign({variant:"L3",color:"success"},{children:P})),i.jsx(l.Typography,e.__assign({variant:"HM3",className:u.default(T,b)},{children:a.title})),k?i.jsx(l.Typography,e.__assign({variant:"B3",color:l.TypographyColor.SUBHEADING,className:u.default(T)},{children:k})):null]}))]})),i.jsx("hr",{className:w}),i.jsxs("div",e.__assign({className:C},{children:[i.jsxs("div",e.__assign({className:z},{children:[i.jsx(l.Typography,e.__assign({variant:"HM2",className:N},{children:A})),L?i.jsxs("div",e.__assign({className:I},{children:[i.jsx(s.HourGlass,{className:D,"aria-hidden":!0}),i.jsx(l.Typography,e.__assign({variant:"B4",className:j},{children:L}))]})):i.jsx(l.Typography,e.__assign({variant:"L3"},{children:S}))]})),i.jsx(d.Button,e.__assign({variant:"contained",size:"medium",color:"secondary",onClick:function(e){var i;e.stopPropagation();var t=o.mapBookZeroRavenEventActionName(m||"");if(t){var n={action_name:"pay_now_clicked",action_type:"click",page_name:c||"",platform:null===(i=o.getDevicePlatform())||void 0===i?void 0:i.toLowerCase(),vertical:m||"",last_page_name:"",h_trip_id:g||""};o.ravenSDKTrigger(t,n)}r&&r(),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=t.useRef(!1),b=t.useCallback((function(){!v.current&&(null==s?void 0:s.length)&&(v.current=!0,null==f||f(s.length),z(0))}),[null==s?void 0:s.length]),y=t.useMemo((function(){return(null!=s?s:[]).map((function(i){var t;return e.__assign(e.__assign({},i),{itemId:i.id,image:{url:null===(t=null==i?void 0:i.metaData)||void 0===t?void 0:t.hotelImageUrl,alt:""}})}))}),[s]),w=t.useCallback((function(){return 1===(null==s?void 0:s.length)?{width:"100%",height:_.BOOK_ZERO_TRIP_CARD_HEIGHT}:{width:_.BOOK_ZERO_TRIP_CARD_WIDTH,height:_.BOOK_ZERO_TRIP_CARD_HEIGHT}}),[]),C=t.useCallback((function(e){var t=e.slideData;return i.jsx(E,{card:t,onPayNow:h,pageName:c,vertical:u})}),[h,c,u]);if(!(null==s?void 0:s.length))return null;var z=function(e){var i,t=s[e],n=o.mapBookZeroRavenEventImpressionName(u||"");if(t&&n){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==t?void 0:t.tripId)||""};o.ravenSDKTrigger(n,a)}};return i.jsx(n.IntersectionObserverHOC,e.__assign({onIntersection:b},{children:i.jsx("section",e.__assign({className:m,"aria-label":d},{children:i.jsxs("div",e.__assign({className:p},{children:[i.jsx("div",e.__assign({className:x},{children:d})),i.jsx("div",e.__assign({className:g},{children:i.jsx(a.MerchCarousel,{onCarouselSlideChange:function(e){z(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:y,getSlideStyles:w,renderSlideItem:C,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","../packages/components/BookZeroTripWidget/src/constants.ts"],"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],"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,40DCVA,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,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B,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.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","onPayNow","pageName","vertical","metaData","landingUrl","tripId","_b","hotelImageUrl","travelDates","constructedHotelImageUrl","constructHotelImage","stayDateLabel","useMemo","formatBookZeroStayDateRange","start","end","paymentDueLabel","formatBookZeroPaymentDueLabel","paymentExpiry","paymentCountdownText","formatRemainingMsAsHoursCountdown","pendingAmountLabel","concat","Number","pendingAmount","toLocaleString","statusLabel","BOOK_ZERO_DEFAULT_STATUS","_jsxs","__assign","className","styles","onClick","window","location","href","BOOK_ZERO_TRIP_DETAILS_PREFIX_URL","children","_jsx","jsx","src","loading","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","BOOK_ZERO_DEFAULT_TITLE","cards","onImpression","hasImpressionFiredRef","useRef","handleIntersection","useCallback","current","length","handleFireCardImpression","slides","map","itemId","id","image","url","alt","getSlideStyles","width","height","BOOK_ZERO_TRIP_CARD_HEIGHT","BOOK_ZERO_TRIP_CARD_WIDTH","renderSlideItem","slideData","index","mapBookZeroRavenEventImpressionName","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,41DCLA,IAAMe,EAAmB,SAACC,OACtBC,EAAID,EAAAC,KACJC,EAAQF,EAAAE,SACRC,EAAQH,EAAAG,SACRC,EAAQJ,EAAAI,SAGAC,EAAiCJ,EAAII,SAA3BC,EAAuBL,EAAIK,WAAfC,EAAWN,SAEnCO,EAAiCH,GAAY,CAAA,EAA3CI,EAAaD,EAAAC,cAAEC,EAAWF,EAAAE,YAE5BC,EAA2BC,sBAAoBH,GAE/CI,EAA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T,EAAAA,SAAA,CACIC,UAAWC,EACC,aAAAe,GAEZ,CAAAT,SAAAT,OAAA,MAAAC,EAAAA,SAAA,CAAKC,UAAWC,GACZ,CAAAM,SAAA,CAAAC,MAAA,MAAAT,EAAAA,SAAA,CAAKC,UAAWC,GAAkB,CAAAM,SAAAS,KAClCR,EAAAC,IAAA,MAAAV,EAAAA,SAAA,CAAKC,UAAWC,GACZ,CAAAM,SAAAC,MAACwD,EAAAA,cAAa,CACVC,sBAdE,SAACC,GACvBrB,EAAyBqB,EAAOC,YACpC,EAawBC,aAAa,EACbC,YAAY,EACZC,YAAY,EACZC,YAAY,EACZC,UACA,EAAAC,YAAY,EACZC,wBAAwB,EACxBC,gBAAgB,EAChBC,gBAAgB,EAChBC,cAAe,EACfC,eAAgB,GAChBC,gBAAgB,OAChBjC,OAAQA,EACRO,eAAgBA,EAChBK,gBAAiBA,EACjBsB,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 r}from"@cleartrip/ct-platform-merch-carousel";import a 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: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{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,r=l.metaData,x=l.landingUrl,h=d((function(){return _(r.stayStartDate,r.stayEndDate)}),[r.stayStartDate,r.stayEndDate]),f=d((function(){return p(r.paymentExpiryTime)}),[r.paymentExpiryTime]),b=u(r.paymentExpiryTime),I=null!==(o=r.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:a(D,z)},{children:l.title})),h?t(m,e({variant:"B3",className:a(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:r.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(a){var m=a.title,s=void 0===m?"Complete your payment":m,c=a.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 1===(null==c?void 0:c.length)?{width:"100%",height:157}:{width:295,height:157}}),[]),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(r,{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,useRef as o,useCallback as d}from"react";import{IntersectionObserverHOC as l}from"@cleartrip/ct-platform-io-hoc";import{MerchCarousel as a}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 x}from"@cleartrip/ct-platform-utils";import h from"classnames";import{Typography as f,TypographyColor as g}from"@cleartrip/ct-design-typography";import{Button as b}from"@cleartrip/ct-design-button";import{HourGlass as v}from"@cleartrip/ct-platform-assets";import{BOOK_ZERO_DEFAULT_STATUS as w,BOOK_ZERO_TRIP_DETAILS_PREFIX_URL as z,BOOK_ZERO_TRIP_CARD_HEIGHT as y,BOOK_ZERO_TRIP_CARD_WIDTH as C,BOOK_ZERO_DEFAULT_TITLE as N}from"@cleartrip/ct-platform-constants";var I="index-module_bztContainer__eDkV4",T="index-module_bztWrapper__ISRXL",D="index-module_bztTitle__Gghfq",S="index-module_bztContentWrapper__YjHdZ",k="index-module_bztCard__nDyiw",B="index-module_bztCardTop__NsU0I",L="index-module_bztThumb__s-7EQ",E="index-module_bztCardTitle__BINAl",A="index-module_bztCardTextCol__wheg1",P="index-module_bztDivider__M-QEW",W="index-module_bztCardBottom__Tjcmq",j="index-module_bztPriceBlock__9GkVf",U="index-module_bztTextEllipsis__d3TSs",V="index-module_bztAmountLabel__OD-eO",G="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{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: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 O=function(o){var d=o.card,l=o.onPayNow,a=o.pageName,x=o.vertical,y=d.metaData,C=d.landingUrl,N=d.tripId,I=y||{},T=I.hotelImageUrl,D=I.travelDates,S=r(T),O=n((function(){var e;return c(D.start,null!==(e=D.end)&&void 0!==e?e:"")}),[D.start,D.end]),R=n((function(){return m(y.paymentExpiry)}),[y.paymentExpiry]),q=s(y.paymentExpiry),Q="₹".concat(Number(null==y?void 0:y.pendingAmount).toLocaleString("en-IN")),K=w;return i("div",e({className:k,onClick:function(){N&&(window.location.href="".concat(z,"/").concat(N))}},{children:[i("div",e({className:B},{children:[t("img",{className:L,src:S,loading:"lazy"}),i("div",e({className:A},{children:[t(f,e({variant:"L3",color:"success"},{children:K})),t(f,e({variant:"HM3",className:h(U,E)},{children:d.title})),O?t(f,e({variant:"B3",color:g.SUBHEADING,className:h(U)},{children:O})):null]}))]})),t("hr",{className:P}),i("div",e({className:W},{children:[i("div",e({className:j},{children:[t(f,e({variant:"HM2",className:V},{children:Q})),q?i("div",e({className:G},{children:[t(v,{className:H,"aria-hidden":!0}),t(f,e({variant:"B4",className:M},{children:q}))]})):t(f,e({variant:"L3"},{children:R}))]})),t(b,e({variant:"contained",size:"medium",color:"secondary",onClick:function(e){var i;e.stopPropagation();var t=p(x||"");if(t){var n={action_name:"pay_now_clicked",action_type:"click",page_name:a||"",platform:null===(i=_())||void 0===i?void 0:i.toLowerCase(),vertical:x||"",last_page_name:"",h_trip_id:N||""};u(t,n)}l&&l(),C&&(window.location.href=C)}},{children:"Pay now"}))]}))]}))},R=function(r){var c=r.title,m=void 0===c?N:c,s=r.cards,p=r.pageName,h=r.vertical,f=r.onPayNow,g=r.onImpression,b=o(!1),v=d((function(){!b.current&&(null==s?void 0:s.length)&&(b.current=!0,null==g||g(s.length),B(0))}),[null==s?void 0:s.length]),w=n((function(){return(null!=s?s:[]).map((function(i){var t;return e(e({},i),{itemId:i.id,image:{url:null===(t=null==i?void 0:i.metaData)||void 0===t?void 0:t.hotelImageUrl,alt:""}})}))}),[s]),z=d((function(){return 1===(null==s?void 0:s.length)?{width:"100%",height:y}:{width:C,height:y}}),[]),k=d((function(e){var i=e.slideData;return t(O,{card:i,onPayNow:f,pageName:p,vertical:h})}),[f,p,h]);if(!(null==s?void 0:s.length))return null;var B=function(e){var i,t=s[e],n=x(h||"");if(t&&n){var o={page_name:p||"",platform:null===(i=_())||void 0===i?void 0:i.toLowerCase(),vertical:h||"",last_page_name:"",h_trip_id:(null==t?void 0:t.tripId)||""};u(n,o)}};return t(l,e({onIntersection:v},{children:t("section",e({className:I,"aria-label":m},{children:i("div",e({className:T},{children:[t("div",e({className:D},{children:m})),t("div",e({className:S},{children:t(a,{onCarouselSlideChange:function(e){B(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:w,getSlideStyles:z,renderSlideItem:k,styleConfig:{swipperWrapper:{paddingLeft:"16px",paddingRight:"16px"}}})}))]}))}))}))};export{R 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","../packages/components/BookZeroTripWidget/src/constants.ts"],"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],"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,QA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AuB1C,EAAA,CAAC2C,eAAgBlB,GACrC,CAAAtB,SAAAC,EAAA,UAAAJ,EAAA,CACIC,UAAWC,EACC,aAAAU,GAEZ,CAAAT,SAAAJ,EAAA,MAAAC,EAAA,CAAKC,UAAWC,GACZ,CAAAC,SAAA,CAAAC,EAAA,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","travelDates","constructedHotelImageUrl","constructHotelImage","stayDateLabel","useMemo","formatBookZeroStayDateRange","start","end","paymentDueLabel","formatBookZeroPaymentDueLabel","paymentExpiry","paymentCountdownText","formatRemainingMsAsHoursCountdown","pendingAmountLabel","concat","Number","pendingAmount","toLocaleString","statusLabel","BOOK_ZERO_DEFAULT_STATUS","_jsxs","__assign","className","styles","onClick","window","location","href","BOOK_ZERO_TRIP_DETAILS_PREFIX_URL","children","_jsx","src","loading","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","hasImpressionFiredRef","useRef","handleIntersection","useCallback","current","length","handleFireCardImpression","slides","map","itemId","id","image","url","alt","getSlideStyles","width","height","BOOK_ZERO_TRIP_CARD_HEIGHT","BOOK_ZERO_TRIP_CARD_WIDTH","renderSlideItem","slideData","index","mapBookZeroRavenEventImpressionName","IntersectionObserverHOC","onIntersection","MerchCarousel","onCarouselSlideChange","swiper","activeIndex","isFreeSwipe","isCentered","isInfinite","isAutoplay","lazyLoad","lazyWidget","isLoopAdditionalSlides","showNavigation","showPagination","startingSlide","spacingBetween","slidesToDisplay","styleConfig","swipperWrapper","paddingLeft","paddingRight"],"mappings":"inDAAA,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,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/D,EAAA,CAACgE,eAAgBtB,GACrC,CAAAlC,SAAAC,EAAA,UAAAT,EAAA,CACIC,UAAWC,EACC,aAAAc,GAEZ,CAAAR,SAAAT,EAAA,MAAAC,EAAA,CAAKC,UAAWC,GACZ,CAAAM,SAAA,CAAAC,EAAA,MAAAT,EAAA,CAAKC,UAAWC,GAAkB,CAAAM,SAAAQ,KAClCP,EAAA,MAAAT,EAAA,CAAKC,UAAWC,GACZ,CAAAM,SAAAC,EAACwD,EAAa,CACVC,sBAdE,SAACC,GACvBrB,EAAyBqB,EAAOC,YACpC,EAawBC,aAAa,EACbC,YAAY,EACZC,YAAY,EACZC,YAAY,EACZC,UACA,EAAAC,YAAY,EACZC,wBAAwB,EACxBC,gBAAgB,EAChBC,gBAAgB,EAChBC,cAAe,EACfC,eAAgB,GAChBC,gBAAgB,OAChBjC,OAAQA,EACRO,eAAgBA,EAChBK,gBAAiBA,EACjBsB,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.9",
3
+ "version": "1.0.7",
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",
@@ -17,12 +17,12 @@
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.84",
21
- "@cleartrip/ct-platform-types": "4.2.0-beta.84",
22
- "@cleartrip/ct-platform-io-hoc": "4.2.0-beta.84",
23
- "@cleartrip/ct-platform-merch-carousel": "4.2.0-beta.84",
24
- "@cleartrip/ct-platform-constants": "4.2.0-beta.84",
25
- "@cleartrip/ct-platform-utils": "4.2.0-beta.84"
20
+ "@cleartrip/ct-platform-assets": "4.3.31",
21
+ "@cleartrip/ct-platform-io-hoc": "4.3.31",
22
+ "@cleartrip/ct-platform-merch-carousel": "4.3.31",
23
+ "@cleartrip/ct-platform-utils": "4.3.31",
24
+ "@cleartrip/ct-platform-types": "4.3.31",
25
+ "@cleartrip/ct-platform-constants": "4.3.31"
26
26
  },
27
27
  "peerDependencies": {
28
28
  "react": ">=16.8.0",
@@ -1,3 +0,0 @@
1
- export declare const BOOK_ZERO_TRIP_CARD_HEIGHT = 157;
2
- export declare const BOOK_ZERO_TRIP_CARD_WIDTH = 295;
3
- //# sourceMappingURL=constants.d.ts.map
@@ -1 +0,0 @@
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"}