forked from Gitlink/forgeplus
1 line
12 KiB
JavaScript
1 line
12 KiB
JavaScript
(this.webpackJsonp=this.webpackJsonp||[]).push([[66],{"+KLJ":function(e,t,n){"use strict";n.r(t),n.d(t,"default",(function(){return w}));var r=n("q1tI"),o=n("i8i4"),c=n("MFj2"),a=n("TSYQ"),i=n.n(a),l=n("CtXQ"),s=n("H84U"),u=n("RqAY"),f=n("6CfX");function p(e){return(p="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function y(){return(y=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function b(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function h(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function d(e,t){return(d=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function m(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=O(e);if(t){var o=O(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return v(this,n)}}function v(e,t){return!t||"object"!==p(t)&&"function"!=typeof t?g(e):t}function g(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function O(e){return(O=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function C(){}var w=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&d(e,t)}(v,e);var t,n,a,p=m(v);function v(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,v),(t=p.call(this,e)).handleClose=function(e){e.preventDefault();var n=o.findDOMNode(g(t));n.style.height="".concat(n.offsetHeight,"px"),n.style.height="".concat(n.offsetHeight,"px"),t.setState({closing:!0}),(t.props.onClose||C)(e)},t.animationEnd=function(){t.setState({closing:!1,closed:!0}),(t.props.afterClose||C)()},t.renderAlert=function(e){var n,o=e.getPrefixCls,a=t.props,s=a.description,f=a.prefixCls,p=a.message,h=a.closeText,d=a.banner,m=a.className,v=void 0===m?"":m,g=a.style,O=a.icon,C=t.props,w=C.closable,j=C.type,P=C.showIcon,k=C.iconType,S=t.state,E=S.closing,x=S.closed,_=o("alert",f);P=!(!d||void 0!==P)||P,j=d&&void 0===j?"warning":j||"info";var T="filled";if(!k){switch(j){case"success":k="check-circle";break;case"info":k="info-circle";break;case"error":k="close-circle";break;case"warning":k="exclamation-circle";break;default:k="default"}s&&(T="outlined")}h&&(w=!0);var N=i()(_,"".concat(_,"-").concat(j),(b(n={},"".concat(_,"-closing"),E),b(n,"".concat(_,"-with-description"),!!s),b(n,"".concat(_,"-no-icon"),!P),b(n,"".concat(_,"-banner"),!!d),b(n,"".concat(_,"-closable"),w),n),v),R=w?r.createElement("button",{type:"button",onClick:t.handleClose,className:"".concat(_,"-close-icon"),tabIndex:0},h?r.createElement("span",{className:"".concat(_,"-close-text")},h):r.createElement(l.default,{type:"close"})):null,I=Object(u.a)(t.props),D=O&&(r.isValidElement(O)?r.cloneElement(O,{className:i()("".concat(_,"-icon"),b({},O.props.className,O.props.className))}):r.createElement("span",{className:"".concat(_,"-icon")},O))||r.createElement(l.default,{className:"".concat(_,"-icon"),type:k,theme:T});return x?null:r.createElement(c.a,{component:"",showProp:"data-show",transitionName:"".concat(_,"-slide-up"),onEnd:t.animationEnd},r.createElement("div",y({"data-show":!E,className:N,style:g},I),P?D:null,r.createElement("span",{className:"".concat(_,"-message")},p),r.createElement("span",{className:"".concat(_,"-description")},s),R))},Object(f.a)(!("iconType"in e),"Alert","`iconType` is deprecated. Please use `icon` instead."),t.state={closing:!1,closed:!1},t}return t=v,(n=[{key:"render",value:function(){return r.createElement(s.a,null,this.renderAlert)}}])&&h(t.prototype,n),a&&h(t,a),v}(r.Component)},"0lcf":function(e,t,n){"use strict";n.r(t);n("SchZ"),n("u3En")},"2DKY":function(e,t,n){"use strict";n.r(t);n("SchZ"),n("n5Yh")},RqAY:function(e,t,n){"use strict";function r(e){return Object.keys(e).reduce((function(t,n){return"data-"!==n.substr(0,5)&&"aria-"!==n.substr(0,5)&&"role"!==n||"data-__"===n.substr(0,7)||(t[n]=e[n]),t}),{})}n.d(t,"a",(function(){return r}))},mr32:function(e,t,n){"use strict";n.r(t);var r=n("q1tI"),o=n("TSYQ"),c=n.n(o),a=n("BGR+"),i=n("VCL8"),l=n("CtXQ"),s=n("H84U");function u(e){return(u="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function f(){return(f=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function p(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function y(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function b(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function h(e,t){return(h=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function d(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=v(e);if(t){var o=v(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return m(this,n)}}function m(e,t){return!t||"object"!==u(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function v(e){return(v=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var g=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n},O=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&h(e,t)}(i,e);var t,n,o,a=d(i);function i(){var e;return y(this,i),(e=a.apply(this,arguments)).handleClick=function(){var t=e.props,n=t.checked,r=t.onChange;r&&r(!n)},e.renderCheckableTag=function(t){var n,o=t.getPrefixCls,a=e.props,i=a.prefixCls,l=a.className,s=a.checked,u=g(a,["prefixCls","className","checked"]),y=o("tag",i),b=c()(y,(p(n={},"".concat(y,"-checkable"),!0),p(n,"".concat(y,"-checkable-checked"),s),n),l);return delete u.onChange,r.createElement("span",f({},u,{className:b,onClick:e.handleClick}))},e}return t=i,(n=[{key:"render",value:function(){return r.createElement(s.a,null,this.renderCheckableTag)}}])&&b(t.prototype,n),o&&b(t,o),i}(r.Component),C=n("09Wf"),w=n("6CfX"),j=n("g0mS");function P(e){return(P="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function k(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function S(){return(S=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function E(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function x(e,t){return(x=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function _(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=N(e);if(t){var o=N(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return T(this,n)}}function T(e,t){return!t||"object"!==P(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function N(e){return(N=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var R=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n},I=new RegExp("^(".concat(C.a.join("|"),")(-inverse)?$")),D=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&x(e,t)}(u,e);var t,n,o,i=_(u);function u(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,u),(t=i.call(this,e)).state={visible:!0},t.handleIconClick=function(e){e.stopPropagation(),t.setVisible(!1,e)},t.renderTag=function(e){var n=t.props,o=n.children,c=R(n,["children"]),i="onClick"in c||o&&"a"===o.type,l=Object(a.a)(c,["onClose","afterClose","color","visible","closable","prefixCls"]);return i?r.createElement(j.a,null,r.createElement("span",S({},l,{className:t.getTagClassName(e),style:t.getTagStyle()}),o,t.renderCloseIcon())):r.createElement("span",S({},l,{className:t.getTagClassName(e),style:t.getTagStyle()}),o,t.renderCloseIcon())},Object(w.a)(!("afterClose"in e),"Tag","'afterClose' will be deprecated, please use 'onClose', we will remove this in the next version."),t}return t=u,o=[{key:"getDerivedStateFromProps",value:function(e){return"visible"in e?{visible:e.visible}:null}}],(n=[{key:"getTagStyle",value:function(){var e=this.props,t=e.color,n=e.style,r=this.isPresetColor();return S({backgroundColor:t&&!r?t:void 0},n)}},{key:"getTagClassName",value:function(e){var t,n=e.getPrefixCls,r=this.props,o=r.prefixCls,a=r.className,i=r.color,l=this.state.visible,s=this.isPresetColor(),u=n("tag",o);return c()(u,(k(t={},"".concat(u,"-").concat(i),s),k(t,"".concat(u,"-has-color"),i&&!s),k(t,"".concat(u,"-hidden"),!l),t),a)}},{key:"setVisible",value:function(e,t){var n=this.props,r=n.onClose,o=n.afterClose;r&&r(t),o&&!r&&o(),t.defaultPrevented||"visible"in this.props||this.setState({visible:e})}},{key:"isPresetColor",value:function(){var e=this.props.color;return!!e&&I.test(e)}},{key:"renderCloseIcon",value:function(){return this.props.closable?r.createElement(l.default,{type:"close",onClick:this.handleIconClick}):null}},{key:"render",value:function(){return r.createElement(s.a,null,this.renderTag)}}])&&E(t.prototype,n),o&&E(t,o),u}(r.Component);D.CheckableTag=O,D.defaultProps={closable:!1},Object(i.polyfill)(D);t.default=D},n5Yh:function(e,t,n){},u3En:function(e,t,n){}}]); |