5 lines
26 KiB
JavaScript
5 lines
26 KiB
JavaScript
"use strict";(self.webpackChunkant_design_pro=self.webpackChunkant_design_pro||[]).push([[96],{94927:function(Rn,Te,r){r.r(Te),r.d(Te,{default:function(){return Nn}});var We=r(25359),ae=r.n(We),Ne=r(49811),w=r.n(Ne),_=r(54306),$e=r.n(_),Ae=r(87474),Fe=r(12472),a=r(24572),g=r(75782),se=r(58733),pe=r(66922),te=pe.Z,D=r(50554),nn=r(84875),N=r.n(nn),x=r(50959),G=r(49544),X=r(91600),xe=r(35276),Be=r(2765),De=r(16770),mn=r(27406),t=r(29870),E=r(26916);function b(e,n){for(var l=e,c=0;c<n.length;c+=1){if(l==null)return;l=l[n[c]]}return l}var u=["title","subTitle","avatar","description","extra","content","actions","type"],f=u.reduce(function(e,n){return e.set(n,!0),e},new Map),K=r(17539),O=r(6471),ce=r(37454);function F(e,n){return re(e)||Ve(e,n)||L(e,n)||V()}function V(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function L(e,n){if(e){if(typeof e=="string")return Ce(e,n);var l=Object.prototype.toString.call(e).slice(8,-1);if(l==="Object"&&e.constructor&&(l=e.constructor.name),l==="Map"||l==="Set")return Array.from(e);if(l==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(l))return Ce(e,n)}}function Ce(e,n){(n==null||n>e.length)&&(n=e.length);for(var l=0,c=new Array(n);l<n;l++)c[l]=e[l];return c}function Ve(e,n){if(!(typeof Symbol=="undefined"||!(Symbol.iterator in Object(e)))){var l=[],c=!0,m=!1,C=void 0;try{for(var o=e[Symbol.iterator](),y;!(c=(y=o.next()).done)&&(l.push(y.value),!(n&&l.length===n));c=!0);}catch(s){m=!0,C=s}finally{try{!c&&o.return!=null&&o.return()}finally{if(m)throw C}}return l}}function re(e){if(Array.isArray(e))return e}function fn(e,n){var l=n||{},c=l.defaultValue,m=l.value,C=l.onChange,o=l.postState,y=x.useState(function(){return m!==void 0?m:c!==void 0?typeof c=="function"?c():c:typeof e=="function"?e():e}),s=F(y,2),z=s[0],d=s[1],I=m!==void 0?m:z;o&&(I=o(I));function Z(T){d(T),I!==T&&C&&C(T,I)}var j=x.useRef(!0);return x.useEffect(function(){if(j.current){j.current=!1;return}m===void 0&&d(m)},[m]),[I,Z]}var i=r(11527),gn=["title","subTitle","content","itemTitleRender","prefixCls","actions","item","recordKey","avatar","cardProps","description","isEditable","checkbox","index","selected","loading","expand","onExpand","expandable","rowSupportExpand","showActions","showExtra","type","style","className","record","onRow","onItem","itemHeaderRender","cardActionProps","extra"];function an(e){var n,l=e.prefixCls,c=e.expandIcon,m=c===void 0?(0,i.jsx)(K.Z,{}):c,C=e.onExpand,o=e.expanded,y=e.record,s=e.hashId,z=m,d="".concat(l,"-row-expand-icon"),I=function(j){C(!o),j.stopPropagation()};return typeof m=="function"&&(z=m({expanded:o,onExpand:C,record:y})),(0,i.jsx)("span",{className:N()(d,s,(n={},(0,a.Z)(n,"".concat(l,"-row-expanded"),o),(0,a.Z)(n,"".concat(l,"-row-collapsed"),!o),n)),onClick:I,children:z})}function ke(e){var n,l,c,m,C,o=e.prefixCls,y=(0,x.useContext)(D.ZP.ConfigContext),s=y.getPrefixCls,z=(0,x.useContext)(xe.L_),d=z.hashId,I=s("pro-list",o),Z="".concat(I,"-row"),j=e.title,T=e.subTitle,h=e.content,$=e.itemTitleRender,ze=e.prefixCls,U=e.actions,on=e.item,ln=e.recordKey,q=e.avatar,Y=e.cardProps,W=e.description,Xe=e.isEditable,ye=e.checkbox,M=e.index,be=e.selected,me=e.loading,fe=e.expand,ee=e.onExpand,ge=e.expandable,Ke=e.rowSupportExpand,oe=e.showActions,Ze=e.showExtra,Se=e.type,Ye=e.style,Pe=e.className,B=Pe===void 0?Z:Pe,v=e.record,A=e.onRow,R=e.onItem,ve=e.itemHeaderRender,J=e.cardActionProps,he=e.extra,Ee=(0,se.Z)(e,gn),Ie=ge||{},Le=Ie.expandedRowRender,sn=Ie.expandIcon,Sn=Ie.expandRowByClick,ie=Ie.indentSize,cn=ie===void 0?8:ie,Me=Ie.expandedRowClassName,Q=fn(!!fe,{value:fe,onChange:ee}),p=(0,X.Z)(Q,2),S=p[0],k=p[1],P=N()((n={},(0,a.Z)(n,"".concat(Z,"-selected"),!Y&&be),(0,a.Z)(n,"".concat(Z,"-show-action-hover"),oe==="hover"),(0,a.Z)(n,"".concat(Z,"-type-").concat(Se),!!Se),(0,a.Z)(n,"".concat(Z,"-editable"),Xe),(0,a.Z)(n,"".concat(Z,"-show-extra-hover"),Ze==="hover"),n),d,Z),Je=N()(d,(0,a.Z)({},"".concat(B,"-extra"),Ze==="hover")),He=S||Object.values(ge||{}).length===0,Re=Le&&Le(v,M,cn,S),Qe=(0,x.useMemo)(function(){if(!(!U||J==="actions"))return[(0,i.jsx)("div",{onClick:function(le){return le.stopPropagation()},children:U},"action")]},[U,J]),Pn=(0,x.useMemo)(function(){if(!(!U||!J||J==="extra"))return[(0,i.jsx)("div",{className:"".concat(P,"-actions ").concat(d),onClick:function(le){return le.stopPropagation()},children:U},"action")]},[U,J,P,d]),we=j||T?(0,i.jsxs)("div",{className:"".concat(P,"-header-title ").concat(d),children:[j&&(0,i.jsx)("div",{className:"".concat(P,"-title ").concat(d),children:j}),T&&(0,i.jsx)("div",{className:"".concat(P,"-subTitle ").concat(d),children:T})]}):null,dn=(l=$&&($==null?void 0:$(v,M,we)))!==null&&l!==void 0?l:we,_e=dn||q||T||W?(0,i.jsx)(De.ZP.Item.Meta,{avatar:q,title:dn,description:W&&He&&(0,i.jsx)("div",{className:"".concat(P,"-description ").concat(d),children:W})}):null,ne=N()(d,(c={},(0,a.Z)(c,"".concat(P,"-item-has-checkbox"),ye),(0,a.Z)(c,"".concat(P,"-item-has-avatar"),q),(0,a.Z)(c,P,P),c)),qe=(0,x.useMemo)(function(){return q||j?(0,i.jsxs)(i.Fragment,{children:[q,(0,i.jsx)("span",{className:"".concat(s("list-item-meta-title")," ").concat(d),children:j})]}):null},[q,s,d,j]),en=Y?(0,i.jsx)(O.ZP,(0,g.Z)((0,g.Z)((0,g.Z)({bordered:!0,loading:me,hoverable:!0},Y),{},{title:qe,subTitle:T,extra:Qe,actions:Pn,bodyStyle:(0,g.Z)({padding:24},Y.bodyStyle)},R==null?void 0:R(v,M)),{},{children:(0,i.jsx)(ce.Z,{avatar:!0,title:!1,loading:me,active:!0,children:(0,i.jsxs)("div",{className:"".concat(P,"-header ").concat(d),children:[$&&($==null?void 0:$(v,M,we)),h]})})})):(0,i.jsx)(De.ZP.Item,(0,g.Z)((0,g.Z)((0,g.Z)((0,g.Z)({className:N()(ne,d,(0,a.Z)({},B,B!==Z))},Ee),{},{actions:Qe,extra:!!he&&(0,i.jsx)("div",{className:Je,children:he})},A==null?void 0:A(v,M)),R==null?void 0:R(v,M)),{},{onClick:function(le){var je,En,un,In;A==null||(je=A(v,M))===null||je===void 0||(En=je.onClick)===null||En===void 0||En.call(je,le),R==null||(un=R(v,M))===null||un===void 0||(In=un.onClick)===null||In===void 0||In.call(un,le),Sn&&k(!S)},children:(0,i.jsxs)(ce.Z,{avatar:!0,title:!1,loading:me,active:!0,children:[(0,i.jsxs)("div",{className:"".concat(P,"-header ").concat(d),children:[(0,i.jsxs)("div",{className:"".concat(P,"-header-option ").concat(d),children:[!!ye&&(0,i.jsx)("div",{className:"".concat(P,"-checkbox ").concat(d),children:ye}),Object.values(ge||{}).length>0&&Ke&&an({prefixCls:I,hashId:d,expandIcon:sn,onExpand:k,expanded:S,record:v})]}),(m=ve&&(ve==null?void 0:ve(v,M,_e)))!==null&&m!==void 0?m:_e]}),He&&(h||Re)&&(0,i.jsxs)("div",{className:"".concat(P,"-content ").concat(d),children:[h,Le&&Ke&&(0,i.jsx)("div",{className:Me&&Me(v,M,cn),children:Re})]})]})}));return Y?(0,i.jsx)("div",{className:N()(d,(C={},(0,a.Z)(C,"".concat(P,"-card"),Y),(0,a.Z)(C,B,B!==Z),C)),style:Ye,children:en}):en}var vn=ke,H=r(11817),hn=["dataSource","columns","rowKey","showActions","showExtra","prefixCls","actionRef","itemTitleRender","renderItem","itemCardProps","itemHeaderRender","expandable","rowSelection","pagination","onRow","onItem","rowClassName"];function pn(e){var n=e.dataSource,l=e.columns,c=e.rowKey,m=e.showActions,C=e.showExtra,o=e.prefixCls,y=e.actionRef,s=e.itemTitleRender,z=e.renderItem,d=e.itemCardProps,I=e.itemHeaderRender,Z=e.expandable,j=e.rowSelection,T=e.pagination,h=e.onRow,$=e.onItem,ze=e.rowClassName,U=(0,se.Z)(e,hn),on=(0,x.useContext)(xe.L_),ln=on.hashId,q=(0,x.useContext)(D.ZP.ConfigContext),Y=q.getPrefixCls,W=x.useMemo(function(){return typeof c=="function"?c:function(Q,p){return Q[c]||p}},[c]),Xe=(0,mn.Z)(n,"children",W),ye=(0,X.Z)(Xe,1),M=ye[0],be=[function(){},T];(0,H.n)(Be.Z,"5.3.0")<0&&be.reverse();var me=(0,t.ZP)(n.length,be[0],be[1]),fe=(0,X.Z)(me,1),ee=fe[0],ge=x.useMemo(function(){if(T===!1||!ee.pageSize||n.length<ee.total)return n;var Q=ee.current,p=Q===void 0?1:Q,S=ee.pageSize,k=S===void 0?10:S,P=n.slice((p-1)*k,p*k);return P},[n,ee,T]),Ke=Y("pro-list",o),oe=[{getRowKey:W,getRecordByKey:M,prefixCls:Ke,data:n,pageData:ge,expandType:"row",childrenColumnName:"children",locale:{}},j];(0,H.n)(Be.Z,"5.3.0")<0&&oe.reverse();var Ze=E.ZP.apply(void 0,oe),Se=(0,X.Z)(Ze,2),Ye=Se[0],Pe=Se[1],B=Z||{},v=B.expandedRowKeys,A=B.defaultExpandedRowKeys,R=B.defaultExpandAllRows,ve=R===void 0?!0:R,J=B.onExpand,he=B.onExpandedRowsChange,Ee=B.rowExpandable,Ie=x.useState(function(){return A||(ve!==!1?n.map(W):[])}),Le=(0,X.Z)(Ie,2),sn=Le[0],Sn=Le[1],ie=x.useMemo(function(){return new Set(v||sn||[])},[v,sn]),cn=x.useCallback(function(Q){var p=W(Q,n.indexOf(Q)),S,k=ie.has(p);k?(ie.delete(p),S=(0,G.Z)(ie)):S=[].concat((0,G.Z)(ie),[p]),Sn(S),J&&J(!k,Q),he&&he(S)},[W,ie,n,J,he]),Me=Ye([])[0];return(0,i.jsx)(De.ZP,(0,g.Z)((0,g.Z)({},U),{},{className:N()(Y("pro-list-container",o),ln,U.className),dataSource:ge,pagination:T&&ee,renderItem:function(p,S){var k,P,Je,He={className:typeof ze=="function"?ze(p,S):ze};l==null||l.forEach(function(ne){var qe=ne.listKey,en=ne.cardActionProps;if(f.has(qe)){var Ue=ne.dataIndex||qe||ne.key,le=Array.isArray(Ue)?b(p,Ue):p[Ue];en==="actions"&&qe==="actions"&&(He.cardActionProps=en);var je=ne.render?ne.render(le,p,S):le;je!=="-"&&(He[ne.listKey]=je)}});var Re;Me&&Me.render&&(Re=Me.render(p,p,S)||void 0);var Qe=((k=y.current)===null||k===void 0?void 0:k.isEditable((0,g.Z)((0,g.Z)({},p),{},{index:S})))||{},Pn=Qe.isEditable,we=Qe.recordKey,dn=Pe.has(we||S),_e=(0,i.jsx)(vn,(0,g.Z)((0,g.Z)({cardProps:U.grid?(0,g.Z)((0,g.Z)((0,g.Z)({},d),U.grid),{},{checked:dn,onChecked:x.isValidElement(Re)?(P=Re)===null||P===void 0||(Je=P.props)===null||Je===void 0?void 0:Je.onChange:void 0}):void 0},He),{},{recordKey:we,isEditable:Pn||!1,expandable:Z,expand:ie.has(W(p,S)),onExpand:function(){cn(p)},index:S,record:p,item:p,showActions:m,showExtra:C,itemTitleRender:s,itemHeaderRender:I,rowSupportExpand:!Ee||Ee&&Ee(p),selected:Pe.has(W(p,S)),checkbox:Re,onRow:h,onItem:$}),we);return z?z(p,S,_e):_e}}))}var xn=pn,Ge=r(28405),Cn=r(43447),yn=new Ge.E4("techUiListActive",{"0%":{backgroundColor:"unset"},"30%":{background:"#fefbe6"},"100%":{backgroundColor:"unset"}}),tn=function(n){var l,c,m,C,o,y;return(0,a.Z)({},n.componentCls,(y={backgroundColor:"transparent"},(0,a.Z)(y,"".concat(n.proComponentsCls,"-table-alert"),{marginBlockEnd:"16px"}),(0,a.Z)(y,"&-row",(o={borderBlockEnd:"1px solid ".concat(n.colorSplit)},(0,a.Z)(o,"".concat(n.antCls,"-list-item-meta-title"),{borderBlockEnd:"none",margin:0}),(0,a.Z)(o,"&:last-child",(0,a.Z)({borderBlockEnd:"none"},"".concat(n.antCls,"-list-item"),{borderBlockEnd:"none"})),(0,a.Z)(o,"&:hover",(l={backgroundColor:"rgba(0, 0, 0, 0.02)",transition:"background-color 0.3s"},(0,a.Z)(l,"".concat(n.antCls,"-list-item-action"),{display:"block"}),(0,a.Z)(l,"".concat(n.antCls,"-list-item-extra"),{display:"flex"}),(0,a.Z)(l,"".concat(n.componentCls,"-row-extra"),{display:"block"}),(0,a.Z)(l,"".concat(n.componentCls,"-row-subheader-actions"),{display:"block"}),l)),(0,a.Z)(o,"&-card",(0,a.Z)({marginBlock:8,marginInline:0,paddingBlock:0,paddingInline:8,"&:hover":{backgroundColor:"transparent"}},"".concat(n.antCls,"-list-item-meta-title"),{flexShrink:9,marginBlock:0,marginInline:0,lineHeight:"22px"})),(0,a.Z)(o,"&".concat(n.componentCls,"-row-editable"),(0,a.Z)({},"".concat(n.componentCls,"-list-item"),{"&-meta":{"&-avatar,&-description,&-title":{paddingBlock:6,paddingInline:0}},"&-action":{display:"block"}})),(0,a.Z)(o,"&".concat(n.componentCls,"-row-selected"),{backgroundColor:n.colorPrimaryBgHover,"&:hover":{backgroundColor:n.colorPrimaryBgHover}}),(0,a.Z)(o,"&".concat(n.componentCls,"-row-type-new"),{animationName:yn,animationDuration:"3s"}),(0,a.Z)(o,"&".concat(n.componentCls,"-row-type-inline"),(0,a.Z)({},"".concat(n.componentCls,"-row-title"),{fontWeight:"normal"})),(0,a.Z)(o,"&".concat(n.componentCls,"-row-type-top"),{backgroundImage:"url('https://gw.alipayobjects.com/zos/antfincdn/DehQfMbOJb/icon.svg')",backgroundRepeat:"no-repeat",backgroundPosition:"left top",backgroundSize:"12px 12px"}),(0,a.Z)(o,"&-show-action-hover",(0,a.Z)({},"".concat(n.antCls,`-list-item-action,
|
|
`).concat(n.proComponentsCls,`-card-extra,
|
|
`).concat(n.proComponentsCls,"-card-actions"),{display:"flex"})),(0,a.Z)(o,"&-show-extra-hover",(0,a.Z)({},"".concat(n.antCls,"-list-item-extra"),{display:"none"})),(0,a.Z)(o,"&-extra",{display:"none"}),(0,a.Z)(o,"&-subheader",{display:"flex",alignItems:"center",justifyContent:"space-between",height:"44px",paddingInline:24,paddingBlock:0,color:n.colorTextSecondary,lineHeight:"44px",background:"rgba(0, 0, 0, 0.02)","&-actions":{display:"none"},"&-actions *":{marginInlineEnd:8,"&:last-child":{marginInlineEnd:0}}}),(0,a.Z)(o,"&-expand-icon",{marginInlineEnd:8,display:"flex",fontSize:12,cursor:"pointer",height:"24px",marginRight:4,color:n.colorTextSecondary,"> .anticon > svg":{transition:"0.3s"}}),(0,a.Z)(o,"&-expanded",{" > .anticon > svg":{transform:"rotate(90deg)"}}),(0,a.Z)(o,"&-title",{marginInlineEnd:"16px",wordBreak:"break-all",cursor:"pointer","&:hover":{color:n.colorPrimary}}),(0,a.Z)(o,"&-content",{position:"relative",display:"flex",flex:"1",flexDirection:"column",marginBlock:0,marginInline:32}),(0,a.Z)(o,"&-subTitle",{color:"rgba(0, 0, 0, 0.45)"}),(0,a.Z)(o,"&-description",{marginBlockStart:"4px",wordBreak:"break-all"}),(0,a.Z)(o,"&-avatar",{display:"flex"}),(0,a.Z)(o,"&-header",{display:"flex",flex:"1",justifyContent:"flex-start",h4:{margin:0,padding:0}}),(0,a.Z)(o,"&-header-title",{display:"flex",alignItems:"center",justifyContent:"flex-start"}),(0,a.Z)(o,"&-header-option",{display:"flex"}),(0,a.Z)(o,"&-checkbox",{width:"16px",marginInlineEnd:"12px"}),(0,a.Z)(o,"&-no-split",(c={},(0,a.Z)(c,"".concat(n.componentCls,"-row"),{borderBlockEnd:"none"}),(0,a.Z)(c,"".concat(n.antCls,"-list ").concat(n.antCls,"-list-item"),{borderBlockEnd:"none"}),c)),(0,a.Z)(o,"&-bordered",(0,a.Z)({},"".concat(n.componentCls,"-toolbar"),{borderBlockEnd:"1px solid ".concat(n.colorSplit)})),(0,a.Z)(o,"".concat(n.antCls,"-list-vertical"),(m={},(0,a.Z)(m,"".concat(n.componentCls,"-row"),{borderBlockEnd:"12px 18px 12px 24px"}),(0,a.Z)(m,"&-header-title",{display:"flex",flexDirection:"column",alignItems:"flex-start",justifyContent:"center"}),(0,a.Z)(m,"&-content",{marginBlock:0,marginInline:0}),(0,a.Z)(m,"&-subTitle",{marginBlockStart:8}),(0,a.Z)(m,"".concat(n.antCls,"-list-item-extra"),(0,a.Z)({display:"flex",alignItems:"center",marginInlineStart:"32px"},"".concat(n.componentCls,"-row-description"),{marginBlockStart:16})),(0,a.Z)(m,"".concat(n.antCls,"-list-bordered ").concat(n.antCls,"-list-item"),{paddingInline:0}),(0,a.Z)(m,"".concat(n.componentCls,"-row-show-extra-hover"),(0,a.Z)({},"".concat(n.antCls,"-list-item-extra "),{display:"none"})),m)),(0,a.Z)(o,"".concat(n.antCls,"-list-pagination"),{marginBlockStart:n.margin,marginBlockEnd:n.margin}),(0,a.Z)(o,"".concat(n.antCls,"-list-list"),{"&-item":{cursor:"pointer",paddingBlock:12,paddingInline:12}}),(0,a.Z)(o,"".concat(n.antCls,"-list-vertical ").concat(n.proComponentsCls,"-list-row"),(0,a.Z)({"&-header":{paddingBlock:0,paddingInline:0,borderBlockEnd:"none"}},"".concat(n.antCls,"-list-item"),(C={width:"100%",paddingBlock:12,paddingInlineStart:24,paddingInlineEnd:18},(0,a.Z)(C,"".concat(n.antCls,"-list-item-meta-avatar"),{display:"flex",alignItems:"center",marginInlineEnd:8}),(0,a.Z)(C,"".concat(n.antCls,"-list-item-action-split"),{display:"none"}),(0,a.Z)(C,"".concat(n.antCls,"-list-item-meta-title"),{marginBlock:0,marginInline:0}),C))),o)),y))};function bn(e){return(0,Cn.Xj)("ProList",function(n){var l=(0,g.Z)((0,g.Z)({},n),{},{componentCls:".".concat(e)});return[tn(l)]})}var rn=["metas","split","footer","rowKey","tooltip","className","options","search","expandable","showActions","showExtra","rowSelection","pagination","itemLayout","renderItem","grid","itemCardProps","onRow","onItem","rowClassName","locale","itemHeaderRender","itemTitleRender"];function Oe(e){var n=e.metas,l=e.split,c=e.footer,m=e.rowKey,C=e.tooltip,o=e.className,y=e.options,s=y===void 0?!1:y,z=e.search,d=z===void 0?!1:z,I=e.expandable,Z=e.showActions,j=e.showExtra,T=e.rowSelection,h=T===void 0?!1:T,$=e.pagination,ze=$===void 0?!1:$,U=e.itemLayout,on=e.renderItem,ln=e.grid,q=e.itemCardProps,Y=e.onRow,W=e.onItem,Xe=e.rowClassName,ye=e.locale,M=e.itemHeaderRender,be=e.itemTitleRender,me=(0,se.Z)(e,rn),fe=(0,x.useRef)();(0,x.useImperativeHandle)(me.actionRef,function(){return fe.current});var ee=(0,x.useContext)(D.ZP.ConfigContext),ge=ee.getPrefixCls,Ke=(0,x.useMemo)(function(){var B=[];return Object.keys(n||{}).forEach(function(v){var A=n[v]||{},R=A.valueType;R||(v==="avatar"&&(R="avatar"),v==="actions"&&(R="option"),v==="description"&&(R="textarea")),B.push((0,g.Z)((0,g.Z)({listKey:v,dataIndex:(A==null?void 0:A.dataIndex)||v},A),{},{valueType:R}))}),B},[n]),oe=ge("pro-list",e.prefixCls),Ze=bn(oe),Se=Ze.wrapSSR,Ye=Ze.hashId,Pe=N()(oe,Ye,(0,a.Z)({},"".concat(oe,"-no-split"),!l));return Se((0,i.jsx)(te,(0,g.Z)((0,g.Z)({tooltip:C},me),{},{actionRef:fe,pagination:ze,type:"list",rowSelection:h,search:d,options:s,className:N()(oe,o,Pe),columns:Ke,rowKey:m,tableViewRender:function(v){var A=v.columns,R=v.size,ve=v.pagination,J=v.rowSelection,he=v.dataSource,Ee=v.loading;return(0,i.jsx)(xn,{grid:ln,itemCardProps:q,itemTitleRender:be,prefixCls:e.prefixCls,columns:A,renderItem:on,actionRef:fe,dataSource:he||[],size:R,footer:c,split:l,rowKey:m,expandable:I,rowSelection:h===!1?void 0:J,showActions:Z,showExtra:j,pagination:ve,itemLayout:U,loading:Ee,itemHeaderRender:M,onRow:Y,onItem:W,rowClassName:Xe,locale:ye})}})))}function $n(e){return _jsx(ProConfigProvider,{needDeps:!0,children:_jsx(Oe,_objectSpread({cardProps:!1,search:!1,toolBarRender:!1},e))})}function Tn(e){return(0,i.jsx)(xe._Y,{needDeps:!0,children:(0,i.jsx)(Oe,(0,g.Z)({},e))})}var An=null,wn=r(86195),de=r(68243),ue=r(4050),jn=r(21362),Zn="",Nn=function(){var e=(0,x.useState)([]),n=$e()(e,2),l=n[0],c=n[1],m=(0,wn.useModel)("@@initialState"),C=m.refresh;return(0,i.jsx)(Fe._z,{children:(0,i.jsx)(Tn,{headerTitle:"\u63D2\u4EF6\u5217\u8868",search:{filterType:"light"},rowKey:"name",dataSource:l,request:w()(ae()().mark(function o(){var y,s=arguments;return ae()().wrap(function(d){for(;;)switch(d.prev=d.next){case 0:return y=s.length>0&&s[0]!==void 0?s[0]:{},Zn!=""?y.init=Zn:Zn="false",d.abrupt("return",(0,wn.request)("/api/plugins/list.json",{params:y}));case 3:case"end":return d.stop()}},o)})),onDataSourceChange:c,pagination:{pageSize:7},showActions:"hover",metas:{title:{dataIndex:"title",title:"\u641C\u7D22"},avatar:{dataIndex:"icon",search:!1},description:{dataIndex:"description",search:!1},subTitle:{render:function(y,s){return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(de.Z,{size:0,children:(0,i.jsx)(ue.Z,{color:s.identified?"gold":"grey",children:s.organization==""?"\u672A\u8BA4\u8BC1\u6765\u6E90":s.organization},s.organization)}),(0,i.jsx)(de.Z,{size:0,children:(0,i.jsx)(ue.Z,{color:"black",children:s.author},s.author)}),s.module&&(0,i.jsx)(de.Z,{size:0,children:(0,i.jsx)(ue.Z,{color:"purple",children:"CommonJS\u6A21\u5757"},"module")}),s.web&&(0,i.jsx)(de.Z,{size:0,children:(0,i.jsx)(ue.Z,{color:"brown",children:"\u7F51\u7EDC\u670D\u52A1"},"web")}),s.cron!=""&&(0,i.jsx)(de.Z,{size:0,children:(0,i.jsx)(ue.Z,{color:"red",children:"\u5B9A\u65F6\u4EFB\u52A1"},s.cron)}),s.encrypt&&(0,i.jsx)(de.Z,{size:0,children:(0,i.jsx)(ue.Z,{color:"orange",children:"\u52A0\u5BC6\u811A\u672C"},"encrypt")}),s.status==2&&(0,i.jsx)(de.Z,{size:0,children:(0,i.jsx)(ue.Z,{color:"green",children:"\u5DF2\u5B89\u88C5"},s.status)}),s.status==1&&(0,i.jsx)(de.Z,{size:0,children:(0,i.jsx)(ue.Z,{color:"pink",children:"\u53EF\u5347\u7EA7"},s.status)})]})},search:!1},actions:{render:function(y,s){return[(0,i.jsx)("a",{onClick:w()(ae()().mark(function z(){var d,I,Z,j;return ae()().wrap(function(h){for(;;)switch(h.prev=h.next){case 0:d=0,I={},h.t0=s.status,h.next=h.t0===0?5:h.t0===1?8:h.t0===6?11:h.t0===2?13:16;break;case 5:return d=2,I["plugins."+s.id]="install",h.abrupt("break",16);case 8:return d=2,I["plugins."+s.id]="install",h.abrupt("break",16);case 11:return h.abrupt("return");case 13:return d=0,I["plugins."+s.id]="",h.abrupt("break",16);case 16:return h.next=18,(0,Ae.Z)(I,"\u6B63\u5728\u5904\u7406\u8BF7\u6C42...","","");case 18:if(Z=h.sent,j=Z==null?void 0:Z.errors["plugins."+s.id],!j){h.next=25;break}return jn.ZP.warning(j,2),h.abrupt("return");case 25:jn.ZP.info("\u5904\u7406\u6210\u529F\u3002",1);case 26:c(l.map(function($){return $.id==s.id&&($.status=d),$})),C();case 28:case"end":return h.stop()}},z)})),target:"_blank",rel:"noopener noreferrer",children:s.status==0?"\u5B89\u88C5":s.status==2?"\u5378\u8F7D":s.status==6?"\u539F\u521B":"\u5347\u7EA7"},"link")]},search:!1}}})})}},87474:function(Rn,Te,r){var We=r(25359),ae=r.n(We),Ne=r(49811),w=r.n(Ne),_=r(21362),$e=r(86195),Ae=function(){var Fe=w()(ae()().mark(function a(g){var se,pe,te,D=arguments;return ae()().wrap(function(N){for(;;)switch(N.prev=N.next){case 0:return se=D.length>1&&D[1]!==void 0?D[1]:"\u6B63\u5728\u63D0\u4EA4\u66F4\u6539..",pe=D.length>2&&D[2]!==void 0?D[2]:"\u63D0\u4EA4\u6210\u529F\uFF01",te=D.length>3&&D[3]!==void 0?D[3]:"\u63D0\u4EA4\u5931\u8D25",se&&_.ZP.loading("\u6B63\u5728\u63D0\u4EA4\u66F4\u6539..",2e4),N.abrupt("return",new Promise(function(x){(0,$e.request)("/api/storage",{method:"put",data:g}).then(function(G){var X;if(_.ZP.destroy(),(G==null||(X=G.data)===null||X===void 0?void 0:X.isLogin)==!1){_.ZP.warning("\u767B\u5F55\u5931\u6548\uFF01",2);var xe=new URL(window.location.href).searchParams,Be=xe.get("redirect");window.location.pathname!=="/user/login"&&!Be&&$e.history.replace({pathname:"/user/login"});return}G!=null&&G.success?pe&&_.ZP.success(pe,1):te&&_.ZP.warning("\u63D0\u4EA4\u5931\u8D25\uFF01",2),x(G)})}));case 5:case"end":return N.stop()}},a)}));return function(g){return Fe.apply(this,arguments)}}();Te.Z=Ae},4050:function(Rn,Te,r){r.d(Te,{Z:function(){return mn}});var We=r(96157),ae=r(84875),Ne=r.n(ae),w=r(50959),_=r(85548),$e=r(78862),Ae=r(70458);function Fe(t){return typeof t!="string"?t:t.charAt(0).toUpperCase()+t.slice(1)}var a=r(49272),g=r(42498),se=r(97624),pe=r(74074);const te=(t,E,b)=>{const u=Fe(b);return{[`${t.componentCls}-${E}`]:{color:t[`color${b}`],background:t[`color${u}Bg`],borderColor:t[`color${u}Border`]}}},D=t=>(0,g.Z)(t,(E,b)=>{let{textColor:u,lightBorderColor:f,lightColor:K,darkColor:O}=b;return{[`${t.componentCls}-${E}`]:{color:u,background:K,borderColor:f,"&-inverse":{color:t.colorTextLightSolid,background:O,borderColor:O},[`&${t.componentCls}-borderless`]:{borderColor:"transparent"}}}}),nn=t=>{const{paddingXXS:E,lineWidth:b,tagPaddingHorizontal:u,componentCls:f}=t,K=u-b,O=E-b;return{[f]:Object.assign(Object.assign({},(0,a.Wf)(t)),{display:"inline-block",height:"auto",marginInlineEnd:t.marginXS,paddingInline:K,fontSize:t.tagFontSize,lineHeight:`${t.tagLineHeight}px`,whiteSpace:"nowrap",background:t.tagDefaultBg,border:`${t.lineWidth}px ${t.lineType} ${t.colorBorder}`,borderRadius:t.borderRadiusSM,opacity:1,transition:`all ${t.motionDurationMid}`,textAlign:"start",[`&${f}-rtl`]:{direction:"rtl"},"&, a, a:hover":{color:t.tagDefaultColor},[`${f}-close-icon`]:{marginInlineStart:O,color:t.colorTextDescription,fontSize:t.tagIconSize,cursor:"pointer",transition:`all ${t.motionDurationMid}`,"&:hover":{color:t.colorTextHeading}},[`&${f}-has-color`]:{borderColor:"transparent",[`&, a, a:hover, ${t.iconCls}-close, ${t.iconCls}-close:hover`]:{color:t.colorTextLightSolid}},["&-checkable"]:{backgroundColor:"transparent",borderColor:"transparent",cursor:"pointer",[`&:not(${f}-checkable-checked):hover`]:{color:t.colorPrimary,backgroundColor:t.colorFillSecondary},"&:active, &-checked":{color:t.colorTextLightSolid},"&-checked":{backgroundColor:t.colorPrimary,"&:hover":{backgroundColor:t.colorPrimaryHover}},"&:active":{backgroundColor:t.colorPrimaryActive}},["&-hidden"]:{display:"none"},[`> ${t.iconCls} + span, > span + ${t.iconCls}`]:{marginInlineStart:K}}),[`${f}-borderless`]:{borderColor:"transparent",background:t.tagBorderlessBg}}};var N=(0,se.Z)("Tag",t=>{const{fontSize:E,lineHeight:b,lineWidth:u,fontSizeIcon:f}=t,K=Math.round(E*b),O=t.fontSizeSM,ce=K-u*2,F=t.colorFillQuaternary,V=t.colorText,L=(0,pe.TS)(t,{tagFontSize:O,tagLineHeight:ce,tagDefaultBg:F,tagDefaultColor:V,tagIconSize:f-2*u,tagPaddingHorizontal:8,tagBorderlessBg:t.colorFillTertiary});return[nn(L),D(L),te(L,"success","Success"),te(L,"processing","Info"),te(L,"error","Error"),te(L,"warning","Warning")]}),x=function(t,E){var b={};for(var u in t)Object.prototype.hasOwnProperty.call(t,u)&&E.indexOf(u)<0&&(b[u]=t[u]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var f=0,u=Object.getOwnPropertySymbols(t);f<u.length;f++)E.indexOf(u[f])<0&&Object.prototype.propertyIsEnumerable.call(t,u[f])&&(b[u[f]]=t[u[f]]);return b},X=t=>{const{prefixCls:E,className:b,checked:u,onChange:f,onClick:K}=t,O=x(t,["prefixCls","className","checked","onChange","onClick"]),{getPrefixCls:ce}=w.useContext(Ae.E_),F=re=>{f==null||f(!u),K==null||K(re)},V=ce("tag",E),[L,Ce]=N(V),Ve=Ne()(V,{[`${V}-checkable`]:!0,[`${V}-checkable-checked`]:u},b,Ce);return L(w.createElement("span",Object.assign({},O,{className:Ve,onClick:F})))},xe=function(t,E){var b={};for(var u in t)Object.prototype.hasOwnProperty.call(t,u)&&E.indexOf(u)<0&&(b[u]=t[u]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var f=0,u=Object.getOwnPropertySymbols(t);f<u.length;f++)E.indexOf(u[f])<0&&Object.prototype.propertyIsEnumerable.call(t,u[f])&&(b[u[f]]=t[u[f]]);return b};const Be=(t,E)=>{const{prefixCls:b,className:u,rootClassName:f,style:K,children:O,icon:ce,color:F,onClose:V,closeIcon:L,closable:Ce=!1,bordered:Ve=!0}=t,re=xe(t,["prefixCls","className","rootClassName","style","children","icon","color","onClose","closeIcon","closable","bordered"]),{getPrefixCls:fn,direction:i}=w.useContext(Ae.E_),[gn,an]=w.useState(!0);w.useEffect(()=>{"visible"in re&&an(re.visible)},[re.visible]);const ke=(0,_.o2)(F)||(0,_.yT)(F),vn=Object.assign({backgroundColor:F&&!ke?F:void 0},K),H=fn("tag",b),[hn,pn]=N(H),xn=Ne()(H,{[`${H}-${F}`]:ke,[`${H}-has-color`]:F&&!ke,[`${H}-hidden`]:!gn,[`${H}-rtl`]:i==="rtl",[`${H}-borderless`]:!Ve},u,f,pn),Ge=Oe=>{Oe.stopPropagation(),V==null||V(Oe),!Oe.defaultPrevented&&an(!1)},Cn=w.useMemo(()=>Ce?L?w.createElement("span",{className:`${H}-close-icon`,onClick:Ge},L):w.createElement(We.Z,{className:`${H}-close-icon`,onClick:Ge}):null,[Ce,L,H,Ge]),yn=typeof re.onClick=="function"||O&&O.type==="a",tn=ce||null,bn=tn?w.createElement(w.Fragment,null,tn,w.createElement("span",null,O)):O,rn=w.createElement("span",Object.assign({},re,{ref:E,className:xn,style:vn}),bn,Cn);return hn(yn?w.createElement($e.Z,null,rn):rn)},De=w.forwardRef(Be);De.CheckableTag=X;var mn=De}}]);
|