@cleartrip/ct-platform-timer-widget 1.6.0-beta.0 → 1.6.0-beta.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";var e=require("tslib"),i=require("react/jsx-runtime"),n=require("react"),t=require("react-countdown"),l=require("@cleartrip/ct-platform-lazy-image"),o=require("@cleartrip/ct-platform-io-hoc"),a=require("@cleartrip/ct-platform-constants"),r=require("@cleartrip/ct-platform-utils");function s(e){return e&&e.__esModule?e:{default:e}}var d=s(t),c={display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",fontSize:"24px",fontWeight:"500",width:"60px",height:"72px",backgroundColor:"#fff",color:"#1a1a1a",border:"1px solid #1a1a1a",borderRadius:"8px"},u={fontSize:"32px",fontWeight:"500",fontFamily:"Inter"},m={position:"absolute",width:"100%",height:"100%",display:"flex",flexDirection:"column",justifyContent:"end",alignItems:"center",bottom:"24px",fontFamily:"Inter, Arial, sans-serif"},g=function(e,i,n){var t={position:"relative"};return e||Object.assign(t,{width:"100%",height:"100%",backgroundSize:"cover",backgroundRepeat:"no-repeat",backgroundPosition:"center",backgroundImage:"url(".concat(i,")"),paddingBottom:"".concat(n,"%")}),t};var _="index-module_timer-bg-image__be1qA",p="index-module_timer-container__8bcOe",h="index-module_timer-box__U7pgT",x="index-module_timer-separator__7Ga7U",v="index-module_timer-button__ZGHD-",f="index-module_placeholder__5zI9P",b="index-module_header-ph-img__CCrxL",j="index-module_content-ph-img__A20jD",y="index-module_placeholder-img-wrapper__mcqYX";!function(e,i){void 0===i&&(i={});var n=i.insertAt;if(e&&"undefined"!=typeof document){var t=document.head||document.getElementsByTagName("head")[0],l=document.createElement("style");l.type="text/css","top"===n&&t.firstChild?t.insertBefore(l,t.firstChild):t.appendChild(l),l.styleSheet?l.styleSheet.cssText=e:l.appendChild(document.createTextNode(e))}}(".index-module_timer-bg-image__be1qA{background-position:50%;background-repeat:no-repeat;background-size:cover;height:100%;position:relative;width:100%}.index-module_timer-content__p9q7H{align-items:center;bottom:24px;display:flex;flex-direction:column;font-family:Inter,Arial,sans-serif;height:100%;justify-content:end;position:absolute;width:100%}.index-module_timer-container__8bcOe{align-items:center;display:flex;width:calc(100% - 32px)}.index-module_timer-box__U7pgT{align-items:center;background-color:#fff;border:1px solid #1a1a1a;border-radius:8px;color:#1a1a1a;display:flex;flex-direction:column;font-size:24px;font-weight:500;height:72px;justify-content:center;width:60px}.index-module_timer-box__U7pgT>span:nth-child(2){font-size:12px;padding-top:4px}.index-module_timer-separator__7Ga7U{font-family:Inter!important;font-size:32px;font-weight:500}.index-module_timer-button__ZGHD-{background-color:#1a1a1a;border-radius:8px;color:#fff;font-size:14px;font-weight:600;height:40px;margin-top:16px;width:calc(100% - 32px)}.index-module_placeholder__5zI9P{padding:8px}.index-module_header-ph-img__CCrxL{height:50%;width:auto}.index-module_content-ph-img__A20jD{height:15%;position:absolute;top:40%;width:auto}.index-module_placeholder-img-wrapper__mcqYX{align-items:center;background:#fef5f2;border-radius:8px;display:flex;height:100%;justify-content:center;position:relative;width:100%}");exports.TimerWidget=function(t){var s,C,w,I,N=t.headerImg,S=t.widgetData,k=t.lazyWidget,A=void 0===k||k,q=t.onItemView,z=t.onItemClick,D=t.onItemImpression,T=t.styleConfig,U=t.renderItem
|
|
1
|
+
"use strict";var e=require("tslib"),i=require("react/jsx-runtime"),n=require("react"),t=require("react-countdown"),l=require("@cleartrip/ct-platform-lazy-image"),o=require("@cleartrip/ct-platform-io-hoc"),a=require("@cleartrip/ct-platform-constants"),r=require("@cleartrip/ct-platform-utils");function s(e){return e&&e.__esModule?e:{default:e}}var d=s(t),c={display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",fontSize:"24px",fontWeight:"500",width:"60px",height:"72px",backgroundColor:"#fff",color:"#1a1a1a",border:"1px solid #1a1a1a",borderRadius:"8px"},u={fontSize:"32px",fontWeight:"500",fontFamily:"Inter"},m={position:"absolute",width:"100%",height:"100%",display:"flex",flexDirection:"column",justifyContent:"end",alignItems:"center",bottom:"24px",fontFamily:"Inter, Arial, sans-serif"},g=function(e,i,n){var t={position:"relative"};return e||Object.assign(t,{width:"100%",height:"100%",backgroundSize:"cover",backgroundRepeat:"no-repeat",backgroundPosition:"center",backgroundImage:"url(".concat(i,")"),paddingBottom:"".concat(n,"%")}),t};var _="index-module_timer-bg-image__be1qA",p="index-module_timer-container__8bcOe",h="index-module_timer-box__U7pgT",x="index-module_timer-separator__7Ga7U",v="index-module_timer-button__ZGHD-",f="index-module_placeholder__5zI9P",b="index-module_header-ph-img__CCrxL",j="index-module_content-ph-img__A20jD",y="index-module_placeholder-img-wrapper__mcqYX";!function(e,i){void 0===i&&(i={});var n=i.insertAt;if(e&&"undefined"!=typeof document){var t=document.head||document.getElementsByTagName("head")[0],l=document.createElement("style");l.type="text/css","top"===n&&t.firstChild?t.insertBefore(l,t.firstChild):t.appendChild(l),l.styleSheet?l.styleSheet.cssText=e:l.appendChild(document.createTextNode(e))}}(".index-module_timer-bg-image__be1qA{background-position:50%;background-repeat:no-repeat;background-size:cover;height:100%;position:relative;width:100%}.index-module_timer-content__p9q7H{align-items:center;bottom:24px;display:flex;flex-direction:column;font-family:Inter,Arial,sans-serif;height:100%;justify-content:end;position:absolute;width:100%}.index-module_timer-container__8bcOe{align-items:center;display:flex;width:calc(100% - 32px)}.index-module_timer-box__U7pgT{align-items:center;background-color:#fff;border:1px solid #1a1a1a;border-radius:8px;color:#1a1a1a;display:flex;flex-direction:column;font-size:24px;font-weight:500;height:72px;justify-content:center;width:60px}.index-module_timer-box__U7pgT>span:nth-child(2){font-size:12px;padding-top:4px}.index-module_timer-separator__7Ga7U{font-family:Inter!important;font-size:32px;font-weight:500}.index-module_timer-button__ZGHD-{background-color:#1a1a1a;border-radius:8px;color:#fff;font-size:14px;font-weight:600;height:40px;margin-top:16px;width:calc(100% - 32px)}.index-module_placeholder__5zI9P{padding:8px}.index-module_header-ph-img__CCrxL{height:50%;width:auto}.index-module_content-ph-img__A20jD{height:15%;position:absolute;top:40%;width:auto}.index-module_placeholder-img-wrapper__mcqYX{align-items:center;background:#fef5f2;border-radius:8px;display:flex;height:100%;justify-content:center;position:relative;width:100%}");exports.TimerWidget=function(t){var s,C,w,I,N=t.headerImg,S=t.widgetData,k=t.lazyWidget,A=void 0===k||k,q=t.onItemView,z=t.onItemClick,D=t.onItemImpression,T=t.styleConfig,U=t.renderItem,F=n.useState(!A),H=F[0],O=F[1],W=n.useState(A),L=W[0],B=W[1],E=n.useMemo((function(){var e;return r.getDimensionFromImageUrl(null===(e=null==S?void 0:S.image)||void 0===e?void 0:e.url)}),[null===(s=null==S?void 0:S.image)||void 0===s?void 0:s.url]),G=E.heightInNumber,M=E.widthInNumber,P=n.useState(G/M*100),R=P[0],Y=P[1],X=n.useMemo((function(){return r.getDimensionFromImageUrl(N).height}),[N]);n.useEffect((function(){var e;Z(null===(e=null==S?void 0:S.image)||void 0===e?void 0:e.url)}),[]);var Z=n.useCallback((function(e){if(e){var i=new Image;i.src=e,i.onload=function(){!U&&Y(i.height/i.width*100),B(!1)}}}),[]),V=n.useCallback((function(n){var t=n.days,l=n.hours,o=n.minutes,a=n.seconds;return i.jsxs("div",e.__assign({className:p,style:e.__assign({display:"flex",alignItems:"center",width:"calc(100% - 32px)"},t>0?{justifyContent:"space-between"}:{justifyContent:"center",gap:"8px"})},{children:[t>0&&i.jsxs(i.Fragment,{children:[i.jsxs("div",e.__assign({style:c,className:h},{children:[i.jsx("span",{children:String(t).padStart(2,"0")}),i.jsx("span",{children:"DAYS"})]})),i.jsx("div",e.__assign({className:x,style:e.__assign(e.__assign({},u),{color:(null==S?void 0:S.colonColor)?"".concat(S.colonColor):"#1A1A1A"})},{children:":"}))]}),i.jsxs("div",e.__assign({style:c,className:h},{children:[i.jsx("span",{children:String(l).padStart(2,"0")}),i.jsx("span",{children:"HRS"})]})),i.jsx("div",e.__assign({className:x,style:e.__assign(e.__assign({},u),{color:(null==S?void 0:S.colonColor)?"".concat(S.colonColor):"#1A1A1A"})},{children:":"})),i.jsxs("div",e.__assign({style:c,className:h},{children:[i.jsx("span",{children:String(o).padStart(2,"0")}),i.jsx("span",{children:"MINS"})]})),i.jsx("div",e.__assign({className:x,style:e.__assign(e.__assign({},u),{color:(null==S?void 0:S.colonColor)?"".concat(S.colonColor):"#1A1A1A"})},{children:":"})),i.jsxs("div",e.__assign({style:c,className:h},{children:[i.jsx("span",{children:String(a).padStart(2,"0")}),i.jsx("span",{children:"SECS"})]}))]}))}),[]),J=n.useCallback((function(e){var i,n;z&&(null==S?void 0:S.label)&&(null===(i=null==S?void 0:S.image)||void 0===i?void 0:i.url)&&z(null==S?void 0:S.label,null===(n=null==S?void 0:S.image)||void 0===n?void 0:n.url),window.location.href=e}),[z]),K=n.useCallback((function(){var e;q&&q(null==S?void 0:S.label,null===(e=null==S?void 0:S.image)||void 0===e?void 0:e.url)}),[S,q]),Q=n.useCallback((function(){var e;A&&O(!0),D&&D(null==S?void 0:S.label,null===(e=null==S?void 0:S.image)||void 0===e?void 0:e.url)}),[S,D]),$=n.useCallback((function(){var n,t=r.getHeightFromImgUrl(null===(n=null==S?void 0:S.image)||void 0===n?void 0:n.url)||180;return i.jsxs("div",{children:[N&&i.jsx("div",e.__assign({className:f,style:{height:X}},{children:i.jsx("div",e.__assign({className:y},{children:i.jsx("img",{src:a.placeholderLogo,className:b})}))})),i.jsx("div",e.__assign({className:f,style:{minHeight:"".concat(t,"px")}},{children:i.jsx("div",e.__assign({className:y,style:{paddingBottom:"".concat(R,"%")}},{children:i.jsx("img",{src:a.placeholderLogo,className:j})}))}))]})}),[N,S,R]);return i.jsx(o.IntersectionObserverHOC,e.__assign({onIntersection:Q,onTimedObservationComplete:K},{children:H?i.jsxs("div",{children:[N&&i.jsx(l.LazyImage,{src:N,style:{width:"100%",height:X}}),!L&&i.jsxs("div",e.__assign({className:_,style:e.__assign(e.__assign({},g(!!U,null===(C=null==S?void 0:S.image)||void 0===C?void 0:C.url,R)),null==T?void 0:T.timerWidgetImageWrapper),onClick:function(){var e;return J(null===(e=null==S?void 0:S.cta)||void 0===e?void 0:e.targetUrl)}},{children:[null==U?void 0:U(),i.jsxs("div",e.__assign({style:m},{children:[i.jsx(d.default,{date:null==S?void 0:S.endTime,renderer:V}),(null===(w=null==S?void 0:S.cta)||void 0===w?void 0:w.title)&&i.jsx("button",e.__assign({className:v},{children:null===(I=null==S?void 0:S.cta)||void 0===I?void 0:I.title}))]}))]}),null==S?void 0:S.label)]}):i.jsx(i.Fragment,{children:$()})}))};
|
|
2
2
|
//# sourceMappingURL=ct-platform-timer-widget.cjs.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ct-platform-timer-widget.cjs.js","sources":["../packages/components/TimerWidget/src/utils.ts","../../../../node_modules/.pnpm/style-inject@0.3.0/node_modules/style-inject/dist/style-inject.es.js","../packages/components/TimerWidget/src/TimerWidget.tsx"],"sourcesContent":[null,"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],"names":["TIME_BOX_STYLES","display","flexDirection","alignItems","justifyContent","fontSize","fontWeight","width","height","backgroundColor","color","border","borderRadius","TIME_SEPARATOR_STYLES","fontFamily","TIMER_CONTENT_STYLES","position","bottom","getImageStyle","isRenderImage","imgUrl","aspectRatio","styles","Object","assign","backgroundSize","backgroundRepeat","backgroundPosition","backgroundImage","concat","paddingBottom","css","ref","insertAt","document","head","getElementsByTagName","style","createElement","type","firstChild","insertBefore","appendChild","styleSheet","cssText","createTextNode","_a","headerImg","widgetData","_f","lazyWidget","onItemView","onItemClick","onItemImpression","styleConfig","renderItem","
|
|
1
|
+
{"version":3,"file":"ct-platform-timer-widget.cjs.js","sources":["../packages/components/TimerWidget/src/utils.ts","../../../../node_modules/.pnpm/style-inject@0.3.0/node_modules/style-inject/dist/style-inject.es.js","../packages/components/TimerWidget/src/TimerWidget.tsx"],"sourcesContent":[null,"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],"names":["TIME_BOX_STYLES","display","flexDirection","alignItems","justifyContent","fontSize","fontWeight","width","height","backgroundColor","color","border","borderRadius","TIME_SEPARATOR_STYLES","fontFamily","TIMER_CONTENT_STYLES","position","bottom","getImageStyle","isRenderImage","imgUrl","aspectRatio","styles","Object","assign","backgroundSize","backgroundRepeat","backgroundPosition","backgroundImage","concat","paddingBottom","css","ref","insertAt","document","head","getElementsByTagName","style","createElement","type","firstChild","insertBefore","appendChild","styleSheet","cssText","createTextNode","_a","headerImg","widgetData","_f","lazyWidget","onItemView","onItemClick","onItemImpression","styleConfig","renderItem","_g","useState","visible","setVisible","_h","isLoading","setIsLoading","_j","useMemo","getDimensionFromImageUrl","image","url","_b","heightInNumber","widthInNumber","_k","setAspectRatio","headerImageHeight","useEffect","calculateAspectRatio","useCallback","imageUrl","image_1","Image","src","onload","renderCountdown","days","hours","minutes","seconds","_jsxs","jsxs","__assign","className","gap","children","_Fragment","Fragment","_jsx","jsx","String","padStart","colonColor","handleClick","label","window","location","href","handleView","handleIntersection","showPlaceholders","contentImgHeight","getHeightFromImgUrl","placeholderLogo","minHeight","IntersectionObserverHOC","onIntersection","onTimedObservationComplete","LazyImage","_c","timerWidgetImageWrapper","onClick","cta","targetUrl","Countdown","default","date","endTime","renderer","_d","title","_e"],"mappings":"mWAKaA,EAAiC,CAC1CC,QAAS,OACTC,cAAe,SACfC,WAAY,SACZC,eAAgB,SAChBC,SAAU,OACVC,WAAY,MACZC,MAAO,OACPC,OAAQ,OACRC,gBAAiB,OACjBC,MAAO,UACPC,OAAQ,oBACRC,aAAc,OAGLC,EAAwC,CACjDR,SAAU,OACVC,WAAY,MACZQ,WAAY,SAGHC,EAAuC,CAChDC,SAAU,WACVT,MAAO,OACPC,OAAQ,OACRP,QAAS,OACTC,cAAe,SACfE,eAAgB,MAChBD,WAAY,SACZc,OAAQ,OACRH,WAAY,4BAWHI,EAAgB,SACzBC,EACAC,EACAC,GAEA,IAAMC,EAAwB,CAC1BN,SAAU,YAcd,OAXKG,GACDI,OAAOC,OAAOF,EAAQ,CAClBf,MAAO,OACPC,OAAQ,OACRiB,eAAgB,QAChBC,iBAAkB,YAClBC,mBAAoB,SACpBC,gBAAiB,OAAOC,OAAAT,EAAS,KACjCU,cAAe,GAAGD,OAAAR,EAAc,OAGjCC,CACX,sWCnEA,SAAqBS,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,24CCHgD,SAACe,eAC7CC,E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AAf4C,EAAA9E,aAAU,EAAVA,EAAYuE,WAAG,IAAAO,OAAA,EAAAA,EAAEC,QACdhC,2BAAQL,UAAWpE,GACd,CAAAsE,SAAiB,QAAjBoC,EAAAhF,eAAAA,EAAYuE,WAAK,IAAAS,OAAA,EAAAA,EAAAD,gBAtBzB/E,aAAA,EAAAA,EAAYqD,UA8B7BN,EAAAA,IAAGF,EAAAC,SAAA,CAAAF,SAAAe,QAInB","x_google_ignoreList":[1]}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{__assign as e}from"tslib";import{jsxs as i,Fragment as t,jsx as n}from"react/jsx-runtime";import{useState as o,useMemo as l,useEffect as r,useCallback as d}from"react";import a from"react-countdown";import{LazyImage as c}from"@cleartrip/ct-platform-lazy-image";import{IntersectionObserverHOC as s}from"@cleartrip/ct-platform-io-hoc";import{placeholderLogo as m}from"@cleartrip/ct-platform-constants";import{getDimensionFromImageUrl as u,getHeightFromImgUrl as p}from"@cleartrip/ct-platform-utils";var h={display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",fontSize:"24px",fontWeight:"500",width:"60px",height:"72px",backgroundColor:"#fff",color:"#1a1a1a",border:"1px solid #1a1a1a",borderRadius:"8px"},v={fontSize:"32px",fontWeight:"500",fontFamily:"Inter"},g={position:"absolute",width:"100%",height:"100%",display:"flex",flexDirection:"column",justifyContent:"end",alignItems:"center",bottom:"24px",fontFamily:"Inter, Arial, sans-serif"},f=function(e,i,t){var n={position:"relative"};return e||Object.assign(n,{width:"100%",height:"100%",backgroundSize:"cover",backgroundRepeat:"no-repeat",backgroundPosition:"center",backgroundImage:"url(".concat(i,")"),paddingBottom:"".concat(t,"%")}),n};var x="index-module_timer-bg-image__be1qA",_="index-module_timer-container__8bcOe",b="index-module_timer-box__U7pgT",y="index-module_timer-separator__7Ga7U",w="index-module_timer-button__ZGHD-",C="index-module_placeholder__5zI9P",I="index-module_header-ph-img__CCrxL",N="index-module_content-ph-img__A20jD",S="index-module_placeholder-img-wrapper__mcqYX";!function(e,i){void 0===i&&(i={});var t=i.insertAt;if(e&&"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_timer-bg-image__be1qA{background-position:50%;background-repeat:no-repeat;background-size:cover;height:100%;position:relative;width:100%}.index-module_timer-content__p9q7H{align-items:center;bottom:24px;display:flex;flex-direction:column;font-family:Inter,Arial,sans-serif;height:100%;justify-content:end;position:absolute;width:100%}.index-module_timer-container__8bcOe{align-items:center;display:flex;width:calc(100% - 32px)}.index-module_timer-box__U7pgT{align-items:center;background-color:#fff;border:1px solid #1a1a1a;border-radius:8px;color:#1a1a1a;display:flex;flex-direction:column;font-size:24px;font-weight:500;height:72px;justify-content:center;width:60px}.index-module_timer-box__U7pgT>span:nth-child(2){font-size:12px;padding-top:4px}.index-module_timer-separator__7Ga7U{font-family:Inter!important;font-size:32px;font-weight:500}.index-module_timer-button__ZGHD-{background-color:#1a1a1a;border-radius:8px;color:#fff;font-size:14px;font-weight:600;height:40px;margin-top:16px;width:calc(100% - 32px)}.index-module_placeholder__5zI9P{padding:8px}.index-module_header-ph-img__CCrxL{height:50%;width:auto}.index-module_content-ph-img__A20jD{height:15%;position:absolute;top:40%;width:auto}.index-module_placeholder-img-wrapper__mcqYX{align-items:center;background:#fef5f2;border-radius:8px;display:flex;height:100%;justify-content:center;position:relative;width:100%}");var A=function(A){var k,z,j,D,T=A.headerImg,U=A.widgetData,
|
|
1
|
+
import{__assign as e}from"tslib";import{jsxs as i,Fragment as t,jsx as n}from"react/jsx-runtime";import{useState as o,useMemo as l,useEffect as r,useCallback as d}from"react";import a from"react-countdown";import{LazyImage as c}from"@cleartrip/ct-platform-lazy-image";import{IntersectionObserverHOC as s}from"@cleartrip/ct-platform-io-hoc";import{placeholderLogo as m}from"@cleartrip/ct-platform-constants";import{getDimensionFromImageUrl as u,getHeightFromImgUrl as p}from"@cleartrip/ct-platform-utils";var h={display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",fontSize:"24px",fontWeight:"500",width:"60px",height:"72px",backgroundColor:"#fff",color:"#1a1a1a",border:"1px solid #1a1a1a",borderRadius:"8px"},v={fontSize:"32px",fontWeight:"500",fontFamily:"Inter"},g={position:"absolute",width:"100%",height:"100%",display:"flex",flexDirection:"column",justifyContent:"end",alignItems:"center",bottom:"24px",fontFamily:"Inter, Arial, sans-serif"},f=function(e,i,t){var n={position:"relative"};return e||Object.assign(n,{width:"100%",height:"100%",backgroundSize:"cover",backgroundRepeat:"no-repeat",backgroundPosition:"center",backgroundImage:"url(".concat(i,")"),paddingBottom:"".concat(t,"%")}),n};var x="index-module_timer-bg-image__be1qA",_="index-module_timer-container__8bcOe",b="index-module_timer-box__U7pgT",y="index-module_timer-separator__7Ga7U",w="index-module_timer-button__ZGHD-",C="index-module_placeholder__5zI9P",I="index-module_header-ph-img__CCrxL",N="index-module_content-ph-img__A20jD",S="index-module_placeholder-img-wrapper__mcqYX";!function(e,i){void 0===i&&(i={});var t=i.insertAt;if(e&&"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_timer-bg-image__be1qA{background-position:50%;background-repeat:no-repeat;background-size:cover;height:100%;position:relative;width:100%}.index-module_timer-content__p9q7H{align-items:center;bottom:24px;display:flex;flex-direction:column;font-family:Inter,Arial,sans-serif;height:100%;justify-content:end;position:absolute;width:100%}.index-module_timer-container__8bcOe{align-items:center;display:flex;width:calc(100% - 32px)}.index-module_timer-box__U7pgT{align-items:center;background-color:#fff;border:1px solid #1a1a1a;border-radius:8px;color:#1a1a1a;display:flex;flex-direction:column;font-size:24px;font-weight:500;height:72px;justify-content:center;width:60px}.index-module_timer-box__U7pgT>span:nth-child(2){font-size:12px;padding-top:4px}.index-module_timer-separator__7Ga7U{font-family:Inter!important;font-size:32px;font-weight:500}.index-module_timer-button__ZGHD-{background-color:#1a1a1a;border-radius:8px;color:#fff;font-size:14px;font-weight:600;height:40px;margin-top:16px;width:calc(100% - 32px)}.index-module_placeholder__5zI9P{padding:8px}.index-module_header-ph-img__CCrxL{height:50%;width:auto}.index-module_content-ph-img__A20jD{height:15%;position:absolute;top:40%;width:auto}.index-module_placeholder-img-wrapper__mcqYX{align-items:center;background:#fef5f2;border-radius:8px;display:flex;height:100%;justify-content:center;position:relative;width:100%}");var A=function(A){var k,z,j,D,T=A.headerImg,U=A.widgetData,q=A.lazyWidget,H=void 0===q||q,W=A.onItemView,B=A.onItemClick,G=A.onItemImpression,O=A.styleConfig,E=A.renderItem,P=o(!H),R=P[0],Y=P[1],F=o(H),L=F[0],X=F[1],Z=l((function(){var e;return u(null===(e=null==U?void 0:U.image)||void 0===e?void 0:e.url)}),[null===(k=null==U?void 0:U.image)||void 0===k?void 0:k.url]),M=Z.heightInNumber,V=Z.widthInNumber,J=o(M/V*100),K=J[0],Q=J[1],$=l((function(){return u(T).height}),[T]);r((function(){var e;ee(null===(e=null==U?void 0:U.image)||void 0===e?void 0:e.url)}),[]);var ee=d((function(e){if(e){var i=new Image;i.src=e,i.onload=function(){!E&&Q(i.height/i.width*100),X(!1)}}}),[]),ie=d((function(o){var l=o.days,r=o.hours,d=o.minutes,a=o.seconds;return i("div",e({className:_,style:e({display:"flex",alignItems:"center",width:"calc(100% - 32px)"},l>0?{justifyContent:"space-between"}:{justifyContent:"center",gap:"8px"})},{children:[l>0&&i(t,{children:[i("div",e({style:h,className:b},{children:[n("span",{children:String(l).padStart(2,"0")}),n("span",{children:"DAYS"})]})),n("div",e({className:y,style:e(e({},v),{color:(null==U?void 0:U.colonColor)?"".concat(U.colonColor):"#1A1A1A"})},{children:":"}))]}),i("div",e({style:h,className:b},{children:[n("span",{children:String(r).padStart(2,"0")}),n("span",{children:"HRS"})]})),n("div",e({className:y,style:e(e({},v),{color:(null==U?void 0:U.colonColor)?"".concat(U.colonColor):"#1A1A1A"})},{children:":"})),i("div",e({style:h,className:b},{children:[n("span",{children:String(d).padStart(2,"0")}),n("span",{children:"MINS"})]})),n("div",e({className:y,style:e(e({},v),{color:(null==U?void 0:U.colonColor)?"".concat(U.colonColor):"#1A1A1A"})},{children:":"})),i("div",e({style:h,className:b},{children:[n("span",{children:String(a).padStart(2,"0")}),n("span",{children:"SECS"})]}))]}))}),[]),te=d((function(e){var i,t;B&&(null==U?void 0:U.label)&&(null===(i=null==U?void 0:U.image)||void 0===i?void 0:i.url)&&B(null==U?void 0:U.label,null===(t=null==U?void 0:U.image)||void 0===t?void 0:t.url),window.location.href=e}),[B]),ne=d((function(){var e;W&&W(null==U?void 0:U.label,null===(e=null==U?void 0:U.image)||void 0===e?void 0:e.url)}),[U,W]),oe=d((function(){var e;H&&Y(!0),G&&G(null==U?void 0:U.label,null===(e=null==U?void 0:U.image)||void 0===e?void 0:e.url)}),[U,G]),le=d((function(){var t,o=p(null===(t=null==U?void 0:U.image)||void 0===t?void 0:t.url)||180;return i("div",{children:[T&&n("div",e({className:C,style:{height:$}},{children:n("div",e({className:S},{children:n("img",{src:m,className:I})}))})),n("div",e({className:C,style:{minHeight:"".concat(o,"px")}},{children:n("div",e({className:S,style:{paddingBottom:"".concat(K,"%")}},{children:n("img",{src:m,className:N})}))}))]})}),[T,U,K]);return n(s,e({onIntersection:oe,onTimedObservationComplete:ne},{children:R?i("div",{children:[T&&n(c,{src:T,style:{width:"100%",height:$}}),!L&&i("div",e({className:x,style:e(e({},f(!!E,null===(z=null==U?void 0:U.image)||void 0===z?void 0:z.url,K)),null==O?void 0:O.timerWidgetImageWrapper),onClick:function(){var e;return te(null===(e=null==U?void 0:U.cta)||void 0===e?void 0:e.targetUrl)}},{children:[null==E?void 0:E(),i("div",e({style:g},{children:[n(a,{date:null==U?void 0:U.endTime,renderer:ie}),(null===(j=null==U?void 0:U.cta)||void 0===j?void 0:j.title)&&n("button",e({className:w},{children:null===(D=null==U?void 0:U.cta)||void 0===D?void 0:D.title}))]}))]}),null==U?void 0:U.label)]}):n(t,{children:le()})}))};export{A as TimerWidget};
|
|
2
2
|
//# sourceMappingURL=ct-platform-timer-widget.esm.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ct-platform-timer-widget.esm.js","sources":["../packages/components/TimerWidget/src/utils.ts","../../../../node_modules/.pnpm/style-inject@0.3.0/node_modules/style-inject/dist/style-inject.es.js","../packages/components/TimerWidget/src/TimerWidget.tsx"],"sourcesContent":[null,"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],"names":["TIME_BOX_STYLES","display","flexDirection","alignItems","justifyContent","fontSize","fontWeight","width","height","backgroundColor","color","border","borderRadius","TIME_SEPARATOR_STYLES","fontFamily","TIMER_CONTENT_STYLES","position","bottom","getImageStyle","isRenderImage","imgUrl","aspectRatio","styles","Object","assign","backgroundSize","backgroundRepeat","backgroundPosition","backgroundImage","concat","paddingBottom","css","ref","insertAt","document","head","getElementsByTagName","style","createElement","type","firstChild","insertBefore","appendChild","styleSheet","cssText","createTextNode","TimerWidget","_a","headerImg","widgetData","_f","lazyWidget","onItemView","onItemClick","onItemImpression","styleConfig","renderItem","
|
|
1
|
+
{"version":3,"file":"ct-platform-timer-widget.esm.js","sources":["../packages/components/TimerWidget/src/utils.ts","../../../../node_modules/.pnpm/style-inject@0.3.0/node_modules/style-inject/dist/style-inject.es.js","../packages/components/TimerWidget/src/TimerWidget.tsx"],"sourcesContent":[null,"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],"names":["TIME_BOX_STYLES","display","flexDirection","alignItems","justifyContent","fontSize","fontWeight","width","height","backgroundColor","color","border","borderRadius","TIME_SEPARATOR_STYLES","fontFamily","TIMER_CONTENT_STYLES","position","bottom","getImageStyle","isRenderImage","imgUrl","aspectRatio","styles","Object","assign","backgroundSize","backgroundRepeat","backgroundPosition","backgroundImage","concat","paddingBottom","css","ref","insertAt","document","head","getElementsByTagName","style","createElement","type","firstChild","insertBefore","appendChild","styleSheet","cssText","createTextNode","TimerWidget","_a","headerImg","widgetData","_f","lazyWidget","onItemView","onItemClick","onItemImpression","styleConfig","renderItem","_g","useState","visible","setVisible","_h","isLoading","setIsLoading","_j","useMemo","getDimensionFromImageUrl","image","url","_b","heightInNumber","widthInNumber","_k","setAspectRatio","headerImageHeight","useEffect","calculateAspectRatio","useCallback","imageUrl","image_1","Image","src","onload","renderCountdown","days","hours","minutes","seconds","_jsxs","__assign","className","gap","children","_Fragment","_jsx","String","padStart","colonColor","handleClick","label","window","location","href","handleView","handleIntersection","showPlaceholders","contentImgHeight","getHeightFromImgUrl","placeholderLogo","minHeight","IntersectionObserverHOC","onIntersection","onTimedObservationComplete","LazyImage","_c","timerWidgetImageWrapper","onClick","cta","targetUrl","Countdown","date","endTime","renderer","_d","title","_e"],"mappings":"wfAKO,IAAMA,EAAi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|
|
27
|
-
"
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
"license": "ISC"
|
|
34
|
-
}
|
|
2
|
+
"name": "@cleartrip/ct-platform-timer-widget",
|
|
3
|
+
"version": "1.6.0-beta.2",
|
|
4
|
+
"description": "Timer Widget Component",
|
|
5
|
+
"types": "dist/index.d.ts",
|
|
6
|
+
"main": "dist/ct-platform-timer-widget.cjs.js",
|
|
7
|
+
"module": "dist/ct-platform-timer-widget.esm.js",
|
|
8
|
+
"sideEffects": false,
|
|
9
|
+
"files": [
|
|
10
|
+
"dist"
|
|
11
|
+
],
|
|
12
|
+
"dependencies": {
|
|
13
|
+
"react-countdown": "^2.3.5",
|
|
14
|
+
"@cleartrip/ct-platform-constants": "1.5.0-beta.0",
|
|
15
|
+
"@cleartrip/ct-platform-io-hoc": "1.5.0-beta.0",
|
|
16
|
+
"@cleartrip/ct-platform-lazy-image": "1.5.0-beta.0",
|
|
17
|
+
"@cleartrip/ct-platform-utils": "1.5.0-beta.0",
|
|
18
|
+
"@cleartrip/ct-platform-merch-carousel": "1.6.0-beta.0"
|
|
19
|
+
},
|
|
20
|
+
"peerDependencies": {
|
|
21
|
+
"react": ">=16.8.0",
|
|
22
|
+
"react-dom": ">=16.8.0"
|
|
23
|
+
},
|
|
24
|
+
"author": "Cleartrip",
|
|
25
|
+
"license": "ISC",
|
|
26
|
+
"scripts": {
|
|
27
|
+
"test": "echo \"Error: no test specified\" && exit 1",
|
|
28
|
+
"watch-package": "rollup -c -w",
|
|
29
|
+
"build-package": "rollup -c",
|
|
30
|
+
"build-package:clean": "rm -rf dist && rollup -c"
|
|
31
|
+
}
|
|
32
|
+
}
|