react 16.0.0-alpha → 16.0.0-alpha.4
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.
- package/dist/react-with-addons.js +595 -536
- package/dist/react-with-addons.min.js +7 -2
- package/dist/react.js +547 -486
- package/dist/react.min.js +7 -2
- package/lib/React.js +17 -19
- package/lib/ReactAddonsDOMDependencies.js +1 -1
- package/lib/{ReactComponent.js → ReactBaseClasses.js} +27 -2
- package/lib/ReactClass.js +9 -9
- package/lib/ReactComponentTreeHook.js +8 -47
- package/lib/ReactDebugCurrentFrame.js +55 -0
- package/lib/ReactElementValidator.js +40 -22
- package/lib/ReactFiberComponentTreeHook.js +62 -0
- package/lib/ReactNoopUpdateQueue.js +1 -1
- package/lib/ReactPropTypes.js +33 -31
- package/lib/{ReactPropTypeLocations.js → ReactPropTypesSecret.js} +5 -1
- package/lib/ReactVersion.js +1 -1
- package/lib/checkPropTypes.js +64 -0
- package/lib/checkReactTypeSpec.js +5 -80
- package/lib/getComponentName.js +14 -16
- package/lib/traverseAllChildren.js +16 -27
- package/lib/update.js +2 -2
- package/package.json +2 -2
- package/lib/ReactPropTypeLocationNames.js +0 -24
- package/lib/ReactPureComponent.js +0 -41
- package/lib/ReactStateSetters.js +0 -103
- package/lib/sliceChildren.js +0 -33
package/dist/react.min.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* React v16.0.0-alpha
|
|
2
|
+
* React v16.0.0-alpha.4
|
|
3
3
|
*
|
|
4
4
|
* Copyright 2013-present, Facebook, Inc.
|
|
5
5
|
* All rights reserved.
|
|
@@ -9,4 +9,9 @@
|
|
|
9
9
|
* of patent rights can be found in the PATENTS file in the same directory.
|
|
10
10
|
*
|
|
11
11
|
*/
|
|
12
|
-
!function(t){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define([],t);else{var e;e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this,e.React=t()}}(function(){return function t(e,n,r){function o(a,u){if(!n[a]){if(!e[a]){var s="function"==typeof require&&require;if(!u&&s)return s(a,!0);if(i)return i(a,!0);var c=new Error("Cannot find module '"+a+"'");throw c.code="MODULE_NOT_FOUND",c}var l=n[a]={exports:{}};e[a][0].call(l.exports,function(t){var n=e[a][1][t];return o(n?n:t)},l,l.exports,t,e,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(t,e,n){"use strict";function r(t){var e=/[=:]/g,n={"=":"=0",":":"=2"},r=(""+t).replace(e,function(t){return n[t]});return"$"+r}function o(t){var e=/(=0|=2)/g,n={"=0":"=","=2":":"},r="."===t[0]&&"$"===t[1]?t.substring(2):t.substring(1);return(""+r).replace(e,function(t){return n[t]})}var i={escape:r,unescape:o};e.exports=i},{}],2:[function(t,e,n){"use strict";var r=t(20),o=(t(24),function(t){var e=this;if(e.instancePool.length){var n=e.instancePool.pop();return e.call(n,t),n}return new e(t)}),i=function(t,e){var n=this;if(n.instancePool.length){var r=n.instancePool.pop();return n.call(r,t,e),r}return new n(t,e)},a=function(t,e,n){var r=this;if(r.instancePool.length){var o=r.instancePool.pop();return r.call(o,t,e,n),o}return new r(t,e,n)},u=function(t,e,n,r){var o=this;if(o.instancePool.length){var i=o.instancePool.pop();return o.call(i,t,e,n,r),i}return new o(t,e,n,r)},s=function(t){var e=this;t instanceof e?void 0:r("25"),t.destructor(),e.instancePool.length<e.poolSize&&e.instancePool.push(t)},c=10,l=o,p=function(t,e){var n=t;return n.instancePool=[],n.getPooled=e||l,n.poolSize||(n.poolSize=c),n.release=s,n},f={addPoolingTo:p,oneArgumentPooler:o,twoArgumentPooler:i,threeArgumentPooler:a,fourArgumentPooler:u};e.exports=f},{20:20,24:24}],3:[function(t,e,n){"use strict";var r=t(26),o=t(4),i=t(6),a=t(14),u=t(5),s=t(8),c=t(9),l=t(13),p=t(16),f=t(19),d=(t(25),c.createElement),h=c.createFactory,y=c.cloneElement,v=r,m={Children:{map:o.map,forEach:o.forEach,count:o.count,toArray:o.toArray,only:f},Component:i,PureComponent:a,createElement:d,cloneElement:y,isValidElement:c.isValidElement,PropTypes:l,createClass:u.createClass,createFactory:h,createMixin:function(t){return t},DOM:s,version:p,__spread:v};e.exports=m},{13:13,14:14,16:16,19:19,25:25,26:26,4:4,5:5,6:6,8:8,9:9}],4:[function(t,e,n){"use strict";function r(t){return(""+t).replace(E,"$&/")}function o(t,e){this.func=t,this.context=e,this.count=0}function i(t,e,n){var r=t.func,o=t.context;r.call(o,e,t.count++)}function a(t,e,n){if(null==t)return t;var r=o.getPooled(e,n);m(t,i,r),o.release(r)}function u(t,e,n,r){this.result=t,this.keyPrefix=e,this.func=n,this.context=r,this.count=0}function s(t,e,n){var o=t.result,i=t.keyPrefix,a=t.func,u=t.context,s=a.call(u,e,t.count++);Array.isArray(s)?c(s,o,n,v.thatReturnsArgument):null!=s&&(y.isValidElement(s)&&(s=y.cloneAndReplaceKey(s,i+(!s.key||e&&e.key===s.key?"":r(s.key)+"/")+n)),o.push(s))}function c(t,e,n,o,i){var a="";null!=n&&(a=r(n)+"/");var c=u.getPooled(e,a,o,i);m(t,s,c),u.release(c)}function l(t,e,n){if(null==t)return t;var r=[];return c(t,r,null,e,n),r}function p(t,e,n){return null}function f(t,e){return m(t,p,null)}function d(t){var e=[];return c(t,e,null,v.thatReturnsArgument),e}var h=t(2),y=t(9),v=t(22),m=t(21),g=h.twoArgumentPooler,b=h.fourArgumentPooler,E=/\/+/g;o.prototype.destructor=function(){this.func=null,this.context=null,this.count=0},h.addPoolingTo(o,g),u.prototype.destructor=function(){this.result=null,this.keyPrefix=null,this.func=null,this.context=null,this.count=0},h.addPoolingTo(u,b);var _={forEach:a,map:l,mapIntoWithKeyPrefixInternal:c,count:f,toArray:d};e.exports=_},{2:2,21:21,22:22,9:9}],5:[function(t,e,n){"use strict";function r(t){return t}function o(t,e){var n=b.hasOwnProperty(e)?b[e]:null;_.hasOwnProperty(e)&&("OVERRIDE_BASE"!==n?f("73",e):void 0),t&&("DEFINE_MANY"!==n&&"DEFINE_MANY_MERGED"!==n?f("74",e):void 0)}function i(t,e){if(e){"function"==typeof e?f("75"):void 0,y.isValidElement(e)?f("76"):void 0;var n=t.prototype,r=n.__reactAutoBindPairs;e.hasOwnProperty(g)&&E.mixins(t,e.mixins);for(var i in e)if(e.hasOwnProperty(i)&&i!==g){var a=e[i],u=n.hasOwnProperty(i);if(o(u,i),E.hasOwnProperty(i))E[i](t,a);else{var l=b.hasOwnProperty(i),p="function"==typeof a,d=p&&!l&&!u&&e.autobind!==!1;if(d)r.push(i,a),n[i]=a;else if(u){var h=b[i];!l||"DEFINE_MANY_MERGED"!==h&&"DEFINE_MANY"!==h?f("77",h,i):void 0,"DEFINE_MANY_MERGED"===h?n[i]=s(n[i],a):"DEFINE_MANY"===h&&(n[i]=c(n[i],a))}else n[i]=a}}}}function a(t,e){if(e)for(var n in e){var r=e[n];if(e.hasOwnProperty(n)){var o=n in E;o?f("78",n):void 0;var i=n in t;i?f("79",n):void 0,t[n]=r}}}function u(t,e){t&&e&&"object"==typeof t&&"object"==typeof e?void 0:f("80");for(var n in e)e.hasOwnProperty(n)&&(void 0!==t[n]?f("81",n):void 0,t[n]=e[n]);return t}function s(t,e){return function(){var n=t.apply(this,arguments),r=e.apply(this,arguments);if(null==n)return r;if(null==r)return n;var o={};return u(o,n),u(o,r),o}}function c(t,e){return function(){t.apply(this,arguments),e.apply(this,arguments)}}function l(t,e){var n=e.bind(t);return n}function p(t){for(var e=t.__reactAutoBindPairs,n=0;n<e.length;n+=2){var r=e[n],o=e[n+1];t[r]=l(t,o)}}var f=t(20),d=t(26),h=t(6),y=t(9),v=(t(12),t(11)),m=t(23),g=(t(24),t(25),"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"},E={displayName:function(t,e){t.displayName=e},mixins:function(t,e){if(e)for(var n=0;n<e.length;n++)i(t,e[n])},childContextTypes:function(t,e){t.childContextTypes=d({},t.childContextTypes,e)},contextTypes:function(t,e){t.contextTypes=d({},t.contextTypes,e)},getDefaultProps:function(t,e){t.getDefaultProps?t.getDefaultProps=s(t.getDefaultProps,e):t.getDefaultProps=e},propTypes:function(t,e){t.propTypes=d({},t.propTypes,e)},statics:function(t,e){a(t,e)},autobind:function(){}},_={replaceState:function(t,e){this.updater.enqueueReplaceState(this,t,e,"replaceState")},isMounted:function(){return this.updater.isMounted(this)}},P=function(){};d(P.prototype,h.prototype,_);var x={createClass:function(t){var e=r(function(t,n,r){this.__reactAutoBindPairs.length&&p(this),this.props=t,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",e.displayName||"ReactCompositeComponent"):void 0,this.state=o});e.prototype=new P,e.prototype.constructor=e,e.prototype.__reactAutoBindPairs=[],i(e,t),e.getDefaultProps&&(e.defaultProps=e.getDefaultProps()),e.prototype.render?void 0:f("83");for(var n in b)e.prototype[n]||(e.prototype[n]=null);return e}};e.exports=x},{11:11,12:12,20:20,23:23,24:24,25:25,26:26,6:6,9:9}],6:[function(t,e,n){"use strict";function r(t,e,n){this.props=t,this.context=e,this.refs=a,this.updater=n||i}var o=t(20),i=t(11),a=(t(17),t(23));t(24),t(25);r.prototype.isReactComponent={},r.prototype.setState=function(t,e){"object"!=typeof t&&"function"!=typeof t&&null!=t?o("85"):void 0,this.updater.enqueueSetState(this,t,e,"setState")},r.prototype.forceUpdate=function(t){this.updater.enqueueForceUpdate(this,t,"forceUpdate")};e.exports=r},{11:11,17:17,20:20,23:23,24:24,25:25}],7:[function(t,e,n){"use strict";var r={current:null};e.exports=r},{}],8:[function(t,e,n){"use strict";var r=t(9),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")};e.exports=i},{9:9}],9:[function(t,e,n){"use strict";function r(t){return void 0!==t.ref}function o(t){return void 0!==t.key}var i=t(26),a=t(7),u=(t(25),t(17),Object.prototype.hasOwnProperty),s=t(10),c={key:!0,ref:!0,__self:!0,__source:!0},l=function(t,e,n,r,o,i,a){var u={$$typeof:s,type:t,key:e,ref:n,props:a,_owner:i};return u};l.createElement=function(t,e,n){var i,s={},p=null,f=null,d=null,h=null;if(null!=e){r(e)&&(f=e.ref),o(e)&&(p=""+e.key),d=void 0===e.__self?null:e.__self,h=void 0===e.__source?null:e.__source;for(i in e)u.call(e,i)&&!c.hasOwnProperty(i)&&(s[i]=e[i])}var y=arguments.length-2;if(1===y)s.children=n;else if(y>1){for(var v=Array(y),m=0;m<y;m++)v[m]=arguments[m+2];s.children=v}if(t&&t.defaultProps){var g=t.defaultProps;for(i in g)void 0===s[i]&&(s[i]=g[i])}return l(t,p,f,d,h,a.current,s)},l.createFactory=function(t){var e=l.createElement.bind(null,t);return e.type=t,e},l.cloneAndReplaceKey=function(t,e){var n=l(t.type,e,t.ref,t._self,t._source,t._owner,t.props);return n},l.cloneElement=function(t,e,n){var s,p=i({},t.props),f=t.key,d=t.ref,h=t._self,y=t._source,v=t._owner;if(null!=e){r(e)&&(d=e.ref,v=a.current),o(e)&&(f=""+e.key);var m;t.type&&t.type.defaultProps&&(m=t.type.defaultProps);for(s in e)u.call(e,s)&&!c.hasOwnProperty(s)&&(void 0===e[s]&&void 0!==m?p[s]=m[s]:p[s]=e[s])}var g=arguments.length-2;if(1===g)p.children=n;else if(g>1){for(var b=Array(g),E=0;E<g;E++)b[E]=arguments[E+2];p.children=b}return l(t.type,f,d,h,y,v,p)},l.isValidElement=function(t){return"object"==typeof t&&null!==t&&t.$$typeof===s},e.exports=l},{10:10,17:17,25:25,26:26,7:7}],10:[function(t,e,n){"use strict";var r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103;e.exports=r},{}],11:[function(t,e,n){"use strict";function r(t,e){}var o=(t(25),{isMounted:function(t){return!1},enqueueForceUpdate:function(t,e,n){r(t,"forceUpdate")},enqueueReplaceState:function(t,e,n,o){r(t,"replaceState")},enqueueSetState:function(t,e,n,o){r(t,"setState")}});e.exports=o},{25:25}],12:[function(t,e,n){"use strict";var r={};e.exports=r},{}],13:[function(t,e,n){"use strict";function r(t){this.message=t,this.stack=""}var o,i=(t(20),t(9),t(12),t(22),t(18),t(24)),a=(t(25),function(){i(!1,"React.PropTypes type checking code is stripped in production.")});a.isRequired=a;var u=function(){return a};o={array:a,bool:a,func:a,number:a,object:a,string:a,symbol:a,any:a,arrayOf:u,element:a,instanceOf:u,node:a,objectOf:u,oneOf:u,oneOfType:u,shape:u},r.prototype=Error.prototype,e.exports=o},{12:12,18:18,20:20,22:22,24:24,25:25,9:9}],14:[function(t,e,n){"use strict";function r(t,e,n){this.props=t,this.context=e,this.refs=s,this.updater=n||u}function o(){}var i=t(26),a=t(6),u=t(11),s=t(23);o.prototype=a.prototype,r.prototype=new o,r.prototype.constructor=r,i(r.prototype,a.prototype),r.prototype.isPureReactComponent=!0,e.exports=r},{11:11,23:23,26:26,6:6}],15:[function(t,e,n){"use strict";var r=t(26),o=t(3),i=r({__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:{ReactCurrentOwner:t(7)}},o);e.exports=i},{26:26,3:3,7:7}],16:[function(t,e,n){"use strict";e.exports="16.0.0-alpha"},{}],17:[function(t,e,n){"use strict";var r=!1;e.exports=r},{}],18:[function(t,e,n){"use strict";function r(t){var e=t&&(o&&t[o]||t[i]);if("function"==typeof e)return e}var o="function"==typeof Symbol&&Symbol.iterator,i="@@iterator";e.exports=r},{}],19:[function(t,e,n){"use strict";function r(t){return i.isValidElement(t)?void 0:o("143"),t}var o=t(20),i=t(9);t(24);e.exports=r},{20:20,24:24,9:9}],20:[function(t,e,n){"use strict";function r(t){for(var e=arguments.length-1,n="Minified React error #"+t+"; visit http://facebook.github.io/react/docs/error-decoder.html?invariant="+t,r=0;r<e;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}e.exports=r},{}],21:[function(t,e,n){"use strict";function r(t,e){return t&&"object"==typeof t&&null!=t.key?c.escape(t.key):e.toString(36)}function o(t,e,n,i){var f=typeof t;if("undefined"!==f&&"boolean"!==f||(t=null),null===t||"string"===f||"number"===f||"object"===f&&t.$$typeof===u)return n(i,t,""===e?l+r(t,0):e),1;var d,h,y=0,v=""===e?l:e+p;if(Array.isArray(t))for(var m=0;m<t.length;m++)d=t[m],h=v+r(d,m),y+=o(d,h,n,i);else{var g=s(t);if(g){var b,E=g.call(t);if(g!==t.entries)for(var _=0;!(b=E.next()).done;)d=b.value,h=v+r(d,_++),y+=o(d,h,n,i);else for(;!(b=E.next()).done;){var P=b.value;P&&(d=P[1],h=v+c.escape(P[0])+p+r(d,0),y+=o(d,h,n,i))}}else if("object"===f){var x="",N=String(t);a("31","[object Object]"===N?"object with keys {"+Object.keys(t).join(", ")+"}":N,x)}}return y}function i(t,e,n){return null==t?0:o(t,"",e,n)}var a=t(20),u=(t(7),t(10)),s=t(18),c=(t(24),t(1)),l=(t(25),"."),p=":";e.exports=i},{1:1,10:10,18:18,20:20,24:24,25:25,7:7}],22:[function(t,e,n){"use strict";function r(t){return function(){return t}}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(t){return t},e.exports=o},{}],23:[function(t,e,n){"use strict";var r={};e.exports=r},{}],24:[function(t,e,n){"use strict";function r(t,e,n,r,o,i,a,u){if(!t){var s;if(void 0===e)s=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var c=[n,r,o,i,a,u],l=0;s=new Error(e.replace(/%s/g,function(){return c[l++]})),s.name="Invariant Violation"}throw s.framesToPop=1,s}}e.exports=r},{}],25:[function(t,e,n){"use strict";var r=t(22),o=r;e.exports=o},{22:22}],26:[function(t,e,n){"use strict";function r(t){if(null===t||void 0===t)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(t)}function o(){try{if(!Object.assign)return!1;var t=new String("abc");if(t[5]="de","5"===Object.getOwnPropertyNames(t)[0])return!1;for(var e={},n=0;n<10;n++)e["_"+String.fromCharCode(n)]=n;var r=Object.getOwnPropertyNames(e).map(function(t){return e[t]});if("0123456789"!==r.join(""))return!1;var o={};return"abcdefghijklmnopqrst".split("").forEach(function(t){o[t]=t}),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},o)).join("")}catch(t){return!1}}var i=Object.prototype.hasOwnProperty,a=Object.prototype.propertyIsEnumerable;e.exports=o()?Object.assign:function(t,e){for(var n,o,u=r(t),s=1;s<arguments.length;s++){n=Object(arguments[s]);for(var c in n)i.call(n,c)&&(u[c]=n[c]);if(Object.getOwnPropertySymbols){o=Object.getOwnPropertySymbols(n);for(var l=0;l<o.length;l++)a.call(n,o[l])&&(u[o[l]]=n[o[l]])}}return u}},{}]},{},[15])(15)});
|
|
12
|
+
!function(t){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define([],t);else{var e;e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this,e.React=t()}}(function(){return function t(e,n,r){function o(a,u){if(!n[a]){if(!e[a]){var s="function"==typeof require&&require;if(!u&&s)return s(a,!0);if(i)return i(a,!0);var c=new Error("Cannot find module '"+a+"'");throw c.code="MODULE_NOT_FOUND",c}var l=n[a]={exports:{}};e[a][0].call(l.exports,function(t){var n=e[a][1][t];return o(n?n:t)},l,l.exports,t,e,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(t,e,n){"use strict";function r(t){var e=/[=:]/g,n={"=":"=0",":":"=2"},r=(""+t).replace(e,function(t){return n[t]});return"$"+r}function o(t){var e=/(=0|=2)/g,n={"=0":"=","=2":":"},r="."===t[0]&&"$"===t[1]?t.substring(2):t.substring(1);return(""+r).replace(e,function(t){return n[t]})}var i={escape:r,unescape:o};e.exports=i},{}],2:[function(t,e,n){"use strict";var r=t(20),o=(t(24),function(t){var e=this;if(e.instancePool.length){var n=e.instancePool.pop();return e.call(n,t),n}return new e(t)}),i=function(t,e){var n=this;if(n.instancePool.length){var r=n.instancePool.pop();return n.call(r,t,e),r}return new n(t,e)},a=function(t,e,n){var r=this;if(r.instancePool.length){var o=r.instancePool.pop();return r.call(o,t,e,n),o}return new r(t,e,n)},u=function(t,e,n,r){var o=this;if(o.instancePool.length){var i=o.instancePool.pop();return o.call(i,t,e,n,r),i}return new o(t,e,n,r)},s=function(t){var e=this;t instanceof e?void 0:r("25"),t.destructor(),e.instancePool.length<e.poolSize&&e.instancePool.push(t)},c=10,l=o,p=function(t,e){var n=t;return n.instancePool=[],n.getPooled=e||l,n.poolSize||(n.poolSize=c),n.release=s,n},f={addPoolingTo:p,oneArgumentPooler:o,twoArgumentPooler:i,threeArgumentPooler:a,fourArgumentPooler:u};e.exports=f},{20:20,24:24}],3:[function(t,e,n){"use strict";var r=t(4),o=t(5),i=t(6),a=t(8),u=t(9),s=t(12),c=t(15),l=t(19),p=(t(25),t(17)),f=u.createElement,d=u.createFactory,h=u.cloneElement,y=function(t){return t},v={Children:{map:o.map,forEach:o.forEach,count:o.count,toArray:o.toArray,only:l},Component:r.Component,PureComponent:r.PureComponent,createElement:f,cloneElement:h,isValidElement:u.isValidElement,checkPropTypes:p,PropTypes:s,createClass:i.createClass,createFactory:d,createMixin:y,DOM:a,version:c};e.exports=v},{12:12,15:15,17:17,19:19,25:25,4:4,5:5,6:6,8:8,9:9}],4:[function(t,e,n){"use strict";function r(t,e,n){this.props=t,this.context=e,this.refs=c,this.updater=n||s}function o(t,e,n){this.props=t,this.context=e,this.refs=c,this.updater=n||s}function i(){}var a=t(20),u=t(26),s=t(11),c=(t(16),t(23));t(24),t(25);r.prototype.isReactComponent={},r.prototype.setState=function(t,e){"object"!=typeof t&&"function"!=typeof t&&null!=t?a("85"):void 0,this.updater.enqueueSetState(this,t,e,"setState")},r.prototype.forceUpdate=function(t){this.updater.enqueueForceUpdate(this,t,"forceUpdate")};i.prototype=r.prototype,o.prototype=new i,o.prototype.constructor=o,u(o.prototype,r.prototype),o.prototype.isPureReactComponent=!0,e.exports={Component:r,PureComponent:o}},{11:11,16:16,20:20,23:23,24:24,25:25,26:26}],5:[function(t,e,n){"use strict";function r(t){return(""+t).replace(b,"$&/")}function o(t,e){this.func=t,this.context=e,this.count=0}function i(t,e,n){var r=t.func,o=t.context;r.call(o,e,t.count++)}function a(t,e,n){if(null==t)return t;var r=o.getPooled(e,n);m(t,i,r),o.release(r)}function u(t,e,n,r){this.result=t,this.keyPrefix=e,this.func=n,this.context=r,this.count=0}function s(t,e,n){var o=t.result,i=t.keyPrefix,a=t.func,u=t.context,s=a.call(u,e,t.count++);Array.isArray(s)?c(s,o,n,v.thatReturnsArgument):null!=s&&(y.isValidElement(s)&&(s=y.cloneAndReplaceKey(s,i+(!s.key||e&&e.key===s.key?"":r(s.key)+"/")+n)),o.push(s))}function c(t,e,n,o,i){var a="";null!=n&&(a=r(n)+"/");var c=u.getPooled(e,a,o,i);m(t,s,c),u.release(c)}function l(t,e,n){if(null==t)return t;var r=[];return c(t,r,null,e,n),r}function p(t,e,n){return null}function f(t,e){return m(t,p,null)}function d(t){var e=[];return c(t,e,null,v.thatReturnsArgument),e}var h=t(2),y=t(9),v=t(22),m=t(21),g=h.twoArgumentPooler,E=h.fourArgumentPooler,b=/\/+/g;o.prototype.destructor=function(){this.func=null,this.context=null,this.count=0},h.addPoolingTo(o,g),u.prototype.destructor=function(){this.result=null,this.keyPrefix=null,this.func=null,this.context=null,this.count=0},h.addPoolingTo(u,E);var _={forEach:a,map:l,mapIntoWithKeyPrefixInternal:c,count:f,toArray:d};e.exports=_},{2:2,21:21,22:22,9:9}],6:[function(t,e,n){"use strict";function r(t){return t}function o(t,e){var n=b.hasOwnProperty(e)?b[e]:null;P.hasOwnProperty(e)&&("OVERRIDE_BASE"!==n?d("73",e):void 0),t&&("DEFINE_MANY"!==n&&"DEFINE_MANY_MERGED"!==n?d("74",e):void 0)}function i(t,e){if(e){"function"==typeof e?d("75"):void 0,y.isValidElement(e)?d("76"):void 0;var n=t.prototype,r=n.__reactAutoBindPairs;e.hasOwnProperty(E)&&_.mixins(t,e.mixins);for(var i in e)if(e.hasOwnProperty(i)&&i!==E){var a=e[i],u=n.hasOwnProperty(i);if(o(u,i),_.hasOwnProperty(i))_[i](t,a);else{var l=b.hasOwnProperty(i),p="function"==typeof a,f=p&&!l&&!u&&e.autobind!==!1;if(f)r.push(i,a),n[i]=a;else if(u){var h=b[i];!l||"DEFINE_MANY_MERGED"!==h&&"DEFINE_MANY"!==h?d("77",h,i):void 0,"DEFINE_MANY_MERGED"===h?n[i]=s(n[i],a):"DEFINE_MANY"===h&&(n[i]=c(n[i],a))}else n[i]=a}}}}function a(t,e){if(e)for(var n in e){var r=e[n];if(e.hasOwnProperty(n)){var o=n in _;o?d("78",n):void 0;var i=n in t;i?d("79",n):void 0,t[n]=r}}}function u(t,e){t&&e&&"object"==typeof t&&"object"==typeof e?void 0:d("80");for(var n in e)e.hasOwnProperty(n)&&(void 0!==t[n]?d("81",n):void 0,t[n]=e[n]);return t}function s(t,e){return function(){var n=t.apply(this,arguments),r=e.apply(this,arguments);if(null==n)return r;if(null==r)return n;var o={};return u(o,n),u(o,r),o}}function c(t,e){return function(){t.apply(this,arguments),e.apply(this,arguments)}}function l(t,e){var n=e.bind(t);return n}function p(t){for(var e=t.__reactAutoBindPairs,n=0;n<e.length;n+=2){var r=e[n],o=e[n+1];t[r]=l(t,o)}}var f=t(26),d=t(20),h=t(4),y=t(9),v=t(11),m=t(23),g=(t(24),t(25),h.Component),E="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(t,e){t.displayName=e},mixins:function(t,e){if(e)for(var n=0;n<e.length;n++)i(t,e[n])},childContextTypes:function(t,e){t.childContextTypes=f({},t.childContextTypes,e)},contextTypes:function(t,e){t.contextTypes=f({},t.contextTypes,e)},getDefaultProps:function(t,e){t.getDefaultProps?t.getDefaultProps=s(t.getDefaultProps,e):t.getDefaultProps=e},propTypes:function(t,e){t.propTypes=f({},t.propTypes,e)},statics:function(t,e){a(t,e)},autobind:function(){}},P={replaceState:function(t,e){this.updater.enqueueReplaceState(this,t,e,"replaceState")},isMounted:function(){return this.updater.isMounted(this)}},x=function(){};f(x.prototype,g.prototype,P);var N={createClass:function(t){var e=r(function(t,n,r){this.__reactAutoBindPairs.length&&p(this),this.props=t,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)?d("82",e.displayName||"ReactCompositeComponent"):void 0,this.state=o});e.prototype=new x,e.prototype.constructor=e,e.prototype.__reactAutoBindPairs=[],i(e,t),e.getDefaultProps&&(e.defaultProps=e.getDefaultProps()),e.prototype.render?void 0:d("83");for(var n in b)e.prototype[n]||(e.prototype[n]=null);return e}};e.exports=N},{11:11,20:20,23:23,24:24,25:25,26:26,4:4,9:9}],7:[function(t,e,n){"use strict";var r={current:null};e.exports=r},{}],8:[function(t,e,n){"use strict";var r=t(9),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")};e.exports=i},{9:9}],9:[function(t,e,n){"use strict";function r(t){return void 0!==t.ref}function o(t){return void 0!==t.key}var i=t(26),a=t(7),u=(t(25),t(16),Object.prototype.hasOwnProperty),s=t(10),c={key:!0,ref:!0,__self:!0,__source:!0},l=function(t,e,n,r,o,i,a){var u={$$typeof:s,type:t,key:e,ref:n,props:a,_owner:i};return u};l.createElement=function(t,e,n){var i,s={},p=null,f=null,d=null,h=null;if(null!=e){r(e)&&(f=e.ref),o(e)&&(p=""+e.key),d=void 0===e.__self?null:e.__self,h=void 0===e.__source?null:e.__source;for(i in e)u.call(e,i)&&!c.hasOwnProperty(i)&&(s[i]=e[i])}var y=arguments.length-2;if(1===y)s.children=n;else if(y>1){for(var v=Array(y),m=0;m<y;m++)v[m]=arguments[m+2];s.children=v}if(t&&t.defaultProps){var g=t.defaultProps;for(i in g)void 0===s[i]&&(s[i]=g[i])}return l(t,p,f,d,h,a.current,s)},l.createFactory=function(t){var e=l.createElement.bind(null,t);return e.type=t,e},l.cloneAndReplaceKey=function(t,e){var n=l(t.type,e,t.ref,t._self,t._source,t._owner,t.props);return n},l.cloneElement=function(t,e,n){var s,p=i({},t.props),f=t.key,d=t.ref,h=t._self,y=t._source,v=t._owner;if(null!=e){r(e)&&(d=e.ref,v=a.current),o(e)&&(f=""+e.key);var m;t.type&&t.type.defaultProps&&(m=t.type.defaultProps);for(s in e)u.call(e,s)&&!c.hasOwnProperty(s)&&(void 0===e[s]&&void 0!==m?p[s]=m[s]:p[s]=e[s])}var g=arguments.length-2;if(1===g)p.children=n;else if(g>1){for(var E=Array(g),b=0;b<g;b++)E[b]=arguments[b+2];p.children=E}return l(t.type,f,d,h,y,v,p)},l.isValidElement=function(t){return"object"==typeof t&&null!==t&&t.$$typeof===s},e.exports=l},{10:10,16:16,25:25,26:26,7:7}],10:[function(t,e,n){"use strict";var r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103;e.exports=r},{}],11:[function(t,e,n){"use strict";function r(t,e){}var o=(t(25),{isMounted:function(t){return!1},enqueueForceUpdate:function(t,e,n){r(t,"forceUpdate")},enqueueReplaceState:function(t,e,n,o){r(t,"replaceState")},enqueueSetState:function(t,e,n,o){r(t,"setState")}});e.exports=o},{25:25}],12:[function(t,e,n){"use strict";function r(t){this.message=t,this.stack=""}var o,i=t(20),a=(t(9),t(13),t(22),t(18),t(24),t(25),function(){i("144")});a.isRequired=a;var u=function(){return a};o={array:a,bool:a,func:a,number:a,object:a,string:a,symbol:a,any:a,arrayOf:u,element:a,instanceOf:u,node:a,objectOf:u,oneOf:u,oneOfType:u,shape:u},r.prototype=Error.prototype,e.exports=o},{13:13,18:18,20:20,22:22,24:24,25:25,9:9}],13:[function(t,e,n){"use strict";var r="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";e.exports=r},{}],14:[function(t,e,n){"use strict";var r=t(26),o=t(3),i=r({__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:{ReactCurrentOwner:t(7)}},o);e.exports=i},{26:26,3:3,7:7}],15:[function(t,e,n){"use strict";e.exports="16.0.0-alpha.4"},{}],16:[function(t,e,n){"use strict";var r=!1;e.exports=r},{}],17:[function(t,e,n){"use strict";function r(t,e,n,r,o){}t(20),t(13),t(24),t(25);e.exports=r},{13:13,20:20,24:24,25:25}],18:[function(t,e,n){"use strict";function r(t){var e=t&&(o&&t[o]||t[i]);if("function"==typeof e)return e}var o="function"==typeof Symbol&&Symbol.iterator,i="@@iterator";e.exports=r},{}],19:[function(t,e,n){"use strict";function r(t){return i.isValidElement(t)?void 0:o("143"),t}var o=t(20),i=t(9);t(24);e.exports=r},{20:20,24:24,9:9}],20:[function(t,e,n){"use strict";function r(t){for(var e=arguments.length-1,n="Minified React error #"+t+"; visit http://facebook.github.io/react/docs/error-decoder.html?invariant="+t,r=0;r<e;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}e.exports=r},{}],21:[function(t,e,n){"use strict";function r(t,e){return t&&"object"==typeof t&&null!=t.key?c.escape(t.key):e.toString(36)}function o(t,e,n,i){var c=typeof t;if("undefined"!==c&&"boolean"!==c||(t=null),null===t||"string"===c||"number"===c||"object"===c&&t.$$typeof===u)return n(i,t,""===e?l+r(t,0):e),1;var f,d,h=0,y=""===e?l:e+p;if(Array.isArray(t))for(var v=0;v<t.length;v++)f=t[v],d=y+r(f,v),h+=o(f,d,n,i);else{var m=s(t);if(m)for(var g,E=m.call(t),b=0;!(g=E.next()).done;)f=g.value,d=y+r(f,b++),h+=o(f,d,n,i);else if("object"===c){var _="",P=""+t;a("31","[object Object]"===P?"object with keys {"+Object.keys(t).join(", ")+"}":P,_)}}return h}function i(t,e,n){return null==t?0:o(t,"",e,n)}var a=t(20),u=(t(7),t(10)),s=t(18),c=(t(24),t(1)),l=(t(25),"."),p=":";e.exports=i},{1:1,10:10,18:18,20:20,24:24,25:25,7:7}],22:[function(t,e,n){"use strict";function r(t){return function(){return t}}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(t){return t},e.exports=o},{}],23:[function(t,e,n){"use strict";var r={};e.exports=r},{}],24:[function(t,e,n){"use strict";function r(t,e,n,r,i,a,u,s){if(o(e),!t){var c;if(void 0===e)c=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var l=[n,r,i,a,u,s],p=0;c=new Error(e.replace(/%s/g,function(){return l[p++]})),c.name="Invariant Violation"}throw c.framesToPop=1,c}}var o=function(t){};e.exports=r},{}],25:[function(t,e,n){"use strict";var r=t(22),o=r;e.exports=o},{22:22}],26:[function(t,e,n){/*
|
|
13
|
+
object-assign
|
|
14
|
+
(c) Sindre Sorhus
|
|
15
|
+
@license MIT
|
|
16
|
+
*/
|
|
17
|
+
"use strict";function r(t){if(null===t||void 0===t)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(t)}function o(){try{if(!Object.assign)return!1;var t=new String("abc");if(t[5]="de","5"===Object.getOwnPropertyNames(t)[0])return!1;for(var e={},n=0;n<10;n++)e["_"+String.fromCharCode(n)]=n;var r=Object.getOwnPropertyNames(e).map(function(t){return e[t]});if("0123456789"!==r.join(""))return!1;var o={};return"abcdefghijklmnopqrst".split("").forEach(function(t){o[t]=t}),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},o)).join("")}catch(t){return!1}}var i=Object.getOwnPropertySymbols,a=Object.prototype.hasOwnProperty,u=Object.prototype.propertyIsEnumerable;e.exports=o()?Object.assign:function(t,e){for(var n,o,s=r(t),c=1;c<arguments.length;c++){n=Object(arguments[c]);for(var l in n)a.call(n,l)&&(s[l]=n[l]);if(i){o=i(n);for(var p=0;p<o.length;p++)u.call(n,o[p])&&(s[o[p]]=n[o[p]])}}return s}},{}]},{},[14])(14)});
|
package/lib/React.js
CHANGED
|
@@ -10,11 +10,8 @@
|
|
|
10
10
|
|
|
11
11
|
'use strict';
|
|
12
12
|
|
|
13
|
-
var
|
|
14
|
-
|
|
13
|
+
var ReactBaseClasses = require('./ReactBaseClasses');
|
|
15
14
|
var ReactChildren = require('./ReactChildren');
|
|
16
|
-
var ReactComponent = require('./ReactComponent');
|
|
17
|
-
var ReactPureComponent = require('./ReactPureComponent');
|
|
18
15
|
var ReactClass = require('./ReactClass');
|
|
19
16
|
var ReactDOMFactories = require('./ReactDOMFactories');
|
|
20
17
|
var ReactElement = require('./ReactElement');
|
|
@@ -23,6 +20,7 @@ var ReactVersion = require('./ReactVersion');
|
|
|
23
20
|
|
|
24
21
|
var onlyChild = require('./onlyChild');
|
|
25
22
|
var warning = require('fbjs/lib/warning');
|
|
23
|
+
var checkPropTypes = require('./checkPropTypes');
|
|
26
24
|
|
|
27
25
|
var createElement = ReactElement.createElement;
|
|
28
26
|
var createFactory = ReactElement.createFactory;
|
|
@@ -35,14 +33,17 @@ if (process.env.NODE_ENV !== 'production') {
|
|
|
35
33
|
cloneElement = ReactElementValidator.cloneElement;
|
|
36
34
|
}
|
|
37
35
|
|
|
38
|
-
var
|
|
36
|
+
var createMixin = function (mixin) {
|
|
37
|
+
return mixin;
|
|
38
|
+
};
|
|
39
39
|
|
|
40
40
|
if (process.env.NODE_ENV !== 'production') {
|
|
41
|
-
var
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
41
|
+
var warnedForCreateMixin = false;
|
|
42
|
+
|
|
43
|
+
createMixin = function (mixin) {
|
|
44
|
+
process.env.NODE_ENV !== 'production' ? warning(warnedForCreateMixin, 'React.createMixin is deprecated and should not be used. You ' + 'can use this mixin directly instead.') : void 0;
|
|
45
|
+
warnedForCreateMixin = true;
|
|
46
|
+
return mixin;
|
|
46
47
|
};
|
|
47
48
|
}
|
|
48
49
|
|
|
@@ -58,31 +59,28 @@ var React = {
|
|
|
58
59
|
only: onlyChild
|
|
59
60
|
},
|
|
60
61
|
|
|
61
|
-
Component:
|
|
62
|
-
PureComponent:
|
|
62
|
+
Component: ReactBaseClasses.Component,
|
|
63
|
+
PureComponent: ReactBaseClasses.PureComponent,
|
|
63
64
|
|
|
64
65
|
createElement: createElement,
|
|
65
66
|
cloneElement: cloneElement,
|
|
66
67
|
isValidElement: ReactElement.isValidElement,
|
|
67
68
|
|
|
69
|
+
checkPropTypes: checkPropTypes,
|
|
70
|
+
|
|
68
71
|
// Classic
|
|
69
72
|
|
|
70
73
|
PropTypes: ReactPropTypes,
|
|
71
74
|
createClass: ReactClass.createClass,
|
|
72
75
|
createFactory: createFactory,
|
|
73
|
-
createMixin:
|
|
74
|
-
// Currently a noop. Will be used to validate and trace mixins.
|
|
75
|
-
return mixin;
|
|
76
|
-
},
|
|
76
|
+
createMixin: createMixin,
|
|
77
77
|
|
|
78
78
|
// This looks DOM specific but these are actually isomorphic helpers
|
|
79
79
|
// since they are just generating DOM strings.
|
|
80
80
|
DOM: ReactDOMFactories,
|
|
81
81
|
|
|
82
|
-
version: ReactVersion
|
|
82
|
+
version: ReactVersion
|
|
83
83
|
|
|
84
|
-
// Deprecated hook for JSX spread, don't use this for anything.
|
|
85
|
-
__spread: __spread
|
|
86
84
|
};
|
|
87
85
|
|
|
88
86
|
module.exports = React;
|
|
@@ -10,7 +10,8 @@
|
|
|
10
10
|
|
|
11
11
|
'use strict';
|
|
12
12
|
|
|
13
|
-
var _prodInvariant = require('./reactProdInvariant')
|
|
13
|
+
var _prodInvariant = require('./reactProdInvariant'),
|
|
14
|
+
_assign = require('object-assign');
|
|
14
15
|
|
|
15
16
|
var ReactNoopUpdateQueue = require('./ReactNoopUpdateQueue');
|
|
16
17
|
|
|
@@ -108,4 +109,28 @@ if (process.env.NODE_ENV !== 'production') {
|
|
|
108
109
|
}
|
|
109
110
|
}
|
|
110
111
|
|
|
111
|
-
|
|
112
|
+
/**
|
|
113
|
+
* Base class helpers for the updating state of a component.
|
|
114
|
+
*/
|
|
115
|
+
function ReactPureComponent(props, context, updater) {
|
|
116
|
+
// Duplicated from ReactComponent.
|
|
117
|
+
this.props = props;
|
|
118
|
+
this.context = context;
|
|
119
|
+
this.refs = emptyObject;
|
|
120
|
+
// We initialize the default updater but the real one gets injected by the
|
|
121
|
+
// renderer.
|
|
122
|
+
this.updater = updater || ReactNoopUpdateQueue;
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
function ComponentDummy() {}
|
|
126
|
+
ComponentDummy.prototype = ReactComponent.prototype;
|
|
127
|
+
ReactPureComponent.prototype = new ComponentDummy();
|
|
128
|
+
ReactPureComponent.prototype.constructor = ReactPureComponent;
|
|
129
|
+
// Avoid an extra prototype jump for these methods.
|
|
130
|
+
_assign(ReactPureComponent.prototype, ReactComponent.prototype);
|
|
131
|
+
ReactPureComponent.prototype.isPureReactComponent = true;
|
|
132
|
+
|
|
133
|
+
module.exports = {
|
|
134
|
+
Component: ReactComponent,
|
|
135
|
+
PureComponent: ReactPureComponent
|
|
136
|
+
};
|
package/lib/ReactClass.js
CHANGED
|
@@ -10,18 +10,19 @@
|
|
|
10
10
|
|
|
11
11
|
'use strict';
|
|
12
12
|
|
|
13
|
-
var
|
|
14
|
-
|
|
13
|
+
var _assign = require('object-assign'),
|
|
14
|
+
_prodInvariant = require('./reactProdInvariant');
|
|
15
15
|
|
|
16
|
-
var
|
|
16
|
+
var ReactBaseClasses = require('./ReactBaseClasses');
|
|
17
17
|
var ReactElement = require('./ReactElement');
|
|
18
|
-
var ReactPropTypeLocationNames = require('./ReactPropTypeLocationNames');
|
|
19
18
|
var ReactNoopUpdateQueue = require('./ReactNoopUpdateQueue');
|
|
20
19
|
|
|
21
20
|
var emptyObject = require('fbjs/lib/emptyObject');
|
|
22
21
|
var invariant = require('fbjs/lib/invariant');
|
|
23
22
|
var warning = require('fbjs/lib/warning');
|
|
24
23
|
|
|
24
|
+
var ReactComponent = ReactBaseClasses.Component;
|
|
25
|
+
|
|
25
26
|
var MIXINS_KEY = 'mixins';
|
|
26
27
|
|
|
27
28
|
// Helper function to allow the creation of anonymous functions which do not
|
|
@@ -149,7 +150,6 @@ var ReactClassInterface = {
|
|
|
149
150
|
* }
|
|
150
151
|
*
|
|
151
152
|
* @return {ReactComponent}
|
|
152
|
-
* @nosideeffects
|
|
153
153
|
* @required
|
|
154
154
|
*/
|
|
155
155
|
render: 'DEFINE_ONCE',
|
|
@@ -302,7 +302,7 @@ var RESERVED_SPEC_KEYS = {
|
|
|
302
302
|
},
|
|
303
303
|
childContextTypes: function (Constructor, childContextTypes) {
|
|
304
304
|
if (process.env.NODE_ENV !== 'production') {
|
|
305
|
-
validateTypeDef(Constructor, childContextTypes, '
|
|
305
|
+
validateTypeDef(Constructor, childContextTypes, 'child context');
|
|
306
306
|
}
|
|
307
307
|
Constructor.childContextTypes = _assign({}, Constructor.childContextTypes, childContextTypes);
|
|
308
308
|
},
|
|
@@ -339,7 +339,7 @@ function validateTypeDef(Constructor, typeDef, location) {
|
|
|
339
339
|
if (typeDef.hasOwnProperty(propName)) {
|
|
340
340
|
// use a warning instead of an invariant so components
|
|
341
341
|
// don't show up in prod but only in __DEV__
|
|
342
|
-
process.env.NODE_ENV !== 'production' ? warning(typeof typeDef[propName] === 'function', '%s: %s type `%s` is invalid; it must be a function, usually from ' + 'React.PropTypes.', Constructor.displayName || 'ReactClass',
|
|
342
|
+
process.env.NODE_ENV !== 'production' ? warning(typeof typeDef[propName] === 'function', '%s: %s type `%s` is invalid; it must be a function, usually from ' + 'React.PropTypes.', Constructor.displayName || 'ReactClass', location, propName) : void 0;
|
|
343
343
|
}
|
|
344
344
|
}
|
|
345
345
|
}
|
|
@@ -545,9 +545,9 @@ function bindAutoBindMethod(component, method) {
|
|
|
545
545
|
// ignore the value of "this" that the user is trying to use, so
|
|
546
546
|
// let's warn.
|
|
547
547
|
if (newThis !== component && newThis !== null) {
|
|
548
|
-
process.env.NODE_ENV !== 'production' ? warning(false, 'bind(): React component methods may only be bound to the ' + 'component instance
|
|
548
|
+
process.env.NODE_ENV !== 'production' ? warning(false, 'bind(): React component methods may only be bound to the ' + 'component instance.\n\nSee %s', componentName) : void 0;
|
|
549
549
|
} else if (!args.length) {
|
|
550
|
-
process.env.NODE_ENV !== 'production' ? warning(false, 'bind(): You are binding a component method to the component. ' + 'React does this for you automatically in a high-performance ' + 'way, so you can safely remove this call
|
|
550
|
+
process.env.NODE_ENV !== 'production' ? warning(false, 'bind(): You are binding a component method to the component. ' + 'React does this for you automatically in a high-performance ' + 'way, so you can safely remove this call.\n\nSee %s', componentName) : void 0;
|
|
551
551
|
return boundMethod;
|
|
552
552
|
}
|
|
553
553
|
var reboundMethod = _bind.apply(boundMethod, arguments);
|
|
@@ -14,16 +14,14 @@
|
|
|
14
14
|
var _prodInvariant = require('./reactProdInvariant');
|
|
15
15
|
|
|
16
16
|
var ReactCurrentOwner = require('./ReactCurrentOwner');
|
|
17
|
-
var ReactTypeOfWork = require('./ReactTypeOfWork');
|
|
18
|
-
var IndeterminateComponent = ReactTypeOfWork.IndeterminateComponent,
|
|
19
|
-
FunctionalComponent = ReactTypeOfWork.FunctionalComponent,
|
|
20
|
-
ClassComponent = ReactTypeOfWork.ClassComponent,
|
|
21
|
-
HostComponent = ReactTypeOfWork.HostComponent;
|
|
22
17
|
|
|
18
|
+
var _require = require('./ReactFiberComponentTreeHook'),
|
|
19
|
+
getStackAddendumByWorkInProgressFiber = _require.getStackAddendumByWorkInProgressFiber,
|
|
20
|
+
describeComponentFrame = _require.describeComponentFrame;
|
|
23
21
|
|
|
24
|
-
var getComponentName = require('./getComponentName');
|
|
25
22
|
var invariant = require('fbjs/lib/invariant');
|
|
26
23
|
var warning = require('fbjs/lib/warning');
|
|
24
|
+
var getComponentName = require('./getComponentName');
|
|
27
25
|
|
|
28
26
|
function isNative(fn) {
|
|
29
27
|
// Based on isNative() from Lodash
|
|
@@ -144,10 +142,6 @@ function purgeDeep(id) {
|
|
|
144
142
|
}
|
|
145
143
|
}
|
|
146
144
|
|
|
147
|
-
function describeComponentFrame(name, source, ownerName) {
|
|
148
|
-
return '\n in ' + (name || 'Unknown') + (source ? ' (at ' + source.fileName.replace(/^.*[\\\/]/, '') + ':' + source.lineNumber + ')' : ownerName ? ' (created by ' + ownerName + ')' : '');
|
|
149
|
-
}
|
|
150
|
-
|
|
151
145
|
function getDisplayName(element) {
|
|
152
146
|
if (element == null) {
|
|
153
147
|
return '#empty';
|
|
@@ -164,31 +158,13 @@ function describeID(id) {
|
|
|
164
158
|
var name = ReactComponentTreeHook.getDisplayName(id);
|
|
165
159
|
var element = ReactComponentTreeHook.getElement(id);
|
|
166
160
|
var ownerID = ReactComponentTreeHook.getOwnerID(id);
|
|
167
|
-
var ownerName;
|
|
161
|
+
var ownerName = void 0;
|
|
162
|
+
|
|
168
163
|
if (ownerID) {
|
|
169
164
|
ownerName = ReactComponentTreeHook.getDisplayName(ownerID);
|
|
170
165
|
}
|
|
171
166
|
process.env.NODE_ENV !== 'production' ? warning(element, 'ReactComponentTreeHook: Missing React element for debugID %s when ' + 'building stack', id) : void 0;
|
|
172
|
-
return describeComponentFrame(name, element && element._source, ownerName);
|
|
173
|
-
}
|
|
174
|
-
|
|
175
|
-
function describeFiber(fiber) {
|
|
176
|
-
switch (fiber.tag) {
|
|
177
|
-
case IndeterminateComponent:
|
|
178
|
-
case FunctionalComponent:
|
|
179
|
-
case ClassComponent:
|
|
180
|
-
case HostComponent:
|
|
181
|
-
var owner = fiber._debugOwner;
|
|
182
|
-
var source = fiber._debugSource;
|
|
183
|
-
var name = getComponentName(fiber);
|
|
184
|
-
var ownerName = null;
|
|
185
|
-
if (owner) {
|
|
186
|
-
ownerName = getComponentName(owner);
|
|
187
|
-
}
|
|
188
|
-
return describeComponentFrame(name, source, ownerName);
|
|
189
|
-
default:
|
|
190
|
-
return '';
|
|
191
|
-
}
|
|
167
|
+
return describeComponentFrame(name || '', element && element._source, ownerName || '');
|
|
192
168
|
}
|
|
193
169
|
|
|
194
170
|
var ReactComponentTreeHook = {
|
|
@@ -296,7 +272,7 @@ var ReactComponentTreeHook = {
|
|
|
296
272
|
var workInProgress = currentOwner;
|
|
297
273
|
// Safe because if current owner exists, we are reconciling,
|
|
298
274
|
// and it is guaranteed to be the work-in-progress version.
|
|
299
|
-
info +=
|
|
275
|
+
info += getStackAddendumByWorkInProgressFiber(workInProgress);
|
|
300
276
|
} else if (typeof currentOwner._debugID === 'number') {
|
|
301
277
|
info += ReactComponentTreeHook.getStackAddendumByID(currentOwner._debugID);
|
|
302
278
|
}
|
|
@@ -311,21 +287,6 @@ var ReactComponentTreeHook = {
|
|
|
311
287
|
}
|
|
312
288
|
return info;
|
|
313
289
|
},
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
// This function can only be called with a work-in-progress fiber and
|
|
317
|
-
// only during begin or complete phase. Do not call it under any other
|
|
318
|
-
// circumstances.
|
|
319
|
-
getStackAddendumByWorkInProgressFiber: function (workInProgress) {
|
|
320
|
-
var info = '';
|
|
321
|
-
var node = workInProgress;
|
|
322
|
-
do {
|
|
323
|
-
info += describeFiber(node);
|
|
324
|
-
// Otherwise this return pointer might point to the wrong tree:
|
|
325
|
-
node = node['return'];
|
|
326
|
-
} while (node);
|
|
327
|
-
return info;
|
|
328
|
-
},
|
|
329
290
|
getChildIDs: function (id) {
|
|
330
291
|
var item = getItem(id);
|
|
331
292
|
return item ? item.childIDs : [];
|
|
@@ -0,0 +1,55 @@
|
|
|
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
|
+
|
|
12
|
+
'use strict';
|
|
13
|
+
|
|
14
|
+
var ReactDebugCurrentFrame = {};
|
|
15
|
+
|
|
16
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
17
|
+
var _require = require('./ReactComponentTreeHook'),
|
|
18
|
+
getStackAddendumByID = _require.getStackAddendumByID,
|
|
19
|
+
getCurrentStackAddendum = _require.getCurrentStackAddendum;
|
|
20
|
+
|
|
21
|
+
var _require2 = require('./ReactFiberComponentTreeHook'),
|
|
22
|
+
getStackAddendumByWorkInProgressFiber = _require2.getStackAddendumByWorkInProgressFiber;
|
|
23
|
+
|
|
24
|
+
// Component that is being worked on
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
ReactDebugCurrentFrame.current = null;
|
|
28
|
+
|
|
29
|
+
// Element that is being cloned or created
|
|
30
|
+
ReactDebugCurrentFrame.element = null;
|
|
31
|
+
|
|
32
|
+
ReactDebugCurrentFrame.getStackAddendum = function () {
|
|
33
|
+
var stack = null;
|
|
34
|
+
var current = ReactDebugCurrentFrame.current;
|
|
35
|
+
var element = ReactDebugCurrentFrame.element;
|
|
36
|
+
if (current !== null) {
|
|
37
|
+
if (typeof current === 'number') {
|
|
38
|
+
// DebugID from Stack.
|
|
39
|
+
var debugID = current;
|
|
40
|
+
stack = getStackAddendumByID(debugID);
|
|
41
|
+
} else if (typeof current.tag === 'number') {
|
|
42
|
+
// This is a Fiber.
|
|
43
|
+
// The stack will only be correct if this is a work in progress
|
|
44
|
+
// version and we're calling it during reconciliation.
|
|
45
|
+
var workInProgress = current;
|
|
46
|
+
stack = getStackAddendumByWorkInProgressFiber(workInProgress);
|
|
47
|
+
}
|
|
48
|
+
} else if (element !== null) {
|
|
49
|
+
stack = getCurrentStackAddendum(element);
|
|
50
|
+
}
|
|
51
|
+
return stack;
|
|
52
|
+
};
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
module.exports = ReactDebugCurrentFrame;
|
|
@@ -18,7 +18,6 @@
|
|
|
18
18
|
'use strict';
|
|
19
19
|
|
|
20
20
|
var ReactCurrentOwner = require('./ReactCurrentOwner');
|
|
21
|
-
var ReactComponentTreeHook = require('./ReactComponentTreeHook');
|
|
22
21
|
var ReactElement = require('./ReactElement');
|
|
23
22
|
|
|
24
23
|
var checkReactTypeSpec = require('./checkReactTypeSpec');
|
|
@@ -26,13 +25,20 @@ var checkReactTypeSpec = require('./checkReactTypeSpec');
|
|
|
26
25
|
var canDefineProperty = require('./canDefineProperty');
|
|
27
26
|
var getComponentName = require('./getComponentName');
|
|
28
27
|
var getIteratorFn = require('./getIteratorFn');
|
|
29
|
-
|
|
28
|
+
|
|
29
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
30
|
+
var warning = require('fbjs/lib/warning');
|
|
31
|
+
var ReactDebugCurrentFrame = require('./ReactDebugCurrentFrame');
|
|
32
|
+
|
|
33
|
+
var _require = require('./ReactComponentTreeHook'),
|
|
34
|
+
getCurrentStackAddendum = _require.getCurrentStackAddendum;
|
|
35
|
+
}
|
|
30
36
|
|
|
31
37
|
function getDeclarationErrorAddendum() {
|
|
32
38
|
if (ReactCurrentOwner.current) {
|
|
33
39
|
var name = getComponentName(ReactCurrentOwner.current);
|
|
34
40
|
if (name) {
|
|
35
|
-
return '
|
|
41
|
+
return '\n\nCheck the render method of `' + name + '`.';
|
|
36
42
|
}
|
|
37
43
|
}
|
|
38
44
|
return '';
|
|
@@ -43,7 +49,7 @@ function getSourceInfoErrorAddendum(elementProps) {
|
|
|
43
49
|
var source = elementProps.__source;
|
|
44
50
|
var fileName = source.fileName.replace(/^.*[\\\/]/, '');
|
|
45
51
|
var lineNumber = source.lineNumber;
|
|
46
|
-
return '
|
|
52
|
+
return '\n\nCheck your code at ' + fileName + ':' + lineNumber + '.';
|
|
47
53
|
}
|
|
48
54
|
return '';
|
|
49
55
|
}
|
|
@@ -61,7 +67,7 @@ function getCurrentComponentErrorInfo(parentType) {
|
|
|
61
67
|
if (!info) {
|
|
62
68
|
var parentName = typeof parentType === 'string' ? parentType : parentType.displayName || parentType.name;
|
|
63
69
|
if (parentName) {
|
|
64
|
-
info = '
|
|
70
|
+
info = '\n\nCheck the top-level render call using <' + parentName + '>.';
|
|
65
71
|
}
|
|
66
72
|
}
|
|
67
73
|
return info;
|
|
@@ -101,7 +107,7 @@ function validateExplicitKey(element, parentType) {
|
|
|
101
107
|
childOwner = ' It was passed a child from ' + getComponentName(element._owner) + '.';
|
|
102
108
|
}
|
|
103
109
|
|
|
104
|
-
process.env.NODE_ENV !== 'production' ? warning(false, 'Each child in an array or iterator should have a unique "key" prop.' + '%s%s See https://fb.me/react-warning-keys for more information.%s', currentComponentErrorInfo, childOwner,
|
|
110
|
+
process.env.NODE_ENV !== 'production' ? warning(false, 'Each child in an array or iterator should have a unique "key" prop.' + '%s%s See https://fb.me/react-warning-keys for more information.%s', currentComponentErrorInfo, childOwner, getCurrentStackAddendum(element)) : void 0;
|
|
105
111
|
}
|
|
106
112
|
|
|
107
113
|
/**
|
|
@@ -159,7 +165,7 @@ function validatePropTypes(element) {
|
|
|
159
165
|
}
|
|
160
166
|
var name = componentClass.displayName || componentClass.name;
|
|
161
167
|
if (componentClass.propTypes) {
|
|
162
|
-
checkReactTypeSpec(componentClass.propTypes, element.props, 'prop', name
|
|
168
|
+
checkReactTypeSpec(componentClass.propTypes, element.props, 'prop', name);
|
|
163
169
|
}
|
|
164
170
|
if (typeof componentClass.getDefaultProps === 'function') {
|
|
165
171
|
process.env.NODE_ENV !== 'production' ? warning(componentClass.getDefaultProps.isReactClassApproved, 'getDefaultProps is only used on classic React.createClass ' + 'definitions. Use a static property named `defaultProps` instead.') : void 0;
|
|
@@ -169,27 +175,25 @@ function validatePropTypes(element) {
|
|
|
169
175
|
var ReactElementValidator = {
|
|
170
176
|
|
|
171
177
|
createElement: function (type, props, children) {
|
|
172
|
-
var validType = typeof type === 'string' || typeof type === 'function'
|
|
178
|
+
var validType = typeof type === 'string' || typeof type === 'function';
|
|
173
179
|
// We warn in this case but don't throw. We expect the element creation to
|
|
174
180
|
// succeed and there will likely be errors in render.
|
|
175
181
|
if (!validType) {
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
}
|
|
182
|
+
var info = '';
|
|
183
|
+
if (type === undefined || typeof type === 'object' && type !== null && Object.keys(type).length === 0) {
|
|
184
|
+
info += ' You likely forgot to export your component from the file ' + 'it\'s defined in.';
|
|
185
|
+
}
|
|
181
186
|
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
187
|
+
var sourceInfo = getSourceInfoErrorAddendum(props);
|
|
188
|
+
if (sourceInfo) {
|
|
189
|
+
info += sourceInfo;
|
|
190
|
+
} else {
|
|
191
|
+
info += getDeclarationErrorAddendum();
|
|
192
|
+
}
|
|
188
193
|
|
|
189
|
-
|
|
194
|
+
info += getCurrentStackAddendum();
|
|
190
195
|
|
|
191
|
-
|
|
192
|
-
}
|
|
196
|
+
process.env.NODE_ENV !== 'production' ? warning(false, 'React.createElement: type is invalid -- expected a string (for ' + 'built-in components) or a class/function (for composite ' + 'components) but got: %s.%s', type == null ? type : typeof type, info) : void 0;
|
|
193
197
|
}
|
|
194
198
|
|
|
195
199
|
var element = ReactElement.createElement.apply(this, arguments);
|
|
@@ -200,6 +204,10 @@ var ReactElementValidator = {
|
|
|
200
204
|
return element;
|
|
201
205
|
}
|
|
202
206
|
|
|
207
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
208
|
+
ReactDebugCurrentFrame.element = element;
|
|
209
|
+
}
|
|
210
|
+
|
|
203
211
|
// Skip key warning if the type isn't valid since our key validation logic
|
|
204
212
|
// doesn't expect a non-string/function type and can throw confusing errors.
|
|
205
213
|
// We don't want exception behavior to differ between dev and prod.
|
|
@@ -213,6 +221,10 @@ var ReactElementValidator = {
|
|
|
213
221
|
|
|
214
222
|
validatePropTypes(element);
|
|
215
223
|
|
|
224
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
225
|
+
ReactDebugCurrentFrame.element = null;
|
|
226
|
+
}
|
|
227
|
+
|
|
216
228
|
return element;
|
|
217
229
|
},
|
|
218
230
|
|
|
@@ -241,10 +253,16 @@ var ReactElementValidator = {
|
|
|
241
253
|
|
|
242
254
|
cloneElement: function (element, props, children) {
|
|
243
255
|
var newElement = ReactElement.cloneElement.apply(this, arguments);
|
|
256
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
257
|
+
ReactDebugCurrentFrame.element = newElement;
|
|
258
|
+
}
|
|
244
259
|
for (var i = 2; i < arguments.length; i++) {
|
|
245
260
|
validateChildKeys(arguments[i], newElement.type);
|
|
246
261
|
}
|
|
247
262
|
validatePropTypes(newElement);
|
|
263
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
264
|
+
ReactDebugCurrentFrame.element = null;
|
|
265
|
+
}
|
|
248
266
|
return newElement;
|
|
249
267
|
}
|
|
250
268
|
|