mirror of https://gitee.com/topiam/eiam
19 lines
22 KiB
JavaScript
19 lines
22 KiB
JavaScript
/*
|
|
* 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 <http://www.gnu.org/licenses/>.
|
|
*/
|
|
"use strict";(self.webpackChunktopiam_console=self.webpackChunktopiam_console||[]).push([[2845],{64593:function(ce,k,t){t.d(k,{Gh:function(){return K},SC:function(){return B},Zw:function(){return Q},gD:function(){return $},n6:function(){return g},o:function(){return G},pR:function(){return A},rD:function(){return Z}});var Z;(function(r){r.EX900005="EX900005",r.EX000102="EX000102",r.EX000202="EX000202",r.SUCCESS="200"})(Z||(Z={}));var Q;(function(r){r.ALIYUN="aliyun",r.QI_NIU="qiniu",r.TENCENT="tencent",r.NET_EASE="netease",r.MAXMIND="maxmind"})(Q||(Q={}));var g;(function(r){r.ALIYUN="aliyun",r.TENCENT="tencent",r.GEE_TEST="geetest",r.HCAPTCHA="hcaptcha",r.RECAPTCHA="recaptcha"})(g||(g={}));var A;(function(r){r.STANDARD="standard",r.CUSTOM_MADE="custom_made"})(A||(A={}));var $;(function(r){r.SAML2="saml2",r.OIDC="oidc",r.CAS="cas",r.JWT="jwt",r.FORM="form",r.OAUTH2="oauth2"})($||($={}));var K;(function(r){r.ALLOW="ALLOW",r.DENY="DENY"})(K||(K={}));var B;(function(r){r.ROLE="ROLE",r.RESOURCE="RESOURCE",r.USER="USER",r.ORGANIZATION="ORGANIZATION",r.USER_GROUP="USER_GROUP"})(B||(B={}));var G;(function(r){r.PHONE="PHONE",r.USERNAME="USERNAME",r.EMAIL="EMAIL"})(G||(G={}))},38917:function(ce,k,t){t.r(k),t.d(k,{default:function(){return oe}});var Z=t(7863),Q=t.n(Z),g=t(81369),A=t(82925),$=t(78035),K=t(90914),B=t(79685),G=t(53802),r=t(81381),ue=t(93973),te=t(91902),ae=t(74622),y=t(73237),a=t(63342),de=function(f){var m=f.id;(0,B.useEffect)(function(){},[]);var U=[{title:"\u5E94\u7528\u540D\u79F0",ellipsis:!0,search:!1,dataIndex:"appName",fixed:"left"},{title:"\u5BA2\u6237\u7AEFIP",dataIndex:"clientIp",ellipsis:!0,valueType:"text",search:!1,render:function(V,N){return N.clientIp?(0,a.jsx)(r.Z,{status:"success",text:N.clientIp}):(0,a.jsx)(r.Z,{status:"error",text:"\u672A\u77E5"})}},{title:"\u6D4F\u89C8\u5668",dataIndex:"browser",search:!1},{title:"\u5730\u7406\u4F4D\u7F6E",dataIndex:"location",search:!1},{title:"\u767B\u5F55\u65F6\u95F4",dataIndex:"eventTime",sorter:!0,valueType:"dateTime",search:!1},{title:"\u767B\u5F55\u7ED3\u679C",dataIndex:"eventStatus",search:!1,align:"center",render:function(V,N){return(0,a.jsxs)(ue.Z,{children:[N.eventStatus===ae.N.success&&(0,a.jsx)(te.Z,{color:"#87d068",children:"\u6210\u529F"}),N.eventStatus===ae.N.fail&&(0,a.jsx)(te.Z,{color:"#f50",children:"\u5931\u8D25"})]})}}];return(0,a.jsx)(a.Fragment,{children:(0,a.jsx)(G.Z,{columns:U,search:!1,request:y.lu,params:{id:m},pagination:{pageSize:10}})})},re=t(12790),Ae=t(24380),xe=function(f){return(0,a.jsx)(re.Z,{children:(0,a.jsx)(Ae.Z,{style:{backgroundColor:"#f1f1f2",border:"1px solid #f1f1f2"},message:"\u6682\u672A\u5B9E\u73B0"})})},ge=t(84019),I=t.n(ge),fe=t(32061),H=t.n(fe),ne=t(18054),e=t(79696),u=t(86977),i=t(22192),n=t(18477),s=t(63774),l=t(60305),x=t(62119),w=t(15457),b=t(80591),T=t(97207),S=t(39620),P=t.n(S),M=t(47918),_=t(84904),ve=M.ZP.ConfigContext;function me(f){var m=(0,B.useContext)(ve),U=m.getPrefixCls,E=".".concat(U()),V=(0,_.l)(function(N){var X,Y,D,W=N.token;return D={},P()(D,".".concat(f,"-descriptions"),P()({},"".concat(E,"-descriptions-small ").concat(E,"-descriptions-row > th, ").concat(E,"-descriptions-small ").concat(E,"-descriptions-row > td"),{paddingBottom:"16px"})),P()(D,".".concat(f,"-content"),(Y={width:"100%",display:"flex",flexDirection:"row",justifyContent:"space-between",alignItems:"center"},P()(Y,"&-status",{width:"2%",height:"80px",borderRadius:"8px 0 0 8px",background:W.colorSuccess,marginRight:"10px"}),P()(Y,"&-title",(X={width:"63%",display:"flex",flexDirection:"row",alignItems:"center"},P()(X,"&-avatar",{display:"inline-flex",alignItems:"center"}),P()(X,"&-text",{display:"inline-block",paddingLeft:"10px",textAlign:"center",whiteSpace:"nowrap",textOverflow:"ellipsis",overflow:"hidden",fontWeight:"600"}),X)),P()(Y,"&-operate",{width:"35%",textAlign:"center",marginRight:"10px"}),Y)),D});return{className:V}}var se=t(68591),J=t.n(se),le=t(17823),R=t(64593),O="user-detail-info",Ee=function(f){var m=f.userId,U=(0,B.useState)(),E=Q()(U,2),V=E[0],N=E[1],X=(0,B.useState)(),Y=Q()(X,2),D=Y[0],W=Y[1],ee=(0,B.useRef)(),ie=me(O),Ce=ie.className;(0,w.Z)(H()(I()().mark(function L(){var j,o,v;return I()().wrap(function(d){for(;;)switch(d.prev=d.next){case 0:return N(!0),d.next=3,(0,y.PR)(m);case 3:j=d.sent,o=j.result,v=j.success,v&&W(o),N(!1);case 8:case"end":return d.stop()}},L)})),[]);var Ie=[{title:"\u663E\u793A\u540D",dataIndex:"openId",ellipsis:!0,fixed:"left"},{title:"\u8EAB\u4EFD\u63D0\u4F9B\u65B9",dataIndex:"idpName",copyable:!1,search:!1},{title:"\u7ED1\u5B9A\u65F6\u95F4",dataIndex:"bindTime",valueType:"dateTime",copyable:!1,search:!1},{title:"\u64CD\u4F5C",align:"center",valueType:"option",fixed:"right",width:100,render:function(j,o){return[(0,a.jsx)(ne.Z,{title:"\u60A8\u786E\u5B9A\u8981\u89E3\u7ED1\u8BE5\u8D26\u6237\u5417\uFF1F",placement:"bottomRight",icon:(0,a.jsx)(b.Z,{style:{color:"red"}}),onConfirm:H()(I()().mark(function v(){var h;return I()().wrap(function(C){for(;;)switch(C.prev=C.next){case 0:return C.next=2,(0,y.re)(o.id);case 2:(h=ee.current)===null||h===void 0||h.reload();case 3:case"end":return C.stop()}},v)})),okText:"\u662F",cancelText:"\u5426",children:(0,a.jsx)("a",{target:"_blank",style:{color:"red"},children:"\u89E3\u7ED1"},"remove")},"delete")]}}],Qe=function(){var L=H()(I()().mark(function j(o,v){var h,d;return I()().wrap(function(p){for(;;)switch(p.prev=p.next){case 0:return p.next=2,(0,y.Nq)((0,T.omit)(v,"avatar","username","externalId","authTotal","lastAuthIp","lastAuthTime","createTime","updateTime"));case 2:if(h=p.sent,d=h.success,!d){p.next=9;break}return p.next=7,(0,y.PR)(m).then(function(z){var c=z.result;W(c)});case 7:return K.ZP.success("\u4FEE\u6539\u6210\u529F"),p.abrupt("return",Promise.resolve(!0));case 9:return p.abrupt("return",Promise.resolve(!1));case 10:case"end":return p.stop()}},j)}));return function(o,v){return L.apply(this,arguments)}}();return(0,a.jsxs)("div",{className:Ce,children:[(0,a.jsx)(s.Z,{style:{height:"100%"},title:"\u8D26\u6237\u4FE1\u606F",children:(0,a.jsx)(e.Z,{loading:V,active:!0,paragraph:{rows:8},children:(0,a.jsx)("div",{className:J()("".concat(O,"-descriptions")),children:(0,a.jsxs)(l.vY,{size:"small",column:2,dataSource:D,editable:{onSave:Qe},children:[(0,a.jsx)(l.vY.Item,{dataIndex:"avatar",label:"\u5934\u50CF",editable:!1,render:function(j,o){var v;return o!=null&&o.avatar?(0,a.jsx)(u.C,{size:"small",src:(0,a.jsx)(i.Z,{src:o.avatar,fallback:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAMIAAADDCAYAAADQvc6UAAABRWlDQ1BJQ0MgUHJvZmlsZQAAKJFjYGASSSwoyGFhYGDIzSspCnJ3UoiIjFJgf8LAwSDCIMogwMCcmFxc4BgQ4ANUwgCjUcG3awyMIPqyLsis7PPOq3QdDFcvjV3jOD1boQVTPQrgSkktTgbSf4A4LbmgqISBgTEFyFYuLykAsTuAbJEioKOA7DkgdjqEvQHEToKwj4DVhAQ5A9k3gGyB5IxEoBmML4BsnSQk8XQkNtReEOBxcfXxUQg1Mjc0dyHgXNJBSWpFCYh2zi+oLMpMzyhRcASGUqqCZ16yno6CkYGRAQMDKMwhqj/fAIcloxgHQqxAjIHBEugw5sUIsSQpBobtQPdLciLEVJYzMPBHMDBsayhILEqEO4DxG0txmrERhM29nYGBddr//5/DGRjYNRkY/l7////39v///y4Dmn+LgeHANwDrkl1AuO+pmgAAADhlWElmTU0AKgAAAAgAAYdpAAQAAAABAAAAGgAAAAAAAqACAAQAAAABAAAAwqADAAQAAAABAAAAwwAAAAD9b/HnAAAHlklEQVR4Ae3dP3PTWBSGcbGzM6GCKqlIBRV0dHRJFarQ0eUT8LH4BnRU0NHR0UEFVdIlFRV7TzRksomPY8uykTk/zewQfKw/9znv4yvJynLv4uLiV2dBoDiBf4qP3/ARuCRABEFAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghggQAQZQKAnYEaQBAQaASKIAQJEkAEEegJmBElAoBEgghggQAQZQKAnYEa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verticalAlign:"small"},size:"small",children:o==null||(v=o.fullName)===null||v===void 0?void 0:v.substring(0,1).toLocaleUpperCase()})}}),(0,a.jsx)(l.vY.Item,{dataIndex:"username",label:"\u7528\u6237\u540D",editable:!1,copyable:!0}),(0,a.jsx)(l.vY.Item,{dataIndex:"nickName",label:"\u6635\u79F0",formItemProps:{rules:[{required:!0,message:"\u7528\u6237\u6635\u79F0\u4E3A\u5FC5\u586B\u9879"}]}}),(0,a.jsx)(l.vY.Item,{dataIndex:"fullName",label:"\u59D3\u540D",formItemProps:{rules:[{required:!0,message:"\u7528\u6237\u59D3\u540D\u4E3A\u5FC5\u586B\u9879"}]}}),(0,a.jsx)(l.vY.Item,{dataIndex:"status",label:"\u7528\u6237\u72B6\u6001",valueEnum:{enabled:{text:"\u542F\u7528",status:"Success"},disabled:{text:"\u7981\u7528",status:"Error"},locked:{text:"\u9501\u5B9A",status:"Warning"},expired_locked:{text:"\u8FC7\u671F\u9501\u5B9A",status:"Warning",disabled:!0},password_expired_locked:{text:"\u5BC6\u7801\u8FC7\u671F\u9501\u5B9A",status:"Warning",disabled:!0}},formItemProps:{rules:[{required:!0,message:"\u7528\u6237\u72B6\u6001\u4E3A\u5FC5\u9009\u9879"}]}}),(0,a.jsx)(l.vY.Item,{dataIndex:"dataOrigin",label:"\u6570\u636E\u6765\u6E90",valueType:"select",editable:!1,valueEnum:{input:{text:"\u81EA\u5EFA"},dingtalk:{text:"\u9489\u9489\u5BFC\u5165"},wechat:{text:"\u4F01\u4E1A\u5FAE\u4FE1\u5BFC\u5165"},feishu:{text:"\u98DE\u4E66\u5BFC\u5165"},ldap:{text:"LDAP\u5BFC\u5165"}}}),(0,a.jsx)(l.vY.Item,{dataIndex:"id",label:"\u8D26\u6237 ID ",editable:!1,copyable:!0}),(0,a.jsx)(l.vY.Item,{dataIndex:"externalId",label:"\u5916\u90E8 ID ",editable:!1,copyable:!0}),(0,a.jsx)(l.vY.Item,{dataIndex:"phone",label:"\u624B\u673A\u53F7",copyable:!0,formItemProps:{rules:[{pattern:new RegExp(/^1[3-9]\d{9}$/),message:"\u624B\u673A\u53F7\u683C\u5F0F\u4E0D\u6B63\u786E"},{validator:function(){var L=H()(I()().mark(function o(v,h){var d,C,p;return I()().wrap(function(c){for(;;)switch(c.prev=c.next){case 0:if(h){c.next=2;break}return c.abrupt("return",Promise.resolve());case 2:return c.next=4,(0,y.mz)(R.o.PHONE,h,m);case 4:if(d=c.sent,C=d.success,p=d.result,C){c.next=9;break}return c.abrupt("return",Promise.reject());case 9:if(p){c.next=11;break}return c.abrupt("return",Promise.reject(new Error("\u624B\u673A\u53F7\u5DF2\u5B58\u5728")));case 11:case"end":return c.stop()}},o)}));function j(o,v){return L.apply(this,arguments)}return j}(),validateTrigger:["onBlur"]}]}}),(0,a.jsx)(l.vY.Item,{dataIndex:"email",label:"\u90AE\u7BB1",copyable:!0,formItemProps:{rules:[{type:"email",message:"\u90AE\u7BB1\u683C\u5F0F\u4E0D\u6B63\u786E"},{validator:function(){var L=H()(I()().mark(function o(v,h){var d,C,p;return I()().wrap(function(c){for(;;)switch(c.prev=c.next){case 0:if(h){c.next=2;break}return c.abrupt("return",Promise.resolve());case 2:return c.next=4,(0,y.mz)(R.o.EMAIL,h,m);case 4:if(d=c.sent,C=d.success,p=d.result,!(C&&!p)){c.next=9;break}return c.abrupt("return",Promise.reject(new Error("\u90AE\u7BB1\u5DF2\u5B58\u5728")));case 9:case"end":return c.stop()}},o)}));function j(o,v){return L.apply(this,arguments)}return j}(),validateTrigger:["onBlur"]}]}}),(0,a.jsx)(l.vY.Item,{dataIndex:"authTotal",label:"\u8BA4\u8BC1\u6B21\u6570",editable:!1}),(0,a.jsx)(l.vY.Item,{dataIndex:"lastAuthIp",label:"\u6700\u540E\u767B\u5F55 IP ",editable:!1}),(0,a.jsx)(l.vY.Item,{dataIndex:"lastAuthTime",label:"\u6700\u540E\u767B\u5F55\u65F6\u95F4",valueType:"dateTime",editable:!1}),(0,a.jsx)(l.vY.Item,{dataIndex:"expireDate",label:"\u8FC7\u671F\u65F6\u95F4",valueType:"date",formItemProps:{rules:[{required:!0,message:"\u8FC7\u671F\u65F6\u95F4\u4E3A\u5FC5\u586B\u9879"}]}}),(0,a.jsx)(l.vY.Item,{label:"\u521B\u5EFA\u65F6\u95F4",dataIndex:"createTime",editable:!1,valueType:"dateTime"}),(0,a.jsx)(l.vY.Item,{label:"\u4FEE\u6539\u65F6\u95F4",editable:!1,dataIndex:"updateTime",valueType:"dateTime"}),(0,a.jsx)(l.vY.Item,{label:"\u5907\u6CE8",dataIndex:"remark",valueType:"textarea",fieldProps:{placeholder:"\u5907\u6CE8",rows:2,autoComplete:"off",showCount:!0,maxLength:20}})]})})})}),(0,a.jsx)("br",{}),(0,a.jsx)(s.Z,{style:{height:"100%"},title:"\u5DF2\u7ED1\u5B9A\u8D26\u6237",bodyStyle:{padding:20},children:(0,a.jsx)(G.Z,{cardProps:{bodyStyle:{margin:0,padding:0}},search:!1,actionRef:ee,params:{userId:m},pagination:!1,columns:Ie,request:y.Zy,toolbar:{settings:[]}})}),(0,a.jsx)("br",{}),(0,a.jsx)(x.Rs,{pagination:{defaultPageSize:10,showSizeChanger:!1},grid:{xs:1,sm:2,md:2,lg:3,xl:4,xxl:5},itemCardProps:{bodyStyle:{padding:0}},headerTitle:"\u5DF2\u6388\u6743\u5E94\u7528",request:le.Je,params:{subjectId:m,subjectType:R.SC.USER},metas:{content:{search:!1,dataIndex:"remark",render:function(j,o){return(0,a.jsxs)("div",{className:J()("".concat(O,"-content")),children:[(0,a.jsx)("div",{className:J()("".concat(O,"-content-status"))}),(0,a.jsxs)("div",{className:J()("".concat(O,"-content-title")),children:[(0,a.jsx)("div",{className:J()("".concat(O,"-content-title-avatar")),children:(0,a.jsx)(u.C,{src:"https://api.multiavatar.com/c41dd.svg"})}),(0,a.jsx)(n.Z,{title:o.appName,children:(0,a.jsx)("div",{className:J()("".concat(O,"-content-title-text")),children:o.appName})})]}),(0,a.jsx)("div",{className:J()("".concat(O,"-content-operate")),children:(0,a.jsx)(ne.Z,{title:"\u60A8\u786E\u5B9A\u8981\u53D6\u6D88\u5E94\u7528\u6388\u6743\uFF1F",placement:"bottomRight",icon:(0,a.jsx)(b.Z,{style:{color:"red"}}),onConfirm:H()(I()().mark(function v(){var h,d,C;return I()().wrap(function(z){for(;;)switch(z.prev=z.next){case 0:return z.next=2,(0,le.AY)(o.id);case 2:if(h=z.sent,d=h.success,!d){z.next=8;break}return K.ZP.success("\u64CD\u4F5C\u6210\u529F"),(C=ee.current)===null||C===void 0||C.reload(),z.abrupt("return");case 8:case"end":return z.stop()}},v)})),okText:"\u662F",cancelText:"\u5426",children:(0,a.jsx)("a",{target:"_blank",style:{color:"red"},children:"\u53D6\u6D88\u6388\u6743"},"remove")},"delete")})]},o.id)}}}})]})},F;(function(f){f.user_info="user-info",f.permission_info="permission-info",f.login_audit="login-audit"})(F||(F={}));var q=t(65251),he=t(84530),pe=function(){var f=(0,he.useLocation)(),m=q.Z.parse(f.search),U=m,E=U.id,V=m,N=V.tab,X=(0,B.useState)(),Y=Q()(X,2),D=Y[0],W=Y[1];return(0,$.Z)(function(){if(!E){K.ZP.warning("\u672A\u9009\u62E9\u7528\u6237").then(),g.m.push("/account/user");return}if(!N){W(F.user_info),g.m.replace({pathname:f.pathname,search:q.Z.stringify({tab:F.user_info,id:E})});return}W(N)}),(0,a.jsxs)(A._z,{onBack:function(){g.m.push("/account/user")},tabList:[{key:F.user_info,tab:"\u7528\u6237\u4FE1\u606F"},{key:F.permission_info,tab:"\u6743\u9650\u7BA1\u7406"},{key:F.login_audit,tab:"\u767B\u5F55\u65E5\u5FD7"}],tabActiveKey:D,onTabChange:function(ie){W(ie),g.m.replace({pathname:f.pathname,search:q.Z.stringify({tab:ie,id:E})})},children:[F.user_info===D&&(0,a.jsx)(Ee,{userId:E}),F.permission_info===D&&(0,a.jsx)(xe,{id:E}),F.login_audit===D&&(0,a.jsx)(de,{id:E})]})},oe=pe},74622:function(ce,k,t){t.d(k,{F:function(){return Z},N:function(){return Q}});var Z;(function(g){g.admin="admin",g.user="user"})(Z||(Z={}));var Q;(function(g){g.success="success",g.fail="fail"})(Q||(Q={}))},91902:function(ce,k,t){t.d(k,{Z:function(){return ne}});var Z=t(35632),Q=t(68591),g=t.n(Q),A=t(79685),$=t(56865),K=t(78699),B=t(96721),G=t(83396),r=t(42006);function ue(e){return typeof e!="string"?e:e.charAt(0).toUpperCase()+e.slice(1)}var te=t(8336),ae=t(42786);const y=(e,u,i)=>{const n=ue(i);return{[`${e.componentCls}-${u}`]:{color:e[`color${i}`],background:e[`color${n}Bg`],borderColor:e[`color${n}Border`]}}},a=e=>(0,te.j)(e,(u,i)=>{let{textColor:n,lightBorderColor:s,lightColor:l,darkColor:x}=i;return{[`${e.componentCls}-${u}`]:{color:n,background:l,borderColor:s,"&-inverse":{color:e.colorTextLightSolid,background:x,borderColor:x}}}}),de=e=>{const{paddingXXS:u,lineWidth:i,tagPaddingHorizontal:n,componentCls:s}=e,l=n-i,x=u-i;return{[s]:Object.assign(Object.assign({},(0,ae.Wf)(e)),{display:"inline-block",height:"auto",marginInlineEnd:e.marginXS,paddingInline:l,fontSize:e.tagFontSize,lineHeight:`${e.tagLineHeight}px`,whiteSpace:"nowrap",background:e.tagDefaultBg,border:`${e.lineWidth}px ${e.lineType} ${e.colorBorder}`,borderRadius:e.borderRadiusSM,opacity:1,transition:`all ${e.motionDurationMid}`,textAlign:"start",[`&${s}-rtl`]:{direction:"rtl"},"&, a, a:hover":{color:e.tagDefaultColor},[`${s}-close-icon`]:{marginInlineStart:x,color:e.colorTextDescription,fontSize:e.tagIconSize,cursor:"pointer",transition:`all ${e.motionDurationMid}`,"&:hover":{color:e.colorTextHeading}},[`&${s}-has-color`]:{borderColor:"transparent",[`&, a, a:hover, ${e.iconCls}-close, ${e.iconCls}-close:hover`]:{color:e.colorTextLightSolid}},["&-checkable"]:{backgroundColor:"transparent",borderColor:"transparent",cursor:"pointer",[`&:not(${s}-checkable-checked):hover`]:{color:e.colorPrimary,backgroundColor:e.colorFillSecondary},"&:active, &-checked":{color:e.colorTextLightSolid},"&-checked":{backgroundColor:e.colorPrimary,"&:hover":{backgroundColor:e.colorPrimaryHover}},"&:active":{backgroundColor:e.colorPrimaryActive}},["&-hidden"]:{display:"none"},[`> ${e.iconCls} + span, > span + ${e.iconCls}`]:{marginInlineStart:l}})}};var re=(0,G.Z)("Tag",e=>{const{fontSize:u,lineHeight:i,lineWidth:n,fontSizeIcon:s}=e,l=Math.round(u*i),x=e.fontSizeSM,w=l-n*2,b=e.colorFillAlter,T=e.colorText,S=(0,r.TS)(e,{tagFontSize:x,tagLineHeight:w,tagDefaultBg:b,tagDefaultColor:T,tagIconSize:s-2*n,tagPaddingHorizontal:8});return[de(S),a(S),y(S,"success","Success"),y(S,"processing","Info"),y(S,"error","Error"),y(S,"warning","Warning")]}),Ae=function(e,u){var i={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&u.indexOf(n)<0&&(i[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var s=0,n=Object.getOwnPropertySymbols(e);s<n.length;s++)u.indexOf(n[s])<0&&Object.prototype.propertyIsEnumerable.call(e,n[s])&&(i[n[s]]=e[n[s]]);return i},ge=e=>{var{prefixCls:u,className:i,checked:n,onChange:s,onClick:l}=e,x=Ae(e,["prefixCls","className","checked","onChange","onClick"]);const{getPrefixCls:w}=A.useContext($.E_),b=_=>{s==null||s(!n),l==null||l(_)},T=w("tag",u),[S,P]=re(T),M=g()(T,{[`${T}-checkable`]:!0,[`${T}-checkable-checked`]:n},i,P);return S(A.createElement("span",Object.assign({},x,{className:M,onClick:b})))},I=function(e,u){var i={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&u.indexOf(n)<0&&(i[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var s=0,n=Object.getOwnPropertySymbols(e);s<n.length;s++)u.indexOf(n[s])<0&&Object.prototype.propertyIsEnumerable.call(e,n[s])&&(i[n[s]]=e[n[s]]);return i};const fe=(e,u)=>{var{prefixCls:i,className:n,rootClassName:s,style:l,children:x,icon:w,color:b,onClose:T,closeIcon:S,closable:P=!1}=e,M=I(e,["prefixCls","className","rootClassName","style","children","icon","color","onClose","closeIcon","closable"]);const{getPrefixCls:_,direction:ve}=A.useContext($.E_),[me,se]=A.useState(!0);A.useEffect(()=>{"visible"in M&&se(M.visible)},[M.visible]);const J=(0,K.o2)(b)||(0,K.yT)(b),le=Object.assign({backgroundColor:b&&!J?b:void 0},l),R=_("tag",i),[O,Ee]=re(R),F=g()(R,{[`${R}-${b}`]:J,[`${R}-has-color`]:b&&!J,[`${R}-hidden`]:!me,[`${R}-rtl`]:ve==="rtl"},n,s,Ee),q=U=>{U.stopPropagation(),T==null||T(U),!U.defaultPrevented&&se(!1)},he=()=>P?S?A.createElement("span",{className:`${R}-close-icon`,onClick:q},S):A.createElement(Z.Z,{className:`${R}-close-icon`,onClick:q}):null,pe=typeof M.onClick=="function"||x&&x.type==="a",oe=w||null,f=oe?A.createElement(A.Fragment,null,oe,A.createElement("span",null,x)):x,m=A.createElement("span",Object.assign({},M,{ref:u,className:F,style:le}),f,he());return O(pe?A.createElement(B.Z,null,m):m)},H=A.forwardRef(fe);H.CheckableTag=ge;var ne=H}}]);
|