react 16.0.0-alpha.2 → 16.0.0-alpha.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (36) hide show
  1. package/dist/react.js +330 -295
  2. package/dist/react.min.js +3 -3
  3. package/lib/React.js +4 -14
  4. package/lib/ReactClass.js +5 -11
  5. package/lib/ReactComponentTreeHook.js +8 -47
  6. package/lib/ReactCurrentOwner.js +0 -2
  7. package/lib/ReactDebugCurrentFrame.js +55 -0
  8. package/lib/ReactElementValidator.js +44 -21
  9. package/lib/ReactFiberComponentTreeHook.js +62 -0
  10. package/lib/ReactNoopUpdateQueue.js +0 -1
  11. package/lib/ReactPropTypes.js +12 -23
  12. package/lib/ReactVersion.js +1 -1
  13. package/lib/checkPropTypes.js +64 -0
  14. package/lib/checkReactTypeSpec.js +5 -81
  15. package/lib/deprecated.js +1 -1
  16. package/lib/traverseAllChildren.js +2 -2
  17. package/package.json +1 -1
  18. package/dist/react-with-addons.js +0 -5323
  19. package/dist/react-with-addons.min.js +0 -17
  20. package/lib/ReactAddonsDOMDependencies.js +0 -36
  21. package/lib/ReactAddonsDOMDependenciesUMDShim.js +0 -35
  22. package/lib/ReactCSSTransitionGroup.js +0 -104
  23. package/lib/ReactCSSTransitionGroupChild.js +0 -166
  24. package/lib/ReactComponentWithPureRenderMixin.js +0 -47
  25. package/lib/ReactFragment.js +0 -68
  26. package/lib/ReactPropTypeLocationNames.js +0 -24
  27. package/lib/ReactPropTypeLocations.js +0 -12
  28. package/lib/ReactStateSetters.js +0 -103
  29. package/lib/ReactTransitionChildMapping.js +0 -102
  30. package/lib/ReactTransitionEvents.js +0 -72
  31. package/lib/ReactTransitionGroup.js +0 -228
  32. package/lib/ReactWithAddons.js +0 -50
  33. package/lib/ReactWithAddonsUMDEntry.js +0 -32
  34. package/lib/shallowCompare.js +0 -24
  35. package/lib/sliceChildren.js +0 -33
  36. package/lib/update.js +0 -111
