Socket
Socket
Sign inDemoInstall

notification-test

Package Overview
Dependencies
77
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 1.0.4 to 1.0.5

61

dist/notification.js
(function webpackUniversalModuleDefinition(root, factory) {
if(typeof exports === 'object' && typeof module === 'object')
module.exports = factory(require("react"), require("react-dom"), require("reactstrap"));
module.exports = factory(require("react"), require("react-dom"), require("react-transition-group"));
else if(typeof define === 'function' && define.amd)
define(["react", "react-dom", "reactstrap"], factory);
define(["react", "react-dom", "react-transition-group"], factory);
else if(typeof exports === 'object')
exports["Tip"] = factory(require("react"), require("react-dom"), require("reactstrap"));
exports["Tip"] = factory(require("react"), require("react-dom"), require("react-transition-group"));
else
root["Tip"] = factory(root["react"], root["react-dom"], root["reactstrap"]);
root["Tip"] = factory(root["react"], root["react-dom"], root["react-transition-group"]);
})(window, function(__WEBPACK_EXTERNAL_MODULE__2__, __WEBPACK_EXTERNAL_MODULE__8__, __WEBPACK_EXTERNAL_MODULE__11__) {

@@ -355,3 +355,3 @@ return /******/ (function(modules) { // webpackBootstrap

// module
exports.push([module.i, ".IS-notification {\n position: fixed;\n z-index: 9999;\n width: 320px;\n max-width: calc(100vw - 32px);\n margin-right: 24px;\n color: rgba(0, 0, 0, 0.65); }\n .IS-notification-notice {\n position: relative;\n margin-bottom: 16px;\n overflow: hidden;\n line-height: 1.5;\n background: #fff;\n border-radius: 4px;\n -webkit-box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);\n box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15); }\n .IS-notification-notice-close {\n position: absolute;\n top: 16px;\n right: 22px;\n color: rgba(0, 0, 0, 0.45);\n cursor: pointer;\n outline: none; }\n .IS-notification-notice-content {\n padding: 16px 24px; }\n .IS-notification-notice-message {\n display: inline-block;\n padding-right: 24px;\n margin-bottom: 8px;\n color: rgba(0, 0, 0, 0.85);\n font-size: 16px;\n line-height: 24px; }\n .IS-notification-notice-description {\n font-size: 14px; }\n .IS-notification-notice-with-icon .IS-notification-notice-message,\n .IS-notification-notice-with-icon .IS-notification-notice-description {\n margin-bottom: 4px;\n margin-left: 48px;\n font-size: 16px; }\n .IS-notification-notice-icon {\n position: absolute;\n margin-left: 4px;\n height: 24px;\n width: 24px;\n font-size: 24px;\n line-height: 24px; }\n .IS-notification-notice-with-success {\n color: #fff;\n background-color: #52c41a; }\n .IS-notification-notice-with-success .IS-notification-notice-message {\n color: #fff; }\n .IS-notification-notice-with-warning {\n color: #333;\n background-color: #faad14; }\n .IS-notification-notice-with-warning .IS-notification-notice-message {\n color: #333; }\n .IS-notification-notice-with-error {\n color: #fff;\n background-color: #f5222d; }\n .IS-notification-notice-with-error .IS-notification-notice-message {\n color: #fff; }\n .IS-notification-notice-fade {\n animation-duration: 3s;\n animation-delay: 2s;\n animation-iteration-count: infinite; }\n .IS-notification-topRight .IS-notification-notice-bouncein-enter, .IS-notification-bottomRight .IS-notification-notice-bouncein-enter {\n animation-name: NotificationFadeIn;\n animation-play-state: running; }\n .IS-notification-topLeft .IS-notification-notice-bouncein-enter, .IS-notification-bottomLeft .IS-notification-notice-bouncein-enter {\n animation-name: NotificationLeftFadeIn;\n animation-play-state: running; }\n .IS-notification-notice-fadeout {\n animation-name: NotificationFadeOut;\n animation-play-state: running; }\n\n@keyframes NotificationFadeIn {\n 0% {\n opacity: 0;\n left: 320px; }\n 100% {\n left: 0;\n opacity: 1; } }\n\n@keyframes NotificationLeftFadeIn {\n 0% {\n opacity: 0;\n right: 320px; }\n 100% {\n right: 0;\n opacity: 1; } }\n\n@keyframes NotificationFadeOut {\n 0% {\n opacity: 1;\n margin-bottom: 16px;\n padding-top: 16px 24px;\n padding-bottom: 16px 24px;\n max-height: 150px; }\n 100% {\n opacity: 0;\n margin-bottom: 0;\n padding-top: 0;\n padding-bottom: 0;\n max-height: 0; } }\n", ""]);
exports.push([module.i, ".IS-notification {\n position: fixed;\n z-index: 9999;\n width: 320px;\n max-width: calc(100vw - 32px);\n margin-right: 24px;\n color: rgba(0, 0, 0, 0.65); }\n .IS-notification-notice {\n position: relative;\n margin-bottom: 16px;\n overflow: hidden;\n line-height: 1.5;\n background: #fff;\n border-radius: 4px;\n -webkit-box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);\n box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15); }\n .IS-notification-notice-close {\n position: absolute;\n top: 16px;\n right: 22px;\n color: rgba(0, 0, 0, 0.45);\n cursor: pointer;\n outline: none; }\n .IS-notification-notice-content {\n padding: 16px 24px; }\n .IS-notification-notice-message {\n display: inline-block;\n padding-right: 24px;\n margin-bottom: 8px;\n color: rgba(0, 0, 0, 0.85);\n font-size: 16px;\n line-height: 24px; }\n .IS-notification-notice-description {\n font-size: 14px; }\n .IS-notification-notice-with-icon .IS-notification-notice-message,\n .IS-notification-notice-with-icon .IS-notification-notice-description {\n margin-bottom: 4px;\n margin-left: 48px;\n font-size: 16px; }\n .IS-notification-notice-icon {\n position: absolute;\n margin-left: 4px;\n height: 24px;\n width: 24px;\n font-size: 24px;\n line-height: 24px; }\n .IS-notification-notice-with-success {\n color: #fff;\n background-color: #52c41a; }\n .IS-notification-notice-with-success .IS-notification-notice-message {\n color: #fff; }\n .IS-notification-notice-with-warning {\n color: #333;\n background-color: #faad14; }\n .IS-notification-notice-with-warning .IS-notification-notice-message {\n color: #333; }\n .IS-notification-notice-with-error {\n color: #fff;\n background-color: #f5222d; }\n .IS-notification-notice-with-error .IS-notification-notice-message {\n color: #fff; }\n .IS-notification-notice-fade {\n position: relative;\n animation-duration: 0.24s;\n animation-timing-function: cubic-bezier(0.645, 0.045, 0.355, 1);\n animation-fill-mode: both; }\n .IS-notification-topRight .fade-entering, .IS-notification-bottomRight .fade-entering {\n animation-name: NotificationFadeIn;\n animation-play-state: running; }\n .IS-notification-topRight .fade-entered, .IS-notification-bottomRight .fade-entered {\n animation-play-state: paused; }\n .IS-notification-topRight .fade-exiting, .IS-notification-bottomRight .fade-exiting {\n animation-name: NotificationFadeOut;\n animation-play-state: running; }\n .IS-notification-topRight .fade-entered, .IS-notification-bottomRight .fade-entered {\n animation-duration: 0.2s;\n animation-play-state: paused; }\n .IS-notification-topLeft .fade-entering, .IS-notification-bottomLeft .fade-entering {\n animation-name: NotificationLeftFadeIn;\n animation-play-state: running; }\n .IS-notification-topLeft .fade-entered, .IS-notification-bottomLeft .fade-entered {\n animation-play-state: paused; }\n .IS-notification-topLeft .fade-exiting, .IS-notification-bottomLeft .fade-exiting {\n animation-name: NotificationFadeOut;\n animation-play-state: running; }\n .IS-notification-topLeft .fade-exited, .IS-notification-bottomLeft .fade-exited {\n animation-duration: 0.2s;\n animation-play-state: paused; }\n\n@keyframes NotificationFadeIn {\n 0% {\n opacity: 0;\n left: 320px; }\n 100% {\n left: 0;\n opacity: 1; } }\n\n@keyframes NotificationLeftFadeIn {\n 0% {\n opacity: 0;\n right: 320px; }\n 100% {\n right: 0;\n opacity: 1; } }\n\n@keyframes NotificationFadeOut {\n 0% {\n opacity: 1;\n margin-bottom: 16px;\n padding-top: 16px 24px;\n padding-bottom: 16px 24px;\n max-height: 150px; }\n 100% {\n opacity: 0;\n margin-bottom: 0;\n padding-top: 0;\n padding-bottom: 0;\n max-height: 0; } }\n", ""]);

@@ -1048,4 +1048,4 @@ // exports

/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var reactstrap__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(11);
/* harmony import */ var reactstrap__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(reactstrap__WEBPACK_IMPORTED_MODULE_1__);
/* harmony import */ var react_transition_group__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(11);
/* harmony import */ var react_transition_group__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react_transition_group__WEBPACK_IMPORTED_MODULE_1__);
function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }

@@ -1071,2 +1071,3 @@

// import { Fade } from 'reactstrap';

@@ -1093,31 +1094,4 @@

_defineProperty(_assertThisInitialized(_this), "state", {
fadeinenter: false,
fadeoutenter: false
});
_defineProperty(_assertThisInitialized(_this), "onEnter", function () {
_this.setState({
fadeinenter: true
});
});
_defineProperty(_assertThisInitialized(_this), "onEntered", function () {
_this.setState({
fadeinenter: false
});
});
_defineProperty(_assertThisInitialized(_this), "onExit", function () {
_this.setState({
fadeoutenter: true
});
});
_defineProperty(_assertThisInitialized(_this), "onExited", function () {
_this.props.onExited();
_this.setState({
fadeoutenter: false
});
});

@@ -1131,14 +1105,17 @@

value: function render() {
var _this2 = this;
var prefixCls = this.props.className;
var componentClass = "".concat(prefixCls, "-fade");
var fadeinenter = this.state.fadeinenter ? "".concat(componentClass, "-bouncein-enter") : '';
var fadeoutenter = this.state.fadeoutenter ? "".concat(componentClass, "-fadeout") : '';
return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(reactstrap__WEBPACK_IMPORTED_MODULE_1__["Fade"], {
return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react_transition_group__WEBPACK_IMPORTED_MODULE_1__["Transition"], {
"in": this.props.fadein,
onEnter: this.onEnter,
onEntered: this.onEntered,
onExit: this.onExit,
onExited: this.onExited,
className: "".concat(componentClass, " ").concat(fadeinenter, " ").concat(fadeoutenter)
}, this.props.children);
unmountOnExit: false,
timeout: 300,
appear: true
}, function (state) {
return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("div", {
className: "".concat(componentClass, " fade-").concat(state)
}, _this2.props.children);
});
}

@@ -1145,0 +1122,0 @@ }]);

