react-test-renderer 16.4.0-alpha.7926752 → 16.5.0

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.
@@ -1,4 +1,4 @@
1
- /** @license React v16.4.0-alpha.7926752
1
+ /** @license React v16.5.0
2
2
  * react-test-renderer-shallow.production.min.js
3
3
  *
4
4
  * Copyright (c) 2013-present, Facebook, Inc.
@@ -7,18 +7,20 @@
7
7
  * LICENSE file in the root directory of this source tree.
8
8
  */
9
9
 
10
- 'use strict';var e=require("object-assign"),k=require("react"),l=require("fbjs/lib/emptyObject"),m=require("fbjs/lib/shallowEqual"),n=require("prop-types/checkPropTypes");
11
- function p(b){for(var a=arguments.length-1,c="Minified React error #"+b+"; visit http://facebook.github.io/react/docs/error-decoder.html?invariant\x3d"+b,d=0;d<a;d++)c+="\x26args[]\x3d"+encodeURIComponent(arguments[d+1]);a=Error(c+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings.");a.name="Invariant Violation";a.framesToPop=1;throw a;}
12
- var q="function"===typeof Symbol&&Symbol["for"],r=q?Symbol["for"]("react.call"):60104,t=q?Symbol["for"]("react.return"):60105,v=q?Symbol["for"]("react.portal"):60106,w=q?Symbol["for"]("react.fragment"):60107;function x(b){b=b.type;if("function"===typeof b)return b.displayName||b.name;if("string"===typeof b)return b;switch(b){case w:return"ReactFragment";case v:return"ReactPortal";case r:return"ReactCall";case t:return"ReactReturn"}return null}
13
- function y(b,a){if(!(b instanceof a))throw new TypeError("Cannot call a class as a function");}
14
- var C=function(){function b(){y(this,b);this._rendered=this._newState=this._instance=this._element=this._context=null;this._forcedUpdate=this._rendering=!1;this._updater=new z(this)}b.prototype.getMountedInstance=function(){return this._instance};b.prototype.getRenderOutput=function(){return this._rendered};b.prototype.render=function(a){var c=1<arguments.length&&void 0!==arguments[1]?arguments[1]:l;k.isValidElement(a)?void 0:p("12","function"===typeof a?" Instead of passing a component class, make sure to instantiate it by passing it to React.createElement.":
15
- "");"string"===typeof a.type?p("13",a.type):void 0;"function"!==typeof a.type?p("249",Array.isArray(a.type)?"array":null===a.type?"null":typeof a.type):void 0;if(!this._rendering){this._rendering=!0;this._element=a;var b=a.type.contextTypes;if(b){var f={},g;for(g in b)f[g]=c[g];c=f}else c=l;this._context=c;this._instance?this._updateClassComponent(a,this._context):(c=a.type,c.prototype&&c.prototype.isReactComponent?(this._instance=new a.type(a.props,this._context,this._updater),this._updateStateFromStaticLifecycle(a.props),
16
- a.type.hasOwnProperty("contextTypes")&&(A=a,c=a.type,b=(b=this._instance)&&b.constructor,n(a.type.contextTypes,this._context,"context",c.displayName||b&&b.displayName||c.name||b&&b.name||null,B),A=null),this._mountClassComponent(a,this._context)):this._rendered=a.type(a.props,this._context));this._rendering=!1;this._updater._invokeCallbacks();return this.getRenderOutput()}};b.prototype.unmount=function(){this._instance&&"function"===typeof this._instance.componentWillUnmount&&this._instance.componentWillUnmount();
17
- this._instance=this._rendered=this._newState=this._element=this._context=null};b.prototype._mountClassComponent=function(a,c){this._instance.context=c;this._instance.props=a.props;this._instance.state=this._instance.state||null;this._instance.updater=this._updater;if("function"===typeof this._instance.UNSAFE_componentWillMount||"function"===typeof this._instance.componentWillMount)c=this._newState,"function"===typeof this._instance.componentWillMount&&"function"!==typeof a.type.getDerivedStateFromProps&&
18
- this._instance.componentWillMount(),"function"===typeof this._instance.UNSAFE_componentWillMount&&"function"!==typeof a.type.getDerivedStateFromProps&&this._instance.UNSAFE_componentWillMount(),c!==this._newState&&(this._instance.state=this._newState||l);this._rendered=this._instance.render()};b.prototype._updateClassComponent=function(a,c){var b=a.props,f=a.type,g=this._instance.state||l,u=this._instance.props;u!==b&&("function"===typeof this._instance.componentWillReceiveProps&&"function"!==typeof a.type.getDerivedStateFromProps&&
19
- this._instance.componentWillReceiveProps(b,c),"function"===typeof this._instance.UNSAFE_componentWillReceiveProps&&"function"!==typeof a.type.getDerivedStateFromProps&&this._instance.UNSAFE_componentWillReceiveProps(b,c),this._updateStateFromStaticLifecycle(b));a=this._newState||g;var h=!0;this._forcedUpdate?(h=!0,this._forcedUpdate=!1):"function"===typeof this._instance.shouldComponentUpdate?h=!!this._instance.shouldComponentUpdate(b,a,c):f.prototype&&f.prototype.isPureReactComponent&&(h=!m(u,b)||
20
- !m(g,a));h&&("function"===typeof this._instance.componentWillUpdate&&"function"!==typeof f.getDerivedStateFromProps&&this._instance.componentWillUpdate(b,a,c),"function"===typeof this._instance.UNSAFE_componentWillUpdate&&"function"!==typeof f.getDerivedStateFromProps&&this._instance.UNSAFE_componentWillUpdate(b,a,c));this._instance.context=c;this._instance.props=b;this._instance.state=a;h&&(this._rendered=this._instance.render())};b.prototype._updateStateFromStaticLifecycle=function(a){var b=this._element.type;
21
- "function"===typeof b.getDerivedStateFromProps&&(a=b.getDerivedStateFromProps.call(null,a,this._instance.state),null!=a&&(a=e({},this._newState||this._instance.state,a),this._instance.state=this._newState=a))};return b}();C.createRenderer=function(){return new C};
22
- var z=function(){function b(a){y(this,b);this._renderer=a;this._callbacks=[]}b.prototype._enqueueCallback=function(a,b){"function"===typeof a&&b&&this._callbacks.push({callback:a,publicInstance:b})};b.prototype._invokeCallbacks=function(){var a=this._callbacks;this._callbacks=[];a.forEach(function(a){a.callback.call(a.publicInstance)})};b.prototype.isMounted=function(){return!!this._renderer._element};b.prototype.enqueueForceUpdate=function(a,b){this._enqueueCallback(b,a);this._renderer._forcedUpdate=
23
- !0;this._renderer.render(this._renderer._element,this._renderer._context)};b.prototype.enqueueReplaceState=function(a,b,d){this._enqueueCallback(d,a);this._renderer._newState=b;this._renderer.render(this._renderer._element,this._renderer._context)};b.prototype.enqueueSetState=function(a,b,d){this._enqueueCallback(d,a);d=this._renderer._newState||a.state;"function"===typeof b&&(b=b(d,a.props));this._renderer._newState=e({},d,b);this._renderer.render(this._renderer._element,this._renderer._context)};
24
- return b}(),A=null;function B(){var b="";if(A){var a=null==A?"#empty":"string"===typeof A||"number"===typeof A?"#text":"string"===typeof A.type?A.type:A.type.displayName||A.type.name||"Unknown",c=A._owner,d=A._source;c=c&&x(c);a="\n in "+(a||"Unknown")+(d?" (at "+d.fileName.replace(/^.*[\\\/]/,"")+":"+d.lineNumber+")":c?" (created by "+c+")":"");b+=a}return b}var D=Object.freeze({default:C}),E=D&&C||D;module.exports=E["default"]?E["default"]:E;
10
+ 'use strict';var e=require("object-assign"),g=require("react"),n=require("react-is"),p=require("prop-types/checkPropTypes");function q(a,b,c,d,f,h,m,k){if(!a){a=void 0;if(void 0===b)a=Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var l=[c,d,f,h,m,k],D=0;a=Error(b.replace(/%s/g,function(){return l[D++]}));a.name="Invariant Violation"}a.framesToPop=1;throw a;}}
11
+ function r(a){for(var b=arguments.length-1,c="https://reactjs.org/docs/error-decoder.html?invariant="+a,d=0;d<b;d++)c+="&args[]="+encodeURIComponent(arguments[d+1]);q(!1,"Minified React error #"+a+"; visit %s for the full message or use the non-minified dev environment for full errors and additional helpful warnings. ",c)}
12
+ var t=/^(.*)[\\\/]/,u="function"===typeof Symbol&&Symbol.for,v=u?Symbol.for("react.portal"):60106,w=u?Symbol.for("react.fragment"):60107,x=u?Symbol.for("react.strict_mode"):60108,y=u?Symbol.for("react.profiler"):60114,z=u?Symbol.for("react.provider"):60109,A=u?Symbol.for("react.context"):60110,B=u?Symbol.for("react.async_mode"):60111,C=u?Symbol.for("react.forward_ref"):60112,E=u?Symbol.for("react.placeholder"):60113;
13
+ function F(a){if(null==a)return null;if("function"===typeof a)return a.displayName||a.name||null;if("string"===typeof a)return a;switch(a){case B:return"AsyncMode";case w:return"Fragment";case v:return"Portal";case y:return"Profiler";case x:return"StrictMode";case E:return"Placeholder"}if("object"===typeof a){switch(a.$$typeof){case A:return"Context.Consumer";case z:return"Context.Provider";case C:return a=a.render,a=a.displayName||a.name||"",""!==a?"ForwardRef("+a+")":"ForwardRef"}if("function"===
14
+ typeof a.then&&(a=1===a._reactStatus?a._reactResult:null))return F(a)}return null}var G=Object.prototype.hasOwnProperty;function H(a,b){return a===b?0!==a||0!==b||1/a===1/b:a!==a&&b!==b}function I(a,b){if(H(a,b))return!0;if("object"!==typeof a||null===a||"object"!==typeof b||null===b)return!1;var c=Object.keys(a),d=Object.keys(b);if(c.length!==d.length)return!1;for(d=0;d<c.length;d++)if(!G.call(b,c[d])||!H(a[c[d]],b[c[d]]))return!1;return!0}
15
+ function J(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function");}
16
+ var K={},O=function(){function a(){J(this,a);this._rendered=this._newState=this._instance=this._element=this._context=null;this._forcedUpdate=this._rendering=!1;this._updater=new L(this)}a.prototype.getMountedInstance=function(){return this._instance};a.prototype.getRenderOutput=function(){return this._rendered};a.prototype.render=function(b){var a=1<arguments.length&&void 0!==arguments[1]?arguments[1]:K;g.isValidElement(b)?void 0:r("12","function"===typeof b?" Instead of passing a component class, make sure to instantiate it by passing it to React.createElement.":
17
+ "");"string"===typeof b.type?r("13",b.type):void 0;n.isForwardRef(b)||"function"===typeof b.type?void 0:r("249",Array.isArray(b.type)?"array":null===b.type?"null":typeof b.type);if(!this._rendering){this._rendering=!0;this._element=b;var d=b.type.contextTypes;if(d){var f={},h;for(h in d)f[h]=a[h];a=f}else a=K;this._context=a;this._instance?this._updateClassComponent(b,this._context):n.isForwardRef(b)?this._rendered=b.type.render(b.props,b.ref):(a=b.type,a.prototype&&a.prototype.isReactComponent?(this._instance=
18
+ new b.type(b.props,this._context,this._updater),this._updateStateFromStaticLifecycle(b.props),b.type.hasOwnProperty("contextTypes")&&(M=b,a=b.type,d=(d=this._instance)&&d.constructor,p(b.type.contextTypes,this._context,"context",a.displayName||d&&d.displayName||a.name||d&&d.name||null,N),M=null),this._mountClassComponent(b,this._context)):this._rendered=b.type.call(void 0,b.props,this._context));this._rendering=!1;this._updater._invokeCallbacks();return this.getRenderOutput()}};a.prototype.unmount=
19
+ function(){this._instance&&"function"===typeof this._instance.componentWillUnmount&&this._instance.componentWillUnmount();this._instance=this._rendered=this._newState=this._element=this._context=null};a.prototype._mountClassComponent=function(a,c){this._instance.context=c;this._instance.props=a.props;this._instance.state=this._instance.state||null;this._instance.updater=this._updater;if("function"===typeof this._instance.UNSAFE_componentWillMount||"function"===typeof this._instance.componentWillMount)c=
20
+ this._newState,"function"!==typeof a.type.getDerivedStateFromProps&&"function"!==typeof this._instance.getSnapshotBeforeUpdate&&("function"===typeof this._instance.componentWillMount&&this._instance.componentWillMount(),"function"===typeof this._instance.UNSAFE_componentWillMount&&this._instance.UNSAFE_componentWillMount()),c!==this._newState&&(this._instance.state=this._newState||K);this._rendered=this._instance.render()};a.prototype._updateClassComponent=function(a,c){var b=a.props,f=a.type,h=this._instance.state||
21
+ K,m=this._instance.props;m!==b&&"function"!==typeof a.type.getDerivedStateFromProps&&"function"!==typeof this._instance.getSnapshotBeforeUpdate&&("function"===typeof this._instance.componentWillReceiveProps&&this._instance.componentWillReceiveProps(b,c),"function"===typeof this._instance.UNSAFE_componentWillReceiveProps&&this._instance.UNSAFE_componentWillReceiveProps(b,c));this._updateStateFromStaticLifecycle(b);var k=this._newState||h,l=!0;this._forcedUpdate?(l=!0,this._forcedUpdate=!1):"function"===
22
+ typeof this._instance.shouldComponentUpdate?l=!!this._instance.shouldComponentUpdate(b,k,c):f.prototype&&f.prototype.isPureReactComponent&&(l=!I(m,b)||!I(h,k));l&&"function"!==typeof a.type.getDerivedStateFromProps&&"function"!==typeof this._instance.getSnapshotBeforeUpdate&&("function"===typeof this._instance.componentWillUpdate&&this._instance.componentWillUpdate(b,k,c),"function"===typeof this._instance.UNSAFE_componentWillUpdate&&this._instance.UNSAFE_componentWillUpdate(b,k,c));this._instance.context=
23
+ c;this._instance.props=b;this._instance.state=k;l&&(this._rendered=this._instance.render())};a.prototype._updateStateFromStaticLifecycle=function(a){var b=this._element.type;if("function"===typeof b.getDerivedStateFromProps){var d=this._newState||this._instance.state;a=b.getDerivedStateFromProps.call(null,a,d);null!=a&&(d=e({},d,a),this._instance.state=this._newState=d)}};return a}();O.createRenderer=function(){return new O};
24
+ var L=function(){function a(b){J(this,a);this._renderer=b;this._callbacks=[]}a.prototype._enqueueCallback=function(a,c){"function"===typeof a&&c&&this._callbacks.push({callback:a,publicInstance:c})};a.prototype._invokeCallbacks=function(){var a=this._callbacks;this._callbacks=[];a.forEach(function(a){a.callback.call(a.publicInstance)})};a.prototype.isMounted=function(){return!!this._renderer._element};a.prototype.enqueueForceUpdate=function(a,c){this._enqueueCallback(c,a);this._renderer._forcedUpdate=
25
+ !0;this._renderer.render(this._renderer._element,this._renderer._context)};a.prototype.enqueueReplaceState=function(a,c,d){this._enqueueCallback(d,a);this._renderer._newState=c;this._renderer.render(this._renderer._element,this._renderer._context)};a.prototype.enqueueSetState=function(a,c,d){this._enqueueCallback(d,a);d=this._renderer._newState||a.state;"function"===typeof c&&(c=c.call(a,d,a.props));null!==c&&void 0!==c&&(this._renderer._newState=e({},d,c),this._renderer.render(this._renderer._element,
26
+ this._renderer._context))};return a}(),M=null;function N(){var a="";if(M){var b=null==M?"#empty":"string"===typeof M||"number"===typeof M?"#text":"string"===typeof M.type?M.type:M.type.displayName||M.type.name||"Unknown",c=M._owner,d=M._source;c=c&&F(c.type);var f="";d?f=" (at "+d.fileName.replace(t,"")+":"+d.lineNumber+")":c&&(f=" (created by "+c+")");a+="\n in "+(b||"Unknown")+f}return a}var P={default:O},Q=P&&O||P;module.exports=Q.default||Q;