kwant-ui 3.26.9 → 3.27.0-alpha.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.
|
@@ -15,19 +15,13 @@ export declare const data: ({
|
|
|
15
15
|
workerConsistency: number;
|
|
16
16
|
date: string;
|
|
17
17
|
})[];
|
|
18
|
-
export declare const areas:
|
|
18
|
+
export declare const areas: {
|
|
19
19
|
dataKey: string;
|
|
20
|
+
color: string;
|
|
20
21
|
stroke: string;
|
|
21
22
|
fillOpacity: number;
|
|
22
23
|
name: string;
|
|
23
|
-
|
|
24
|
-
} | {
|
|
25
|
-
dataKey: string;
|
|
26
|
-
fill: string;
|
|
27
|
-
fillOpacity: number;
|
|
28
|
-
name: string;
|
|
29
|
-
stroke?: undefined;
|
|
30
|
-
})[];
|
|
24
|
+
}[];
|
|
31
25
|
export declare const areasYAxisRight: {
|
|
32
26
|
dataKey: string;
|
|
33
27
|
color: string;
|
package/dist/index.es.js
CHANGED
|
@@ -4229,7 +4229,7 @@ import{jsx as e,jsxs as t,Fragment as r}from"react/jsx-runtime";import n,{css as
|
|
|
4229
4229
|
font-style: normal;
|
|
4230
4230
|
font-weight: 500;
|
|
4231
4231
|
line-height: 16px; /* 133.333% */
|
|
4232
|
-
`,JN="Actual Workforce overlay",eF="Workforce Variance",tF="#F7EFF3",rF="transparent",nF=r=>{const{payload:n}=r;return e(DN,{children:n?.map((({color:r,type:n,value:a,payload:c,shape:i})=>{if("none"===n)return null;if(a===JN)return null;return t(IN,{children:[i??e(TN,{children:e(NN,{color:(a===eF?tF:r===rF?c?.fill:r||rF)||rF})}),e(FN,{children:a})]},a)}))})},aF=t=>{const{value:r,dy:n}=t;return e(YN,{dy:n,...kN,children:r})},cF=r=>{const{x:n,y:a,payload:c,rotate:i=0}=r,o=ei(c.value).format("ddd"),s=ei(c.value).format("MM/DD/YYYY");return t(QN,{transform:`translate(${n},${a}), rotate(${i})`,children:[e(aF,{value:o,dy:16}),e(aF,{value:s,dy:36})]})},iF=e=>ei(e).format("ddd, DD MMM YYYY"),oF=({color:r,name:n,value:a,shape:c})=>n===JN?null:t($N,{children:[t(XN,{children:[c,r&&e(KN,{color:n===eF?tF:r||rF}),e(qN,{children:n})]}),e(GN,{children:a})]}),sF=r=>{const{label:n,payload:a,labelFormatter:c}=r;return t(UN,{style:{transform:"translateY(-50%)"},children:[e(WN,{children:c?.(n,a||[])||n}),a?.map((t=>e(oF,{color:t.color,name:t.name,value:t.value})))]})},lF=n=>{const{width:a,height:c=600,margin:i={right:30,bottom:20},data:o,areas:s,areasYAxisRight:l,xAxisDataKey:h,showTooltip:v,xAxisLabel:p,yAxisLeftLabel:u,showLegends:g,showRightYAxis:m,yAxisRightLabel:d,customTooltip:
|
|
4232
|
+
`,JN="Actual Workforce overlay",eF="Workforce Variance",tF="#F7EFF3",rF="transparent",nF=r=>{const{payload:n}=r;return e(DN,{children:n?.map((({color:r,type:n,value:a,payload:c,shape:i})=>{if("none"===n)return null;if(a===JN)return null;return t(IN,{children:[i??e(TN,{children:e(NN,{color:(a===eF?tF:r===rF?c?.fill:r||rF)||rF})}),e(FN,{children:a})]},a)}))})},aF=t=>{const{value:r,dy:n}=t;return e(YN,{dy:n,...kN,children:r})},cF=r=>{const{x:n,y:a,payload:c,rotate:i=0}=r,o=ei(c.value).format("ddd"),s=ei(c.value).format("MM/DD/YYYY");return t(QN,{transform:`translate(${n},${a}), rotate(${i})`,children:[e(aF,{value:o,dy:16}),e(aF,{value:s,dy:36})]})},iF=e=>ei(e).format("ddd, DD MMM YYYY"),oF=({color:r,name:n,value:a,shape:c})=>n===JN?null:t($N,{children:[t(XN,{children:[c,r&&e(KN,{color:n===eF?tF:r||rF}),e(qN,{children:n})]}),e(GN,{children:a})]}),sF=r=>{const{label:n,payload:a,labelFormatter:c}=r;return t(UN,{style:{transform:"translateY(-50%)"},children:[e(WN,{children:c?.(n,a||[])||n}),a?.map((t=>e(oF,{color:t.color,name:t.name,value:t.value})))]})},lF=n=>{const{width:a,height:c=600,margin:i={right:30,bottom:20},data:o,areas:s,areasYAxisRight:l,xAxisDataKey:h,showTooltip:v,xAxisLabel:p,yAxisLeftLabel:u,showLegends:g,showRightYAxis:m,yAxisRightLabel:d,gradient:_,customTooltip:w=e(sF,{}),areaProps:b={},cartesianGridProps:y={},legendProps:x={},tooltipProps:Z={},xAxisProps:O={},yAxisProps:M={},yAxisRightProps:E={},areaYAxisRightProps:H={},showAverageLine:P=!0,averageLineValue:j,averageLineColor:V="#2DA170",customTooltipLabelFormatter:C=iF,hideXAxis:A=!1,hideYAxis:L=!1,hideCartesianGrid:z=!1}=n;return e(Sy,{width:a,height:c,children:t(gN,{data:o,margin:i,children:[_,v&&e(ly,{content:w,labelFormatter:C,...Z}),g&&e(Hd,{dy:80,verticalAlign:"bottom",height:100,layout:"horizontal",content:e(nF,{}),wrapperStyle:{paddingTop:60},...x}),!A&&e(IS,{dataKey:h,includeHidden:!0,interval:1,minTickGap:10,tick:e(cF,{rotate:o.length>15?-15:0}),axisLine:{stroke:"#E4E9F2"},tickLine:!1,label:{value:p,position:"insideBottom",fill:"#455F7B",fontSize:12,fontFamily:"Poppins",offset:-45},...O}),!L&&e(TS,{yAxisId:"left",...SN,label:{value:u,angle:-90,dx:-30,...SN.label},...M}),m&&t(r,{children:[e(TS,{...SN,yAxisId:"right",hide:!m,orientation:"right",tickCount:3,tickFormatter:e=>`${e}%`,interval:0,minTickGap:20,domain:[0,100],label:{value:d,angle:90,dx:20,...SN.label},...M,...E}),l?.map((e=>f(xS,{...RN,key:e.dataKey,dataKey:e.dataKey,stroke:e?.stroke||"transparent",fillOpacity:e.fillOpacity,fill:e.gradientId?`url(#${e.gradientId})`:e.color||"transparent",yAxisId:e.yAxisId||"left",name:e.name,...b,...H})))]}),s?.map((e=>f(xS,{...e,...RN,key:e.dataKey,dataKey:e.dataKey,fillOpacity:e.fillOpacity,stroke:e.stroke||"transparent",fill:e.gradientId?`url(#${e.gradientId})`:e.color||"transparent",yAxisId:e.yAxisId||"left",name:e.name,...b}))),!z&&e(Yk,{...y,strokeDasharray:"4 4",vertical:!1,stroke:"#E4E9F2"}),P&&e(qB,{y:j,yAxisId:"left",stroke:V,strokeDasharray:"4 4"})]})})},hF=t=>{const{x:r,y:n,payload:a,rotate:c=0}=t,i=a.value,[o,s]=i.split("-"),l=ei(o).format("MM/DD"),h=ei(s).format("MM/DD/YY");return e(QN,{transform:`translate(${r},${n}), rotate(${c})`,children:e(aF,{value:`${l} - ${h}`,dy:16})})},vF=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})})},pF=r=>{const n=r.payload[0]?.dataKey,[a]="string"==typeof n&&n?.split(".")||[],c=r.payload[0]?.payload[a],i=ei(c?.date).format("ddd, DD/MM/YYYY");return t(UN,{style:{transform:"translateY(-50%)"},children:[e(WN,{children:i}),e(oF,{name:"Work Phase Time:",value:c?.workPhaseTimeHour,color:"#5879EF"}),e(oF,{name:"Slack Time:",value:c?.slackTimeHour,color:"#A1AFC0"})]})},uF={},gF=[1,2,3,4,5,6,7],mF=e=>`${e}h`,dF=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=mF}=r,[x,Z]=p(!1),[O,M]=p({chartX:0}),E=a.length>4?-10:0,H=e=>{const{x:t}=e||{};"number"==typeof t&&(M({chartX:t+18}),Z(!0))},P=()=>{Z(!1)};return e(Sy,{width:c,height:i,children:t(WR,{data:a,barSize:18,barGap:6,margin:f,children:[e(Yk,{vertical:!1,strokeDasharray:"4 4",stroke:"#E4E9F2"}),w&&e(ly,{shared:!1,content:e(pF,{})}),_&&e(Hd,{dy:80,verticalAlign:"bottom",height:100,layout:"horizontal",content:e(nF,{}),wrapperStyle:{paddingTop:60},payload:n}),e(IS,{dataKey:u,tickLine:!1,xAxisId:"xAxis",tick:e(hF,{rotate:E}),tickFormatter:b,interval:0,axisLine:{stroke:"#E4E9F2"},padding:{left:0,right:0},label:{value:s,fill:"#455F7B",fontSize:12,fontFamily:"Poppins",dy:40}}),e(TS,{...SN,tickFormatter:y,dataKey:g,label:{...SN.label,value:l,angle:-90,dx:-30}}),gF.map((r=>t(o.Fragment,{children:[e(AB,{dataKey:`day${r}.${m}`,stackId:r,xAxisId:"xAxis",fill:x?"#9FB2F6":"#708CF1",...uF,className:"productive",name:h,activeBar:!1,onMouseOver:H,onMouseLeave:P,children:x&&e(qV,{dataKey:`day${r}.${m}`,content:vF,x:O.chartX-18})}),e(AB,{dataKey:`day${r}.${d}`,stackId:r,xAxisId:"xAxis",fill:x?"#BFCADF":"#D1D9E7",...uF,radius:[4,4,0,0],className:"unproductive",name:v,activeBar:!1,onMouseOver:H,onMouseLeave:P})]},r)))]})})},fF={fill:"#798CA4",fontFamily:"Poppins",fontSize:12,textAnchor:"middle",x:0,y:0},_F={tick:{fill:"#798CA4",fontFamily:"Poppins",fontSize:12,fontWeight:400},tickLine:!1,axisLine:!1,label:{position:"inside",fill:"#455F7B",fontSize:12,fontFamily:"Poppins",offset:20}},wF=n.div`
|
|
4233
4233
|
display: flex;
|
|
4234
4234
|
justify-content: center;
|
|
4235
4235
|
align-items: center;
|