impaktapps-design 0.2.68 → 0.2.69
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.
|
@@ -43866,19 +43866,19 @@ const CustomTimer = ({
|
|
|
43866
43866
|
setMin(currdate.getMinutes());
|
|
43867
43867
|
setSec(currdate.getSeconds());
|
|
43868
43868
|
}, 1e3));
|
|
43869
|
-
return () => {
|
|
43870
|
-
clearInterval(interval2);
|
|
43871
|
-
setDays(0);
|
|
43872
|
-
setHours(0);
|
|
43873
|
-
setMin(0);
|
|
43874
|
-
setSec(0);
|
|
43875
|
-
};
|
|
43876
43869
|
} else {
|
|
43877
43870
|
setDays(0);
|
|
43878
43871
|
setHours(0);
|
|
43879
43872
|
setMin(0);
|
|
43880
43873
|
setSec(0);
|
|
43881
43874
|
}
|
|
43875
|
+
return () => {
|
|
43876
|
+
clearInterval(interval2);
|
|
43877
|
+
setDays(0);
|
|
43878
|
+
setHours(0);
|
|
43879
|
+
setMin(0);
|
|
43880
|
+
setSec(0);
|
|
43881
|
+
};
|
|
43882
43882
|
}, [data]);
|
|
43883
43883
|
const containerStyle = {
|
|
43884
43884
|
display: "flex",
|
|
@@ -113,4 +113,4 @@ z`).split(`
|
|
|
113
113
|
animation-iteration-count: infinite;
|
|
114
114
|
animation-delay: 200ms;
|
|
115
115
|
}
|
|
116
|
-
`),_n.rippleVisible,mpe,M2,({theme:e})=>e.transitions.easing.easeInOut,_n.ripplePulsate,({theme:e})=>e.transitions.duration.shorter,_n.child,_n.childLeaving,ype,M2,({theme:e})=>e.transitions.easing.easeInOut,_n.childPulsate,vpe,({theme:e})=>e.transitions.easing.easeInOut);var _pe=ie.forwardRef(function(t,n){const r=yi({props:t,name:"MuiTouchRipple"}),{center:i=!1,classes:a={},className:o}=r,s=Xe(r,ppe),[u,l]=ie.useState([]),c=ie.useRef(0),f=ie.useRef(null);ie.useEffect(()=>{f.current&&(f.current(),f.current=null)},[u]);const h=ie.useRef(!1),d=ie.useRef(0),p=ie.useRef(null),g=ie.useRef(null);ie.useEffect(()=>()=>{d.current&&clearTimeout(d.current)},[]);const m=ie.useCallback(x=>{const{pulsate:w,rippleX:_,rippleY:$,rippleSize:k,cb:T}=x;l(S=>[...S,q(xpe,{classes:{ripple:at(a.ripple,_n.ripple),rippleVisible:at(a.rippleVisible,_n.rippleVisible),ripplePulsate:at(a.ripplePulsate,_n.ripplePulsate),child:at(a.child,_n.child),childLeaving:at(a.childLeaving,_n.childLeaving),childPulsate:at(a.childPulsate,_n.childPulsate)},timeout:M2,pulsate:w,rippleX:_,rippleY:$,rippleSize:k},c.current)]),c.current+=1,f.current=T},[a]),y=ie.useCallback((x={},w={},_=()=>{})=>{const{pulsate:$=!1,center:k=i||w.pulsate,fakeElement:T=!1}=w;if((x==null?void 0:x.type)==="mousedown"&&h.current){h.current=!1;return}(x==null?void 0:x.type)==="touchstart"&&(h.current=!0);const S=T?null:g.current,M=S?S.getBoundingClientRect():{width:0,height:0,left:0,top:0};let A,C,O;if(k||x===void 0||x.clientX===0&&x.clientY===0||!x.clientX&&!x.touches)A=Math.round(M.width/2),C=Math.round(M.height/2);else{const{clientX:P,clientY:E}=x.touches&&x.touches.length>0?x.touches[0]:x;A=Math.round(P-M.left),C=Math.round(E-M.top)}if(k)O=Math.sqrt((2*M.width**2+M.height**2)/3),O%2===0&&(O+=1);else{const P=Math.max(Math.abs((S?S.clientWidth:0)-A),A)*2+2,E=Math.max(Math.abs((S?S.clientHeight:0)-C),C)*2+2;O=Math.sqrt(P**2+E**2)}x!=null&&x.touches?p.current===null&&(p.current=()=>{m({pulsate:$,rippleX:A,rippleY:C,rippleSize:O,cb:_})},d.current=setTimeout(()=>{p.current&&(p.current(),p.current=null)},gpe)):m({pulsate:$,rippleX:A,rippleY:C,rippleSize:O,cb:_})},[i,m]),v=ie.useCallback(()=>{y({},{pulsate:!0})},[y]),b=ie.useCallback((x,w)=>{if(clearTimeout(d.current),(x==null?void 0:x.type)==="touchend"&&p.current){p.current(),p.current=null,d.current=setTimeout(()=>{b(x,w)});return}p.current=null,l(_=>_.length>0?_.slice(1):_),f.current=w},[]);return ie.useImperativeHandle(n,()=>({pulsate:v,start:y,stop:b}),[v,y,b]),q(bpe,re({className:at(_n.root,a.root,o),ref:g},s,{children:q(hpe,{component:null,exit:!0,children:u})}))});function wpe(e){return gi("MuiButtonBase",e)}var $pe=mi("MuiButtonBase",["root","disabled","focusVisible"]);const Spe=["action","centerRipple","children","className","component","disabled","disableRipple","disableTouchRipple","focusRipple","focusVisibleClassName","LinkComponent","onBlur","onClick","onContextMenu","onDragLeave","onFocus","onFocusVisible","onKeyDown","onKeyUp","onMouseDown","onMouseLeave","onMouseUp","onTouchEnd","onTouchMove","onTouchStart","tabIndex","TouchRippleProps","touchRippleRef","type"],Mpe=e=>{const{disabled:t,focusVisible:n,focusVisibleClassName:r,classes:i}=e,o=ya({root:["root",t&&"disabled",n&&"focusVisible"]},wpe,i);return n&&r&&(o.root+=` ${r}`),o},kpe=dr("button",{name:"MuiButtonBase",slot:"Root",overridesResolver:(e,t)=>t.root})({display:"inline-flex",alignItems:"center",justifyContent:"center",position:"relative",boxSizing:"border-box",WebkitTapHighlightColor:"transparent",backgroundColor:"transparent",outline:0,border:0,margin:0,borderRadius:0,padding:0,cursor:"pointer",userSelect:"none",verticalAlign:"middle",MozAppearance:"none",WebkitAppearance:"none",textDecoration:"none",color:"inherit","&::-moz-focus-inner":{borderStyle:"none"},[`&.${$pe.disabled}`]:{pointerEvents:"none",cursor:"default"},"@media print":{colorAdjust:"exact"}});var Tpe=ie.forwardRef(function(t,n){const r=yi({props:t,name:"MuiButtonBase"}),{action:i,centerRipple:a=!1,children:o,className:s,component:u="button",disabled:l=!1,disableRipple:c=!1,disableTouchRipple:f=!1,focusRipple:h=!1,LinkComponent:d="a",onBlur:p,onClick:g,onContextMenu:m,onDragLeave:y,onFocus:v,onFocusVisible:b,onKeyDown:x,onKeyUp:w,onMouseDown:_,onMouseLeave:$,onMouseUp:k,onTouchEnd:T,onTouchMove:S,onTouchStart:M,tabIndex:A=0,TouchRippleProps:C,touchRippleRef:O,type:P}=r,E=Xe(r,Spe),R=ie.useRef(null),L=ie.useRef(null),D=B7(L,O),{isFocusVisibleRef:B,onFocus:W,onBlur:U,ref:Z}=qfe(),[G,Y]=ie.useState(!1);l&&G&&Y(!1),ie.useImperativeHandle(i,()=>({focusVisible:()=>{Y(!0),R.current.focus()}}),[]);const[le,te]=ie.useState(!1);ie.useEffect(()=>{te(!0)},[]);const he=le&&!c&&!l;ie.useEffect(()=>{G&&h&&!c&&le&&L.current.pulsate()},[c,h,G,le]);function I(me,Xl,G0=f){return m0(es=>(Xl&&Xl(es),!G0&&L.current&&L.current[me](es),!0))}const H=I("start",_),Q=I("stop",m),N=I("stop",y),X=I("stop",k),K=I("stop",me=>{G&&me.preventDefault(),$&&$(me)}),ce=I("start",M),ge=I("stop",T),ne=I("stop",S),Oe=I("stop",me=>{U(me),B.current===!1&&Y(!1),p&&p(me)},!1),pr=m0(me=>{R.current||(R.current=me.currentTarget),W(me),B.current===!0&&(Y(!0),b&&b(me)),v&&v(me)}),Qe=()=>{const me=R.current;return u&&u!=="button"&&!(me.tagName==="A"&&me.href)},Qo=ie.useRef(!1),Zo=m0(me=>{h&&!Qo.current&&G&&L.current&&me.key===" "&&(Qo.current=!0,L.current.stop(me,()=>{L.current.start(me)})),me.target===me.currentTarget&&Qe()&&me.key===" "&&me.preventDefault(),x&&x(me),me.target===me.currentTarget&&Qe()&&me.key==="Enter"&&!l&&(me.preventDefault(),g&&g(me))}),Jo=m0(me=>{h&&me.key===" "&&L.current&&G&&!me.defaultPrevented&&(Qo.current=!1,L.current.stop(me,()=>{L.current.pulsate(me)})),w&&w(me),g&&me.target===me.currentTarget&&Qe()&&me.key===" "&&!me.defaultPrevented&&g(me)});let xa=u;xa==="button"&&(E.href||E.to)&&(xa=d);const vi={};xa==="button"?(vi.type=P===void 0?"button":P,vi.disabled=l):(!E.href&&!E.to&&(vi.role="button"),l&&(vi["aria-disabled"]=l));const Kl=B7(n,Z,R),nn=re({},r,{centerRipple:a,component:u,disabled:l,disableRipple:c,disableTouchRipple:f,focusRipple:h,tabIndex:A,focusVisible:G}),_a=Mpe(nn);return ue(kpe,re({as:xa,className:at(_a.root,s),ownerState:nn,onBlur:Oe,onClick:g,onContextMenu:Q,onFocus:pr,onKeyDown:Zo,onKeyUp:Jo,onMouseDown:H,onMouseLeave:K,onMouseUp:X,onDragLeave:N,onTouchEnd:ge,onTouchMove:ne,onTouchStart:ce,ref:Kl,tabIndex:l?-1:A,type:P},vi,E,{children:[o,he?q(_pe,re({ref:D,center:a},C)):null]}))});const Ope=RP();var bt=Ude({themeId:x2,defaultTheme:Ope,defaultClassName:"MuiBox-root",generateClassName:H7.generate});function Ppe(e){return gi("MuiCardActionArea",e)}var k2=mi("MuiCardActionArea",["root","focusVisible","focusHighlight"]);const Cpe=["children","className","focusVisibleClassName"],Ape=e=>{const{classes:t}=e;return ya({root:["root"],focusHighlight:["focusHighlight"]},Ppe,t)},Epe=dr(Tpe,{name:"MuiCardActionArea",slot:"Root",overridesResolver:(e,t)=>t.root})(({theme:e})=>({display:"block",textAlign:"inherit",borderRadius:"inherit",width:"100%",[`&:hover .${k2.focusHighlight}`]:{opacity:(e.vars||e).palette.action.hoverOpacity,"@media (hover: none)":{opacity:0}},[`&.${k2.focusVisible} .${k2.focusHighlight}`]:{opacity:(e.vars||e).palette.action.focusOpacity}})),Npe=dr("span",{name:"MuiCardActionArea",slot:"FocusHighlight",overridesResolver:(e,t)=>t.focusHighlight})(({theme:e})=>({overflow:"hidden",pointerEvents:"none",position:"absolute",top:0,right:0,bottom:0,left:0,borderRadius:"inherit",opacity:0,backgroundColor:"currentcolor",transition:e.transitions.create("opacity",{duration:e.transitions.duration.short})}));var Rpe=ie.forwardRef(function(t,n){const r=yi({props:t,name:"MuiCardActionArea"}),{children:i,className:a,focusVisibleClassName:o}=r,s=Xe(r,Cpe),u=r,l=Ape(u);return ue(Epe,re({className:at(l.root,a),focusVisibleClassName:at(o,l.focusVisible),ref:n,ownerState:u},s,{children:[i,q(Npe,{className:l.focusHighlight,ownerState:u})]}))});function Lpe({value:e}){var l,c;const{uischema:t}=e,n=(l=t==null?void 0:t.config)==null?void 0:l.main,r=(c=t==null?void 0:t.config)==null?void 0:c.style,i={position:"absolute",top:"0px",right:"0px",color:"#0DF3C2",backgroundColor:"#333333",padding:"4px 8px",borderRadius:"3px 12px 4px 14px",fontWeight:"bold",...r==null?void 0:r.rank},a={paddingBottom:"10px",textAlign:"center",maxHeight:100,fontSize:"15px",fontWeight:"400",color:"gray",overflow:"auto",wordWrap:"break-word","&::-webkit-scrollbar":{display:"none"},...r==null?void 0:r.description},o={color:"#3747A6",backgroundColor:"#eae9e9",marginTop:"8px",padding:"0px 12px",textAlign:"center",borderRadius:"8px",fontWeight:"700",...r==null?void 0:r.name},s={boxShadow:"0 4px 8px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19)",minWidth:280,maxWidth:280,minHeight:290,maxHeight:290,position:"relative",borderRadius:"12px",...r==null?void 0:r.card};return q($n,{children:q(bt,{sx:{backgroundColor:"#ebebff",display:"flex",justifyContent:"center",alignItems:"center",gap:"10px",padding:"5px"},children:q(j0e,{sx:s,children:ue(Rpe,{children:[q(Z0e,{component:"img",height:"140",image:"https://cdn.onlinewebfonts.com/svg/img_296570.png",style:{objectFit:"contain",paddingTop:"15px"},alt:"green iguana"}),ue(H0e,{children:[q(_2,{sx:i,children:"# "+(n==null?void 0:n.rank)||"#"}),q(_2,{gutterBottom:!0,variant:"h6",component:"div",sx:o,children:n==null?void 0:n.name}),q(_2,{variant:"body2",color:"text.secondary",sx:a,children:n==null?void 0:n.description})]})]})})})})}const Ipe=({value:e})=>{var b;let{uischema:t,data:n}=e;const r=(b=t==null?void 0:t.config)==null?void 0:b.style,[i,a]=F.useState(0),[o,s]=F.useState(0),[u,l]=F.useState(0),[c,f]=F.useState(0),[h,d]=F.useState();F.useEffect(()=>{if(new Date(n!=null&&n.startDate?n==null?void 0:n.startDate:new Date("08-01-2060").getTime()).getTime()<new Date().getTime()&&new Date(n!=null&&n.startDate?n==null?void 0:n.startDate:new Date("08-01-2060").getTime()).getTime()<new Date(n!=null&&n.endDate?n==null?void 0:n.endDate:new Date("08-01-2060").getTime()).getTime()){let x=new Date;const _=(new Date(n==null?void 0:n.endDate).getTime()-x.getTime())/(1e3*3600*24);return a(Math.floor(_)),d(setInterval(()=>{const $=new Date;f($.getHours()),s($.getMinutes()),l($.getSeconds())},1e3)),()=>{clearInterval(h),a(0),f(0),s(0),l(0)}}else a(0),f(0),s(0),l(0)},[n]);const p={display:"flex",flexDirection:"column",backgroundColor:"rgb(15,15,15)",justifyContent:"center",alignItems:"center",height:"40vh",gap:"10px",...r==null?void 0:r.container},g={backgroundColor:"rgb(51,51,51)",width:"22%",minWidth:"40px",height:"100px",padding:"10px",display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center",...r==null?void 0:r.digitContainer},m={color:"rgb(0,253,199)",fontSize:"19px",fontWeight:"700",padding:"6px",...r==null?void 0:r.digit},y={color:"white",fontSize:"19px",fontWeight:"700",...r==null?void 0:r.digitLabel},v={color:"white",...r.containerLabelColor};return q($n,{children:ue(bt,{component:"div",sx:p,children:[q(bt,{component:"h1",style:v,children:new Date().getTime()>=new Date(n!=null&&n.startDate?n==null?void 0:n.startDate:new Date("08-01-2060").getTime()).getTime()&&new Date().getTime()<=new Date(n!=null&&n.endDate?n==null?void 0:n.endDate:new Date("08-01-2060").getTime()).getTime()?"Contest ends in...":new Date().getTime()<new Date(n!=null&&n.startDate?n==null?void 0:n.startDate:new Date("08-01-2060").getTime()).getTime()?"Program Not Started Yet":"Program Over"}),ue(bt,{style:{display:"flex",gap:"15px",width:"80%",maxWidth:"650px",marginLeft:"auto",marginRight:"auto"},children:[ue(bt,{style:g,children:[ue(bt,{style:m,children:[i===0||i<10?0:Math.floor(i/10),i===0?0:i%10]}),q(bt,{style:y,children:"Days"})]}),ue(bt,{style:g,children:[ue(bt,{style:m,children:[c===0||24-c<10?0:Math.floor((24-c)/10),c===0?0:(24-c)%10]}),q(bt,{style:y,children:"Hours"})]}),ue(bt,{style:g,children:[ue(bt,{style:m,children:[o===0||60-o<10?0:Math.floor((60-o)/10),o===0?0:(60-o)%10]}),q(bt,{style:y,children:"Mins"})]}),ue(bt,{style:g,children:[ue(bt,{style:m,children:[u===0||60-u<10?0:Math.floor((60-u)/10),u===0?0:(60-u)%10]}),q(bt,{style:y,children:"Secs"})]})]})]})})};Le.BarGraph=iB,Le.Card=Lpe,Le.HorizontalBarGraph=_Y,Le.LineGraph=bY,Le.PieGraph=oB,Le.ProgressBar=wY,Le.SpeedoMeter=Nfe,Le.Timer=Ipe,Object.defineProperties(Le,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
|
|
116
|
+
`),_n.rippleVisible,mpe,M2,({theme:e})=>e.transitions.easing.easeInOut,_n.ripplePulsate,({theme:e})=>e.transitions.duration.shorter,_n.child,_n.childLeaving,ype,M2,({theme:e})=>e.transitions.easing.easeInOut,_n.childPulsate,vpe,({theme:e})=>e.transitions.easing.easeInOut);var _pe=ie.forwardRef(function(t,n){const r=yi({props:t,name:"MuiTouchRipple"}),{center:i=!1,classes:a={},className:o}=r,s=Xe(r,ppe),[u,l]=ie.useState([]),c=ie.useRef(0),f=ie.useRef(null);ie.useEffect(()=>{f.current&&(f.current(),f.current=null)},[u]);const h=ie.useRef(!1),d=ie.useRef(0),p=ie.useRef(null),g=ie.useRef(null);ie.useEffect(()=>()=>{d.current&&clearTimeout(d.current)},[]);const m=ie.useCallback(x=>{const{pulsate:w,rippleX:_,rippleY:$,rippleSize:k,cb:T}=x;l(S=>[...S,q(xpe,{classes:{ripple:at(a.ripple,_n.ripple),rippleVisible:at(a.rippleVisible,_n.rippleVisible),ripplePulsate:at(a.ripplePulsate,_n.ripplePulsate),child:at(a.child,_n.child),childLeaving:at(a.childLeaving,_n.childLeaving),childPulsate:at(a.childPulsate,_n.childPulsate)},timeout:M2,pulsate:w,rippleX:_,rippleY:$,rippleSize:k},c.current)]),c.current+=1,f.current=T},[a]),y=ie.useCallback((x={},w={},_=()=>{})=>{const{pulsate:$=!1,center:k=i||w.pulsate,fakeElement:T=!1}=w;if((x==null?void 0:x.type)==="mousedown"&&h.current){h.current=!1;return}(x==null?void 0:x.type)==="touchstart"&&(h.current=!0);const S=T?null:g.current,M=S?S.getBoundingClientRect():{width:0,height:0,left:0,top:0};let A,C,O;if(k||x===void 0||x.clientX===0&&x.clientY===0||!x.clientX&&!x.touches)A=Math.round(M.width/2),C=Math.round(M.height/2);else{const{clientX:P,clientY:E}=x.touches&&x.touches.length>0?x.touches[0]:x;A=Math.round(P-M.left),C=Math.round(E-M.top)}if(k)O=Math.sqrt((2*M.width**2+M.height**2)/3),O%2===0&&(O+=1);else{const P=Math.max(Math.abs((S?S.clientWidth:0)-A),A)*2+2,E=Math.max(Math.abs((S?S.clientHeight:0)-C),C)*2+2;O=Math.sqrt(P**2+E**2)}x!=null&&x.touches?p.current===null&&(p.current=()=>{m({pulsate:$,rippleX:A,rippleY:C,rippleSize:O,cb:_})},d.current=setTimeout(()=>{p.current&&(p.current(),p.current=null)},gpe)):m({pulsate:$,rippleX:A,rippleY:C,rippleSize:O,cb:_})},[i,m]),v=ie.useCallback(()=>{y({},{pulsate:!0})},[y]),b=ie.useCallback((x,w)=>{if(clearTimeout(d.current),(x==null?void 0:x.type)==="touchend"&&p.current){p.current(),p.current=null,d.current=setTimeout(()=>{b(x,w)});return}p.current=null,l(_=>_.length>0?_.slice(1):_),f.current=w},[]);return ie.useImperativeHandle(n,()=>({pulsate:v,start:y,stop:b}),[v,y,b]),q(bpe,re({className:at(_n.root,a.root,o),ref:g},s,{children:q(hpe,{component:null,exit:!0,children:u})}))});function wpe(e){return gi("MuiButtonBase",e)}var $pe=mi("MuiButtonBase",["root","disabled","focusVisible"]);const Spe=["action","centerRipple","children","className","component","disabled","disableRipple","disableTouchRipple","focusRipple","focusVisibleClassName","LinkComponent","onBlur","onClick","onContextMenu","onDragLeave","onFocus","onFocusVisible","onKeyDown","onKeyUp","onMouseDown","onMouseLeave","onMouseUp","onTouchEnd","onTouchMove","onTouchStart","tabIndex","TouchRippleProps","touchRippleRef","type"],Mpe=e=>{const{disabled:t,focusVisible:n,focusVisibleClassName:r,classes:i}=e,o=ya({root:["root",t&&"disabled",n&&"focusVisible"]},wpe,i);return n&&r&&(o.root+=` ${r}`),o},kpe=dr("button",{name:"MuiButtonBase",slot:"Root",overridesResolver:(e,t)=>t.root})({display:"inline-flex",alignItems:"center",justifyContent:"center",position:"relative",boxSizing:"border-box",WebkitTapHighlightColor:"transparent",backgroundColor:"transparent",outline:0,border:0,margin:0,borderRadius:0,padding:0,cursor:"pointer",userSelect:"none",verticalAlign:"middle",MozAppearance:"none",WebkitAppearance:"none",textDecoration:"none",color:"inherit","&::-moz-focus-inner":{borderStyle:"none"},[`&.${$pe.disabled}`]:{pointerEvents:"none",cursor:"default"},"@media print":{colorAdjust:"exact"}});var Tpe=ie.forwardRef(function(t,n){const r=yi({props:t,name:"MuiButtonBase"}),{action:i,centerRipple:a=!1,children:o,className:s,component:u="button",disabled:l=!1,disableRipple:c=!1,disableTouchRipple:f=!1,focusRipple:h=!1,LinkComponent:d="a",onBlur:p,onClick:g,onContextMenu:m,onDragLeave:y,onFocus:v,onFocusVisible:b,onKeyDown:x,onKeyUp:w,onMouseDown:_,onMouseLeave:$,onMouseUp:k,onTouchEnd:T,onTouchMove:S,onTouchStart:M,tabIndex:A=0,TouchRippleProps:C,touchRippleRef:O,type:P}=r,E=Xe(r,Spe),R=ie.useRef(null),L=ie.useRef(null),D=B7(L,O),{isFocusVisibleRef:B,onFocus:W,onBlur:U,ref:Z}=qfe(),[G,Y]=ie.useState(!1);l&&G&&Y(!1),ie.useImperativeHandle(i,()=>({focusVisible:()=>{Y(!0),R.current.focus()}}),[]);const[le,te]=ie.useState(!1);ie.useEffect(()=>{te(!0)},[]);const he=le&&!c&&!l;ie.useEffect(()=>{G&&h&&!c&&le&&L.current.pulsate()},[c,h,G,le]);function I(me,Xl,G0=f){return m0(es=>(Xl&&Xl(es),!G0&&L.current&&L.current[me](es),!0))}const H=I("start",_),Q=I("stop",m),N=I("stop",y),X=I("stop",k),K=I("stop",me=>{G&&me.preventDefault(),$&&$(me)}),ce=I("start",M),ge=I("stop",T),ne=I("stop",S),Oe=I("stop",me=>{U(me),B.current===!1&&Y(!1),p&&p(me)},!1),pr=m0(me=>{R.current||(R.current=me.currentTarget),W(me),B.current===!0&&(Y(!0),b&&b(me)),v&&v(me)}),Qe=()=>{const me=R.current;return u&&u!=="button"&&!(me.tagName==="A"&&me.href)},Qo=ie.useRef(!1),Zo=m0(me=>{h&&!Qo.current&&G&&L.current&&me.key===" "&&(Qo.current=!0,L.current.stop(me,()=>{L.current.start(me)})),me.target===me.currentTarget&&Qe()&&me.key===" "&&me.preventDefault(),x&&x(me),me.target===me.currentTarget&&Qe()&&me.key==="Enter"&&!l&&(me.preventDefault(),g&&g(me))}),Jo=m0(me=>{h&&me.key===" "&&L.current&&G&&!me.defaultPrevented&&(Qo.current=!1,L.current.stop(me,()=>{L.current.pulsate(me)})),w&&w(me),g&&me.target===me.currentTarget&&Qe()&&me.key===" "&&!me.defaultPrevented&&g(me)});let xa=u;xa==="button"&&(E.href||E.to)&&(xa=d);const vi={};xa==="button"?(vi.type=P===void 0?"button":P,vi.disabled=l):(!E.href&&!E.to&&(vi.role="button"),l&&(vi["aria-disabled"]=l));const Kl=B7(n,Z,R),nn=re({},r,{centerRipple:a,component:u,disabled:l,disableRipple:c,disableTouchRipple:f,focusRipple:h,tabIndex:A,focusVisible:G}),_a=Mpe(nn);return ue(kpe,re({as:xa,className:at(_a.root,s),ownerState:nn,onBlur:Oe,onClick:g,onContextMenu:Q,onFocus:pr,onKeyDown:Zo,onKeyUp:Jo,onMouseDown:H,onMouseLeave:K,onMouseUp:X,onDragLeave:N,onTouchEnd:ge,onTouchMove:ne,onTouchStart:ce,ref:Kl,tabIndex:l?-1:A,type:P},vi,E,{children:[o,he?q(_pe,re({ref:D,center:a},C)):null]}))});const Ope=RP();var bt=Ude({themeId:x2,defaultTheme:Ope,defaultClassName:"MuiBox-root",generateClassName:H7.generate});function Ppe(e){return gi("MuiCardActionArea",e)}var k2=mi("MuiCardActionArea",["root","focusVisible","focusHighlight"]);const Cpe=["children","className","focusVisibleClassName"],Ape=e=>{const{classes:t}=e;return ya({root:["root"],focusHighlight:["focusHighlight"]},Ppe,t)},Epe=dr(Tpe,{name:"MuiCardActionArea",slot:"Root",overridesResolver:(e,t)=>t.root})(({theme:e})=>({display:"block",textAlign:"inherit",borderRadius:"inherit",width:"100%",[`&:hover .${k2.focusHighlight}`]:{opacity:(e.vars||e).palette.action.hoverOpacity,"@media (hover: none)":{opacity:0}},[`&.${k2.focusVisible} .${k2.focusHighlight}`]:{opacity:(e.vars||e).palette.action.focusOpacity}})),Npe=dr("span",{name:"MuiCardActionArea",slot:"FocusHighlight",overridesResolver:(e,t)=>t.focusHighlight})(({theme:e})=>({overflow:"hidden",pointerEvents:"none",position:"absolute",top:0,right:0,bottom:0,left:0,borderRadius:"inherit",opacity:0,backgroundColor:"currentcolor",transition:e.transitions.create("opacity",{duration:e.transitions.duration.short})}));var Rpe=ie.forwardRef(function(t,n){const r=yi({props:t,name:"MuiCardActionArea"}),{children:i,className:a,focusVisibleClassName:o}=r,s=Xe(r,Cpe),u=r,l=Ape(u);return ue(Epe,re({className:at(l.root,a),focusVisibleClassName:at(o,l.focusVisible),ref:n,ownerState:u},s,{children:[i,q(Npe,{className:l.focusHighlight,ownerState:u})]}))});function Lpe({value:e}){var l,c;const{uischema:t}=e,n=(l=t==null?void 0:t.config)==null?void 0:l.main,r=(c=t==null?void 0:t.config)==null?void 0:c.style,i={position:"absolute",top:"0px",right:"0px",color:"#0DF3C2",backgroundColor:"#333333",padding:"4px 8px",borderRadius:"3px 12px 4px 14px",fontWeight:"bold",...r==null?void 0:r.rank},a={paddingBottom:"10px",textAlign:"center",maxHeight:100,fontSize:"15px",fontWeight:"400",color:"gray",overflow:"auto",wordWrap:"break-word","&::-webkit-scrollbar":{display:"none"},...r==null?void 0:r.description},o={color:"#3747A6",backgroundColor:"#eae9e9",marginTop:"8px",padding:"0px 12px",textAlign:"center",borderRadius:"8px",fontWeight:"700",...r==null?void 0:r.name},s={boxShadow:"0 4px 8px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19)",minWidth:280,maxWidth:280,minHeight:290,maxHeight:290,position:"relative",borderRadius:"12px",...r==null?void 0:r.card};return q($n,{children:q(bt,{sx:{backgroundColor:"#ebebff",display:"flex",justifyContent:"center",alignItems:"center",gap:"10px",padding:"5px"},children:q(j0e,{sx:s,children:ue(Rpe,{children:[q(Z0e,{component:"img",height:"140",image:"https://cdn.onlinewebfonts.com/svg/img_296570.png",style:{objectFit:"contain",paddingTop:"15px"},alt:"green iguana"}),ue(H0e,{children:[q(_2,{sx:i,children:"# "+(n==null?void 0:n.rank)||"#"}),q(_2,{gutterBottom:!0,variant:"h6",component:"div",sx:o,children:n==null?void 0:n.name}),q(_2,{variant:"body2",color:"text.secondary",sx:a,children:n==null?void 0:n.description})]})]})})})})}const Ipe=({value:e})=>{var b;let{uischema:t,data:n}=e;const r=(b=t==null?void 0:t.config)==null?void 0:b.style,[i,a]=F.useState(0),[o,s]=F.useState(0),[u,l]=F.useState(0),[c,f]=F.useState(0),[h,d]=F.useState();F.useEffect(()=>{if(new Date(n!=null&&n.startDate?n==null?void 0:n.startDate:new Date("08-01-2060").getTime()).getTime()<new Date().getTime()&&new Date(n!=null&&n.startDate?n==null?void 0:n.startDate:new Date("08-01-2060").getTime()).getTime()<new Date(n!=null&&n.endDate?n==null?void 0:n.endDate:new Date("08-01-2060").getTime()).getTime()){let x=new Date;const _=(new Date(n==null?void 0:n.endDate).getTime()-x.getTime())/(1e3*3600*24);a(Math.floor(_)),d(setInterval(()=>{const $=new Date;f($.getHours()),s($.getMinutes()),l($.getSeconds())},1e3))}else a(0),f(0),s(0),l(0);return()=>{clearInterval(h),a(0),f(0),s(0),l(0)}},[n]);const p={display:"flex",flexDirection:"column",backgroundColor:"rgb(15,15,15)",justifyContent:"center",alignItems:"center",height:"40vh",gap:"10px",...r==null?void 0:r.container},g={backgroundColor:"rgb(51,51,51)",width:"22%",minWidth:"40px",height:"100px",padding:"10px",display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center",...r==null?void 0:r.digitContainer},m={color:"rgb(0,253,199)",fontSize:"19px",fontWeight:"700",padding:"6px",...r==null?void 0:r.digit},y={color:"white",fontSize:"19px",fontWeight:"700",...r==null?void 0:r.digitLabel},v={color:"white",...r.containerLabelColor};return q($n,{children:ue(bt,{component:"div",sx:p,children:[q(bt,{component:"h1",style:v,children:new Date().getTime()>=new Date(n!=null&&n.startDate?n==null?void 0:n.startDate:new Date("08-01-2060").getTime()).getTime()&&new Date().getTime()<=new Date(n!=null&&n.endDate?n==null?void 0:n.endDate:new Date("08-01-2060").getTime()).getTime()?"Contest ends in...":new Date().getTime()<new Date(n!=null&&n.startDate?n==null?void 0:n.startDate:new Date("08-01-2060").getTime()).getTime()?"Program Not Started Yet":"Program Over"}),ue(bt,{style:{display:"flex",gap:"15px",width:"80%",maxWidth:"650px",marginLeft:"auto",marginRight:"auto"},children:[ue(bt,{style:g,children:[ue(bt,{style:m,children:[i===0||i<10?0:Math.floor(i/10),i===0?0:i%10]}),q(bt,{style:y,children:"Days"})]}),ue(bt,{style:g,children:[ue(bt,{style:m,children:[c===0||24-c<10?0:Math.floor((24-c)/10),c===0?0:(24-c)%10]}),q(bt,{style:y,children:"Hours"})]}),ue(bt,{style:g,children:[ue(bt,{style:m,children:[o===0||60-o<10?0:Math.floor((60-o)/10),o===0?0:(60-o)%10]}),q(bt,{style:y,children:"Mins"})]}),ue(bt,{style:g,children:[ue(bt,{style:m,children:[u===0||60-u<10?0:Math.floor((60-u)/10),u===0?0:(60-u)%10]}),q(bt,{style:y,children:"Secs"})]})]})]})})};Le.BarGraph=iB,Le.Card=Lpe,Le.HorizontalBarGraph=_Y,Le.LineGraph=bY,Le.PieGraph=oB,Le.ProgressBar=wY,Le.SpeedoMeter=Nfe,Le.Timer=Ipe,Object.defineProperties(Le,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
|
package/package.json
CHANGED
|
@@ -31,19 +31,21 @@ const CustomTimer = ({ value }) => {
|
|
|
31
31
|
setSec(currdate.getSeconds());
|
|
32
32
|
}, 1000)
|
|
33
33
|
);
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
setHours(0);
|
|
38
|
-
setMin(0);
|
|
39
|
-
setSec(0);
|
|
40
|
-
};
|
|
41
|
-
} else {
|
|
34
|
+
|
|
35
|
+
}
|
|
36
|
+
else {
|
|
42
37
|
setDays(0);
|
|
43
38
|
setHours(0);
|
|
44
39
|
setMin(0);
|
|
45
40
|
setSec(0);
|
|
46
41
|
}
|
|
42
|
+
return () => {
|
|
43
|
+
clearInterval(interval);
|
|
44
|
+
setDays(0);
|
|
45
|
+
setHours(0);
|
|
46
|
+
setMin(0);
|
|
47
|
+
setSec(0);
|
|
48
|
+
};
|
|
47
49
|
},[data]);
|
|
48
50
|
|
|
49
51
|
const containerStyle = {display: "flex",flexDirection: "column",backgroundColor: "rgb(15,15,15)",justifyContent: "center",alignItems: "center",height: "40vh",gap: "10px",...uischemaStyle?.container};
|