@@ -1,1 +0,1 @@

!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e(require("react"),require("react-dom"),require("reactstrap")):"function"==typeof define&&define.amd?define(["react","react-dom","reactstrap"],e):"object"==typeof exports?exports.Tip=e(require("react"),require("react-dom"),require("reactstrap")):t.Tip=e(t.react,t["react-dom"],t.reactstrap)}(window,function(n,o,r){return(c={},i.m=a=[function(t,e,n){"use strict";n.r(e);var o=n(1);e.default=o.default},function(t,e,n){"use strict";n.r(e);var o=n(2),c=n.n(o),a=(n(3),n(7));function r(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var u={},f={warning:"#faad14",success:"#52c41a",info:"#fff",error:"#f5222d"},s=4.5,l="24px",p="24px",d="bottomRight",m=null;function y(t,e,n){var o=1<arguments.length&&void 0!==e?e:d,r=2<arguments.length?n:void 0,i="".concat(t,"-").concat(o);u[i]?r(u[i]):a.default.newInstance({prefixCls:t,className:o?"".concat(t,"-").concat(o):"",style:function(t){var e;switch(t){case"topLeft":e={left:0,top:l,bottom:"auto"};break;case"topRight":e={right:0,top:l,bottom:"auto"};break;case"bottomLeft":e={left:0,top:"auto",bottom:p};break;default:e={right:0,top:"auto",bottom:p}}return e}(o),getContainer:m,closeIcon:c.a.createElement("img",{src:"/images/close-icon.svg",alt:"close"})},function(t){u[i]=t,r(t)})}var i={open:function(e){var t=e.prefixCls||"IS-notification",n="".concat(t,"-notice"),o=void 0===e.duration?s:e.duration,r={background:"#FFF"};e.type&&(r={background:f[e.type]},r=e.style?Object.assign(r,e.style):r);var i=e.message?e.message:e.type?e.type:"",a=c.a.createElement("div",{className:"".concat(n,"-with-").concat(e.type)},c.a.createElement("div",{className:"".concat(n,"-message")},i),c.a.createElement("div",{className:"".concat(n,"-description")},e.description),e.btn?c.a.createElement("span",{className:"".concat(n,"-btn")},e.btn):null);y(t,e.placement,function(t){t.notice({content:a,duration:o,closable:!0,key:e.key,style:r||{},className:e.className})})},close:function(e){Object.keys(u).forEach(function(t){return u[t].removeNotice(e)})},config:function(t){var e=t.duration,n=t.bottom,o=t.placement,r=t.top,i=t.getContainer;void 0!==e&&(s=e),void 0!==o&&(d=o),void 0!==n&&(p=n),void 0!==r&&(l=r),void 0!==i&&(m=i)},destroy:function(){Object.keys(u).forEach(function(t){u[t].destroy(),delete u[t]})}};["success","info","warning","error"].forEach(function(e){i[e]=function(t){return i.open(function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},o=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(o=o.concat(Object.getOwnPropertySymbols(n).filter(function(t){return Object.getOwnPropertyDescriptor(n,t).enumerable}))),o.forEach(function(t){r(e,t,n[t])})}return e}({},t,{type:e}))}}),e.default=i},function(t,e){t.exports=n},function(t,e,n){var o=n(4);"string"==typeof o&&(o=[[t.i,o,""]]);n(6)(o,{});o.locals&&(t.exports=o.locals)},function(t,e,n){(t.exports=n(5)()).push([t.i,".IS-notification {\n position: fixed;\n z-index: 9999;\n width: 320px;\n max-width: calc(100vw - 32px);\n margin-right: 24px;\n color: rgba(0, 0, 0, 0.65); }\n .IS-notification-notice {\n position: relative;\n margin-bottom: 16px;\n overflow: hidden;\n line-height: 1.5;\n background: #fff;\n border-radius: 4px;\n -webkit-box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);\n box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15); }\n .IS-notification-notice-close {\n position: absolute;\n top: 16px;\n right: 22px;\n color: rgba(0, 0, 0, 0.45);\n cursor: pointer;\n outline: none; }\n .IS-notification-notice-content {\n padding: 16px 24px; }\n .IS-notification-notice-message {\n display: inline-block;\n padding-right: 24px;\n margin-bottom: 8px;\n color: rgba(0, 0, 0, 0.85);\n font-size: 16px;\n line-height: 24px; }\n .IS-notification-notice-description {\n font-size: 14px; }\n .IS-notification-notice-with-icon .IS-notification-notice-message,\n .IS-notification-notice-with-icon .IS-notification-notice-description {\n margin-bottom: 4px;\n margin-left: 48px;\n font-size: 16px; }\n .IS-notification-notice-icon {\n position: absolute;\n margin-left: 4px;\n height: 24px;\n width: 24px;\n font-size: 24px;\n line-height: 24px; }\n .IS-notification-notice-with-success {\n color: #fff;\n background-color: #52c41a; }\n .IS-notification-notice-with-success .IS-notification-notice-message {\n color: #fff; }\n .IS-notification-notice-with-warning {\n color: #333;\n background-color: #faad14; }\n .IS-notification-notice-with-warning .IS-notification-notice-message {\n color: #333; }\n .IS-notification-notice-with-error {\n color: #fff;\n background-color: #f5222d; }\n .IS-notification-notice-with-error .IS-notification-notice-message {\n color: #fff; }\n .IS-notification-notice-fade {\n animation-duration: 3s;\n animation-delay: 2s;\n animation-iteration-count: infinite; }\n .IS-notification-topRight .IS-notification-notice-bouncein-enter, .IS-notification-bottomRight .IS-notification-notice-bouncein-enter {\n animation-name: NotificationFadeIn;\n animation-play-state: running; }\n .IS-notification-topLeft .IS-notification-notice-bouncein-enter, .IS-notification-bottomLeft .IS-notification-notice-bouncein-enter {\n animation-name: NotificationLeftFadeIn;\n animation-play-state: running; }\n .IS-notification-notice-fadeout {\n animation-name: NotificationFadeOut;\n animation-play-state: running; }\n\n@keyframes NotificationFadeIn {\n 0% {\n opacity: 0;\n left: 320px; }\n 100% {\n left: 0;\n opacity: 1; } }\n\n@keyframes NotificationLeftFadeIn {\n 0% {\n opacity: 0;\n right: 320px; }\n 100% {\n right: 0;\n opacity: 1; } }\n\n@keyframes NotificationFadeOut {\n 0% {\n opacity: 1;\n margin-bottom: 16px;\n padding-top: 16px 24px;\n padding-bottom: 16px 24px;\n max-height: 150px; }\n 100% {\n opacity: 0;\n margin-bottom: 0;\n padding-top: 0;\n padding-bottom: 0;\n max-height: 0; } }\n",""])},function(t,e){t.exports=function(){var a=[];return a.toString=function(){for(var t=[],e=0;e<this.length;e++){var n=this[e];n[2]?t.push("@media "+n[2]+"{"+n[1]+"}"):t.push(n[1])}return t.join("")},a.i=function(t,e){"string"==typeof t&&(t=[[null,t,""]]);for(var n={},o=0;o<this.length;o++){var r=this[o][0];"number"==typeof r&&(n[r]=!0)}for(o=0;o<t.length;o++){var i=t[o];"number"==typeof i[0]&&n[i[0]]||(e&&!i[2]?i[2]=e:e&&(i[2]="("+i[2]+") and ("+e+")"),a.push(i))}},a}},function(t,e){function n(t){var e;return function(){return void 0===e&&(e=t.apply(this,arguments)),e}}var u={},o=n(function(){return/msie [6-9]\b/.test(self.navigator.userAgent.toLowerCase())}),r=n(function(){return document.head||document.getElementsByTagName("head")[0]}),a=null,c=0,i=[];function f(t,e){for(var n=0;n<t.length;n++){var o=t[n],r=u[o.id];if(r){r.refs++;for(var i=0;i<r.parts.length;i++)r.parts[i](o.parts[i]);for(;i<o.parts.length;i++)r.parts.push(m(o.parts[i],e))}else{var a=[];for(i=0;i<o.parts.length;i++)a.push(m(o.parts[i],e));u[o.id]={id:o.id,refs:1,parts:a}}}}function s(t){for(var e=[],n={},o=0;o<t.length;o++){var r=t[o],i=r[0],a={css:r[1],media:r[2],sourceMap:r[3]};n[i]?n[i].parts.push(a):e.push(n[i]={id:i,parts:[a]})}return e}function l(t,e){var n=r(),o=i[i.length-1];if("top"===t.insertAt)o?o.nextSibling?n.insertBefore(e,o.nextSibling):n.appendChild(e):n.insertBefore(e,n.firstChild),i.push(e);else{if("bottom"!==t.insertAt)throw new Error("Invalid value for parameter 'insertAt'. Must be 'top' or 'bottom'.");n.appendChild(e)}}function p(t){t.parentNode.removeChild(t);var e=i.indexOf(t);0<=e&&i.splice(e,1)}function d(t){var e=document.createElement("style");return e.type="text/css",l(t,e),e}function m(e,t){var n,o,r;if(t.singleton){var i=c++;n=a||(a=d(t)),o=h.bind(null,n,i,!1),r=h.bind(null,n,i,!0)}else r=e.sourceMap&&"function"==typeof URL&&"function"==typeof URL.createObjectURL&&"function"==typeof URL.revokeObjectURL&&"function"==typeof Blob&&"function"==typeof btoa?(n=function(t){var e=document.createElement("link");return e.rel="stylesheet",l(t,e),e}(t),o=function(t,e){var n=e.css,o=e.sourceMap;o&&(n+="\n/*# sourceMappingURL=data:application/json;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(o))))+" */");var r=new Blob([n],{type:"text/css"}),i=t.href;t.href=URL.createObjectURL(r),i&&URL.revokeObjectURL(i)}.bind(null,n),function(){p(n),n.href&&URL.revokeObjectURL(n.href)}):(n=d(t),o=function(t,e){var n=e.css,o=e.media;o&&t.setAttribute("media",o);if(t.styleSheet)t.styleSheet.cssText=n;else{for(;t.firstChild;)t.removeChild(t.firstChild);t.appendChild(document.createTextNode(n))}}.bind(null,n),function(){p(n)});return o(e),function(t){if(t){if(t.css===e.css&&t.media===e.media&&t.sourceMap===e.sourceMap)return;o(e=t)}else r()}}t.exports=function(t,a){if("undefined"!=typeof DEBUG&&DEBUG&&"object"!=typeof document)throw new Error("The style-loader cannot be used in a non-browser environment");void 0===(a=a||{}).singleton&&(a.singleton=o()),void 0===a.insertAt&&(a.insertAt="bottom");var c=s(t);return f(c,a),function(t){for(var e=[],n=0;n<c.length;n++){var o=c[n];(r=u[o.id]).refs--,e.push(r)}t&&f(s(t),a);for(n=0;n<e.length;n++){var r;if(0===(r=e[n]).refs){for(var i=0;i<r.parts.length;i++)r.parts[i]();delete u[r.id]}}}};var y,b=(y=[],function(t,e){return y[t]=e,y.filter(Boolean).join("\n")});function h(t,e,n,o){var r=n?"":o.css;if(t.styleSheet)t.styleSheet.cssText=b(e,r);else{var i=document.createTextNode(r),a=t.childNodes;a[e]&&t.removeChild(a[e]),a.length?t.insertBefore(i,a[e]):t.appendChild(i)}}},function(t,e,n){"use strict";n.r(e);var o=n(2),u=n.n(o),c=n(8),f=n(9);function s(t,e){if(null==t)return{};var n,o,r=function(t,e){if(null==t)return{};var n,o,r={},i=Object.keys(t);for(o=0;o<i.length;o++)n=i[o],0<=e.indexOf(n)||(r[n]=t[n]);return r}(t,e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);for(o=0;o<i.length;o++)n=i[o],0<=e.indexOf(n)||Object.prototype.propertyIsEnumerable.call(t,n)&&(r[n]=t[n])}return r}function a(t){return(a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function l(){return(l=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(t[o]=n[o])}return t}).apply(this,arguments)}function r(t,e){for(var n=0;n<e.length;n++){var o=e[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}function p(t){return(p=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function d(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function m(t,e){return(m=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function y(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var b=0,h=Date.now();var v=function(){function i(){var t,n;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,i);for(var e=arguments.length,o=new Array(e),r=0;r<e;r++)o[r]=arguments[r];return y(d(n=function(t,e){return!e||"object"!==a(e)&&"function"!=typeof e?d(t):e}(this,(t=p(i)).call.apply(t,[this].concat(o)))),"state",{notices:[]}),y(d(n),"add",function(r){var i=r.key=r.key||"rcNotification_".concat(h,"_").concat(b++),a=n.props.maxCount;n.setState(function(t){var e=t.notices,n=e.map(function(t){return t.key}).indexOf(i),o=e.concat();return-1!==n?o.splice(n,1,r):(a&&e.length>=a&&(r.updateKey=o[0].updateKey||o[0].key,o.shift()),o.push(r)),{notices:o}})}),y(d(n),"remove",function(e){n.setState(function(t){return{notices:t.notices.filter(function(t){return t.key!==e})}})}),n}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&m(t,e)}(i,u.a.Component),function(t,e,n){e&&r(t.prototype,e),n&&r(t,n)}(i,[{key:"getTransitionName",value:function(){var t=this.props,e=t.transitionName;return!e&&t.animation&&(e="".concat(t.prefixCls,"-").concat(t.animation)),e}},{key:"render",value:function(){var i=this,a=this.props,c=this.state.notices,t=c.map(function(t,e){var n=Boolean(e===c.length-1&&t.updateKey),o=t.updateKey?t.updateKey:t.key,r=function(){var e=[].slice.call(arguments,0);return 1===e.length?e[0]:function(){for(var t=0;t<e.length;t++)e[t]&&e[t].apply&&e[t].apply(this,arguments)}}(i.remove.bind(i,t.key),t.onClose);return u.a.createElement(f.default,l({prefixCls:a.prefixCls},t,{key:o,update:n,onClose:r,onClick:t.onClick,closeIcon:a.closeIcon}),t.content)});return u.a.createElement("div",{className:"".concat(a.prefixCls," ").concat(a.className),style:a.style},u.a.createElement("div",{className:this.getTransitionName()},t))}}]),i}();y(v,"defaultProps",{prefixCls:"IS-notification",animation:"fade"}),v.newInstance=function(t,n){var e=t||{},o=e.getContainer,r=s(e,["getContainer"]),i=document.createElement("div");o?o().appendChild(i):document.body.appendChild(i);var a=!1;c.render(u.a.createElement(v,l({},r,{ref:function(e){a||(a=!0,n({notice:function(t){e.add(t)},removeNotice:function(t){e.remove(t)},component:e,destroy:function(){c.unmountComponentAtNode(i),i.parentNode.removeChild(i)}}))}})),i)},e.default=v},function(t,e){t.exports=o},function(t,e,n){"use strict";n.r(e),n.d(e,"default",function(){return i});var o=n(2),r=n.n(o),a=n(10);function c(t){return(c="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function u(t,e){for(var n=0;n<e.length;n++){var o=e[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}function f(t){return(f=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function s(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function l(t,e){return(l=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function p(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var i=function(){function i(){var t,e;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,i);for(var n=arguments.length,o=new Array(n),r=0;r<n;r++)o[r]=arguments[r];return p(s(e=function(t,e){return!e||"object"!==c(e)&&"function"!=typeof e?s(t):e}(this,(t=f(i)).call.apply(t,[this].concat(o)))),"state",{fadein:!0}),p(s(e),"closeHander",function(t){t&&t.stopPropagation(),e.setState(function(t){return{fadein:!t.fadein}})}),p(s(e),"close",function(){e.clearCloseTimer(),e.props.onClose()}),p(s(e),"startCloseTimer",function(){e.props.duration&&(e.closeTimer=setTimeout(function(){e.closeHander()},1e3*e.props.duration))}),p(s(e),"clearCloseTimer",function(){e.closeTimer&&(clearTimeout(e.closeTimer),e.closeTimer=null)}),e}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&l(t,e)}(i,o["Component"]),function(t,e,n){e&&u(t.prototype,e),n&&u(t,n)}(i,[{key:"componentDidMount",value:function(){this.startCloseTimer()}},{key:"componentDidUpdate",value:function(t){this.props.duration===t.duration&&!this.props.update||this.restartCloseTimer()}},{key:"componentWillUnmount",value:function(){this.clearCloseTimer()}},{key:"restartCloseTimer",value:function(){this.clearCloseTimer(),this.startCloseTimer()}},{key:"render",value:function(){var t=this.props,e="".concat(t.prefixCls,"-notice");return r.a.createElement(a.default,{fadein:this.state.fadein,onExited:this.close,className:"".concat(e)},r.a.createElement("div",{className:"".concat(e," "),style:t.style,onMouseEnter:this.clearCloseTimer,onMouseLeave:this.startCloseTimer,onClick:this.closeHander},r.a.createElement("div",{className:"".concat(e,"-content")},t.children)))}}]),i}()},function(t,e,n){"use strict";n.r(e),n.d(e,"default",function(){return i});var o=n(2),r=n.n(o),a=n(11);function c(t){return(c="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function u(t,e){for(var n=0;n<e.length;n++){var o=e[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}function f(t){return(f=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function s(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function l(t,e){return(l=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function p(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var i=function(){function i(){var t,e;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,i);for(var n=arguments.length,o=new Array(n),r=0;r<n;r++)o[r]=arguments[r];return p(s(e=function(t,e){return!e||"object"!==c(e)&&"function"!=typeof e?s(t):e}(this,(t=f(i)).call.apply(t,[this].concat(o)))),"state",{fadeinenter:!1,fadeoutenter:!1}),p(s(e),"onEnter",function(){e.setState({fadeinenter:!0})}),p(s(e),"onEntered",function(){e.setState({fadeinenter:!1})}),p(s(e),"onExit",function(){e.setState({fadeoutenter:!0})}),p(s(e),"onExited",function(){e.props.onExited(),e.setState({fadeoutenter:!1})}),e}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&l(t,e)}(i,o["Component"]),function(t,e,n){e&&u(t.prototype,e),n&&u(t,n)}(i,[{key:"render",value:function(){var t=this.props.className,e="".concat(t,"-fade"),n=this.state.fadeinenter?"".concat(e,"-bouncein-enter"):"",o=this.state.fadeoutenter?"".concat(e,"-fadeout"):"";return r.a.createElement(a.Fade,{in:this.props.fadein,onEnter:this.onEnter,onEntered:this.onEntered,onExit:this.onExit,onExited:this.onExited,className:"".concat(e," ").concat(n," ").concat(o)},this.props.children)}}]),i}()},function(t,e){t.exports=r}],i.c=c,i.d=function(t,e,n){i.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},i.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},i.t=function(e,t){if(1&t&&(e=i(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(i.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)i.d(n,o,function(t){return e[t]}.bind(null,o));return n},i.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return i.d(e,"a",e),e},i.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},i.p="",i(i.s=0)).default;function i(t){if(c[t])return c[t].exports;var e=c[t]={i:t,l:!1,exports:{}};return a[t].call(e.exports,e,e.exports,i),e.l=!0,e.exports}var a,c});
!function(t,n){"object"==typeof exports&&"object"==typeof module?module.exports=n(require("react"),require("react-dom"),require("react-transition-group")):"function"==typeof define&&define.amd?define(["react","react-dom","react-transition-group"],n):"object"==typeof exports?exports.Tip=n(require("react"),require("react-dom"),require("react-transition-group")):t.Tip=n(t.react,t["react-dom"],t["react-transition-group"])}(window,function(e,o,i){return(c={},r.m=a=[function(t,n,e){"use strict";e.r(n);var o=e(1);n.default=o.default},function(t,n,e){"use strict";e.r(n);var o=e(2),c=e.n(o),a=(e(3),e(7));function i(t,n,e){return n in t?Object.defineProperty(t,n,{value:e,enumerable:!0,configurable:!0,writable:!0}):t[n]=e,t}var f={},u={warning:"#faad14",success:"#52c41a",info:"#fff",error:"#f5222d"},s=4.5,l="24px",p="24px",d="bottomRight",m=null;function y(t,n,e){var o=1<arguments.length&&void 0!==n?n:d,i=2<arguments.length?e:void 0,r="".concat(t,"-").concat(o);f[r]?i(f[r]):a.default.newInstance({prefixCls:t,className:o?"".concat(t,"-").concat(o):"",style:function(t){var n;switch(t){case"topLeft":n={left:0,top:l,bottom:"auto"};break;case"topRight":n={right:0,top:l,bottom:"auto"};break;case"bottomLeft":n={left:0,top:"auto",bottom:p};break;default:n={right:0,top:"auto",bottom:p}}return n}(o),getContainer:m,closeIcon:c.a.createElement("img",{src:"/images/close-icon.svg",alt:"close"})},function(t){f[r]=t,i(t)})}var r={open:function(n){var t=n.prefixCls||"IS-notification",e="".concat(t,"-notice"),o=void 0===n.duration?s:n.duration,i={background:"#FFF"};n.type&&(i={background:u[n.type]},i=n.style?Object.assign(i,n.style):i);var r=n.message?n.message:n.type?n.type:"",a=c.a.createElement("div",{className:"".concat(e,"-with-").concat(n.type)},c.a.createElement("div",{className:"".concat(e,"-message")},r),c.a.createElement("div",{className:"".concat(e,"-description")},n.description),n.btn?c.a.createElement("span",{className:"".concat(e,"-btn")},n.btn):null);y(t,n.placement,function(t){t.notice({content:a,duration:o,closable:!0,key:n.key,style:i||{},className:n.className})})},close:function(n){Object.keys(f).forEach(function(t){return f[t].removeNotice(n)})},config:function(t){var n=t.duration,e=t.bottom,o=t.placement,i=t.top,r=t.getContainer;void 0!==n&&(s=n),void 0!==o&&(d=o),void 0!==e&&(p=e),void 0!==i&&(l=i),void 0!==r&&(m=r)},destroy:function(){Object.keys(f).forEach(function(t){f[t].destroy(),delete f[t]})}};["success","info","warning","error"].forEach(function(n){r[n]=function(t){return r.open(function(n){for(var t=1;t<arguments.length;t++){var e=null!=arguments[t]?arguments[t]:{},o=Object.keys(e);"function"==typeof Object.getOwnPropertySymbols&&(o=o.concat(Object.getOwnPropertySymbols(e).filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),o.forEach(function(t){i(n,t,e[t])})}return n}({},t,{type:n}))}}),n.default=r},function(t,n){t.exports=e},function(t,n,e){var o=e(4);"string"==typeof o&&(o=[[t.i,o,""]]);e(6)(o,{});o.locals&&(t.exports=o.locals)},function(t,n,e){(t.exports=e(5)()).push([t.i,".IS-notification {\n position: fixed;\n z-index: 9999;\n width: 320px;\n max-width: calc(100vw - 32px);\n margin-right: 24px;\n color: rgba(0, 0, 0, 0.65); }\n .IS-notification-notice {\n position: relative;\n margin-bottom: 16px;\n overflow: hidden;\n line-height: 1.5;\n background: #fff;\n border-radius: 4px;\n -webkit-box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);\n box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15); }\n .IS-notification-notice-close {\n position: absolute;\n top: 16px;\n right: 22px;\n color: rgba(0, 0, 0, 0.45);\n cursor: pointer;\n outline: none; }\n .IS-notification-notice-content {\n padding: 16px 24px; }\n .IS-notification-notice-message {\n display: inline-block;\n padding-right: 24px;\n margin-bottom: 8px;\n color: rgba(0, 0, 0, 0.85);\n font-size: 16px;\n line-height: 24px; }\n .IS-notification-notice-description {\n font-size: 14px; }\n .IS-notification-notice-with-icon .IS-notification-notice-message,\n .IS-notification-notice-with-icon .IS-notification-notice-description {\n margin-bottom: 4px;\n margin-left: 48px;\n font-size: 16px; }\n .IS-notification-notice-icon {\n position: absolute;\n margin-left: 4px;\n height: 24px;\n width: 24px;\n font-size: 24px;\n line-height: 24px; }\n .IS-notification-notice-with-success {\n color: #fff;\n background-color: #52c41a; }\n .IS-notification-notice-with-success .IS-notification-notice-message {\n color: #fff; }\n .IS-notification-notice-with-warning {\n color: #333;\n background-color: #faad14; }\n .IS-notification-notice-with-warning .IS-notification-notice-message {\n color: #333; }\n .IS-notification-notice-with-error {\n color: #fff;\n background-color: #f5222d; }\n .IS-notification-notice-with-error .IS-notification-notice-message {\n color: #fff; }\n .IS-notification-notice-fade {\n position: relative;\n animation-duration: 0.24s;\n animation-timing-function: cubic-bezier(0.645, 0.045, 0.355, 1);\n animation-fill-mode: both; }\n .IS-notification-topRight .fade-entering, .IS-notification-bottomRight .fade-entering {\n animation-name: NotificationFadeIn;\n animation-play-state: running; }\n .IS-notification-topRight .fade-entered, .IS-notification-bottomRight .fade-entered {\n animation-play-state: paused; }\n .IS-notification-topRight .fade-exiting, .IS-notification-bottomRight .fade-exiting {\n animation-name: NotificationFadeOut;\n animation-play-state: running; }\n .IS-notification-topRight .fade-entered, .IS-notification-bottomRight .fade-entered {\n animation-duration: 0.2s;\n animation-play-state: paused; }\n .IS-notification-topLeft .fade-entering, .IS-notification-bottomLeft .fade-entering {\n animation-name: NotificationLeftFadeIn;\n animation-play-state: running; }\n .IS-notification-topLeft .fade-entered, .IS-notification-bottomLeft .fade-entered {\n animation-play-state: paused; }\n .IS-notification-topLeft .fade-exiting, .IS-notification-bottomLeft .fade-exiting {\n animation-name: NotificationFadeOut;\n animation-play-state: running; }\n .IS-notification-topLeft .fade-exited, .IS-notification-bottomLeft .fade-exited {\n animation-duration: 0.2s;\n animation-play-state: paused; }\n\n@keyframes NotificationFadeIn {\n 0% {\n opacity: 0;\n left: 320px; }\n 100% {\n left: 0;\n opacity: 1; } }\n\n@keyframes NotificationLeftFadeIn {\n 0% {\n opacity: 0;\n right: 320px; }\n 100% {\n right: 0;\n opacity: 1; } }\n\n@keyframes NotificationFadeOut {\n 0% {\n opacity: 1;\n margin-bottom: 16px;\n padding-top: 16px 24px;\n padding-bottom: 16px 24px;\n max-height: 150px; }\n 100% {\n opacity: 0;\n margin-bottom: 0;\n padding-top: 0;\n padding-bottom: 0;\n max-height: 0; } }\n",""])},function(t,n){t.exports=function(){var a=[];return a.toString=function(){for(var t=[],n=0;n<this.length;n++){var e=this[n];e[2]?t.push("@media "+e[2]+"{"+e[1]+"}"):t.push(e[1])}return t.join("")},a.i=function(t,n){"string"==typeof t&&(t=[[null,t,""]]);for(var e={},o=0;o<this.length;o++){var i=this[o][0];"number"==typeof i&&(e[i]=!0)}for(o=0;o<t.length;o++){var r=t[o];"number"==typeof r[0]&&e[r[0]]||(n&&!r[2]?r[2]=n:n&&(r[2]="("+r[2]+") and ("+n+")"),a.push(r))}},a}},function(t,n){function e(t){var n;return function(){return void 0===n&&(n=t.apply(this,arguments)),n}}var f={},o=e(function(){return/msie [6-9]\b/.test(self.navigator.userAgent.toLowerCase())}),i=e(function(){return document.head||document.getElementsByTagName("head")[0]}),a=null,c=0,r=[];function u(t,n){for(var e=0;e<t.length;e++){var o=t[e],i=f[o.id];if(i){i.refs++;for(var r=0;r<i.parts.length;r++)i.parts[r](o.parts[r]);for(;r<o.parts.length;r++)i.parts.push(m(o.parts[r],n))}else{var a=[];for(r=0;r<o.parts.length;r++)a.push(m(o.parts[r],n));f[o.id]={id:o.id,refs:1,parts:a}}}}function s(t){for(var n=[],e={},o=0;o<t.length;o++){var i=t[o],r=i[0],a={css:i[1],media:i[2],sourceMap:i[3]};e[r]?e[r].parts.push(a):n.push(e[r]={id:r,parts:[a]})}return n}function l(t,n){var e=i(),o=r[r.length-1];if("top"===t.insertAt)o?o.nextSibling?e.insertBefore(n,o.nextSibling):e.appendChild(n):e.insertBefore(n,e.firstChild),r.push(n);else{if("bottom"!==t.insertAt)throw new Error("Invalid value for parameter 'insertAt'. Must be 'top' or 'bottom'.");e.appendChild(n)}}function p(t){t.parentNode.removeChild(t);var n=r.indexOf(t);0<=n&&r.splice(n,1)}function d(t){var n=document.createElement("style");return n.type="text/css",l(t,n),n}function m(n,t){var e,o,i;if(t.singleton){var r=c++;e=a||(a=d(t)),o=h.bind(null,e,r,!1),i=h.bind(null,e,r,!0)}else i=n.sourceMap&&"function"==typeof URL&&"function"==typeof URL.createObjectURL&&"function"==typeof URL.revokeObjectURL&&"function"==typeof Blob&&"function"==typeof btoa?(e=function(t){var n=document.createElement("link");return n.rel="stylesheet",l(t,n),n}(t),o=function(t,n){var e=n.css,o=n.sourceMap;o&&(e+="\n/*# sourceMappingURL=data:application/json;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(o))))+" */");var i=new Blob([e],{type:"text/css"}),r=t.href;t.href=URL.createObjectURL(i),r&&URL.revokeObjectURL(r)}.bind(null,e),function(){p(e),e.href&&URL.revokeObjectURL(e.href)}):(e=d(t),o=function(t,n){var e=n.css,o=n.media;o&&t.setAttribute("media",o);if(t.styleSheet)t.styleSheet.cssText=e;else{for(;t.firstChild;)t.removeChild(t.firstChild);t.appendChild(document.createTextNode(e))}}.bind(null,e),function(){p(e)});return o(n),function(t){if(t){if(t.css===n.css&&t.media===n.media&&t.sourceMap===n.sourceMap)return;o(n=t)}else i()}}t.exports=function(t,a){if("undefined"!=typeof DEBUG&&DEBUG&&"object"!=typeof document)throw new Error("The style-loader cannot be used in a non-browser environment");void 0===(a=a||{}).singleton&&(a.singleton=o()),void 0===a.insertAt&&(a.insertAt="bottom");var c=s(t);return u(c,a),function(t){for(var n=[],e=0;e<c.length;e++){var o=c[e];(i=f[o.id]).refs--,n.push(i)}t&&u(s(t),a);for(e=0;e<n.length;e++){var i;if(0===(i=n[e]).refs){for(var r=0;r<i.parts.length;r++)i.parts[r]();delete f[i.id]}}}};var y,b=(y=[],function(t,n){return y[t]=n,y.filter(Boolean).join("\n")});function h(t,n,e,o){var i=e?"":o.css;if(t.styleSheet)t.styleSheet.cssText=b(n,i);else{var r=document.createTextNode(i),a=t.childNodes;a[n]&&t.removeChild(a[n]),a.length?t.insertBefore(r,a[n]):t.appendChild(r)}}},function(t,n,e){"use strict";e.r(n);var o=e(2),f=e.n(o),c=e(8),u=e(9);function s(t,n){if(null==t)return{};var e,o,i=function(t,n){if(null==t)return{};var e,o,i={},r=Object.keys(t);for(o=0;o<r.length;o++)e=r[o],0<=n.indexOf(e)||(i[e]=t[e]);return i}(t,n);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);for(o=0;o<r.length;o++)e=r[o],0<=n.indexOf(e)||Object.prototype.propertyIsEnumerable.call(t,e)&&(i[e]=t[e])}return i}function a(t){return(a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function l(){return(l=Object.assign||function(t){for(var n=1;n<arguments.length;n++){var e=arguments[n];for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])}return t}).apply(this,arguments)}function i(t,n){for(var e=0;e<n.length;e++){var o=n[e];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}function p(t){return(p=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function d(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function m(t,n){return(m=Object.setPrototypeOf||function(t,n){return t.__proto__=n,t})(t,n)}function y(t,n,e){return n in t?Object.defineProperty(t,n,{value:e,enumerable:!0,configurable:!0,writable:!0}):t[n]=e,t}var b=0,h=Date.now();var g=function(){function r(){var t,e;!function(t,n){if(!(t instanceof n))throw new TypeError("Cannot call a class as a function")}(this,r);for(var n=arguments.length,o=new Array(n),i=0;i<n;i++)o[i]=arguments[i];return y(d(e=function(t,n){return!n||"object"!==a(n)&&"function"!=typeof n?d(t):n}(this,(t=p(r)).call.apply(t,[this].concat(o)))),"state",{notices:[]}),y(d(e),"add",function(i){var r=i.key=i.key||"rcNotification_".concat(h,"_").concat(b++),a=e.props.maxCount;e.setState(function(t){var n=t.notices,e=n.map(function(t){return t.key}).indexOf(r),o=n.concat();return-1!==e?o.splice(e,1,i):(a&&n.length>=a&&(i.updateKey=o[0].updateKey||o[0].key,o.shift()),o.push(i)),{notices:o}})}),y(d(e),"remove",function(n){e.setState(function(t){return{notices:t.notices.filter(function(t){return t.key!==n})}})}),e}return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(n&&n.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),n&&m(t,n)}(r,f.a.Component),function(t,n,e){n&&i(t.prototype,n),e&&i(t,e)}(r,[{key:"getTransitionName",value:function(){var t=this.props,n=t.transitionName;return!n&&t.animation&&(n="".concat(t.prefixCls,"-").concat(t.animation)),n}},{key:"render",value:function(){var r=this,a=this.props,c=this.state.notices,t=c.map(function(t,n){var e=Boolean(n===c.length-1&&t.updateKey),o=t.updateKey?t.updateKey:t.key,i=function(){var n=[].slice.call(arguments,0);return 1===n.length?n[0]:function(){for(var t=0;t<n.length;t++)n[t]&&n[t].apply&&n[t].apply(this,arguments)}}(r.remove.bind(r,t.key),t.onClose);return f.a.createElement(u.default,l({prefixCls:a.prefixCls},t,{key:o,update:e,onClose:i,onClick:t.onClick,closeIcon:a.closeIcon}),t.content)});return f.a.createElement("div",{className:"".concat(a.prefixCls," ").concat(a.className),style:a.style},f.a.createElement("div",{className:this.getTransitionName()},t))}}]),r}();y(g,"defaultProps",{prefixCls:"IS-notification",animation:"fade"}),g.newInstance=function(t,e){var n=t||{},o=n.getContainer,i=s(n,["getContainer"]),r=document.createElement("div");o?o().appendChild(r):document.body.appendChild(r);var a=!1;c.render(f.a.createElement(g,l({},i,{ref:function(n){a||(a=!0,e({notice:function(t){n.add(t)},removeNotice:function(t){n.remove(t)},component:n,destroy:function(){c.unmountComponentAtNode(r),r.parentNode.removeChild(r)}}))}})),r)},n.default=g},function(t,n){t.exports=o},function(t,n,e){"use strict";e.r(n),e.d(n,"default",function(){return r});var o=e(2),i=e.n(o),a=e(10);function c(t){return(c="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function f(t,n){for(var e=0;e<n.length;e++){var o=n[e];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}function u(t){return(u=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function s(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function l(t,n){return(l=Object.setPrototypeOf||function(t,n){return t.__proto__=n,t})(t,n)}function p(t,n,e){return n in t?Object.defineProperty(t,n,{value:e,enumerable:!0,configurable:!0,writable:!0}):t[n]=e,t}var r=function(){function r(){var t,n;!function(t,n){if(!(t instanceof n))throw new TypeError("Cannot call a class as a function")}(this,r);for(var e=arguments.length,o=new Array(e),i=0;i<e;i++)o[i]=arguments[i];return p(s(n=function(t,n){return!n||"object"!==c(n)&&"function"!=typeof n?s(t):n}(this,(t=u(r)).call.apply(t,[this].concat(o)))),"state",{fadein:!0}),p(s(n),"closeHander",function(t){t&&t.stopPropagation(),n.setState(function(t){return{fadein:!t.fadein}})}),p(s(n),"close",function(){n.clearCloseTimer(),n.props.onClose()}),p(s(n),"startCloseTimer",function(){n.props.duration&&(n.closeTimer=setTimeout(function(){n.closeHander()},1e3*n.props.duration))}),p(s(n),"clearCloseTimer",function(){n.closeTimer&&(clearTimeout(n.closeTimer),n.closeTimer=null)}),n}return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(n&&n.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),n&&l(t,n)}(r,o["Component"]),function(t,n,e){n&&f(t.prototype,n),e&&f(t,e)}(r,[{key:"componentDidMount",value:function(){this.startCloseTimer()}},{key:"componentDidUpdate",value:function(t){this.props.duration===t.duration&&!this.props.update||this.restartCloseTimer()}},{key:"componentWillUnmount",value:function(){this.clearCloseTimer()}},{key:"restartCloseTimer",value:function(){this.clearCloseTimer(),this.startCloseTimer()}},{key:"render",value:function(){var t=this.props,n="".concat(t.prefixCls,"-notice");return i.a.createElement(a.default,{fadein:this.state.fadein,onExited:this.close,className:"".concat(n)},i.a.createElement("div",{className:"".concat(n," "),style:t.style,onMouseEnter:this.clearCloseTimer,onMouseLeave:this.startCloseTimer,onClick:this.closeHander},i.a.createElement("div",{className:"".concat(n,"-content")},t.children)))}}]),r}()},function(t,n,e){"use strict";e.r(n),e.d(n,"default",function(){return r});var o=e(2),i=e.n(o),a=e(11);function c(t){return(c="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function f(t,n){for(var e=0;e<n.length;e++){var o=n[e];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}function u(t){return(u=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function s(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function l(t,n){return(l=Object.setPrototypeOf||function(t,n){return t.__proto__=n,t})(t,n)}var r=function(){function r(){var t,n;!function(t,n){if(!(t instanceof n))throw new TypeError("Cannot call a class as a function")}(this,r);for(var e=arguments.length,o=new Array(e),i=0;i<e;i++)o[i]=arguments[i];return function(t,n,e){n in t?Object.defineProperty(t,n,{value:e,enumerable:!0,configurable:!0,writable:!0}):t[n]=e}(s(n=function(t,n){return!n||"object"!==c(n)&&"function"!=typeof n?s(t):n}(this,(t=u(r)).call.apply(t,[this].concat(o)))),"onExited",function(){n.props.onExited()}),n}return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(n&&n.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),n&&l(t,n)}(r,o["Component"]),function(t,n,e){n&&f(t.prototype,n),e&&f(t,e)}(r,[{key:"render",value:function(){var n=this,t=this.props.className,e="".concat(t,"-fade");return i.a.createElement(a.Transition,{in:this.props.fadein,onExited:this.onExited,unmountOnExit:!1,timeout:300,appear:!0},function(t){return i.a.createElement("div",{className:"".concat(e," fade-").concat(t)},n.props.children)})}}]),r}()},function(t,n){t.exports=i}],r.c=c,r.d=function(t,n,e){r.o(t,n)||Object.defineProperty(t,n,{enumerable:!0,get:e})},r.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},r.t=function(n,t){if(1&t&&(n=r(n)),8&t)return n;if(4&t&&"object"==typeof n&&n&&n.__esModule)return n;var e=Object.create(null);if(r.r(e),Object.defineProperty(e,"default",{enumerable:!0,value:n}),2&t&&"string"!=typeof n)for(var o in n)r.d(e,o,function(t){return n[t]}.bind(null,o));return e},r.n=function(t){var n=t&&t.__esModule?function(){return t.default}:function(){return t};return r.d(n,"a",n),n},r.o=function(t,n){return Object.prototype.hasOwnProperty.call(t,n)},r.p="",r(r.s=0)).default;function r(t){if(c[t])return c[t].exports;var n=c[t]={i:t,l:!1,exports:{}};return a[t].call(n.exports,n,n.exports,r),n.l=!0,n.exports}var a,c});
{
"name": "notification-test",
"version": "1.0.4",
"version": "1.0.5",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1",
"build": "webpack --progress"
"clean": "rimraf dist/*",
"build": "npm run clean && webpack --progress"
},

@@ -24,5 +25,5 @@ "author": "lucy",

"@babel/polyfill": "^7.0.0",
"reactstrap": "^8.0.0",
"react": "^16.8.6",
"react-dom": "^16.8.6"
"react-dom": "^16.8.6",
"react-transition-group": "^4.0.1"
},

@@ -29,0 +30,0 @@ "devDependencies": {

@@ -67,1 +67,25 @@ # notification-test

```
### Notifications position
```js
Tip.info({
message:'info',
description:'info',
placement: 'topLeft'
})
Tip.success({
message:'success',
description:'success',
placement: 'bottomLeft'
})
Tip.warning({
message:'warning',
description:'warning',
placement: 'topRight'
})
Tip.error({
message:'error',
description:'error',
placement: 'bottomRight'
})
```

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc