|
- (self.webpackChunkant_design_pro=self.webpackChunkant_design_pro||[]).push([[7751],{64893:function(ce,J,e){"use strict";e.d(J,{G:function(){return C}});var P=e(96156),R=e(28481),o=e(28991),B=e(81253),S=e(85893),G=["colon","dependencies","extra","getValueFromEvent","getValueProps","hasFeedback","help","htmlFor","initialValue","noStyle","label","labelAlign","labelCol","name","preserve","normalize","required","rules","shouldUpdate","trigger","validateFirst","validateStatus","validateTrigger","valuePropName","wrapperCol","hidden","addonBefore","addonAfter"];function U(O){var g={};return G.forEach(function(Z){O[Z]!==void 0&&(g[Z]=O[Z])}),g}var V=e(51812),E=e(26369),v=e(60249),j=e(94184),T=e.n(j),ee=e(48526),c=e(80334),n=e(67294),l=e(30939),Q=e(82785),oe=e(97462),ne=e(66758),$=e(2514),_=["valueType","customLightMode","lightFilterLabelFormatter","valuePropName","ignoreWidth","defaultProps"],N=["label","tooltip","placeholder","width","bordered","messageVariables","ignoreFormItem","transform","convertValue","readonly","allowClear","colSize","getFormItemProps","getFieldProps","filedConfig","cacheForSwr","proFieldProps"],ae=Symbol("ProFormComponent"),H={xs:104,s:216,sm:216,m:328,md:328,l:440,lg:440,xl:552},I=["switch","radioButton","radio","rate"];function C(O,g){O.displayName="ProFormComponent";var Z=function(i){var a=(0,o.Z)((0,o.Z)({},i==null?void 0:i.filedConfig),g)||{},r=a.valueType,s=a.customLightMode,t=a.lightFilterLabelFormatter,f=a.valuePropName,y=f===void 0?"value":f,D=a.ignoreWidth,L=a.defaultProps,A=(0,B.Z)(a,_),d=(0,o.Z)((0,o.Z)({},L),i),h=d.label,de=d.tooltip,ue=d.placeholder,z=d.width,ve=d.bordered,Pe=d.messageVariables,ie=d.ignoreFormItem,me=d.transform,Ce=d.convertValue,fe=d.readonly,Y=d.allowClear,Ie=d.colSize,k=d.getFormItemProps,q=d.getFieldProps,De=d.filedConfig,he=d.cacheForSwr,M=d.proFieldProps,m=(0,B.Z)(d,N),se=r||m.valueType,F=(0,n.useMemo)(function(){return D||I.includes(se)},[D,se]),ge=(0,n.useState)(),ye=(0,R.Z)(ge,2),Fe=ye[1],Ee=(0,n.useState)(),pe=(0,R.Z)(Ee,2),Ze=pe[0],Me=pe[1],W=n.useContext(ne.Z),K=(0,n.useMemo)(function(){return{formItemProps:k==null?void 0:k(),fieldProps:q==null?void 0:q()}},[q,k,m.dependenciesValues,Ze]),u=(0,n.useMemo)(function(){var p=(0,o.Z)((0,o.Z)((0,o.Z)((0,o.Z)({},ie?(0,V.Z)({value:m.value}):{}),{},{placeholder:ue,disabled:i.disabled},W.fieldProps),K.fieldProps),m.fieldProps);return p.style=(0,V.Z)(p==null?void 0:p.style),p},[ie,m.value,m.fieldProps,ue,i.disabled,W.fieldProps,K.fieldProps]),xe=U(m),Se=(0,n.useMemo)(function(){return(0,o.Z)((0,o.Z)((0,o.Z)((0,o.Z)({},W.formItemProps),xe),K.formItemProps),m.formItemProps)},[K.formItemProps,W.formItemProps,m.formItemProps,xe]),b=(0,n.useMemo)(function(){return(0,o.Z)((0,o.Z)({messageVariables:Pe},A),Se)},[A,Se,Pe]);(0,c.ET)(!m.defaultValue,"\u8BF7\u4E0D\u8981\u5728 Form \u4E2D\u4F7F\u7528 defaultXXX\u3002\u5982\u679C\u9700\u8981\u9ED8\u8BA4\u503C\u8BF7\u4F7F\u7528 initialValues \u548C initialValue\u3002");var Be=(0,n.useContext)(ee.FieldContext),Oe=Be.prefixName,Te=(0,n.useMemo)(function(){var p,x=b==null?void 0:b.name;Array.isArray(x)&&(x=x.join("_")),Array.isArray(Oe)&&x&&(x="".concat(Oe.join("."),".").concat(x));var te=x&&"form-".concat((p=W.formKey)!==null&&p!==void 0?p:"","-field-").concat(x);return te},[(0,l.P)(b==null?void 0:b.name),Oe,W.formKey]),Ue=(0,E.Z)(m),Ne=(0,n.useCallback)(function(){var p;k||q?Me([]):m.renderFormItem&&Fe([]);for(var x=arguments.length,te=new Array(x),le=0;le<x;le++)te[le]=arguments[le];u==null||(p=u.onChange)===null||p===void 0||p.call.apply(p,[u].concat(te))},[q,k,u,m.renderFormItem]),Le=(0,n.useMemo)(function(){var p=(0,o.Z)({width:z&&!H[z]?z:W.grid?"100%":void 0},u==null?void 0:u.style);return F&&Reflect.deleteProperty(p,"width"),(0,V.Z)(p)},[(0,l.P)(u==null?void 0:u.style),W.grid,F,z]),Ae=(0,n.useMemo)(function(){var p=z&&H[z];return T()(u==null?void 0:u.className,(0,P.Z)({"pro-field":p},"pro-field-".concat(z),p&&!F))||void 0},[z,u==null?void 0:u.className,F]),We=(0,n.useMemo)(function(){return(0,V.Z)((0,o.Z)({mode:m==null?void 0:m.mode,readonly:fe,params:m.params,proFieldKey:Te,cacheForSwr:he},M))},[m==null?void 0:m.mode,m.params,fe,Te,he,M]),Re=(0,n.useMemo)(function(){return(0,o.Z)((0,o.Z)({onChange:Ne,allowClear:Y},u),{},{style:Le,className:Ae})},[Y,Ae,Ne,u,Le]),re=(0,n.useMemo)(function(){return(0,S.jsx)(O,(0,o.Z)((0,o.Z)({},m),{},{fieldProps:Re,proFieldProps:We,ref:i==null?void 0:i.fieldRef}),i.proFormFieldKey||i.name)},[We,Re,(0,v.Z)(Ue,m,["onChange","onBlur","onFocus","record"])?void 0:{}]),Ke=(0,n.useMemo)(function(){var p,x,te,le;return(0,S.jsx)(Q.Z,(0,o.Z)((0,o.Z)({label:h&&(M==null?void 0:M.light)!==!0?h:void 0,tooltip:(M==null?void 0:M.light)!==!0&&de,valuePropName:y},b),{},{ignoreFormItem:ie,transform:me,dataFormat:u==null?void 0:u.format,valueType:se,messageVariables:(0,o.Z)({label:h||""},b==null?void 0:b.messageVariables),convertValue:Ce,lightProps:(0,V.Z)((0,o.Z)((0,o.Z)((0,o.Z)({},u),{},{valueType:se,bordered:ve,allowClear:(p=re==null||(x=re.props)===null||x===void 0?void 0:x.allowClear)!==null&&p!==void 0?p:Y,light:M==null?void 0:M.light,label:h,customLightMode:s,labelFormatter:t,valuePropName:y,footerRender:re==null||(te=re.props)===null||te===void 0?void 0:te.footerRender},m.lightProps),b.lightProps)),children:re}),i.proFormFieldKey||((le=b.name)===null||le===void 0?void 0:le.toString()))},[h,M==null?void 0:M.light,de,y,i.proFormFieldKey,b,ie,me,u,se,Ce,ve,re,Y,s,t,m.lightProps]),be=(0,$.zx)(m),Ve=be.ColWrapper;return(0,S.jsx)(Ve,{children:Ke})},w=function(i){var a=i.dependencies;return a?(0,S.jsx)(oe.Z,{name:a,children:function(s){return(0,S.jsx)(Z,(0,o.Z)({dependenciesValues:s,dependencies:a},i))}}):(0,S.jsx)(Z,(0,o.Z)({dependencies:a},i))};return w}},97462:function(ce,J,e){"use strict";var P=e(28991),R=e(9715),o=e(55843),B=e(81253),S=e(85893),G=e(41036),U=e(60249),V=e(92210),E=e(88306),v=e(8880),j=e(67294),T=e(59962),ee=["name","children","ignoreFormListField"],c=function(l){var Q=l.name,oe=l.children,ne=l.ignoreFormListField,$=(0,B.Z)(l,ee),_=(0,j.useContext)(G.Z),N=(0,j.useContext)(T.J),ae=(0,j.useMemo)(function(){return Q.map(function(H){var I,C=[H];return!ne&&N.name!==void 0&&((I=N.listName)===null||I===void 0?void 0:I.length)&&C.unshift(N.listName),C.flat(1)})},[N.listName,N.name,ne,Q]);return(0,S.jsx)(o.Z.Item,(0,P.Z)((0,P.Z)({},$),{},{noStyle:!0,shouldUpdate:function(I,C,O){if(typeof $.shouldUpdate=="boolean")return $.shouldUpdate;if(typeof $.shouldUpdate=="function"){var g;return(g=$.shouldUpdate)===null||g===void 0?void 0:g.call($,I,C,O)}return ae.some(function(Z){return!(0,U.Z)((0,E.Z)(I,Z),(0,E.Z)(C,Z))})},children:function(I){for(var C={},O=0;O<Q.length;O++){var g,Z=ae[O],w=Q[O],X=[w].flat(1),i=(g=_.getFieldFormatValueObject)===null||g===void 0?void 0:g.call(_,Z);if(i&&Object.keys(i).length)C=(0,V.T)({},C,i),(0,E.Z)(i,Z)&&(C=(0,v.Z)(C,X,(0,E.Z)(i,Z),!1));else{var a;i=(a=I.getFieldValue)===null||a===void 0?void 0:a.call(I,Z),typeof i!="undefined"&&(C=(0,v.Z)(C,X,i,!1))}}return oe==null?void 0:oe(C,(0,P.Z)((0,P.Z)({},I),_))}}))};J.Z=c},31649:function(ce,J,e){"use strict";var P=e(28991),R=e(81253),o=e(85893),B=e(59914),S=e(22270),G=e(60249),U=e(67294),V=e(64893),E=e(9105),v=["fieldProps","children","labelCol","label","autoFocus","isDefaultDom","render","proFieldProps","renderFormItem","valueType","initialValue","onChange","valueEnum","params","name","dependenciesValues","cacheForSwr","valuePropName"],j=function(c){var n=c.fieldProps,l=c.children,Q=c.labelCol,oe=c.label,ne=c.autoFocus,$=c.isDefaultDom,_=c.render,N=c.proFieldProps,ae=c.renderFormItem,H=c.valueType,I=c.initialValue,C=c.onChange,O=c.valueEnum,g=c.params,Z=c.name,w=c.dependenciesValues,X=c.cacheForSwr,i=X===void 0?!1:X,a=c.valuePropName,r=a===void 0?"value":a,s=(0,R.Z)(c,v),t=(0,U.useContext)(E.A),f=(0,U.useMemo)(function(){return w&&s.request?(0,P.Z)((0,P.Z)({},g),w||{}):g},[w,g,s.request]),y=(0,U.useMemo)(function(){if(l)return U.isValidElement(l)?U.cloneElement(l,(0,P.Z)((0,P.Z)({},s),{},{onChange:function(){for(var L=arguments.length,A=new Array(L),d=0;d<L;d++)A[d]=arguments[d];if(n==null?void 0:n.onChange){var h;n==null||(h=n.onChange)===null||h===void 0||h.call.apply(h,[n].concat(A));return}C==null||C.apply(void 0,A)}},l.props)):(0,o.jsx)(o.Fragment,{children:l})},[l,n==null?void 0:n.onChange,C,s]);return y||(0,o.jsx)(B.ZP,(0,P.Z)((0,P.Z)((0,P.Z)({text:n==null?void 0:n[r],render:_,renderFormItem:ae,valueType:H||"text",cacheForSwr:i,fieldProps:(0,P.Z)((0,P.Z)({autoFocus:ne},n),{},{onChange:function(){if(n==null?void 0:n.onChange){for(var L,A=arguments.length,d=new Array(A),h=0;h<A;h++)d[h]=arguments[h];n==null||(L=n.onChange)===null||L===void 0||L.call.apply(L,[n].concat(d));return}}}),valueEnum:(0,S.h)(O)},N),s),{},{mode:(N==null?void 0:N.mode)||t.mode||"edit",params:f}))},T=(0,V.G)((0,U.memo)(j,function(ee,c){return(0,G.Z)(c,ee,["onChange","onBlur"])}));J.Z=T},3178:function(){},76772:function(ce,J,e){"use strict";e.d(J,{Z:function(){return i}});var P=e(22122),R=e(28481),o=e(96156),B=e(38819),S=e(15873),G=e(43061),U=e(73218),V=e(54549),E=e(68855),v=e(57119),j=e(40847),T=e(68628),ee=e(94184),c=e.n(ee),n=e(63441),l=e(67294),Q=e(53124),oe=e(5467),ne=e(96159),$=e(6610),_=e(5991),N=e(10379),ae=e(44144),H=function(a){(0,N.Z)(s,a);var r=(0,ae.Z)(s);function s(){var t;return(0,$.Z)(this,s),t=r.apply(this,arguments),t.state={error:void 0,info:{componentStack:""}},t}return(0,_.Z)(s,[{key:"componentDidCatch",value:function(f,y){this.setState({error:f,info:y})}},{key:"render",value:function(){var f=this.props,y=f.message,D=f.description,L=f.children,A=this.state,d=A.error,h=A.info,de=h&&h.componentStack?h.componentStack:null,ue=typeof y=="undefined"?(d||"").toString():y,z=typeof D=="undefined"?de:D;return d?l.createElement(i,{type:"error",message:ue,description:l.createElement("pre",null,z)}):L}}]),s}(l.Component),I=H,C=function(a,r){var s={};for(var t in a)Object.prototype.hasOwnProperty.call(a,t)&&r.indexOf(t)<0&&(s[t]=a[t]);if(a!=null&&typeof Object.getOwnPropertySymbols=="function")for(var f=0,t=Object.getOwnPropertySymbols(a);f<t.length;f++)r.indexOf(t[f])<0&&Object.prototype.propertyIsEnumerable.call(a,t[f])&&(s[t[f]]=a[t[f]]);return s},O={success:B.Z,info:j.Z,error:G.Z,warning:E.Z},g={success:S.Z,info:T.Z,error:U.Z,warning:v.Z},Z=function(r){var s=r.description,t=r.icon,f=r.prefixCls,y=r.type,D=(s?g:O)[y]||null;return t?(0,ne.wm)(t,l.createElement("span",{className:"".concat(f,"-icon")},t),function(){return{className:c()("".concat(f,"-icon"),(0,o.Z)({},t.props.className,t.props.className))}}):l.createElement(D,{className:"".concat(f,"-icon")})},w=function(r){var s=r.isClosable,t=r.closeText,f=r.prefixCls,y=r.closeIcon,D=r.handleClose;return s?l.createElement("button",{type:"button",onClick:D,className:"".concat(f,"-close-icon"),tabIndex:0},t?l.createElement("span",{className:"".concat(f,"-close-text")},t):y):null},X=function(r){var s,t=r.description,f=r.prefixCls,y=r.message,D=r.banner,L=r.className,A=L===void 0?"":L,d=r.style,h=r.onMouseEnter,de=r.onMouseLeave,ue=r.onClick,z=r.afterClose,ve=r.showIcon,Pe=r.closable,ie=r.closeText,me=r.closeIcon,Ce=me===void 0?l.createElement(V.Z,null):me,fe=r.action,Y=C(r,["description","prefixCls","message","banner","className","style","onMouseEnter","onMouseLeave","onClick","afterClose","showIcon","closable","closeText","closeIcon","action"]),Ie=l.useState(!1),k=(0,R.Z)(Ie,2),q=k[0],De=k[1],he=l.useRef(),M=l.useContext(Q.E_),m=M.getPrefixCls,se=M.direction,F=m("alert",f),ge=function(K){var u;De(!0),(u=Y.onClose)===null||u===void 0||u.call(Y,K)},ye=function(){var K=Y.type;return K!==void 0?K:D?"warning":"info"},Fe=ie?!0:Pe,Ee=ye(),pe=D&&ve===void 0?!0:ve,Ze=c()(F,"".concat(F,"-").concat(Ee),(s={},(0,o.Z)(s,"".concat(F,"-with-description"),!!t),(0,o.Z)(s,"".concat(F,"-no-icon"),!pe),(0,o.Z)(s,"".concat(F,"-banner"),!!D),(0,o.Z)(s,"".concat(F,"-rtl"),se==="rtl"),s),A),Me=(0,oe.Z)(Y);return l.createElement(n.default,{visible:!q,motionName:"".concat(F,"-motion"),motionAppear:!1,motionEnter:!1,onLeaveStart:function(K){return{maxHeight:K.offsetHeight}},onLeaveEnd:z},function(W){var K=W.className,u=W.style;return l.createElement("div",(0,P.Z)({ref:he,"data-show":!q,className:c()(Ze,K),style:(0,P.Z)((0,P.Z)({},d),u),onMouseEnter:h,onMouseLeave:de,onClick:ue,role:"alert"},Me),pe?l.createElement(Z,{description:t,icon:Y.icon,prefixCls:F,type:Ee}):null,l.createElement("div",{className:"".concat(F,"-content")},y?l.createElement("div",{className:"".concat(F,"-message")},y):null,t?l.createElement("div",{className:"".concat(F,"-description")},t):null),fe?l.createElement("div",{className:"".concat(F,"-action")},fe):null,l.createElement(w,{isClosable:!!Fe,closeText:ie,prefixCls:F,closeIcon:Ce,handleClose:ge}))})};X.ErrorBoundary=I;var i=X},17462:function(ce,J,e){"use strict";var P=e(38663),R=e.n(P),o=e(3178),B=e.n(o)},30939:function(ce,J,e){"use strict";e.d(J,{P:function(){return B}});var P=e(67294);function R(E){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?R=function(v){return typeof v}:R=function(v){return v&&typeof Symbol=="function"&&v.constructor===Symbol&&v!==Symbol.prototype?"symbol":typeof v},R(E)}var o=function(){var v=new WeakSet;return function(j,T){if(R(T)==="object"&&T!==null){if(v.has(T))return;v.add(T)}return T}},B=function(v){return JSON.stringify(v,o())},S=function(v,j){try{return B(v)===B(j)}catch(T){}return!1};function G(E){var v=useRef("");return S(E,v.current)||(v.current=JSON.stringify(E,o())),v.current}function U(E,v){useEffect(E,[G(v)])}var V=null}}]);
|