Вы не можете выбрать более 25 тем Темы должны начинаться с буквы или цифры, могут содержать дефисы(-) и должны содержать не более 35 символов.
 
 
 

2 строки
9.8 KiB

  1. (self.webpackChunkant_design_pro=self.webpackChunkant_design_pro||[]).push([[9567],{41412:function(){},86743:function(de,p,a){"use strict";var b=a(22122),u=a(28481),Q=a(30470),W=a(67294),G=a(71577),ae=a(73839);function V(U){return!!(U&&!!U.then)}var n=function(x){var B=W.useRef(!1),w=W.useRef(),q=(0,Q.Z)(!1),$=(0,u.Z)(q,2),re=$[0],X=$[1],j=x.close,z=function(){j==null||j.apply(void 0,arguments)};W.useEffect(function(){var M;if(x.autoFocus){var D=w.current;M=setTimeout(function(){return D.focus()})}return function(){M&&clearTimeout(M)}},[]);var ee=function(D){!V(D)||(X(!0),D.then(function(){X(!1,!0),z.apply(void 0,arguments),B.current=!1},function(A){console.error(A),X(!1,!0),B.current=!1}))},le=function(D){var A=x.actionFn;if(!B.current){if(B.current=!0,!A){z();return}var S;if(x.emitEvent){if(S=A(D),x.quitOnNullishReturnValue&&!V(S)){B.current=!1,z(D);return}}else if(A.length)S=A(j),B.current=!1;else if(S=A(),!S){z();return}ee(S)}},te=x.type,ce=x.children,ne=x.prefixCls,ie=x.buttonProps;return W.createElement(G.Z,(0,b.Z)({},(0,ae.n)(te),{onClick:le,loading:re,prefixCls:ne},ie,{ref:w}),ce)};p.Z=n},50146:function(de,p,a){"use strict";a.d(p,{Z:function(){return Fe}});var b=a(85061),u=a(22122),Q=a(15873),W=a(73218),G=a(57119),ae=a(68628),V=a(38135),n=a(67294),U=a(75901),x=a(96156),B=a(94184),w=a.n(B),q=a(86743),$=a(33603),re=a(54549),X=a(57315),j=a(71577),z=a(73839),ee=a(53124),le=a(65223),te=a(42051),ce=a(31808),ne=a(83008),ie=function(t,e){var r={};for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&e.indexOf(o)<0&&(r[o]=t[o]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var l=0,o=Object.getOwnPropertySymbols(t);l<o.length;l++)e.indexOf(o[l])<0&&Object.prototype.propertyIsEnumerable.call(t,o[l])&&(r[o[l]]=t[o[l]]);return r},M,D=function(e){M={x:e.pageX,y:e.pageY},setTimeout(function(){M=null},100)};(0,ce.jD)()&&document.documentElement.addEventListener("click",D,!0);var A=function(e){var r,o=n.useContext(ee.E_),l=o.getPopupContainer,s=o.getPrefixCls,g=o.direction,c=function(L){var k=e.onCancel;k==null||k(L)},d=function(L){var k=e.onOk;k==null||k(L)},v=function(L){var k=e.okText,se=e.okType,R=e.cancelText,fe=e.confirmLoading;return n.createElement(n.Fragment,null,n.createElement(j.Z,(0,u.Z)({onClick:c},e.cancelButtonProps),R||L.cancelText),n.createElement(j.Z,(0,u.Z)({},(0,z.n)(se),{loading:fe,onClick:d},e.okButtonProps),k||L.okText))},f=e.prefixCls,i=e.footer,T=e.visible,E=e.open,O=e.wrapClassName,P=e.centered,m=e.getContainer,y=e.closeIcon,h=e.focusTriggerAfterClose,Z=h===void 0?!0:h,N=ie(e,["prefixCls","footer","visible","open","wrapClassName","centered","getContainer","closeIcon","focusTriggerAfterClose"]),C=s("modal",f),F=s(),_=n.createElement(te.Z,{componentName:"Modal",defaultLocale:(0,ne.A)()},v),K=n.createElement("span",{className:"".concat(C,"-close-x")},y||n.createElement(re.Z,{className:"".concat(C,"-close-icon")})),ue=w()(O,(r={},(0,x.Z)(r,"".concat(C,"-centered"),!!P),(0,x.Z)(r,"".concat(C,"-wrap-rtl"),g==="rtl"),r));return n.createElement(le.Ux,{status:!0,override:!0},n.createElement(X.Z,(0,u.Z)({},N,{getContainer:m===void 0?l:m,prefixCls:C,wrapClassName:ue,footer:i===void 0?_:i,visible:E||T,mousePosition:M,onClose:c,closeIcon:K,focusTriggerAfterClose:Z,transitionName:(0,$.mL)(F,"zoom",e.transitionName),maskTransitionName:(0,$.mL)(F,"fade",e.maskTransitionName)})))};A.defaultProps={width:520,confirmLoading:!1,open:!1,okType:"primary"};var S=A,Ze=function(e){var r=e.icon,o=e.onCancel,l=e.onOk,s=e.close,g=e.zIndex,c=e.afterClose,d=e.visible,v=e.open,f=e.keyboard,i=e.centered,T=e.getContainer,E=e.maskStyle,O=e.okText,P=e.okButtonProps,m=e.cancelText,y=e.cancelButtonProps,h=e.direction,Z=e.prefixCls,N=e.wrapClassName,C=e.rootPrefixCls,F=e.iconPrefixCls,_=e.bodyStyle,K=e.closable,ue=K===void 0?!1:K,oe=e.closeIcon,L=e.modalRender,k=e.focusTriggerAfterClose,se=e.okType||"primary",R="".concat(Z,"-confirm"),fe="okCancel"in e?e.okCancel:!0,Be=e.width||416,Le=e.style||{},We=e.mask===void 0?!0:e.mask,$e=e.maskClosable===void 0?!1:e.maskClosable,Oe=e.autoFocusButton===null?!1:e.autoFocusButton||"ok",je=w()(R,"".concat(R,"-").concat(e.type),(0,x.Z)({},"".concat(R,"-rtl"),h==="rtl"),e.className),Ke=fe&&n.createElement(q.Z,{actionFn:o,close:s,autoFocus:Oe==="cancel",buttonProps:y,prefixCls:"".concat(C,"-btn")},m);return n.createElement(U.ZP,{prefixCls:C,iconPrefixCls:F,direction:h},n.createElement(S,{prefixCls:Z,className:je,wrapClassName:w()((0,x.Z)({},"".concat(R,"-centered"),!!e.centered),N),onCancel:function(){return s==null?void 0:s({triggerCancel:!0})},open:v||d,title:"",footer:"",transitionName:(0,$.mL)(C,"zoom",e.transitionName),maskTransitionName:(0,$.mL)(C,"fade",e.maskTransitionName),mask:We,maskClosable:$e,maskStyle:E,style:Le,bodyStyle:_,width:Be,zIndex:g,afterClose:c,keyboard:f,centered:i,getContainer:T,closable:ue,closeIcon:oe,modalRender:L,focusTriggerAfterClose:k},n.createElement("div",{className:"".concat(R,"-body-wrapper")},n.createElement("div",{className:"".concat(R,"-body")},r,e.title===void 0?null:n.createElement("span",{className:"".concat(R,"-title")},e.title),n.createElement("div",{className:"".concat(R,"-content")},e.content)),n.createElement("div",{className:"".concat(R,"-btns")},Ke,n.createElement(q.Z,{type:se,actionFn:l,close:s,autoFocus:Oe==="ok",buttonProps:P,prefixCls:"".concat(C,"-btn")},O)))))},ve=Ze,he=[],H=he,ke=function(t,e){var r={};for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&e.indexOf(o)<0&&(r[o]=t[o]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var l=0,o=Object.getOwnPropertySymbols(t);l<o.length;l++)e.indexOf(o[l])<0&&Object.prototype.propertyIsEnumerable.call(t,o[l])&&(r[o[l]]=t[o[l]]);return r},me="";function Re(){return me}function Y(t){var e=document.createDocumentFragment(),r=(0,u.Z)((0,u.Z)({},t),{close:s,open:!0});function o(){for(var c=arguments.length,d=new Array(c),v=0;v<c;v++)d[v]=arguments[v];var f=d.some(function(E){return E&&E.triggerCancel});t.onCancel&&f&&t.onCancel.apply(t,[function(){}].concat((0,b.Z)(d.slice(1))));for(var i=0;i<H.length;i++){var T=H[i];if(T===s){H.splice(i,1);break}}(0,V.v)(e)}function l(c){var d=c.okText,v=c.cancelText,f=c.prefixCls,i=c.open,T=c.visible,E=ke(c,["okText","cancelText","prefixCls","open","visible"]);setTimeout(function(){var O=(0,ne.A)(),P=(0,U.w6)(),m=P.getPrefixCls,y=P.getIconPrefixCls,h=m(void 0,Re()),Z=f||"".concat(h,"-modal"),N=y();(0,V.s)(n.createElement(ve,(0,u.Z)({},E,{open:i!=null?i:T,prefixCls:Z,rootPrefixCls:h,iconPrefixCls:N,okText:d||(E.okCancel?O.okText:O.justOkText),cancelText:v||O.cancelText})),e)})}function s(){for(var c=this,d=arguments.length,v=new Array(d),f=0;f<d;f++)v[f]=arguments[f];r=(0,u.Z)((0,u.Z)({},r),{open:!1,afterClose:function(){typeof t.afterClose=="function"&&t.afterClose(),o.apply(c,v)}}),l(r)}function g(c){typeof c=="function"?r=c(r):r=(0,u.Z)((0,u.Z)({},r),c),l(r)}return l(r),H.push(s),{destroy:s,update:g}}function Ce(t){return(0,u.Z)((0,u.Z)({icon:n.createElement(G.Z,null),okCancel:!1},t),{type:"warning"})}function xe(t){return(0,u.Z)((0,u.Z)({icon:n.createElement(ae.Z,null),okCancel:!1},t),{type:"info"})}function ge(t){return(0,u.Z)((0,u.Z)({icon:n.createElement(Q.Z,null),okCancel:!1},t),{type:"success"})}function Ee(t){return(0,u.Z)((0,u.Z)({icon:n.createElement(W.Z,null),okCancel:!1},t),{type:"error"})}function Pe(t){return(0,u.Z)((0,u.Z)({icon:n.createElement(G.Z,null),okCancel:!0},t),{type:"confirm"})}function be(t){var e=t.rootPrefixCls;me=e}var J=a(28481);function Me(){var t=n.useState([]),e=(0,J.Z)(t,2),r=e[0],o=e[1],l=n.useCallback(function(s){return o(function(g){return[].concat((0,b.Z)(g),[s])}),function(){o(function(g){return g.filter(function(c){return c!==s})})}},[]);return[r,l]}var Ae=a(85636),Ie=function(e,r){var o=e.afterClose,l=e.config,s=n.useState(!0),g=(0,J.Z)(s,2),c=g[0],d=g[1],v=n.useState(l),f=(0,J.Z)(v,2),i=f[0],T=f[1],E=n.useContext(ee.E_),O=E.direction,P=E.getPrefixCls,m=P("modal"),y=P(),h=function(){d(!1);for(var N=arguments.length,C=new Array(N),F=0;F<N;F++)C[F]=arguments[F];var _=C.some(function(K){return K&&K.triggerCancel});i.onCancel&&_&&i.onCancel.apply(i,[function(){}].concat((0,b.Z)(C.slice(1))))};return n.useImperativeHandle(r,function(){return{destroy:h,update:function(N){T(function(C){return(0,u.Z)((0,u.Z)({},C),N)})}}}),n.createElement(te.Z,{componentName:"Modal",defaultLocale:Ae.Z.Modal},function(Z){return n.createElement(ve,(0,u.Z)({prefixCls:m,rootPrefixCls:y},i,{close:h,open:c,afterClose:o,okText:i.okText||(i.okCancel?Z.okText:Z.justOkText),direction:O,cancelText:i.cancelText||Z.cancelText}))})},Ne=n.forwardRef(Ie),ye=0,De=n.memo(n.forwardRef(function(t,e){var r=Me(),o=(0,J.Z)(r,2),l=o[0],s=o[1];return n.useImperativeHandle(e,function(){return{patchElement:s}},[]),n.createElement(n.Fragment,null,l)}));function Se(){var t=n.useRef(null),e=n.useState([]),r=(0,J.Z)(e,2),o=r[0],l=r[1];n.useEffect(function(){if(o.length){var c=(0,b.Z)(o);c.forEach(function(d){d()}),l([])}},[o]);var s=n.useCallback(function(c){return function(v){var f;ye+=1;var i=n.createRef(),T,E=n.createElement(Ne,{key:"modal-".concat(ye),config:c(v),ref:i,afterClose:function(){T()}});return T=(f=t.current)===null||f===void 0?void 0:f.patchElement(E),{destroy:function(){function P(){var m;(m=i.current)===null||m===void 0||m.destroy()}i.current?P():l(function(m){return[].concat((0,b.Z)(m),[P])})},update:function(P){function m(){var y;(y=i.current)===null||y===void 0||y.update(P)}i.current?m():l(function(y){return[].concat((0,b.Z)(y),[m])})}}}},[]),g=n.useMemo(function(){return{info:s(xe),success:s(ge),error:s(Ee),warning:s(Ce),confirm:s(Pe)}},[]);return[g,n.createElement(De,{ref:t})]}function Te(t){return Y(Ce(t))}var I=S;I.useModal=Se,I.info=function(e){return Y(xe(e))},I.success=function(e){return Y(ge(e))},I.error=function(e){return Y(Ee(e))},I.warning=Te,I.warn=Te,I.confirm=function(e){return Y(Pe(e))},I.destroyAll=function(){for(;H.length;){var e=H.pop();e&&e()}},I.config=be;var Fe=I},71194:function(de,p,a){"use strict";var b=a(38663),u=a.n(b),Q=a(41412),W=a.n(Q),G=a(57663)}}]);