kwant-ui 3.33.6-stable.3 → 3.33.6-stable.4
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/index.es.js +1 -1
- package/dist/index.js +1 -1
- package/dist/package.json +1 -1
- package/package.json +1 -1
package/dist/index.es.js
CHANGED
|
@@ -4259,7 +4259,7 @@ import{jsx as e,jsxs as t,Fragment as r}from"react/jsx-runtime";import n,{css as
|
|
|
4259
4259
|
svg {
|
|
4260
4260
|
cursor: pointer;
|
|
4261
4261
|
}
|
|
4262
|
-
`,rF=(e,t)=>{if(e&&"DD/MM/YYYY"===t&&!t.includes("-")){const t=e.split("/");return`${t[2]}-${t[1]}-${t[0]}`}return e},nF="Actual Workforce overlay",aF="Workforce Variance",cF="#F7EFF3",iF="transparent",oF=r=>{const{payload:n}=r;return e(TN,{children:n?.map((({color:r,type:n,value:a,payload:c,shape:i})=>{if("none"===n)return null;if(a===nF)return null;return t(NN,{children:[i??e(FN,{children:e(QN,{color:(a===aF?cF:r===iF?c?.fill:r||iF)||iF})}),e(YN,{children:a})]},a)}))})},sF=t=>{const{value:r,dy:n}=t;return e(UN,{dy:n,...RN,children:r})},lF=r=>{const{x:n,y:a,payload:c,rotate:i=0,dateFormat:o}=r,s=kc(rF(c.value,o)).format("ddd"),l=kc(rF(c.value,o)).format(o);return t($N,{transform:`translate(${n},${a}), rotate(${i})`,children:[e(sF,{value:s,dy:16}),e(sF,{value:l,dy:36})]})},hF=(e,t)=>kc(rF(e,t)).format("ddd, DD MMM YYYY"),vF=({color:r,name:n,value:a,shape:c})=>n===nF?null:t(KN,{children:[t(qN,{children:[c,r&&e(GN,{color:n===aF?cF:r||iF}),e(JN,{children:n})]}),e(eF,{children:a})]}),pF=r=>{const{label:n,payload:a,labelFormatter:c}=r,i=c?c(n,a||[]):n;return t(WN,{style:{transform:"translateY(-50%)"},children:[e(XN,{children:i}),a?.map((t=>{return e(vF,{color:t.color,name:t.name,value:(r=t.value,isNaN(Number(r))?r:Number(r).toLocaleString("en-US",{minimumFractionDigits:0,maximumFractionDigits:2}))});var r}))]})},uF=e=>{const[t,r]=p(!1);return l((()=>{document.addEventListener("fullscreenchange",(function(){document.fullscreenElement?r(!0):r(!1)}))}),[]),{fullScreenEnterExitRequest:()=>{if(e.current){const t=e.current.current.parentElement;if(t)if(document.fullscreenElement)document.exitFullscreen&&(document.exitFullscreen(),r(!1));else try{t.requestFullscreen?t.requestFullscreen():t.webkitRequestFullscreen?t.webkitRequestFullscreen():t.msRequestFullscreen&&t.msRequestFullscreen()}catch(e){console.log({error:e})}finally{r((e=>!e))}}},fullScreen:t}},gF=n=>{const{width:a,height:c=600,margin:i={right:30,bottom:20},data:o,areas:s,areasYAxisRight:l,xAxisDataKey:h,showTooltip:v,xAxisLabel:g,yAxisLeftLabel:m,showLegends:d,showRightYAxis:_,isGradient:w=!1,yAxisRightLabel:b,gradientColor:y,gradientStart:x=0,gradientStop:Z=.3,customTooltip:O=e(pF,{}),areaProps:M={},cartesianGridProps:E={},legendProps:H={},tooltipProps:P={},xAxisProps:j={},yAxisProps:V={},yAxisRightProps:C={},areaYAxisRightProps:A={},showAverageLine:L=!0,averageLineValue:z,averageLineColor:B="#2DA170",customTooltipLabelFormatter:k=hF,hideXAxis:S=!1,hideYAxis:R=!1,hideCartesianGrid:D=!1,fullScreenFeature:I=!1,dateFormat:T}=n,[N,F]=p({x:0,y:0}),Q=u(null),Y=Q?.current?.current?.parentElement,{fullScreen:$,fullScreenEnterExitRequest:U}=uF(Q);return t(r,{children:[I&&e(tF,{fullScreen:$,children:e(nt,{width:24,height:24,icon:$?"fullscreen_exit":"fullscreen",onClick:U})}),e(Dy,{width:a,height:c,ref:Q,children:t(dN,{data:o,margin:i,onMouseMove:e=>F({x:e.chartX,y:e.chartY<=60?70:e.chartY}),children:[e("defs",{children:w&&t("linearGradient",{id:"custom_linear_gradient",x1:"0",y1:"0",x2:"0",y2:"1",children:[e("stop",{offset:"5%",stopColor:y,stopOpacity:Z}),e("stop",{offset:"95%",stopColor:y,stopOpacity:x})]})}),v&&e(vy,{content:O,labelFormatter:e=>k(e,T),coordinate:{...N},position:{y:N.y},reverseDirection:{x:N.x>Y?.getBoundingClientRect().width/2},...P}),d&&e(jd,{dy:80,verticalAlign:"bottom",height:100,layout:"horizontal",content:e(oF,{}),wrapperStyle:{paddingTop:60},...H}),!S&&e(NS,{dataKey:h,includeHidden:!0,interval:o.length>10?"equidistantPreserveStart":1,minTickGap:o.length>10?40:5,tick:e(lF,{dateFormat:T}),axisLine:{stroke:"#E4E9F2"},tickLine:!1,label:{value:g,position:"insideBottom",fill:"#455F7B",fontSize:12,fontFamily:"Poppins",offset:-45},padding:{right:10},...j}),!R&&e(FS,{yAxisId:"left",...DN,label:{value:m,angle:-90,dx:-30,...DN.label},...V}),_&&t(r,{children:[e(FS,{...DN,yAxisId:"right",hide:!_,orientation:"right",tickCount:3,tickFormatter:e=>`${e}%`,interval:0,minTickGap:20,domain:[0,100],label:{value:b,angle:90,dx:20,...DN.label},...V,...C}),l?.map((e=>f(OS,{...e,...IN,key:e.dataKey,dataKey:e.dataKey,fillOpacity:e.fillOpacity,stroke:e.stroke||"transparent",fill:w?"url(#custom_linear_gradient)":e.color||"transparent",yAxisId:e.yAxisId||"left",name:e.name,...M,...A})))]}),s?.map((e=>f(OS,{...e,...IN,key:e.dataKey,dataKey:e.dataKey,fillOpacity:e.fillOpacity,stroke:e.stroke||"transparent",fill:w?"url(#custom_linear_gradient)":e.color||"transparent",yAxisId:e.yAxisId||"left",name:e.name,...M,...A}))),!D&&e(Uk,{...E,strokeDasharray:"4 4",vertical:!1,stroke:"#E4E9F2"}),L&&e(JB,{y:z,yAxisId:"left",stroke:B,strokeDasharray:"4 4"})]})})]})},mF=t=>{const{x:r,y:n,payload:a,rotate:c=0,dateFormat:i}=t,[o,s]=a.value.split(" - "),l=i.replace(/\/yyyy/gi,""),h=kc(o,i).format(l),v=kc(s,i).format(i);return e($N,{transform:`translate(${r},${n}), rotate(${c})`,children:e(sF,{value:`${h} - ${v}`,dy:16})})},dF=t=>{const{x:r,y:n,width:a,height:c}=t;return e("svg",{style:{pointerEvents:"none"},children:e("line",{x1:+r+ +a/2,y1:0,x2:+r+ +a/2,y2:+n+ +c+10,stroke:"#A1AFC0",strokeWidth:1,opacity:.1})})},fF=r=>{const n=r.dateFormat,a=r.payload[0]?.dataKey,[c]="string"==typeof a&&a?.split(".")||[],i=r.payload[0]?.payload[c],o=kc(i?.date,n).format(`ddd, ${n}`);return t(WN,{style:{transform:"translateY(-50%)"},children:[e(XN,{children:o}),e(vF,{name:"Work Phase Time:",value:i?.workPhaseTimeHour||"N/A",color:"#5879EF"}),e(vF,{name:"Slack Time:",value:i?.slackTimeHour||"N/A",color:"#A1AFC0"})]})},_F={},wF=[1,2,3,4,5,6,7],bF=e=>`${e}h`,yF=r=>{const{legends:n,data:a,width:c,height:i,labelX:s,labelY:l,workPhaseTimeHourLabel:h,slackTimeHourLabel:v,dataKeyX:u,dataKeyY:g,workPhaseTimeHourDataKey:m,slackTimeHourDataKey:d,margin:f,showLegends:_,showTooltip:w,customXAxisTickFormatter:b,customYAxisTickFormatter:y=bF,dateFormat:x="MM/DD/YYYY"}=r,[Z,O]=p(!1),[M,E]=p({chartX:0}),H=a.length>4?-10:0,P=e=>{const{x:t}=e||{};"number"==typeof t&&(E({chartX:t+18}),O(!0))},j=()=>{O(!1)};return e(Dy,{width:c,height:i,children:t(XR,{data:a,barSize:18,barGap:6,margin:f,children:[e(Uk,{vertical:!1,strokeDasharray:"4 4",stroke:"#E4E9F2"}),w&&e(vy,{shared:!1,content:e(fF,{dateFormat:x})}),_&&e(jd,{dy:80,verticalAlign:"bottom",height:100,layout:"horizontal",content:e(oF,{}),wrapperStyle:{paddingTop:60},payload:n}),e(NS,{dataKey:u,tickLine:!1,xAxisId:"xAxis",tick:e(mF,{dateFormat:x,rotate:H}),tickFormatter:b,interval:0,axisLine:{stroke:"#E4E9F2"},padding:{left:0,right:0},label:{value:s,fill:"#455F7B",fontSize:12,fontFamily:"Poppins",dy:40}}),e(FS,{...DN,tickFormatter:y,dataKey:g,label:{...DN.label,value:l,angle:-90,dx:-30}}),wF.map((r=>t(o.Fragment,{children:[e(zB,{dataKey:`day${r}.${m}`,stackId:r,xAxisId:"xAxis",fill:Z?"#9FB2F6":"#708CF1",..._F,className:"productive",name:h,activeBar:!1,onMouseOver:P,onMouseLeave:j,children:Z&&e(JV,{dataKey:`day${r}.${m}`,content:dF,x:M.chartX-18})}),e(zB,{dataKey:`day${r}.${d}`,stackId:r,xAxisId:"xAxis",fill:Z?"#BFCADF":"#D1D9E7",..._F,radius:[4,4,0,0],className:"unproductive",name:v,activeBar:!1,onMouseOver:P,onMouseLeave:j})]},r)))]})})},xF={fill:"#798CA4",fontFamily:"Poppins",fontSize:12,textAnchor:"middle",x:0,y:0},ZF={tick:{fill:"#798CA4",fontFamily:"Poppins",fontSize:12,fontWeight:400},tickLine:!1,axisLine:!1,label:{position:"inside",fill:"#455F7B",fontSize:12,fontFamily:"Poppins",offset:20}},OF=n.div`
|
|
4262
|
+
`,rF=(e,t)=>{if(e&&"DD/MM/YYYY"===t&&!t.includes("-")){const t=e.split("/");return`${t[2]}-${t[1]}-${t[0]}`}return e},nF="Actual Workforce overlay",aF="Workforce Variance",cF="#F7EFF3",iF="transparent",oF=r=>{const{payload:n}=r;return e(TN,{children:n?.map((({color:r,type:n,value:a,payload:c,shape:i})=>{if("none"===n)return null;if(a===nF)return null;return t(NN,{children:[i??e(FN,{children:e(QN,{color:(a===aF?cF:r===iF?c?.fill:r||iF)||iF})}),e(YN,{children:a})]},a)}))})},sF=t=>{const{value:r,dy:n}=t;return e(UN,{dy:n,...RN,children:r})},lF=r=>{const{x:n,y:a,payload:c,rotate:i=0,dateFormat:o}=r,s=kc(rF(c.value,o)).format("ddd"),l=kc(rF(c.value,o)).format(o);return t($N,{transform:`translate(${n},${a}), rotate(${i})`,children:[e(sF,{value:s,dy:16}),e(sF,{value:l,dy:36})]})},hF=(e,t)=>kc(rF(e,t)).format("ddd, DD MMM YYYY"),vF=({color:r,name:n,value:a,shape:c})=>n===nF?null:t(KN,{children:[t(qN,{children:[c,r&&e(GN,{color:n===aF?cF:r||iF}),e(JN,{children:n})]}),e(eF,{children:a})]}),pF=r=>{const{label:n,payload:a,labelFormatter:c}=r,i=c?c(n,a||[]):n;return t(WN,{style:{transform:"translateY(-50%)"},children:[e(XN,{children:i}),a?.map((t=>{return e(vF,{color:t.color,name:t.name,value:(r=t.value,isNaN(Number(r))?r:Number(r).toLocaleString("en-US",{minimumFractionDigits:0,maximumFractionDigits:2}))});var r}))]})},uF=e=>{const[t,r]=p(!1);return l((()=>{document.addEventListener("fullscreenchange",(function(){document.fullscreenElement?r(!0):r(!1)}))}),[]),{fullScreenEnterExitRequest:()=>{if(e.current){const t=e.current.current.parentElement;if(t)if(document.fullscreenElement)document.exitFullscreen&&(document.exitFullscreen(),r(!1));else try{t.requestFullscreen?t.requestFullscreen():t.webkitRequestFullscreen?t.webkitRequestFullscreen():t.msRequestFullscreen&&t.msRequestFullscreen()}catch(e){console.log({error:e})}finally{r((e=>!e))}}},fullScreen:t}},gF=n=>{const{width:a,height:c=600,margin:i={right:30,bottom:20},data:o,areas:s,areasYAxisRight:l,xAxisDataKey:h,showTooltip:v,xAxisLabel:g,yAxisLeftLabel:m,showLegends:d,showRightYAxis:_,isGradient:w=!1,yAxisRightLabel:b,gradientColor:y,gradientStart:x=0,gradientStop:Z=.3,customTooltip:O=e(pF,{}),areaProps:M={},cartesianGridProps:E={},legendProps:H={},tooltipProps:P={},xAxisProps:j={},yAxisProps:V={},yAxisRightProps:C={},areaYAxisRightProps:A={},showAverageLine:L=!0,averageLineValue:z,averageLineColor:B="#2DA170",customTooltipLabelFormatter:k=hF,hideXAxis:S=!1,hideYAxis:R=!1,hideCartesianGrid:D=!1,fullScreenFeature:I=!1,dateFormat:T}=n,[N,F]=p({x:0,y:0}),Q=u(null),Y=Q?.current?.current?.parentElement,{fullScreen:$,fullScreenEnterExitRequest:U}=uF(Q);return t(r,{children:[I&&e(tF,{fullScreen:$,children:e(nt,{width:24,height:24,icon:$?"fullscreen_exit":"fullscreen",onClick:U})}),e(Dy,{width:a,height:c,ref:Q,children:t(dN,{data:o,margin:i,onMouseMove:e=>F({x:e.chartX,y:e.chartY<=60?70:e.chartY}),children:[e("defs",{children:w&&t("linearGradient",{id:"custom_linear_gradient",x1:"0",y1:"0",x2:"0",y2:"1",children:[e("stop",{offset:"5%",stopColor:y,stopOpacity:Z}),e("stop",{offset:"95%",stopColor:y,stopOpacity:x})]})}),v&&e(vy,{content:O,labelFormatter:e=>k(e,T),coordinate:{...N},position:{y:N.y},reverseDirection:{x:N.x>Y?.getBoundingClientRect().width/2},...P}),d&&e(jd,{dy:80,verticalAlign:"bottom",height:100,layout:"horizontal",content:e(oF,{}),wrapperStyle:{paddingTop:60},...H}),!S&&e(NS,{dataKey:h,includeHidden:!0,interval:o.length>10?"equidistantPreserveStart":1,minTickGap:o.length>10?40:5,tick:e(lF,{dateFormat:T}),axisLine:{stroke:"#E4E9F2"},tickLine:!1,label:{value:g,position:"insideBottom",fill:"#455F7B",fontSize:12,fontFamily:"Poppins",offset:-45},padding:{right:10},...j}),!R&&e(FS,{yAxisId:"left",...DN,label:{value:m,angle:-90,dx:-30,...DN.label},...V}),_&&t(r,{children:[e(FS,{...DN,yAxisId:"right",hide:!_,orientation:"right",tickCount:3,tickFormatter:e=>`${e}%`,interval:0,minTickGap:20,domain:[0,100],label:{value:b,angle:90,dx:20,...DN.label},...V,...C}),l?.map((e=>f(OS,{...e,...IN,key:e.dataKey,dataKey:e.dataKey,fillOpacity:e.fillOpacity,stroke:e.stroke||"transparent",fill:w?"url(#custom_linear_gradient)":e.color||"transparent",yAxisId:e.yAxisId||"left",name:e.name,...M,...A})))]}),s?.map((e=>f(OS,{...e,...IN,key:e.dataKey,dataKey:e.dataKey,fillOpacity:e.fillOpacity,stroke:e.stroke||"transparent",fill:w?"url(#custom_linear_gradient)":e.color||"transparent",yAxisId:e.yAxisId||"left",name:e.name,...M,...A}))),!D&&e(Uk,{...E,strokeDasharray:"4 4",vertical:!1,stroke:"#E4E9F2"}),L&&e(JB,{y:z,yAxisId:"left",stroke:B,strokeDasharray:"4 4"})]})})]})},mF=t=>{const{x:r,y:n,payload:a,rotate:c=0,dateFormat:i}=t,[o,s]=a.value.split(" - "),l=i.replace(/\/yyyy/gi,""),h=kc(o,i).format(l),v=kc(s,i).format(i);return e($N,{transform:`translate(${r},${n}), rotate(${c})`,children:e(sF,{value:`${h} - ${v}`,dy:16})})},dF=t=>{const{x:r,y:n,width:a,height:c}=t;return e("svg",{style:{pointerEvents:"none"},children:e("line",{x1:+r+ +a/2,y1:0,x2:+r+ +a/2,y2:+n+ +c+10,stroke:"#A1AFC0",strokeWidth:1,opacity:.1})})},fF=r=>{const n=r.dateFormat,a=r.payload[0]?.dataKey,[c]="string"==typeof a&&a?.split(".")||[],i=r.payload[0]?.payload[c],o=kc(i?.date,n).format(`ddd, ${n}`);return t(WN,{style:{transform:"translateY(-50%)"},children:[e(XN,{children:o}),e(vF,{name:"Work Phase Time:",value:i?.workPhaseTimeHour||"N/A",color:"#5879EF"}),e(vF,{name:"Slack Time:",value:i?.slackTimeHour||"N/A",color:"#A1AFC0"})]})},_F={},wF=[1,2,3,4,5,6,7],bF=e=>`${e}h`,yF=r=>{const{legends:n,data:a,width:c,height:i,labelX:s,labelY:l,workPhaseTimeHourLabel:h,slackTimeHourLabel:v,dataKeyX:u,dataKeyY:g,workPhaseTimeHourDataKey:m,slackTimeHourDataKey:d,margin:f,showLegends:_,showTooltip:w,customXAxisTickFormatter:b,customYAxisTickFormatter:y=bF,dateFormat:x="MM/DD/YYYY"}=r,[Z,O]=p(!1),[M,E]=p({chartX:0}),H=a.length>4?-10:0,P=e=>{const{x:t}=e||{};"number"==typeof t&&(E({chartX:t+18}),O(!0))},j=()=>{O(!1)};return e(Dy,{width:c,height:i,children:t(XR,{data:a,barSize:18,barGap:6,margin:f,children:[e(Uk,{vertical:!1,strokeDasharray:"4 4",stroke:"#E4E9F2"}),w&&e(vy,{shared:!1,content:e(fF,{dateFormat:x})}),_&&e(jd,{dy:80,verticalAlign:"bottom",height:100,layout:"horizontal",content:e(oF,{}),wrapperStyle:{paddingTop:60},payload:n}),e(NS,{dataKey:u,tickLine:!1,xAxisId:"xAxis",tick:e(mF,{dateFormat:x,rotate:H}),tickFormatter:b,interval:0,axisLine:{stroke:"#E4E9F2"},padding:{left:0,right:0},label:{value:s,fill:"#455F7B",fontSize:12,fontFamily:"Poppins",dy:40}}),e(FS,{...DN,tickFormatter:y,dataKey:g,label:{...DN.label,value:l,angle:-90,dx:-30}}),wF.map((r=>t(o.Fragment,{children:[e(zB,{dataKey:`day${r}.${m}`,stackId:r,xAxisId:"xAxis",fill:Z?"#9FB2F6":"#708CF1",..._F,className:"productive",name:h,activeBar:!1,onMouseOver:P,onMouseLeave:j,background:{fill:"#ffffff00"},children:Z&&e(JV,{dataKey:`day${r}.${m}`,content:dF,x:M.chartX-18})}),e(zB,{dataKey:`day${r}.${d}`,stackId:r,xAxisId:"xAxis",fill:Z?"#BFCADF":"#D1D9E7",..._F,radius:[4,4,0,0],className:"unproductive",name:v,activeBar:!1,onMouseOver:P,onMouseLeave:j})]},r)))]})})},xF={fill:"#798CA4",fontFamily:"Poppins",fontSize:12,textAnchor:"middle",x:0,y:0},ZF={tick:{fill:"#798CA4",fontFamily:"Poppins",fontSize:12,fontWeight:400},tickLine:!1,axisLine:!1,label:{position:"inside",fill:"#455F7B",fontSize:12,fontFamily:"Poppins",offset:20}},OF=n.div`
|
|
4263
4263
|
display: flex;
|
|
4264
4264
|
justify-content: center;
|
|
4265
4265
|
align-items: center;
|