@@ -1,17 +0,0 @@
1
- /**
2
- * React (with addons) v16.0.0-alpha.2
3
- *
4
- * Copyright 2013-present, Facebook, Inc.
5
- * All rights reserved.
6
- *
7
- * This source code is licensed under the BSD-style license found in the
8
- * LICENSE file in the root directory of this source tree. An additional grant
9
- * of patent rights can be found in the PATENTS file in the same directory.
10
- *
11
- */
12
- !function(e){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var t;t="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this,t.React=e()}}(function(){return function e(t,n,r){function o(a,s){if(!n[a]){if(!t[a]){var u="function"==typeof require&&require;if(!s&&u)return u(a,!0);if(i)return i(a,!0);var c=new Error("Cannot find module '"+a+"'");throw c.code="MODULE_NOT_FOUND",c}var p=n[a]={exports:{}};t[a][0].call(p.exports,function(e){var n=t[a][1][e];return o(n?n:e)},p,p.exports,e,t,n,r)}return n[a].exports}for(var i="function"==typeof require&&require,a=0;a<r.length;a++)o(r[a]);return o}({1:[function(e,t,n){"use strict";function r(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n["ms"+e]="MS"+t,n["O"+e]="o"+t.toLowerCase(),n}function o(e){if(s[e])return s[e];if(!a[e])return e;var t=a[e];for(var n in t)if(t.hasOwnProperty(n)&&n in u)return s[e]=t[n];return""}var i=e(36),a={animationend:r("Animation","AnimationEnd"),animationiteration:r("Animation","AnimationIteration"),animationstart:r("Animation","AnimationStart"),transitionend:r("Transition","TransitionEnd")},s={},u={};i.canUseDOM&&(u=document.createElement("div").style,"AnimationEvent"in window||(delete a.animationend.animation,delete a.animationiteration.animation,delete a.animationstart.animation),"TransitionEvent"in window||delete a.transitionend.transition),t.exports=o},{36:36}],2:[function(e,t,n){"use strict";function r(e){var t=/[=:]/g,n={"=":"=0",":":"=2"},r=(""+e).replace(t,function(e){return n[e]});return"$"+r}function o(e){var t=/(=0|=2)/g,n={"=0":"=","=2":":"},r="."===e[0]&&"$"===e[1]?e.substring(2):e.substring(1);return(""+r).replace(t,function(e){return n[e]})}var i={escape:r,unescape:o};t.exports=i},{}],3:[function(e,t,n){"use strict";var r=e(31),o=(e(39),function(e){var t=this;if(t.instancePool.length){var n=t.instancePool.pop();return t.call(n,e),n}return new t(e)}),i=function(e,t){var n=this;if(n.instancePool.length){var r=n.instancePool.pop();return n.call(r,e,t),r}return new n(e,t)},a=function(e,t,n){var r=this;if(r.instancePool.length){var o=r.instancePool.pop();return r.call(o,e,t,n),o}return new r(e,t,n)},s=function(e,t,n,r){var o=this;if(o.instancePool.length){var i=o.instancePool.pop();return o.call(i,e,t,n,r),i}return new o(e,t,n,r)},u=function(e){var t=this;e instanceof t?void 0:r("25"),e.destructor(),t.instancePool.length<t.poolSize&&t.instancePool.push(e)},c=10,p=o,l=function(e,t){var n=e;return n.instancePool=[],n.getPooled=t||p,n.poolSize||(n.poolSize=c),n.release=u,n},f={addPoolingTo:l,oneArgumentPooler:o,twoArgumentPooler:i,threeArgumentPooler:a,fourArgumentPooler:s};t.exports=f},{31:31,39:39}],4:[function(e,t,n){"use strict";var r=e(42),o=e(6),i=e(9),a=e(10),s=e(13),u=e(14),c=e(19),p=e(24),l=e(30),f=(e(41),u.createElement),d=u.createFactory,h=u.cloneElement,y=r,v=function(e){return e},m={Children:{map:i.map,forEach:i.forEach,count:i.count,toArray:i.toArray,only:l},Component:o.Component,PureComponent:o.PureComponent,createElement:f,cloneElement:h,isValidElement:u.isValidElement,PropTypes:c,createClass:a.createClass,createFactory:d,createMixin:v,DOM:s,version:p,__spread:y};t.exports=m},{10:10,13:13,14:14,19:19,24:24,30:30,41:41,42:42,6:6,9:9}],5:[function(e,t,n){"use strict";function r(){if(!o){var t=e(26);o=t.__SECRET_INJECTED_REACT_DOM_DO_NOT_USE_OR_YOU_WILL_BE_FIRED}return o}var o;n.getReactDOM=r},{26:26}],6:[function(e,t,n){"use strict";function r(e,t,n){this.props=e,this.context=t,this.refs=c,this.updater=n||u}function o(e,t,n){this.props=e,this.context=t,this.refs=c,this.updater=n||u}function i(){}var a=e(31),s=e(42),u=e(17),c=(e(27),e(38));e(39),e(41);r.prototype.isReactComponent={},r.prototype.setState=function(e,t){"object"!=typeof e&&"function"!=typeof e&&null!=e?a("85"):void 0,this.updater.enqueueSetState(this,e,t,"setState")},r.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};i.prototype=r.prototype,o.prototype=new i,o.prototype.constructor=o,s(o.prototype,r.prototype),o.prototype.isPureReactComponent=!0,t.exports={Component:r,PureComponent:o}},{17:17,27:27,31:31,38:38,39:39,41:41,42:42}],7:[function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function i(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}function a(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 ReactCSSTransitionGroup: 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)")}}}var s=e(42),u=e(4),c=e(23),p=e(8),l=function(e){function t(){var n,i,a;r(this,t);for(var s=arguments.length,c=Array(s),l=0;l<s;l++)c[l]=arguments[l];return n=i=o(this,e.call.apply(e,[this].concat(c))),i._wrapChild=function(e){return u.createElement(p,{name:i.props.transitionName,appear:i.props.transitionAppear,enter:i.props.transitionEnter,leave:i.props.transitionLeave,appearTimeout:i.props.transitionAppearTimeout,enterTimeout:i.props.transitionEnterTimeout,leaveTimeout:i.props.transitionLeaveTimeout},e)},a=n,o(i,a)}return i(t,e),t.prototype.render=function(){return u.createElement(c,s({},this.props,{childFactory:this._wrapChild}))},t}(u.Component);l.displayName="ReactCSSTransitionGroup",l.propTypes={transitionName:p.propTypes.name,transitionAppear:u.PropTypes.bool,transitionEnter:u.PropTypes.bool,transitionLeave:u.PropTypes.bool,transitionAppearTimeout:a("Appear"),transitionEnterTimeout:a("Enter"),transitionLeaveTimeout:a("Leave")},l.defaultProps={transitionAppear:!1,transitionEnter:!0,transitionLeave:!0},t.exports=l},{23:23,4:4,42:42,8:8}],8:[function(e,t,n){"use strict";var r=e(4),o=e(5),i=e(35),a=e(22),s=e(30),u=17,c=r.createClass({displayName:"ReactCSSTransitionGroupChild",propTypes:{name:r.PropTypes.oneOfType([r.PropTypes.string,r.PropTypes.shape({enter:r.PropTypes.string,leave:r.PropTypes.string,active:r.PropTypes.string}),r.PropTypes.shape({enter:r.PropTypes.string,enterActive:r.PropTypes.string,leave:r.PropTypes.string,leaveActive:r.PropTypes.string,appear:r.PropTypes.string,appearActive:r.PropTypes.string})]).isRequired,appear:r.PropTypes.bool,enter:r.PropTypes.bool,leave:r.PropTypes.bool,appearTimeout:r.PropTypes.number,enterTimeout:r.PropTypes.number,leaveTimeout:r.PropTypes.number},transition:function(e,t,n){var r=o.getReactDOM().findDOMNode(this);if(!r)return void(t&&t());var s=this.props.name[e]||this.props.name+"-"+e,u=this.props.name[e+"Active"]||s+"-active",c=null,p=function(e){e&&e.target!==r||(clearTimeout(c),i.removeClass(r,s),i.removeClass(r,u),a.removeEndEventListener(r,p),t&&t())};i.addClass(r,s),this.queueClassAndNode(u,r),n?(c=setTimeout(p,n),this.transitionTimeouts.push(c)):a.addEndEventListener(r,p)},queueClassAndNode:function(e,t){this.classNameAndNodeQueue.push({className:e,node:t}),this.timeout||(this.timeout=setTimeout(this.flushClassNameAndNodeQueue,u))},flushClassNameAndNodeQueue:function(){this.isMounted()&&this.classNameAndNodeQueue.forEach(function(e){i.addClass(e.node,e.className)}),this.classNameAndNodeQueue.length=0,this.timeout=null},componentWillMount:function(){this.classNameAndNodeQueue=[],this.transitionTimeouts=[]},componentWillUnmount:function(){this.timeout&&clearTimeout(this.timeout),this.transitionTimeouts.forEach(function(e){clearTimeout(e)}),this.classNameAndNodeQueue.length=0},componentWillAppear:function(e){this.props.appear?this.transition("appear",e,this.props.appearTimeout):e()},componentWillEnter:function(e){this.props.enter?this.transition("enter",e,this.props.enterTimeout):e()},componentWillLeave:function(e){this.props.leave?this.transition("leave",e,this.props.leaveTimeout):e()},render:function(){return s(this.props.children)}});t.exports=c},{22:22,30:30,35:35,4:4,5:5}],9:[function(e,t,n){"use strict";function r(e){return(""+e).replace(b,"$&/")}function o(e,t){this.func=e,this.context=t,this.count=0}function i(e,t,n){var r=e.func,o=e.context;r.call(o,t,e.count++)}function a(e,t,n){if(null==e)return e;var r=o.getPooled(t,n);m(e,i,r),o.release(r)}function s(e,t,n,r){this.result=e,this.keyPrefix=t,this.func=n,this.context=r,this.count=0}function u(e,t,n){var o=e.result,i=e.keyPrefix,a=e.func,s=e.context,u=a.call(s,t,e.count++);Array.isArray(u)?c(u,o,n,v.thatReturnsArgument):null!=u&&(y.isValidElement(u)&&(u=y.cloneAndReplaceKey(u,i+(!u.key||t&&t.key===u.key?"":r(u.key)+"/")+n)),o.push(u))}function c(e,t,n,o,i){var a="";null!=n&&(a=r(n)+"/");var c=s.getPooled(t,a,o,i);m(e,u,c),s.release(c)}function p(e,t,n){if(null==e)return e;var r=[];return c(e,r,null,t,n),r}function l(e,t,n){return null}function f(e,t){return m(e,l,null)}function d(e){var t=[];return c(e,t,null,v.thatReturnsArgument),t}var h=e(3),y=e(14),v=e(37),m=e(33),E=h.twoArgumentPooler,g=h.fourArgumentPooler,b=/\/+/g;o.prototype.destructor=function(){this.func=null,this.context=null,this.count=0},h.addPoolingTo(o,E),s.prototype.destructor=function(){this.result=null,this.keyPrefix=null,this.func=null,this.context=null,this.count=0},h.addPoolingTo(s,g);var _={forEach:a,map:p,mapIntoWithKeyPrefixInternal:c,count:f,toArray:d};t.exports=_},{14:14,3:3,33:33,37:37}],10:[function(e,t,n){"use strict";function r(e){return e}function o(e,t){var n=b.hasOwnProperty(t)?b[t]:null;T.hasOwnProperty(t)&&("OVERRIDE_BASE"!==n?f("73",t):void 0),e&&("DEFINE_MANY"!==n&&"DEFINE_MANY_MERGED"!==n?f("74",t):void 0)}function i(e,t){if(t){"function"==typeof t?f("75"):void 0,y.isValidElement(t)?f("76"):void 0;var n=e.prototype,r=n.__reactAutoBindPairs;t.hasOwnProperty(g)&&_.mixins(e,t.mixins);for(var i in t)if(t.hasOwnProperty(i)&&i!==g){var a=t[i],s=n.hasOwnProperty(i);if(o(s,i),_.hasOwnProperty(i))_[i](e,a);else{var p=b.hasOwnProperty(i),l="function"==typeof a,d=l&&!p&&!s&&t.autobind!==!1;if(d)r.push(i,a),n[i]=a;else if(s){var h=b[i];!p||"DEFINE_MANY_MERGED"!==h&&"DEFINE_MANY"!==h?f("77",h,i):void 0,"DEFINE_MANY_MERGED"===h?n[i]=u(n[i],a):"DEFINE_MANY"===h&&(n[i]=c(n[i],a))}else n[i]=a}}}}function a(e,t){if(t)for(var n in t){var r=t[n];if(t.hasOwnProperty(n)){var o=n in _;o?f("78",n):void 0;var i=n in e;i?f("79",n):void 0,e[n]=r}}}function s(e,t){e&&t&&"object"==typeof e&&"object"==typeof t?void 0:f("80");for(var n in t)t.hasOwnProperty(n)&&(void 0!==e[n]?f("81",n):void 0,e[n]=t[n]);return e}function u(e,t){return function(){var n=e.apply(this,arguments),r=t.apply(this,arguments);if(null==n)return r;if(null==r)return n;var o={};return s(o,n),s(o,r),o}}function c(e,t){return function(){e.apply(this,arguments),t.apply(this,arguments)}}function p(e,t){var n=t.bind(e);return n}function l(e){for(var t=e.__reactAutoBindPairs,n=0;n<t.length;n+=2){var r=t[n],o=t[n+1];e[r]=p(e,o)}}var f=e(31),d=e(42),h=e(6),y=e(14),v=(e(18),e(17)),m=e(38),E=(e(39),e(41),h.Component),g="mixins",b={mixins:"DEFINE_MANY",statics:"DEFINE_MANY",propTypes:"DEFINE_MANY",contextTypes:"DEFINE_MANY",childContextTypes:"DEFINE_MANY",getDefaultProps:"DEFINE_MANY_MERGED",getInitialState:"DEFINE_MANY_MERGED",getChildContext:"DEFINE_MANY_MERGED",render:"DEFINE_ONCE",componentWillMount:"DEFINE_MANY",componentDidMount:"DEFINE_MANY",componentWillReceiveProps:"DEFINE_MANY",shouldComponentUpdate:"DEFINE_ONCE",componentWillUpdate:"DEFINE_MANY",componentDidUpdate:"DEFINE_MANY",componentWillUnmount:"DEFINE_MANY",updateComponent:"OVERRIDE_BASE"},_={displayName:function(e,t){e.displayName=t},mixins:function(e,t){if(t)for(var n=0;n<t.length;n++)i(e,t[n])},childContextTypes:function(e,t){e.childContextTypes=d({},e.childContextTypes,t)},contextTypes:function(e,t){e.contextTypes=d({},e.contextTypes,t)},getDefaultProps:function(e,t){e.getDefaultProps?e.getDefaultProps=u(e.getDefaultProps,t):e.getDefaultProps=t},propTypes:function(e,t){e.propTypes=d({},e.propTypes,t)},statics:function(e,t){a(e,t)},autobind:function(){}},T={replaceState:function(e,t){this.updater.enqueueReplaceState(this,e,t,"replaceState")},isMounted:function(){return this.updater.isMounted(this)}},P=function(){};d(P.prototype,E.prototype,T);var A={createClass:function(e){var t=r(function(e,n,r){this.__reactAutoBindPairs.length&&l(this),this.props=e,this.context=n,this.refs=m,this.updater=r||v,this.state=null;var o=this.getInitialState?this.getInitialState():null;"object"!=typeof o||Array.isArray(o)?f("82",t.displayName||"ReactCompositeComponent"):void 0,this.state=o});t.prototype=new P,t.prototype.constructor=t,t.prototype.__reactAutoBindPairs=[],i(t,e),t.getDefaultProps&&(t.defaultProps=t.getDefaultProps()),t.prototype.render?void 0:f("83");for(var n in b)t.prototype[n]||(t.prototype[n]=null);return t}};t.exports=A},{14:14,17:17,18:18,31:31,38:38,39:39,41:41,42:42,6:6}],11:[function(e,t,n){"use strict";var r=e(32),o={shouldComponentUpdate:function(e,t){return r(this,e,t)}};t.exports=o},{32:32}],12:[function(e,t,n){"use strict";var r={current:null};t.exports=r},{}],13:[function(e,t,n){"use strict";var r=e(14),o=r.createFactory,i={a:o("a"),abbr:o("abbr"),address:o("address"),area:o("area"),article:o("article"),aside:o("aside"),audio:o("audio"),b:o("b"),base:o("base"),bdi:o("bdi"),bdo:o("bdo"),big:o("big"),blockquote:o("blockquote"),body:o("body"),br:o("br"),button:o("button"),canvas:o("canvas"),caption:o("caption"),cite:o("cite"),code:o("code"),col:o("col"),colgroup:o("colgroup"),data:o("data"),datalist:o("datalist"),dd:o("dd"),del:o("del"),details:o("details"),dfn:o("dfn"),dialog:o("dialog"),div:o("div"),dl:o("dl"),dt:o("dt"),em:o("em"),embed:o("embed"),fieldset:o("fieldset"),figcaption:o("figcaption"),figure:o("figure"),footer:o("footer"),form:o("form"),h1:o("h1"),h2:o("h2"),h3:o("h3"),h4:o("h4"),h5:o("h5"),h6:o("h6"),head:o("head"),header:o("header"),hgroup:o("hgroup"),hr:o("hr"),html:o("html"),i:o("i"),iframe:o("iframe"),img:o("img"),input:o("input"),ins:o("ins"),kbd:o("kbd"),keygen:o("keygen"),label:o("label"),legend:o("legend"),li:o("li"),link:o("link"),main:o("main"),map:o("map"),mark:o("mark"),menu:o("menu"),menuitem:o("menuitem"),meta:o("meta"),meter:o("meter"),nav:o("nav"),noscript:o("noscript"),object:o("object"),ol:o("ol"),optgroup:o("optgroup"),option:o("option"),output:o("output"),p:o("p"),param:o("param"),picture:o("picture"),pre:o("pre"),progress:o("progress"),q:o("q"),rp:o("rp"),rt:o("rt"),ruby:o("ruby"),s:o("s"),samp:o("samp"),script:o("script"),section:o("section"),select:o("select"),small:o("small"),source:o("source"),span:o("span"),strong:o("strong"),style:o("style"),sub:o("sub"),summary:o("summary"),sup:o("sup"),table:o("table"),tbody:o("tbody"),td:o("td"),textarea:o("textarea"),tfoot:o("tfoot"),th:o("th"),thead:o("thead"),time:o("time"),title:o("title"),tr:o("tr"),track:o("track"),u:o("u"),ul:o("ul"),var:o("var"),video:o("video"),wbr:o("wbr"),circle:o("circle"),clipPath:o("clipPath"),defs:o("defs"),ellipse:o("ellipse"),g:o("g"),image:o("image"),line:o("line"),linearGradient:o("linearGradient"),mask:o("mask"),path:o("path"),pattern:o("pattern"),polygon:o("polygon"),polyline:o("polyline"),radialGradient:o("radialGradient"),rect:o("rect"),stop:o("stop"),svg:o("svg"),text:o("text"),tspan:o("tspan")};t.exports=i},{14:14}],14:[function(e,t,n){"use strict";function r(e){return void 0!==e.ref}function o(e){return void 0!==e.key}var i=e(42),a=e(12),s=(e(41),e(27),Object.prototype.hasOwnProperty),u=e(15),c={key:!0,ref:!0,__self:!0,__source:!0},p=function(e,t,n,r,o,i,a){var s={$$typeof:u,type:e,key:t,ref:n,props:a,_owner:i};return s};p.createElement=function(e,t,n){var i,u={},l=null,f=null,d=null,h=null;if(null!=t){r(t)&&(f=t.ref),o(t)&&(l=""+t.key),d=void 0===t.__self?null:t.__self,h=void 0===t.__source?null:t.__source;for(i in t)s.call(t,i)&&!c.hasOwnProperty(i)&&(u[i]=t[i])}var y=arguments.length-2;if(1===y)u.children=n;else if(y>1){for(var v=Array(y),m=0;m<y;m++)v[m]=arguments[m+2];u.children=v}if(e&&e.defaultProps){var E=e.defaultProps;for(i in E)void 0===u[i]&&(u[i]=E[i])}return p(e,l,f,d,h,a.current,u)},p.createFactory=function(e){var t=p.createElement.bind(null,e);return t.type=e,t},p.cloneAndReplaceKey=function(e,t){var n=p(e.type,t,e.ref,e._self,e._source,e._owner,e.props);return n},p.cloneElement=function(e,t,n){var u,l=i({},e.props),f=e.key,d=e.ref,h=e._self,y=e._source,v=e._owner;if(null!=t){r(t)&&(d=t.ref,v=a.current),o(t)&&(f=""+t.key);var m;e.type&&e.type.defaultProps&&(m=e.type.defaultProps);for(u in t)s.call(t,u)&&!c.hasOwnProperty(u)&&(void 0===t[u]&&void 0!==m?l[u]=m[u]:l[u]=t[u])}var E=arguments.length-2;if(1===E)l.children=n;else if(E>1){for(var g=Array(E),b=0;b<E;b++)g[b]=arguments[b+2];l.children=g}return p(e.type,f,d,h,y,v,l)},p.isValidElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===u},t.exports=p},{12:12,15:15,27:27,41:41,42:42}],15:[function(e,t,n){"use strict";var r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103;t.exports=r},{}],16:[function(e,t,n){"use strict";var r=e(31),o=e(9),i=e(14),a=e(37),s=(e(39),e(41),{create:function(e){if("object"!=typeof e||!e||Array.isArray(e))return e;if(i.isValidElement(e))return e;1===e.nodeType?r("0"):void 0;var t=[];for(var n in e)o.mapIntoWithKeyPrefixInternal(e[n],t,n,a.thatReturnsArgument);return t}});t.exports=s},{14:14,31:31,37:37,39:39,41:41,9:9}],17:[function(e,t,n){"use strict";function r(e,t){}var o=(e(41),{isMounted:function(e){return!1},enqueueForceUpdate:function(e,t,n){r(e,"forceUpdate")},enqueueReplaceState:function(e,t,n,o){r(e,"replaceState")},enqueueSetState:function(e,t,n,o){r(e,"setState")}});t.exports=o},{41:41}],18:[function(e,t,n){"use strict";var r={};t.exports=r},{}],19:[function(e,t,n){"use strict";function r(e){this.message=e,this.stack=""}var o,i=(e(31),e(14),e(18),e(20),e(37),e(29),e(39)),a=(e(41),function(){i(!1,"React.PropTypes type checking code is stripped in production.")});a.isRequired=a;var s=function(){return a};o={array:a,bool:a,func:a,number:a,object:a,string:a,symbol:a,any:a,arrayOf:s,element:a,instanceOf:s,node:a,objectOf:s,oneOf:s,oneOfType:s,shape:s},r.prototype=Error.prototype,t.exports=o},{14:14,18:18,20:20,29:29,31:31,37:37,39:39,41:41}],20:[function(e,t,n){"use strict";var r="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";t.exports=r},{}],21:[function(e,t,n){"use strict";var r=e(28),o={getChildMapping:function(e,t){return e?r(e):e},mergeChildMappings:function(e,t){function n(n){return t.hasOwnProperty(n)?t[n]:e[n]}e=e||{},t=t||{};var r={},o=[];for(var i in e)t.hasOwnProperty(i)?o.length&&(r[i]=o,o=[]):o.push(i);var a,s={};for(var u in t){if(r.hasOwnProperty(u))for(a=0;a<r[u].length;a++){var c=r[u][a];s[r[u][a]]=n(c)}s[u]=n(u)}for(a=0;a<o.length;a++)s[o[a]]=n(o[a]);return s}};t.exports=o},{28:28}],22:[function(e,t,n){"use strict";function r(){var e=s("animationend"),t=s("transitionend");e&&u.push(e),t&&u.push(t)}function o(e,t,n){e.addEventListener(t,n,!1)}function i(e,t,n){e.removeEventListener(t,n,!1)}var a=e(36),s=e(1),u=[];a.canUseDOM&&r();var c={addEndEventListener:function(e,t){return 0===u.length?void window.setTimeout(t,0):void u.forEach(function(n){o(e,n,t)})},removeEndEventListener:function(e,t){0!==u.length&&u.forEach(function(n){i(e,n,t)})}};t.exports=c},{1:1,36:36}],23:[function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function i(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var a=e(42),s=e(4),u=e(21),c=e(37),p=function(e){function t(){var n,i,s;r(this,t);for(var c=arguments.length,p=Array(c),l=0;l<c;l++)p[l]=arguments[l];return n=i=o(this,e.call.apply(e,[this].concat(p))),i.state={children:u.getChildMapping(i.props.children)},i.performAppear=function(e){i.currentlyTransitioningKeys[e]=!0;var t=i.refs[e];t.componentWillAppear?t.componentWillAppear(i._handleDoneAppearing.bind(i,e)):i._handleDoneAppearing(e)},i._handleDoneAppearing=function(e){var t=i.refs[e];t.componentDidAppear&&t.componentDidAppear(),delete i.currentlyTransitioningKeys[e];var n=u.getChildMapping(i.props.children);n&&n.hasOwnProperty(e)||i.performLeave(e)},i.performEnter=function(e){i.currentlyTransitioningKeys[e]=!0;var t=i.refs[e];t.componentWillEnter?t.componentWillEnter(i._handleDoneEntering.bind(i,e)):i._handleDoneEntering(e)},i._handleDoneEntering=function(e){var t=i.refs[e];t.componentDidEnter&&t.componentDidEnter(),delete i.currentlyTransitioningKeys[e];var n=u.getChildMapping(i.props.children);n&&n.hasOwnProperty(e)||i.performLeave(e)},i.performLeave=function(e){i.currentlyTransitioningKeys[e]=!0;var t=i.refs[e];t.componentWillLeave?t.componentWillLeave(i._handleDoneLeaving.bind(i,e)):i._handleDoneLeaving(e)},i._handleDoneLeaving=function(e){var t=i.refs[e];t.componentDidLeave&&t.componentDidLeave(),delete i.currentlyTransitioningKeys[e];var n=u.getChildMapping(i.props.children);n&&n.hasOwnProperty(e)?i.performEnter(e):i.setState(function(t){var n=a({},t.children);return delete n[e],{children:n}})},s=n,o(i,s)}return i(t,e),t.prototype.componentWillMount=function(){this.currentlyTransitioningKeys={},this.keysToEnter=[],this.keysToLeave=[]},t.prototype.componentDidMount=function(){var e=this.state.children;for(var t in e)e[t]&&this.performAppear(t)},t.prototype.componentWillReceiveProps=function(e){var t=u.getChildMapping(e.children),n=this.state.children;this.setState({children:u.mergeChildMappings(n,t)});var r;for(r in t){var o=n&&n.hasOwnProperty(r);!t[r]||o||this.currentlyTransitioningKeys[r]||this.keysToEnter.push(r)}for(r in n){var i=t&&t.hasOwnProperty(r);!n[r]||i||this.currentlyTransitioningKeys[r]||this.keysToLeave.push(r)}},t.prototype.componentDidUpdate=function(){var e=this.keysToEnter;this.keysToEnter=[],e.forEach(this.performEnter);var t=this.keysToLeave;this.keysToLeave=[],t.forEach(this.performLeave)},t.prototype.render=function(){var e=[];for(var t in this.state.children){var n=this.state.children[t];n&&e.push(s.cloneElement(this.props.childFactory(n),{ref:t,key:t}))}var r=a({},this.props);return delete r.transitionLeave,delete r.transitionName,delete r.transitionAppear,delete r.transitionEnter,delete r.childFactory,delete r.transitionLeaveTimeout,delete r.transitionEnterTimeout,delete r.transitionAppearTimeout,delete r.component,s.createElement(this.props.component,r,e)},t}(s.Component);p.displayName="ReactTransitionGroup",p.propTypes={component:s.PropTypes.any,childFactory:s.PropTypes.func},p.defaultProps={component:"span",childFactory:c.thatReturnsArgument},t.exports=p},{21:21,37:37,4:4,42:42}],24:[function(e,t,n){"use strict";t.exports="16.0.0-alpha.2"},{}],25:[function(e,t,n){"use strict";var r=e(4),o=(e(5),e(11)),i=e(7),a=e(16),s=e(23),u=e(32),c=e(34);r.addons={CSSTransitionGroup:i,PureRenderMixin:o,TransitionGroup:s,createFragment:a.create,shallowCompare:u,update:c},t.exports=r},{11:11,16:16,23:23,32:32,34:34,4:4,5:5,7:7}],26:[function(e,t,n){"use strict";var r=e(42),o=e(25),i=r({__SECRET_INJECTED_REACT_DOM_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:null,__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:{ReactCurrentOwner:e(12)}},o);t.exports=i},{12:12,25:25,42:42}],27:[function(e,t,n){"use strict";var r=!1;t.exports=r},{}],28:[function(e,t,n){(function(n){"use strict";function r(e,t,n,r){if(e&&"object"==typeof e){var o=e,i=void 0===o[n];i&&null!=t&&(o[n]=t)}}function o(e,t){if(null==e)return e;var n={};return i(e,r,n),n}var i=(e(2),e(33));e(41);"undefined"!=typeof n&&n.env,t.exports=o}).call(this,void 0)},{2:2,33:33,41:41}],29:[function(e,t,n){"use strict";function r(e){var t=e&&(o&&e[o]||e[i]);if("function"==typeof t)return t}var o="function"==typeof Symbol&&Symbol.iterator,i="@@iterator";t.exports=r},{}],30:[function(e,t,n){"use strict";function r(e){return i.isValidElement(e)?void 0:o("143"),e}var o=e(31),i=e(14);e(39);t.exports=r},{14:14,31:31,39:39}],31:[function(e,t,n){"use strict";function r(e){for(var t=arguments.length-1,n="Minified React error #"+e+"; visit http://facebook.github.io/react/docs/error-decoder.html?invariant="+e,r=0;r<t;r++)n+="&args[]="+encodeURIComponent(arguments[r+1]);n+=" for the full message or use the non-minified dev environment for full errors and additional helpful warnings.";var o=new Error(n);throw o.name="Invariant Violation",o.framesToPop=1,o}t.exports=r},{}],32:[function(e,t,n){"use strict";function r(e,t,n){return!o(e.props,t)||!o(e.state,n)}var o=e(40);t.exports=r},{40:40}],33:[function(e,t,n){"use strict";function r(e,t){return e&&"object"==typeof e&&null!=e.key?c.escape(e.key):t.toString(36)}function o(e,t,n,i){var c=typeof e;if("undefined"!==c&&"boolean"!==c||(e=null),null===e||"string"===c||"number"===c||"object"===c&&e.$$typeof===s)return n(i,e,""===t?p+r(e,0):t),1;var f,d,h=0,y=""===t?p:t+l;if(Array.isArray(e))for(var v=0;v<e.length;v++)f=e[v],d=y+r(f,v),h+=o(f,d,n,i);else{var m=u(e);if(m)for(var E,g=m.call(e),b=0;!(E=g.next()).done;)f=E.value,d=y+r(f,b++),h+=o(f,d,n,i);else if("object"===c){var _="",T=String(e);a("31","[object Object]"===T?"object with keys {"+Object.keys(e).join(", ")+"}":T,_)}}return h}function i(e,t,n){return null==e?0:o(e,"",t,n)}var a=e(31),s=(e(12),e(15)),u=e(29),c=(e(39),e(2)),p=(e(41),"."),l=":";t.exports=i},{12:12,15:15,2:2,29:29,31:31,39:39,41:41}],34:[function(e,t,n){"use strict";function r(e){return Array.isArray(e)?e.concat():e&&"object"==typeof e?s(new e.constructor,e):e}function o(e,t,n){Array.isArray(e)?void 0:a("1",n,e);var r=t[n];Array.isArray(r)?void 0:a("2",n,r)}function i(e,t){if("object"!=typeof t?a("3",y.join(", "),f):void 0,u.call(t,f))return 1!==Object.keys(t).length?a("4",f):void 0,t[f];var n=r(e);if(u.call(t,d)){var m=t[d];m&&"object"==typeof m?void 0:a("5",d,m),n&&"object"==typeof n?void 0:a("6",d,n),s(n,t[d])}u.call(t,c)&&(o(e,t,c),t[c].forEach(function(e){n.push(e)})),u.call(t,p)&&(o(e,t,p),t[p].forEach(function(e){n.unshift(e)})),u.call(t,l)&&(Array.isArray(e)?void 0:a("7",l,e),Array.isArray(t[l])?void 0:a("8",l,t[l]),t[l].forEach(function(e){Array.isArray(e)?void 0:a("8",l,t[l]),n.splice.apply(n,e)})),u.call(t,h)&&("function"!=typeof t[h]?a("9",h,t[h]):void 0,n=t[h](n));for(var E in t)v.hasOwnProperty(E)&&v[E]||(n[E]=i(e[E],t[E]));return n}var a=e(31),s=e(42),u=(e(39),{}.hasOwnProperty),c="$push",p="$unshift",l="$splice",f="$set",d="$merge",h="$apply",y=[c,p,l,f,d,h],v={};y.forEach(function(e){v[e]=!0}),t.exports=i},{31:31,39:39,42:42}],35:[function(e,t,n){"use strict";function r(e,t){for(var n=e;n.parentNode;)n=n.parentNode;var r=n.querySelectorAll(t);return Array.prototype.indexOf.call(r,e)!==-1}var o=e(39),i={addClass:function(e,t){return/\s/.test(t)?o(!1):void 0,t&&(e.classList?e.classList.add(t):i.hasClass(e,t)||(e.className=e.className+" "+t)),e},removeClass:function(e,t){return/\s/.test(t)?o(!1):void 0,t&&(e.classList?e.classList.remove(t):i.hasClass(e,t)&&(e.className=e.className.replace(new RegExp("(^|\\s)"+t+"(?:\\s|$)","g"),"$1").replace(/\s+/g," ").replace(/^\s*|\s*$/g,""))),e},conditionClass:function(e,t,n){return(n?i.addClass:i.removeClass)(e,t)},hasClass:function(e,t){return/\s/.test(t)?o(!1):void 0,e.classList?!!t&&e.classList.contains(t):(" "+e.className+" ").indexOf(" "+t+" ")>-1},matchesSelector:function(e,t){var n=e.matches||e.webkitMatchesSelector||e.mozMatchesSelector||e.msMatchesSelector||function(t){return r(e,t)};return n.call(e,t)}};t.exports=i},{39:39}],36:[function(e,t,n){"use strict";var r=!("undefined"==typeof window||!window.document||!window.document.createElement),o={canUseDOM:r,canUseWorkers:"undefined"!=typeof Worker,canUseEventListeners:r&&!(!window.addEventListener&&!window.attachEvent),canUseViewport:r&&!!window.screen,isInWorker:!r};t.exports=o},{}],37:[function(e,t,n){"use strict";function r(e){return function(){return e}}var o=function(){};o.thatReturns=r,o.thatReturnsFalse=r(!1),o.thatReturnsTrue=r(!0),o.thatReturnsNull=r(null),o.thatReturnsThis=function(){return this},o.thatReturnsArgument=function(e){return e},t.exports=o},{}],38:[function(e,t,n){"use strict";var r={};t.exports=r},{}],39:[function(e,t,n){"use strict";function r(e,t,n,r,i,a,s,u){if(o(t),!e){var c;if(void 0===t)c=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var p=[n,r,i,a,s,u],l=0;c=new Error(t.replace(/%s/g,function(){return p[l++]})),c.name="Invariant Violation"}throw c.framesToPop=1,c}}var o=function(e){};t.exports=r},{}],40:[function(e,t,n){"use strict";function r(e,t){return e===t?0!==e||0!==t||1/e===1/t:e!==e&&t!==t}function o(e,t){if(r(e,t))return!0;if("object"!=typeof e||null===e||"object"!=typeof t||null===t)return!1;var n=Object.keys(e),o=Object.keys(t);if(n.length!==o.length)return!1;for(var a=0;a<n.length;a++)if(!i.call(t,n[a])||!r(e[n[a]],t[n[a]]))return!1;return!0}var i=Object.prototype.hasOwnProperty;t.exports=o},{}],41:[function(e,t,n){"use strict";var r=e(37),o=r;t.exports=o},{37:37}],42:[function(e,t,n){/*
13
- object-assign
14
- (c) Sindre Sorhus
15
- @license MIT
16
- */
17
- "use strict";function r(e){if(null===e||void 0===e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}function o(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},n=0;n<10;n++)t["_"+String.fromCharCode(n)]=n;var r=Object.getOwnPropertyNames(t).map(function(e){return t[e]});if("0123456789"!==r.join(""))return!1;var o={};return"abcdefghijklmnopqrst".split("").forEach(function(e){o[e]=e}),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},o)).join("")}catch(e){return!1}}var i=Object.getOwnPropertySymbols,a=Object.prototype.hasOwnProperty,s=Object.prototype.propertyIsEnumerable;t.exports=o()?Object.assign:function(e,t){for(var n,o,u=r(e),c=1;c<arguments.length;c++){n=Object(arguments[c]);for(var p in n)a.call(n,p)&&(u[p]=n[p]);if(i){o=i(n);for(var l=0;l<o.length;l++)s.call(n,o[l])&&(u[o[l]]=n[o[l]])}}return u}},{}]},{},[26])(26)});
@@ -1,36 +0,0 @@
1
- /**
2
- * Copyright 2013-present, Facebook, Inc.
3
- * All rights reserved.
4
- *
5
- * This source code is licensed under the BSD-style license found in the
6
- * LICENSE file in the root directory of this source tree. An additional grant
7
- * of patent rights can be found in the PATENTS file in the same directory.
8
- *
9
- */
10
-
11
- 'use strict';
12
-
13
- var ReactDOM = require('react-dom/lib/ReactDOM');
14
-
15
- exports.getReactDOM = function () {
16
- return ReactDOM;
17
- };
18
-
19
- if (process.env.NODE_ENV !== 'production') {
20
- var ReactPerf;
21
- var ReactTestUtils;
22
-
23
- exports.getReactPerf = function () {
24
- if (!ReactPerf) {
25
- ReactPerf = require('react-dom/lib/ReactPerf');
26
- }
27
- return ReactPerf;
28
- };
29
-
30
- exports.getReactTestUtils = function () {
31
- if (!ReactTestUtils) {
32
- ReactTestUtils = require('react-dom/lib/ReactTestUtils');
33
- }
34
- return ReactTestUtils;
35
- };
36
- }
@@ -1,35 +0,0 @@
1
- /**
2
- * Copyright 2013-present, Facebook, Inc.
3
- * All rights reserved.
4
- *
5
- * This source code is licensed under the BSD-style license found in the
6
- * LICENSE file in the root directory of this source tree. An additional grant
7
- * of patent rights can be found in the PATENTS file in the same directory.
8
- *
9
- */
10
-
11
- 'use strict';
12
-
13
- var ReactDOM;
14
-
15
- function getReactDOM() {
16
- if (!ReactDOM) {
17
- // This is safe to use because current module only exists in the addons build:
18
- var ReactWithAddonsUMDEntry = require('./ReactWithAddonsUMDEntry');
19
- // This is injected by the ReactDOM UMD build:
20
- ReactDOM = ReactWithAddonsUMDEntry.__SECRET_INJECTED_REACT_DOM_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
21
- }
22
- return ReactDOM;
23
- }
24
-
25
- exports.getReactDOM = getReactDOM;
26
-
27
- if (process.env.NODE_ENV !== 'production') {
28
- exports.getReactPerf = function () {
29
- return getReactDOM().__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactPerf;
30
- };
31
-
32
- exports.getReactTestUtils = function () {
33
- return getReactDOM().__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactTestUtils;
34
- };
35
- }
@@ -1,104 +0,0 @@
1
- /**
2
- * Copyright 2013-present, Facebook, Inc.
3
- * All rights reserved.
4
- *
5
- * This source code is licensed under the BSD-style license found in the
6
- * LICENSE file in the root directory of this source tree. An additional grant
7
- * of patent rights can be found in the PATENTS file in the same directory.
8
- *
9
- */
10
-
11
- 'use strict';
12
-
13
- var _assign = require('object-assign');
14
-
15
- function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
16
-
17
- function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
18
-
19
- function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
20
-
21
- var React = require('./React');
22
-
23
- var ReactTransitionGroup = require('./ReactTransitionGroup');
24
- var ReactCSSTransitionGroupChild = require('./ReactCSSTransitionGroupChild');
25
-
26
- function createTransitionTimeoutPropValidator(transitionType) {
27
- var timeoutPropName = 'transition' + transitionType + 'Timeout';
28
- var enabledPropName = 'transition' + transitionType;
29
-
30
- return function (props) {
31
- // If the transition is enabled
32
- if (props[enabledPropName]) {
33
- // If no timeout duration is provided
34
- if (props[timeoutPropName] == null) {
35
- return new Error(timeoutPropName + ' wasn\'t supplied to ReactCSSTransitionGroup: ' + '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.');
36
-
37
- // If the duration isn't a number
38
- } else if (typeof props[timeoutPropName] !== 'number') {
39
- return new Error(timeoutPropName + ' must be a number (in milliseconds)');
40
- }
41
- }
42
- };
43
- }
44
-
45
- /**
46
- * An easy way to perform CSS transitions and animations when a React component
47
- * enters or leaves the DOM.
48
- * See https://facebook.github.io/react/docs/animation.html#high-level-api-reactcsstransitiongroup
49
- */
50
-
51
- var ReactCSSTransitionGroup = function (_React$Component) {
52
- _inherits(ReactCSSTransitionGroup, _React$Component);
53
-
54
- function ReactCSSTransitionGroup() {
55
- var _temp, _this, _ret;
56
-
57
- _classCallCheck(this, ReactCSSTransitionGroup);
58
-
59
- for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
60
- args[_key] = arguments[_key];
61
- }
62
-
63
- return _ret = (_temp = (_this = _possibleConstructorReturn(this, _React$Component.call.apply(_React$Component, [this].concat(args))), _this), _this._wrapChild = function (child) {
64
- // We need to provide this childFactory so that
65
- // ReactCSSTransitionGroupChild can receive updates to name, enter, and
66
- // leave while it is leaving.
67
- return React.createElement(ReactCSSTransitionGroupChild, {
68
- name: _this.props.transitionName,
69
- appear: _this.props.transitionAppear,
70
- enter: _this.props.transitionEnter,
71
- leave: _this.props.transitionLeave,
72
- appearTimeout: _this.props.transitionAppearTimeout,
73
- enterTimeout: _this.props.transitionEnterTimeout,
74
- leaveTimeout: _this.props.transitionLeaveTimeout
75
- }, child);
76
- }, _temp), _possibleConstructorReturn(_this, _ret);
77
- }
78
-
79
- ReactCSSTransitionGroup.prototype.render = function render() {
80
- return React.createElement(ReactTransitionGroup, _assign({}, this.props, { childFactory: this._wrapChild }));
81
- };
82
-
83
- return ReactCSSTransitionGroup;
84
- }(React.Component);
85
-
86
- ReactCSSTransitionGroup.displayName = 'ReactCSSTransitionGroup';
87
- ReactCSSTransitionGroup.propTypes = {
88
- transitionName: ReactCSSTransitionGroupChild.propTypes.name,
89
-
90
- transitionAppear: React.PropTypes.bool,
91
- transitionEnter: React.PropTypes.bool,
92
- transitionLeave: React.PropTypes.bool,
93
- transitionAppearTimeout: createTransitionTimeoutPropValidator('Appear'),
94
- transitionEnterTimeout: createTransitionTimeoutPropValidator('Enter'),
95
- transitionLeaveTimeout: createTransitionTimeoutPropValidator('Leave')
96
- };
97
- ReactCSSTransitionGroup.defaultProps = {
98
- transitionAppear: false,
99
- transitionEnter: true,
100
- transitionLeave: true
101
- };
102
-
103
-
104
- module.exports = ReactCSSTransitionGroup;
@@ -1,166 +0,0 @@
1
- /**
2
- * Copyright 2013-present, Facebook, Inc.
3
- * All rights reserved.
4
- *
5
- * This source code is licensed under the BSD-style license found in the
6
- * LICENSE file in the root directory of this source tree. An additional grant
7
- * of patent rights can be found in the PATENTS file in the same directory.
8
- *
9
- */
10
-
11
- 'use strict';
12
-
13
- var React = require('./React');
14
- var ReactAddonsDOMDependencies = require('./ReactAddonsDOMDependencies');
15
-
16
- var CSSCore = require('fbjs/lib/CSSCore');
17
- var ReactTransitionEvents = require('./ReactTransitionEvents');
18
-
19
- var onlyChild = require('./onlyChild');
20
-
21
- var TICK = 17;
22
-
23
- var ReactCSSTransitionGroupChild = React.createClass({
24
- displayName: 'ReactCSSTransitionGroupChild',
25
-
26
- propTypes: {
27
- name: React.PropTypes.oneOfType([React.PropTypes.string, React.PropTypes.shape({
28
- enter: React.PropTypes.string,
29
- leave: React.PropTypes.string,
30
- active: React.PropTypes.string
31
- }), React.PropTypes.shape({
32
- enter: React.PropTypes.string,
33
- enterActive: React.PropTypes.string,
34
- leave: React.PropTypes.string,
35
- leaveActive: React.PropTypes.string,
36
- appear: React.PropTypes.string,
37
- appearActive: React.PropTypes.string
38
- })]).isRequired,
39
-
40
- // Once we require timeouts to be specified, we can remove the
41
- // boolean flags (appear etc.) and just accept a number
42
- // or a bool for the timeout flags (appearTimeout etc.)
43
- appear: React.PropTypes.bool,
44
- enter: React.PropTypes.bool,
45
- leave: React.PropTypes.bool,
46
- appearTimeout: React.PropTypes.number,
47
- enterTimeout: React.PropTypes.number,
48
- leaveTimeout: React.PropTypes.number
49
- },
50
-
51
- transition: function (animationType, finishCallback, userSpecifiedDelay) {
52
- var node = ReactAddonsDOMDependencies.getReactDOM().findDOMNode(this);
53
-
54
- if (!node) {
55
- if (finishCallback) {
56
- finishCallback();
57
- }
58
- return;
59
- }
60
-
61
- var className = this.props.name[animationType] || this.props.name + '-' + animationType;
62
- var activeClassName = this.props.name[animationType + 'Active'] || className + '-active';
63
- var timeout = null;
64
-
65
- var endListener = function (e) {
66
- if (e && e.target !== node) {
67
- return;
68
- }
69
-
70
- clearTimeout(timeout);
71
-
72
- CSSCore.removeClass(node, className);
73
- CSSCore.removeClass(node, activeClassName);
74
-
75
- ReactTransitionEvents.removeEndEventListener(node, endListener);
76
-
77
- // Usually this optional callback is used for informing an owner of
78
- // a leave animation and telling it to remove the child.
79
- if (finishCallback) {
80
- finishCallback();
81
- }
82
- };
83
-
84
- CSSCore.addClass(node, className);
85
-
86
- // Need to do this to actually trigger a transition.
87
- this.queueClassAndNode(activeClassName, node);
88
-
89
- // If the user specified a timeout delay.
90
- if (userSpecifiedDelay) {
91
- // Clean-up the animation after the specified delay
92
- timeout = setTimeout(endListener, userSpecifiedDelay);
93
- this.transitionTimeouts.push(timeout);
94
- } else {
95
- // DEPRECATED: this listener will be removed in a future version of react
96
- ReactTransitionEvents.addEndEventListener(node, endListener);
97
- }
98
- },
99
-
100
- queueClassAndNode: function (className, node) {
101
- this.classNameAndNodeQueue.push({
102
- className: className,
103
- node: node
104
- });
105
-
106
- if (!this.timeout) {
107
- this.timeout = setTimeout(this.flushClassNameAndNodeQueue, TICK);
108
- }
109
- },
110
-
111
- flushClassNameAndNodeQueue: function () {
112
- if (this.isMounted()) {
113
- this.classNameAndNodeQueue.forEach(function (obj) {
114
- CSSCore.addClass(obj.node, obj.className);
115
- });
116
- }
117
- this.classNameAndNodeQueue.length = 0;
118
- this.timeout = null;
119
- },
120
-
121
- componentWillMount: function () {
122
- this.classNameAndNodeQueue = [];
123
- this.transitionTimeouts = [];
124
- },
125
-
126
- componentWillUnmount: function () {
127
- if (this.timeout) {
128
- clearTimeout(this.timeout);
129
- }
130
- this.transitionTimeouts.forEach(function (timeout) {
131
- clearTimeout(timeout);
132
- });
133
-
134
- this.classNameAndNodeQueue.length = 0;
135
- },
136
-
137
- componentWillAppear: function (done) {
138
- if (this.props.appear) {
139
- this.transition('appear', done, this.props.appearTimeout);
140
- } else {
141
- done();
142
- }
143
- },
144
-
145
- componentWillEnter: function (done) {
146
- if (this.props.enter) {
147
- this.transition('enter', done, this.props.enterTimeout);
148
- } else {
149
- done();
150
- }
151
- },
152
-
153
- componentWillLeave: function (done) {
154
- if (this.props.leave) {
155
- this.transition('leave', done, this.props.leaveTimeout);
156
- } else {
157
- done();
158
- }
159
- },
160
-
161
- render: function () {
162
- return onlyChild(this.props.children);
163
- }
164
- });
165
-
166
- module.exports = ReactCSSTransitionGroupChild;
@@ -1,47 +0,0 @@
1
- /**
2
- * Copyright 2013-present, Facebook, Inc.
3
- * All rights reserved.
4
- *
5
- * This source code is licensed under the BSD-style license found in the
6
- * LICENSE file in the root directory of this source tree. An additional grant
7
- * of patent rights can be found in the PATENTS file in the same directory.
8
- *
9
- */
10
-
11
- 'use strict';
12
-
13
- var shallowCompare = require('./shallowCompare');
14
-
15
- /**
16
- * If your React component's render function is "pure", e.g. it will render the
17
- * same result given the same props and state, provide this mixin for a
18
- * considerable performance boost.
19
- *
20
- * Most React components have pure render functions.
21
- *
22
- * Example:
23
- *
24
- * var ReactComponentWithPureRenderMixin =
25
- * require('ReactComponentWithPureRenderMixin');
26
- * React.createClass({
27
- * mixins: [ReactComponentWithPureRenderMixin],
28
- *
29
- * render: function() {
30
- * return <div className={this.props.className}>foo</div>;
31
- * }
32
- * });
33
- *
34
- * Note: This only checks shallow equality for props and state. If these contain
35
- * complex data structures this mixin may have false-negatives for deeper
36
- * differences. Only mixin to components which have simple props and state, or
37
- * use `forceUpdate()` when you know deep data structures have changed.
38
- *
39
- * See https://facebook.github.io/react/docs/pure-render-mixin.html
40
- */
41
- var ReactComponentWithPureRenderMixin = {
42
- shouldComponentUpdate: function (nextProps, nextState) {
43
- return shallowCompare(this, nextProps, nextState);
44
- }
45
- };
46
-
47
- module.exports = ReactComponentWithPureRenderMixin;
@@ -1,68 +0,0 @@
1
- /**
2
- * Copyright 2015-present, Facebook, Inc.
3
- * All rights reserved.
4
- *
5
- * This source code is licensed under the BSD-style license found in the
6
- * LICENSE file in the root directory of this source tree. An additional grant
7
- * of patent rights can be found in the PATENTS file in the same directory.
8
- *
9
- */
10
-
11
- 'use strict';
12
-
13
- var _prodInvariant = require('./reactProdInvariant');
14
-
15
- var ReactChildren = require('./ReactChildren');
16
- var ReactElement = require('./ReactElement');
17
-
18
- var emptyFunction = require('fbjs/lib/emptyFunction');
19
- var invariant = require('fbjs/lib/invariant');
20
- var warning = require('fbjs/lib/warning');
21
-
22
- /**
23
- * We used to allow keyed objects to serve as a collection of ReactElements,
24
- * or nested sets. This allowed us a way to explicitly key a set or fragment of
25
- * components. This is now being replaced with an opaque data structure.
26
- * The upgrade path is to call React.addons.createFragment({ key: value }) to
27
- * create a keyed fragment. The resulting data structure is an array.
28
- */
29
-
30
- var numericPropertyRegex = /^\d+$/;
31
-
32
- var warnedAboutNumeric = false;
33
-
34
- var ReactFragment = {
35
- /**
36
- * Wrap a keyed object in an opaque proxy that warns you if you access any
37
- * of its properties.
38
- * See https://facebook.github.io/react/docs/create-fragment.html
39
- */
40
- create: function (object) {
41
- if (typeof object !== 'object' || !object || Array.isArray(object)) {
42
- process.env.NODE_ENV !== 'production' ? warning(false, 'React.addons.createFragment only accepts a single object. Got: %s', object) : void 0;
43
- return object;
44
- }
45
- if (ReactElement.isValidElement(object)) {
46
- process.env.NODE_ENV !== 'production' ? warning(false, 'React.addons.createFragment does not accept a ReactElement ' + 'without a wrapper object.') : void 0;
47
- return object;
48
- }
49
-
50
- !(object.nodeType !== 1) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'React.addons.createFragment(...): Encountered an invalid child; DOM elements are not valid children of React components.') : _prodInvariant('0') : void 0;
51
-
52
- var result = [];
53
-
54
- for (var key in object) {
55
- if (process.env.NODE_ENV !== 'production') {
56
- if (!warnedAboutNumeric && numericPropertyRegex.test(key)) {
57
- process.env.NODE_ENV !== 'production' ? warning(false, 'React.addons.createFragment(...): Child objects should have ' + 'non-numeric keys so ordering is preserved.') : void 0;
58
- warnedAboutNumeric = true;
59
- }
60
- }
61
- ReactChildren.mapIntoWithKeyPrefixInternal(object[key], result, key, emptyFunction.thatReturnsArgument);
62
- }
63
-
64
- return result;
65
- }
66
- };
67
-
68
- module.exports = ReactFragment;