mirror of https://gitee.com/topiam/eiam
28 lines
11 KiB
JavaScript
28 lines
11 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([[4393],{4393:function(Ia,$,g){g.d($,{Z:function(){return ya}});var d=g(4942),c=g(87462),X=g(97685),J=g(94184),z=g.n(J),Q=g(98423),l=g(67294),B=g(53124),U=g(97647),V=g(21687),Y=g(67875),q=function(e,a){var t={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&a.indexOf(r)<0&&(t[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)a.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(t[r[i]]=e[r[i]]);return t},_=function(a){var t=a.prefixCls,r=a.className,i=a.hoverable,o=i===void 0?!0:i,n=q(a,["prefixCls","className","hoverable"]);return l.createElement(B.C,null,function(v){var f=v.getPrefixCls,m=f("card",t),p=z()(m+"-grid",r,(0,d.Z)({},m+"-grid-hoverable",o));return l.createElement("div",(0,c.Z)({},n,{className:p}))})},O=_,k=g(67968),aa=g(45503),y=g(14747),ea=function(a){var t=a.antCls,r=a.componentCls,i=a.cardHeadHeight,o=a.cardHeadPadding,n=a.cardPaddingBase,v=a.cardHeadTabsMarginBottom;return(0,c.Z)((0,c.Z)({minHeight:i,marginBottom:-1,padding:"0 "+n+"px",color:a.colorTextHeading,fontWeight:a.fontWeightStrong,fontSize:a.fontSizeLG,background:"transparent",borderBottom:a.lineWidth+"px "+a.lineType+" "+a.colorBorderSecondary,borderRadius:a.borderRadiusLG+"px "+a.borderRadiusLG+"px 0 0"},(0,y.dF)()),(0,d.Z)({"&-wrapper":{display:"flex",alignItems:"center"},"&-title":(0,c.Z)((0,c.Z)({display:"inline-block",flex:1,padding:o+"px 0"},y.vS),(0,d.Z)({},`
|
|
> `+r+`-typography,
|
|
> `+r+`-typography-edit-content
|
|
`,{insetInlineStart:0,marginTop:0,marginBottom:0}))},t+"-tabs-top",{clear:"both",marginBottom:v,color:a.colorText,fontWeight:"normal",fontSize:a.fontSize,"&-bar":{borderBottom:a.lineWidth+"px "+a.lineType+" "+a.colorBorderSecondary}}))},ra=function(a){var t=a.cardPaddingBase,r=a.colorBorderSecondary,i=a.cardShadow,o=a.lineWidth;return{width:"33.33%",padding:t,border:0,borderRadius:0,boxShadow:`
|
|
`+o+"px 0 0 0 "+r+`,
|
|
0 `+o+"px 0 0 "+r+`,
|
|
`+o+"px "+o+"px 0 0 "+r+`,
|
|
`+o+"px 0 0 0 "+r+` inset,
|
|
0 `+o+"px 0 0 "+r+` inset;
|
|
`,transition:"all "+a.motionDurationMid,"&-hoverable:hover":{position:"relative",zIndex:1,boxShadow:i}}},ta=function(a){var t,r=a.componentCls,i=a.iconCls,o=a.cardActionsLiMargin,n=a.cardActionsIconSize,v=a.colorBorderSecondary;return(0,c.Z)((0,c.Z)({margin:0,padding:0,listStyle:"none",background:a.colorBgContainer,borderTop:a.lineWidth+"px "+a.lineType+" "+v,display:"flex",borderRadius:"0 0 "+a.borderRadiusLG+"px "+a.borderRadiusLG+"px "},(0,y.dF)()),{"& > li":{margin:o,color:a.colorTextDescription,textAlign:"center","> span":(t={position:"relative",display:"block",minWidth:a.cardActionsIconSize*2,fontSize:a.fontSize,lineHeight:a.lineHeight,cursor:"pointer","&:hover":{color:a.colorPrimary,transition:"color "+a.motionDurationMid}},(0,d.Z)(t,"a:not("+r+"-btn), > "+i,{display:"inline-block",width:"100%",color:a.colorTextDescription,lineHeight:a.fontSize*a.lineHeight+"px",transition:"color "+a.motionDurationMid,"&:hover":{color:a.colorPrimary}}),(0,d.Z)(t,"> "+i,{fontSize:n,lineHeight:n*a.lineHeight+"px"}),t),"&:not(:last-child)":{borderInlineEnd:a.lineWidth+"px "+a.lineType+" "+v}}})},ia=function(a){return(0,c.Z)((0,c.Z)({margin:"-"+a.marginXXS+"px 0",display:"flex"},(0,y.dF)()),{"&-avatar":{paddingInlineEnd:a.padding},"&-detail":{overflow:"hidden",flex:1,"> div:not(:last-child)":{marginBottom:a.marginXS}},"&-title":(0,c.Z)({color:a.colorTextHeading,fontWeight:a.fontWeightStrong,fontSize:a.fontSizeLG},y.vS),"&-description":{color:a.colorTextDescription}})},da=function(a){var t,r=a.componentCls,i=a.cardPaddingBase,o=a.colorFillAlter,n=a.cardInnerHeadPadding;return t={},(0,d.Z)(t,r+"-head",{padding:"0 "+i+"px",background:o,"&-title":{padding:n+"px 0",fontSize:a.fontSize}}),(0,d.Z)(t,r+"-body",{padding:a.padding+"px "+i+"px"}),(0,d.Z)(t,r+"-extra",{padding:n+1.5+"px 0"}),t},na=function(a){var t=a.componentCls;return(0,d.Z)({overflow:"hidden"},t+"-body",{userSelect:"none"})},oa=function(a){var t,r,i,o,n=a.componentCls,v=a.cardShadow,f=a.cardHeadHeight,m=a.cardHeadPadding,p=a.colorBorderSecondary,S=a.boxShadow,b=a.cardPaddingBase;return o={},(0,d.Z)(o,n,(0,c.Z)((0,c.Z)({},(0,y.Wf)(a)),(t={position:"relative",background:a.colorBgContainer,borderRadius:a.borderRadiusLG},(0,d.Z)(t,"&:not("+n+"-bordered)",{boxShadow:S}),(0,d.Z)(t,n+"-head",ea(a)),(0,d.Z)(t,n+"-extra",{marginInlineStart:"auto",padding:"",color:"",fontWeight:"normal",fontSize:a.fontSize}),(0,d.Z)(t,n+"-body",(0,c.Z)({padding:b,borderRadius:" 0 0 "+a.borderRadiusLG+"px "+a.borderRadiusLG+"px"},(0,y.dF)())),(0,d.Z)(t,n+"-grid",ra(a)),(0,d.Z)(t,n+"-cover",{"> *":{display:"block",width:"100%"},img:{borderRadius:a.borderRadiusLG+"px "+a.borderRadiusLG+"px 0 0"}}),(0,d.Z)(t,n+"-actions",ta(a)),(0,d.Z)(t,n+"-meta",ia(a)),t))),(0,d.Z)(o,n+"-bordered",(0,d.Z)({border:a.lineWidth+"px "+a.lineType+" "+p},n+"-cover",{marginTop:-1,marginInlineStart:-1,marginInlineEnd:-1})),(0,d.Z)(o,n+"-hoverable",{cursor:"pointer",transition:"box-shadow "+a.motionDurationMid+", border-color "+a.motionDurationMid,"&:hover":{borderColor:"transparent",boxShadow:v}}),(0,d.Z)(o,n+"-contain-grid",(r={},(0,d.Z)(r,n+"-body",{display:"flex",flexWrap:"wrap"}),(0,d.Z)(r,"&:not("+n+"-loading) "+n+"-body",{marginBlockStart:-a.lineWidth,marginInlineStart:-a.lineWidth,padding:0}),r)),(0,d.Z)(o,n+"-contain-tabs",(0,d.Z)({},"> "+n+"-head",(i={},(0,d.Z)(i,n+"-head-title",{minHeight:f-m,paddingBottom:0}),(0,d.Z)(i,n+"-extra",{paddingBottom:0}),i))),(0,d.Z)(o,n+"-type-inner",da(a)),(0,d.Z)(o,n+"-loading",na(a)),(0,d.Z)(o,n+"-rtl",{direction:"rtl"}),o},la=function(a){var t,r,i=a.componentCls,o=a.cardPaddingSM,n=a.fontSize,v=a.lineHeight,f=a.cardHeaderHeightSM,m=(f-n*v)/2;return(0,d.Z)({},i+"-small",(r={},(0,d.Z)(r,"> "+i+"-head",(0,d.Z)({minHeight:f,padding:"0 "+o+"px",fontSize:a.fontSize},"> "+i+"-head-wrapper",(t={},(0,d.Z)(t,"> "+i+"-head-title",{padding:m+"px 0"}),(0,d.Z)(t,"> "+i+"-extra",{padding:m+"px 0",fontSize:a.fontSize}),t))),(0,d.Z)(r,"> "+i+"-body",{padding:o}),r))},ca=(0,k.Z)("Card",function(e){var a=(0,aa.TS)(e,{cardShadow:e.boxShadowCard,cardHeaderHeight:e.fontSizeLG*e.lineHeightLG+e.padding*2,cardHeaderHeightSM:e.fontSize*e.lineHeight+e.paddingXS*2,cardHeadPadding:e.padding,cardPaddingBase:e.paddingLG,cardHeadTabsMarginBottom:-e.padding-e.lineWidth,cardInnerHeadPadding:e.paddingSM,cardActionsLiMargin:e.paddingSM+"px 0",cardActionsIconSize:e.fontSize,cardPaddingSM:12});return[oa(a),la(a)]}),sa=function(e,a){var t={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&a.indexOf(r)<0&&(t[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)a.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(t[r[i]]=e[r[i]]);return t};function ga(e){var a=e.map(function(t,r){return l.createElement("li",{style:{width:100/e.length+"%"},key:"action-"+r},l.createElement("span",null,t))});return a}var va=l.forwardRef(function(e,a){var t,r,i=l.useContext(B.E_),o=i.getPrefixCls,n=i.direction,v=l.useContext(U.Z),f=function(h){var u;(u=e.onTabChange)===null||u===void 0||u.call(e,h)},m=function(){var h;return l.Children.forEach(e.children,function(u){u&&u.type&&u.type===O&&(h=!0)}),h},p=e.prefixCls,S=e.className,b=e.extra,x=e.headStyle,P=x===void 0?{}:x,H=e.bodyStyle,ba=H===void 0?{}:H,E=e.title,N=e.loading,w=e.bordered,ua=w===void 0?!0:w,Sa=e.size,G=e.type,L=e.cover,M=e.actions,C=e.tabList,I=e.children,A=e.activeTabKey,xa=e.defaultActiveTabKey,Ca=e.tabBarExtraContent,Za=e.hoverable,W=e.tabProps,Pa=W===void 0?{}:W,Ha=sa(e,["prefixCls","className","extra","headStyle","bodyStyle","title","loading","bordered","size","type","cover","actions","tabList","children","activeTabKey","defaultActiveTabKey","tabBarExtraContent","hoverable","tabProps"]),s=o("card",p),za=ca(s),R=(0,X.Z)(za,2),Ba=R[0],Ta=R[1],Ea=l.createElement(V.Z,{loading:!0,active:!0,paragraph:{rows:4},title:!1},I),D=A!==void 0,Ma=(0,c.Z)((0,c.Z)({},Pa),(t={},(0,d.Z)(t,D?"activeKey":"defaultActiveKey",D?A:xa),(0,d.Z)(t,"tabBarExtraContent",Ca),t)),j,K=C&&C.length?l.createElement(Y.Z,(0,c.Z)({size:"large"},Ma,{className:s+"-head-tabs",onChange:f,items:C.map(function(Z){var h;return{label:Z.tab,key:Z.key,disabled:(h=Z.disabled)!==null&&h!==void 0?h:!1}})})):null;(E||b||K)&&(j=l.createElement("div",{className:s+"-head",style:P},l.createElement("div",{className:s+"-head-wrapper"},E&&l.createElement("div",{className:s+"-head-title"},E),b&&l.createElement("div",{className:s+"-extra"},b)),K));var Oa=L?l.createElement("div",{className:s+"-cover"},L):null,Na=l.createElement("div",{className:s+"-body",style:ba},N?Ea:I),wa=M&&M.length?l.createElement("ul",{className:s+"-actions"},ga(M)):null,Ga=(0,Q.Z)(Ha,["onTabChange"]),F=Sa||v,La=z()(s,(r={},(0,d.Z)(r,s+"-loading",N),(0,d.Z)(r,s+"-bordered",ua),(0,d.Z)(r,s+"-hoverable",Za),(0,d.Z)(r,s+"-contain-grid",m()),(0,d.Z)(r,s+"-contain-tabs",C&&C.length),(0,d.Z)(r,s+"-"+F,F),(0,d.Z)(r,s+"-type-"+G,!!G),(0,d.Z)(r,s+"-rtl",n==="rtl"),r),S,Ta);return Ba(l.createElement("div",(0,c.Z)({ref:a},Ga,{className:La}),j,Oa,Na,wa))}),fa=va,ma=function(e,a){var t={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&a.indexOf(r)<0&&(t[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)a.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(t[r[i]]=e[r[i]]);return t},pa=function(a){return l.createElement(B.C,null,function(t){var r=t.getPrefixCls,i=a.prefixCls,o=a.className,n=a.avatar,v=a.title,f=a.description,m=ma(a,["prefixCls","className","avatar","title","description"]),p=r("card",i),S=z()(p+"-meta",o),b=n?l.createElement("div",{className:p+"-meta-avatar"},n):null,x=v?l.createElement("div",{className:p+"-meta-title"},v):null,P=f?l.createElement("div",{className:p+"-meta-description"},f):null,H=x||P?l.createElement("div",{className:p+"-meta-detail"},x,P):null;return l.createElement("div",(0,c.Z)({},m,{className:S}),b,H)})},ha=pa,T=fa;T.Grid=O,T.Meta=ha;var ya=T}}]);
|