react-transition-group
Advanced tools
Comparing version 2.5.2 to 2.5.3
@@ -0,1 +1,8 @@ | ||
## [2.5.3](https://github.com/reactjs/react-transition-group/compare/v2.5.2...v2.5.3) (2019-01-14) | ||
### Bug Fixes | ||
* strip custom prop-types in production ([#448](https://github.com/reactjs/react-transition-group/issues/448)) ([46fa20f](https://github.com/reactjs/react-transition-group/commit/46fa20f)) | ||
## [2.5.2](https://github.com/reactjs/react-transition-group/compare/v2.5.1...v2.5.2) (2018-12-20) | ||
@@ -2,0 +9,0 @@ |
@@ -22,6 +22,6 @@ "use strict"; | ||
function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); } | ||
function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; subClass.__proto__ = superClass; } | ||
function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); } | ||
var addClass = function addClass(node, classes) { | ||
@@ -38,98 +38,2 @@ return node && classes && classes.split(' ').forEach(function (c) { | ||
}; | ||
var propTypes = process.env.NODE_ENV !== "production" ? _extends({}, _Transition.default.propTypes, { | ||
/** | ||
* The animation classNames applied to the component as it enters, exits or has finished the transition. | ||
* A single name can be provided and it will be suffixed for each stage: e.g. | ||
* | ||
* `classNames="fade"` applies `fade-enter`, `fade-enter-active`, `fade-enter-done`, | ||
* `fade-exit`, `fade-exit-active`, `fade-exit-done`, `fade-appear`, and `fade-appear-active`. | ||
* Each individual classNames can also be specified independently like: | ||
* | ||
* ```js | ||
* classNames={{ | ||
* appear: 'my-appear', | ||
* appearActive: 'my-active-appear', | ||
* enter: 'my-enter', | ||
* enterActive: 'my-active-enter', | ||
* enterDone: 'my-done-enter', | ||
* exit: 'my-exit', | ||
* exitActive: 'my-active-exit', | ||
* exitDone: 'my-done-exit', | ||
* }} | ||
* ``` | ||
* | ||
* If you want to set these classes using CSS Modules: | ||
* | ||
* ```js | ||
* import styles from './styles.css'; | ||
* ``` | ||
* | ||
* you might want to use camelCase in your CSS file, that way could simply spread | ||
* them instead of listing them one by one: | ||
* | ||
* ```js | ||
* classNames={{ ...styles }} | ||
* ``` | ||
* | ||
* @type {string | { | ||
* appear?: string, | ||
* appearActive?: string, | ||
* enter?: string, | ||
* enterActive?: string, | ||
* enterDone?: string, | ||
* exit?: string, | ||
* exitActive?: string, | ||
* exitDone?: string, | ||
* }} | ||
*/ | ||
classNames: _PropTypes.classNamesShape, | ||
/** | ||
* A `<Transition>` callback fired immediately after the 'enter' or 'appear' class is | ||
* applied. | ||
* | ||
* @type Function(node: HtmlElement, isAppearing: bool) | ||
*/ | ||
onEnter: PropTypes.func, | ||
/** | ||
* A `<Transition>` callback fired immediately after the 'enter-active' or | ||
* 'appear-active' class is applied. | ||
* | ||
* @type Function(node: HtmlElement, isAppearing: bool) | ||
*/ | ||
onEntering: PropTypes.func, | ||
/** | ||
* A `<Transition>` callback fired immediately after the 'enter' or | ||
* 'appear' classes are **removed** and the `done` class is added to the DOM node. | ||
* | ||
* @type Function(node: HtmlElement, isAppearing: bool) | ||
*/ | ||
onEntered: PropTypes.func, | ||
/** | ||
* A `<Transition>` callback fired immediately after the 'exit' class is | ||
* applied. | ||
* | ||
* @type Function(node: HtmlElement) | ||
*/ | ||
onExit: PropTypes.func, | ||
/** | ||
* A `<Transition>` callback fired immediately after the 'exit-active' is applied. | ||
* | ||
* @type Function(node: HtmlElement) | ||
*/ | ||
onExiting: PropTypes.func, | ||
/** | ||
* A `<Transition>` callback fired immediately after the 'exit' classes | ||
* are **removed** and the `exit-done` class is added to the DOM node. | ||
* | ||
* @type Function(node: HtmlElement) | ||
*/ | ||
onExited: PropTypes.func | ||
}) : {};; | ||
/** | ||
@@ -149,2 +53,3 @@ * A `Transition` component using CSS transitions and animations. | ||
var CSSTransition = | ||
@@ -297,5 +202,99 @@ /*#__PURE__*/ | ||
CSSTransition.propTypes = process.env.NODE_ENV !== "production" ? propTypes : {}; | ||
CSSTransition.propTypes = process.env.NODE_ENV !== "production" ? _extends({}, _Transition.default.propTypes, { | ||
/** | ||
* The animation classNames applied to the component as it enters, exits or has finished the transition. | ||
* A single name can be provided and it will be suffixed for each stage: e.g. | ||
* | ||
* `classNames="fade"` applies `fade-enter`, `fade-enter-active`, `fade-enter-done`, | ||
* `fade-exit`, `fade-exit-active`, `fade-exit-done`, `fade-appear`, and `fade-appear-active`. | ||
* Each individual classNames can also be specified independently like: | ||
* | ||
* ```js | ||
* classNames={{ | ||
* appear: 'my-appear', | ||
* appearActive: 'my-active-appear', | ||
* enter: 'my-enter', | ||
* enterActive: 'my-active-enter', | ||
* enterDone: 'my-done-enter', | ||
* exit: 'my-exit', | ||
* exitActive: 'my-active-exit', | ||
* exitDone: 'my-done-exit', | ||
* }} | ||
* ``` | ||
* | ||
* If you want to set these classes using CSS Modules: | ||
* | ||
* ```js | ||
* import styles from './styles.css'; | ||
* ``` | ||
* | ||
* you might want to use camelCase in your CSS file, that way could simply spread | ||
* them instead of listing them one by one: | ||
* | ||
* ```js | ||
* classNames={{ ...styles }} | ||
* ``` | ||
* | ||
* @type {string | { | ||
* appear?: string, | ||
* appearActive?: string, | ||
* enter?: string, | ||
* enterActive?: string, | ||
* enterDone?: string, | ||
* exit?: string, | ||
* exitActive?: string, | ||
* exitDone?: string, | ||
* }} | ||
*/ | ||
classNames: _PropTypes.classNamesShape, | ||
/** | ||
* A `<Transition>` callback fired immediately after the 'enter' or 'appear' class is | ||
* applied. | ||
* | ||
* @type Function(node: HtmlElement, isAppearing: bool) | ||
*/ | ||
onEnter: PropTypes.func, | ||
/** | ||
* A `<Transition>` callback fired immediately after the 'enter-active' or | ||
* 'appear-active' class is applied. | ||
* | ||
* @type Function(node: HtmlElement, isAppearing: bool) | ||
*/ | ||
onEntering: PropTypes.func, | ||
/** | ||
* A `<Transition>` callback fired immediately after the 'enter' or | ||
* 'appear' classes are **removed** and the `done` class is added to the DOM node. | ||
* | ||
* @type Function(node: HtmlElement, isAppearing: bool) | ||
*/ | ||
onEntered: PropTypes.func, | ||
/** | ||
* A `<Transition>` callback fired immediately after the 'exit' class is | ||
* applied. | ||
* | ||
* @type Function(node: HtmlElement) | ||
*/ | ||
onExit: PropTypes.func, | ||
/** | ||
* A `<Transition>` callback fired immediately after the 'exit-active' is applied. | ||
* | ||
* @type Function(node: HtmlElement) | ||
*/ | ||
onExiting: PropTypes.func, | ||
/** | ||
* A `<Transition>` callback fired immediately after the 'exit' classes | ||
* are **removed** and the `exit-done` class is added to the DOM node. | ||
* | ||
* @type Function(node: HtmlElement) | ||
*/ | ||
onExited: PropTypes.func | ||
}) : {}; | ||
var _default = CSSTransition; | ||
exports.default = _default; | ||
module.exports = exports["default"]; |
@@ -1,1 +0,1 @@ | ||
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("react"),require("react-dom")):"function"==typeof define&&define.amd?define(["react","react-dom"],t):"object"==typeof exports?exports.ReactTransitionGroup=t(require("react"),require("react-dom")):e.ReactTransitionGroup=t(e.React,e.ReactDOM)}(window,function(e,t){return function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=7)}([function(e,t,n){e.exports=n(9)()},function(t,n){t.exports=e},function(e,t,n){"use strict";t.__esModule=!0,t.default=t.EXITING=t.ENTERED=t.ENTERING=t.EXITED=t.UNMOUNTED=void 0;var r=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){var r=Object.defineProperty&&Object.getOwnPropertyDescriptor?Object.getOwnPropertyDescriptor(e,n):{};r.get||r.set?Object.defineProperty(t,n,r):t[n]=e[n]}return t.default=e,t}(n(0)),o=s(n(1)),i=s(n(3)),a=n(4);n(5);function s(e){return e&&e.__esModule?e:{default:e}}var l="unmounted";t.UNMOUNTED=l;var u="exited";t.EXITED=u;var c="entering";t.ENTERING=c;var p="entered";t.ENTERED=p;t.EXITING="exiting";var f=function(e){function t(t,n){var r;r=e.call(this,t,n)||this;var o,i=n.transitionGroup,a=i&&!i.isMounting?t.enter:t.appear;return r.appearStatus=null,t.in?a?(o=u,r.appearStatus=c):o=p:o=t.unmountOnExit||t.mountOnEnter?l:u,r.state={status:o},r.nextCallback=null,r}!function(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t}(t,e);var n=t.prototype;return n.getChildContext=function(){return{transitionGroup:null}},t.getDerivedStateFromProps=function(e,t){return e.in&&t.status===l?{status:u}:null},n.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},n.componentDidUpdate=function(e){var t=null;if(e!==this.props){var n=this.state.status;this.props.in?n!==c&&n!==p&&(t=c):n!==c&&n!==p||(t="exiting")}this.updateStatus(!1,t)},n.componentWillUnmount=function(){this.cancelNextCallback()},n.getTimeouts=function(){var e,t,n,r=this.props.timeout;return e=t=n=r,null!=r&&"number"!=typeof r&&(e=r.exit,t=r.enter,n=r.appear),{exit:e,enter:t,appear:n}},n.updateStatus=function(e,t){if(void 0===e&&(e=!1),null!==t){this.cancelNextCallback();var n=i.default.findDOMNode(this);t===c?this.performEnter(n,e):this.performExit(n)}else this.props.unmountOnExit&&this.state.status===u&&this.setState({status:l})},n.performEnter=function(e,t){var n=this,r=this.props.enter,o=this.context.transitionGroup?this.context.transitionGroup.isMounting:t,i=this.getTimeouts();t||r?(this.props.onEnter(e,o),this.safeSetState({status:c},function(){n.props.onEntering(e,o),n.onTransitionEnd(e,i.enter,function(){n.safeSetState({status:p},function(){n.props.onEntered(e,o)})})})):this.safeSetState({status:p},function(){n.props.onEntered(e)})},n.performExit=function(e){var t=this,n=this.props.exit,r=this.getTimeouts();n?(this.props.onExit(e),this.safeSetState({status:"exiting"},function(){t.props.onExiting(e),t.onTransitionEnd(e,r.exit,function(){t.safeSetState({status:u},function(){t.props.onExited(e)})})})):this.safeSetState({status:u},function(){t.props.onExited(e)})},n.cancelNextCallback=function(){null!==this.nextCallback&&(this.nextCallback.cancel(),this.nextCallback=null)},n.safeSetState=function(e,t){t=this.setNextCallback(t),this.setState(e,t)},n.setNextCallback=function(e){var t=this,n=!0;return this.nextCallback=function(r){n&&(n=!1,t.nextCallback=null,e(r))},this.nextCallback.cancel=function(){n=!1},this.nextCallback},n.onTransitionEnd=function(e,t,n){this.setNextCallback(n),e?(this.props.addEndListener&&this.props.addEndListener(e,this.nextCallback),null!=t&&setTimeout(this.nextCallback,t)):setTimeout(this.nextCallback,0)},n.render=function(){var e=this.state.status;if(e===l)return null;var t=this.props,n=t.children,r=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(t,["children"]);if(delete r.in,delete r.mountOnEnter,delete r.unmountOnExit,delete r.appear,delete r.enter,delete r.exit,delete r.timeout,delete r.addEndListener,delete r.onEnter,delete r.onEntering,delete r.onEntered,delete r.onExit,delete r.onExiting,delete r.onExited,"function"==typeof n)return n(e,r);var i=o.default.Children.only(n);return o.default.cloneElement(i,r)},t}(o.default.Component);function d(){}f.contextTypes={transitionGroup:r.object},f.childContextTypes={transitionGroup:function(){}},f.propTypes={},f.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:d,onEntering:d,onEntered:d,onExit:d,onExiting:d,onExited:d},f.UNMOUNTED=0,f.EXITED=1,f.ENTERING=2,f.ENTERED=3,f.EXITING=4;var h=(0,a.polyfill)(f);t.default=h},function(e,n){e.exports=t},function(e,t,n){"use strict";function r(){var e=this.constructor.getDerivedStateFromProps(this.props,this.state);null!==e&&void 0!==e&&this.setState(e)}function o(e){this.setState(function(t){var n=this.constructor.getDerivedStateFromProps(e,t);return null!==n&&void 0!==n?n:null}.bind(this))}function i(e,t){try{var n=this.props,r=this.state;this.props=e,this.state=t,this.__reactInternalSnapshotFlag=!0,this.__reactInternalSnapshot=this.getSnapshotBeforeUpdate(n,r)}finally{this.props=n,this.state=r}}function a(e){var t=e.prototype;if(!t||!t.isReactComponent)throw new Error("Can only polyfill class components");if("function"!=typeof e.getDerivedStateFromProps&&"function"!=typeof t.getSnapshotBeforeUpdate)return e;var n=null,a=null,s=null;if("function"==typeof t.componentWillMount?n="componentWillMount":"function"==typeof t.UNSAFE_componentWillMount&&(n="UNSAFE_componentWillMount"),"function"==typeof t.componentWillReceiveProps?a="componentWillReceiveProps":"function"==typeof t.UNSAFE_componentWillReceiveProps&&(a="UNSAFE_componentWillReceiveProps"),"function"==typeof t.componentWillUpdate?s="componentWillUpdate":"function"==typeof t.UNSAFE_componentWillUpdate&&(s="UNSAFE_componentWillUpdate"),null!==n||null!==a||null!==s){var l=e.displayName||e.name,u="function"==typeof e.getDerivedStateFromProps?"getDerivedStateFromProps()":"getSnapshotBeforeUpdate()";throw Error("Unsafe legacy lifecycles will not be called for components using new component APIs.\n\n"+l+" uses "+u+" but also contains the following legacy lifecycles:"+(null!==n?"\n "+n:"")+(null!==a?"\n "+a:"")+(null!==s?"\n "+s:"")+"\n\nThe above lifecycles should be removed. Learn more about this warning here:\nhttps://fb.me/react-async-component-lifecycle-hooks")}if("function"==typeof e.getDerivedStateFromProps&&(t.componentWillMount=r,t.componentWillReceiveProps=o),"function"==typeof t.getSnapshotBeforeUpdate){if("function"!=typeof t.componentDidUpdate)throw new Error("Cannot polyfill getSnapshotBeforeUpdate() for components that do not define componentDidUpdate() on the prototype");t.componentWillUpdate=i;var c=t.componentDidUpdate;t.componentDidUpdate=function(e,t,n){var r=this.__reactInternalSnapshotFlag?this.__reactInternalSnapshot:n;c.call(this,e,t,r)}}return e}n.r(t),n.d(t,"polyfill",function(){return a}),r.__suppressDeprecationWarning=!0,o.__suppressDeprecationWarning=!0,i.__suppressDeprecationWarning=!0},function(e,t,n){"use strict";t.__esModule=!0,t.transitionTimeout=function(e){var t="transition"+e+"Timeout",n="transition"+e;return function(e){if(e[n]){if(null==e[t])return new Error(t+" wasn't supplied to CSSTransitionGroup: this can cause unreliable animations and won't be supported in a future version of React. See https://fb.me/react-animation-transition-group-timeout for more information.");if("number"!=typeof e[t])return new Error(t+" must be a number (in milliseconds)")}return null}},t.classNamesShape=t.timeoutsShape=void 0;var r=function(e){return e&&e.__esModule?e:{default:e}}(n(0));var o=r.default.oneOfType([r.default.number,r.default.shape({enter:r.default.number,exit:r.default.number}).isRequired]);t.timeoutsShape=o;var i=r.default.oneOfType([r.default.string,r.default.shape({enter:r.default.string,exit:r.default.string,active:r.default.string}),r.default.shape({enter:r.default.string,enterDone:r.default.string,enterActive:r.default.string,exit:r.default.string,exitDone:r.default.string,exitActive:r.default.string})]);t.classNamesShape=i},function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0;var r=s(n(0)),o=s(n(1)),i=n(4),a=n(15);function s(e){return e&&e.__esModule?e:{default:e}}function l(){return(l=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 u(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}var c=Object.values||function(e){return Object.keys(e).map(function(t){return e[t]})},p=function(e){function t(t,n){var r,o=(r=e.call(this,t,n)||this).handleExited.bind(u(u(r)));return r.state={handleExited:o,firstRender:!0},r}!function(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t}(t,e);var n=t.prototype;return n.getChildContext=function(){return{transitionGroup:{isMounting:!this.appeared}}},n.componentDidMount=function(){this.appeared=!0,this.mounted=!0},n.componentWillUnmount=function(){this.mounted=!1},t.getDerivedStateFromProps=function(e,t){var n=t.children,r=t.handleExited;return{children:t.firstRender?(0,a.getInitialChildMapping)(e,r):(0,a.getNextChildMapping)(e,n,r),firstRender:!1}},n.handleExited=function(e,t){var n=(0,a.getChildMapping)(this.props.children);e.key in n||(e.props.onExited&&e.props.onExited(t),this.mounted&&this.setState(function(t){var n=l({},t.children);return delete n[e.key],{children:n}}))},n.render=function(){var e=this.props,t=e.component,n=e.childFactory,r=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,["component","childFactory"]),i=c(this.state.children).map(n);return delete r.appear,delete r.enter,delete r.exit,null===t?i:o.default.createElement(t,r,i)},t}(o.default.Component);p.childContextTypes={transitionGroup:r.default.object.isRequired},p.propTypes={},p.defaultProps={component:"div",childFactory:function(e){return e}};var f=(0,i.polyfill)(p);t.default=f,e.exports=t.default},function(e,t,n){"use strict";var r=s(n(8)),o=s(n(14)),i=s(n(6)),a=s(n(2));function s(e){return e&&e.__esModule?e:{default:e}}e.exports={Transition:a.default,TransitionGroup:i.default,ReplaceTransition:o.default,CSSTransition:r.default}},function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0;!function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){var r=Object.defineProperty&&Object.getOwnPropertyDescriptor?Object.getOwnPropertyDescriptor(e,n):{};r.get||r.set?Object.defineProperty(t,n,r):t[n]=e[n]}t.default=e}(n(0));var r=s(n(11)),o=s(n(13)),i=s(n(1)),a=s(n(2));n(5);function s(e){return e&&e.__esModule?e:{default:e}}function l(){return(l=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)}var u=function(e,t){return e&&t&&t.split(" ").forEach(function(t){return(0,r.default)(e,t)})},c=function(e,t){return e&&t&&t.split(" ").forEach(function(t){return(0,o.default)(e,t)})},p=function(e){function t(){for(var t,n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return(t=e.call.apply(e,[this].concat(r))||this).onEnter=function(e,n){var r=t.getClassNames(n?"appear":"enter").className;t.removeClasses(e,"exit"),u(e,r),t.props.onEnter&&t.props.onEnter(e,n)},t.onEntering=function(e,n){var r=t.getClassNames(n?"appear":"enter").activeClassName;t.reflowAndAddClass(e,r),t.props.onEntering&&t.props.onEntering(e,n)},t.onEntered=function(e,n){var r=t.getClassNames("enter").doneClassName;t.removeClasses(e,n?"appear":"enter"),u(e,r),t.props.onEntered&&t.props.onEntered(e,n)},t.onExit=function(e){var n=t.getClassNames("exit").className;t.removeClasses(e,"appear"),t.removeClasses(e,"enter"),u(e,n),t.props.onExit&&t.props.onExit(e)},t.onExiting=function(e){var n=t.getClassNames("exit").activeClassName;t.reflowAndAddClass(e,n),t.props.onExiting&&t.props.onExiting(e)},t.onExited=function(e){var n=t.getClassNames("exit").doneClassName;t.removeClasses(e,"exit"),u(e,n),t.props.onExited&&t.props.onExited(e)},t.getClassNames=function(e){var n=t.props.classNames,r="string"!=typeof n?n[e]:n+"-"+e;return{className:r,activeClassName:"string"!=typeof n?n[e+"Active"]:r+"-active",doneClassName:"string"!=typeof n?n[e+"Done"]:r+"-done"}},t}!function(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t}(t,e);var n=t.prototype;return n.removeClasses=function(e,t){var n=this.getClassNames(t),r=n.className,o=n.activeClassName,i=n.doneClassName;r&&c(e,r),o&&c(e,o),i&&c(e,i)},n.reflowAndAddClass=function(e,t){t&&(e&&e.scrollTop,u(e,t))},n.render=function(){var e=l({},this.props);return delete e.classNames,i.default.createElement(a.default,l({},e,{onEnter:this.onEnter,onEntered:this.onEntered,onEntering:this.onEntering,onExit:this.onExit,onExiting:this.onExiting,onExited:this.onExited}))},t}(i.default.Component);p.propTypes={};var f=p;t.default=f,e.exports=t.default},function(e,t,n){"use strict";var r=n(10);function o(){}e.exports=function(){function e(e,t,n,o,i,a){if(a!==r){var s=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw s.name="Invariant Violation",s}}function t(){return e}e.isRequired=e;var n={array:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t};return n.checkPropTypes=o,n.PropTypes=n,n}},function(e,t,n){"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){e.classList?e.classList.add(t):(0,r.default)(e,t)||("string"==typeof e.className?e.className=e.className+" "+t:e.setAttribute("class",(e.className&&e.className.baseVal||"")+" "+t))};var r=function(e){return e&&e.__esModule?e:{default:e}}(n(12));e.exports=t.default},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){return e.classList?!!t&&e.classList.contains(t):-1!==(" "+(e.className.baseVal||e.className)+" ").indexOf(" "+t+" ")},e.exports=t.default},function(e,t,n){"use strict";function r(e,t){return e.replace(new RegExp("(^|\\s)"+t+"(?:\\s|$)","g"),"$1").replace(/\s+/g," ").replace(/^\s*|\s*$/g,"")}e.exports=function(e,t){e.classList?e.classList.remove(t):"string"==typeof e.className?e.className=r(e.className,t):e.setAttribute("class",r(e.className&&e.className.baseVal||"",t))}},function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0;a(n(0));var r=a(n(1)),o=n(3),i=a(n(6));function a(e){return e&&e.__esModule?e:{default:e}}var s=function(e){function t(){for(var t,n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return(t=e.call.apply(e,[this].concat(r))||this).handleEnter=function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return t.handleLifecycle("onEnter",0,n)},t.handleEntering=function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return t.handleLifecycle("onEntering",0,n)},t.handleEntered=function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return t.handleLifecycle("onEntered",0,n)},t.handleExit=function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return t.handleLifecycle("onExit",1,n)},t.handleExiting=function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return t.handleLifecycle("onExiting",1,n)},t.handleExited=function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return t.handleLifecycle("onExited",1,n)},t}!function(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t}(t,e);var n=t.prototype;return n.handleLifecycle=function(e,t,n){var i,a=this.props.children,s=r.default.Children.toArray(a)[t];s.props[e]&&(i=s.props)[e].apply(i,n),this.props[e]&&this.props[e]((0,o.findDOMNode)(this))},n.render=function(){var e=this.props,t=e.children,n=e.in,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,["children","in"]),a=r.default.Children.toArray(t),s=a[0],l=a[1];return delete o.onEnter,delete o.onEntering,delete o.onEntered,delete o.onExit,delete o.onExiting,delete o.onExited,r.default.createElement(i.default,o,n?r.default.cloneElement(s,{key:"first",onEnter:this.handleEnter,onEntering:this.handleEntering,onEntered:this.handleEntered}):r.default.cloneElement(l,{key:"second",onEnter:this.handleExit,onEntering:this.handleExiting,onEntered:this.handleExited}))},t}(r.default.Component);s.propTypes={};var l=s;t.default=l,e.exports=t.default},function(e,t,n){"use strict";t.__esModule=!0,t.getChildMapping=o,t.mergeChildMappings=i,t.getInitialChildMapping=function(e,t){return o(e.children,function(n){return(0,r.cloneElement)(n,{onExited:t.bind(null,n),in:!0,appear:a(n,"appear",e),enter:a(n,"enter",e),exit:a(n,"exit",e)})})},t.getNextChildMapping=function(e,t,n){var s=o(e.children),l=i(t,s);return Object.keys(l).forEach(function(o){var i=l[o];if((0,r.isValidElement)(i)){var u=o in t,c=o in s,p=t[o],f=(0,r.isValidElement)(p)&&!p.props.in;!c||u&&!f?c||!u||f?c&&u&&(0,r.isValidElement)(p)&&(l[o]=(0,r.cloneElement)(i,{onExited:n.bind(null,i),in:p.props.in,exit:a(i,"exit",e),enter:a(i,"enter",e)})):l[o]=(0,r.cloneElement)(i,{in:!1}):l[o]=(0,r.cloneElement)(i,{onExited:n.bind(null,i),in:!0,exit:a(i,"exit",e),enter:a(i,"enter",e)})}}),l};var r=n(1);function o(e,t){var n=Object.create(null);return e&&r.Children.map(e,function(e){return e}).forEach(function(e){n[e.key]=function(e){return t&&(0,r.isValidElement)(e)?t(e):e}(e)}),n}function i(e,t){function n(n){return n in t?t[n]:e[n]}e=e||{},t=t||{};var r,o=Object.create(null),i=[];for(var a in e)a in t?i.length&&(o[a]=i,i=[]):i.push(a);var s={};for(var l in t){if(o[l])for(r=0;r<o[l].length;r++){var u=o[l][r];s[o[l][r]]=n(u)}s[l]=n(l)}for(r=0;r<i.length;r++)s[i[r]]=n(i[r]);return s}function a(e,t,n){return null!=n[t]?n[t]:e.props[t]}}])}); | ||
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("react"),require("react-dom")):"function"==typeof define&&define.amd?define(["react","react-dom"],t):"object"==typeof exports?exports.ReactTransitionGroup=t(require("react"),require("react-dom")):e.ReactTransitionGroup=t(e.React,e.ReactDOM)}(window,function(e,t){return function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=7)}([function(e,t,n){e.exports=n(9)()},function(t,n){t.exports=e},function(e,t,n){"use strict";t.__esModule=!0,t.default=t.EXITING=t.ENTERED=t.ENTERING=t.EXITED=t.UNMOUNTED=void 0;var r=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){var r=Object.defineProperty&&Object.getOwnPropertyDescriptor?Object.getOwnPropertyDescriptor(e,n):{};r.get||r.set?Object.defineProperty(t,n,r):t[n]=e[n]}return t.default=e,t}(n(0)),o=s(n(1)),i=s(n(3)),a=n(4);n(5);function s(e){return e&&e.__esModule?e:{default:e}}var l="unmounted";t.UNMOUNTED=l;var u="exited";t.EXITED=u;var c="entering";t.ENTERING=c;var p="entered";t.ENTERED=p;t.EXITING="exiting";var f=function(e){function t(t,n){var r;r=e.call(this,t,n)||this;var o,i=n.transitionGroup,a=i&&!i.isMounting?t.enter:t.appear;return r.appearStatus=null,t.in?a?(o=u,r.appearStatus=c):o=p:o=t.unmountOnExit||t.mountOnEnter?l:u,r.state={status:o},r.nextCallback=null,r}!function(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t}(t,e);var n=t.prototype;return n.getChildContext=function(){return{transitionGroup:null}},t.getDerivedStateFromProps=function(e,t){return e.in&&t.status===l?{status:u}:null},n.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},n.componentDidUpdate=function(e){var t=null;if(e!==this.props){var n=this.state.status;this.props.in?n!==c&&n!==p&&(t=c):n!==c&&n!==p||(t="exiting")}this.updateStatus(!1,t)},n.componentWillUnmount=function(){this.cancelNextCallback()},n.getTimeouts=function(){var e,t,n,r=this.props.timeout;return e=t=n=r,null!=r&&"number"!=typeof r&&(e=r.exit,t=r.enter,n=r.appear),{exit:e,enter:t,appear:n}},n.updateStatus=function(e,t){if(void 0===e&&(e=!1),null!==t){this.cancelNextCallback();var n=i.default.findDOMNode(this);t===c?this.performEnter(n,e):this.performExit(n)}else this.props.unmountOnExit&&this.state.status===u&&this.setState({status:l})},n.performEnter=function(e,t){var n=this,r=this.props.enter,o=this.context.transitionGroup?this.context.transitionGroup.isMounting:t,i=this.getTimeouts();t||r?(this.props.onEnter(e,o),this.safeSetState({status:c},function(){n.props.onEntering(e,o),n.onTransitionEnd(e,i.enter,function(){n.safeSetState({status:p},function(){n.props.onEntered(e,o)})})})):this.safeSetState({status:p},function(){n.props.onEntered(e)})},n.performExit=function(e){var t=this,n=this.props.exit,r=this.getTimeouts();n?(this.props.onExit(e),this.safeSetState({status:"exiting"},function(){t.props.onExiting(e),t.onTransitionEnd(e,r.exit,function(){t.safeSetState({status:u},function(){t.props.onExited(e)})})})):this.safeSetState({status:u},function(){t.props.onExited(e)})},n.cancelNextCallback=function(){null!==this.nextCallback&&(this.nextCallback.cancel(),this.nextCallback=null)},n.safeSetState=function(e,t){t=this.setNextCallback(t),this.setState(e,t)},n.setNextCallback=function(e){var t=this,n=!0;return this.nextCallback=function(r){n&&(n=!1,t.nextCallback=null,e(r))},this.nextCallback.cancel=function(){n=!1},this.nextCallback},n.onTransitionEnd=function(e,t,n){this.setNextCallback(n),e?(this.props.addEndListener&&this.props.addEndListener(e,this.nextCallback),null!=t&&setTimeout(this.nextCallback,t)):setTimeout(this.nextCallback,0)},n.render=function(){var e=this.state.status;if(e===l)return null;var t=this.props,n=t.children,r=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(t,["children"]);if(delete r.in,delete r.mountOnEnter,delete r.unmountOnExit,delete r.appear,delete r.enter,delete r.exit,delete r.timeout,delete r.addEndListener,delete r.onEnter,delete r.onEntering,delete r.onEntered,delete r.onExit,delete r.onExiting,delete r.onExited,"function"==typeof n)return n(e,r);var i=o.default.Children.only(n);return o.default.cloneElement(i,r)},t}(o.default.Component);function d(){}f.contextTypes={transitionGroup:r.object},f.childContextTypes={transitionGroup:function(){}},f.propTypes={},f.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:d,onEntering:d,onEntered:d,onExit:d,onExiting:d,onExited:d},f.UNMOUNTED=0,f.EXITED=1,f.ENTERING=2,f.ENTERED=3,f.EXITING=4;var h=(0,a.polyfill)(f);t.default=h},function(e,n){e.exports=t},function(e,t,n){"use strict";function r(){var e=this.constructor.getDerivedStateFromProps(this.props,this.state);null!==e&&void 0!==e&&this.setState(e)}function o(e){this.setState(function(t){var n=this.constructor.getDerivedStateFromProps(e,t);return null!==n&&void 0!==n?n:null}.bind(this))}function i(e,t){try{var n=this.props,r=this.state;this.props=e,this.state=t,this.__reactInternalSnapshotFlag=!0,this.__reactInternalSnapshot=this.getSnapshotBeforeUpdate(n,r)}finally{this.props=n,this.state=r}}function a(e){var t=e.prototype;if(!t||!t.isReactComponent)throw new Error("Can only polyfill class components");if("function"!=typeof e.getDerivedStateFromProps&&"function"!=typeof t.getSnapshotBeforeUpdate)return e;var n=null,a=null,s=null;if("function"==typeof t.componentWillMount?n="componentWillMount":"function"==typeof t.UNSAFE_componentWillMount&&(n="UNSAFE_componentWillMount"),"function"==typeof t.componentWillReceiveProps?a="componentWillReceiveProps":"function"==typeof t.UNSAFE_componentWillReceiveProps&&(a="UNSAFE_componentWillReceiveProps"),"function"==typeof t.componentWillUpdate?s="componentWillUpdate":"function"==typeof t.UNSAFE_componentWillUpdate&&(s="UNSAFE_componentWillUpdate"),null!==n||null!==a||null!==s){var l=e.displayName||e.name,u="function"==typeof e.getDerivedStateFromProps?"getDerivedStateFromProps()":"getSnapshotBeforeUpdate()";throw Error("Unsafe legacy lifecycles will not be called for components using new component APIs.\n\n"+l+" uses "+u+" but also contains the following legacy lifecycles:"+(null!==n?"\n "+n:"")+(null!==a?"\n "+a:"")+(null!==s?"\n "+s:"")+"\n\nThe above lifecycles should be removed. Learn more about this warning here:\nhttps://fb.me/react-async-component-lifecycle-hooks")}if("function"==typeof e.getDerivedStateFromProps&&(t.componentWillMount=r,t.componentWillReceiveProps=o),"function"==typeof t.getSnapshotBeforeUpdate){if("function"!=typeof t.componentDidUpdate)throw new Error("Cannot polyfill getSnapshotBeforeUpdate() for components that do not define componentDidUpdate() on the prototype");t.componentWillUpdate=i;var c=t.componentDidUpdate;t.componentDidUpdate=function(e,t,n){var r=this.__reactInternalSnapshotFlag?this.__reactInternalSnapshot:n;c.call(this,e,t,r)}}return e}n.r(t),n.d(t,"polyfill",function(){return a}),r.__suppressDeprecationWarning=!0,o.__suppressDeprecationWarning=!0,i.__suppressDeprecationWarning=!0},function(e,t,n){"use strict";t.__esModule=!0,t.classNamesShape=t.timeoutsShape=void 0;!function(e){e&&e.__esModule}(n(0));t.timeoutsShape=null;t.classNamesShape=null},function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0;var r=s(n(0)),o=s(n(1)),i=n(4),a=n(15);function s(e){return e&&e.__esModule?e:{default:e}}function l(){return(l=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 u(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}var c=Object.values||function(e){return Object.keys(e).map(function(t){return e[t]})},p=function(e){function t(t,n){var r,o=(r=e.call(this,t,n)||this).handleExited.bind(u(u(r)));return r.state={handleExited:o,firstRender:!0},r}!function(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t}(t,e);var n=t.prototype;return n.getChildContext=function(){return{transitionGroup:{isMounting:!this.appeared}}},n.componentDidMount=function(){this.appeared=!0,this.mounted=!0},n.componentWillUnmount=function(){this.mounted=!1},t.getDerivedStateFromProps=function(e,t){var n=t.children,r=t.handleExited;return{children:t.firstRender?(0,a.getInitialChildMapping)(e,r):(0,a.getNextChildMapping)(e,n,r),firstRender:!1}},n.handleExited=function(e,t){var n=(0,a.getChildMapping)(this.props.children);e.key in n||(e.props.onExited&&e.props.onExited(t),this.mounted&&this.setState(function(t){var n=l({},t.children);return delete n[e.key],{children:n}}))},n.render=function(){var e=this.props,t=e.component,n=e.childFactory,r=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,["component","childFactory"]),i=c(this.state.children).map(n);return delete r.appear,delete r.enter,delete r.exit,null===t?i:o.default.createElement(t,r,i)},t}(o.default.Component);p.childContextTypes={transitionGroup:r.default.object.isRequired},p.propTypes={},p.defaultProps={component:"div",childFactory:function(e){return e}};var f=(0,i.polyfill)(p);t.default=f,e.exports=t.default},function(e,t,n){"use strict";var r=s(n(8)),o=s(n(14)),i=s(n(6)),a=s(n(2));function s(e){return e&&e.__esModule?e:{default:e}}e.exports={Transition:a.default,TransitionGroup:i.default,ReplaceTransition:o.default,CSSTransition:r.default}},function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0;!function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){var r=Object.defineProperty&&Object.getOwnPropertyDescriptor?Object.getOwnPropertyDescriptor(e,n):{};r.get||r.set?Object.defineProperty(t,n,r):t[n]=e[n]}t.default=e}(n(0));var r=s(n(11)),o=s(n(13)),i=s(n(1)),a=s(n(2));n(5);function s(e){return e&&e.__esModule?e:{default:e}}function l(){return(l=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)}var u=function(e,t){return e&&t&&t.split(" ").forEach(function(t){return(0,r.default)(e,t)})},c=function(e,t){return e&&t&&t.split(" ").forEach(function(t){return(0,o.default)(e,t)})},p=function(e){function t(){for(var t,n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return(t=e.call.apply(e,[this].concat(r))||this).onEnter=function(e,n){var r=t.getClassNames(n?"appear":"enter").className;t.removeClasses(e,"exit"),u(e,r),t.props.onEnter&&t.props.onEnter(e,n)},t.onEntering=function(e,n){var r=t.getClassNames(n?"appear":"enter").activeClassName;t.reflowAndAddClass(e,r),t.props.onEntering&&t.props.onEntering(e,n)},t.onEntered=function(e,n){var r=t.getClassNames("enter").doneClassName;t.removeClasses(e,n?"appear":"enter"),u(e,r),t.props.onEntered&&t.props.onEntered(e,n)},t.onExit=function(e){var n=t.getClassNames("exit").className;t.removeClasses(e,"appear"),t.removeClasses(e,"enter"),u(e,n),t.props.onExit&&t.props.onExit(e)},t.onExiting=function(e){var n=t.getClassNames("exit").activeClassName;t.reflowAndAddClass(e,n),t.props.onExiting&&t.props.onExiting(e)},t.onExited=function(e){var n=t.getClassNames("exit").doneClassName;t.removeClasses(e,"exit"),u(e,n),t.props.onExited&&t.props.onExited(e)},t.getClassNames=function(e){var n=t.props.classNames,r="string"!=typeof n?n[e]:n+"-"+e;return{className:r,activeClassName:"string"!=typeof n?n[e+"Active"]:r+"-active",doneClassName:"string"!=typeof n?n[e+"Done"]:r+"-done"}},t}!function(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t}(t,e);var n=t.prototype;return n.removeClasses=function(e,t){var n=this.getClassNames(t),r=n.className,o=n.activeClassName,i=n.doneClassName;r&&c(e,r),o&&c(e,o),i&&c(e,i)},n.reflowAndAddClass=function(e,t){t&&(e&&e.scrollTop,u(e,t))},n.render=function(){var e=l({},this.props);return delete e.classNames,i.default.createElement(a.default,l({},e,{onEnter:this.onEnter,onEntered:this.onEntered,onEntering:this.onEntering,onExit:this.onExit,onExiting:this.onExiting,onExited:this.onExited}))},t}(i.default.Component);p.propTypes={};var f=p;t.default=f,e.exports=t.default},function(e,t,n){"use strict";var r=n(10);function o(){}e.exports=function(){function e(e,t,n,o,i,a){if(a!==r){var s=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw s.name="Invariant Violation",s}}function t(){return e}e.isRequired=e;var n={array:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t};return n.checkPropTypes=o,n.PropTypes=n,n}},function(e,t,n){"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){e.classList?e.classList.add(t):(0,r.default)(e,t)||("string"==typeof e.className?e.className=e.className+" "+t:e.setAttribute("class",(e.className&&e.className.baseVal||"")+" "+t))};var r=function(e){return e&&e.__esModule?e:{default:e}}(n(12));e.exports=t.default},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){return e.classList?!!t&&e.classList.contains(t):-1!==(" "+(e.className.baseVal||e.className)+" ").indexOf(" "+t+" ")},e.exports=t.default},function(e,t,n){"use strict";function r(e,t){return e.replace(new RegExp("(^|\\s)"+t+"(?:\\s|$)","g"),"$1").replace(/\s+/g," ").replace(/^\s*|\s*$/g,"")}e.exports=function(e,t){e.classList?e.classList.remove(t):"string"==typeof e.className?e.className=r(e.className,t):e.setAttribute("class",r(e.className&&e.className.baseVal||"",t))}},function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0;a(n(0));var r=a(n(1)),o=n(3),i=a(n(6));function a(e){return e&&e.__esModule?e:{default:e}}var s=function(e){function t(){for(var t,n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return(t=e.call.apply(e,[this].concat(r))||this).handleEnter=function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return t.handleLifecycle("onEnter",0,n)},t.handleEntering=function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return t.handleLifecycle("onEntering",0,n)},t.handleEntered=function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return t.handleLifecycle("onEntered",0,n)},t.handleExit=function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return t.handleLifecycle("onExit",1,n)},t.handleExiting=function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return t.handleLifecycle("onExiting",1,n)},t.handleExited=function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return t.handleLifecycle("onExited",1,n)},t}!function(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t}(t,e);var n=t.prototype;return n.handleLifecycle=function(e,t,n){var i,a=this.props.children,s=r.default.Children.toArray(a)[t];s.props[e]&&(i=s.props)[e].apply(i,n),this.props[e]&&this.props[e]((0,o.findDOMNode)(this))},n.render=function(){var e=this.props,t=e.children,n=e.in,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,["children","in"]),a=r.default.Children.toArray(t),s=a[0],l=a[1];return delete o.onEnter,delete o.onEntering,delete o.onEntered,delete o.onExit,delete o.onExiting,delete o.onExited,r.default.createElement(i.default,o,n?r.default.cloneElement(s,{key:"first",onEnter:this.handleEnter,onEntering:this.handleEntering,onEntered:this.handleEntered}):r.default.cloneElement(l,{key:"second",onEnter:this.handleExit,onEntering:this.handleExiting,onEntered:this.handleExited}))},t}(r.default.Component);s.propTypes={};var l=s;t.default=l,e.exports=t.default},function(e,t,n){"use strict";t.__esModule=!0,t.getChildMapping=o,t.mergeChildMappings=i,t.getInitialChildMapping=function(e,t){return o(e.children,function(n){return(0,r.cloneElement)(n,{onExited:t.bind(null,n),in:!0,appear:a(n,"appear",e),enter:a(n,"enter",e),exit:a(n,"exit",e)})})},t.getNextChildMapping=function(e,t,n){var s=o(e.children),l=i(t,s);return Object.keys(l).forEach(function(o){var i=l[o];if((0,r.isValidElement)(i)){var u=o in t,c=o in s,p=t[o],f=(0,r.isValidElement)(p)&&!p.props.in;!c||u&&!f?c||!u||f?c&&u&&(0,r.isValidElement)(p)&&(l[o]=(0,r.cloneElement)(i,{onExited:n.bind(null,i),in:p.props.in,exit:a(i,"exit",e),enter:a(i,"enter",e)})):l[o]=(0,r.cloneElement)(i,{in:!1}):l[o]=(0,r.cloneElement)(i,{onExited:n.bind(null,i),in:!0,exit:a(i,"exit",e),enter:a(i,"enter",e)})}}),l};var r=n(1);function o(e,t){var n=Object.create(null);return e&&r.Children.map(e,function(e){return e}).forEach(function(e){n[e.key]=function(e){return t&&(0,r.isValidElement)(e)?t(e):e}(e)}),n}function i(e,t){function n(n){return n in t?t[n]:e[n]}e=e||{},t=t||{};var r,o=Object.create(null),i=[];for(var a in e)a in t?i.length&&(o[a]=i,i=[]):i.push(a);var s={};for(var l in t){if(o[l])for(r=0;r<o[l].length;r++){var u=o[l][r];s[o[l][r]]=n(u)}s[l]=n(l)}for(r=0;r<i.length;r++)s[i[r]]=n(i[r]);return s}function a(e,t,n){return null!=n[t]?n[t]:e.props[t]}}])}); |
{ | ||
"name": "react-transition-group", | ||
"version": "2.5.2", | ||
"version": "2.5.3", | ||
"description": "A react component toolset for managing animations", | ||
"main": "index.js", | ||
"size-limit": [ | ||
{ | ||
"gzip": false, | ||
"path": "lib/index.js", | ||
"limit": "16.66 KB" | ||
} | ||
], | ||
"repository": { | ||
@@ -7,0 +14,0 @@ "type": "git", |
@@ -20,9 +20,2 @@ "use strict"; | ||
var propTypes = process.env.NODE_ENV !== "production" ? { | ||
in: _propTypes.default.bool.isRequired, | ||
children: function children(props, propName) { | ||
if (_react.default.Children.count(props[propName]) !== 2) return new Error("\"" + propName + "\" must be exactly two transition components."); | ||
return null; | ||
} | ||
} : {};; | ||
/** | ||
@@ -39,3 +32,2 @@ * The `<ReplaceTransition>` component is a specialized `Transition` component | ||
*/ | ||
var ReplaceTransition = | ||
@@ -151,5 +143,11 @@ /*#__PURE__*/ | ||
ReplaceTransition.propTypes = process.env.NODE_ENV !== "production" ? propTypes : {}; | ||
ReplaceTransition.propTypes = process.env.NODE_ENV !== "production" ? { | ||
in: _propTypes.default.bool.isRequired, | ||
children: function children(props, propName) { | ||
if (_react.default.Children.count(props[propName]) !== 2) return new Error("\"" + propName + "\" must be exactly two transition components."); | ||
return null; | ||
} | ||
} : {}; | ||
var _default = ReplaceTransition; | ||
exports.default = _default; | ||
module.exports = exports["default"]; |
@@ -30,53 +30,2 @@ "use strict"; | ||
var propTypes = process.env.NODE_ENV !== "production" ? { | ||
/** | ||
* `<TransitionGroup>` renders a `<div>` by default. You can change this | ||
* behavior by providing a `component` prop. | ||
* If you use React v16+ and would like to avoid a wrapping `<div>` element | ||
* you can pass in `component={null}`. This is useful if the wrapping div | ||
* borks your css styles. | ||
*/ | ||
component: _propTypes.default.any, | ||
/** | ||
* A set of `<Transition>` components, that are toggled `in` and out as they | ||
* leave. the `<TransitionGroup>` will inject specific transition props, so | ||
* remember to spread them through if you are wrapping the `<Transition>` as | ||
* with our `<Fade>` example. | ||
*/ | ||
children: _propTypes.default.node, | ||
/** | ||
* A convenience prop that enables or disables appear animations | ||
* for all children. Note that specifying this will override any defaults set | ||
* on individual children Transitions. | ||
*/ | ||
appear: _propTypes.default.bool, | ||
/** | ||
* A convenience prop that enables or disables enter animations | ||
* for all children. Note that specifying this will override any defaults set | ||
* on individual children Transitions. | ||
*/ | ||
enter: _propTypes.default.bool, | ||
/** | ||
* A convenience prop that enables or disables exit animations | ||
* for all children. Note that specifying this will override any defaults set | ||
* on individual children Transitions. | ||
*/ | ||
exit: _propTypes.default.bool, | ||
/** | ||
* You may need to apply reactive updates to a child as it is exiting. | ||
* This is generally done by using `cloneElement` however in the case of an exiting | ||
* child the element has already been removed and not accessible to the consumer. | ||
* | ||
* If you do need to update a child as it leaves you can provide a `childFactory` | ||
* to wrap every child, even the ones that are leaving. | ||
* | ||
* @type Function(child: ReactElement) -> ReactElement | ||
*/ | ||
childFactory: _propTypes.default.func | ||
} : {};; | ||
var defaultProps = { | ||
@@ -197,3 +146,53 @@ component: 'div', | ||
}; | ||
TransitionGroup.propTypes = process.env.NODE_ENV !== "production" ? propTypes : {}; | ||
TransitionGroup.propTypes = process.env.NODE_ENV !== "production" ? { | ||
/** | ||
* `<TransitionGroup>` renders a `<div>` by default. You can change this | ||
* behavior by providing a `component` prop. | ||
* If you use React v16+ and would like to avoid a wrapping `<div>` element | ||
* you can pass in `component={null}`. This is useful if the wrapping div | ||
* borks your css styles. | ||
*/ | ||
component: _propTypes.default.any, | ||
/** | ||
* A set of `<Transition>` components, that are toggled `in` and out as they | ||
* leave. the `<TransitionGroup>` will inject specific transition props, so | ||
* remember to spread them through if you are wrapping the `<Transition>` as | ||
* with our `<Fade>` example. | ||
*/ | ||
children: _propTypes.default.node, | ||
/** | ||
* A convenience prop that enables or disables appear animations | ||
* for all children. Note that specifying this will override any defaults set | ||
* on individual children Transitions. | ||
*/ | ||
appear: _propTypes.default.bool, | ||
/** | ||
* A convenience prop that enables or disables enter animations | ||
* for all children. Note that specifying this will override any defaults set | ||
* on individual children Transitions. | ||
*/ | ||
enter: _propTypes.default.bool, | ||
/** | ||
* A convenience prop that enables or disables exit animations | ||
* for all children. Note that specifying this will override any defaults set | ||
* on individual children Transitions. | ||
*/ | ||
exit: _propTypes.default.bool, | ||
/** | ||
* You may need to apply reactive updates to a child as it is exiting. | ||
* This is generally done by using `cloneElement` however in the case of an exiting | ||
* child the element has already been removed and not accessible to the consumer. | ||
* | ||
* If you do need to update a child as it leaves you can provide a `childFactory` | ||
* to wrap every child, even the ones that are leaving. | ||
* | ||
* @type Function(child: ReactElement) -> ReactElement | ||
*/ | ||
childFactory: _propTypes.default.func | ||
} : {}; | ||
TransitionGroup.defaultProps = defaultProps; | ||
@@ -200,0 +199,0 @@ |
"use strict"; | ||
exports.__esModule = true; | ||
exports.transitionTimeout = transitionTimeout; | ||
exports.classNamesShape = exports.timeoutsShape = void 0; | ||
@@ -11,28 +10,8 @@ | ||
function transitionTimeout(transitionType) { | ||
var timeoutPropName = 'transition' + transitionType + 'Timeout'; | ||
var enabledPropName = 'transition' + transitionType; | ||
return function (props) { | ||
// If the transition is enabled | ||
if (props[enabledPropName]) { | ||
// If no timeout duration is provided | ||
if (props[timeoutPropName] == null) { | ||
return new Error(timeoutPropName + ' wasn\'t supplied to CSSTransitionGroup: ' + 'this can cause unreliable animations and won\'t be supported in ' + 'a future version of React. See ' + 'https://fb.me/react-animation-transition-group-timeout for more ' + 'information.'); // If the duration isn't a number | ||
} else if (typeof props[timeoutPropName] !== 'number') { | ||
return new Error(timeoutPropName + ' must be a number (in milliseconds)'); | ||
} | ||
} | ||
return null; | ||
}; | ||
} | ||
var timeoutsShape = _propTypes.default.oneOfType([_propTypes.default.number, _propTypes.default.shape({ | ||
var timeoutsShape = process.env.NODE_ENV !== 'production' ? _propTypes.default.oneOfType([_propTypes.default.number, _propTypes.default.shape({ | ||
enter: _propTypes.default.number, | ||
exit: _propTypes.default.number | ||
}).isRequired]); | ||
}).isRequired]) : null; | ||
exports.timeoutsShape = timeoutsShape; | ||
var classNamesShape = _propTypes.default.oneOfType([_propTypes.default.string, _propTypes.default.shape({ | ||
var classNamesShape = process.env.NODE_ENV !== 'production' ? _propTypes.default.oneOfType([_propTypes.default.string, _propTypes.default.shape({ | ||
enter: _propTypes.default.string, | ||
@@ -48,4 +27,3 @@ exit: _propTypes.default.string, | ||
exitActive: _propTypes.default.string | ||
})]); | ||
})]) : null; | ||
exports.classNamesShape = classNamesShape; |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
7
75792
1219