/* * eiam-console - Employee Identity and Access Management Program * Copyright © 2020-2023 TopIAM (support@topiam.cn) * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Affero General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Affero General Public License for more details. * * You should have received a copy of the GNU Affero General Public License * along with this program. If not, see . */ "use strict";(self.webpackChunktopiam_console=self.webpackChunktopiam_console||[]).push([[87],{91498:function(fn,De,x){x.d(De,{Rs:function(){return vn}});var a=x(4203),u=x(86855),Re=x(5375),$e=x(19904),ke=$e.Z,Ie=x(76505),ze=x(68591),M=x.n(ze),f=x(79685),Ae=x(9645),de=x(98529),Se=x(13648),Ee=x(63908),He=x(7467),Me=x(20815),Oe=x(75204);function Ve(e,n){for(var o=e,r=0;re.length)&&(n=e.length);for(var o=0,r=new Array(n);o0&&ee&&nn({prefixCls:R,hashId:c,expandIcon:Y,onExpand:oe,expanded:H,record:s})]}),(i=z&&(z==null?void 0:z(s,I,ce)))!==null&&i!==void 0?i:ce]}),ve&&(V||ye)&&(0,l.jsxs)("div",{className:"".concat(p,"-content ").concat(c),children:[V,xe&&ee&&(0,l.jsx)("div",{className:d&&d(s,I,A),children:ye})]})]})}));return B?(0,l.jsx)("div",{className:M()(c,(m={},(0,a.Z)(m,"".concat(p,"-card"),B),(0,a.Z)(m,T,T!==C),m)),style:k,children:pe}):pe}var tn=an,on=["dataSource","columns","rowKey","showActions","showExtra","prefixCls","actionRef","itemTitleRender","renderItem","itemCardProps","itemHeaderRender","expandable","rowSelection","pagination","onRow","onItem","rowClassName"];function rn(e){var n=e.dataSource,o=e.columns,r=e.rowKey,i=e.showActions,m=e.showExtra,t=e.prefixCls,h=e.actionRef,b=e.itemTitleRender,N=e.renderItem,c=e.itemCardProps,R=e.itemHeaderRender,C=e.expandable,w=e.rowSelection,y=e.pagination,V=e.onRow,S=e.onItem,q=e.rowClassName,E=(0,Re.Z)(e,on),he=(0,f.useContext)(Se.L_),Ce=he.hashId,$=(0,f.useContext)(Ie.ZP.ConfigContext),B=$.getPrefixCls,P=f.useMemo(function(){return typeof r=="function"?r:function(A,d){return A[r]||d}},[r]),ue=(0,He.Z)(n,"children",P),F=(0,de.Z)(ue,1),I=F[0],me=(0,Me.ZP)(n.length,(0,u.Z)({responsive:!0},y),function(){}),U=(0,de.Z)(me,1),j=U[0],_=f.useMemo(function(){if(y===!1||!j.pageSize||n.length .anticon > svg":{transition:"0.3s"}}),(0,a.Z)(t,"&-expanded",{" > .anticon > svg":{transform:"rotate(90deg)"}}),(0,a.Z)(t,"&-title",{marginInlineEnd:"16px",wordBreak:"break-all",cursor:"pointer","&:hover":{color:n.colorPrimary}}),(0,a.Z)(t,"&-content",{position:"relative",display:"flex",flex:"1",flexDirection:"column",marginBlock:0,marginInline:32}),(0,a.Z)(t,"&-subTitle",{color:"rgba(0, 0, 0, 0.45)"}),(0,a.Z)(t,"&-description",{marginBlockStart:"4px",wordBreak:"break-all"}),(0,a.Z)(t,"&-avatar",{display:"flex"}),(0,a.Z)(t,"&-header",{display:"flex",flex:"1",justifyContent:"flex-start",h4:{margin:0,padding:0}}),(0,a.Z)(t,"&-header-title",{display:"flex",alignItems:"center",justifyContent:"flex-start"}),(0,a.Z)(t,"&-header-option",{display:"flex"}),(0,a.Z)(t,"&-checkbox",{width:"16px",marginInlineEnd:"12px"}),(0,a.Z)(t,"&-no-split",(r={},(0,a.Z)(r,"".concat(n.componentCls,"-row"),{borderBlockEnd:"none"}),(0,a.Z)(r,"".concat(n.antCls,"-list ").concat(n.antCls,"-list-item"),{borderBlockEnd:"none"}),r)),(0,a.Z)(t,"&-bordered",(0,a.Z)({},"".concat(n.componentCls,"-toolbar"),{borderBlockEnd:"1px solid ".concat(n.colorSplit)})),(0,a.Z)(t,"".concat(n.antCls,"-list-vertical"),(i={},(0,a.Z)(i,"".concat(n.componentCls,"-row"),{borderBlockEnd:"12px 18px 12px 24px"}),(0,a.Z)(i,"&-header-title",{display:"flex",flexDirection:"column",alignItems:"flex-start",justifyContent:"center"}),(0,a.Z)(i,"&-content",{marginBlock:0,marginInline:0}),(0,a.Z)(i,"&-subTitle",{marginBlockStart:8}),(0,a.Z)(i,"".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)(i,"".concat(n.antCls,"-list-bordered ").concat(n.antCls,"-list-item"),{paddingInline:0}),(0,a.Z)(i,"".concat(n.componentCls,"-row-show-extra-hover"),(0,a.Z)({},"".concat(n.antCls,"-list-item-extra "),{display:"none"})),i)),(0,a.Z)(t,"".concat(n.antCls,"-list-pagination"),{marginBlockStart:n.margin,marginBlockEnd:n.margin}),(0,a.Z)(t,"".concat(n.antCls,"-list-list"),{"&-item":{cursor:"pointer",paddingBlock:12,paddingInline:12}}),(0,a.Z)(t,"".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"),(m={width:"100%",paddingBlock:12,paddingInlineStart:24,paddingInlineEnd:18},(0,a.Z)(m,"".concat(n.antCls,"-list-item-meta-avatar"),{display:"flex",alignItems:"center",marginInlineEnd:8}),(0,a.Z)(m,"".concat(n.antCls,"-list-item-action-split"),{display:"none"}),(0,a.Z)(m,"".concat(n.antCls,"-list-item-meta-title"),{marginBlock:0,marginInline:0}),m))),t)),h))};function mn(e){return(0,sn.Xj)("ProList",function(n){var o=(0,u.Z)((0,u.Z)({},n),{},{componentCls:".".concat(e)});return[un(o)]})}var xn=["metas","split","footer","rowKey","tooltip","className","options","search","expandable","showActions","showExtra","rowSelection","pagination","itemLayout","renderItem","grid","itemCardProps","onRow","onItem","rowClassName","locale","itemHeaderRender","itemTitleRender"];function Le(e){var n=e.metas,o=e.split,r=e.footer,i=e.rowKey,m=e.tooltip,t=e.className,h=e.options,b=h===void 0?!1:h,N=e.search,c=N===void 0?!1:N,R=e.expandable,C=e.showActions,w=e.showExtra,y=e.rowSelection,V=y===void 0?!1:y,S=e.pagination,q=S===void 0?!1:S,E=e.itemLayout,he=e.renderItem,Ce=e.grid,$=e.itemCardProps,B=e.onRow,P=e.onItem,ue=e.rowClassName,F=e.locale,I=e.itemHeaderRender,me=e.itemTitleRender,U=(0,Re.Z)(e,xn),j=(0,f.useRef)();(0,f.useImperativeHandle)(U.actionRef,function(){return j.current});var _=(0,f.useContext)(Ie.ZP.ConfigContext),J=_.getPrefixCls,ee=(0,f.useMemo)(function(){var T=[];return Object.keys(n||{}).forEach(function(s){var Z=n[s]||{},v=Z.valueType;v||(s==="avatar"&&(v="avatar"),s==="actions"&&(v="option"),s==="description"&&(v="textarea")),T.push((0,u.Z)((0,u.Z)({listKey:s,dataIndex:(Z==null?void 0:Z.dataIndex)||s},Z),{},{valueType:v}))}),T},[n]),O=J("pro-list",e.prefixCls),Q=mn(O),X=Q.wrapSSR,k=Q.hashId,G=M()(O,k,(0,a.Z)({},"".concat(O,"-no-split"),!o));return X((0,l.jsx)(ke,(0,u.Z)((0,u.Z)({tooltip:m},U),{},{actionRef:j,pagination:q,type:"list",rowSelection:V,search:c,options:b,className:M()(O,t,G),columns:ee,rowKey:i,tableViewRender:function(s){var Z=s.columns,v=s.size,z=s.pagination,L=s.rowSelection,ne=s.dataSource,ae=s.loading;return(0,l.jsx)(ln,{grid:Ce,itemCardProps:$,itemTitleRender:me,prefixCls:e.prefixCls,columns:Z,renderItem:he,actionRef:j,dataSource:ne||[],size:v,footer:r,split:o,rowKey:i,expandable:R,rowSelection:V===!1?void 0:L,showActions:C,showExtra:w,pagination:z,itemLayout:E,loading:ae,itemHeaderRender:I,onRow:B,onItem:P,rowClassName:ue,locale:F})}})))}function pn(e){return _jsx(ProConfigProvider,{needDeps:!0,children:_jsx(Le,_objectSpread({cardProps:!1,search:!1,toolBarRender:!1},e))})}function vn(e){return(0,l.jsx)(Se._Y,{needDeps:!0,children:(0,l.jsx)(Le,(0,u.Z)({},e))})}var gn=null}}]);