Nevar pievienot vairāk kā 25 tēmas Tēmai ir jāsākas ar burtu vai ciparu, tā var saturēt domu zīmes ('-') un var būt līdz 35 simboliem gara.
 
 
 

3 rindas
10 KiB

  1. (self.webpackChunkant_design_pro=self.webpackChunkant_design_pro||[]).push([[9597],{70350:function(){},54458:function(ne,V,u){"use strict";u.d(V,{Z:function(){return je}});var W=u(96156),Z=u(22122),M=u(38819),X=u(79508),oe=u(43061),ce=u(54549),ie=u(94184),w=u.n(ie),le=u(98423),n=u(67294),ue=u(53124),H=u(93355),G=u(92138),J=u(81253),Q={className:"",percent:0,prefixCls:"rc-progress",strokeColor:"#2db7f5",strokeLinecap:"round",strokeWidth:1,style:{},trailColor:"#D9D9D9",trailWidth:1,gapPosition:"bottom"},Y=function(){var e=(0,n.useRef)([]),a=(0,n.useRef)(null);return(0,n.useEffect)(function(){var t=Date.now(),r=!1;e.current.forEach(function(o){if(!!o){r=!0;var c=o.style;c.transitionDuration=".3s, .3s, .3s, .06s",a.current&&t-a.current<100&&(c.transitionDuration="0s, 0s")}}),r&&(a.current=Date.now())}),e.current},de=["className","percent","prefixCls","strokeColor","strokeLinecap","strokeWidth","style","trailColor","trailWidth","transition"],B=function(e){var a=e.className,t=e.percent,r=e.prefixCls,o=e.strokeColor,c=e.strokeLinecap,i=e.strokeWidth,v=e.style,d=e.trailColor,p=e.trailWidth,f=e.transition,y=(0,J.Z)(e,de);delete y.gapPosition;var m=Array.isArray(t)?t:[t],l=Array.isArray(o)?o:[o],C=Y(),g=i/2,k=100-i/2,E="M ".concat(c==="round"?g:0,",").concat(g,`
  2. L `).concat(c==="round"?k:100,",").concat(g),L="0 0 100 ".concat(i),x=0;return n.createElement("svg",(0,Z.Z)({className:w()("".concat(r,"-line"),a),viewBox:L,preserveAspectRatio:"none",style:v},y),n.createElement("path",{className:"".concat(r,"-line-trail"),d:E,strokeLinecap:c,stroke:d,strokeWidth:p||i,fillOpacity:"0"}),m.map(function(S,h){var O=1;switch(c){case"round":O=1-i/100;break;case"square":O=1-i/2/100;break;default:O=1;break}var P={strokeDasharray:"".concat(S*O,"px, 100px"),strokeDashoffset:"-".concat(x,"px"),transition:f||"stroke-dashoffset 0.3s ease 0s, stroke-dasharray .3s ease 0s, stroke 0.3s linear"},b=l[h]||l[l.length-1];return x+=S,n.createElement("path",{key:h,className:"".concat(r,"-line-path"),d:E,strokeLinecap:c,stroke:b,strokeWidth:i,fillOpacity:"0",ref:function(D){C[h]=D},style:P})}))};B.defaultProps=Q,B.displayName="Line";var ve=B,q=u(90484),fe=u(28481),ge=u(98924),_=0,pe=(0,ge.Z)();function me(){var s;return pe?(s=_,_+=1):s="TEST_OR_SSR",s}var he=function(s){var e=n.useState(),a=(0,fe.Z)(e,2),t=a[0],r=a[1];return n.useEffect(function(){r("rc_progress_".concat(me()))},[]),s||t},ye=["id","prefixCls","strokeWidth","trailWidth","gapDegree","gapPosition","trailColor","strokeLinecap","style","className","strokeColor","percent"];function ee(s){return+s.replace("%","")}function te(s){var e=s!=null?s:[];return Array.isArray(e)?e:[e]}var I=100,re=function(e,a,t,r){var o=arguments.length>4&&arguments[4]!==void 0?arguments[4]:0,c=arguments.length>5?arguments[5]:void 0,i=arguments.length>6?arguments[6]:void 0,v=arguments.length>7?arguments[7]:void 0,d=o>0?90+o/2:-90,p=Math.PI*2*e,f=p*((360-o)/360),y=a/100*360*((360-o)/360),m=o===0?0:{bottom:0,top:180,left:90,right:-90}[c],l=(100-t)/100*f;return i==="round"&&t!==100&&(l+=v/2,l>=f&&(l=f-.01)),{stroke:typeof r=="string"?r:void 0,strokeDasharray:"".concat(f,"px ").concat(p),strokeDashoffset:l,transform:"rotate(".concat(d+y+m,"deg)"),transformOrigin:"50% 50%",transition:"stroke-dashoffset .3s ease 0s, stroke-dasharray .3s ease 0s, stroke .3s, stroke-width .06s ease .3s, opacity .3s ease 0s",fillOpacity:0}},U=function(e){var a=e.id,t=e.prefixCls,r=e.strokeWidth,o=e.trailWidth,c=e.gapDegree,i=e.gapPosition,v=e.trailColor,d=e.strokeLinecap,p=e.style,f=e.className,y=e.strokeColor,m=e.percent,l=(0,J.Z)(e,ye),C=he(a),g="".concat(C,"-gradient"),k=I/2-r/2,E=re(k,0,100,v,c,i,d,r),L=te(m),x=te(y),S=x.find(function(P){return P&&(0,q.Z)(P)==="object"}),h=Y(),O=function(){var b=0;return L.map(function(j,D){var T=x[D]||x[x.length-1],N=T&&(0,q.Z)(T)==="object"?"url(#".concat(g,")"):void 0,$=re(k,b,j,T,c,i,d,r);return b+=j,n.createElement("circle",{key:D,className:"".concat(t,"-circle-path"),r:k,cx:I/2,cy:I/2,stroke:N,strokeLinecap:d,strokeWidth:r,opacity:j===0?0:1,style:$,ref:function(K){h[D]=K}})}).reverse()};return n.createElement("svg",(0,Z.Z)({className:w()("".concat(t,"-circle"),f),viewBox:"0 0 ".concat(I," ").concat(I),style:p,id:a},l),S&&n.createElement("defs",null,n.createElement("linearGradient",{id:g,x1:"100%",y1:"0%",x2:"0%",y2:"0%"},Object.keys(S).sort(function(P,b){return ee(P)-ee(b)}).map(function(P,b){return n.createElement("stop",{key:b,offset:P,stopColor:S[P]})}))),n.createElement("circle",{className:"".concat(t,"-circle-trail"),r:k,cx:I/2,cy:I/2,stroke:v,strokeLinecap:d,strokeWidth:o||r,style:E}),O())};U.defaultProps=Q,U.displayName="Circle";var ae=U,we={Line:ve,Circle:ae};function A(s){return!s||s<0?0:s>100?100:s}function z(s){var e=s.success,a=s.successPercent,t=a;return e&&"progress"in e&&(t=e.progress),e&&"percent"in e&&(t=e.percent),t}function Ce(s){var e=s.percent,a=s.success,t=s.successPercent,r=A(z({success:a,successPercent:t}));return[r,A(A(e)-r)]}function ke(s){var e=s.success,a=e===void 0?{}:e,t=s.strokeColor,r=a.strokeColor;return[r||G.presetPrimaryColors.green,t||null]}var Pe=function(e){var a=e.prefixCls,t=e.width,r=e.strokeWidth,o=e.trailColor,c=o===void 0?null:o,i=e.strokeLinecap,v=i===void 0?"round":i,d=e.gapPosition,p=e.gapDegree,f=e.type,y=e.children,m=e.success,l=t||120,C={width:l,height:l,fontSize:l*.15+6},g=r||6,k=d||f==="dashboard"&&"bottom"||void 0,E=function(){if(p||p===0)return p;if(f==="dashboard")return 75},L=Object.prototype.toString.call(e.strokeColor)==="[object Object]",x=ke({success:m,strokeColor:e.strokeColor}),S=w()("".concat(a,"-inner"),(0,W.Z)({},"".concat(a,"-circle-gradient"),L));return n.createElement("div",{className:S,style:C},n.createElement(ae,{percent:Ce(e),strokeWidth:g,trailWidth:g,strokeColor:x,strokeLinecap:v,trailColor:c,prefixCls:a,gapDegree:E(),gapPosition:k}),y)},xe=Pe,Ee=function(s,e){var a={};for(var t in s)Object.prototype.hasOwnProperty.call(s,t)&&e.indexOf(t)<0&&(a[t]=s[t]);if(s!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,t=Object.getOwnPropertySymbols(s);r<t.length;r++)e.indexOf(t[r])<0&&Object.prototype.propertyIsEnumerable.call(s,t[r])&&(a[t[r]]=s[t[r]]);return a},Se=function(e){var a=[];return Object.keys(e).forEach(function(t){var r=parseFloat(t.replace(/%/g,""));isNaN(r)||a.push({key:r,value:e[t]})}),a=a.sort(function(t,r){return t.key-r.key}),a.map(function(t){var r=t.key,o=t.value;return"".concat(o," ").concat(r,"%")}).join(", ")},be=function(e,a){var t=e.from,r=t===void 0?G.presetPrimaryColors.blue:t,o=e.to,c=o===void 0?G.presetPrimaryColors.blue:o,i=e.direction,v=i===void 0?a==="rtl"?"to left":"to right":i,d=Ee(e,["from","to","direction"]);if(Object.keys(d).length!==0){var p=Se(d);return{backgroundImage:"linear-gradient(".concat(v,", ").concat(p,")")}}return{backgroundImage:"linear-gradient(".concat(v,", ").concat(r,", ").concat(c,")")}},Le=function(e){var a=e.prefixCls,t=e.direction,r=e.percent,o=e.strokeWidth,c=e.size,i=e.strokeColor,v=e.strokeLinecap,d=v===void 0?"round":v,p=e.children,f=e.trailColor,y=f===void 0?null:f,m=e.success,l=i&&typeof i!="string"?be(i,t):{background:i},C=d==="square"||d==="butt"?0:void 0,g={backgroundColor:y||void 0,borderRadius:C},k=(0,Z.Z)({width:"".concat(A(r),"%"),height:o||(c==="small"?6:8),borderRadius:C},l),E=z(e),L={width:"".concat(A(E),"%"),height:o||(c==="small"?6:8),borderRadius:C,backgroundColor:m==null?void 0:m.strokeColor},x=E!==void 0?n.createElement("div",{className:"".concat(a,"-success-bg"),style:L}):null;return n.createElement(n.Fragment,null,n.createElement("div",{className:"".concat(a,"-outer")},n.createElement("div",{className:"".concat(a,"-inner"),style:g},n.createElement("div",{className:"".concat(a,"-bg"),style:k}),x)),p)},Oe=Le,We=function(e){for(var a=e.size,t=e.steps,r=e.percent,o=r===void 0?0:r,c=e.strokeWidth,i=c===void 0?8:c,v=e.strokeColor,d=e.trailColor,p=d===void 0?null:d,f=e.prefixCls,y=e.children,m=Math.round(t*(o/100)),l=a==="small"?2:14,C=new Array(t),g=0;g<t;g++){var k=Array.isArray(v)?v[g]:v;C[g]=n.createElement("div",{key:g,className:w()("".concat(f,"-steps-item"),(0,W.Z)({},"".concat(f,"-steps-item-active"),g<=m-1)),style:{backgroundColor:g<=m-1?k:p,width:l,height:i}})}return n.createElement("div",{className:"".concat(f,"-steps-outer")},C,y)},De=We,Ne=function(s,e){var a={};for(var t in s)Object.prototype.hasOwnProperty.call(s,t)&&e.indexOf(t)<0&&(a[t]=s[t]);if(s!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,t=Object.getOwnPropertySymbols(s);r<t.length;r++)e.indexOf(t[r])<0&&Object.prototype.propertyIsEnumerable.call(s,t[r])&&(a[t[r]]=s[t[r]]);return a},Te=(0,H.b)("line","circle","dashboard"),Ze=(0,H.b)("normal","exception","active","success"),Ie=function(e){var a,t=e.prefixCls,r=e.className,o=e.steps,c=e.strokeColor,i=e.percent,v=i===void 0?0:i,d=e.size,p=d===void 0?"default":d,f=e.showInfo,y=f===void 0?!0:f,m=e.type,l=m===void 0?"line":m,C=Ne(e,["prefixCls","className","steps","strokeColor","percent","size","showInfo","type"]);function g(){var N=z(e);return parseInt(N!==void 0?N.toString():v.toString(),10)}function k(){var N=e.status;return Ze.indexOf(N)<0&&g()>=100?"success":N||"normal"}function E(N,$){var F=e.format,K=z(e);if(!y)return null;var R,$e=F||function(Re){return"".concat(Re,"%")},se=l==="line";return F||$!=="exception"&&$!=="success"?R=$e(A(v),A(K)):$==="exception"?R=se?n.createElement(oe.Z,null):n.createElement(ce.Z,null):$==="success"&&(R=se?n.createElement(M.Z,null):n.createElement(X.Z,null)),n.createElement("span",{className:"".concat(N,"-text"),title:typeof R=="string"?R:void 0},R)}var L=n.useContext(ue.E_),x=L.getPrefixCls,S=L.direction,h=x("progress",t),O=k(),P=E(h,O),b=Array.isArray(c)?c[0]:c,j=typeof c=="string"||Array.isArray(c)?c:void 0,D;l==="line"?D=o?n.createElement(De,(0,Z.Z)({},e,{strokeColor:j,prefixCls:h,steps:o}),P):n.createElement(Oe,(0,Z.Z)({},e,{strokeColor:b,prefixCls:h,direction:S}),P):(l==="circle"||l==="dashboard")&&(D=n.createElement(xe,(0,Z.Z)({},e,{strokeColor:b,prefixCls:h,progressStatus:O}),P));var T=w()(h,(a={},(0,W.Z)(a,"".concat(h,"-").concat(l==="dashboard"&&"circle"||o&&"steps"||l),!0),(0,W.Z)(a,"".concat(h,"-status-").concat(O),!0),(0,W.Z)(a,"".concat(h,"-show-info"),y),(0,W.Z)(a,"".concat(h,"-").concat(p),p),(0,W.Z)(a,"".concat(h,"-rtl"),S==="rtl"),a),r);return n.createElement("div",(0,Z.Z)({},(0,le.Z)(C,["status","format","trailColor","strokeWidth","width","gapDegree","gapPosition","strokeLinecap","success","successPercent"]),{className:T}),D)},Ae=Ie,je=Ae},34669:function(ne,V,u){"use strict";var W=u(38663),Z=u.n(W),M=u(70350),X=u.n(M)}}]);