rbro-tat-uds 1.6.3 → 1.6.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.cjs.js CHANGED
@@ -5505,7 +5505,7 @@ See https://s-c.sh/2BAXzed for more info.`),window[s2]+=1);const z5=t=>e.createE
5505
5505
  font-weight: 400;
5506
5506
  fill: ${l.white};
5507
5507
  }
5508
- `,al=({cash:t=0,crestere:L=0,conservare:a=0,lichiditate:r=0,inflatie:n=0,scale_max:c=0,top_label:C="120.000 RON",bottom_label:o="astazi",cash_label_nedistribuit:p="echivalentul a 120.000 RON de astazi",height:u=334,test:m=!1,...f})=>{const v={cash:l.warm_gray_150,crestere:l.blue_300,conservare:l.purple_400,lichiditate:l.pink_300,inflatie:l.danger_500},V=(M,j=134)=>{const $=M.split(" "),_=[];let k=$[0];for(let w=1;w<$.length;w++){const H=$[w],P=`${k} ${H}`;Number(P.length)*6.15<Number(j)?k=P:(_.push(k),k=H)}return _.push(k),_},x=h.useMemo(()=>{if(t>0||L>0||a>0||r>0){const M=t-(L||0)-(a||0)-(r||0);return new Intl.NumberFormat("ro-RO",{style:"currency",currency:"RON",minimumFractionDigits:0,maximumFractionDigits:0}).format(M)}return p},[t,L,a,r,p]),b=h.useMemo(()=>{const _=u-54,k=c>t?c-t:0,w=k>0?Number((k*_/c*3).toFixed(2)):0,H=_-w,P=L+a+r,O=Math.max(t-P,0),g={crestere:L>0?L*H/t:0,conservare:a>0?a*H/t:0,lichiditate:r>0?r*H/t:0,cash:O>0?O*H/t:0,inflatie:n>0?n/100*_+18:0},D=Object.entries(g).filter(([r1,p1])=>p1>0&&r1!=="inflatie").length,R=(D-1)*4+(n>0?8:0),Z=D*18+R+(n>0?g.inflatie:0),B=Math.max(0,H-Z),S=Object.entries(g).reduce((r1,[p1,x1])=>p1!=="inflatie"?r1+x1:r1,0),G=g.crestere>0?18+B*g.crestere/S:0,T=g.conservare>0?18+B*g.conservare/S:0,I=g.lichiditate>0?18+B*g.lichiditate/S:0,l1=g.cash>0?18+B*g.cash/S:0,a1=g.inflatie>0?Math.min(g.inflatie,S-(D*18+R)):0;let U=28+w;const K=U;U+=G+(G>0?4:0);const X=U;U+=T+(T>0?4:0);const Q=U;U+=I+(I>0?4:0);const i1=U;U+=l1+(l1>0?4:0);const d1=U+(a1>0?4:0);return{cash_h:l1,cash_y:i1,remaining_cash:O,crestere_h:G,crestere_y:K,conservare_h:T,conservare_y:X,lichiditate_h:I,lichiditate_y:Q,inflatie_h:a1,inflatie_y:d1,available_h:H,invisible_h:w,cash_init_h:_}},[t,L,a,r,u,c,n]);return i.jsxs(Ll,{width:"100%",height:"100%",xmlns:"http://www.w3.org/2000/svg",...f,children:[i.jsx("text",{x:"50%",y:16,textAnchor:"middle",className:"label_top",children:C}),m&&i.jsxs(i.Fragment,{children:[i.jsx("rect",{x:0,y:b.crestere_y,width:"100%",height:b.available_h,fill:"transparent",stroke:"blue",strokeWidth:3}),i.jsx("rect",{x:0,y:28,width:"100%",height:b.invisible_h,fill:"red"})]}),i.jsx("rect",{x:m?".5%":"0%",y:b.crestere_y,width:m?"99%":"100%",height:b.crestere_h,fill:v.crestere}),L>0&&i.jsx("text",{x:"50%",y:b.crestere_y+b.crestere_h/2+5,textAnchor:"middle",className:"basic-label",children:V(new Intl.NumberFormat("ro-RO",{style:"currency",currency:"RON",minimumFractionDigits:0,maximumFractionDigits:0}).format(L)).map((M,j)=>i.jsx("tspan",{x:"50%",dy:j===0?"0":"1.2em",children:M},j))}),i.jsx("rect",{x:m?".5%":"0%",y:b.conservare_y,width:m?"99%":"100%",height:b.conservare_h,fill:v.conservare}),a>0&&i.jsx("text",{x:"50%",y:b.conservare_y+b.conservare_h/2+5,textAnchor:"middle",className:"basic-label",children:V(new Intl.NumberFormat("ro-RO",{style:"currency",currency:"RON",minimumFractionDigits:0,maximumFractionDigits:0}).format(a)).map((M,j)=>i.jsx("tspan",{x:"50%",dy:j===0?"0":"1.2em",children:M},j))}),i.jsx("rect",{x:m?".5%":"0%",y:b.lichiditate_y,width:m?"99%":"100%",height:b.lichiditate_h,fill:v.lichiditate}),r>0&&i.jsx("text",{x:"50%",y:b.lichiditate_y+b.lichiditate_h/2+5,textAnchor:"middle",className:"basic-label",children:V(new Intl.NumberFormat("ro-RO",{style:"currency",currency:"RON",minimumFractionDigits:0,maximumFractionDigits:0}).format(r)).map((M,j)=>i.jsx("tspan",{x:"50%",dy:j===0?"0":"1.2em",children:M},j))}),i.jsx("rect",{x:m?".5%":"0%",y:b.cash_y,height:b.cash_h,width:m?"99%":"100%",fill:v.cash}),b.remaining_cash>0&&i.jsx("text",{x:"50%",y:b.cash_y+b.cash_h/2+5,textAnchor:"middle",className:"basic-label",children:V(x).map((M,j)=>i.jsx("tspan",{x:"50%",dy:j===0?"0":"1.2em",children:M},j))}),n>0&&i.jsx("rect",{x:m?".5%":"0%",y:b.inflatie_y,height:b.inflatie_h,width:m?"99%":"100%",fill:v.inflatie}),n>0&&i.jsx("text",{x:"50%",y:b.inflatie_y+b.inflatie_h/2+5,textAnchor:"middle",className:"inflatie-label",children:V(n+"%").map((M,j)=>i.jsx("tspan",{x:"50%",dy:j===0?"0":"1.2em",children:M},j))}),i.jsx("text",{textAnchor:"middle",x:"50%",y:"98.5%",className:"label_bottom",children:o})]})},rl=F.div`
5508
+ `,al=({cash:t=0,crestere:L=0,conservare:a=0,lichiditate:r=0,inflatie:n=0,scale_max:c=0,top_label:C="120.000 RON",bottom_label:o="astazi",cash_label_nedistribuit:p="echivalentul a 120.000 RON de astazi",height:u=334,test:m=!1,...f})=>{const v={cash:l.warm_gray_150,crestere:l.blue_300,conservare:l.purple_400,lichiditate:l.pink_300,inflatie:l.danger_500},V=(M,j=134)=>{const $=M.split(" "),_=[];let k=$[0];for(let w=1;w<$.length;w++){const H=$[w],P=`${k} ${H}`;Number(P.length)*6.15<Number(j)?k=P:(_.push(k),k=H)}return _.push(k),_},x=h.useMemo(()=>{if(L===0&&a===0&&r===0)return p;const M=t-(L||0)-(a||0)-(r||0);return new Intl.NumberFormat("ro-RO",{style:"currency",currency:"RON",minimumFractionDigits:0,maximumFractionDigits:0}).format(M)},[t,L,a,r,p]),b=h.useMemo(()=>{const _=u-54,k=c>t?c-t:0,w=k>0?Number((k*_/c*3).toFixed(2)):0,H=_-w,P=L+a+r,O=Math.max(t-P,0),g={crestere:L>0?L*H/t:0,conservare:a>0?a*H/t:0,lichiditate:r>0?r*H/t:0,cash:O>0?O*H/t:0,inflatie:n>0?n/100*_+18:0},D=Object.entries(g).filter(([r1,p1])=>p1>0&&r1!=="inflatie").length,R=(D-1)*4+(n>0?8:0),Z=D*18+R+(n>0?g.inflatie:0),B=Math.max(0,H-Z),S=Object.entries(g).reduce((r1,[p1,x1])=>p1!=="inflatie"?r1+x1:r1,0),G=g.crestere>0?18+B*g.crestere/S:0,T=g.conservare>0?18+B*g.conservare/S:0,I=g.lichiditate>0?18+B*g.lichiditate/S:0,l1=g.cash>0?18+B*g.cash/S:0,a1=g.inflatie>0?Math.min(g.inflatie,S-(D*18+R)):0;let U=28+w;const K=U;U+=G+(G>0?4:0);const X=U;U+=T+(T>0?4:0);const Q=U;U+=I+(I>0?4:0);const i1=U;U+=l1+(l1>0?4:0);const d1=U+(a1>0?4:0);return{cash_h:l1,cash_y:i1,remaining_cash:O,crestere_h:G,crestere_y:K,conservare_h:T,conservare_y:X,lichiditate_h:I,lichiditate_y:Q,inflatie_h:a1,inflatie_y:d1,available_h:H,invisible_h:w,cash_init_h:_}},[t,L,a,r,u,c,n]);return i.jsxs(Ll,{width:"100%",height:"100%",xmlns:"http://www.w3.org/2000/svg",...f,children:[i.jsx("text",{x:"50%",y:16,textAnchor:"middle",className:"label_top",children:C}),m&&i.jsxs(i.Fragment,{children:[i.jsx("rect",{x:0,y:b.crestere_y,width:"100%",height:b.available_h,fill:"transparent",stroke:"blue",strokeWidth:3}),i.jsx("rect",{x:0,y:28,width:"100%",height:b.invisible_h,fill:"red"})]}),i.jsx("rect",{x:m?".5%":"0%",y:b.crestere_y,width:m?"99%":"100%",height:b.crestere_h,fill:v.crestere}),L>0&&i.jsx("text",{x:"50%",y:b.crestere_y+b.crestere_h/2+5,textAnchor:"middle",className:"basic-label",children:V(new Intl.NumberFormat("ro-RO",{style:"currency",currency:"RON",minimumFractionDigits:0,maximumFractionDigits:0}).format(L)).map((M,j)=>i.jsx("tspan",{x:"50%",dy:j===0?"0":"1.2em",children:M},j))}),i.jsx("rect",{x:m?".5%":"0%",y:b.conservare_y,width:m?"99%":"100%",height:b.conservare_h,fill:v.conservare}),a>0&&i.jsx("text",{x:"50%",y:b.conservare_y+b.conservare_h/2+5,textAnchor:"middle",className:"basic-label",children:V(new Intl.NumberFormat("ro-RO",{style:"currency",currency:"RON",minimumFractionDigits:0,maximumFractionDigits:0}).format(a)).map((M,j)=>i.jsx("tspan",{x:"50%",dy:j===0?"0":"1.2em",children:M},j))}),i.jsx("rect",{x:m?".5%":"0%",y:b.lichiditate_y,width:m?"99%":"100%",height:b.lichiditate_h,fill:v.lichiditate}),r>0&&i.jsx("text",{x:"50%",y:b.lichiditate_y+b.lichiditate_h/2+5,textAnchor:"middle",className:"basic-label",children:V(new Intl.NumberFormat("ro-RO",{style:"currency",currency:"RON",minimumFractionDigits:0,maximumFractionDigits:0}).format(r)).map((M,j)=>i.jsx("tspan",{x:"50%",dy:j===0?"0":"1.2em",children:M},j))}),i.jsx("rect",{x:m?".5%":"0%",y:b.cash_y,height:b.cash_h,width:m?"99%":"100%",fill:v.cash}),b.remaining_cash>0&&i.jsx("text",{x:"50%",y:b.cash_y+b.cash_h/2+5,textAnchor:"middle",className:"basic-label",children:V(x).map((M,j)=>i.jsx("tspan",{x:"50%",dy:j===0?"0":"1.2em",children:M},j))}),n>0&&i.jsx("rect",{x:m?".5%":"0%",y:b.inflatie_y,height:b.inflatie_h,width:m?"99%":"100%",fill:v.inflatie}),n>0&&i.jsx("text",{x:"50%",y:b.inflatie_y+b.inflatie_h/2+5,textAnchor:"middle",className:"inflatie-label",children:V(n+"%").map((M,j)=>i.jsx("tspan",{x:"50%",dy:j===0?"0":"1.2em",children:M},j))}),i.jsx("text",{textAnchor:"middle",x:"50%",y:"98.5%",className:"label_bottom",children:o})]})},rl=F.div`
5509
5509
  display: flex;
5510
5510
  align-items: center;
5511
5511
  gap: 8px;