@cleartrip/ct-platform-supercoins-chip 2.4.0-SNAPSHOT-native-main.0 → 2.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/SupercoinsChip.d.ts.map +1 -1
- package/dist/ct-platform-supercoins-chip.cjs.js +1 -1
- package/dist/ct-platform-supercoins-chip.cjs.js.map +1 -1
- package/dist/ct-platform-supercoins-chip.esm.js +1 -1
- package/dist/ct-platform-supercoins-chip.esm.js.map +1 -1
- package/dist/walletAnimation/index.d.ts +2 -2
- package/dist/walletAnimation/index.d.ts.map +1 -1
- package/package.json +5 -5
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SupercoinsChip.d.ts","sourceRoot":"","sources":["../packages/components/SupercoinsChip/src/SupercoinsChip.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"SupercoinsChip.d.ts","sourceRoot":"","sources":["../packages/components/SupercoinsChip/src/SupercoinsChip.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAyD,MAAM,OAAO,CAAC;AAe9E,OAAO,EAAE,mBAAmB,EAAE,MAAM,wBAAwB,CAAC;AAkB7D,QAAA,MAAM,cAAc,EAAE,KAAK,CAAC,EAAE,CAAC,mBAAmB,CAqWjD,CAAC;AAEF,eAAe,cAAc,CAAC"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";var e=require("tslib"),n=require("react/jsx-runtime"),i=require("@cleartrip/ct-design-style-manager"),r=require("react"),t=require("@cleartrip/ct-design-typography"),o=require("@cleartrip/ct-platform-shimmer"),a=require("@emotion/css"),s=require("@cleartrip/ct-platform-utils"),l=require("@cleartrip/ct-design-components");function c(e){return e&&e.__esModule?e:{default:e}}var u=c(r),p=a.keyframes({"0%":{left:"-30%"},"100%":{left:"120%"}}),d=a.keyframes({"0%":{backgroundColor:"rgba(0, 62, 162, 0.1)"},"100%":{backgroundColor:"#003ea2"}}),g=a.keyframes({"0%":{backgroundColor:"#003ea2"},"100%":{backgroundColor:"white"}}),f=a.keyframes({"0%":{color:"#000"},"100%":{color:"#fff"}}),m=a.keyframes({"0%":{color:"#fff"},"100%":{color:"#000"}});a.keyframes({"0%":{backgroundColor:"rgba(0, 62, 162, 0.1)"},"100%":{backgroundColor:"#003ea2"}});var _=i.makeWebStyles(function(e){return{supercoinsBalance:{paddingTop:6,paddingRight:8,paddingBottom:6,paddingLeft:8,borderRadius:16,borderWidth:1,borderStyle:"solid",borderColor:"#e6e6e6",display:"inline-block",backgroundColor:"#fff",overflow:"hidden"},supercoinsExpiryPill:{paddingTop:6,paddingRight:0,paddingBottom:6,paddingLeft:8,borderRadius:16,borderWidth:1.5,borderStyle:"solid",borderColor:"#c83232",display:"inline-block",backgroundColor:"#fbefef",overflow:"hidden"},supercoinChipWrapper:{display:"flex",alignItems:"center",justifyContent:"center",paddingTop:0,paddingRight:4,paddingBottom:0,paddingLeft:4},supercoinBurnTextAlign:{lineHeight:18,marginRight:4},supercoinBurnExpiryColor:{color:"#c83232"},supercoinExpiryText:{lineHeight:18,display:"inline-block",overflow:"hidden",whiteSpace:"nowrap",width:0,opacity:0,color:"#c83232",transition:"width 0.5s ease-in-out, opacity 0.5s ease-in-out"},supercoinExpiryAnimating:{width:97,opacity:1},superCoinsFloatingIslandContainer:{position:"relative",width:1,marginLeft:"100%"},supercoinsBalanceBackgroundColorShift:{position:"relative",overflow:"hidden",animation:"".concat(d," 600ms forwards"),"&::before":{content:'""',position:"absolute",left:"-30%",top:-10,width:8,height:64,background:"rgba(255, 255, 255, 0.8)",transform:"rotate(25deg)",animation:"".concat(p," 400ms ease-in 0.5s")}},supercoinsBalanceTextColorShift:{animation:"".concat(f," 600ms forwards")},supercoinsBalanceBackgroundColorShift_exit:{position:"relative",overflow:"hidden",animation:"".concat(g," 600ms forwards")},supercoinsBalanceTextColorShift_exit:{animation:"".concat(m," 600ms forwards")}}}),h="https://rukmini-ct.flixcart.com/f_auto,q_auto,dpr_2/offermgmt-prod/offermgmt/images/banner/supercoins-chip-icon.png",v="island_rendered_frquency",x="islandAnimationPlayed",y="island_expiration_frquency",C=5,w=2,b=2e3,S=500,B=1500,k=50,j=1,T=1,I=5e3;function E(e){var n,i=e.renderFloatingIsland,r=e.supercoins;if(!i)return!1;if(r<k)return!1;if(!("true"===s.getQueryParam("isMobileApp")))return!1;if(function(){var e=localStorage.getItem(v);return e&&"number"==typeof parseInt(e)?parseInt(e):0}()>=j){var t=(n=localStorage.getItem(y))&&"number"==typeof parseInt(n)?parseInt(n):null;return!t||!(t>Math.floor(Date.now()/1e3))&&(localStorage.removeItem(v),localStorage.removeItem(y),!0)}return!sessionStorage.getItem(x)}function W(){var e=localStorage.getItem(v);e||(e="0");var n=parseInt(e)+1;if(localStorage.setItem(v,n.toString()),n>=j){var i=Math.floor(Date.now()/1e3)+86400*T;localStorage.setItem(y,i.toString())}}a.keyframes({"0%":{transform:"translateY(0px)"},"60%":{transform:"translateY(-44px)"},"90%":{transform:"translateY(-40px)"},"100%":{transform:"translateY(-40px)"}}),a.keyframes({"0%":{transform:"translateY(-40px)"},"60%":{transform:"translateY(-84px)"},"90%":{transform:"translateY(-80px)"},"100%":{transform:"translateY(-80px)"}}),a.keyframes({"0%":{width:"var(--wallet-initial-width)"},"100%":{width:"var(--wallet-final-width)"}});var q=i.makeStyles(function(e){return{chipWrapper:{display:"flex",alignItems:"center",gap:4,marginBottom:20,textAlign:"center"},chipTextWrapper:{display:"flex",alignItems:"center",justifyContent:"center",paddingTop:0,paddingRight:4,paddingBottom:0,paddingLeft:4,width:"100%",textAlign:"center"},textWrapper:{marginRight:4},pillContainer:{boxSizing:"border-box",paddingTop:5,paddingRight:8,paddingBottom:5,paddingLeft:8,borderRadius:16,borderWidth:1,borderStyle:"solid",borderColor:"#e6e6e6",display:"inline-block",backgroundColor:"#fff",overflow:"hidden"},"width-animation":{animation:"width-animation 0.7s ease-in-out forwards"},"spring-up-wallet":{animation:"spring-up1 0.7s ease-in-out forwards 2s"},"spring-up-wallet-sc":{animation:"spring-up1 0.7s ease-in-out forwards 2s, spring-up2 0.7s ease-in-out forwards 5s"}}}),A={2:58,3:66,4:74,5:82,6:90,7:120};function R(i){var r=i.supercoinBalance;return n.jsxs(l.Container,e.__assign({as:"div",styleConfig:{root:["__local-".concat(q.chipWrapper)]}},{children:[n.jsx("img",{src:h,alt:"supercoin_icon",width:18,height:18}),n.jsx(l.Container,e.__assign({as:"div",styleConfig:{root:["__local-".concat(q.chipTextWrapper)]}},{children:n.jsx(t.Typography,e.__assign({variant:"B2",styleConfig:{root:[q.textWrapper]}},{children:r}))}))]}))}function P(i){var r=i.walletBalance;return n.jsxs(l.Container,e.__assign({as:"div",styleConfig:{root:["__local-".concat(q.chipWrapper)]}},{children:[n.jsx("img",{src:"https://rukmini-ct.flixcart.com/f_auto,q_auto/offermgmt-prod/offermgmt/images/banner/wallet-pill-icon.png",alt:"supercoin_icon",width:18,height:18}),n.jsx(l.Container,e.__assign({as:"div",styleConfig:{root:["__local-".concat(q.chipTextWrapper)]}},{children:n.jsxs(t.Typography,e.__assign({variant:"B2",styleConfig:{root:[q.textWrapper]}},{children:["₹",r]}))}))]}))}function M(i){var r,t=i.supercoinBalance,o=i.walletBalance,a=i.handleClick,s=i.chipWidthRef,c=0===o&&t>0||0===t&&0===o,u=c?q["spring-up-wallet-sc"]:q["spring-up-wallet"],p=Math.max(o.toString().length,t.toString().length)+1;!function(e,n){var i=document.querySelector(":root");null==i||i.style.setProperty("--wallet-initial-width","".concat(e,"px"));var r=A[n];null==i||i.style.setProperty("--wallet-final-width","".concat(Math.max(r,e),"px"))}(null!==(r=null==s?void 0:s.current)&&void 0!==r?r:0,p);var d=0===(null==s?void 0:s.current)?"auto":"".concat(null==s?void 0:s.current,"px"),g=0===(null==s?void 0:s.current)?"":q["width-animation"];return n.jsx(l.Container,e.__assign({as:"div",onClick:a},{children:n.jsx(l.Container,e.__assign({as:"div",styleConfig:{root:["__local-".concat(q.pillContainer),"__local-".concat(g),{height:32,width:d}]}},{children:n.jsxs(l.Container,e.__assign({as:"div",styleConfig:{root:["__local-".concat(u)]}},{children:[n.jsx(R,{supercoinBalance:t}),n.jsx(P,{walletBalance:o}),c?n.jsx(R,{supercoinBalance:t}):null]}))}))}))}var F=u.default.lazy(function(){return import("@cleartrip/ct-platform-supercoins-floating-island").then(function(e){return{default:e.SupercoinsFloatingIsland}})});exports.SupercoinsChip=function(a){var c=a.supercoinsLoading,u=a.supercoinBurnBalance,p=a.ravenPayload,d=void 0===p?{}:p,g=a.onSupercoinsClick,f=a.supercoinsExpiryCount,m=a.renderFloatingIsland,v=void 0===m||m,y=a.walletEnabled,k=void 0!==y&&y,j=a.walletBalance,T=a.supercoinsFetchError,q=r.useMemo(function(){var e;return null!==(e=s.getQueryParam("utm_source"))&&void 0!==e?e:"organic"},[]),A=r.useState(!1),R=A[0],P=A[1],L=r.useState(0),Y=L[0],D=L[1],H=r.useState(!1),K=H[0],N=H[1],z=r.useState(!1),Q=z[0],G=z[1],J=r.useState(!1),O=J[0],U=J[1],V=r.useMemo(function(){return"number"==typeof u&&u>=0&&!c},[u,c]),X=r.useState(!1),Z=X[0],$=X[1],ee=r.useState(null),ne=ee[0],ie=ee[1],re=r.useState(!1),te=re[0],oe=re[1],ae=r.useRef(0),se=r.useRef(!1),le="entry"===ne?_.supercoinsBalanceBackgroundColorShift:"exit"===ne?_.supercoinsBalanceBackgroundColorShift_exit:"",ce="entry"===ne?_.supercoinsBalanceTextColorShift:"exit"===ne?_.supercoinsBalanceTextColorShift_exit:"";function ue(){var n;g&&"function"==typeof g&&g();var i=d.action_event_name;d.impression_event_name;var r=e.__rest(d,["action_event_name","impression_event_name"]);s.ravenSDKTrigger(null!==(n=i)&&void 0!==n?n:"u_ui_action",e.__assign({action_name:"supercoin_icon_click",page_name:"unified_homepage",supercoin_balance:u,u_utm_source:q},r))}if(r.useEffect(function(){D(Number(null===sessionStorage||void 0===sessionStorage?void 0:sessionStorage.getItem("expiryAnimationCount")));var e=function(){window.scrollY>0&&(sessionStorage.getItem(x)||(oe(!0),ie(null)))};return window.addEventListener("scroll",e),function(){window.removeEventListener("scroll",e)}},[]),r.useEffect(function(){if(!c){var e,n=E({renderFloatingIsland:v,supercoins:u}),i="number"==typeof f&&f>=C&&!n;return P(i),n&&sessionStorage.setItem("disable_floater","true"),n&&!te?(ie("entry"),e=setTimeout(function(){$(!0)},1500),U(!0)):i?(U(!0),setTimeout(function(){k&&G(!0)},1e4)):(k&&G(!0),U(!0)),function(){clearTimeout(e)}}},[u,f,c]),r.useEffect(function(){if(v&&Z){var e=setTimeout(function(){sessionStorage.getItem(x)||($(!1),ie("exit"),G(!0))},I);return function(){clearTimeout(e)}}},[]),r.useEffect(function(){var n;if("number"==typeof u&&u>=0&&!c&&null!==f){d.action_event_name;var i=d.impression_event_name,r=e.__rest(d,["action_event_name","impression_event_name"]);s.ravenSDKTrigger(null!==(n=i)&&void 0!==n?n:"u_impression",e.__assign({action_name:"supercoin_pill_impression",page_name:"unified_homepage",supercoin_balance:u,u_utm_source:q,supercoinsExpiryCount:f||"N/A"},r))}},[c,f]),r.useEffect(function(){if(R&&!(Y>=w)){var e=setTimeout(function(){N(!0);var e=setTimeout(function(){N(!1);var e=Y+1;D(e),sessionStorage.setItem("expiryAnimationCount",e.toString())},B);return function(){return clearTimeout(e)}},0===Y?S:b);return function(){return clearTimeout(e)}}},[R,Y]),T)return n.jsx(n.Fragment,{});var pe=function(){return n.jsx(l.Container,e.__assign({as:"div",styleConfig:{root:[i.gs["px-2"],i.gs["br-16"],"__local-ba-solid","__local-bc-line-500",i.gs["bg-neutral-100"],i.gs["o-hidden"],{paddingTop:6,paddingBottom:6,display:"inline-block"}]}},{children:n.jsxs(l.Container,e.__assign({as:"div",styleConfig:{root:[i.gs.flex,i.gs["flex-row"],i.gs["flex-middle"],i.gs["flex-gap-1"]]}},{children:[n.jsx(o.Shimmer,{width:18,height:18,type:"rounded"}),n.jsx(o.Shimmer,{width:44,height:18,type:"rounded"})]}))}))};if(s.isServer())return n.jsx(pe,{});if(c||!Z&&!Q&&!O)return n.jsx(pe,{});if(!V)return null;var de=R?"HM4":"B2",ge=R?_.supercoinsExpiryPill:_.supercoinsBalance,fe=R?_.supercoinBurnExpiryColor:"";return Q?n.jsx(M,{walletBalance:j,supercoinBalance:Number(u),handleClick:ue,chipWidthRef:ae}):n.jsxs(l.Container,e.__assign({as:"div",styleConfig:{root:[{position:"relative"}]}},{children:[n.jsx(l.Container,e.__assign({as:"div",ref:function(e){var n;se.current||(se.current=!0,ae.current=null!==(n=null==e?void 0:e.offsetWidth)&&void 0!==n?n:0)},onClick:ue,styleConfig:{root:["__local-".concat(ge),"__local-".concat(le)]}},{children:n.jsxs(l.Container,e.__assign({as:"div",styleConfig:{root:[{display:"flex",alignItems:"center",gap:4}]}},{children:[n.jsx("img",{src:h,alt:"supercoin_icon",width:18,height:18}),n.jsxs(l.Container,e.__assign({as:"div",styleConfig:{root:["__local-".concat(_.supercoinChipWrapper)]}},{children:[n.jsx(t.Typography,e.__assign({variant:de,styleConfig:{root:[[ce,_.supercoinBurnTextAlign,fe].join(" ")]}},{children:K?f:u})),R&&n.jsx(t.Typography,e.__assign({variant:"HM4",styleConfig:{root:[_.supercoinExpiryText,K?_.supercoinExpiryAnimating:void 0]}},{children:"expiring soon"}))]}))]}))})),Z&&!te&&n.jsx(l.Container,e.__assign({as:"div",styleConfig:{root:["__local-".concat(_.superCoinsFloatingIslandContainer)]}},{children:n.jsx(r.Suspense,e.__assign({fallback:n.jsx(n.Fragment,{})},{children:n.jsx(F,{superCoins:u,onAnimationStart:function(){return function(n){var i,r=n.supercoins,t=n.ravenPayload,o=void 0===t?{}:t,a=n.utmSource,l=void 0===a?"":a;o.action_event_name;var c=o.impression_event_name,u=e.__rest(o,["action_event_name","impression_event_name"]);s.ravenSDKTrigger(null!==(i=c)&&void 0!==i?i:"u_impression",e.__assign({action_name:"supercoin_banner_impression",page_name:"unified_homepage",supercoin_balance:r,u_utm_source:l},u)),sessionStorage.setItem("islandAnimationPlayed","true"),W()}({supercoins:u,ravenPayload:d,utmSource:q})},onAnimationEnd:function(){setTimeout(function(){k&&G(!0)},500),ie("exit")}})}))}))]}))};
|
|
1
|
+
"use strict";var e=require("tslib"),n=require("react/jsx-runtime"),i=require("react"),r=require("@cleartrip/ct-design-typography"),o=require("@cleartrip/ct-platform-shimmer"),t=require("@cleartrip/ct-platform-utils");function a(e){return e&&e.__esModule?e:{default:e}}var s=a(i);function l(e,n){void 0===n&&(n={});var i=n.insertAt;if(e&&"undefined"!=typeof document){var r=document.head||document.getElementsByTagName("head")[0],o=document.createElement("style");o.type="text/css","top"===i&&r.firstChild?r.insertBefore(o,r.firstChild):r.appendChild(o),o.styleSheet?o.styleSheet.cssText=e:o.appendChild(document.createTextNode(e))}}var u={supercoinsBalance:"index-module_supercoinsBalance__w9srh",supercoinsExpiryPill:"index-module_supercoinsExpiryPill__v4w06",supercoinChipWrapper:"index-module_supercoinChipWrapper__QPdUS",supercoinBurnTextAlign:"index-module_supercoinBurnTextAlign__g-go5",supercoinBurnExpiryColor:"index-module_supercoinBurnExpiryColor__FTFjA",supercoinExpiryText:"index-module_supercoinExpiryText__rkVbG",supercoinExpiryAnimating:"index-module_supercoinExpiryAnimating__Gdq0n",superCoinsFloatingIslandContainer:"index-module_superCoinsFloatingIslandContainer__5FNNa",supercoinsBalanceBackgroundColorShift:"index-module_supercoinsBalanceBackgroundColorShift__r6YWa",supercoins_balance_background_color_shift:"index-module_supercoins_balance_background_color_shift__1NHEU",supercoinsBalanceTextColorShift:"index-module_supercoinsBalanceTextColorShift__y7vva",supercoins_balance_text_color_shift:"index-module_supercoins_balance_text_color_shift__V8yxU",supercoinsBalanceBackgroundColorShift_exit:"index-module_supercoinsBalanceBackgroundColorShift_exit__sinUJ",supercoins_balance_background_color_shift_exit:"index-module_supercoins_balance_background_color_shift_exit__qAHuv",supercoinsBalanceTextColorShift_exit:"index-module_supercoinsBalanceTextColorShift_exit__JKt90",supercoins_balance_text_color_shift_exit:"index-module_supercoins_balance_text_color_shift_exit__rluZH",supercoin_chip_loading_shimmer:"index-module_supercoin_chip_loading_shimmer__0jquY",supercoins_balance_background_shimmer:"index-module_supercoins_balance_background_shimmer__2lOFp"};l('.index-module_supercoinsBalance__w9srh{background-color:#fff;border:1px solid #e6e6e6;border-radius:16px;display:inline-block;overflow:hidden;padding:6px 8px}.index-module_supercoinsExpiryPill__v4w06{background-color:#fbefef;border:1.5px solid #c83232;border-radius:16px;display:inline-block;overflow:hidden;padding:6px 0 6px 8px}.index-module_supercoinChipWrapper__QPdUS{align-items:center;display:flex;justify-content:center;padding:0 4px}.index-module_supercoinBurnTextAlign__g-go5{line-height:18px;margin-right:4px}.index-module_supercoinBurnExpiryColor__FTFjA{color:#c83232!important}.index-module_supercoinExpiryText__rkVbG{color:#c83232!important;display:inline-block;line-height:18px;opacity:0;overflow:hidden;transition:width .5s ease-in-out,opacity .5s ease-in-out;white-space:nowrap;width:0}.index-module_supercoinExpiryAnimating__Gdq0n{opacity:1;width:97px}.index-module_superCoinsFloatingIslandContainer__5FNNa{margin-left:100%;position:relative;width:1px}.index-module_supercoinsBalanceBackgroundColorShift__r6YWa{animation:index-module_supercoins_balance_background_color_shift__1NHEU .6s forwards;overflow:hidden;position:relative}.index-module_supercoinsBalanceTextColorShift__y7vva{animation:index-module_supercoins_balance_text_color_shift__V8yxU .6s forwards}.index-module_supercoinsBalanceBackgroundColorShift_exit__sinUJ{animation:index-module_supercoins_balance_background_color_shift_exit__qAHuv .6s forwards;overflow:hidden;position:relative}.index-module_supercoinsBalanceTextColorShift_exit__JKt90{animation:index-module_supercoins_balance_text_color_shift_exit__rluZH .6s forwards}.index-module_supercoinsBalanceBackgroundColorShift__r6YWa:before{animation:index-module_supercoin_chip_loading_shimmer__0jquY .4s ease-in .5s;background:hsla(0,0%,100%,.8);content:"";height:64px;left:-30%;position:absolute;top:-10px;transform:rotate(25deg);width:8px}@keyframes index-module_supercoin_chip_loading_shimmer__0jquY{0%{left:-30%}to{left:120%}}@keyframes index-module_supercoins_balance_background_color_shift__1NHEU{0%{background-color:rgba(0,62,162,.1)}to{background-color:#003ea2}}@keyframes index-module_supercoins_balance_background_color_shift_exit__qAHuv{0%{background-color:#003ea2}to{background-color:#fff}}@keyframes index-module_supercoins_balance_text_color_shift__V8yxU{0%{color:#000}to{color:#fff}}@keyframes index-module_supercoins_balance_text_color_shift_exit__rluZH{0%{color:#fff}to{color:#000}}@keyframes index-module_supercoins_balance_background_shimmer__2lOFp{0%{background-color:rgba(0,62,162,.1)}to{background-color:#003ea2}}');var c="https://rukmini-ct.flixcart.com/f_auto,q_auto,dpr_2/offermgmt-prod/offermgmt/images/banner/supercoins-chip-icon.png",_="https://rukmini-ct.flixcart.com/f_auto,q_auto/offermgmt-prod/offermgmt/images/banner/wallet-pill-icon.png",p="island_rendered_frquency",d="islandAnimationPlayed",m="island_expiration_frquency",x=5,f=2,g=2e3,h=500,v=1500,y={requiredSupercoins:50,frequency:1,frequencyGapInDays:1,cutoffTimeInMs:5e3,isVisibleOnScroll:!1};function b(e){var n,i=e.renderFloatingIsland,r=e.supercoins;if(!i)return!1;if(r<y.requiredSupercoins)return!1;if(!("true"===t.getQueryParam("isMobileApp")))return!1;if(function(){var e=localStorage.getItem(p);return e&&"number"==typeof parseInt(e)?parseInt(e):0}()>=y.frequency){var o=(n=localStorage.getItem(m))&&"number"==typeof parseInt(n)?parseInt(n):null;return!o||!(o>Math.floor(Date.now()/1e3))&&(localStorage.removeItem(p),localStorage.removeItem(m),!0)}return!sessionStorage.getItem(d)}function w(){var e=localStorage.getItem(p);e||(e="0");var n=parseInt(e)+1;if(localStorage.setItem(p,n.toString()),n>=y.frequency){var i=Math.floor(Date.now()/1e3)+86400*y.frequencyGapInDays;localStorage.setItem(m,i.toString())}}var S={chipWrapper:"index-module_chipWrapper__EwpUk",chipTextWrapper:"index-module_chipTextWrapper__Uburn",textWrapper:"index-module_textWrapper__BysJP",pillContainer:"index-module_pillContainer__bz7P4","width-animation":"index-module_width-animation__Ap-Ga","spring-up-wallet":"index-module_spring-up-wallet__GJrXW","spring-up1":"index-module_spring-up1__OLe4L","spring-up-wallet-sc":"index-module_spring-up-wallet-sc__KKKf0","spring-up2":"index-module_spring-up2__SIbCp"};l(".index-module_chipWrapper__EwpUk{align-items:center;display:flex;gap:4px;margin-bottom:20px;text-align:center}.index-module_chipTextWrapper__Uburn{align-items:center;display:flex;justify-content:center;padding:0 4px;text-align:center;width:100%}.index-module_textWrapper__BysJP{margin-right:4px}.index-module_pillContainer__bz7P4{background-color:#fff;border:1px solid #e6e6e6;border-radius:16px;box-sizing:border-box;display:inline-block;overflow:hidden;padding:5px 8px}@keyframes index-module_spring-up1__OLe4L{0%{transform:translateY(0)}60%{transform:translateY(-44px)}90%{transform:translateY(-40px)}to{transform:translateY(-40px)}}@keyframes index-module_spring-up2__SIbCp{0%{transform:translateY(-40px)}60%{transform:translateY(-84px)}90%{transform:translateY(-80px)}to{transform:translateY(-80px)}}@keyframes index-module_width-animation__Ap-Ga{0%{width:var(--wallet-initial-width)}to{width:var(--wallet-final-width)}}.index-module_width-animation__Ap-Ga{animation:index-module_width-animation__Ap-Ga .7s ease-in-out forwards}.index-module_spring-up-wallet__GJrXW{animation:index-module_spring-up1__OLe4L .7s ease-in-out 2s forwards}.index-module_spring-up-wallet-sc__KKKf0{animation:index-module_spring-up1__OLe4L .7s ease-in-out 2s forwards,index-module_spring-up2__SIbCp .7s ease-in-out 5s forwards}");var B={2:58,3:66,4:74,5:82,6:90,7:120};function k(i){var o=i.supercoinBalance;return n.jsxs("div",e.__assign({className:S.chipWrapper},{children:[n.jsx("img",{src:c,alt:"supercoin_icon",width:18,height:18}),n.jsx("div",e.__assign({className:S.chipTextWrapper},{children:n.jsx(r.Typography,e.__assign({variant:"B2",className:S.textWrapper},{children:o}))}))]}))}function C(i){var o=i.walletBalance;return n.jsxs("div",e.__assign({className:S.chipWrapper},{children:[n.jsx("img",{src:_,alt:"supercoin_icon",width:18,height:18}),n.jsx("div",e.__assign({className:S.chipTextWrapper},{children:n.jsxs(r.Typography,e.__assign({variant:"B2",className:S.textWrapper},{children:["₹",o]}))}))]}))}function T(i){var r,o=i.supercoinBalance,t=i.walletBalance,a=i.handleClick,s=i.chipWidthRef,l=0===t&&o>0||0===o&&0===t,u=l?S["spring-up-wallet-sc"]:S["spring-up-wallet"],c=Math.max(t.toString().length,o.toString().length)+1;!function(e,n){var i=document.querySelector(":root");null==i||i.style.setProperty("--wallet-initial-width","".concat(e,"px"));var r=B[n];null==i||i.style.setProperty("--wallet-final-width","".concat(Math.max(r,e),"px"))}(null!==(r=null==s?void 0:s.current)&&void 0!==r?r:0,c);var _=0===(null==s?void 0:s.current)?"auto":"".concat(null==s?void 0:s.current,"px"),p=0===(null==s?void 0:s.current)?"":S["width-animation"];return n.jsx("div",e.__assign({onClick:a},{children:n.jsx("div",e.__assign({className:"".concat(S.pillContainer," ").concat(p),style:{height:"32px",width:_}},{children:n.jsxs("div",e.__assign({className:u},{children:[n.jsx(k,{supercoinBalance:o}),n.jsx(C,{walletBalance:t}),l?n.jsx(k,{supercoinBalance:o}):null]}))}))}))}var j=s.default.lazy((function(){return import("@cleartrip/ct-platform-supercoins-floating-island").then((function(e){return{default:e.SupercoinsFloatingIsland}}))}));exports.SupercoinsChip=function(a){var s=a.supercoinsLoading,l=a.supercoinBurnBalance,_=a.ravenPayload,p=void 0===_?{}:_,m=a.onSupercoinsClick,S=a.supercoinsExpiryCount,B=a.renderFloatingIsland,k=void 0===B||B,C=a.walletEnabled,E=void 0!==C&&C,I=a.walletBalance,N=a.supercoinsFetchError,W=i.useMemo((function(){var e;return null!==(e=t.getQueryParam("utm_source"))&&void 0!==e?e:"organic"}),[]),q=i.useState(!1),A=q[0],F=q[1],P=i.useState(0),Y=P[0],U=P[1],G=i.useState(!1),M=G[0],H=G[1],K=i.useState(!1),L=K[0],J=K[1],D=i.useState(!1),O=D[0],V=D[1],z=i.useMemo((function(){return"number"==typeof l&&l>=0&&!s}),[l,s]),Q=i.useState(!1),R=Q[0],Z=Q[1],X=i.useState(null),$=X[0],ee=X[1],ne=i.useState(!1),ie=ne[0],re=ne[1],oe=i.useRef(0),te=i.useRef(!1),ae="entry"===$?u.supercoinsBalanceBackgroundColorShift:"exit"===$?u.supercoinsBalanceBackgroundColorShift_exit:"",se="entry"===$?u.supercoinsBalanceTextColorShift:"exit"===$?u.supercoinsBalanceTextColorShift_exit:"";function le(){var n;m&&"function"==typeof m&&m();var i=p.action_event_name;p.impression_event_name;var r=e.__rest(p,["action_event_name","impression_event_name"]);t.ravenSDKTrigger(null!==(n=i)&&void 0!==n?n:"u_ui_action",e.__assign({action_name:"supercoin_icon_click",page_name:"unified_homepage",supercoin_balance:l,u_utm_source:W},r))}if(i.useEffect((function(){U(Number(null===sessionStorage||void 0===sessionStorage?void 0:sessionStorage.getItem("expiryAnimationCount")));var e=function(){window.scrollY>0&&(sessionStorage.getItem(d)||(re(!0),ee(null)))};return window.addEventListener("scroll",e),function(){window.removeEventListener("scroll",e)}}),[]),i.useEffect((function(){if(!s){var e,n=b({renderFloatingIsland:k,supercoins:l}),i="number"==typeof S&&S>=x&&!n;return F(i),n&&sessionStorage.setItem("disable_floater","true"),n&&!ie?(ee("entry"),e=setTimeout((function(){Z(!0)}),1500),V(!0)):i?(V(!0),setTimeout((function(){E&&J(!0)}),1e4)):(E&&J(!0),V(!0)),function(){clearTimeout(e)}}}),[l,S,s]),i.useEffect((function(){if(k&&R){var e=setTimeout((function(){sessionStorage.getItem(d)||(Z(!1),ee("exit"),J(!0))}),y.cutoffTimeInMs);return function(){clearTimeout(e)}}}),[]),i.useEffect((function(){var n;if("number"==typeof l&&l>=0&&!s&&null!==S){p.action_event_name;var i=p.impression_event_name,r=e.__rest(p,["action_event_name","impression_event_name"]);t.ravenSDKTrigger(null!==(n=i)&&void 0!==n?n:"u_impression",e.__assign({action_name:"supercoin_pill_impression",page_name:"unified_homepage",supercoin_balance:l,u_utm_source:W,supercoinsExpiryCount:S||"N/A"},r))}}),[s,S]),i.useEffect((function(){if(A&&!(Y>=f)){var e=setTimeout((function(){H(!0);var e=setTimeout((function(){H(!1);var e=Y+1;U(e),sessionStorage.setItem("expiryAnimationCount",e.toString())}),v);return function(){return clearTimeout(e)}}),0===Y?h:g);return function(){return clearTimeout(e)}}}),[A,Y]),N)return n.jsx(n.Fragment,{});var ue=function(){return n.jsx("div",e.__assign({className:"px-2 br-16 ba-solid bc-line-500 bg-neutral-100 o-hidden",style:{paddingTop:"6px",paddingBottom:"6px",display:"inline-block"}},{children:n.jsxs("div",e.__assign({className:"flex flex-middle flex-gap-1"},{children:[n.jsx(o.Shimmer,{width:18,height:18,type:"rounded"}),n.jsx(o.Shimmer,{width:44,height:18,type:"rounded"})]}))}))};if(t.isServer())return n.jsx(ue,{});if(s||!R&&!L&&!O)return n.jsx(ue,{});if(!z)return null;var ce=A?"HM4":"B2",_e=A?u.supercoinsExpiryPill:u.supercoinsBalance,pe=A?u.supercoinBurnExpiryColor:"";return L?n.jsx(T,{walletBalance:I,supercoinBalance:Number(l),handleClick:le,chipWidthRef:oe}):n.jsxs("div",e.__assign({style:{position:"relative"}},{children:[n.jsx("div",e.__assign({ref:function(e){var n;te.current||(te.current=!0,oe.current=null!==(n=null==e?void 0:e.offsetWidth)&&void 0!==n?n:0)},className:"".concat(_e," ").concat(ae),onClick:le},{children:n.jsxs("div",e.__assign({style:{display:"flex",alignItems:"center",gap:"4px"}},{children:[n.jsx("img",{src:c,alt:"supercoin_icon",width:18,height:18}),n.jsxs("div",e.__assign({className:u.supercoinChipWrapper},{children:[n.jsx(r.Typography,e.__assign({variant:ce,className:[se,u.supercoinBurnTextAlign,pe].join(" ")},{children:M?S:l})),A&&n.jsx(r.Typography,e.__assign({variant:"HM4",className:"".concat(u.supercoinExpiryText," ").concat(M?u.supercoinExpiryAnimating:"")},{children:"expiring soon"}))]}))]}))})),R&&!ie&&n.jsx("div",e.__assign({className:u.superCoinsFloatingIslandContainer},{children:n.jsx(i.Suspense,e.__assign({fallback:n.jsx(n.Fragment,{})},{children:n.jsx(j,{superCoins:l,onAnimationStart:function(){return function(n){var i,r=n.supercoins,o=n.ravenPayload,a=void 0===o?{}:o,s=n.utmSource,l=void 0===s?"":s;a.action_event_name;var u=a.impression_event_name,c=e.__rest(a,["action_event_name","impression_event_name"]);t.ravenSDKTrigger(null!==(i=u)&&void 0!==i?i:"u_impression",e.__assign({action_name:"supercoin_banner_impression",page_name:"unified_homepage",supercoin_balance:r,u_utm_source:l},c)),sessionStorage.setItem("islandAnimationPlayed","true"),w()}({supercoins:l,ravenPayload:p,utmSource:W})},onAnimationEnd:function(){setTimeout((function(){E&&J(!0)}),500),ee("exit")}})}))}))]}))};
|
|
2
2
|
//# sourceMappingURL=ct-platform-supercoins-chip.cjs.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ct-platform-supercoins-chip.cjs.js","sources":["../packages/components/SupercoinsChip/src/index.module.ts","../packages/components/SupercoinsChip/src/constants.ts","../packages/components/SupercoinsChip/src/utils/shouldRenderFloatingIsland.ts","../packages/components/SupercoinsChip/src/utils/onIslandAnimationStart.ts","../packages/components/SupercoinsChip/src/walletAnimation/index.module.ts","../packages/components/SupercoinsChip/src/utils/setWalletCssVariables.ts","../packages/components/SupercoinsChip/src/walletAnimation/index.tsx","../packages/components/SupercoinsChip/src/SupercoinsChip.tsx"],"sourcesContent":[null,null,null,null,null,null,null,null],"names":["supercoin_chip_loading_shimmer","keyframes","left","supercoins_balance_background_color_shift","backgroundColor","supercoins_balance_background_color_shift_exit","supercoins_balance_text_color_shift","color","supercoins_balance_text_color_shift_exit","styles","makeWebStyles","theme","supercoinsBalance","paddingTop","paddingRight","paddingBottom","paddingLeft","borderRadius","borderWidth","borderStyle","borderColor","display","overflow","supercoinsExpiryPill","supercoinChipWrapper","alignItems","justifyContent","supercoinBurnTextAlign","lineHeight","marginRight","supercoinBurnExpiryColor","supercoinExpiryText","whiteSpace","width","opacity","transition","supercoinExpiryAnimating","superCoinsFloatingIslandContainer","position","marginLeft","supercoinsBalanceBackgroundColorShift","animation","concat","content","top","height","background","transform","supercoinsBalanceTextColorShift","supercoinsBalanceBackgroundColorShift_exit","supercoinsBalanceTextColorShift_exit","SUPERCOINS_CHIP_ICON","SUPERCOIN_ISLAND_RENDERED_FREQUENCY","SUPERCOIN_ISLAND_ANIMATION_PLAYED","SUPERCOIN_ISLAND_EXPIRATION_FREQUENCY","SUPERCOIN_EXPIRY_CONFIG","SUPERCOIN_FLOATING_ISLAND_CONFIG","shouldRenderFloatingIsland","_a","expiry","renderFloatingIsland","supercoins","getQueryParam","frequency","localStorage","getItem","parseInt","getIslandShownFrequency","expiryEpoch","Math","floor","Date","now","removeItem","sessionStorage","incrementAnimationPlayedFrequency","currentFrequency","setItem","toString","makeStyles","chipWrapper","gap","marginBottom","textAlign","chipTextWrapper","textWrapper","pillContainer","boxSizing","widthByNumberOfCharactersMap","SupercoinChip","supercoinBalance","_jsxs","Container","__assign","as","styleConfig","root","children","_jsx","src","alt","Typography","variant","WalletChip","walletBalance","WalletAnimation","handleClick","chipWidthRef","renderSupercoinPillOnAnimationEnd","wrapperAnimation","maxNumberOfCharacters","max","length","chipWidth","numberOfCharacters","ctx","document","querySelector","style","setProperty","setWalletCSSVariables","_b","current","containerClass","onClick","LazySuperCoinsFloatingIsland","React","lazy","then","module","default","SupercoinsFloatingIsland","supercoinsLoading","supercoinBurnBalance","ravenPayload","onSupercoinsClick","supercoinsExpiryCount","_c","_d","walletEnabled","supercoinsFetchError","utmSource","useMemo","_e","useState","showSupercoinExpiryAnimation","setSupercoinExpiryAnimation","_f","animationCount","setAnimationCount","_g","isAnimating","setIsAnimating","_h","startWalletAnimation","setStartWalletAnimation","_j","calculatedAnimation","setCalculatedAnimation","shouldRenderSupercoins","_k","renderSuperCoinIsland","setRenderSuperCoinIsland","_l","chipAnimationType","setChipAnimationType","_m","hasScrolledBeforeAnimation","setHasScrolledBeforeAnimation","useRef","chipWidthCalculatedRef","chipBackgroundAnimationClassname","chipTextAnimationClassname","handleSupercoinsClick","action_event_name","impression_event_name","restPayload","__rest","ravenSDKTrigger","action_name","page_name","supercoin_balance","u_utm_source","useEffect","Number","handleScroll","window","scrollY","addEventListener","removeEventListener","timeout","shouldRender","renderSupercoinExpiry","setTimeout","clearTimeout","startTimer","switchBackTimer","newCount","SupercoinLoadingPill","gs","Shimmer","type","isServer","typographyVariant","chipClassName","expiryColorClass","ref","offsetWidth","join","undefined","Suspense","fallback","_Fragment","superCoins","onAnimationStart","onIslandAnimationStart","onAnimationEnd"],"mappings":"8YAEMA,EAAiCC,EAAAA,UAAU,CAC/C,KAAM,CACJC,KAAM,QAER,OAAQ,CACNA,KAAM,UAIJC,EAA4CF,EAAAA,UAAU,CAC1D,KAAM,CACJG,gBAAiB,yBAEnB,OAAQ,CACNA,gBAAiB,aAIfC,EAAiDJ,EAAAA,UAAU,CAC/D,KAAM,CACJG,gBAAiB,WAEnB,OAAQ,CACNA,gBAAiB,WAIfE,EAAsCL,EAAAA,UAAU,CACpD,KAAM,CACJM,MAAO,QAET,OAAQ,CACNA,MAAO,UAILC,EAA2CP,EAAAA,UAAU,CACzD,KAAM,CACJM,MAAO,QAET,OAAQ,CACNA,MAAO,UAImCN,EAAAA,UAAU,CACtD,KAAM,CACJG,gBAAiB,yBAEnB,OAAQ,CACNA,gBAAiB,aAMrB,IAAMK,EAASC,EAAAA,cAAc,SAAAC,GAAS,MAAA,CACpCC,kBAAmB,CACjBC,WAAY,EACZC,aAAc,EACdC,cAAe,EACfC,YAAa,EACbC,aAAc,GACdC,YAAa,EACbC,YAAa,QACbC,YAAa,UACbC,QAAS,eACTjB,gBAAiB,OACjBkB,SAAU,UAGZC,qBAAsB,CACpBV,WAAY,EACZC,aAAc,EACdC,cAAe,EACfC,YAAa,EACbC,aAAc,GACdC,YAAa,IACbC,YAAa,QACbC,YAAa,UACbC,QAAS,eACTjB,gBAAiB,UACjBkB,SAAU,UAGZE,qBAAsB,CACpBH,QAA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,aAAAA,OAAY,IAAAG,EAAG,CAAA,EAAEA,EACjBC,EAAAhF,EAAAmF,UAAAA,WAASH,EAAG,GAAEA,EAKVJ,EAAYwC,sBADWC,EACvBzC,EAAYyC,sBADqCC,EAAWC,SAC5D3C,EADE,CAAA,oBAAA,0BAEN4C,kBAAiD,QAAjCzD,EAACsD,SAAgC,IAAAtD,EAAAA,EAAI,2BACjD0D,YAAa,8BACbC,UAAW,mBACXC,kBAAmBxH,EACnByH,aAAczC,GACXmC,IAIPtG,eAAeG,QAAQ,wBAAyB,QAGhDF,GACJ,CI0VgC4I,CAAuB,CACnB1J,WAAYwE,EACZC,aAAYA,EACZO,UAASA,GAHb,EAMJ2E,eAnUxB,WACIvB,WAAW,WACHtD,GAAegB,GAAwB,EAC/C,EAAG,KACHU,GAAqB,OACzB,aAqUJ"}
|
|
1
|
+
{"version":3,"file":"ct-platform-supercoins-chip.cjs.js","sources":["../../../../node_modules/.pnpm/style-inject@0.3.0/node_modules/style-inject/dist/style-inject.es.js","../packages/components/SupercoinsChip/src/constants.ts","../packages/components/SupercoinsChip/src/utils/shouldRenderFloatingIsland.ts","../packages/components/SupercoinsChip/src/utils/onIslandAnimationStart.ts","../packages/components/SupercoinsChip/src/utils/setWalletCssVariables.ts","../packages/components/SupercoinsChip/src/walletAnimation/index.tsx","../packages/components/SupercoinsChip/src/SupercoinsChip.tsx"],"sourcesContent":["function styleInject(css, ref) {\n if ( ref === void 0 ) ref = {};\n var insertAt = ref.insertAt;\n\n if (!css || typeof document === 'undefined') { return; }\n\n var head = document.head || document.getElementsByTagName('head')[0];\n var style = document.createElement('style');\n style.type = 'text/css';\n\n if (insertAt === 'top') {\n if (head.firstChild) {\n head.insertBefore(style, head.firstChild);\n } else {\n head.appendChild(style);\n }\n } else {\n head.appendChild(style);\n }\n\n if (style.styleSheet) {\n style.styleSheet.cssText = css;\n } else {\n style.appendChild(document.createTextNode(css));\n }\n}\n\nexport default styleInject;\n",null,null,null,null,null,null],"names":["styleInject","css","ref","insertAt","document","head","getElementsByTagName","style","createElement","type","firstChild","insertBefore","appendChild","styleSheet","cssText","createTextNode","SUPERCOINS_CHIP_ICON","WALLET_CHIP_ICON","SUPERCOIN_ISLAND_RENDERED_FREQUENCY","SUPERCOIN_ISLAND_ANIMATION_PLAYED","SUPERCOIN_ISLAND_EXPIRATION_FREQUENCY","SUPERCOIN_EXPIRY_CONFIG","SUPERCOIN_FLOATING_ISLAND_CONFIG","requiredSupercoins","frequency","frequencyGapInDays","cutoffTimeInMs","isVisibleOnScroll","shouldRenderFloatingIsland","_a","expiry","renderFloatingIsland","supercoins","getQueryParam","localStorage","getItem","parseInt","getIslandShownFrequency","expiryEpoch","Math","floor","Date","now","removeItem","sessionStorage","incrementAnimationPlayedFrequency","currentFrequency","setItem","toString","widthByNumberOfCharactersMap","SupercoinChip","supercoinBalance","_jsxs","className","styles","chipWrapper","children","_jsx","jsx","src","alt","width","height","__assign","chipTextWrapper","Typography","variant","textWrapper","WalletChip","walletBalance","WalletAnimation","handleClick","chipWidthRef","renderSupercoinPillOnAnimationEnd","wrapperAnimation","maxNumberOfCharacters","max","length","chipWidth","numberOfCharacters","ctx","querySelector","setProperty","concat","setWalletCSSVariables","_b","current","containerClass","onClick","pillContainer","LazySuperCoinsFloatingIsland","React","lazy","import","then","module","default","SupercoinsFloatingIsland","supercoinsLoading","supercoinBurnBalance","ravenPayload","onSupercoinsClick","supercoinsExpiryCount","_c","_d","walletEnabled","supercoinsFetchError","utmSource","useMemo","_e","useState","showSupercoinExpiryAnimation","setSupercoinExpiryAnimation","_f","animationCount","setAnimationCount","_g","isAnimating","setIsAnimating","_h","startWalletAnimation","setStartWalletAnimation","_j","calculatedAnimation","setCalculatedAnimation","shouldRenderSupercoins","_k","renderSuperCoinIsland","setRenderSuperCoinIsland","_l","chipAnimationType","setChipAnimationType","_m","hasScrolledBeforeAnimation","setHasScrolledBeforeAnimation","useRef","chipWidthCalculatedRef","chipBackgroundAnimationClassname","supercoinsBalanceBackgroundColorShift","supercoinsBalanceBackgroundColorShift_exit","chipTextAnimationClassname","supercoinsBalanceTextColorShift","supercoinsBalanceTextColorShift_exit","handleSupercoinsClick","action_event_name","impression_event_name","restPayload","__rest","ravenSDKTrigger","action_name","page_name","supercoin_balance","u_utm_source","useEffect","Number","handleScroll","window","scrollY","addEventListener","removeEventListener","timeout","shouldRender","renderSupercoinExpiry","setTimeout","clearTimeout","startTimer","switchBackTimer","newCount","SupercoinLoadingPill","paddingTop","paddingBottom","display","Shimmer","isServer","typographyVariant","chipClassName","supercoinsExpiryPill","supercoinsBalance","expiryColorClass","supercoinBurnExpiryColor","position","offsetWidth","jsxs","alignItems","gap","supercoinChipWrapper","supercoinBurnTextAlign","join","supercoinExpiryText","supercoinExpiryAnimating","superCoinsFloatingIslandContainer","Suspense","fallback","superCoins","onAnimationStart","onIslandAnimationStart","onAnimationEnd"],"mappings":"uRAAA,SAASA,EAAYC,EAAKC,QACX,IAARA,IAAiBA,EAAM,CAAA,GAC5B,IAAIC,EAAWD,EAAIC,SAEnB,GAAKF,GAA2B,oBAAbG,SAAnB,CAEA,IAAIC,EAAOD,SAASC,MAAQD,SAASE,qBAAqB,QAAQ,GAC9DC,EAAQH,SAASI,cAAc,SACnCD,EAAME,KAAO,WAEI,QAAbN,GACEE,EAAKK,WACPL,EAAKM,aAAaJ,EAAOF,EAAKK,YAKhCL,EAAKO,YAAYL,GAGfA,EAAMM,WACRN,EAAMM,WAAWC,QAAUb,EAE3BM,EAAMK,YAAYR,SAASW,eAAed,GAnBW,CAqBzD,8hICzBO,IAAMe,EACT,sHAESC,EACT,4GAESC,EAAsC,2BAEtCC,EAAoC,wBAEpCC,EACT,6BAISC,EACkB,EADlBA,EAEK,EAFLA,EAGyB,IAHzBA,EAIkB,IAJlBA,EAKkB,KAGlBC,EAAmC,CAC5CC,mBAAoB,GACpBC,UAAW,EACXC,mBAAoB,EACpBC,eAAgB,IAChBC,mBAAmB,GCPC,SAAAC,EAA2BC,OALzCC,EAMNC,EA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,EAAAA,EAAA,2BACjDgE,YAAa,8BACbC,UAAW,mBACXC,kBAAmBvH,EACnBwH,aAAc7C,GACXuC,IAIPtG,eAAeG,QAAQ,wBAAyB,QAGhDF,GACJ,CG2TgCsJ,CAAuB,CACnBnK,WAAYmE,EACZC,aAAYA,EACZO,UAASA,KAGjByF,eAvSxB,WACIjC,YAAW,WACH1D,GAAegB,GAAwB,EAC9C,GAAE,KACHU,GAAqB,OACxB,aAySL","x_google_ignoreList":[0]}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{__rest as n,__assign as e}from"tslib";import{jsx as o,jsxs as i,Fragment as t}from"react/jsx-runtime";import{makeWebStyles as r,makeStyles as a,gs as l}from"@cleartrip/ct-design-style-manager";import c,{useMemo as s,useState as u,useRef as p,useEffect as d,Suspense as f}from"react";import{Typography as m}from"@cleartrip/ct-design-typography";import{Shimmer as g}from"@cleartrip/ct-platform-shimmer";import{keyframes as h}from"@emotion/css";import{getQueryParam as v,ravenSDKTrigger as _,isServer as y}from"@cleartrip/ct-platform-utils";import{Container as x}from"@cleartrip/ct-design-components";var w=h({"0%":{left:"-30%"},"100%":{left:"120%"}}),C=h({"0%":{backgroundColor:"rgba(0, 62, 162, 0.1)"},"100%":{backgroundColor:"#003ea2"}}),b=h({"0%":{backgroundColor:"#003ea2"},"100%":{backgroundColor:"white"}}),B=h({"0%":{color:"#000"},"100%":{color:"#fff"}}),S=h({"0%":{color:"#fff"},"100%":{color:"#000"}});h({"0%":{backgroundColor:"rgba(0, 62, 162, 0.1)"},"100%":{backgroundColor:"#003ea2"}});var I=r(function(n){return{supercoinsBalance:{paddingTop:6,paddingRight:8,paddingBottom:6,paddingLeft:8,borderRadius:16,borderWidth:1,borderStyle:"solid",borderColor:"#e6e6e6",display:"inline-block",backgroundColor:"#fff",overflow:"hidden"},supercoinsExpiryPill:{paddingTop:6,paddingRight:0,paddingBottom:6,paddingLeft:8,borderRadius:16,borderWidth:1.5,borderStyle:"solid",borderColor:"#c83232",display:"inline-block",backgroundColor:"#fbefef",overflow:"hidden"},supercoinChipWrapper:{display:"flex",alignItems:"center",justifyContent:"center",paddingTop:0,paddingRight:4,paddingBottom:0,paddingLeft:4},supercoinBurnTextAlign:{lineHeight:18,marginRight:4},supercoinBurnExpiryColor:{color:"#c83232"},supercoinExpiryText:{lineHeight:18,display:"inline-block",overflow:"hidden",whiteSpace:"nowrap",width:0,opacity:0,color:"#c83232",transition:"width 0.5s ease-in-out, opacity 0.5s ease-in-out"},supercoinExpiryAnimating:{width:97,opacity:1},superCoinsFloatingIslandContainer:{position:"relative",width:1,marginLeft:"100%"},supercoinsBalanceBackgroundColorShift:{position:"relative",overflow:"hidden",animation:"".concat(C," 600ms forwards"),"&::before":{content:'""',position:"absolute",left:"-30%",top:-10,width:8,height:64,background:"rgba(255, 255, 255, 0.8)",transform:"rotate(25deg)",animation:"".concat(w," 400ms ease-in 0.5s")}},supercoinsBalanceTextColorShift:{animation:"".concat(B," 600ms forwards")},supercoinsBalanceBackgroundColorShift_exit:{position:"relative",overflow:"hidden",animation:"".concat(b," 600ms forwards")},supercoinsBalanceTextColorShift_exit:{animation:"".concat(S," 600ms forwards")}}}),k="https://rukmini-ct.flixcart.com/f_auto,q_auto,dpr_2/offermgmt-prod/offermgmt/images/banner/supercoins-chip-icon.png",T="island_rendered_frquency",W="islandAnimationPlayed",E="island_expiration_frquency",A=5,R=2,L=2e3,P=500,Y=1500,F=50,M=1,q=1,j=5e3;function H(n){var e,o=n.renderFloatingIsland,i=n.supercoins;if(!o)return!1;if(i<F)return!1;if(!("true"===v("isMobileApp")))return!1;if(function(){var n=localStorage.getItem(T);return n&&"number"==typeof parseInt(n)?parseInt(n):0}()>=M){var t=(e=localStorage.getItem(E))&&"number"==typeof parseInt(e)?parseInt(e):null;return!t||!(t>Math.floor(Date.now()/1e3))&&(localStorage.removeItem(T),localStorage.removeItem(E),!0)}return!sessionStorage.getItem(W)}function N(){var n=localStorage.getItem(T);n||(n="0");var e=parseInt(n)+1;if(localStorage.setItem(T,e.toString()),e>=M){var o=Math.floor(Date.now()/1e3)+86400*q;localStorage.setItem(E,o.toString())}}h({"0%":{transform:"translateY(0px)"},"60%":{transform:"translateY(-44px)"},"90%":{transform:"translateY(-40px)"},"100%":{transform:"translateY(-40px)"}}),h({"0%":{transform:"translateY(-40px)"},"60%":{transform:"translateY(-84px)"},"90%":{transform:"translateY(-80px)"},"100%":{transform:"translateY(-80px)"}}),h({"0%":{width:"var(--wallet-initial-width)"},"100%":{width:"var(--wallet-final-width)"}});var z=a(function(n){return{chipWrapper:{display:"flex",alignItems:"center",gap:4,marginBottom:20,textAlign:"center"},chipTextWrapper:{display:"flex",alignItems:"center",justifyContent:"center",paddingTop:0,paddingRight:4,paddingBottom:0,paddingLeft:4,width:"100%",textAlign:"center"},textWrapper:{marginRight:4},pillContainer:{boxSizing:"border-box",paddingTop:5,paddingRight:8,paddingBottom:5,paddingLeft:8,borderRadius:16,borderWidth:1,borderStyle:"solid",borderColor:"#e6e6e6",display:"inline-block",backgroundColor:"#fff",overflow:"hidden"},"width-animation":{animation:"width-animation 0.7s ease-in-out forwards"},"spring-up-wallet":{animation:"spring-up1 0.7s ease-in-out forwards 2s"},"spring-up-wallet-sc":{animation:"spring-up1 0.7s ease-in-out forwards 2s, spring-up2 0.7s ease-in-out forwards 5s"}}}),D={2:58,3:66,4:74,5:82,6:90,7:120};function G(n){var t=n.supercoinBalance;return i(x,e({as:"div",styleConfig:{root:["__local-".concat(z.chipWrapper)]}},{children:[o("img",{src:k,alt:"supercoin_icon",width:18,height:18}),o(x,e({as:"div",styleConfig:{root:["__local-".concat(z.chipTextWrapper)]}},{children:o(m,e({variant:"B2",styleConfig:{root:[z.textWrapper]}},{children:t}))}))]}))}function J(n){var t=n.walletBalance;return i(x,e({as:"div",styleConfig:{root:["__local-".concat(z.chipWrapper)]}},{children:[o("img",{src:"https://rukmini-ct.flixcart.com/f_auto,q_auto/offermgmt-prod/offermgmt/images/banner/wallet-pill-icon.png",alt:"supercoin_icon",width:18,height:18}),o(x,e({as:"div",styleConfig:{root:["__local-".concat(z.chipTextWrapper)]}},{children:i(m,e({variant:"B2",styleConfig:{root:[z.textWrapper]}},{children:["₹",t]}))}))]}))}function K(n){var t,r=n.supercoinBalance,a=n.walletBalance,l=n.handleClick,c=n.chipWidthRef,s=0===a&&r>0||0===r&&0===a,u=s?z["spring-up-wallet-sc"]:z["spring-up-wallet"],p=Math.max(a.toString().length,r.toString().length)+1;!function(n,e){var o=document.querySelector(":root");null==o||o.style.setProperty("--wallet-initial-width","".concat(n,"px"));var i=D[e];null==o||o.style.setProperty("--wallet-final-width","".concat(Math.max(i,n),"px"))}(null!==(t=null==c?void 0:c.current)&&void 0!==t?t:0,p);var d=0===(null==c?void 0:c.current)?"auto":"".concat(null==c?void 0:c.current,"px"),f=0===(null==c?void 0:c.current)?"":z["width-animation"];return o(x,e({as:"div",onClick:l},{children:o(x,e({as:"div",styleConfig:{root:["__local-".concat(z.pillContainer),"__local-".concat(f),{height:32,width:d}]}},{children:i(x,e({as:"div",styleConfig:{root:["__local-".concat(u)]}},{children:[o(G,{supercoinBalance:r}),o(J,{walletBalance:a}),s?o(G,{supercoinBalance:r}):null]}))}))}))}var O=c.lazy(function(){return import("@cleartrip/ct-platform-supercoins-floating-island").then(function(n){return{default:n.SupercoinsFloatingIsland}})}),Q=function(r){var a=r.supercoinsLoading,c=r.supercoinBurnBalance,h=r.ravenPayload,w=void 0===h?{}:h,C=r.onSupercoinsClick,b=r.supercoinsExpiryCount,B=r.renderFloatingIsland,S=void 0===B||B,T=r.walletEnabled,E=void 0!==T&&T,F=r.walletBalance,M=r.supercoinsFetchError,q=s(function(){var n;return null!==(n=v("utm_source"))&&void 0!==n?n:"organic"},[]),z=u(!1),D=z[0],G=z[1],J=u(0),Q=J[0],U=J[1],V=u(!1),X=V[0],Z=V[1],$=u(!1),nn=$[0],en=$[1],on=u(!1),tn=on[0],rn=on[1],an=s(function(){return"number"==typeof c&&c>=0&&!a},[c,a]),ln=u(!1),cn=ln[0],sn=ln[1],un=u(null),pn=un[0],dn=un[1],fn=u(!1),mn=fn[0],gn=fn[1],hn=p(0),vn=p(!1),_n="entry"===pn?I.supercoinsBalanceBackgroundColorShift:"exit"===pn?I.supercoinsBalanceBackgroundColorShift_exit:"",yn="entry"===pn?I.supercoinsBalanceTextColorShift:"exit"===pn?I.supercoinsBalanceTextColorShift_exit:"";function xn(){var o;C&&"function"==typeof C&&C();var i=w.action_event_name;w.impression_event_name;var t=n(w,["action_event_name","impression_event_name"]);_(null!==(o=i)&&void 0!==o?o:"u_ui_action",e({action_name:"supercoin_icon_click",page_name:"unified_homepage",supercoin_balance:c,u_utm_source:q},t))}if(d(function(){U(Number(null===sessionStorage||void 0===sessionStorage?void 0:sessionStorage.getItem("expiryAnimationCount")));var n=function(){window.scrollY>0&&(sessionStorage.getItem(W)||(gn(!0),dn(null)))};return window.addEventListener("scroll",n),function(){window.removeEventListener("scroll",n)}},[]),d(function(){if(!a){var n,e=H({renderFloatingIsland:S,supercoins:c}),o="number"==typeof b&&b>=A&&!e;return G(o),e&&sessionStorage.setItem("disable_floater","true"),e&&!mn?(dn("entry"),n=setTimeout(function(){sn(!0)},1500),rn(!0)):o?(rn(!0),setTimeout(function(){E&&en(!0)},1e4)):(E&&en(!0),rn(!0)),function(){clearTimeout(n)}}},[c,b,a]),d(function(){if(S&&cn){var n=setTimeout(function(){sessionStorage.getItem(W)||(sn(!1),dn("exit"),en(!0))},j);return function(){clearTimeout(n)}}},[]),d(function(){var o;if("number"==typeof c&&c>=0&&!a&&null!==b){w.action_event_name;var i=w.impression_event_name,t=n(w,["action_event_name","impression_event_name"]);_(null!==(o=i)&&void 0!==o?o:"u_impression",e({action_name:"supercoin_pill_impression",page_name:"unified_homepage",supercoin_balance:c,u_utm_source:q,supercoinsExpiryCount:b||"N/A"},t))}},[a,b]),d(function(){if(D&&!(Q>=R)){var n=setTimeout(function(){Z(!0);var n=setTimeout(function(){Z(!1);var n=Q+1;U(n),sessionStorage.setItem("expiryAnimationCount",n.toString())},Y);return function(){return clearTimeout(n)}},0===Q?P:L);return function(){return clearTimeout(n)}}},[D,Q]),M)return o(t,{});var wn=function(){return o(x,e({as:"div",styleConfig:{root:[l["px-2"],l["br-16"],"__local-ba-solid","__local-bc-line-500",l["bg-neutral-100"],l["o-hidden"],{paddingTop:6,paddingBottom:6,display:"inline-block"}]}},{children:i(x,e({as:"div",styleConfig:{root:[l.flex,l["flex-row"],l["flex-middle"],l["flex-gap-1"]]}},{children:[o(g,{width:18,height:18,type:"rounded"}),o(g,{width:44,height:18,type:"rounded"})]}))}))};if(y())return o(wn,{});if(a||!cn&&!nn&&!tn)return o(wn,{});if(!an)return null;var Cn=D?"HM4":"B2",bn=D?I.supercoinsExpiryPill:I.supercoinsBalance,Bn=D?I.supercoinBurnExpiryColor:"";return nn?o(K,{walletBalance:F,supercoinBalance:Number(c),handleClick:xn,chipWidthRef:hn}):i(x,e({as:"div",styleConfig:{root:[{position:"relative"}]}},{children:[o(x,e({as:"div",ref:function(n){var e;vn.current||(vn.current=!0,hn.current=null!==(e=null==n?void 0:n.offsetWidth)&&void 0!==e?e:0)},onClick:xn,styleConfig:{root:["__local-".concat(bn),"__local-".concat(_n)]}},{children:i(x,e({as:"div",styleConfig:{root:[{display:"flex",alignItems:"center",gap:4}]}},{children:[o("img",{src:k,alt:"supercoin_icon",width:18,height:18}),i(x,e({as:"div",styleConfig:{root:["__local-".concat(I.supercoinChipWrapper)]}},{children:[o(m,e({variant:Cn,styleConfig:{root:[[yn,I.supercoinBurnTextAlign,Bn].join(" ")]}},{children:X?b:c})),D&&o(m,e({variant:"HM4",styleConfig:{root:[I.supercoinExpiryText,X?I.supercoinExpiryAnimating:void 0]}},{children:"expiring soon"}))]}))]}))})),cn&&!mn&&o(x,e({as:"div",styleConfig:{root:["__local-".concat(I.superCoinsFloatingIslandContainer)]}},{children:o(f,e({fallback:o(t,{})},{children:o(O,{superCoins:c,onAnimationStart:function(){return function(o){var i,t=o.supercoins,r=o.ravenPayload,a=void 0===r?{}:r,l=o.utmSource,c=void 0===l?"":l;a.action_event_name;var s=a.impression_event_name,u=n(a,["action_event_name","impression_event_name"]);_(null!==(i=s)&&void 0!==i?i:"u_impression",e({action_name:"supercoin_banner_impression",page_name:"unified_homepage",supercoin_balance:t,u_utm_source:c},u)),sessionStorage.setItem("islandAnimationPlayed","true"),N()}({supercoins:c,ravenPayload:w,utmSource:q})},onAnimationEnd:function(){setTimeout(function(){E&&en(!0)},500),dn("exit")}})}))}))]}))};export{Q as SupercoinsChip};
|
|
1
|
+
import{__rest as e,__assign as n}from"tslib";import{jsx as i,jsxs as r,Fragment as o}from"react/jsx-runtime";import t,{useMemo as a,useState as l,useRef as s,useEffect as c,Suspense as u}from"react";import{Typography as d}from"@cleartrip/ct-design-typography";import{Shimmer as p}from"@cleartrip/ct-platform-shimmer";import{getQueryParam as _,ravenSDKTrigger as m,isServer as f}from"@cleartrip/ct-platform-utils";function x(e,n){void 0===n&&(n={});var i=n.insertAt;if(e&&"undefined"!=typeof document){var r=document.head||document.getElementsByTagName("head")[0],o=document.createElement("style");o.type="text/css","top"===i&&r.firstChild?r.insertBefore(o,r.firstChild):r.appendChild(o),o.styleSheet?o.styleSheet.cssText=e:o.appendChild(document.createTextNode(e))}}var h={supercoinsBalance:"index-module_supercoinsBalance__w9srh",supercoinsExpiryPill:"index-module_supercoinsExpiryPill__v4w06",supercoinChipWrapper:"index-module_supercoinChipWrapper__QPdUS",supercoinBurnTextAlign:"index-module_supercoinBurnTextAlign__g-go5",supercoinBurnExpiryColor:"index-module_supercoinBurnExpiryColor__FTFjA",supercoinExpiryText:"index-module_supercoinExpiryText__rkVbG",supercoinExpiryAnimating:"index-module_supercoinExpiryAnimating__Gdq0n",superCoinsFloatingIslandContainer:"index-module_superCoinsFloatingIslandContainer__5FNNa",supercoinsBalanceBackgroundColorShift:"index-module_supercoinsBalanceBackgroundColorShift__r6YWa",supercoins_balance_background_color_shift:"index-module_supercoins_balance_background_color_shift__1NHEU",supercoinsBalanceTextColorShift:"index-module_supercoinsBalanceTextColorShift__y7vva",supercoins_balance_text_color_shift:"index-module_supercoins_balance_text_color_shift__V8yxU",supercoinsBalanceBackgroundColorShift_exit:"index-module_supercoinsBalanceBackgroundColorShift_exit__sinUJ",supercoins_balance_background_color_shift_exit:"index-module_supercoins_balance_background_color_shift_exit__qAHuv",supercoinsBalanceTextColorShift_exit:"index-module_supercoinsBalanceTextColorShift_exit__JKt90",supercoins_balance_text_color_shift_exit:"index-module_supercoins_balance_text_color_shift_exit__rluZH",supercoin_chip_loading_shimmer:"index-module_supercoin_chip_loading_shimmer__0jquY",supercoins_balance_background_shimmer:"index-module_supercoins_balance_background_shimmer__2lOFp"};x('.index-module_supercoinsBalance__w9srh{background-color:#fff;border:1px solid #e6e6e6;border-radius:16px;display:inline-block;overflow:hidden;padding:6px 8px}.index-module_supercoinsExpiryPill__v4w06{background-color:#fbefef;border:1.5px solid #c83232;border-radius:16px;display:inline-block;overflow:hidden;padding:6px 0 6px 8px}.index-module_supercoinChipWrapper__QPdUS{align-items:center;display:flex;justify-content:center;padding:0 4px}.index-module_supercoinBurnTextAlign__g-go5{line-height:18px;margin-right:4px}.index-module_supercoinBurnExpiryColor__FTFjA{color:#c83232!important}.index-module_supercoinExpiryText__rkVbG{color:#c83232!important;display:inline-block;line-height:18px;opacity:0;overflow:hidden;transition:width .5s ease-in-out,opacity .5s ease-in-out;white-space:nowrap;width:0}.index-module_supercoinExpiryAnimating__Gdq0n{opacity:1;width:97px}.index-module_superCoinsFloatingIslandContainer__5FNNa{margin-left:100%;position:relative;width:1px}.index-module_supercoinsBalanceBackgroundColorShift__r6YWa{animation:index-module_supercoins_balance_background_color_shift__1NHEU .6s forwards;overflow:hidden;position:relative}.index-module_supercoinsBalanceTextColorShift__y7vva{animation:index-module_supercoins_balance_text_color_shift__V8yxU .6s forwards}.index-module_supercoinsBalanceBackgroundColorShift_exit__sinUJ{animation:index-module_supercoins_balance_background_color_shift_exit__qAHuv .6s forwards;overflow:hidden;position:relative}.index-module_supercoinsBalanceTextColorShift_exit__JKt90{animation:index-module_supercoins_balance_text_color_shift_exit__rluZH .6s forwards}.index-module_supercoinsBalanceBackgroundColorShift__r6YWa:before{animation:index-module_supercoin_chip_loading_shimmer__0jquY .4s ease-in .5s;background:hsla(0,0%,100%,.8);content:"";height:64px;left:-30%;position:absolute;top:-10px;transform:rotate(25deg);width:8px}@keyframes index-module_supercoin_chip_loading_shimmer__0jquY{0%{left:-30%}to{left:120%}}@keyframes index-module_supercoins_balance_background_color_shift__1NHEU{0%{background-color:rgba(0,62,162,.1)}to{background-color:#003ea2}}@keyframes index-module_supercoins_balance_background_color_shift_exit__qAHuv{0%{background-color:#003ea2}to{background-color:#fff}}@keyframes index-module_supercoins_balance_text_color_shift__V8yxU{0%{color:#000}to{color:#fff}}@keyframes index-module_supercoins_balance_text_color_shift_exit__rluZH{0%{color:#fff}to{color:#000}}@keyframes index-module_supercoins_balance_background_shimmer__2lOFp{0%{background-color:rgba(0,62,162,.1)}to{background-color:#003ea2}}');var g="https://rukmini-ct.flixcart.com/f_auto,q_auto,dpr_2/offermgmt-prod/offermgmt/images/banner/supercoins-chip-icon.png",v="https://rukmini-ct.flixcart.com/f_auto,q_auto/offermgmt-prod/offermgmt/images/banner/wallet-pill-icon.png",y="island_rendered_frquency",b="islandAnimationPlayed",w="island_expiration_frquency",B=5,k=2,C=2e3,S=500,T=1500,I={requiredSupercoins:50,frequency:1,frequencyGapInDays:1,cutoffTimeInMs:5e3,isVisibleOnScroll:!1};function E(e){var n,i=e.renderFloatingIsland,r=e.supercoins;if(!i)return!1;if(r<I.requiredSupercoins)return!1;if(!("true"===_("isMobileApp")))return!1;if(function(){var e=localStorage.getItem(y);return e&&"number"==typeof parseInt(e)?parseInt(e):0}()>=I.frequency){var o=(n=localStorage.getItem(w))&&"number"==typeof parseInt(n)?parseInt(n):null;return!o||!(o>Math.floor(Date.now()/1e3))&&(localStorage.removeItem(y),localStorage.removeItem(w),!0)}return!sessionStorage.getItem(b)}function N(){var e=localStorage.getItem(y);e||(e="0");var n=parseInt(e)+1;if(localStorage.setItem(y,n.toString()),n>=I.frequency){var i=Math.floor(Date.now()/1e3)+86400*I.frequencyGapInDays;localStorage.setItem(w,i.toString())}}var W={chipWrapper:"index-module_chipWrapper__EwpUk",chipTextWrapper:"index-module_chipTextWrapper__Uburn",textWrapper:"index-module_textWrapper__BysJP",pillContainer:"index-module_pillContainer__bz7P4","width-animation":"index-module_width-animation__Ap-Ga","spring-up-wallet":"index-module_spring-up-wallet__GJrXW","spring-up1":"index-module_spring-up1__OLe4L","spring-up-wallet-sc":"index-module_spring-up-wallet-sc__KKKf0","spring-up2":"index-module_spring-up2__SIbCp"};x(".index-module_chipWrapper__EwpUk{align-items:center;display:flex;gap:4px;margin-bottom:20px;text-align:center}.index-module_chipTextWrapper__Uburn{align-items:center;display:flex;justify-content:center;padding:0 4px;text-align:center;width:100%}.index-module_textWrapper__BysJP{margin-right:4px}.index-module_pillContainer__bz7P4{background-color:#fff;border:1px solid #e6e6e6;border-radius:16px;box-sizing:border-box;display:inline-block;overflow:hidden;padding:5px 8px}@keyframes index-module_spring-up1__OLe4L{0%{transform:translateY(0)}60%{transform:translateY(-44px)}90%{transform:translateY(-40px)}to{transform:translateY(-40px)}}@keyframes index-module_spring-up2__SIbCp{0%{transform:translateY(-40px)}60%{transform:translateY(-84px)}90%{transform:translateY(-80px)}to{transform:translateY(-80px)}}@keyframes index-module_width-animation__Ap-Ga{0%{width:var(--wallet-initial-width)}to{width:var(--wallet-final-width)}}.index-module_width-animation__Ap-Ga{animation:index-module_width-animation__Ap-Ga .7s ease-in-out forwards}.index-module_spring-up-wallet__GJrXW{animation:index-module_spring-up1__OLe4L .7s ease-in-out 2s forwards}.index-module_spring-up-wallet-sc__KKKf0{animation:index-module_spring-up1__OLe4L .7s ease-in-out 2s forwards,index-module_spring-up2__SIbCp .7s ease-in-out 5s forwards}");var A={2:58,3:66,4:74,5:82,6:90,7:120};function q(e){var o=e.supercoinBalance;return r("div",n({className:W.chipWrapper},{children:[i("img",{src:g,alt:"supercoin_icon",width:18,height:18}),i("div",n({className:W.chipTextWrapper},{children:i(d,n({variant:"B2",className:W.textWrapper},{children:o}))}))]}))}function F(e){var o=e.walletBalance;return r("div",n({className:W.chipWrapper},{children:[i("img",{src:v,alt:"supercoin_icon",width:18,height:18}),i("div",n({className:W.chipTextWrapper},{children:r(d,n({variant:"B2",className:W.textWrapper},{children:["₹",o]}))}))]}))}function P(e){var o,t=e.supercoinBalance,a=e.walletBalance,l=e.handleClick,s=e.chipWidthRef,c=0===a&&t>0||0===t&&0===a,u=c?W["spring-up-wallet-sc"]:W["spring-up-wallet"],d=Math.max(a.toString().length,t.toString().length)+1;!function(e,n){var i=document.querySelector(":root");null==i||i.style.setProperty("--wallet-initial-width","".concat(e,"px"));var r=A[n];null==i||i.style.setProperty("--wallet-final-width","".concat(Math.max(r,e),"px"))}(null!==(o=null==s?void 0:s.current)&&void 0!==o?o:0,d);var p=0===(null==s?void 0:s.current)?"auto":"".concat(null==s?void 0:s.current,"px"),_=0===(null==s?void 0:s.current)?"":W["width-animation"];return i("div",n({onClick:l},{children:i("div",n({className:"".concat(W.pillContainer," ").concat(_),style:{height:"32px",width:p}},{children:r("div",n({className:u},{children:[i(q,{supercoinBalance:t}),i(F,{walletBalance:a}),c?i(q,{supercoinBalance:t}):null]}))}))}))}var Y=t.lazy((function(){return import("@cleartrip/ct-platform-supercoins-floating-island").then((function(e){return{default:e.SupercoinsFloatingIsland}}))})),U=function(t){var x=t.supercoinsLoading,v=t.supercoinBurnBalance,y=t.ravenPayload,w=void 0===y?{}:y,W=t.onSupercoinsClick,A=t.supercoinsExpiryCount,q=t.renderFloatingIsland,F=void 0===q||q,U=t.walletEnabled,G=void 0!==U&&U,H=t.walletBalance,L=t.supercoinsFetchError,j=a((function(){var e;return null!==(e=_("utm_source"))&&void 0!==e?e:"organic"}),[]),M=l(!1),J=M[0],K=M[1],O=l(0),V=O[0],z=O[1],D=l(!1),Z=D[0],Q=D[1],R=l(!1),X=R[0],$=R[1],ee=l(!1),ne=ee[0],ie=ee[1],re=a((function(){return"number"==typeof v&&v>=0&&!x}),[v,x]),oe=l(!1),te=oe[0],ae=oe[1],le=l(null),se=le[0],ce=le[1],ue=l(!1),de=ue[0],pe=ue[1],_e=s(0),me=s(!1),fe="entry"===se?h.supercoinsBalanceBackgroundColorShift:"exit"===se?h.supercoinsBalanceBackgroundColorShift_exit:"",xe="entry"===se?h.supercoinsBalanceTextColorShift:"exit"===se?h.supercoinsBalanceTextColorShift_exit:"";function he(){var i;W&&"function"==typeof W&&W();var r=w.action_event_name;w.impression_event_name;var o=e(w,["action_event_name","impression_event_name"]);m(null!==(i=r)&&void 0!==i?i:"u_ui_action",n({action_name:"supercoin_icon_click",page_name:"unified_homepage",supercoin_balance:v,u_utm_source:j},o))}if(c((function(){z(Number(null===sessionStorage||void 0===sessionStorage?void 0:sessionStorage.getItem("expiryAnimationCount")));var e=function(){window.scrollY>0&&(sessionStorage.getItem(b)||(pe(!0),ce(null)))};return window.addEventListener("scroll",e),function(){window.removeEventListener("scroll",e)}}),[]),c((function(){if(!x){var e,n=E({renderFloatingIsland:F,supercoins:v}),i="number"==typeof A&&A>=B&&!n;return K(i),n&&sessionStorage.setItem("disable_floater","true"),n&&!de?(ce("entry"),e=setTimeout((function(){ae(!0)}),1500),ie(!0)):i?(ie(!0),setTimeout((function(){G&&$(!0)}),1e4)):(G&&$(!0),ie(!0)),function(){clearTimeout(e)}}}),[v,A,x]),c((function(){if(F&&te){var e=setTimeout((function(){sessionStorage.getItem(b)||(ae(!1),ce("exit"),$(!0))}),I.cutoffTimeInMs);return function(){clearTimeout(e)}}}),[]),c((function(){var i;if("number"==typeof v&&v>=0&&!x&&null!==A){w.action_event_name;var r=w.impression_event_name,o=e(w,["action_event_name","impression_event_name"]);m(null!==(i=r)&&void 0!==i?i:"u_impression",n({action_name:"supercoin_pill_impression",page_name:"unified_homepage",supercoin_balance:v,u_utm_source:j,supercoinsExpiryCount:A||"N/A"},o))}}),[x,A]),c((function(){if(J&&!(V>=k)){var e=setTimeout((function(){Q(!0);var e=setTimeout((function(){Q(!1);var e=V+1;z(e),sessionStorage.setItem("expiryAnimationCount",e.toString())}),T);return function(){return clearTimeout(e)}}),0===V?S:C);return function(){return clearTimeout(e)}}}),[J,V]),L)return i(o,{});var ge=function(){return i("div",n({className:"px-2 br-16 ba-solid bc-line-500 bg-neutral-100 o-hidden",style:{paddingTop:"6px",paddingBottom:"6px",display:"inline-block"}},{children:r("div",n({className:"flex flex-middle flex-gap-1"},{children:[i(p,{width:18,height:18,type:"rounded"}),i(p,{width:44,height:18,type:"rounded"})]}))}))};if(f())return i(ge,{});if(x||!te&&!X&&!ne)return i(ge,{});if(!re)return null;var ve=J?"HM4":"B2",ye=J?h.supercoinsExpiryPill:h.supercoinsBalance,be=J?h.supercoinBurnExpiryColor:"";return X?i(P,{walletBalance:H,supercoinBalance:Number(v),handleClick:he,chipWidthRef:_e}):r("div",n({style:{position:"relative"}},{children:[i("div",n({ref:function(e){var n;me.current||(me.current=!0,_e.current=null!==(n=null==e?void 0:e.offsetWidth)&&void 0!==n?n:0)},className:"".concat(ye," ").concat(fe),onClick:he},{children:r("div",n({style:{display:"flex",alignItems:"center",gap:"4px"}},{children:[i("img",{src:g,alt:"supercoin_icon",width:18,height:18}),r("div",n({className:h.supercoinChipWrapper},{children:[i(d,n({variant:ve,className:[xe,h.supercoinBurnTextAlign,be].join(" ")},{children:Z?A:v})),J&&i(d,n({variant:"HM4",className:"".concat(h.supercoinExpiryText," ").concat(Z?h.supercoinExpiryAnimating:"")},{children:"expiring soon"}))]}))]}))})),te&&!de&&i("div",n({className:h.superCoinsFloatingIslandContainer},{children:i(u,n({fallback:i(o,{})},{children:i(Y,{superCoins:v,onAnimationStart:function(){return function(i){var r,o=i.supercoins,t=i.ravenPayload,a=void 0===t?{}:t,l=i.utmSource,s=void 0===l?"":l;a.action_event_name;var c=a.impression_event_name,u=e(a,["action_event_name","impression_event_name"]);m(null!==(r=c)&&void 0!==r?r:"u_impression",n({action_name:"supercoin_banner_impression",page_name:"unified_homepage",supercoin_balance:o,u_utm_source:s},u)),sessionStorage.setItem("islandAnimationPlayed","true"),N()}({supercoins:v,ravenPayload:w,utmSource:j})},onAnimationEnd:function(){setTimeout((function(){G&&$(!0)}),500),ce("exit")}})}))}))]}))};export{U as SupercoinsChip};
|
|
2
2
|
//# sourceMappingURL=ct-platform-supercoins-chip.esm.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ct-platform-supercoins-chip.esm.js","sources":["../packages/components/SupercoinsChip/src/index.module.ts","../packages/components/SupercoinsChip/src/constants.ts","../packages/components/SupercoinsChip/src/utils/shouldRenderFloatingIsland.ts","../packages/components/SupercoinsChip/src/utils/onIslandAnimationStart.ts","../packages/components/SupercoinsChip/src/walletAnimation/index.module.ts","../packages/components/SupercoinsChip/src/utils/setWalletCssVariables.ts","../packages/components/SupercoinsChip/src/walletAnimation/index.tsx","../packages/components/SupercoinsChip/src/SupercoinsChip.tsx"],"sourcesContent":[null,null,null,null,null,null,null,null],"names":["supercoin_chip_loading_shimmer","keyframes","left","supercoins_balance_background_color_shift","backgroundColor","supercoins_balance_background_color_shift_exit","supercoins_balance_text_color_shift","color","supercoins_balance_text_color_shift_exit","styles","makeWebStyles","theme","supercoinsBalance","paddingTop","paddingRight","paddingBottom","paddingLeft","borderRadius","borderWidth","borderStyle","borderColor","display","overflow","supercoinsExpiryPill","supercoinChipWrapper","alignItems","justifyContent","supercoinBurnTextAlign","lineHeight","marginRight","supercoinBurnExpiryColor","supercoinExpiryText","whiteSpace","width","opacity","transition","supercoinExpiryAnimating","superCoinsFloatingIslandContainer","position","marginLeft","supercoinsBalanceBackgroundColorShift","animation","concat","content","top","height","background","transform","supercoinsBalanceTextColorShift","supercoinsBalanceBackgroundColorShift_exit","supercoinsBalanceTextColorShift_exit","SUPERCOINS_CHIP_ICON","SUPERCOIN_ISLAND_RENDERED_FREQUENCY","SUPERCOIN_ISLAND_ANIMATION_PLAYED","SUPERCOIN_ISLAND_EXPIRATION_FREQUENCY","SUPERCOIN_EXPIRY_CONFIG","SUPERCOIN_FLOATING_ISLAND_CONFIG","shouldRenderFloatingIsland","_a","expiry","renderFloatingIsland","supercoins","getQueryParam","frequency","localStorage","getItem","parseInt","getIslandShownFrequency","expiryEpoch","Math","floor","Date","now","removeItem","sessionStorage","incrementAnimationPlayedFrequency","currentFrequency","setItem","toString","makeStyles","chipWrapper","gap","marginBottom","textAlign","chipTextWrapper","textWrapper","pillContainer","boxSizing","widthByNumberOfCharactersMap","SupercoinChip","supercoinBalance","_jsxs","Container","__assign","as","styleConfig","root","children","_jsx","src","alt","Typography","variant","WalletChip","walletBalance","WalletAnimation","handleClick","chipWidthRef","renderSupercoinPillOnAnimationEnd","wrapperAnimation","maxNumberOfCharacters","max","length","chipWidth","numberOfCharacters","ctx","document","querySelector","style","setProperty","setWalletCSSVariables","_b","current","containerClass","onClick","LazySuperCoinsFloatingIsland","React","lazy","then","module","default","SupercoinsFloatingIsland","SupercoinsChip","supercoinsLoading","supercoinBurnBalance","ravenPayload","onSupercoinsClick","supercoinsExpiryCount","_c","_d","walletEnabled","supercoinsFetchError","utmSource","useMemo","_e","useState","showSupercoinExpiryAnimation","setSupercoinExpiryAnimation","_f","animationCount","setAnimationCount","_g","isAnimating","setIsAnimating","_h","startWalletAnimation","setStartWalletAnimation","_j","calculatedAnimation","setCalculatedAnimation","shouldRenderSupercoins","_k","renderSuperCoinIsland","setRenderSuperCoinIsland","_l","chipAnimationType","setChipAnimationType","_m","hasScrolledBeforeAnimation","setHasScrolledBeforeAnimation","useRef","chipWidthCalculatedRef","chipBackgroundAnimationClassname","chipTextAnimationClassname","handleSupercoinsClick","action_event_name","impression_event_name","restPayload","__rest","ravenSDKTrigger","action_name","page_name","supercoin_balance","u_utm_source","useEffect","Number","handleScroll","window","scrollY","addEventListener","removeEventListener","timeout","shouldRender","renderSupercoinExpiry","setTimeout","clearTimeout","startTimer","switchBackTimer","newCount","SupercoinLoadingPill","gs","Shimmer","type","isServer","typographyVariant","chipClassName","expiryColorClass","ref","offsetWidth","join","undefined","Suspense","fallback","_Fragment","superCoins","onAnimationStart","onIslandAnimationStart","onAnimationEnd"],"mappings":"6lBAEA,IAAMA,EAAiCC,EAAU,CAC/C,KAAM,CACJC,KAAM,QAER,OAAQ,CACNA,KAAM,UAIJC,EAA4CF,EAAU,CAC1D,KAAM,CACJG,gBAAiB,yBAEnB,OAAQ,CACNA,gBAAiB,aAIfC,EAAiDJ,EAAU,CAC/D,KAAM,CACJG,gBAAiB,WAEnB,OAAQ,CACNA,gBAAiB,WAIfE,EAAsCL,EAAU,CACpD,KAAM,CACJM,MAAO,QAET,OAAQ,CACNA,MAAO,UAILC,EAA2CP,EAAU,CACzD,KAAM,CACJM,MAAO,QAET,OAAQ,CACNA,MAAO,UAImCN,EAAU,CACtD,KAAM,CACJG,gBAAiB,yBAEnB,OAAQ,CACNA,gBAAiB,aAMrB,IAAMK,EAASC,EAAc,SAAAC,GAAS,MAAA,CACpCC,kBAAmB,CACjBC,WAAY,EACZC,aAAc,EACdC,cAAe,EACfC,YAAa,EACbC,aAAc,GACdC,YAAa,EACbC,YAAa,QACbC,YAAa,UACbC,QAAS,eACTjB,gBAAiB,OACjBkB,SAAU,UAGZC,qBAAsB,CACpBV,WAAY,EACZC,aAAc,EACdC,cAAe,EACfC,YAAa,EACbC,aAAc,GACdC,YAAa,IACbC,YAAa,QACbC,YAAa,UACbC,QAAS,eACTjB,gBAAiB,UACjBkB,SAAU,UAGZE,qBAAsB,CACpBH,QAAS,OACTI,WAAY,SACZC,eAAgB,SAChBb,WAAY,EACZC,aAAc,EACdC,cAAe,EACfC,YAAa,GAGfW,uBAAwB,CACtBC,WAAY,GACZC,YAAa,GAGfC,yBAA0B,CACxBvB,MAAO,WAGTwB,oBAAqB,CACnBH,WAAY,GACZP,QAAS,eACTC,S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AAa,CACTC,KAAM,CACFvF,EAAOsB,oBACPyH,EAAc/I,EAAO2B,8BAA2B8K,KAEvD,CAAAjH,SAAA,8BASpBiE,KAA0BM,IACvBtE,EAACN,EAASC,EAAA,CAACC,GAAG,MAAMC,YAAa,CAC7BC,KAAM,CAAC,WAAAtD,OAAWjC,EAAO4B,sCAC5B,CAAA4D,SACGC,EAACiH,EAAQtH,EAAA,CAACuH,SAAUlH,EAAAmH,EAAA,CAAA,IAAK,CAAApH,SACrBC,EAAC2B,GACGyF,WAAYhF,EACZiF,iBAAkB,WACd,OJhX1B,SAAiC7J,SACnCG,EAAUH,EAAAG,WACV6E,EAAAhF,EAAA6E,aAAAA,OAAY,IAAAG,EAAG,CAAA,EAAEA,EACjBC,EAAAjF,EAAAoF,UAAAA,WAASH,EAAG,GAAEA,EAKVJ,EAAYwC,sBADWC,EACvBzC,EAAYyC,sBADqCC,EAAWC,EAC5D3C,EADE,CAAA,oBAAA,0BAEN4C,EAAiD,QAAjC1D,EAACuD,SAAgC,IAAAvD,EAAAA,EAAI,kBACjD2D,YAAa,8BACbC,UAAW,mBACXC,kBAAmBzH,EACnB0H,aAAczC,GACXmC,IAIPvG,eAAeG,QAAQ,wBAAyB,QAGhDF,GACJ,CI0VgC6I,CAAuB,CACnB3J,WAAYyE,EACZC,aAAYA,EACZO,UAASA,GAHb,EAMJ2E,eAnUxB,WACIvB,WAAW,WACHtD,GAAegB,IAAwB,EAC/C,EAAG,KACHU,GAAqB,OACzB,aAqUJ"}
|
|
1
|
+
{"version":3,"file":"ct-platform-supercoins-chip.esm.js","sources":["../../../../node_modules/.pnpm/style-inject@0.3.0/node_modules/style-inject/dist/style-inject.es.js","../packages/components/SupercoinsChip/src/constants.ts","../packages/components/SupercoinsChip/src/utils/shouldRenderFloatingIsland.ts","../packages/components/SupercoinsChip/src/utils/onIslandAnimationStart.ts","../packages/components/SupercoinsChip/src/utils/setWalletCssVariables.ts","../packages/components/SupercoinsChip/src/walletAnimation/index.tsx","../packages/components/SupercoinsChip/src/SupercoinsChip.tsx"],"sourcesContent":["function styleInject(css, ref) {\n if ( ref === void 0 ) ref = {};\n var insertAt = ref.insertAt;\n\n if (!css || typeof document === 'undefined') { return; }\n\n var head = document.head || document.getElementsByTagName('head')[0];\n var style = document.createElement('style');\n style.type = 'text/css';\n\n if (insertAt === 'top') {\n if (head.firstChild) {\n head.insertBefore(style, head.firstChild);\n } else {\n head.appendChild(style);\n }\n } else {\n head.appendChild(style);\n }\n\n if (style.styleSheet) {\n style.styleSheet.cssText = css;\n } else {\n style.appendChild(document.createTextNode(css));\n }\n}\n\nexport default styleInject;\n",null,null,null,null,null,null],"names":["styleInject","css","ref","insertAt","document","head","getElementsByTagName","style","createElement","type","firstChild","insertBefore","appendChild","styleSheet","cssText","createTextNode","SUPERCOINS_CHIP_ICON","WALLET_CHIP_ICON","SUPERCOIN_ISLAND_RENDERED_FREQUENCY","SUPERCOIN_ISLAND_ANIMATION_PLAYED","SUPERCOIN_ISLAND_EXPIRATION_FREQUENCY","SUPERCOIN_EXPIRY_CONFIG","SUPERCOIN_FLOATING_ISLAND_CONFIG","requiredSupercoins","frequency","frequencyGapInDays","cutoffTimeInMs","isVisibleOnScroll","shouldRenderFloatingIsland","_a","expiry","renderFloatingIsland","supercoins","getQueryParam","localStorage","getItem","parseInt","getIslandShownFrequency","expiryEpoch","Math","floor","Date","now","removeItem","sessionStorage","incrementAnimationPlayedFrequency","currentFrequency","setItem","toString","widthByNumberOfCharactersMap","SupercoinChip","supercoinBalance","_jsxs","className","styles","chipWrapper","children","_jsx","src","alt","width","height","__assign","chipTextWrapper","Typography","variant","textWrapper","WalletChip","walletBalance","WalletAnimation","handleClick","chipWidthRef","renderSupercoinPillOnAnimationEnd","wrapperAnimation","maxNumberOfCharacters","max","length","chipWidth","numberOfCharacters","ctx","querySelector","setProperty","concat","setWalletCSSVariables","_b","current","containerClass","onClick","pillContainer","LazySuperCoinsFloatingIsland","React","lazy","import","then","module","default","SupercoinsFloatingIsland","SupercoinsChip","supercoinsLoading","supercoinBurnBalance","ravenPayload","onSupercoinsClick","supercoinsExpiryCount","_c","_d","walletEnabled","supercoinsFetchError","utmSource","useMemo","_e","useState","showSupercoinExpiryAnimation","setSupercoinExpiryAnimation","_f","animationCount","setAnimationCount","_g","isAnimating","setIsAnimating","_h","startWalletAnimation","setStartWalletAnimation","_j","calculatedAnimation","setCalculatedAnimation","shouldRenderSupercoins","_k","renderSuperCoinIsland","setRenderSuperCoinIsland","_l","chipAnimationType","setChipAnimationType","_m","hasScrolledBeforeAnimation","setHasScrolledBeforeAnimation","useRef","chipWidthCalculatedRef","chipBackgroundAnimationClassname","supercoinsBalanceBackgroundColorShift","supercoinsBalanceBackgroundColorShift_exit","chipTextAnimationClassname","supercoinsBalanceTextColorShift","supercoinsBalanceTextColorShift_exit","handleSupercoinsClick","action_event_name","impression_event_name","restPayload","__rest","ravenSDKTrigger","action_name","page_name","supercoin_balance","u_utm_source","useEffect","Number","handleScroll","window","scrollY","addEventListener","removeEventListener","timeout","shouldRender","renderSupercoinExpiry","setTimeout","clearTimeout","startTimer","switchBackTimer","newCount","SupercoinLoadingPill","paddingTop","paddingBottom","display","Shimmer","isServer","typographyVariant","chipClassName","supercoinsExpiryPill","supercoinsBalance","expiryColorClass","supercoinBurnExpiryColor","position","offsetWidth","alignItems","gap","supercoinChipWrapper","supercoinBurnTextAlign","join","supercoinExpiryText","supercoinExpiryAnimating","superCoinsFloatingIslandContainer","Suspense","fallback","superCoins","onAnimationStart","onIslandAnimationStart","onAnimationEnd"],"mappings":"6ZAAA,SAASA,EAAYC,EAAKC,QACX,IAARA,IAAiBA,EAAM,CAAA,GAC5B,IAAIC,EAAWD,EAAIC,SAEnB,GAAKF,GAA2B,oBAAbG,SAAnB,CAEA,IAAIC,EAAOD,SAASC,MAAQD,SAASE,qBAAqB,QAAQ,GAC9DC,EAAQH,SAASI,cAAc,SACnCD,EAAME,KAAO,WAEI,QAAbN,GACEE,EAAKK,WACPL,EAAKM,aAA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EACnBwH,aAAc7C,GACXuC,IAIPtG,eAAeG,QAAQ,wBAAyB,QAGhDF,GACJ,CG2TgCqJ,CAAuB,CACnBlK,WAAYmE,EACZC,aAAYA,EACZO,UAASA,KAGjBwF,eAvSxB,WACIhC,YAAW,WACH1D,GAAegB,GAAwB,EAC9C,GAAE,KACHU,GAAqB,OACxB,aAySL","x_google_ignoreList":[0]}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { MutableRefObject } from 'react';
|
|
2
2
|
interface IWalletAnimation {
|
|
3
3
|
supercoinBalance: number;
|
|
4
4
|
walletBalance: number;
|
|
5
5
|
handleClick: () => void;
|
|
6
6
|
chipWidthRef: MutableRefObject<number>;
|
|
7
7
|
}
|
|
8
|
-
export default function WalletAnimation({ supercoinBalance, walletBalance, handleClick, chipWidthRef, }: IWalletAnimation):
|
|
8
|
+
export default function WalletAnimation({ supercoinBalance, walletBalance, handleClick, chipWidthRef, }: IWalletAnimation): import("react/jsx-runtime").JSX.Element;
|
|
9
9
|
export {};
|
|
10
10
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../packages/components/SupercoinsChip/src/walletAnimation/index.tsx"],"names":[],"mappings":"AAAA,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../packages/components/SupercoinsChip/src/walletAnimation/index.tsx"],"names":[],"mappings":"AAAA,OAAc,EAAE,gBAAgB,EAAE,MAAM,OAAO,CAAC;AAMhD,UAAU,gBAAgB;IACtB,gBAAgB,EAAE,MAAM,CAAC;IACzB,aAAa,EAAE,MAAM,CAAC;IACtB,WAAW,EAAE,MAAM,IAAI,CAAC;IACxB,YAAY,EAAE,gBAAgB,CAAC,MAAM,CAAC,CAAC;CAC1C;AAsCD,MAAM,CAAC,OAAO,UAAU,eAAe,CAAC,EACpC,gBAAgB,EAChB,aAAa,EACb,WAAW,EACX,YAAY,GACf,EAAE,gBAAgB,2CA0ClB"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cleartrip/ct-platform-supercoins-chip",
|
|
3
|
-
"version": "2.4.0
|
|
3
|
+
"version": "2.4.0",
|
|
4
4
|
"description": "SuperCoins Chip Component",
|
|
5
5
|
"types": "dist/index.d.ts",
|
|
6
6
|
"main": "dist/ct-platform-supercoins-chip.cjs.js",
|
|
@@ -10,10 +10,10 @@
|
|
|
10
10
|
"dist"
|
|
11
11
|
],
|
|
12
12
|
"dependencies": {
|
|
13
|
-
"@cleartrip/ct-design-typography": "
|
|
14
|
-
"@cleartrip/ct-platform-supercoins-floating-island": "2.4.0
|
|
15
|
-
"@cleartrip/ct-platform-shimmer": "
|
|
16
|
-
"@cleartrip/ct-platform-utils": "
|
|
13
|
+
"@cleartrip/ct-design-typography": "2.6.0",
|
|
14
|
+
"@cleartrip/ct-platform-supercoins-floating-island": "2.4.0",
|
|
15
|
+
"@cleartrip/ct-platform-shimmer": "4.4.0",
|
|
16
|
+
"@cleartrip/ct-platform-utils": "4.4.0"
|
|
17
17
|
},
|
|
18
18
|
"peerDependencies": {
|
|
19
19
|
"react": ">=16.8.0",
|