1mpacto-react-ui 0.0.133 → 0.0.134
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.cjs +2 -2
- package/dist/index.cjs.map +1 -1
- package/dist/index.mjs +5 -7
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
@@ -188,8 +188,8 @@ You should wrap it with \`css\` like this:
|
|
188
188
|
${b.disabled?fr.disabled:""} ${o??""}`,children:c})]})});UC.displayName="TextareaFloatingInner";const UO="_container_b49oo_1",JO="_passed_b49oo_17",qO="_active_b49oo_20",Gn={container:UO,"content-section":"_content-section_b49oo_4","content-step":"_content-step_b49oo_7","number-step":"_number-step_b49oo_11",passed:JO,active:qO,"content-line-dashed":"_content-line-dashed_b49oo_24","content-line-active":"_content-line-active_b49oo_27","content-description":"_content-description_b49oo_31"},Ib=({widthLine:e,color:t})=>E.jsx("svg",{height:"5",xmlns:"http://www.w3.org/2000/svg",className:Gn["content-line-dashed"],width:e+10,style:{right:-(e/2+14)},children:E.jsx("g",{fill:"none",stroke:t,strokeWidth:"10",children:E.jsx("path",{strokeDasharray:"12,4",d:`M0 0 ${e+10} 0`})})}),_b=({widthLine:e,color:t})=>E.jsx("hr",{className:Gn["content-line-active"],style:{width:e+22,right:-(e/2+20),borderColor:t}}),KO=({activeStep:e,stepList:t,widthLine:n=250,classNameContainer:r,classNameContent:i,classNameDesc:a,onChange:o,afterActiveType:s="solid",beforeActiveType:l="dashed",colorActive:u="#0163c8 ",colorInactive:c="#D6D6D6"})=>E.jsx("div",{className:`${Gn.container} ${r??""}`,children:t.map((d,h)=>{const f=h+1;return E.jsxs("div",{className:`${Gn["content-section"]} ${i??""}`,onClick:()=>{typeof o=="function"&&o(d)},children:[E.jsxs("div",{className:Gn["content-step"],children:[f<t.length&&E.jsxs(E.Fragment,{children:[(d.step??f)>=e&&E.jsxs(E.Fragment,{children:[l==="solid"&&E.jsx(_b,{color:c,widthLine:n}),l==="dashed"&&E.jsx(Ib,{color:c,widthLine:n})]}),(d.step??f)<e&&E.jsxs(E.Fragment,{children:[s==="solid"&&E.jsx(_b,{color:u,widthLine:n}),s==="dashed"&&E.jsx(Ib,{color:u,widthLine:n})]})]}),h!==0&&E.jsx("div",{style:{width:n/2}}),E.jsx("div",{className:`${Gn["number-step"]}
|
189
189
|
${(d.step??f)<e?Gn.passed:""}
|
190
190
|
${(d.step??f)===e?Gn.active:""}
|
191
|
-
${d.className??""}`,children:e>d.step&&d.valueDone?E.jsx(E.Fragment,{children:d.valueDone}):E.jsx(E.Fragment,{children:d.value?d.value:f})}),h+1!==(t==null?void 0:t.length)&&E.jsx("div",{style:{width:n/2}})]}),d.desc&&E.
|
192
|
-
${(d.step??f)<=e?Gn.active:""}`,style:{maxWidth:h+1===(t==null?void 0:t.length)||h===0?(n-30)*2:n-30},children:[h+1===(t==null?void 0:t.length)&&E.jsx("div",{style:{width:n/2}}),d.desc,h===0&&E.jsx("div",{style:{width:n/2}})]})]},h)})});Yi.register(ka,Ma,Pi,qn,WC,ls,jC);const QO=(e,t,n)=>{const r=e,i=t||new Date().getMonth(),a=n||new Date().getFullYear();return new Date(`${i}/${r}/${a}`)},eN=({data:e,className:t,height:n=65})=>{const r=w.useRef(null),i=e.map(h=>So(QO(1,h.label,h.year),"MMM yy",{locale:Ml}))||[],[a,o]=w.useState(""),[s,l]=w.useState(""),u=h=>{const f=[],g=[];let m=!h.find(v=>v.isCurrent);return h.forEach(v=>{m?(g.push(v.value),f.push(null)):(f.push(v.value),v.isCurrent?(m=!0,g.push(v.value)):g.push(null))}),{passed:f,notPassed:g}},c={labels:i,datasets:[{label:"",fill:"blue",backgroundColor:"rgba(75,192,192,1)",borderColor:a,borderCapStyle:"butt",borderDashOffset:0,borderJoinStyle:"miter",pointBackgroundColor:function(h){const f=e[h.dataIndex];let g=s;return f.isCurrent&&(g="#ED0019"),g},pointBorderWidth:.1,pointHoverRadius:4,pointRadius:5,pointBorderColor:s,pointHoverBorderColor:a,data:u(e).passed||[]},{label:"",fill:"grey",backgroundColor:"rgba(75,192,192,1)",borderColor:"#D6D6D6",borderCapStyle:"butt",borderDashOffset:0,pointRadius:5,borderJoinStyle:"miter",pointBackgroundColor:s,pointBorderWidth:.1,pointHoverRadius:4,borderDash:[15,5],data:u(e).notPassed||[]}]},d={interaction:{mode:"index",intersect:!1},plugins:{legend:{display:!1,labels:{usePointStyle:!0}},tooltip:{external:function(h){let f=document.getElementById("chartjs-tooltip");f||(f=document.createElement("div"),f.id="chartjs-tooltip",f.innerHTML="<table></table>",document.body.appendChild(f));const g=h.tooltip;if(g.opacity===0){f.style.opacity="0";return}f.classList.remove("above","below","no-transform"),g.yAlign?f.classList.add(g.yAlign):f.classList.add("no-transform");function m(y){return y.lines}if(g.body){const y=g.title||[];let b=g.body.map(m),x="<thead>";y.forEach(D=>{let $="";$+="display: flex",$+="; justify-content: center",$+="; font-weight: 600",$+="; font-size: 12px",$+="; padding: 0px 14px",x+=`<tr><span style="${$}">${D}</span></tr>`}),x+="</thead><tbody>",b.length>1&&b[0][0]===b[1][0]&&(b=[b[0]]),b.forEach(D=>{let $="";$+="display: flex",$+="; justify-content: center",$+="; color: #0163C8",$+="; padding: 0px 14px",$+="; font-size: 12px";const F=`<span style="${$}">${D}</span>`;x+=`<tr><td>${F}</td></tr>`}),x+="</tbody>";const C=f.querySelector("table");C&&(C.innerHTML=x)}const v=h.chart.canvas.getBoundingClientRect();f.style.opacity="1",f.style.border="solid 1px #0163C8",f.style.background="white",f.style.height="fit-content",f.style.borderRadius="10px",f.style.position="absolute",f.style.zIndex="10",f.style.padding="4px 0",f.style.left=v.left+window.pageXOffset+g.caretX-30+"px",f.style.top=v.top+window.pageYOffset+g.caretY-60+"px",f.style.pointerEvents="none"},displayColors:!0,enabled:!1,callbacks:{title:function(h){const f=e[h[0].dataIndex];return So(new Date(`1/${f.label}/${f.year}`),"MMMM yyyy",{locale:Ml})},label:function(h){let f=h.dataset.label??"";return f&&(f+=": "),h.parsed.y!==null&&(f+=new Intl.NumberFormat("id-ID",{style:"currency",currency:"IDR"}).format(h.parsed.y)),f}}}},scales:{x:{grid:{display:!1},beginAtZero:!0,ticks:{autoSkip:!0,maxTicksLimit:20}},y:{min:0,grid:{display:!1},beginAtZero:!0,ticks:{maxTicksLimit:6,callback:function(h){return $u(h)??0}}}}};return w.useEffect(()=>{if(r.current){const h=r.current.getContext("2d"),f=h==null?void 0:h.createLinearGradient(0,100,500,-500);f==null||f.addColorStop(0,"rgba(237, 0, 25, 0)"),f==null||f.addColorStop(1,"rgba(237, 0, 25, 20)");const g=h.fillStyle="rgba(255, 255, 255, 0)";l(g),o(f)}},[]),E.jsxs("div",{className:t??"",children:[E.jsx(YC,{options:d,data:c,height:n}),E.jsx("div",{className:"1ru-h-5",children:E.jsx("canvas",{ref:r})})]})},tN="_container_1oiqk_1",$b={container:tN,"container-popover":"_container-popover_1oiqk_5"},nN=({id:e="1ru-tooltip",children:t,text:n,zIndexPopover:r=1,onShow:i,onClose:a,placement:o="top",backgroundColor:s="black",popoverProps:l={},arrowProps:u={},className:c,isHover:d,delay:h=600})=>{let f;const g=w.useRef(null),m={backgroundColor:Zb[s]||s},[v,y]=w.useState(!1),[b,x]=w.useState(!1),C=$=>{var F;(F=g.current)==null||F.handlerShow($),x(!0),typeof i=="function"&&i()},D=()=>{var $;x(!1),v||(clearInterval(f),($=g.current)==null||$.setShow(!1),typeof a=="function"&&a())};return E.jsxs(E.Fragment,{children:[E.jsx("div",{id:e,onMouseEnter:$=>{if(d&&!v){const F=$.currentTarget;f=setTimeout(()=>{C({...$,currentTarget:F})},h)}},onMouseLeave:()=>{d&&!v&&D()},onClick:$=>{y(!0),clearInterval(f),b||C($)},className:$b.container,children:t}),E.jsx(Ar,{floatingOptions:{placement:o},ref:g,id:"1ru-popover-tooltip",offset:10,withArrow:!0,zIndex:r,onClose:()=>{v&&(y(!1),D())},styleInnerPopover:{backgroundColor:m.backgroundColor},propsArrow:{fill:m.backgroundColor,...u},className:`${$b["container-popover"]} ${c??""}`,...l,children:n})]})},rN="_icon_i1q12_5",iN="_show_i1q12_8",pd={"container-popover":"_container-popover_i1q12_1",icon:rN,show:iN},JC=w.forwardRef((e,t)=>{const{children:n,id:r="1ru-button-popover",text:i="",startIcon:a,endIcon:o,startIconShow:s,endIconShow:l,classNameButton:u="",classNameButtonShow:c="",className:d="",placement:h="top-end",popoverProps:f,zIndexPopover:g=1,offset:m=5,idPopover:v="1ru-popover-button-popover",onClick:y,onClose:b,...x}=e,C=w.useRef(null),D=w.useRef(null),[$,F]=w.useState(!1),p=(A,T,R)=>{let M=E.jsx(E.Fragment,{});return A&&w.isValidElement(T)?M=T:w.isValidElement(R)&&(M=E.jsx("div",{className:`${pd.icon} ${A?pd.show:""}`,children:R})),M},S=A=>{var T;(T=C.current)==null||T.setShow(A),F(A)},_=A=>{var T;(T=C.current)==null||T.handlerShow(A),F(!0)},I=()=>{var A;F(!1),(A=C.current)==null||A.setShow(!1),typeof b=="function"&&b()};return w.useImperativeHandle(t,()=>({show:$,setShow:S,handlerClose:I,handlerShow:_}),[$]),E.jsxs(E.Fragment,{children:[E.jsx(Mn,{ref:D,id:r,className:`${u} ${$?c:""}`,onClick:A=>{$?I():typeof y=="function"?y(A):_(A)},startIcon:p($,s,a),endIcon:p($,l,o),...x,children:i}),E.jsx(Ar,{ref:C,id:v,offset:m,floatingOptions:{placement:h},zIndex:g,onClose:I,className:`${pd["container-popover"]} ${d}`,...f,children:n})]})});JC.displayName="ButtonPopover";Yi.register(ka,Ma,Pi,qn,VC,ls);const aN=e=>({chart:t,tooltip:n})=>{var l,u,c,d,h,f;const r={};if(n.opacity===0){e(g=>({...g,style:{...g.style,opacity:0,pointerEvents:"none"}}));return}if(!n.dataPoints||n.dataPoints.length===0)return;r.opacity="1",r.position="absolute",r.pointerEvents="none";const i=t.canvas.getBoundingClientRect();r.left=i.left+window.pageXOffset+n.caretX+"px",r.top=i.top+window.pageYOffset+n.caretY+"px";const a=((u=(l=n.dataPoints)==null?void 0:l[0])==null?void 0:u.label)??"",o=((d=(c=n.dataPoints)==null?void 0:c[0])==null?void 0:d.raw)??"",s=((f=(h=n.dataPoints)==null?void 0:h[0])==null?void 0:f.dataset.label)??"";e({dataset:s,label:a,value:o,style:r,dataPoints:n.dataPoints})},oN={id:"hairlinePlugin",beforeDatasetsDraw:e=>{const t=e.scales.y;if(!t)return;const{ctx:n}=e,{top:r,bottom:i,left:a,right:o}=e.chartArea;if(t.min>0||t.max<0)return;const s=t.getPixelForValue(0);s<r||s>i||(n.save(),n.beginPath(),n.moveTo(a,s),n.lineTo(o,s),n.lineWidth=2,n.strokeStyle="rgb(207, 216, 220)",n.setLineDash([4,3]),n.stroke(),n.restore())}},sN={responsive:!0,maintainAspectRatio:!1,plugins:{legend:{display:!1}},scales:{y:{grace:"15%",position:"right",border:{display:!1,dash:[5,3],color:"#CFD8DC"},ticks:{font:{size:10,weight:"normal"},padding:10,color:"#898989"}},x:{border:{dash:[5,3],color:"#CFD8DC"},ticks:{font:{size:10,weight:"normal"},color:"#898989"}}},interaction:{mode:"index",intersect:!1}},lN=({data:e,height:t,classNameContainer:n,id:r,options:i,CustomTooltip:a})=>{const o=w.useRef(void 0),s=w.useRef(0),l=w.useRef(0),[u,c]=w.useState({dataset:"",label:"",value:0,style:{opacity:0,position:"absolute",left:0,bottom:0},dataPoints:[]}),d=w.useCallback(function({ctx:m,chartArea:v,scales:y,chartHeight:b,gradientFor:x,item:C}){let F=(y.y.getPixelForValue(0)-v.top)/b;F=F<0?0:F>1?1:F,o.current=m.createLinearGradient(0,v.top,0,b+v.top),x==="background"?(o.current.addColorStop(0,(C==null?void 0:C.colorBackgroundPositiveZero)||"#9FD2FF"),o.current.addColorStop(F,(C==null?void 0:C.colorBackgroundPositivePercentage)||"rgba(115, 235, 163, 0.1)"),o.current.addColorStop(F,(C==null?void 0:C.colorBackgroundNegativePercentage)||"rgba(235, 107, 107, 0.1)"),o.current.addColorStop(1,(C==null?void 0:C.colorBackgroundNegativeOne)||"#EB6B6B")):(o.current.addColorStop(F,(C==null?void 0:C.colorBorderPositive)||"#80CBC4"),o.current.addColorStop(F,(C==null?void 0:C.colorBorderNegative)||"#EB6B6B"))},[]),h=w.useCallback(function({ctx:m,chartArea:v,scales:y,gradientFor:b,item:x}){const C=v.right-v.left,D=v.bottom-v.top;return(!o.current||s.current!==C||l.current!==D)&&(s.current=C,l.current=D,d({ctx:m,chartArea:v,scales:y,chartHeight:D,gradientFor:b,item:x})),d({ctx:m,chartArea:v,scales:y,chartHeight:D,gradientFor:b,item:x}),o.current},[]),f=w.useMemo(()=>({...e,datasets:e.datasets.map(v=>({fill:!0,backgroundColor:function(y){const b=y.chart,{ctx:x,chartArea:C,scales:D}=b;if(C)return h({ctx:x,chartArea:C,scales:D,gradientFor:"background",item:v})},borderColor:function(y){const b=y.chart,{ctx:x,chartArea:C,scales:D}=b;if(C)return h({ctx:x,chartArea:C,scales:D,gradientFor:"border",item:v})},borderWidth:3,tension:0,pointRadius:0,pointHoverRadius:4,...v,data:v.data}))}),[e]),g=w.useMemo(()=>Bl(sN,{plugins:{tooltip:{enabled:!a,external:({chart:v,tooltip:y})=>a?aN(c)({chart:v,tooltip:y}):void 0}}},i??{}),[i,a]);return E.jsxs("div",{id:r,className:n,style:{height:t||"300px"},children:[a&&E.jsx(Qh,{selector:"body",children:E.jsx(a,{...u})}),E.jsx(YC,{data:f,options:g,plugins:[oN]})]})};Yi.register(ka,Ma,Tl,ls,Pi,VC,ls);const uN=e=>({chart:t,tooltip:n})=>{var l,u,c,d,h,f;const r={};if(n.opacity===0){e(g=>({...g,style:{...g.style,opacity:0,pointerEvents:"none"}}));return}if(!n.dataPoints||n.dataPoints.length===0)return;r.opacity="1",r.position="absolute",r.pointerEvents="none";const i=t.canvas.getBoundingClientRect();r.left=i.left+window.pageXOffset+n.caretX+"px",r.top=i.top+window.pageYOffset+n.caretY+"px";const a=((u=(l=n.dataPoints)==null?void 0:l[0])==null?void 0:u.label)??"",o=((d=(c=n.dataPoints)==null?void 0:c[0])==null?void 0:d.raw)??"",s=((f=(h=n.dataPoints)==null?void 0:h[0])==null?void 0:f.dataset.label)??"";e({dataset:s,label:a,value:o,style:r,dataPoints:n.dataPoints})},cN={id:"labelplugin",afterDatasetsDraw(e){const{ctx:t,chartArea:{top:n,bottom:r}}=e;t.save(),e.data.datasets.forEach((i,a)=>{const o=e.getDatasetMeta(a);o.visible&&o.data.forEach((s,l)=>{const u=i.data[l]||0,c=i!=null&&i.setDigit?$u(String(u)):String(u);t.font="12px Lato",t.textAlign="center";let d,h=!1;typeof u=="number"&&u>=0?(t.textBaseline="bottom",t.fillStyle=(i==null?void 0:i.colorTextLabelPositive)||s.options.borderColor,d=s.y-5,d>n&&(h=!0)):(t.textBaseline="top",t.fillStyle=(i==null?void 0:i.colorTextLabelNegative)||s.options.borderColor,d=s.y+5,d<r&&(h=!0)),h&&t.fillText(c,s.x,d)})}),t.restore()}},dN={responsive:!0,maintainAspectRatio:!1,plugins:{legend:{display:!1}},scales:{y:{grace:"15%",position:"left",border:{display:!1,dash:[5,3],color:"#CFD8DC"},ticks:{callback:function(e){return $u(e)??0},font:{size:10,weight:"normal"},padding:10,color:"#898989"}},x:{grid:{display:!1},border:{dash:[5,3],color:"#CFD8DC"},ticks:{font:{size:10,weight:"normal"},color:"#898989"}}},interaction:{mode:"index",intersect:!1}},fN=({data:e,classNameContainer:t,height:n,id:r,options:i,CustomTooltip:a})=>{const o=w.useRef(void 0),s=w.useRef(0),l=w.useRef(0),[u,c]=w.useState({dataset:"",label:"",value:0,style:{opacity:0,position:"absolute",left:0,bottom:0},dataPoints:[]}),d=w.useCallback(function({ctx:m,chartArea:v,scales:y,chartHeight:b,gradientFor:x,item:C}){let F=(y.y.getPixelForValue(0)-v.top)/b;F=F<0?0:F>1?1:F,o.current=m.createLinearGradient(0,v.top,0,b+v.top),x==="background"?(o.current.addColorStop(0,(C==null?void 0:C.colorBackgroundPositiveZero)||"#9FD2FF"),o.current.addColorStop(F,(C==null?void 0:C.colorBackgroundPositivePercentage)||"rgba(115, 235, 163, 0.1)"),o.current.addColorStop(F,(C==null?void 0:C.colorBackgroundNegativePercentage)||"rgba(235, 107, 107, 0.1)"),o.current.addColorStop(1,(C==null?void 0:C.colorBackgroundNegativeOne)||"#EB6B6B")):(o.current.addColorStop(F,(C==null?void 0:C.colorBorderPositive)||"#80CBC4"),o.current.addColorStop(F,(C==null?void 0:C.colorBorderNegative)||"#EB6B6B"))},[]),h=w.useCallback(function({ctx:m,chartArea:v,scales:y,gradientFor:b,item:x}){const C=v.right-v.left,D=v.bottom-v.top;return(!o.current||s.current!==C||l.current!==D)&&(s.current=C,l.current=D,d({ctx:m,chartArea:v,scales:y,chartHeight:D,gradientFor:b,item:x})),d({ctx:m,chartArea:v,scales:y,chartHeight:D,gradientFor:b,item:x}),o.current},[]),f=w.useMemo(()=>({...e,datasets:e.datasets.map(v=>({fill:!0,backgroundColor:function(y){const b=y.chart,{ctx:x,chartArea:C,scales:D}=b;if(C)return h({ctx:x,chartArea:C,scales:D,gradientFor:"background",item:v})},borderColor:function(y){const b=y.chart,{ctx:x,chartArea:C,scales:D}=b;if(C)return h({ctx:x,chartArea:C,scales:D,gradientFor:"border",item:v})},borderWidth:0,tension:0,pointRadius:0,pointHoverRadius:4,setDigit:!0,...v,data:v.data}))}),[e]),g=w.useMemo(()=>Bl(dN,{plugins:{tooltip:{enabled:!a,external:({chart:v,tooltip:y})=>a?uN(c)({chart:v,tooltip:y}):void 0}}},i??{}),[i,a]);return E.jsxs("div",{id:r,className:t,style:{height:n||"300px"},children:[a&&E.jsx(Qh,{selector:"body",children:E.jsx(a,{...u})}),E.jsx(kO,{data:f,options:g,plugins:[cN]})]})},hN="_left_1s2i5_4",gN="_right_1s2i5_7",mN="_indicator_1s2i5_16",pN="_active_1s2i5_19",Br={"container-step-indicator":"_container-step-indicator_1s2i5_1",left:hN,right:gN,"text-step-indicator":"_text-step-indicator_1s2i5_10","step-indicator":"_step-indicator_1s2i5_13",indicator:mN,active:pN};function bN(e,t){if(e<=0)return"0px";if(e===1)return"100%";const n=e-1;return`calc((100% - (${t} * ${n})) / ${e})`}const vN=({activeStep:e=0,countStep:t=0,classNameActiveStepIndicator:n="",classNameContainer:r="",classNameDesc:i="",classNameStepIndicator:a="",id:o="1ru-step-indicator",locationStepIndicator:s="right",widthStepIndicator:l=120,dynamicWidthStepIndicator:u=!1,gapStepIndicator:c="2px",classNameStepIndicatorContainer:d=""})=>E.jsxs("div",{id:o,className:`${Br["container-step-indicator"]}
|
191
|
+
${d.className??""}`,children:e>d.step&&d.valueDone?E.jsx(E.Fragment,{children:d.valueDone}):E.jsx(E.Fragment,{children:d.value?d.value:f})}),h+1!==(t==null?void 0:t.length)&&E.jsx("div",{style:{width:n/2}})]}),d.desc&&E.jsx("div",{className:`${Gn["content-description"]} ${a??""}
|
192
|
+
${(d.step??f)<=e?Gn.active:""}`,style:{maxWidth:h+1===(t==null?void 0:t.length)||h===0?(n-30)*2:n-30,marginRight:h+1===(t==null?void 0:t.length)?-(n/2):0,marginLeft:h===0?-(n/2):0},children:d.desc})]},h)})});Yi.register(ka,Ma,Pi,qn,WC,ls,jC);const QO=(e,t,n)=>{const r=e,i=t||new Date().getMonth(),a=n||new Date().getFullYear();return new Date(`${i}/${r}/${a}`)},eN=({data:e,className:t,height:n=65})=>{const r=w.useRef(null),i=e.map(h=>So(QO(1,h.label,h.year),"MMM yy",{locale:Ml}))||[],[a,o]=w.useState(""),[s,l]=w.useState(""),u=h=>{const f=[],g=[];let m=!h.find(v=>v.isCurrent);return h.forEach(v=>{m?(g.push(v.value),f.push(null)):(f.push(v.value),v.isCurrent?(m=!0,g.push(v.value)):g.push(null))}),{passed:f,notPassed:g}},c={labels:i,datasets:[{label:"",fill:"blue",backgroundColor:"rgba(75,192,192,1)",borderColor:a,borderCapStyle:"butt",borderDashOffset:0,borderJoinStyle:"miter",pointBackgroundColor:function(h){const f=e[h.dataIndex];let g=s;return f.isCurrent&&(g="#ED0019"),g},pointBorderWidth:.1,pointHoverRadius:4,pointRadius:5,pointBorderColor:s,pointHoverBorderColor:a,data:u(e).passed||[]},{label:"",fill:"grey",backgroundColor:"rgba(75,192,192,1)",borderColor:"#D6D6D6",borderCapStyle:"butt",borderDashOffset:0,pointRadius:5,borderJoinStyle:"miter",pointBackgroundColor:s,pointBorderWidth:.1,pointHoverRadius:4,borderDash:[15,5],data:u(e).notPassed||[]}]},d={interaction:{mode:"index",intersect:!1},plugins:{legend:{display:!1,labels:{usePointStyle:!0}},tooltip:{external:function(h){let f=document.getElementById("chartjs-tooltip");f||(f=document.createElement("div"),f.id="chartjs-tooltip",f.innerHTML="<table></table>",document.body.appendChild(f));const g=h.tooltip;if(g.opacity===0){f.style.opacity="0";return}f.classList.remove("above","below","no-transform"),g.yAlign?f.classList.add(g.yAlign):f.classList.add("no-transform");function m(y){return y.lines}if(g.body){const y=g.title||[];let b=g.body.map(m),x="<thead>";y.forEach(D=>{let $="";$+="display: flex",$+="; justify-content: center",$+="; font-weight: 600",$+="; font-size: 12px",$+="; padding: 0px 14px",x+=`<tr><span style="${$}">${D}</span></tr>`}),x+="</thead><tbody>",b.length>1&&b[0][0]===b[1][0]&&(b=[b[0]]),b.forEach(D=>{let $="";$+="display: flex",$+="; justify-content: center",$+="; color: #0163C8",$+="; padding: 0px 14px",$+="; font-size: 12px";const F=`<span style="${$}">${D}</span>`;x+=`<tr><td>${F}</td></tr>`}),x+="</tbody>";const C=f.querySelector("table");C&&(C.innerHTML=x)}const v=h.chart.canvas.getBoundingClientRect();f.style.opacity="1",f.style.border="solid 1px #0163C8",f.style.background="white",f.style.height="fit-content",f.style.borderRadius="10px",f.style.position="absolute",f.style.zIndex="10",f.style.padding="4px 0",f.style.left=v.left+window.pageXOffset+g.caretX-30+"px",f.style.top=v.top+window.pageYOffset+g.caretY-60+"px",f.style.pointerEvents="none"},displayColors:!0,enabled:!1,callbacks:{title:function(h){const f=e[h[0].dataIndex];return So(new Date(`1/${f.label}/${f.year}`),"MMMM yyyy",{locale:Ml})},label:function(h){let f=h.dataset.label??"";return f&&(f+=": "),h.parsed.y!==null&&(f+=new Intl.NumberFormat("id-ID",{style:"currency",currency:"IDR"}).format(h.parsed.y)),f}}}},scales:{x:{grid:{display:!1},beginAtZero:!0,ticks:{autoSkip:!0,maxTicksLimit:20}},y:{min:0,grid:{display:!1},beginAtZero:!0,ticks:{maxTicksLimit:6,callback:function(h){return $u(h)??0}}}}};return w.useEffect(()=>{if(r.current){const h=r.current.getContext("2d"),f=h==null?void 0:h.createLinearGradient(0,100,500,-500);f==null||f.addColorStop(0,"rgba(237, 0, 25, 0)"),f==null||f.addColorStop(1,"rgba(237, 0, 25, 20)");const g=h.fillStyle="rgba(255, 255, 255, 0)";l(g),o(f)}},[]),E.jsxs("div",{className:t??"",children:[E.jsx(YC,{options:d,data:c,height:n}),E.jsx("div",{className:"1ru-h-5",children:E.jsx("canvas",{ref:r})})]})},tN="_container_1oiqk_1",$b={container:tN,"container-popover":"_container-popover_1oiqk_5"},nN=({id:e="1ru-tooltip",children:t,text:n,zIndexPopover:r=1,onShow:i,onClose:a,placement:o="top",backgroundColor:s="black",popoverProps:l={},arrowProps:u={},className:c,isHover:d,delay:h=600})=>{let f;const g=w.useRef(null),m={backgroundColor:Zb[s]||s},[v,y]=w.useState(!1),[b,x]=w.useState(!1),C=$=>{var F;(F=g.current)==null||F.handlerShow($),x(!0),typeof i=="function"&&i()},D=()=>{var $;x(!1),v||(clearInterval(f),($=g.current)==null||$.setShow(!1),typeof a=="function"&&a())};return E.jsxs(E.Fragment,{children:[E.jsx("div",{id:e,onMouseEnter:$=>{if(d&&!v){const F=$.currentTarget;f=setTimeout(()=>{C({...$,currentTarget:F})},h)}},onMouseLeave:()=>{d&&!v&&D()},onClick:$=>{y(!0),clearInterval(f),b||C($)},className:$b.container,children:t}),E.jsx(Ar,{floatingOptions:{placement:o},ref:g,id:"1ru-popover-tooltip",offset:10,withArrow:!0,zIndex:r,onClose:()=>{v&&(y(!1),D())},styleInnerPopover:{backgroundColor:m.backgroundColor},propsArrow:{fill:m.backgroundColor,...u},className:`${$b["container-popover"]} ${c??""}`,...l,children:n})]})},rN="_icon_i1q12_5",iN="_show_i1q12_8",pd={"container-popover":"_container-popover_i1q12_1",icon:rN,show:iN},JC=w.forwardRef((e,t)=>{const{children:n,id:r="1ru-button-popover",text:i="",startIcon:a,endIcon:o,startIconShow:s,endIconShow:l,classNameButton:u="",classNameButtonShow:c="",className:d="",placement:h="top-end",popoverProps:f,zIndexPopover:g=1,offset:m=5,idPopover:v="1ru-popover-button-popover",onClick:y,onClose:b,...x}=e,C=w.useRef(null),D=w.useRef(null),[$,F]=w.useState(!1),p=(A,T,R)=>{let M=E.jsx(E.Fragment,{});return A&&w.isValidElement(T)?M=T:w.isValidElement(R)&&(M=E.jsx("div",{className:`${pd.icon} ${A?pd.show:""}`,children:R})),M},S=A=>{var T;(T=C.current)==null||T.setShow(A),F(A)},_=A=>{var T;(T=C.current)==null||T.handlerShow(A),F(!0)},I=()=>{var A;F(!1),(A=C.current)==null||A.setShow(!1),typeof b=="function"&&b()};return w.useImperativeHandle(t,()=>({show:$,setShow:S,handlerClose:I,handlerShow:_}),[$]),E.jsxs(E.Fragment,{children:[E.jsx(Mn,{ref:D,id:r,className:`${u} ${$?c:""}`,onClick:A=>{$?I():typeof y=="function"?y(A):_(A)},startIcon:p($,s,a),endIcon:p($,l,o),...x,children:i}),E.jsx(Ar,{ref:C,id:v,offset:m,floatingOptions:{placement:h},zIndex:g,onClose:I,className:`${pd["container-popover"]} ${d}`,...f,children:n})]})});JC.displayName="ButtonPopover";Yi.register(ka,Ma,Pi,qn,VC,ls);const aN=e=>({chart:t,tooltip:n})=>{var l,u,c,d,h,f;const r={};if(n.opacity===0){e(g=>({...g,style:{...g.style,opacity:0,pointerEvents:"none"}}));return}if(!n.dataPoints||n.dataPoints.length===0)return;r.opacity="1",r.position="absolute",r.pointerEvents="none";const i=t.canvas.getBoundingClientRect();r.left=i.left+window.pageXOffset+n.caretX+"px",r.top=i.top+window.pageYOffset+n.caretY+"px";const a=((u=(l=n.dataPoints)==null?void 0:l[0])==null?void 0:u.label)??"",o=((d=(c=n.dataPoints)==null?void 0:c[0])==null?void 0:d.raw)??"",s=((f=(h=n.dataPoints)==null?void 0:h[0])==null?void 0:f.dataset.label)??"";e({dataset:s,label:a,value:o,style:r,dataPoints:n.dataPoints})},oN={id:"hairlinePlugin",beforeDatasetsDraw:e=>{const t=e.scales.y;if(!t)return;const{ctx:n}=e,{top:r,bottom:i,left:a,right:o}=e.chartArea;if(t.min>0||t.max<0)return;const s=t.getPixelForValue(0);s<r||s>i||(n.save(),n.beginPath(),n.moveTo(a,s),n.lineTo(o,s),n.lineWidth=2,n.strokeStyle="rgb(207, 216, 220)",n.setLineDash([4,3]),n.stroke(),n.restore())}},sN={responsive:!0,maintainAspectRatio:!1,plugins:{legend:{display:!1}},scales:{y:{grace:"15%",position:"right",border:{display:!1,dash:[5,3],color:"#CFD8DC"},ticks:{font:{size:10,weight:"normal"},padding:10,color:"#898989"}},x:{border:{dash:[5,3],color:"#CFD8DC"},ticks:{font:{size:10,weight:"normal"},color:"#898989"}}},interaction:{mode:"index",intersect:!1}},lN=({data:e,height:t,classNameContainer:n,id:r,options:i,CustomTooltip:a})=>{const o=w.useRef(void 0),s=w.useRef(0),l=w.useRef(0),[u,c]=w.useState({dataset:"",label:"",value:0,style:{opacity:0,position:"absolute",left:0,bottom:0},dataPoints:[]}),d=w.useCallback(function({ctx:m,chartArea:v,scales:y,chartHeight:b,gradientFor:x,item:C}){let F=(y.y.getPixelForValue(0)-v.top)/b;F=F<0?0:F>1?1:F,o.current=m.createLinearGradient(0,v.top,0,b+v.top),x==="background"?(o.current.addColorStop(0,(C==null?void 0:C.colorBackgroundPositiveZero)||"#9FD2FF"),o.current.addColorStop(F,(C==null?void 0:C.colorBackgroundPositivePercentage)||"rgba(115, 235, 163, 0.1)"),o.current.addColorStop(F,(C==null?void 0:C.colorBackgroundNegativePercentage)||"rgba(235, 107, 107, 0.1)"),o.current.addColorStop(1,(C==null?void 0:C.colorBackgroundNegativeOne)||"#EB6B6B")):(o.current.addColorStop(F,(C==null?void 0:C.colorBorderPositive)||"#80CBC4"),o.current.addColorStop(F,(C==null?void 0:C.colorBorderNegative)||"#EB6B6B"))},[]),h=w.useCallback(function({ctx:m,chartArea:v,scales:y,gradientFor:b,item:x}){const C=v.right-v.left,D=v.bottom-v.top;return(!o.current||s.current!==C||l.current!==D)&&(s.current=C,l.current=D,d({ctx:m,chartArea:v,scales:y,chartHeight:D,gradientFor:b,item:x})),d({ctx:m,chartArea:v,scales:y,chartHeight:D,gradientFor:b,item:x}),o.current},[]),f=w.useMemo(()=>({...e,datasets:e.datasets.map(v=>({fill:!0,backgroundColor:function(y){const b=y.chart,{ctx:x,chartArea:C,scales:D}=b;if(C)return h({ctx:x,chartArea:C,scales:D,gradientFor:"background",item:v})},borderColor:function(y){const b=y.chart,{ctx:x,chartArea:C,scales:D}=b;if(C)return h({ctx:x,chartArea:C,scales:D,gradientFor:"border",item:v})},borderWidth:3,tension:0,pointRadius:0,pointHoverRadius:4,...v,data:v.data}))}),[e]),g=w.useMemo(()=>Bl(sN,{plugins:{tooltip:{enabled:!a,external:({chart:v,tooltip:y})=>a?aN(c)({chart:v,tooltip:y}):void 0}}},i??{}),[i,a]);return E.jsxs("div",{id:r,className:n,style:{height:t||"300px"},children:[a&&E.jsx(Qh,{selector:"body",children:E.jsx(a,{...u})}),E.jsx(YC,{data:f,options:g,plugins:[oN]})]})};Yi.register(ka,Ma,Tl,ls,Pi,VC,ls);const uN=e=>({chart:t,tooltip:n})=>{var l,u,c,d,h,f;const r={};if(n.opacity===0){e(g=>({...g,style:{...g.style,opacity:0,pointerEvents:"none"}}));return}if(!n.dataPoints||n.dataPoints.length===0)return;r.opacity="1",r.position="absolute",r.pointerEvents="none";const i=t.canvas.getBoundingClientRect();r.left=i.left+window.pageXOffset+n.caretX+"px",r.top=i.top+window.pageYOffset+n.caretY+"px";const a=((u=(l=n.dataPoints)==null?void 0:l[0])==null?void 0:u.label)??"",o=((d=(c=n.dataPoints)==null?void 0:c[0])==null?void 0:d.raw)??"",s=((f=(h=n.dataPoints)==null?void 0:h[0])==null?void 0:f.dataset.label)??"";e({dataset:s,label:a,value:o,style:r,dataPoints:n.dataPoints})},cN={id:"labelplugin",afterDatasetsDraw(e){const{ctx:t,chartArea:{top:n,bottom:r}}=e;t.save(),e.data.datasets.forEach((i,a)=>{const o=e.getDatasetMeta(a);o.visible&&o.data.forEach((s,l)=>{const u=i.data[l]||0,c=i!=null&&i.setDigit?$u(String(u)):String(u);t.font="12px Lato",t.textAlign="center";let d,h=!1;typeof u=="number"&&u>=0?(t.textBaseline="bottom",t.fillStyle=(i==null?void 0:i.colorTextLabelPositive)||s.options.borderColor,d=s.y-5,d>n&&(h=!0)):(t.textBaseline="top",t.fillStyle=(i==null?void 0:i.colorTextLabelNegative)||s.options.borderColor,d=s.y+5,d<r&&(h=!0)),h&&t.fillText(c,s.x,d)})}),t.restore()}},dN={responsive:!0,maintainAspectRatio:!1,plugins:{legend:{display:!1}},scales:{y:{grace:"15%",position:"left",border:{display:!1,dash:[5,3],color:"#CFD8DC"},ticks:{callback:function(e){return $u(e)??0},font:{size:10,weight:"normal"},padding:10,color:"#898989"}},x:{grid:{display:!1},border:{dash:[5,3],color:"#CFD8DC"},ticks:{font:{size:10,weight:"normal"},color:"#898989"}}},interaction:{mode:"index",intersect:!1}},fN=({data:e,classNameContainer:t,height:n,id:r,options:i,CustomTooltip:a})=>{const o=w.useRef(void 0),s=w.useRef(0),l=w.useRef(0),[u,c]=w.useState({dataset:"",label:"",value:0,style:{opacity:0,position:"absolute",left:0,bottom:0},dataPoints:[]}),d=w.useCallback(function({ctx:m,chartArea:v,scales:y,chartHeight:b,gradientFor:x,item:C}){let F=(y.y.getPixelForValue(0)-v.top)/b;F=F<0?0:F>1?1:F,o.current=m.createLinearGradient(0,v.top,0,b+v.top),x==="background"?(o.current.addColorStop(0,(C==null?void 0:C.colorBackgroundPositiveZero)||"#9FD2FF"),o.current.addColorStop(F,(C==null?void 0:C.colorBackgroundPositivePercentage)||"rgba(115, 235, 163, 0.1)"),o.current.addColorStop(F,(C==null?void 0:C.colorBackgroundNegativePercentage)||"rgba(235, 107, 107, 0.1)"),o.current.addColorStop(1,(C==null?void 0:C.colorBackgroundNegativeOne)||"#EB6B6B")):(o.current.addColorStop(F,(C==null?void 0:C.colorBorderPositive)||"#80CBC4"),o.current.addColorStop(F,(C==null?void 0:C.colorBorderNegative)||"#EB6B6B"))},[]),h=w.useCallback(function({ctx:m,chartArea:v,scales:y,gradientFor:b,item:x}){const C=v.right-v.left,D=v.bottom-v.top;return(!o.current||s.current!==C||l.current!==D)&&(s.current=C,l.current=D,d({ctx:m,chartArea:v,scales:y,chartHeight:D,gradientFor:b,item:x})),d({ctx:m,chartArea:v,scales:y,chartHeight:D,gradientFor:b,item:x}),o.current},[]),f=w.useMemo(()=>({...e,datasets:e.datasets.map(v=>({fill:!0,backgroundColor:function(y){const b=y.chart,{ctx:x,chartArea:C,scales:D}=b;if(C)return h({ctx:x,chartArea:C,scales:D,gradientFor:"background",item:v})},borderColor:function(y){const b=y.chart,{ctx:x,chartArea:C,scales:D}=b;if(C)return h({ctx:x,chartArea:C,scales:D,gradientFor:"border",item:v})},borderWidth:0,tension:0,pointRadius:0,pointHoverRadius:4,setDigit:!0,...v,data:v.data}))}),[e]),g=w.useMemo(()=>Bl(dN,{plugins:{tooltip:{enabled:!a,external:({chart:v,tooltip:y})=>a?uN(c)({chart:v,tooltip:y}):void 0}}},i??{}),[i,a]);return E.jsxs("div",{id:r,className:t,style:{height:n||"300px"},children:[a&&E.jsx(Qh,{selector:"body",children:E.jsx(a,{...u})}),E.jsx(kO,{data:f,options:g,plugins:[cN]})]})},hN="_left_1s2i5_4",gN="_right_1s2i5_7",mN="_indicator_1s2i5_16",pN="_active_1s2i5_19",Br={"container-step-indicator":"_container-step-indicator_1s2i5_1",left:hN,right:gN,"text-step-indicator":"_text-step-indicator_1s2i5_10","step-indicator":"_step-indicator_1s2i5_13",indicator:mN,active:pN};function bN(e,t){if(e<=0)return"0px";if(e===1)return"100%";const n=e-1;return`calc((100% - (${t} * ${n})) / ${e})`}const vN=({activeStep:e=0,countStep:t=0,classNameActiveStepIndicator:n="",classNameContainer:r="",classNameDesc:i="",classNameStepIndicator:a="",id:o="1ru-step-indicator",locationStepIndicator:s="right",widthStepIndicator:l=120,dynamicWidthStepIndicator:u=!1,gapStepIndicator:c="2px",classNameStepIndicatorContainer:d=""})=>E.jsxs("div",{id:o,className:`${Br["container-step-indicator"]}
|
193
193
|
${s==="left"?Br.left:Br.right} ${r||""}`,children:[s==="left"&&E.jsxs("p",{className:`${Br["text-step-indicator"]} ${i||""}`,children:[e+1,"/",t]}),E.jsx("div",{className:`${Br["step-indicator"]} ${d||""}
|
194
194
|
${u?"1ru-w-full":""} ${c}`,style:{gap:c},children:Array.from({length:t}).map((h,f)=>E.jsx("div",{className:`${Br.indicator} ${a||""}
|
195
195
|
${f<=e?`${Br.active} ${n}`:""}`,style:{width:u?bN(t,c):l}},f))}),s==="right"&&E.jsxs("p",{className:`${Br["text-step-indicator"]} ${i||""}`,children:[e+1,"/",t]})]});exports.AlertContainer=JD;exports.Badges=k3;exports.BigNumber=rt;exports.Breadcrumbs=QP;exports.Button=Mn;exports.ButtonIcon=T3;exports.ButtonPopover=JC;exports.Calendar=Ku;exports.CalendarRange=F3;exports.CheckboxTable=OO;exports.Chips=M3;exports.Collapse=iT;exports.ConfigColors=Zb;exports.ConfigTable=rn;exports.DatePicker=kP;exports.DateRangePicker=P3;exports.DefaultCheckedChecboxIcon=B3;exports.DefaultRadioChecboxIcon=O3;exports.DoughnutChart=MO;exports.ErrorMessage=zO;exports.FilterContainer=L3;exports.FilterDate=MP;exports.GradientBarChart=fN;exports.GradientLineChart=lN;exports.InputFloatingInner=C1;exports.InputNative=bg;exports.InputReguler=zf;exports.LineChart=eN;exports.ListVirtualization=Rv;exports.ModalDialog=oT;exports.MonthYearPicker=BO;exports.NumberFormat=LT;exports.Pagination=e6;exports.PatternFormat=VT;exports.Popover=Ar;exports.PortalComponent=Qh;exports.RadioCheckbox=Qu;exports.RadioCheckboxLabel=YP;exports.SelectDropdownContainer=yy;exports.SelectDropdownContainerComponents=sy;exports.Sidebar=V3;exports.Step=KO;exports.StepIndicator=vN;exports.Switch=NP;exports.TPublish=q5;exports.TabPanel=Z$;exports.Table=L$;exports.TableVirtualization=dh;exports.Tabs=G$;exports.Textarea=q3;exports.TextareaFloatingInner=UC;exports.Timeline=cT;exports.Tooltip=nN;exports.TruncateComponent=zT;exports.TypeBigNumber=Iu;exports.UploadFile=J3;exports.UploadImage=UT;exports.UploadMultipleFile=WO;exports.betweenBig=c5;exports.configScreens=J5;exports.configTypography=U5;exports.configTypographyLabaBisnis=Yb;exports.configTypographyPayhere=Xb;exports.convertBigNumbersToStrings=Ed;exports.convertNumbersToBigNumbers=Sd;exports.convertTextToJsonBigNumbers=Y5;exports.cookieStorage=BD;exports.deepCompareEquals=Ff;exports.defaultConfig=Ob;exports.formatBigNumber=TD;exports.formatDate=fa;exports.formatDateRange=DD;exports.formatNumber=Nr;exports.groupByKey=Vb;exports.isAccurateBigNumber=nr;exports.isAccurateNumber=Nb;exports.lessThanBig=u5;exports.maxBig=s5;exports.minBig=o5;exports.moreThanBig=l5;exports.openAlert=qD;exports.parseBigDecimal=_u;exports.parseDecimal=$f;exports.removeKeyObjectEmptyValue=ED;exports.removeTrailingZeros=kD;exports.setDigit=$u;exports.transformArrayMapping=_D;exports.transformArrayMappingObjectFC=$D;exports.transformArrayOfObjectToArray=Af;exports.transformArrayOfObjectToString=Rf;exports.transformBigNumber=FD;exports.transformDataHistory=SD;exports.transformLatLong=ID;exports.transformNumber=AD;exports.transformSecondTime=RD;exports.transfromIsNan=PD;exports.useAsyncDebounce=Iv;exports.useCombinedResizeObserver=A$;exports.useCountdown=R$;exports.useDeepCompareEffect=Mi;exports.useDeepCompareMemoize=No;exports.useElementOrWindowMediaQuery=$$;exports.useEventListener=k$;exports.useMasonry=M$;exports.useMergeRefs=hh;exports.useStateRef=F$;exports.utilTable=HI;
|