5 lines
23 KiB
JavaScript
5 lines
23 KiB
JavaScript
"use strict";(self.webpackChunkant_design_pro=self.webpackChunkant_design_pro||[]).push([[795],{54572:function(xn,$e,i){i.d($e,{Z:function(){return Ze}});var t=i(45645),f=i(50959),ne={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M168 504.2c1-43.7 10-86.1 26.9-126 17.3-41 42.1-77.7 73.7-109.4S337 212.3 378 195c42.4-17.9 87.4-27 133.9-27s91.5 9.1 133.8 27A341.5 341.5 0 01755 268.8c9.9 9.9 19.2 20.4 27.8 31.4l-60.2 47a8 8 0 003 14.1l175.7 43c5 1.2 9.9-2.6 9.9-7.7l.8-180.9c0-6.7-7.7-10.5-12.9-6.3l-56.4 44.1C765.8 155.1 646.2 92 511.8 92 282.7 92 96.3 275.6 92 503.8a8 8 0 008 8.2h60c4.4 0 7.9-3.5 8-7.8zm756 7.8h-60c-4.4 0-7.9 3.5-8 7.8-1 43.7-10 86.1-26.9 126-17.3 41-42.1 77.8-73.7 109.4A342.45 342.45 0 01512.1 856a342.24 342.24 0 01-243.2-100.8c-9.9-9.9-19.2-20.4-27.8-31.4l60.2-47a8 8 0 00-3-14.1l-175.7-43c-5-1.2-9.9 2.6-9.9 7.7l-.7 181c0 6.7 7.7 10.5 12.9 6.3l56.4-44.1C258.2 868.9 377.8 932 512.2 932c229.2 0 415.5-183.7 419.8-411.8a8 8 0 00-8-8.2z"}}]},name:"sync",theme:"outlined"},S=ne,be=i(26087),ce=function(x,Se){return f.createElement(be.Z,(0,t.Z)((0,t.Z)({},x),{},{ref:Se,icon:S}))},Ze=f.forwardRef(ce)},55147:function(xn,$e,i){i.d($e,{Rs:function(){return Ke}});var t=i(24572),f=i(75782),ne=i(58733),S=i(66922),be=S.Z,ce=i(50554),Ze=i(84875),D=i.n(Ze),x=i(50959),Se=i(49544),se=i(91600),Be=i(35276),de=i(2765),Ae=i(16770),nn=i(27406),Fe=i(29870),tn=i(26916);function pn(e,n){for(var o=e,c=0;c<n.length;c+=1){if(o==null)return;o=o[n[c]]}return o}var an=["title","subTitle","avatar","description","extra","content","actions","type"],on=an.reduce(function(e,n){return e.set(n,!0),e},new Map),rn=i(17539),Ue=i(6471),Xe=i(37454);function a(e,n){return T(e)||u(e,n)||p(e,n)||b()}function b(){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 p(e,n){if(e){if(typeof e=="string")return l(e,n);var o=Object.prototype.toString.call(e).slice(8,-1);if(o==="Object"&&e.constructor&&(o=e.constructor.name),o==="Map"||o==="Set")return Array.from(e);if(o==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(o))return l(e,n)}}function l(e,n){(n==null||n>e.length)&&(n=e.length);for(var o=0,c=new Array(n);o<n;o++)c[o]=e[o];return c}function u(e,n){if(!(typeof Symbol=="undefined"||!(Symbol.iterator in Object(e)))){var o=[],c=!0,s=!1,h=void 0;try{for(var r=e[Symbol.iterator](),w;!(c=(w=r.next()).done)&&(o.push(w.value),!(n&&o.length===n));c=!0);}catch(B){s=!0,h=B}finally{try{!c&&r.return!=null&&r.return()}finally{if(s)throw h}}return o}}function T(e){if(Array.isArray(e))return e}function N(e,n){var o=n||{},c=o.defaultValue,s=o.value,h=o.onChange,r=o.postState,w=x.useState(function(){return s!==void 0?s:c!==void 0?typeof c=="function"?c():c:typeof e=="function"?e():e}),B=a(w,2),W=B[0],m=B[1],A=s!==void 0?s:W;r&&(A=r(A));function I(E){m(E),A!==E&&h&&h(E,A)}var j=x.useRef(!0);return x.useEffect(function(){if(j.current){j.current=!1;return}s===void 0&&m(s)},[s]),[A,I]}var d=i(11527),H=["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 M(e){var n,o=e.prefixCls,c=e.expandIcon,s=c===void 0?(0,d.jsx)(rn.Z,{}):c,h=e.onExpand,r=e.expanded,w=e.record,B=e.hashId,W=s,m="".concat(o,"-row-expand-icon"),A=function(j){h(!r),j.stopPropagation()};return typeof s=="function"&&(W=s({expanded:r,onExpand:h,record:w})),(0,d.jsx)("span",{className:D()(m,B,(n={},(0,t.Z)(n,"".concat(o,"-row-expanded"),r),(0,t.Z)(n,"".concat(o,"-row-collapsed"),!r),n)),onClick:A,children:W})}function $(e){var n,o,c,s,h,r=e.prefixCls,w=(0,x.useContext)(ce.ZP.ConfigContext),B=w.getPrefixCls,W=(0,x.useContext)(Be.L_),m=W.hashId,A=B("pro-list",r),I="".concat(A,"-row"),j=e.title,E=e.subTitle,te=e.content,K=e.itemTitleRender,Ee=e.prefixCls,z=e.actions,Qe=e.item,Je=e.recordKey,Y=e.avatar,U=e.cardProps,L=e.description,ze=e.isEditable,ue=e.checkbox,O=e.index,fe=e.selected,ae=e.loading,oe=e.expand,Q=e.onExpand,re=e.expandable,Re=e.rowSupportExpand,q=e.showActions,me=e.showExtra,ve=e.type,Le=e.style,ge=e.className,P=ge===void 0?I:ge,v=e.record,R=e.onRow,Z=e.onItem,ie=e.itemHeaderRender,X=e.cardActionProps,le=e.extra,xe=(0,ne.Z)(e,H),pe=re||{},Pe=pe.expandedRowRender,Ge=pe.expandIcon,fn=pe.expandRowByClick,_=pe.indentSize,qe=_===void 0?8:_,Ne=pe.expandedRowClassName,k=N(!!oe,{value:oe,onChange:Q}),g=(0,se.Z)(k,2),C=g[0],F=g[1],y=D()((n={},(0,t.Z)(n,"".concat(I,"-selected"),!U&&fe),(0,t.Z)(n,"".concat(I,"-show-action-hover"),q==="hover"),(0,t.Z)(n,"".concat(I,"-type-").concat(ve),!!ve),(0,t.Z)(n,"".concat(I,"-editable"),ze),(0,t.Z)(n,"".concat(I,"-show-extra-hover"),me==="hover"),n),m,I),De=D()(m,(0,t.Z)({},"".concat(P,"-extra"),me==="hover")),je=C||Object.values(re||{}).length===0,he=Pe&&Pe(v,O,qe,C),He=(0,x.useMemo)(function(){if(!(!z||X==="actions"))return[(0,d.jsx)("div",{onClick:function(ee){return ee.stopPropagation()},children:z},"action")]},[z,X]),mn=(0,x.useMemo)(function(){if(!(!z||!X||X==="extra"))return[(0,d.jsx)("div",{className:"".concat(y,"-actions ").concat(m),onClick:function(ee){return ee.stopPropagation()},children:z},"action")]},[z,X,y,m]),Ce=j||E?(0,d.jsxs)("div",{className:"".concat(y,"-header-title ").concat(m),children:[j&&(0,d.jsx)("div",{className:"".concat(y,"-title ").concat(m),children:j}),E&&(0,d.jsx)("div",{className:"".concat(y,"-subTitle ").concat(m),children:E})]}):null,_e=(o=K&&(K==null?void 0:K(v,O,Ce)))!==null&&o!==void 0?o:Ce,Me=_e||Y||E||L?(0,d.jsx)(Ae.ZP.Item.Meta,{avatar:Y,title:_e,description:L&&je&&(0,d.jsx)("div",{className:"".concat(y,"-description ").concat(m),children:L})}):null,J=D()(m,(c={},(0,t.Z)(c,"".concat(y,"-item-has-checkbox"),ue),(0,t.Z)(c,"".concat(y,"-item-has-avatar"),Y),(0,t.Z)(c,y,y),c)),Ve=(0,x.useMemo)(function(){return Y||j?(0,d.jsxs)(d.Fragment,{children:[Y,(0,d.jsx)("span",{className:"".concat(B("list-item-meta-title")," ").concat(m),children:j})]}):null},[Y,B,m,j]),We=U?(0,d.jsx)(Ue.ZP,(0,f.Z)((0,f.Z)((0,f.Z)({bordered:!0,loading:ae,hoverable:!0},U),{},{title:Ve,subTitle:E,extra:He,actions:mn,bodyStyle:(0,f.Z)({padding:24},U.bodyStyle)},Z==null?void 0:Z(v,O)),{},{children:(0,d.jsx)(Xe.Z,{avatar:!0,title:!1,loading:ae,active:!0,children:(0,d.jsxs)("div",{className:"".concat(y,"-header ").concat(m),children:[K&&(K==null?void 0:K(v,O,Ce)),te]})})})):(0,d.jsx)(Ae.ZP.Item,(0,f.Z)((0,f.Z)((0,f.Z)((0,f.Z)({className:D()(J,m,(0,t.Z)({},P,P!==I))},xe),{},{actions:He,extra:!!le&&(0,d.jsx)("div",{className:De,children:le})},R==null?void 0:R(v,O)),Z==null?void 0:Z(v,O)),{},{onClick:function(ee){var ye,vn,en,gn;R==null||(ye=R(v,O))===null||ye===void 0||(vn=ye.onClick)===null||vn===void 0||vn.call(ye,ee),Z==null||(en=Z(v,O))===null||en===void 0||(gn=en.onClick)===null||gn===void 0||gn.call(en,ee),fn&&F(!C)},children:(0,d.jsxs)(Xe.Z,{avatar:!0,title:!1,loading:ae,active:!0,children:[(0,d.jsxs)("div",{className:"".concat(y,"-header ").concat(m),children:[(0,d.jsxs)("div",{className:"".concat(y,"-header-option ").concat(m),children:[!!ue&&(0,d.jsx)("div",{className:"".concat(y,"-checkbox ").concat(m),children:ue}),Object.values(re||{}).length>0&&Re&&M({prefixCls:A,hashId:m,expandIcon:Ge,onExpand:F,expanded:C,record:v})]}),(s=ie&&(ie==null?void 0:ie(v,O,Me)))!==null&&s!==void 0?s:Me]}),je&&(te||he)&&(0,d.jsxs)("div",{className:"".concat(y,"-content ").concat(m),children:[te,Pe&&Re&&(0,d.jsx)("div",{className:Ne&&Ne(v,O,qe),children:he})]})]})}));return U?(0,d.jsx)("div",{className:D()(m,(h={},(0,t.Z)(h,"".concat(y,"-card"),U),(0,t.Z)(h,P,P!==I),h)),style:Le,children:We}):We}var we=$,Ie=i(11817),G=["dataSource","columns","rowKey","showActions","showExtra","prefixCls","actionRef","itemTitleRender","renderItem","itemCardProps","itemHeaderRender","expandable","rowSelection","pagination","onRow","onItem","rowClassName"];function ln(e){var n=e.dataSource,o=e.columns,c=e.rowKey,s=e.showActions,h=e.showExtra,r=e.prefixCls,w=e.actionRef,B=e.itemTitleRender,W=e.renderItem,m=e.itemCardProps,A=e.itemHeaderRender,I=e.expandable,j=e.rowSelection,E=e.pagination,te=e.onRow,K=e.onItem,Ee=e.rowClassName,z=(0,ne.Z)(e,G),Qe=(0,x.useContext)(Be.L_),Je=Qe.hashId,Y=(0,x.useContext)(ce.ZP.ConfigContext),U=Y.getPrefixCls,L=x.useMemo(function(){return typeof c=="function"?c:function(k,g){return k[c]||g}},[c]),ze=(0,nn.Z)(n,"children",L),ue=(0,se.Z)(ze,1),O=ue[0],fe=[function(){},E];(0,Ie.n)(de.Z,"5.3.0")<0&&fe.reverse();var ae=(0,Fe.ZP)(n.length,fe[0],fe[1]),oe=(0,se.Z)(ae,1),Q=oe[0],re=x.useMemo(function(){if(E===!1||!Q.pageSize||n.length<Q.total)return n;var k=Q.current,g=k===void 0?1:k,C=Q.pageSize,F=C===void 0?10:C,y=n.slice((g-1)*F,g*F);return y},[n,Q,E]),Re=U("pro-list",r),q=[{getRowKey:L,getRecordByKey:O,prefixCls:Re,data:n,pageData:re,expandType:"row",childrenColumnName:"children",locale:{}},j];(0,Ie.n)(de.Z,"5.3.0")<0&&q.reverse();var me=tn.ZP.apply(void 0,q),ve=(0,se.Z)(me,2),Le=ve[0],ge=ve[1],P=I||{},v=P.expandedRowKeys,R=P.defaultExpandedRowKeys,Z=P.defaultExpandAllRows,ie=Z===void 0?!0:Z,X=P.onExpand,le=P.onExpandedRowsChange,xe=P.rowExpandable,pe=x.useState(function(){return R||(ie!==!1?n.map(L):[])}),Pe=(0,se.Z)(pe,2),Ge=Pe[0],fn=Pe[1],_=x.useMemo(function(){return new Set(v||Ge||[])},[v,Ge]),qe=x.useCallback(function(k){var g=L(k,n.indexOf(k)),C,F=_.has(g);F?(_.delete(g),C=(0,Se.Z)(_)):C=[].concat((0,Se.Z)(_),[g]),fn(C),X&&X(!F,k),le&&le(C)},[L,_,n,X,le]),Ne=Le([])[0];return(0,d.jsx)(Ae.ZP,(0,f.Z)((0,f.Z)({},z),{},{className:D()(U("pro-list-container",r),Je,z.className),dataSource:re,pagination:E&&Q,renderItem:function(g,C){var F,y,De,je={className:typeof Ee=="function"?Ee(g,C):Ee};o==null||o.forEach(function(J){var Ve=J.listKey,We=J.cardActionProps;if(on.has(Ve)){var Te=J.dataIndex||Ve||J.key,ee=Array.isArray(Te)?pn(g,Te):g[Te];We==="actions"&&Ve==="actions"&&(je.cardActionProps=We);var ye=J.render?J.render(ee,g,C):ee;ye!=="-"&&(je[J.listKey]=ye)}});var he;Ne&&Ne.render&&(he=Ne.render(g,g,C)||void 0);var He=((F=w.current)===null||F===void 0?void 0:F.isEditable((0,f.Z)((0,f.Z)({},g),{},{index:C})))||{},mn=He.isEditable,Ce=He.recordKey,_e=ge.has(Ce||C),Me=(0,d.jsx)(we,(0,f.Z)((0,f.Z)({cardProps:z.grid?(0,f.Z)((0,f.Z)((0,f.Z)({},m),z.grid),{},{checked:_e,onChecked:x.isValidElement(he)?(y=he)===null||y===void 0||(De=y.props)===null||De===void 0?void 0:De.onChange:void 0}):void 0},je),{},{recordKey:Ce,isEditable:mn||!1,expandable:I,expand:_.has(L(g,C)),onExpand:function(){qe(g)},index:C,record:g,item:g,showActions:s,showExtra:h,itemTitleRender:B,itemHeaderRender:A,rowSupportExpand:!xe||xe&&xe(g),selected:ge.has(L(g,C)),checkbox:he,onRow:te,onItem:K}),Ce);return W?W(g,C,Me):Me}}))}var cn=ln,sn=i(28405),ke=i(43447),Oe=new sn.E4("techUiListActive",{"0%":{backgroundColor:"unset"},"30%":{background:"#fefbe6"},"100%":{backgroundColor:"unset"}}),dn=function(n){var o,c,s,h,r,w;return(0,t.Z)({},n.componentCls,(w={backgroundColor:"transparent"},(0,t.Z)(w,"".concat(n.proComponentsCls,"-table-alert"),{marginBlockEnd:"16px"}),(0,t.Z)(w,"&-row",(r={borderBlockEnd:"1px solid ".concat(n.colorSplit)},(0,t.Z)(r,"".concat(n.antCls,"-list-item-meta-title"),{borderBlockEnd:"none",margin:0}),(0,t.Z)(r,"&:last-child",(0,t.Z)({borderBlockEnd:"none"},"".concat(n.antCls,"-list-item"),{borderBlockEnd:"none"})),(0,t.Z)(r,"&:hover",(o={backgroundColor:"rgba(0, 0, 0, 0.02)",transition:"background-color 0.3s"},(0,t.Z)(o,"".concat(n.antCls,"-list-item-action"),{display:"block"}),(0,t.Z)(o,"".concat(n.antCls,"-list-item-extra"),{display:"flex"}),(0,t.Z)(o,"".concat(n.componentCls,"-row-extra"),{display:"block"}),(0,t.Z)(o,"".concat(n.componentCls,"-row-subheader-actions"),{display:"block"}),o)),(0,t.Z)(r,"&-card",(0,t.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,t.Z)(r,"&".concat(n.componentCls,"-row-editable"),(0,t.Z)({},"".concat(n.componentCls,"-list-item"),{"&-meta":{"&-avatar,&-description,&-title":{paddingBlock:6,paddingInline:0}},"&-action":{display:"block"}})),(0,t.Z)(r,"&".concat(n.componentCls,"-row-selected"),{backgroundColor:n.colorPrimaryBgHover,"&:hover":{backgroundColor:n.colorPrimaryBgHover}}),(0,t.Z)(r,"&".concat(n.componentCls,"-row-type-new"),{animationName:Oe,animationDuration:"3s"}),(0,t.Z)(r,"&".concat(n.componentCls,"-row-type-inline"),(0,t.Z)({},"".concat(n.componentCls,"-row-title"),{fontWeight:"normal"})),(0,t.Z)(r,"&".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,t.Z)(r,"&-show-action-hover",(0,t.Z)({},"".concat(n.antCls,`-list-item-action,
|
|
`).concat(n.proComponentsCls,`-card-extra,
|
|
`).concat(n.proComponentsCls,"-card-actions"),{display:"flex"})),(0,t.Z)(r,"&-show-extra-hover",(0,t.Z)({},"".concat(n.antCls,"-list-item-extra"),{display:"none"})),(0,t.Z)(r,"&-extra",{display:"none"}),(0,t.Z)(r,"&-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,t.Z)(r,"&-expand-icon",{marginInlineEnd:8,display:"flex",fontSize:12,cursor:"pointer",height:"24px",marginRight:4,color:n.colorTextSecondary,"> .anticon > svg":{transition:"0.3s"}}),(0,t.Z)(r,"&-expanded",{" > .anticon > svg":{transform:"rotate(90deg)"}}),(0,t.Z)(r,"&-title",{marginInlineEnd:"16px",wordBreak:"break-all",cursor:"pointer","&:hover":{color:n.colorPrimary}}),(0,t.Z)(r,"&-content",{position:"relative",display:"flex",flex:"1",flexDirection:"column",marginBlock:0,marginInline:32}),(0,t.Z)(r,"&-subTitle",{color:"rgba(0, 0, 0, 0.45)"}),(0,t.Z)(r,"&-description",{marginBlockStart:"4px",wordBreak:"break-all"}),(0,t.Z)(r,"&-avatar",{display:"flex"}),(0,t.Z)(r,"&-header",{display:"flex",flex:"1",justifyContent:"flex-start",h4:{margin:0,padding:0}}),(0,t.Z)(r,"&-header-title",{display:"flex",alignItems:"center",justifyContent:"flex-start"}),(0,t.Z)(r,"&-header-option",{display:"flex"}),(0,t.Z)(r,"&-checkbox",{width:"16px",marginInlineEnd:"12px"}),(0,t.Z)(r,"&-no-split",(c={},(0,t.Z)(c,"".concat(n.componentCls,"-row"),{borderBlockEnd:"none"}),(0,t.Z)(c,"".concat(n.antCls,"-list ").concat(n.antCls,"-list-item"),{borderBlockEnd:"none"}),c)),(0,t.Z)(r,"&-bordered",(0,t.Z)({},"".concat(n.componentCls,"-toolbar"),{borderBlockEnd:"1px solid ".concat(n.colorSplit)})),(0,t.Z)(r,"".concat(n.antCls,"-list-vertical"),(s={},(0,t.Z)(s,"".concat(n.componentCls,"-row"),{borderBlockEnd:"12px 18px 12px 24px"}),(0,t.Z)(s,"&-header-title",{display:"flex",flexDirection:"column",alignItems:"flex-start",justifyContent:"center"}),(0,t.Z)(s,"&-content",{marginBlock:0,marginInline:0}),(0,t.Z)(s,"&-subTitle",{marginBlockStart:8}),(0,t.Z)(s,"".concat(n.antCls,"-list-item-extra"),(0,t.Z)({display:"flex",alignItems:"center",marginInlineStart:"32px"},"".concat(n.componentCls,"-row-description"),{marginBlockStart:16})),(0,t.Z)(s,"".concat(n.antCls,"-list-bordered ").concat(n.antCls,"-list-item"),{paddingInline:0}),(0,t.Z)(s,"".concat(n.componentCls,"-row-show-extra-hover"),(0,t.Z)({},"".concat(n.antCls,"-list-item-extra "),{display:"none"})),s)),(0,t.Z)(r,"".concat(n.antCls,"-list-pagination"),{marginBlockStart:n.margin,marginBlockEnd:n.margin}),(0,t.Z)(r,"".concat(n.antCls,"-list-list"),{"&-item":{cursor:"pointer",paddingBlock:12,paddingInline:12}}),(0,t.Z)(r,"".concat(n.antCls,"-list-vertical ").concat(n.proComponentsCls,"-list-row"),(0,t.Z)({"&-header":{paddingBlock:0,paddingInline:0,borderBlockEnd:"none"}},"".concat(n.antCls,"-list-item"),(h={width:"100%",paddingBlock:12,paddingInlineStart:24,paddingInlineEnd:18},(0,t.Z)(h,"".concat(n.antCls,"-list-item-meta-avatar"),{display:"flex",alignItems:"center",marginInlineEnd:8}),(0,t.Z)(h,"".concat(n.antCls,"-list-item-action-split"),{display:"none"}),(0,t.Z)(h,"".concat(n.antCls,"-list-item-meta-title"),{marginBlock:0,marginInline:0}),h))),r)),w))};function V(e){return(0,ke.Xj)("ProList",function(n){var o=(0,f.Z)((0,f.Z)({},n),{},{componentCls:".".concat(e)});return[dn(o)]})}var un=["metas","split","footer","rowKey","tooltip","className","options","search","expandable","showActions","showExtra","rowSelection","pagination","itemLayout","renderItem","grid","itemCardProps","onRow","onItem","rowClassName","locale","itemHeaderRender","itemTitleRender"];function Ye(e){var n=e.metas,o=e.split,c=e.footer,s=e.rowKey,h=e.tooltip,r=e.className,w=e.options,B=w===void 0?!1:w,W=e.search,m=W===void 0?!1:W,A=e.expandable,I=e.showActions,j=e.showExtra,E=e.rowSelection,te=E===void 0?!1:E,K=e.pagination,Ee=K===void 0?!1:K,z=e.itemLayout,Qe=e.renderItem,Je=e.grid,Y=e.itemCardProps,U=e.onRow,L=e.onItem,ze=e.rowClassName,ue=e.locale,O=e.itemHeaderRender,fe=e.itemTitleRender,ae=(0,ne.Z)(e,un),oe=(0,x.useRef)();(0,x.useImperativeHandle)(ae.actionRef,function(){return oe.current});var Q=(0,x.useContext)(ce.ZP.ConfigContext),re=Q.getPrefixCls,Re=(0,x.useMemo)(function(){var P=[];return Object.keys(n||{}).forEach(function(v){var R=n[v]||{},Z=R.valueType;Z||(v==="avatar"&&(Z="avatar"),v==="actions"&&(Z="option"),v==="description"&&(Z="textarea")),P.push((0,f.Z)((0,f.Z)({listKey:v,dataIndex:(R==null?void 0:R.dataIndex)||v},R),{},{valueType:Z}))}),P},[n]),q=re("pro-list",e.prefixCls),me=V(q),ve=me.wrapSSR,Le=me.hashId,ge=D()(q,Le,(0,t.Z)({},"".concat(q,"-no-split"),!o));return ve((0,d.jsx)(be,(0,f.Z)((0,f.Z)({tooltip:h},ae),{},{actionRef:oe,pagination:Ee,type:"list",rowSelection:te,search:m,options:B,className:D()(q,r,ge),columns:Re,rowKey:s,tableViewRender:function(v){var R=v.columns,Z=v.size,ie=v.pagination,X=v.rowSelection,le=v.dataSource,xe=v.loading;return(0,d.jsx)(cn,{grid:Je,itemCardProps:Y,itemTitleRender:fe,prefixCls:e.prefixCls,columns:R,renderItem:Qe,actionRef:oe,dataSource:le||[],size:Z,footer:c,split:o,rowKey:s,expandable:A,rowSelection:te===!1?void 0:X,showActions:I,showExtra:j,pagination:ie,itemLayout:z,loading:xe,itemHeaderRender:O,onRow:U,onItem:L,rowClassName:ze,locale:ue})}})))}function hn(e){return _jsx(ProConfigProvider,{needDeps:!0,children:_jsx(Ye,_objectSpread({cardProps:!1,search:!1,toolBarRender:!1},e))})}function Ke(e){return(0,d.jsx)(Be._Y,{needDeps:!0,children:(0,d.jsx)(Ye,(0,f.Z)({},e))})}var Cn=null},4050:function(xn,$e,i){i.d($e,{Z:function(){return Xe}});var t=i(96157),f=i(84875),ne=i.n(f),S=i(50959),be=i(85548),ce=i(78862),Ze=i(70458);function D(a){return typeof a!="string"?a:a.charAt(0).toUpperCase()+a.slice(1)}var x=i(49272),Se=i(42498),se=i(97624),Be=i(74074);const de=(a,b,p)=>{const l=D(p);return{[`${a.componentCls}-${b}`]:{color:a[`color${p}`],background:a[`color${l}Bg`],borderColor:a[`color${l}Border`]}}},Ae=a=>(0,Se.Z)(a,(b,p)=>{let{textColor:l,lightBorderColor:u,lightColor:T,darkColor:N}=p;return{[`${a.componentCls}-${b}`]:{color:l,background:T,borderColor:u,"&-inverse":{color:a.colorTextLightSolid,background:N,borderColor:N},[`&${a.componentCls}-borderless`]:{borderColor:"transparent"}}}}),nn=a=>{const{paddingXXS:b,lineWidth:p,tagPaddingHorizontal:l,componentCls:u}=a,T=l-p,N=b-p;return{[u]:Object.assign(Object.assign({},(0,x.Wf)(a)),{display:"inline-block",height:"auto",marginInlineEnd:a.marginXS,paddingInline:T,fontSize:a.tagFontSize,lineHeight:`${a.tagLineHeight}px`,whiteSpace:"nowrap",background:a.tagDefaultBg,border:`${a.lineWidth}px ${a.lineType} ${a.colorBorder}`,borderRadius:a.borderRadiusSM,opacity:1,transition:`all ${a.motionDurationMid}`,textAlign:"start",[`&${u}-rtl`]:{direction:"rtl"},"&, a, a:hover":{color:a.tagDefaultColor},[`${u}-close-icon`]:{marginInlineStart:N,color:a.colorTextDescription,fontSize:a.tagIconSize,cursor:"pointer",transition:`all ${a.motionDurationMid}`,"&:hover":{color:a.colorTextHeading}},[`&${u}-has-color`]:{borderColor:"transparent",[`&, a, a:hover, ${a.iconCls}-close, ${a.iconCls}-close:hover`]:{color:a.colorTextLightSolid}},["&-checkable"]:{backgroundColor:"transparent",borderColor:"transparent",cursor:"pointer",[`&:not(${u}-checkable-checked):hover`]:{color:a.colorPrimary,backgroundColor:a.colorFillSecondary},"&:active, &-checked":{color:a.colorTextLightSolid},"&-checked":{backgroundColor:a.colorPrimary,"&:hover":{backgroundColor:a.colorPrimaryHover}},"&:active":{backgroundColor:a.colorPrimaryActive}},["&-hidden"]:{display:"none"},[`> ${a.iconCls} + span, > span + ${a.iconCls}`]:{marginInlineStart:T}}),[`${u}-borderless`]:{borderColor:"transparent",background:a.tagBorderlessBg}}};var Fe=(0,se.Z)("Tag",a=>{const{fontSize:b,lineHeight:p,lineWidth:l,fontSizeIcon:u}=a,T=Math.round(b*p),N=a.fontSizeSM,d=T-l*2,H=a.colorFillQuaternary,M=a.colorText,$=(0,Be.TS)(a,{tagFontSize:N,tagLineHeight:d,tagDefaultBg:H,tagDefaultColor:M,tagIconSize:u-2*l,tagPaddingHorizontal:8,tagBorderlessBg:a.colorFillTertiary});return[nn($),Ae($),de($,"success","Success"),de($,"processing","Info"),de($,"error","Error"),de($,"warning","Warning")]}),tn=function(a,b){var p={};for(var l in a)Object.prototype.hasOwnProperty.call(a,l)&&b.indexOf(l)<0&&(p[l]=a[l]);if(a!=null&&typeof Object.getOwnPropertySymbols=="function")for(var u=0,l=Object.getOwnPropertySymbols(a);u<l.length;u++)b.indexOf(l[u])<0&&Object.prototype.propertyIsEnumerable.call(a,l[u])&&(p[l[u]]=a[l[u]]);return p},an=a=>{const{prefixCls:b,className:p,checked:l,onChange:u,onClick:T}=a,N=tn(a,["prefixCls","className","checked","onChange","onClick"]),{getPrefixCls:d}=S.useContext(Ze.E_),H=G=>{u==null||u(!l),T==null||T(G)},M=d("tag",b),[$,we]=Fe(M),Ie=ne()(M,{[`${M}-checkable`]:!0,[`${M}-checkable-checked`]:l},p,we);return $(S.createElement("span",Object.assign({},N,{className:Ie,onClick:H})))},on=function(a,b){var p={};for(var l in a)Object.prototype.hasOwnProperty.call(a,l)&&b.indexOf(l)<0&&(p[l]=a[l]);if(a!=null&&typeof Object.getOwnPropertySymbols=="function")for(var u=0,l=Object.getOwnPropertySymbols(a);u<l.length;u++)b.indexOf(l[u])<0&&Object.prototype.propertyIsEnumerable.call(a,l[u])&&(p[l[u]]=a[l[u]]);return p};const rn=(a,b)=>{const{prefixCls:p,className:l,rootClassName:u,style:T,children:N,icon:d,color:H,onClose:M,closeIcon:$,closable:we=!1,bordered:Ie=!0}=a,G=on(a,["prefixCls","className","rootClassName","style","children","icon","color","onClose","closeIcon","closable","bordered"]),{getPrefixCls:ln,direction:cn}=S.useContext(Ze.E_),[sn,ke]=S.useState(!0);S.useEffect(()=>{"visible"in G&&ke(G.visible)},[G.visible]);const Oe=(0,be.o2)(H)||(0,be.yT)(H),dn=Object.assign({backgroundColor:H&&!Oe?H:void 0},T),V=ln("tag",p),[un,Ye]=Fe(V),hn=ne()(V,{[`${V}-${H}`]:Oe,[`${V}-has-color`]:H&&!Oe,[`${V}-hidden`]:!sn,[`${V}-rtl`]:cn==="rtl",[`${V}-borderless`]:!Ie},l,u,Ye),Ke=s=>{s.stopPropagation(),M==null||M(s),!s.defaultPrevented&&ke(!1)},Cn=S.useMemo(()=>we?$?S.createElement("span",{className:`${V}-close-icon`,onClick:Ke},$):S.createElement(t.Z,{className:`${V}-close-icon`,onClick:Ke}):null,[we,$,V,Ke]),e=typeof G.onClick=="function"||N&&N.type==="a",n=d||null,o=n?S.createElement(S.Fragment,null,n,S.createElement("span",null,N)):N,c=S.createElement("span",Object.assign({},G,{ref:b,className:hn,style:dn}),o,Cn);return un(e?S.createElement(ce.Z,null,c):c)},Ue=S.forwardRef(rn);Ue.CheckableTag=an;var Xe=Ue}}]);
|