👨🏻‍💻👩🏻‍💻 Use Ant Design like a Pro!
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

10 lines
14 KiB

"use strict";(self.webpackChunkant_design_pro=self.webpackChunkant_design_pro||[]).push([[3960],{92933:function(H,E){var n={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z"}},{tag:"path",attrs:{d:"M464 336a48 48 0 1096 0 48 48 0 10-96 0zm72 112h-48c-4.4 0-8 3.6-8 8v272c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V456c0-4.4-3.6-8-8-8z"}}]},name:"info-circle",theme:"outlined"};E.Z=n},37123:function(H,E,n){var i=n(93264),v=n(98787),$=n(79685),C=n(81468),x=n(63342),F=["fieldProps","min","proFieldProps","max"],W=function(c,I){var l=c.fieldProps,m=c.min,O=c.proFieldProps,g=c.max,p=(0,v.Z)(c,F);return(0,x.jsx)(C.Z,(0,i.Z)({valueType:"digit",fieldProps:(0,i.Z)({min:m,max:g},l),ref:I,filedConfig:{defaultProps:{width:"100%"}},proFieldProps:O},p))},z=$.forwardRef(W);E.Z=z},5754:function(H,E,n){var i=n(93264),v=n(98787),$=n(92879),C=n(79685),x=n(77204),F=n(81468),W=n(63342),z=["fieldProps","children","params","proFieldProps","mode","valueEnum","request","showSearch","options"],L=["fieldProps","children","params","proFieldProps","mode","valueEnum","request","options"],c=function(p,_){var Z=p.fieldProps,d=p.children,s=p.params,y=p.proFieldProps,h=p.mode,M=p.valueEnum,T=p.request,D=p.showSearch,b=p.options,j=(0,v.Z)(p,z),A=(0,C.useContext)(x.Z);return(0,W.jsx)(F.Z,(0,i.Z)((0,i.Z)({valueEnum:(0,$.h)(M),request:T,params:s,valueType:"select",filedConfig:{customLightMode:!0},fieldProps:(0,i.Z)({options:b,mode:h,showSearch:D,getPopupContainer:A.getPopupContainer},Z),ref:_,proFieldProps:y},j),{},{children:d}))},I=C.forwardRef(function(g,p){var _=g.fieldProps,Z=g.children,d=g.params,s=g.proFieldProps,y=g.mode,h=g.valueEnum,M=g.request,T=g.options,D=(0,v.Z)(g,L),b=(0,i.Z)({options:T,mode:y||"multiple",labelInValue:!0,showSearch:!0,suffixIcon:null,autoClearSearchValue:!0,optionLabelProp:"label"},_),j=(0,C.useContext)(x.Z);return(0,W.jsx)(F.Z,(0,i.Z)((0,i.Z)({valueEnum:(0,$.h)(h),request:M,params:d,valueType:"select",filedConfig:{customLightMode:!0},fieldProps:(0,i.Z)({getPopupContainer:j.getPopupContainer},b),ref:p,proFieldProps:s},D),{},{children:Z}))}),l=C.forwardRef(c),m=I,O=l;O.SearchSelect=m,O.displayName="ProFormComponent",E.Z=O},30869:function(H,E,n){var i=n(89342),v=n(93264),$=n(98787),C=n(46501),x=n(73952),F=n(8262),W=n(12869),z=n(79685),L=n(81468),c=n(63342),I=["fieldProps","proFieldProps"],l=["fieldProps","proFieldProps"],m="text",O=function(d){var s=d.fieldProps,y=d.proFieldProps,h=(0,$.Z)(d,I);return(0,c.jsx)(L.Z,(0,v.Z)({valueType:m,fieldProps:s,filedConfig:{valueType:m},proFieldProps:y},h))},g=function(d){var s=(0,C.Z)(d.open||!1,{value:d.open,onChange:d.onOpenChange}),y=(0,i.Z)(s,2),h=y[0],M=y[1];return(0,c.jsx)(x.Z.Item,{shouldUpdate:!0,noStyle:!0,children:function(D){var b,j=D.getFieldValue(d.name||[]);return(0,c.jsx)(F.Z,(0,v.Z)((0,v.Z)({getPopupContainer:function(P){return P&&P.parentNode?P.parentNode:P},onOpenChange:M,content:(0,c.jsxs)("div",{style:{padding:"4px 0"},children:[(b=d.statusRender)===null||b===void 0?void 0:b.call(d,j),d.strengthText?(0,c.jsx)("div",{style:{marginTop:10},children:(0,c.jsx)("span",{children:d.strengthText})}):null]}),overlayStyle:{width:240},placement:"right"},d.popoverProps),{},{open:h,children:d.children}))}})},p=function(d){var s=d.fieldProps,y=d.proFieldProps,h=(0,$.Z)(d,l),M=(0,z.useState)(!1),T=(0,i.Z)(M,2),D=T[0],b=T[1];return s!=null&&s.statusRender&&h.name?(0,c.jsx)(g,{name:h.name,statusRender:s==null?void 0:s.statusRender,popoverProps:s==null?void 0:s.popoverProps,strengthText:s==null?void 0:s.strengthText,open:D,onOpenChange:b,children:(0,c.jsx)(L.Z,(0,v.Z)({valueType:"password",fieldProps:(0,v.Z)((0,v.Z)({},(0,W.Z)(s,["statusRender","popoverProps","strengthText"])),{},{onBlur:function(A){var P;s==null||(P=s.onBlur)===null||P===void 0||P.call(s,A),b(!1)},onClick:function(A){var P;s==null||(P=s.onClick)===null||P===void 0||P.call(s,A),b(!0)}}),proFieldProps:y,filedConfig:{valueType:m}},h))}):(0,c.jsx)(L.Z,(0,v.Z)({valueType:"password",fieldProps:s,proFieldProps:y,filedConfig:{valueType:m}},h))},_=O;_.Password=p,_.displayName="ProFormComponent",E.Z=_},18283:function(H,E,n){n.d(E,{Z:function(){return se}});var i=n(79685),v=n(68591),$=n.n(v),C=n(3139),x=n(99248),F=n(73064),W=n(57196),z=n(55095),L=function(e,o){var r={};for(var t in e)Object.prototype.hasOwnProperty.call(e,t)&&o.indexOf(t)<0&&(r[t]=e[t]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var a=0,t=Object.getOwnPropertySymbols(e);a<t.length;a++)o.indexOf(t[a])<0&&Object.prototype.propertyIsEnumerable.call(e,t[a])&&(r[t[a]]=e[t[a]]);return r},I=e=>{var{prefixCls:o,className:r,hoverable:t=!0}=e,a=L(e,["prefixCls","className","hoverable"]);const{getPrefixCls:f}=i.useContext(x.E_),S=f("card",o),K=$()(`${S}-grid`,r,{[`${S}-grid-hoverable`]:t});return i.createElement("div",Object.assign({},a,{className:K}))},l=n(26477),m=n(4614),O=n(44244),g=n(25830);const p=e=>{const{antCls:o,componentCls:r,headerHeight:t,cardPaddingBase:a,tabsMarginBottom:f}=e;return Object.assign(Object.assign({display:"flex",justifyContent:"center",flexDirection:"column",minHeight:t,marginBottom:-1,padding:`0 ${(0,l.bf)(a)}`,color:e.colorTextHeading,fontWeight:e.fontWeightStrong,fontSize:e.headerFontSize,background:e.headerBg,borderBottom:`${(0,l.bf)(e.lineWidth)} ${e.lineType} ${e.colorBorderSecondary}`,borderRadius:`${(0,l.bf)(e.borderRadiusLG)} ${(0,l.bf)(e.borderRadiusLG)} 0 0`},(0,m.dF)()),{"&-wrapper":{width:"100%",display:"flex",alignItems:"center"},"&-title":Object.assign(Object.assign({display:"inline-block",flex:1},m.vS),{[`
> ${r}-typography,
> ${r}-typography-edit-content
`]:{insetInlineStart:0,marginTop:0,marginBottom:0}}),[`${o}-tabs-top`]:{clear:"both",marginBottom:f,color:e.colorText,fontWeight:"normal",fontSize:e.fontSize,"&-bar":{borderBottom:`${(0,l.bf)(e.lineWidth)} ${e.lineType} ${e.colorBorderSecondary}`}}})},_=e=>{const{cardPaddingBase:o,colorBorderSecondary:r,cardShadow:t,lineWidth:a}=e;return{width:"33.33%",padding:o,border:0,borderRadius:0,boxShadow:`
${(0,l.bf)(a)} 0 0 0 ${r},
0 ${(0,l.bf)(a)} 0 0 ${r},
${(0,l.bf)(a)} ${(0,l.bf)(a)} 0 0 ${r},
${(0,l.bf)(a)} 0 0 0 ${r} inset,
0 ${(0,l.bf)(a)} 0 0 ${r} inset;
`,transition:`all ${e.motionDurationMid}`,"&-hoverable:hover":{position:"relative",zIndex:1,boxShadow:t}}},Z=e=>{const{componentCls:o,iconCls:r,actionsLiMargin:t,cardActionsIconSize:a,colorBorderSecondary:f,actionsBg:S}=e;return Object.assign(Object.assign({margin:0,padding:0,listStyle:"none",background:S,borderTop:`${(0,l.bf)(e.lineWidth)} ${e.lineType} ${f}`,display:"flex",borderRadius:`0 0 ${(0,l.bf)(e.borderRadiusLG)} ${(0,l.bf)(e.borderRadiusLG)}`},(0,m.dF)()),{"& > li":{margin:t,color:e.colorTextDescription,textAlign:"center","> span":{position:"relative",display:"block",minWidth:e.calc(e.cardActionsIconSize).mul(2).equal(),fontSize:e.fontSize,lineHeight:e.lineHeight,cursor:"pointer","&:hover":{color:e.colorPrimary,transition:`color ${e.motionDurationMid}`},[`a:not(${o}-btn), > ${r}`]:{display:"inline-block",width:"100%",color:e.colorTextDescription,lineHeight:(0,l.bf)(e.fontHeight),transition:`color ${e.motionDurationMid}`,"&:hover":{color:e.colorPrimary}},[`> ${r}`]:{fontSize:a,lineHeight:(0,l.bf)(e.calc(a).mul(e.lineHeight).equal())}},"&:not(:last-child)":{borderInlineEnd:`${(0,l.bf)(e.lineWidth)} ${e.lineType} ${f}`}}})},d=e=>Object.assign(Object.assign({margin:`${(0,l.bf)(e.calc(e.marginXXS).mul(-1).equal())} 0`,display:"flex"},(0,m.dF)()),{"&-avatar":{paddingInlineEnd:e.padding},"&-detail":{overflow:"hidden",flex:1,"> div:not(:last-child)":{marginBottom:e.marginXS}},"&-title":Object.assign({color:e.colorTextHeading,fontWeight:e.fontWeightStrong,fontSize:e.fontSizeLG},m.vS),"&-description":{color:e.colorTextDescription}}),s=e=>{const{componentCls:o,cardPaddingBase:r,colorFillAlter:t}=e;return{[`${o}-head`]:{padding:`0 ${(0,l.bf)(r)}`,background:t,"&-title":{fontSize:e.fontSize}},[`${o}-body`]:{padding:`${(0,l.bf)(e.padding)} ${(0,l.bf)(r)}`}}},y=e=>{const{componentCls:o}=e;return{overflow:"hidden",[`${o}-body`]:{userSelect:"none"}}},h=e=>{const{antCls:o,componentCls:r,cardShadow:t,cardHeadPadding:a,colorBorderSecondary:f,boxShadowTertiary:S,cardPaddingBase:K,extraColor:B}=e;return{[r]:Object.assign(Object.assign({},(0,m.Wf)(e)),{position:"relative",background:e.colorBgContainer,borderRadius:e.borderRadiusLG,[`&:not(${r}-bordered)`]:{boxShadow:S},[`${r}-head`]:p(e),[`${r}-extra`]:{marginInlineStart:"auto",color:B,fontWeight:"normal",fontSize:e.fontSize},[`${r}-body`]:Object.assign({padding:K,borderRadius:` 0 0 ${(0,l.bf)(e.borderRadiusLG)} ${(0,l.bf)(e.borderRadiusLG)}`},(0,m.dF)()),[`${r}-grid`]:_(e),[`${r}-cover`]:{"> *":{display:"block",width:"100%"},[`img, img + ${o}-image-mask`]:{borderRadius:`${(0,l.bf)(e.borderRadiusLG)} ${(0,l.bf)(e.borderRadiusLG)} 0 0`}},[`${r}-actions`]:Z(e),[`${r}-meta`]:d(e)}),[`${r}-bordered`]:{border:`${(0,l.bf)(e.lineWidth)} ${e.lineType} ${f}`,[`${r}-cover`]:{marginTop:-1,marginInlineStart:-1,marginInlineEnd:-1}},[`${r}-hoverable`]:{cursor:"pointer",transition:`box-shadow ${e.motionDurationMid}, border-color ${e.motionDurationMid}`,"&:hover":{borderColor:"transparent",boxShadow:t}},[`${r}-contain-grid`]:{borderRadius:`${(0,l.bf)(e.borderRadiusLG)} ${(0,l.bf)(e.borderRadiusLG)} 0 0 `,[`${r}-body`]:{display:"flex",flexWrap:"wrap"},[`&:not(${r}-loading) ${r}-body`]:{marginBlockStart:e.calc(e.lineWidth).mul(-1).equal(),marginInlineStart:e.calc(e.lineWidth).mul(-1).equal(),padding:0}},[`${r}-contain-tabs`]:{[`> ${r}-head`]:{minHeight:0,[`${r}-head-title, ${r}-extra`]:{paddingTop:a}}},[`${r}-type-inner`]:s(e),[`${r}-loading`]:y(e),[`${r}-rtl`]:{direction:"rtl"}}},M=e=>{const{componentCls:o,cardPaddingSM:r,headerHeightSM:t,headerFontSizeSM:a}=e;return{[`${o}-small`]:{[`> ${o}-head`]:{minHeight:t,padding:`0 ${(0,l.bf)(r)}`,fontSize:a,[`> ${o}-head-wrapper`]:{[`> ${o}-extra`]:{fontSize:e.fontSize}}},[`> ${o}-body`]:{padding:r}},[`${o}-small${o}-contain-tabs`]:{[`> ${o}-head`]:{[`${o}-head-title, ${o}-extra`]:{paddingTop:0,display:"flex",alignItems:"center"}}}}},T=e=>({headerBg:"transparent",headerFontSize:e.fontSizeLG,headerFontSizeSM:e.fontSize,headerHeight:e.fontSizeLG*e.lineHeightLG+e.padding*2,headerHeightSM:e.fontSize*e.lineHeight+e.paddingXS*2,actionsBg:e.colorBgContainer,actionsLiMargin:`${e.paddingSM}px 0`,tabsMarginBottom:-e.padding-e.lineWidth,extraColor:e.colorText});var D=(0,O.I$)("Card",e=>{const o=(0,g.TS)(e,{cardShadow:e.boxShadowCard,cardHeadPadding:e.padding,cardPaddingBase:e.paddingLG,cardActionsIconSize:e.fontSize,cardPaddingSM:12});return[h(o),M(o)]},T),b=function(e,o){var r={};for(var t in e)Object.prototype.hasOwnProperty.call(e,t)&&o.indexOf(t)<0&&(r[t]=e[t]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var a=0,t=Object.getOwnPropertySymbols(e);a<t.length;a++)o.indexOf(t[a])<0&&Object.prototype.propertyIsEnumerable.call(e,t[a])&&(r[t[a]]=e[t[a]]);return r};const j=e=>{const{prefixCls:o,actions:r=[]}=e;return i.createElement("ul",{className:`${o}-actions`},r.map((t,a)=>{const f=`action-${a}`;return i.createElement("li",{style:{width:`${100/r.length}%`},key:f},i.createElement("span",null,t))}))};var P=i.forwardRef((e,o)=>{const{prefixCls:r,className:t,rootClassName:a,style:f,extra:S,headStyle:K={},bodyStyle:B={},title:G,loading:V,bordered:X=!0,size:J,type:Q,cover:re,actions:ee,tabList:Y,children:q,activeTabKey:te,defaultActiveTabKey:de,tabBarExtraContent:ce,hoverable:pe,tabProps:ue={}}=e,me=b(e,["prefixCls","className","rootClassName","style","extra","headStyle","bodyStyle","title","loading","bordered","size","type","cover","actions","tabList","children","activeTabKey","defaultActiveTabKey","tabBarExtraContent","hoverable","tabProps"]),{getPrefixCls:ge,direction:fe,card:w}=i.useContext(x.E_),ve=N=>{var R;(R=e.onTabChange)===null||R===void 0||R.call(e,N)},he=i.useMemo(()=>{let N=!1;return i.Children.forEach(q,R=>{R&&R.type&&R.type===I&&(N=!0)}),N},[q]),u=ge("card",r),[be,Pe]=D(u),ye=i.createElement(W.Z,{loading:!0,active:!0,paragraph:{rows:4},title:!1},q),ae=te!==void 0,Se=Object.assign(Object.assign({},ue),{[ae?"activeKey":"defaultActiveKey"]:ae?te:de,tabBarExtraContent:ce});let oe;const U=(0,F.Z)(J),$e=!U||U==="default"?"large":U,ne=Y?i.createElement(z.Z,Object.assign({size:$e},Se,{className:`${u}-head-tabs`,onChange:ve,items:Y.map(N=>{var{tab:R}=N,Te=b(N,["tab"]);return Object.assign({label:R},Te)})})):null;(G||S||ne)&&(oe=i.createElement("div",{className:`${u}-head`,style:K},i.createElement("div",{className:`${u}-head-wrapper`},G&&i.createElement("div",{className:`${u}-head-title`},G),S&&i.createElement("div",{className:`${u}-extra`},S)),ne));const Ce=re?i.createElement("div",{className:`${u}-cover`},re):null,xe=i.createElement("div",{className:`${u}-body`,style:B},V?ye:q),Ee=ee&&ee.length?i.createElement(j,{prefixCls:u,actions:ee}):null,Oe=(0,C.Z)(me,["onTabChange"]),_e=$()(u,w==null?void 0:w.className,{[`${u}-loading`]:V,[`${u}-bordered`]:X,[`${u}-hoverable`]:pe,[`${u}-contain-grid`]:he,[`${u}-contain-tabs`]:Y&&Y.length,[`${u}-${U}`]:U,[`${u}-type-${Q}`]:!!Q,[`${u}-rtl`]:fe==="rtl"},t,a,Pe),Me=Object.assign(Object.assign({},w==null?void 0:w.style),f);return be(i.createElement("div",Object.assign({ref:o},Oe,{className:_e,style:Me}),oe,Ce,xe,Ee))}),ie=function(e,o){var r={};for(var t in e)Object.prototype.hasOwnProperty.call(e,t)&&o.indexOf(t)<0&&(r[t]=e[t]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var a=0,t=Object.getOwnPropertySymbols(e);a<t.length;a++)o.indexOf(t[a])<0&&Object.prototype.propertyIsEnumerable.call(e,t[a])&&(r[t[a]]=e[t[a]]);return r},le=e=>{const{prefixCls:o,className:r,avatar:t,title:a,description:f}=e,S=ie(e,["prefixCls","className","avatar","title","description"]),{getPrefixCls:K}=i.useContext(x.E_),B=K("card",o),G=$()(`${B}-meta`,r),V=t?i.createElement("div",{className:`${B}-meta-avatar`},t):null,X=a?i.createElement("div",{className:`${B}-meta-title`},a):null,J=f?i.createElement("div",{className:`${B}-meta-description`},f):null,Q=X||J?i.createElement("div",{className:`${B}-meta-detail`},X,J):null;return i.createElement("div",Object.assign({},S,{className:G}),V,Q)};const k=P;k.Grid=I,k.Meta=le;var se=k}}]);