react-test-renderer
Advanced tools
Comparing version 16.8.6 to 16.9.0-alpha.0
{ | ||
"branch": "pull/15226", | ||
"buildNumber": "14079", | ||
"checksum": "4a4c239", | ||
"commit": "297165f1e", | ||
"branch": "pull/15307", | ||
"buildNumber": "14231", | ||
"checksum": "0f531f7", | ||
"commit": "c35e37aab", | ||
"environment": "ci", | ||
"reactVersion": "16.8.5-canary-297165f1e" | ||
"reactVersion": "16.8.6-canary-c35e37aab" | ||
} |
@@ -1,2 +0,2 @@ | ||
/** @license React v16.8.6 | ||
/** @license React v16.9.0-alpha.0 | ||
* react-test-renderer-shallow.development.js | ||
@@ -23,47 +23,16 @@ * | ||
/** | ||
* Use invariant() to assert state which your program assumes to be true. | ||
* | ||
* Provide sprintf-style format (only %s is supported) and arguments | ||
* to provide information about what broke and what you were | ||
* expecting. | ||
* | ||
* The invariant message will be stripped in production, but the invariant | ||
* will remain to ensure logic does not differ in production. | ||
*/ | ||
// Do not require this module directly! Use a normal error constructor with | ||
// template literal strings. The messages will be converted to ReactError during | ||
// build, and in production they will be minified. | ||
var validateFormat = function () {}; | ||
// Do not require this module directly! Use a normal error constructor with | ||
// template literal strings. The messages will be converted to ReactError during | ||
// build, and in production they will be minified. | ||
{ | ||
validateFormat = function (format) { | ||
if (format === undefined) { | ||
throw new Error('invariant requires an error message argument'); | ||
} | ||
}; | ||
function ReactError(message) { | ||
var error = new Error(message); | ||
error.name = 'Invariant Violation'; | ||
return error; | ||
} | ||
function invariant(condition, format, a, b, c, d, e, f) { | ||
validateFormat(format); | ||
if (!condition) { | ||
var error = void 0; | ||
if (format === undefined) { | ||
error = new Error('Minified exception occurred; use the non-minified dev environment ' + 'for the full error message and additional helpful warnings.'); | ||
} else { | ||
var args = [a, b, c, d, e, f]; | ||
var argIndex = 0; | ||
error = new Error(format.replace(/%s/g, function () { | ||
return args[argIndex++]; | ||
})); | ||
error.name = 'Invariant Violation'; | ||
} | ||
error.framesToPop = 1; // we don't care about invariant's own frame | ||
throw error; | ||
} | ||
} | ||
// Relying on the `invariant()` implementation lets us | ||
// preserve the format and params in the www builds. | ||
var BEFORE_SLASH_RE = /^(.*)[\\\/]/; | ||
@@ -164,3 +133,8 @@ | ||
var REACT_LAZY_TYPE = hasSymbol ? Symbol.for('react.lazy') : 0xead4; | ||
var REACT_EVENT_COMPONENT_TYPE = hasSymbol ? Symbol.for('react.event_component') : 0xead5; | ||
var REACT_EVENT_TARGET_TYPE = hasSymbol ? Symbol.for('react.event_target') : 0xead6; | ||
// React event targets | ||
var REACT_EVENT_TARGET_TOUCH_HIT = hasSymbol ? Symbol.for('react.event_target.touch_hit') : 0xead7; | ||
var Resolved = 1; | ||
@@ -225,3 +199,24 @@ | ||
} | ||
break; | ||
} | ||
case REACT_EVENT_COMPONENT_TYPE: | ||
{ | ||
var eventComponent = type; | ||
var displayName = eventComponent.displayName; | ||
if (displayName !== undefined) { | ||
return displayName; | ||
} | ||
break; | ||
} | ||
case REACT_EVENT_TARGET_TYPE: | ||
{ | ||
var eventTarget = type; | ||
if (eventTarget.type === REACT_EVENT_TARGET_TOUCH_HIT) { | ||
return 'TouchHitTarget'; | ||
} | ||
var _displayName = eventTarget.displayName; | ||
if (_displayName !== undefined) { | ||
return _displayName; | ||
} | ||
} | ||
} | ||
@@ -274,2 +269,13 @@ } | ||
/** | ||
* Use invariant() to assert state which your program assumes to be true. | ||
* | ||
* Provide sprintf-style format (only %s is supported) and arguments | ||
* to provide information about what broke and what you were | ||
* expecting. | ||
* | ||
* The invariant message will be stripped in production, but the invariant | ||
* will remain to ensure logic does not differ in production. | ||
*/ | ||
var ReactSharedInternals = React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED; | ||
@@ -453,24 +459,32 @@ | ||
ReactShallowRenderer.prototype._validateCurrentlyRenderingComponent = function _validateCurrentlyRenderingComponent() { | ||
!(this._rendering && !this._instance) ? invariant(false, 'Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for one of the following reasons:\n1. You might have mismatching versions of React and the renderer (such as React DOM)\n2. You might be breaking the Rules of Hooks\n3. You might have more than one copy of React in the same app\nSee https://fb.me/react-invalid-hook-call for tips about how to debug and fix this problem.') : void 0; | ||
var _this = this; | ||
(function () { | ||
if (!(_this._rendering && !_this._instance)) { | ||
{ | ||
throw ReactError('Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for one of the following reasons:\n1. You might have mismatching versions of React and the renderer (such as React DOM)\n2. You might be breaking the Rules of Hooks\n3. You might have more than one copy of React in the same app\nSee https://fb.me/react-invalid-hook-call for tips about how to debug and fix this problem.'); | ||
} | ||
} | ||
})(); | ||
}; | ||
ReactShallowRenderer.prototype._createDispatcher = function _createDispatcher() { | ||
var _this = this; | ||
var _this2 = this; | ||
var useReducer = function (reducer, initialArg, init) { | ||
_this._validateCurrentlyRenderingComponent(); | ||
_this._createWorkInProgressHook(); | ||
var workInProgressHook = _this._workInProgressHook; | ||
_this2._validateCurrentlyRenderingComponent(); | ||
_this2._createWorkInProgressHook(); | ||
var workInProgressHook = _this2._workInProgressHook; | ||
if (_this._isReRender) { | ||
if (_this2._isReRender) { | ||
// This is a re-render. | ||
var _queue = workInProgressHook.queue; | ||
var _dispatch = _queue.dispatch; | ||
if (_this._numberOfReRenders > 0) { | ||
if (_this2._numberOfReRenders > 0) { | ||
// Apply the new render phase updates to the previous current hook. | ||
if (_this._renderPhaseUpdates !== null) { | ||
if (_this2._renderPhaseUpdates !== null) { | ||
// Render phase updates are stored in a map of queue -> linked list | ||
var firstRenderPhaseUpdate = _this._renderPhaseUpdates.get(_queue); | ||
var firstRenderPhaseUpdate = _this2._renderPhaseUpdates.get(_queue); | ||
if (firstRenderPhaseUpdate !== undefined) { | ||
_this._renderPhaseUpdates.delete(_queue); | ||
_this2._renderPhaseUpdates.delete(_queue); | ||
var _newState = workInProgressHook.memoizedState; | ||
@@ -515,3 +529,3 @@ var _update = firstRenderPhaseUpdate; | ||
}; | ||
var _dispatch2 = _queue2.dispatch = _this._dispatchAction.bind(_this, _queue2); | ||
var _dispatch2 = _queue2.dispatch = _this2._dispatchAction.bind(_this2, _queue2); | ||
return [workInProgressHook.memoizedState, _dispatch2]; | ||
@@ -528,9 +542,9 @@ } | ||
var useMemo = function (nextCreate, deps) { | ||
_this._validateCurrentlyRenderingComponent(); | ||
_this._createWorkInProgressHook(); | ||
_this2._validateCurrentlyRenderingComponent(); | ||
_this2._createWorkInProgressHook(); | ||
var nextDeps = deps !== undefined ? deps : null; | ||
if (_this._workInProgressHook !== null && _this._workInProgressHook.memoizedState !== null) { | ||
var prevState = _this._workInProgressHook.memoizedState; | ||
if (_this2._workInProgressHook !== null && _this2._workInProgressHook.memoizedState !== null) { | ||
var prevState = _this2._workInProgressHook.memoizedState; | ||
var prevDeps = prevState[1]; | ||
@@ -545,3 +559,3 @@ if (nextDeps !== null) { | ||
var nextValue = nextCreate(); | ||
_this._workInProgressHook.memoizedState = [nextValue, nextDeps]; | ||
_this2._workInProgressHook.memoizedState = [nextValue, nextDeps]; | ||
return nextValue; | ||
@@ -551,5 +565,5 @@ }; | ||
var useRef = function (initialValue) { | ||
_this._validateCurrentlyRenderingComponent(); | ||
_this._createWorkInProgressHook(); | ||
var previousRef = _this._workInProgressHook.memoizedState; | ||
_this2._validateCurrentlyRenderingComponent(); | ||
_this2._createWorkInProgressHook(); | ||
var previousRef = _this2._workInProgressHook.memoizedState; | ||
if (previousRef === null) { | ||
@@ -560,3 +574,3 @@ var ref = { current: initialValue }; | ||
} | ||
_this._workInProgressHook.memoizedState = ref; | ||
_this2._workInProgressHook.memoizedState = ref; | ||
return ref; | ||
@@ -573,3 +587,3 @@ } else { | ||
var noOp = function () { | ||
_this._validateCurrentlyRenderingComponent(); | ||
_this2._validateCurrentlyRenderingComponent(); | ||
}; | ||
@@ -585,3 +599,3 @@ | ||
useContext: function (context) { | ||
_this._validateCurrentlyRenderingComponent(); | ||
_this2._validateCurrentlyRenderingComponent(); | ||
return readContext(context); | ||
@@ -601,4 +615,12 @@ }, | ||
ReactShallowRenderer.prototype._dispatchAction = function _dispatchAction(queue, action) { | ||
!(this._numberOfReRenders < RE_RENDER_LIMIT) ? invariant(false, 'Too many re-renders. React limits the number of renders to prevent an infinite loop.') : void 0; | ||
var _this3 = this; | ||
(function () { | ||
if (!(_this3._numberOfReRenders < RE_RENDER_LIMIT)) { | ||
{ | ||
throw ReactError('Too many re-renders. React limits the number of renders to prevent an infinite loop.'); | ||
} | ||
} | ||
})(); | ||
if (this._rendering) { | ||
@@ -706,7 +728,25 @@ // This is a render phase update. Stash it in a lazily-created map of | ||
!React.isValidElement(element) ? invariant(false, 'ReactShallowRenderer render(): Invalid component element.%s', typeof element === 'function' ? ' Instead of passing a component class, make sure to instantiate ' + 'it by passing it to React.createElement.' : '') : void 0; | ||
(function () { | ||
if (!React.isValidElement(element)) { | ||
{ | ||
throw ReactError('ReactShallowRenderer render(): Invalid component element.' + (typeof element === 'function' ? ' Instead of passing a component class, make sure to instantiate ' + 'it by passing it to React.createElement.' : '')); | ||
} | ||
} | ||
})(); | ||
element = element; | ||
// Show a special message for host elements since it's a common case. | ||
!(typeof element.type !== 'string') ? invariant(false, 'ReactShallowRenderer render(): Shallow rendering works only with custom components, not primitives (%s). Instead of calling `.render(el)` and inspecting the rendered output, look at `el.props` directly instead.', element.type) : void 0; | ||
!(reactIs.isForwardRef(element) || typeof element.type === 'function' || reactIs.isMemo(element.type)) ? invariant(false, 'ReactShallowRenderer render(): Shallow rendering works only with custom components, but the provided element type was `%s`.', Array.isArray(element.type) ? 'array' : element.type === null ? 'null' : typeof element.type) : void 0; | ||
(function () { | ||
if (!(typeof element.type !== 'string')) { | ||
{ | ||
throw ReactError('ReactShallowRenderer render(): Shallow rendering works only with custom components, not primitives (' + element.type + '). Instead of calling `.render(el)` and inspecting the rendered output, look at `el.props` directly instead.'); | ||
} | ||
} | ||
})(); | ||
(function () { | ||
if (!(reactIs.isForwardRef(element) || typeof element.type === 'function' || reactIs.isMemo(element.type))) { | ||
{ | ||
throw ReactError('ReactShallowRenderer render(): Shallow rendering works only with custom components, but the provided element type was `' + (Array.isArray(element.type) ? 'array' : element.type === null ? 'null' : typeof element.type) + '`.'); | ||
} | ||
} | ||
})(); | ||
@@ -769,3 +809,9 @@ if (this._rendering) { | ||
if (elementType.$$typeof === reactIs.ForwardRef) { | ||
!(typeof elementType.render === 'function') ? invariant(false, 'forwardRef requires a render function but was given %s.', typeof elementType.render) : void 0; | ||
(function () { | ||
if (!(typeof elementType.render === 'function')) { | ||
{ | ||
throw ReactError('forwardRef requires a render function but was given ' + typeof elementType.render + '.'); | ||
} | ||
} | ||
})(); | ||
this._rendered = elementType.render.call(undefined, element.props, element.ref); | ||
@@ -772,0 +818,0 @@ } else { |
@@ -1,2 +0,2 @@ | ||
/** @license React v16.8.6 | ||
/** @license React v16.9.0-alpha.0 | ||
* react-test-renderer-shallow.production.min.js | ||
@@ -10,27 +10,27 @@ * | ||
'use strict';var k=require("object-assign"),l=require("react"),m=require("react-is"),n=require("prop-types/checkPropTypes");function p(a,b,d,c,f,e,g,h){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 H=[d,c,f,e,g,h],I=0;a=Error(b.replace(/%s/g,function(){return H[I++]}));a.name="Invariant Violation"}a.framesToPop=1;throw a;}} | ||
function q(a){for(var b=arguments.length-1,d="https://reactjs.org/docs/error-decoder.html?invariant="+a,c=0;c<b;c++)d+="&args[]="+encodeURIComponent(arguments[c+1]);p(!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. ",d)} | ||
var r=/^(.*)[\\\/]/,t="function"===typeof Symbol&&Symbol.for,u=t?Symbol.for("react.portal"):60106,v=t?Symbol.for("react.fragment"):60107,w=t?Symbol.for("react.strict_mode"):60108,x=t?Symbol.for("react.profiler"):60114,y=t?Symbol.for("react.provider"):60109,z=t?Symbol.for("react.context"):60110,A=t?Symbol.for("react.concurrent_mode"):60111,B=t?Symbol.for("react.forward_ref"):60112,C=t?Symbol.for("react.suspense"):60113,D=t?Symbol.for("react.memo"):60115,E=t?Symbol.for("react.lazy"):60116; | ||
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 A:return"ConcurrentMode";case v:return"Fragment";case u:return"Portal";case x:return"Profiler";case w:return"StrictMode";case C:return"Suspense"}if("object"===typeof a)switch(a.$$typeof){case z:return"Context.Consumer";case y:return"Context.Provider";case B:var b=a.render;b=b.displayName||b.name||"";return a.displayName||(""!==b?"ForwardRef("+b+")":"ForwardRef"); | ||
case D:return F(a.type);case E:if(a=1===a._status?a._result:null)return F(a)}return null}function G(a,b){return a===b&&(0!==a||1/a===1/b)||a!==a&&b!==b}var J=Object.prototype.hasOwnProperty;function K(a,b){if(G(a,b))return!0;if("object"!==typeof a||null===a||"object"!==typeof b||null===b)return!1;var d=Object.keys(a),c=Object.keys(b);if(d.length!==c.length)return!1;for(c=0;c<d.length;c++)if(!J.call(b,d[c])||!G(a[d[c]],b[d[c]]))return!1;return!0}var L=l.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED; | ||
L.hasOwnProperty("ReactCurrentDispatcher")||(L.ReactCurrentDispatcher={current:null});function M(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function");} | ||
'use strict';var h=require("object-assign"),l=require("react"),m=require("react-is"),n=require("prop-types/checkPropTypes");function p(a){for(var b="https://reactjs.org/docs/error-decoder.html?invariant="+a,d=1;d<arguments.length;d++)b+="&args[]="+encodeURIComponent(arguments[d]);return Error("Minified React error #"+a+"; visit "+b+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings. ")} | ||
var q=/^(.*)[\\\/]/,r="function"===typeof Symbol&&Symbol.for,t=r?Symbol.for("react.portal"):60106,u=r?Symbol.for("react.fragment"):60107,v=r?Symbol.for("react.strict_mode"):60108,w=r?Symbol.for("react.profiler"):60114,x=r?Symbol.for("react.provider"):60109,y=r?Symbol.for("react.context"):60110,z=r?Symbol.for("react.concurrent_mode"):60111,A=r?Symbol.for("react.forward_ref"):60112,B=r?Symbol.for("react.suspense"):60113,C=r?Symbol.for("react.memo"):60115,D=r?Symbol.for("react.lazy"):60116,E=r?Symbol.for("react.event_component"): | ||
60117,F=r?Symbol.for("react.event_target"):60118,G=r?Symbol.for("react.event_target.touch_hit"):60119; | ||
function H(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 z:return"ConcurrentMode";case u:return"Fragment";case t:return"Portal";case w:return"Profiler";case v:return"StrictMode";case B:return"Suspense"}if("object"===typeof a)switch(a.$$typeof){case y:return"Context.Consumer";case x:return"Context.Provider";case A:var b=a.render;b=b.displayName||b.name||"";return a.displayName||(""!==b?"ForwardRef("+b+")":"ForwardRef"); | ||
case C:return H(a.type);case D:if(a=1===a._status?a._result:null)return H(a);break;case E:a=a.displayName;if(void 0!==a)return a;break;case F:if(a.type===G)return"TouchHitTarget";a=a.displayName;if(void 0!==a)return a}return null}function I(a,b){return a===b&&(0!==a||1/a===1/b)||a!==a&&b!==b}var J=Object.prototype.hasOwnProperty; | ||
function K(a,b){if(I(a,b))return!0;if("object"!==typeof a||null===a||"object"!==typeof b||null===b)return!1;var d=Object.keys(a),c=Object.keys(b);if(d.length!==c.length)return!1;for(c=0;c<d.length;c++)if(!J.call(b,d[c])||!I(a[d[c]],b[d[c]]))return!1;return!0}var L=l.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;L.hasOwnProperty("ReactCurrentDispatcher")||(L.ReactCurrentDispatcher={current:null});function M(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function");} | ||
var N=L.ReactCurrentDispatcher,O={},P=function(){function a(b){M(this,a);this._renderer=b;this._callbacks=[]}a.prototype._enqueueCallback=function(b,a){"function"===typeof b&&a&&this._callbacks.push({callback:b,publicInstance:a})};a.prototype._invokeCallbacks=function(){var b=this._callbacks;this._callbacks=[];b.forEach(function(b){b.callback.call(b.publicInstance)})};a.prototype.isMounted=function(){return!!this._renderer._element};a.prototype.enqueueForceUpdate=function(b,a){this._enqueueCallback(a, | ||
b);this._renderer._forcedUpdate=!0;this._renderer.render(this._renderer._element,this._renderer._context)};a.prototype.enqueueReplaceState=function(b,a,c){this._enqueueCallback(c,b);this._renderer._newState=a;this._renderer.render(this._renderer._element,this._renderer._context)};a.prototype.enqueueSetState=function(b,a,c){this._enqueueCallback(c,b);c=this._renderer._newState||b.state;"function"===typeof a&&(a=a.call(b,c,b.props));null!==a&&void 0!==a&&(this._renderer._newState=k({},c,a),this._renderer.render(this._renderer._element, | ||
b);this._renderer._forcedUpdate=!0;this._renderer.render(this._renderer._element,this._renderer._context)};a.prototype.enqueueReplaceState=function(b,a,c){this._enqueueCallback(c,b);this._renderer._newState=a;this._renderer.render(this._renderer._element,this._renderer._context)};a.prototype.enqueueSetState=function(b,a,c){this._enqueueCallback(c,b);c=this._renderer._newState||b.state;"function"===typeof a&&(a=a.call(b,c,b.props));null!==a&&void 0!==a&&(this._renderer._newState=h({},c,a),this._renderer.render(this._renderer._element, | ||
this._renderer._context))};return a}();function Q(){return{memoizedState:null,queue:null,next:null}}function R(a,b){return"function"===typeof b?b(a):b} | ||
var U=function(){function a(){M(this,a);this._reset()}a.prototype._reset=function(){this._rendered=this._newState=this._instance=this._element=this._context=null;this._forcedUpdate=this._rendering=!1;this._updater=new P(this);this._dispatcher=this._createDispatcher();this._firstWorkInProgressHook=this._workInProgressHook=null;this._didScheduleRenderPhaseUpdate=this._isReRender=!1;this._renderPhaseUpdates=null;this._numberOfReRenders=0};a.prototype._validateCurrentlyRenderingComponent=function(){!this._rendering|| | ||
this._instance?q("321"):void 0};a.prototype._createDispatcher=function(){function b(){c._validateCurrentlyRenderingComponent()}function a(b,a,d){c._validateCurrentlyRenderingComponent();c._createWorkInProgressHook();var f=c._workInProgressHook;if(c._isReRender){d=f.queue;a=d.dispatch;if(0<c._numberOfReRenders){if(null!==c._renderPhaseUpdates){var e=c._renderPhaseUpdates.get(d);if(void 0!==e){c._renderPhaseUpdates.delete(d);d=f.memoizedState;do d=b(d,e.action),e=e.next;while(null!==e);f.memoizedState= | ||
var U=function(){function a(){M(this,a);this._reset()}a.prototype._reset=function(){this._rendered=this._newState=this._instance=this._element=this._context=null;this._forcedUpdate=this._rendering=!1;this._updater=new P(this);this._dispatcher=this._createDispatcher();this._firstWorkInProgressHook=this._workInProgressHook=null;this._didScheduleRenderPhaseUpdate=this._isReRender=!1;this._renderPhaseUpdates=null;this._numberOfReRenders=0};a.prototype._validateCurrentlyRenderingComponent=function(){if(!this._rendering|| | ||
this._instance)throw p(321);};a.prototype._createDispatcher=function(){function b(){c._validateCurrentlyRenderingComponent()}function a(b,a,d){c._validateCurrentlyRenderingComponent();c._createWorkInProgressHook();var f=c._workInProgressHook;if(c._isReRender){d=f.queue;a=d.dispatch;if(0<c._numberOfReRenders){if(null!==c._renderPhaseUpdates){var e=c._renderPhaseUpdates.get(d);if(void 0!==e){c._renderPhaseUpdates.delete(d);d=f.memoizedState;do d=b(d,e.action),e=e.next;while(null!==e);f.memoizedState= | ||
d;return[d,a]}}return[f.memoizedState,a]}e=f.memoizedState;var g=d.first;if(null!==g){do e=b(e,g.action),g=g.next;while(null!==g);d.first=null;f.memoizedState=e}return[e,a]}b=b===R?"function"===typeof a?a():a:void 0!==d?d(a):a;f.memoizedState=b;b=f.queue={first:null,dispatch:null};b=b.dispatch=c._dispatchAction.bind(c,b);return[f.memoizedState,b]}var c=this;return{readContext:function(b){return b._currentValue},useCallback:function(b){return b},useContext:function(b){c._validateCurrentlyRenderingComponent(); | ||
return b._currentValue},useDebugValue:b,useEffect:b,useImperativeHandle:b,useLayoutEffect:b,useMemo:function(b,a){c._validateCurrentlyRenderingComponent();c._createWorkInProgressHook();a=void 0!==a?a:null;if(null!==c._workInProgressHook&&null!==c._workInProgressHook.memoizedState){var d=c._workInProgressHook.memoizedState,f=d[1];if(null!==a){a:if(null===f)f=!1;else{for(var e=0;e<f.length&&e<a.length;e++)if(!G(a[e],f[e])){f=!1;break a}f=!0}if(f)return d[0]}}b=b();c._workInProgressHook.memoizedState= | ||
[b,a];return b},useReducer:a,useRef:function(b){c._validateCurrentlyRenderingComponent();c._createWorkInProgressHook();var a=c._workInProgressHook.memoizedState;return null===a?(b={current:b},c._workInProgressHook.memoizedState=b):a},useState:function(b){return a(R,b)}}};a.prototype._dispatchAction=function(b,a){25>this._numberOfReRenders?void 0:q("301");if(this._rendering){this._didScheduleRenderPhaseUpdate=!0;a={action:a,next:null};var c=this._renderPhaseUpdates;null===c&&(this._renderPhaseUpdates= | ||
return b._currentValue},useDebugValue:b,useEffect:b,useImperativeHandle:b,useLayoutEffect:b,useMemo:function(b,a){c._validateCurrentlyRenderingComponent();c._createWorkInProgressHook();a=void 0!==a?a:null;if(null!==c._workInProgressHook&&null!==c._workInProgressHook.memoizedState){var d=c._workInProgressHook.memoizedState,f=d[1];if(null!==a){a:if(null===f)f=!1;else{for(var e=0;e<f.length&&e<a.length;e++)if(!I(a[e],f[e])){f=!1;break a}f=!0}if(f)return d[0]}}b=b();c._workInProgressHook.memoizedState= | ||
[b,a];return b},useReducer:a,useRef:function(b){c._validateCurrentlyRenderingComponent();c._createWorkInProgressHook();var a=c._workInProgressHook.memoizedState;return null===a?(b={current:b},c._workInProgressHook.memoizedState=b):a},useState:function(b){return a(R,b)}}};a.prototype._dispatchAction=function(b,a){if(!(25>this._numberOfReRenders))throw p(301);if(this._rendering){this._didScheduleRenderPhaseUpdate=!0;a={action:a,next:null};var c=this._renderPhaseUpdates;null===c&&(this._renderPhaseUpdates= | ||
c=new Map);var d=c.get(b);if(void 0===d)c.set(b,a);else{for(b=d;null!==b.next;)b=b.next;b.next=a}}else{a={action:a,next:null};c=b.first;if(null===c)b.first=a;else{for(;null!==c.next;)c=c.next;c.next=a}this.render(this._element,this._context)}};a.prototype._createWorkInProgressHook=function(){null===this._workInProgressHook?null===this._firstWorkInProgressHook?(this._isReRender=!1,this._firstWorkInProgressHook=this._workInProgressHook=Q()):(this._isReRender=!0,this._workInProgressHook=this._firstWorkInProgressHook): | ||
null===this._workInProgressHook.next?(this._isReRender=!1,this._workInProgressHook=this._workInProgressHook.next=Q()):(this._isReRender=!0,this._workInProgressHook=this._workInProgressHook.next);return this._workInProgressHook};a.prototype._finishHooks=function(b,a){this._didScheduleRenderPhaseUpdate?(this._didScheduleRenderPhaseUpdate=!1,this._numberOfReRenders+=1,this._workInProgressHook=null,this._rendering=!1,this.render(b,a)):(this._renderPhaseUpdates=this._workInProgressHook=null,this._numberOfReRenders= | ||
0)};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]:O;l.isValidElement(b)?void 0:q("12","function"===typeof b?" Instead of passing a component class, make sure to instantiate it by passing it to React.createElement.":"");"string"===typeof b.type?q("13",b.type):void 0;m.isForwardRef(b)||"function"===typeof b.type||m.isMemo(b.type)? | ||
void 0:q("249",Array.isArray(b.type)?"array":null===b.type?"null":typeof b.type);if(!this._rendering){null!=this._element&&this._element.type!==b.type&&this._reset();var c=m.isMemo(b.type)?b.type.type:b.type,f=this._element;this._rendering=!0;this._element=b;var e;if((e=c.contextTypes)&&a){var g={},h;for(h in e)g[h]=a[h];e=g}else e=O;this._context=e;m.isMemo(b.type)&&c.propTypes&&(S=b,n(c.propTypes,b.props,"prop",F(c),T));if(this._instance)this._updateClassComponent(c,b,this._context);else if(c.prototype&& | ||
c.prototype.isReactComponent)this._instance=new c(b.props,this._context,this._updater),"function"===typeof c.getDerivedStateFromProps&&(a=c.getDerivedStateFromProps.call(null,b.props,this._instance.state),null!=a&&(this._instance.state=k({},this._instance.state,a))),c.contextTypes&&(S=b,a=(a=this._instance)&&a.constructor,n(c.contextTypes,this._context,"context",c.displayName||a&&a.displayName||c.name||a&&a.name||null,T),S=null),this._mountClassComponent(c,b,this._context);else if(e=!0,m.isMemo(b.type)&& | ||
null!==f&&(b.type.compare||K)(f.props,b.props)&&(e=!1),e){f=N.current;N.current=this._dispatcher;try{c.$$typeof===m.ForwardRef?("function"!==typeof c.render?q("322",typeof c.render):void 0,this._rendered=c.render.call(void 0,b.props,b.ref)):this._rendered=c(b.props,this._context)}finally{N.current=f}this._finishHooks(b,a)}this._rendering=!1;this._updater._invokeCallbacks();return this.getRenderOutput()}};a.prototype.unmount=function(){this._instance&&"function"===typeof this._instance.componentWillUnmount&& | ||
this._instance.componentWillUnmount();this._reset()};a.prototype._mountClassComponent=function(a,d,c){this._instance.context=c;this._instance.props=d.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)d=this._newState,"function"!==typeof a.getDerivedStateFromProps&&"function"!==typeof this._instance.getSnapshotBeforeUpdate&&("function"===typeof this._instance.componentWillMount&& | ||
0)};a.prototype.getMountedInstance=function(){return this._instance};a.prototype.getRenderOutput=function(){return this._rendered};a.prototype.render=function(a){var b=1<arguments.length&&void 0!==arguments[1]?arguments[1]:O;if(!l.isValidElement(a))throw p(12,"function"===typeof a?" Instead of passing a component class, make sure to instantiate it by passing it to React.createElement.":"");if("string"===typeof a.type)throw p(13,a.type);if(!m.isForwardRef(a)&&"function"!==typeof a.type&&!m.isMemo(a.type))throw p(249, | ||
Array.isArray(a.type)?"array":null===a.type?"null":typeof a.type);if(!this._rendering){null!=this._element&&this._element.type!==a.type&&this._reset();var c=m.isMemo(a.type)?a.type.type:a.type,f=this._element;this._rendering=!0;this._element=a;var e;if((e=c.contextTypes)&&b){var g={},k;for(k in e)g[k]=b[k];e=g}else e=O;this._context=e;m.isMemo(a.type)&&c.propTypes&&(S=a,n(c.propTypes,a.props,"prop",H(c),T));if(this._instance)this._updateClassComponent(c,a,this._context);else if(c.prototype&&c.prototype.isReactComponent)this._instance= | ||
new c(a.props,this._context,this._updater),"function"===typeof c.getDerivedStateFromProps&&(b=c.getDerivedStateFromProps.call(null,a.props,this._instance.state),null!=b&&(this._instance.state=h({},this._instance.state,b))),c.contextTypes&&(S=a,b=(b=this._instance)&&b.constructor,n(c.contextTypes,this._context,"context",c.displayName||b&&b.displayName||c.name||b&&b.name||null,T),S=null),this._mountClassComponent(c,a,this._context);else if(e=!0,m.isMemo(a.type)&&null!==f&&(a.type.compare||K)(f.props, | ||
a.props)&&(e=!1),e){f=N.current;N.current=this._dispatcher;try{if(c.$$typeof===m.ForwardRef){if("function"!==typeof c.render)throw p(322,typeof c.render);this._rendered=c.render.call(void 0,a.props,a.ref)}else this._rendered=c(a.props,this._context)}finally{N.current=f}this._finishHooks(a,b)}this._rendering=!1;this._updater._invokeCallbacks();return this.getRenderOutput()}};a.prototype.unmount=function(){this._instance&&"function"===typeof this._instance.componentWillUnmount&&this._instance.componentWillUnmount(); | ||
this._reset()};a.prototype._mountClassComponent=function(a,d,c){this._instance.context=c;this._instance.props=d.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)d=this._newState,"function"!==typeof a.getDerivedStateFromProps&&"function"!==typeof this._instance.getSnapshotBeforeUpdate&&("function"===typeof this._instance.componentWillMount&& | ||
this._instance.componentWillMount(),"function"===typeof this._instance.UNSAFE_componentWillMount&&this._instance.UNSAFE_componentWillMount()),d!==this._newState&&(this._instance.state=this._newState||O);this._rendered=this._instance.render()};a.prototype._updateClassComponent=function(a,d,c){d=d.props;var b=this._instance.state||O,e=this._instance.props;e!==d&&"function"!==typeof a.getDerivedStateFromProps&&"function"!==typeof this._instance.getSnapshotBeforeUpdate&&("function"===typeof this._instance.componentWillReceiveProps&& | ||
this._instance.componentWillReceiveProps(d,c),"function"===typeof this._instance.UNSAFE_componentWillReceiveProps&&this._instance.UNSAFE_componentWillReceiveProps(d,c));var g=this._newState||b;if("function"===typeof a.getDerivedStateFromProps){var h=a.getDerivedStateFromProps.call(null,d,g);null!=h&&(g=k({},g,h))}h=!0;this._forcedUpdate?(h=!0,this._forcedUpdate=!1):"function"===typeof this._instance.shouldComponentUpdate?h=!!this._instance.shouldComponentUpdate(d,g,c):a.prototype&&a.prototype.isPureReactComponent&& | ||
(h=!K(e,d)||!K(b,g));h&&"function"!==typeof a.getDerivedStateFromProps&&"function"!==typeof this._instance.getSnapshotBeforeUpdate&&("function"===typeof this._instance.componentWillUpdate&&this._instance.componentWillUpdate(d,g,c),"function"===typeof this._instance.UNSAFE_componentWillUpdate&&this._instance.UNSAFE_componentWillUpdate(d,g,c));this._instance.context=c;this._instance.props=d;this._instance.state=g;this._newState=null;h&&(this._rendered=this._instance.render())};return a}(); | ||
U.createRenderer=function(){return new U};var S=null;function V(a){if(null==a)return"#empty";if("string"===typeof a||"number"===typeof a)return"#text";if("string"===typeof a.type)return a.type;a=m.isMemo(a.type)?a.type.type:a.type;return a.displayName||a.name||"Unknown"}function T(){var a="";if(S){var b=V(S),d=S._owner,c=S._source;d=d&&F(d.type);var f="";c?f=" (at "+c.fileName.replace(r,"")+":"+c.lineNumber+")":d&&(f=" (created by "+d+")");a+="\n in "+(b||"Unknown")+f}return a} | ||
this._instance.componentWillReceiveProps(d,c),"function"===typeof this._instance.UNSAFE_componentWillReceiveProps&&this._instance.UNSAFE_componentWillReceiveProps(d,c));var g=this._newState||b;if("function"===typeof a.getDerivedStateFromProps){var k=a.getDerivedStateFromProps.call(null,d,g);null!=k&&(g=h({},g,k))}k=!0;this._forcedUpdate?(k=!0,this._forcedUpdate=!1):"function"===typeof this._instance.shouldComponentUpdate?k=!!this._instance.shouldComponentUpdate(d,g,c):a.prototype&&a.prototype.isPureReactComponent&& | ||
(k=!K(e,d)||!K(b,g));k&&"function"!==typeof a.getDerivedStateFromProps&&"function"!==typeof this._instance.getSnapshotBeforeUpdate&&("function"===typeof this._instance.componentWillUpdate&&this._instance.componentWillUpdate(d,g,c),"function"===typeof this._instance.UNSAFE_componentWillUpdate&&this._instance.UNSAFE_componentWillUpdate(d,g,c));this._instance.context=c;this._instance.props=d;this._instance.state=g;this._newState=null;k&&(this._rendered=this._instance.render())};return a}(); | ||
U.createRenderer=function(){return new U};var S=null;function V(a){if(null==a)return"#empty";if("string"===typeof a||"number"===typeof a)return"#text";if("string"===typeof a.type)return a.type;a=m.isMemo(a.type)?a.type.type:a.type;return a.displayName||a.name||"Unknown"}function T(){var a="";if(S){var b=V(S),d=S._owner,c=S._source;d=d&&H(d.type);var f="";c?f=" (at "+c.fileName.replace(q,"")+":"+c.lineNumber+")":d&&(f=" (created by "+d+")");a+="\n in "+(b||"Unknown")+f}return a} | ||
var W={default:U},X=W&&U||W;module.exports=X.default||X; |
{ | ||
"name": "react-test-renderer", | ||
"version": "16.8.6", | ||
"version": "16.9.0-alpha.0", | ||
"description": "React package for snapshot testing.", | ||
@@ -24,4 +24,4 @@ "main": "index.js", | ||
"prop-types": "^15.6.2", | ||
"react-is": "^16.8.6", | ||
"scheduler": "^0.13.6" | ||
"react-is": "^16.9.0-alpha.0", | ||
"scheduler": "^0.14.0-alpha.0" | ||
}, | ||
@@ -28,0 +28,0 @@ "peerDependencies": { |
@@ -1,2 +0,2 @@ | ||
/** @license React v16.8.6 | ||
/** @license React v16.9.0-alpha.0 | ||
* react-test-renderer-shallow.development.js | ||
@@ -18,47 +18,16 @@ * | ||
/** | ||
* Use invariant() to assert state which your program assumes to be true. | ||
* | ||
* Provide sprintf-style format (only %s is supported) and arguments | ||
* to provide information about what broke and what you were | ||
* expecting. | ||
* | ||
* The invariant message will be stripped in production, but the invariant | ||
* will remain to ensure logic does not differ in production. | ||
*/ | ||
// Do not require this module directly! Use a normal error constructor with | ||
// template literal strings. The messages will be converted to ReactError during | ||
// build, and in production they will be minified. | ||
var validateFormat = function () {}; | ||
// Do not require this module directly! Use a normal error constructor with | ||
// template literal strings. The messages will be converted to ReactError during | ||
// build, and in production they will be minified. | ||
{ | ||
validateFormat = function (format) { | ||
if (format === undefined) { | ||
throw new Error('invariant requires an error message argument'); | ||
} | ||
}; | ||
function ReactError(message) { | ||
var error = new Error(message); | ||
error.name = 'Invariant Violation'; | ||
return error; | ||
} | ||
function invariant(condition, format, a, b, c, d, e, f) { | ||
validateFormat(format); | ||
if (!condition) { | ||
var error = void 0; | ||
if (format === undefined) { | ||
error = new Error('Minified exception occurred; use the non-minified dev environment ' + 'for the full error message and additional helpful warnings.'); | ||
} else { | ||
var args = [a, b, c, d, e, f]; | ||
var argIndex = 0; | ||
error = new Error(format.replace(/%s/g, function () { | ||
return args[argIndex++]; | ||
})); | ||
error.name = 'Invariant Violation'; | ||
} | ||
error.framesToPop = 1; // we don't care about invariant's own frame | ||
throw error; | ||
} | ||
} | ||
// Relying on the `invariant()` implementation lets us | ||
// preserve the format and params in the www builds. | ||
var ReactInternals = React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED; | ||
@@ -85,3 +54,8 @@ | ||
var REACT_LAZY_TYPE = hasSymbol ? Symbol.for('react.lazy') : 0xead4; | ||
var REACT_EVENT_COMPONENT_TYPE = hasSymbol ? Symbol.for('react.event_component') : 0xead5; | ||
var REACT_EVENT_TARGET_TYPE = hasSymbol ? Symbol.for('react.event_target') : 0xead6; | ||
// React event targets | ||
var REACT_EVENT_TARGET_TOUCH_HIT = hasSymbol ? Symbol.for('react.event_target.touch_hit') : 0xead7; | ||
/** | ||
@@ -309,3 +283,24 @@ * Forked from fbjs/warning: | ||
} | ||
break; | ||
} | ||
case REACT_EVENT_COMPONENT_TYPE: | ||
{ | ||
var eventComponent = type; | ||
var displayName = eventComponent.displayName; | ||
if (displayName !== undefined) { | ||
return displayName; | ||
} | ||
break; | ||
} | ||
case REACT_EVENT_TARGET_TYPE: | ||
{ | ||
var eventTarget = type; | ||
if (eventTarget.type === REACT_EVENT_TARGET_TOUCH_HIT) { | ||
return 'TouchHitTarget'; | ||
} | ||
var _displayName = eventTarget.displayName; | ||
if (_displayName !== undefined) { | ||
return _displayName; | ||
} | ||
} | ||
} | ||
@@ -359,2 +354,13 @@ } | ||
/** | ||
* Use invariant() to assert state which your program assumes to be true. | ||
* | ||
* Provide sprintf-style format (only %s is supported) and arguments | ||
* to provide information about what broke and what you were | ||
* expecting. | ||
* | ||
* The invariant message will be stripped in production, but the invariant | ||
* will remain to ensure logic does not differ in production. | ||
*/ | ||
/** | ||
* Copyright (c) 2013-present, Facebook, Inc. | ||
@@ -642,24 +648,32 @@ * | ||
ReactShallowRenderer.prototype._validateCurrentlyRenderingComponent = function _validateCurrentlyRenderingComponent() { | ||
!(this._rendering && !this._instance) ? invariant(false, 'Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for one of the following reasons:\n1. You might have mismatching versions of React and the renderer (such as React DOM)\n2. You might be breaking the Rules of Hooks\n3. You might have more than one copy of React in the same app\nSee https://fb.me/react-invalid-hook-call for tips about how to debug and fix this problem.') : void 0; | ||
var _this = this; | ||
(function () { | ||
if (!(_this._rendering && !_this._instance)) { | ||
{ | ||
throw ReactError('Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for one of the following reasons:\n1. You might have mismatching versions of React and the renderer (such as React DOM)\n2. You might be breaking the Rules of Hooks\n3. You might have more than one copy of React in the same app\nSee https://fb.me/react-invalid-hook-call for tips about how to debug and fix this problem.'); | ||
} | ||
} | ||
})(); | ||
}; | ||
ReactShallowRenderer.prototype._createDispatcher = function _createDispatcher() { | ||
var _this = this; | ||
var _this2 = this; | ||
var useReducer = function (reducer, initialArg, init) { | ||
_this._validateCurrentlyRenderingComponent(); | ||
_this._createWorkInProgressHook(); | ||
var workInProgressHook = _this._workInProgressHook; | ||
_this2._validateCurrentlyRenderingComponent(); | ||
_this2._createWorkInProgressHook(); | ||
var workInProgressHook = _this2._workInProgressHook; | ||
if (_this._isReRender) { | ||
if (_this2._isReRender) { | ||
// This is a re-render. | ||
var _queue = workInProgressHook.queue; | ||
var _dispatch = _queue.dispatch; | ||
if (_this._numberOfReRenders > 0) { | ||
if (_this2._numberOfReRenders > 0) { | ||
// Apply the new render phase updates to the previous current hook. | ||
if (_this._renderPhaseUpdates !== null) { | ||
if (_this2._renderPhaseUpdates !== null) { | ||
// Render phase updates are stored in a map of queue -> linked list | ||
var firstRenderPhaseUpdate = _this._renderPhaseUpdates.get(_queue); | ||
var firstRenderPhaseUpdate = _this2._renderPhaseUpdates.get(_queue); | ||
if (firstRenderPhaseUpdate !== undefined) { | ||
_this._renderPhaseUpdates.delete(_queue); | ||
_this2._renderPhaseUpdates.delete(_queue); | ||
var _newState = workInProgressHook.memoizedState; | ||
@@ -704,3 +718,3 @@ var _update = firstRenderPhaseUpdate; | ||
}; | ||
var _dispatch2 = _queue2.dispatch = _this._dispatchAction.bind(_this, _queue2); | ||
var _dispatch2 = _queue2.dispatch = _this2._dispatchAction.bind(_this2, _queue2); | ||
return [workInProgressHook.memoizedState, _dispatch2]; | ||
@@ -717,9 +731,9 @@ } | ||
var useMemo = function (nextCreate, deps) { | ||
_this._validateCurrentlyRenderingComponent(); | ||
_this._createWorkInProgressHook(); | ||
_this2._validateCurrentlyRenderingComponent(); | ||
_this2._createWorkInProgressHook(); | ||
var nextDeps = deps !== undefined ? deps : null; | ||
if (_this._workInProgressHook !== null && _this._workInProgressHook.memoizedState !== null) { | ||
var prevState = _this._workInProgressHook.memoizedState; | ||
if (_this2._workInProgressHook !== null && _this2._workInProgressHook.memoizedState !== null) { | ||
var prevState = _this2._workInProgressHook.memoizedState; | ||
var prevDeps = prevState[1]; | ||
@@ -734,3 +748,3 @@ if (nextDeps !== null) { | ||
var nextValue = nextCreate(); | ||
_this._workInProgressHook.memoizedState = [nextValue, nextDeps]; | ||
_this2._workInProgressHook.memoizedState = [nextValue, nextDeps]; | ||
return nextValue; | ||
@@ -740,5 +754,5 @@ }; | ||
var useRef = function (initialValue) { | ||
_this._validateCurrentlyRenderingComponent(); | ||
_this._createWorkInProgressHook(); | ||
var previousRef = _this._workInProgressHook.memoizedState; | ||
_this2._validateCurrentlyRenderingComponent(); | ||
_this2._createWorkInProgressHook(); | ||
var previousRef = _this2._workInProgressHook.memoizedState; | ||
if (previousRef === null) { | ||
@@ -749,3 +763,3 @@ var ref = { current: initialValue }; | ||
} | ||
_this._workInProgressHook.memoizedState = ref; | ||
_this2._workInProgressHook.memoizedState = ref; | ||
return ref; | ||
@@ -762,3 +776,3 @@ } else { | ||
var noOp = function () { | ||
_this._validateCurrentlyRenderingComponent(); | ||
_this2._validateCurrentlyRenderingComponent(); | ||
}; | ||
@@ -774,3 +788,3 @@ | ||
useContext: function (context) { | ||
_this._validateCurrentlyRenderingComponent(); | ||
_this2._validateCurrentlyRenderingComponent(); | ||
return readContext(context); | ||
@@ -790,4 +804,12 @@ }, | ||
ReactShallowRenderer.prototype._dispatchAction = function _dispatchAction(queue, action) { | ||
!(this._numberOfReRenders < RE_RENDER_LIMIT) ? invariant(false, 'Too many re-renders. React limits the number of renders to prevent an infinite loop.') : void 0; | ||
var _this3 = this; | ||
(function () { | ||
if (!(_this3._numberOfReRenders < RE_RENDER_LIMIT)) { | ||
{ | ||
throw ReactError('Too many re-renders. React limits the number of renders to prevent an infinite loop.'); | ||
} | ||
} | ||
})(); | ||
if (this._rendering) { | ||
@@ -895,7 +917,25 @@ // This is a render phase update. Stash it in a lazily-created map of | ||
!React.isValidElement(element) ? invariant(false, 'ReactShallowRenderer render(): Invalid component element.%s', typeof element === 'function' ? ' Instead of passing a component class, make sure to instantiate ' + 'it by passing it to React.createElement.' : '') : void 0; | ||
(function () { | ||
if (!React.isValidElement(element)) { | ||
{ | ||
throw ReactError('ReactShallowRenderer render(): Invalid component element.' + (typeof element === 'function' ? ' Instead of passing a component class, make sure to instantiate ' + 'it by passing it to React.createElement.' : '')); | ||
} | ||
} | ||
})(); | ||
element = element; | ||
// Show a special message for host elements since it's a common case. | ||
!(typeof element.type !== 'string') ? invariant(false, 'ReactShallowRenderer render(): Shallow rendering works only with custom components, not primitives (%s). Instead of calling `.render(el)` and inspecting the rendered output, look at `el.props` directly instead.', element.type) : void 0; | ||
!(isForwardRef(element) || typeof element.type === 'function' || isMemo(element.type)) ? invariant(false, 'ReactShallowRenderer render(): Shallow rendering works only with custom components, but the provided element type was `%s`.', Array.isArray(element.type) ? 'array' : element.type === null ? 'null' : typeof element.type) : void 0; | ||
(function () { | ||
if (!(typeof element.type !== 'string')) { | ||
{ | ||
throw ReactError('ReactShallowRenderer render(): Shallow rendering works only with custom components, not primitives (' + element.type + '). Instead of calling `.render(el)` and inspecting the rendered output, look at `el.props` directly instead.'); | ||
} | ||
} | ||
})(); | ||
(function () { | ||
if (!(isForwardRef(element) || typeof element.type === 'function' || isMemo(element.type))) { | ||
{ | ||
throw ReactError('ReactShallowRenderer render(): Shallow rendering works only with custom components, but the provided element type was `' + (Array.isArray(element.type) ? 'array' : element.type === null ? 'null' : typeof element.type) + '`.'); | ||
} | ||
} | ||
})(); | ||
@@ -958,3 +998,9 @@ if (this._rendering) { | ||
if (elementType.$$typeof === ForwardRef) { | ||
!(typeof elementType.render === 'function') ? invariant(false, 'forwardRef requires a render function but was given %s.', typeof elementType.render) : void 0; | ||
(function () { | ||
if (!(typeof elementType.render === 'function')) { | ||
{ | ||
throw ReactError('forwardRef requires a render function but was given ' + typeof elementType.render + '.'); | ||
} | ||
} | ||
})(); | ||
this._rendered = elementType.render.call(undefined, element.props, element.ref); | ||
@@ -961,0 +1007,0 @@ } else { |
@@ -1,2 +0,2 @@ | ||
/** @license React v16.8.6 | ||
/** @license React v16.9.0-alpha.0 | ||
* react-test-renderer-shallow.production.min.js | ||
@@ -9,24 +9,24 @@ * | ||
*/ | ||
'use strict';(function(l,p){"object"===typeof exports&&"undefined"!==typeof module?module.exports=p(require("react")):"function"===typeof define&&define.amd?define(["react"],p):l.ReactShallowRenderer=p(l.React)})(this,function(l){function p(a,b,d,c,g,k,h,f){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 e=[d,c,g,k,h,f],M=0;a=Error(b.replace(/%s/g,function(){return e[M++]})); | ||
a.name="Invariant Violation"}a.framesToPop=1;throw a;}}function m(a){for(var b=arguments.length-1,d="https://reactjs.org/docs/error-decoder.html?invariant="+a,c=0;c<b;c++)d+="&args[]="+encodeURIComponent(arguments[c+1]);p(!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. ",d)}function q(a){if("object"===typeof a&&null!==a){var b=a.$$typeof;switch(b){case N:switch(a=a.type,a){case O:case A:case B:case C:case D:case E:return a; | ||
default:switch(a=a&&a.$$typeof,a){case F:case r:case G:return a;default:return b}}case H:case n:case I:return b}}}function v(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 A:return"ConcurrentMode";case B:return"Fragment";case I:return"Portal";case C:return"Profiler";case D:return"StrictMode";case E:return"Suspense"}if("object"===typeof a)switch(a.$$typeof){case F:return"Context.Consumer";case G:return"Context.Provider"; | ||
case r:var b=a.render;b=b.displayName||b.name||"";return a.displayName||(""!==b?"ForwardRef("+b+")":"ForwardRef");case n:return v(a.type);case H:if(a=1===a._status?a._result:null)return v(a)}return null}function w(a,b){return a===b&&(0!==a||1/a===1/b)||a!==a&&b!==b}function x(a,b){if(w(a,b))return!0;if("object"!==typeof a||null===a||"object"!==typeof b||null===b)return!1;var d=Object.keys(a),c=Object.keys(b);if(d.length!==c.length)return!1;for(c=0;c<d.length;c++)if(!P.call(b,d[c])||!w(a[d[c]],b[d[c]]))return!1; | ||
return!0}function J(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function");}function K(){return{memoizedState:null,queue:null,next:null}}function L(a,b){return"function"===typeof b?b(a):b}var y=l.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.assign,e="function"===typeof Symbol&&Symbol.for,N=e?Symbol.for("react.element"):60103,I=e?Symbol.for("react.portal"):60106,B=e?Symbol.for("react.fragment"):60107,D=e?Symbol.for("react.strict_mode"):60108,C=e?Symbol.for("react.profiler"): | ||
60114,G=e?Symbol.for("react.provider"):60109,F=e?Symbol.for("react.context"):60110,O=e?Symbol.for("react.async_mode"):60111,A=e?Symbol.for("react.concurrent_mode"):60111,r=e?Symbol.for("react.forward_ref"):60112,E=e?Symbol.for("react.suspense"):60113,n=e?Symbol.for("react.memo"):60115,H=e?Symbol.for("react.lazy"):60116,Q=r,P=Object.prototype.hasOwnProperty;e=l.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;e.hasOwnProperty("ReactCurrentDispatcher")||(e.ReactCurrentDispatcher={current:null});var z= | ||
e.ReactCurrentDispatcher,t={},R=function(){function a(b){J(this,a);this._renderer=b;this._callbacks=[]}a.prototype._enqueueCallback=function(b,a){"function"===typeof b&&a&&this._callbacks.push({callback:b,publicInstance:a})};a.prototype._invokeCallbacks=function(){var b=this._callbacks;this._callbacks=[];b.forEach(function(b){b.callback.call(b.publicInstance)})};a.prototype.isMounted=function(b){return!!this._renderer._element};a.prototype.enqueueForceUpdate=function(b,a,c){this._enqueueCallback(a, | ||
b);this._renderer._forcedUpdate=!0;this._renderer.render(this._renderer._element,this._renderer._context)};a.prototype.enqueueReplaceState=function(b,a,c,g){this._enqueueCallback(c,b);this._renderer._newState=a;this._renderer.render(this._renderer._element,this._renderer._context)};a.prototype.enqueueSetState=function(b,a,c,g){this._enqueueCallback(c,b);c=this._renderer._newState||b.state;"function"===typeof a&&(a=a.call(b,c,b.props));null!==a&&void 0!==a&&(this._renderer._newState=y({},c,a),this._renderer.render(this._renderer._element, | ||
this._renderer._context))};return a}(),u=function(){function a(){J(this,a);this._reset()}a.prototype._reset=function(){this._rendered=this._newState=this._instance=this._element=this._context=null;this._forcedUpdate=this._rendering=!1;this._updater=new R(this);this._dispatcher=this._createDispatcher();this._firstWorkInProgressHook=this._workInProgressHook=null;this._didScheduleRenderPhaseUpdate=this._isReRender=!1;this._renderPhaseUpdates=null;this._numberOfReRenders=0};a.prototype._validateCurrentlyRenderingComponent= | ||
function(){!this._rendering||this._instance?m("321"):void 0};a.prototype._createDispatcher=function(){var b=this,a=function(a,c,d){b._validateCurrentlyRenderingComponent();b._createWorkInProgressHook();var f=b._workInProgressHook;if(b._isReRender){d=f.queue;c=d.dispatch;if(0<b._numberOfReRenders){if(null!==b._renderPhaseUpdates){var g=b._renderPhaseUpdates.get(d);if(void 0!==g){b._renderPhaseUpdates.delete(d);d=f.memoizedState;do d=a(d,g.action),g=g.next;while(null!==g);f.memoizedState=d;return[d, | ||
c]}}return[f.memoizedState,c]}g=f.memoizedState;var k=d.first;if(null!==k){do g=a(g,k.action),k=k.next;while(null!==k);d.first=null;f.memoizedState=g}return[g,c]}a=a===L?"function"===typeof c?c():c:void 0!==d?d(c):c;f.memoizedState=a;a=f.queue={first:null,dispatch:null};a=a.dispatch=b._dispatchAction.bind(b,a);return[f.memoizedState,a]},c=function(){b._validateCurrentlyRenderingComponent()};return{readContext:function(b,a){return b._currentValue},useCallback:function(b){return b},useContext:function(a){b._validateCurrentlyRenderingComponent(); | ||
return a._currentValue},useDebugValue:c,useEffect:c,useImperativeHandle:c,useLayoutEffect:c,useMemo:function(a,c){b._validateCurrentlyRenderingComponent();b._createWorkInProgressHook();c=void 0!==c?c:null;if(null!==b._workInProgressHook&&null!==b._workInProgressHook.memoizedState){var d=b._workInProgressHook.memoizedState,f=d[1];if(null!==c){a:if(null===f)f=!1;else{for(var g=0;g<f.length&&g<c.length;g++)if(!w(c[g],f[g])){f=!1;break a}f=!0}if(f)return d[0]}}a=a();b._workInProgressHook.memoizedState= | ||
[a,c];return a},useReducer:a,useRef:function(a){b._validateCurrentlyRenderingComponent();b._createWorkInProgressHook();var c=b._workInProgressHook.memoizedState;return null===c?(a={current:a},b._workInProgressHook.memoizedState=a):c},useState:function(b){return a(L,b)}}};a.prototype._dispatchAction=function(b,a){25>this._numberOfReRenders?void 0:m("301");if(this._rendering){this._didScheduleRenderPhaseUpdate=!0;a={action:a,next:null};var c=this._renderPhaseUpdates;null===c&&(this._renderPhaseUpdates= | ||
c=new Map);var d=c.get(b);if(void 0===d)c.set(b,a);else{for(b=d;null!==b.next;)b=b.next;b.next=a}}else{a={action:a,next:null};c=b.first;if(null===c)b.first=a;else{for(;null!==c.next;)c=c.next;c.next=a}this.render(this._element,this._context)}};a.prototype._createWorkInProgressHook=function(){null===this._workInProgressHook?null===this._firstWorkInProgressHook?(this._isReRender=!1,this._firstWorkInProgressHook=this._workInProgressHook=K()):(this._isReRender=!0,this._workInProgressHook=this._firstWorkInProgressHook): | ||
null===this._workInProgressHook.next?(this._isReRender=!1,this._workInProgressHook=this._workInProgressHook.next=K()):(this._isReRender=!0,this._workInProgressHook=this._workInProgressHook.next);return this._workInProgressHook};a.prototype._finishHooks=function(b,a){this._didScheduleRenderPhaseUpdate?(this._didScheduleRenderPhaseUpdate=!1,this._numberOfReRenders+=1,this._workInProgressHook=null,this._rendering=!1,this.render(b,a)):(this._renderPhaseUpdates=this._workInProgressHook=null,this._numberOfReRenders= | ||
0)};a.prototype.getMountedInstance=function(){return this._instance};a.prototype.getRenderOutput=function(){return this._rendered};a.prototype.render=function(a){var b=1<arguments.length&&void 0!==arguments[1]?arguments[1]:t;l.isValidElement(a)?void 0:m("12","function"===typeof a?" Instead of passing a component class, make sure to instantiate it by passing it to React.createElement.":"");"string"===typeof a.type?m("13",a.type):void 0;q(a)!==r&&"function"!==typeof a.type&&q(a.type)!==n?m("249",Array.isArray(a.type)? | ||
"array":null===a.type?"null":typeof a.type):void 0;if(!this._rendering){null!=this._element&&this._element.type!==a.type&&this._reset();var c=q(a.type)===n?a.type.type:a.type,g=this._element;this._rendering=!0;this._element=a;var e;if((e=c.contextTypes)&&b){var h={},f;for(f in e)h[f]=b[f];e=h}else e=t;this._context=e;q(a.type)===n&&c.propTypes&&v(c);if(this._instance)this._updateClassComponent(c,a,this._context);else if(c.prototype&&c.prototype.isReactComponent)this._instance=new c(a.props,this._context, | ||
this._updater),"function"===typeof c.getDerivedStateFromProps&&(b=c.getDerivedStateFromProps.call(null,a.props,this._instance.state),null!=b&&(this._instance.state=y({},this._instance.state,b))),this._mountClassComponent(c,a,this._context);else if(e=!0,q(a.type)===n&&null!==g&&(a.type.compare||x)(g.props,a.props)&&(e=!1),e){g=z.current;z.current=this._dispatcher;try{c.$$typeof===Q?("function"!==typeof c.render?m("322",typeof c.render):void 0,this._rendered=c.render.call(void 0,a.props,a.ref)):this._rendered= | ||
c(a.props,this._context)}finally{z.current=g}this._finishHooks(a,b)}this._rendering=!1;this._updater._invokeCallbacks();return this.getRenderOutput()}};a.prototype.unmount=function(){this._instance&&"function"===typeof this._instance.componentWillUnmount&&this._instance.componentWillUnmount();this._reset()};a.prototype._mountClassComponent=function(a,d,c){this._instance.context=c;this._instance.props=d.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)d=this._newState,"function"!==typeof a.getDerivedStateFromProps&&"function"!==typeof this._instance.getSnapshotBeforeUpdate&&("function"===typeof this._instance.componentWillMount&&this._instance.componentWillMount(),"function"===typeof this._instance.UNSAFE_componentWillMount&&this._instance.UNSAFE_componentWillMount()),d!==this._newState&&(this._instance.state=this._newState||t);this._rendered= | ||
this._instance.render()};a.prototype._updateClassComponent=function(a,d,c){d=d.props;var b=this._instance.state||t,e=this._instance.props;e!==d&&"function"!==typeof a.getDerivedStateFromProps&&"function"!==typeof this._instance.getSnapshotBeforeUpdate&&("function"===typeof this._instance.componentWillReceiveProps&&this._instance.componentWillReceiveProps(d,c),"function"===typeof this._instance.UNSAFE_componentWillReceiveProps&&this._instance.UNSAFE_componentWillReceiveProps(d,c));var h=this._newState|| | ||
b;if("function"===typeof a.getDerivedStateFromProps){var f=a.getDerivedStateFromProps.call(null,d,h);null!=f&&(h=y({},h,f))}f=!0;this._forcedUpdate?(f=!0,this._forcedUpdate=!1):"function"===typeof this._instance.shouldComponentUpdate?f=!!this._instance.shouldComponentUpdate(d,h,c):a.prototype&&a.prototype.isPureReactComponent&&(f=!x(e,d)||!x(b,h));f&&"function"!==typeof a.getDerivedStateFromProps&&"function"!==typeof this._instance.getSnapshotBeforeUpdate&&("function"===typeof this._instance.componentWillUpdate&& | ||
this._instance.componentWillUpdate(d,h,c),"function"===typeof this._instance.UNSAFE_componentWillUpdate&&this._instance.UNSAFE_componentWillUpdate(d,h,c));this._instance.context=c;this._instance.props=d;this._instance.state=h;this._newState=null;f&&(this._rendered=this._instance.render())};return a}();u.createRenderer=function(){return new u};e=(e={default:u},u)||e;return e.default||e}); | ||
'use strict';(function(m,k){"object"===typeof exports&&"undefined"!==typeof module?module.exports=k(require("react")):"function"===typeof define&&define.amd?define(["react"],k):m.ReactShallowRenderer=k(m.React)})(this,function(m){function k(a){for(var b="https://reactjs.org/docs/error-decoder.html?invariant="+a,d=1;d<arguments.length;d++)b+="&args[]="+encodeURIComponent(arguments[d]);return Error("Minified React error #"+a+"; visit "+b+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings. ")} | ||
function p(a){if("object"===typeof a&&null!==a){var b=a.$$typeof;switch(b){case L:switch(a=a.type,a){case M:case z:case A:case B:case C:case D:return a;default:switch(a=a&&a.$$typeof,a){case E:case q:case F:return a;default:return b}}case G:case n:case H:return b}}}function u(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 z:return"ConcurrentMode";case A:return"Fragment";case H:return"Portal";case B:return"Profiler"; | ||
case C:return"StrictMode";case D:return"Suspense"}if("object"===typeof a)switch(a.$$typeof){case E:return"Context.Consumer";case F:return"Context.Provider";case q:var b=a.render;b=b.displayName||b.name||"";return a.displayName||(""!==b?"ForwardRef("+b+")":"ForwardRef");case n:return u(a.type);case G:if(a=1===a._status?a._result:null)return u(a);break;case N:a=a.displayName;if(void 0!==a)return a;break;case O:if(a.type===P)return"TouchHitTarget";a=a.displayName;if(void 0!==a)return a}return null}function v(a, | ||
b){return a===b&&(0!==a||1/a===1/b)||a!==a&&b!==b}function w(a,b){if(v(a,b))return!0;if("object"!==typeof a||null===a||"object"!==typeof b||null===b)return!1;var d=Object.keys(a),c=Object.keys(b);if(d.length!==c.length)return!1;for(c=0;c<d.length;c++)if(!Q.call(b,d[c])||!v(a[d[c]],b[d[c]]))return!1;return!0}function I(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function");}function J(){return{memoizedState:null,queue:null,next:null}}function K(a,b){return"function"===typeof b? | ||
b(a):b}var x=m.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.assign,e="function"===typeof Symbol&&Symbol.for,L=e?Symbol.for("react.element"):60103,H=e?Symbol.for("react.portal"):60106,A=e?Symbol.for("react.fragment"):60107,C=e?Symbol.for("react.strict_mode"):60108,B=e?Symbol.for("react.profiler"):60114,F=e?Symbol.for("react.provider"):60109,E=e?Symbol.for("react.context"):60110,M=e?Symbol.for("react.async_mode"):60111,z=e?Symbol.for("react.concurrent_mode"):60111,q=e?Symbol.for("react.forward_ref"): | ||
60112,D=e?Symbol.for("react.suspense"):60113,n=e?Symbol.for("react.memo"):60115,G=e?Symbol.for("react.lazy"):60116,N=e?Symbol.for("react.event_component"):60117,O=e?Symbol.for("react.event_target"):60118,P=e?Symbol.for("react.event_target.touch_hit"):60119,R=q,Q=Object.prototype.hasOwnProperty;e=m.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;e.hasOwnProperty("ReactCurrentDispatcher")||(e.ReactCurrentDispatcher={current:null});var y=e.ReactCurrentDispatcher,r={},S=function(){function a(b){I(this, | ||
a);this._renderer=b;this._callbacks=[]}a.prototype._enqueueCallback=function(b,a){"function"===typeof b&&a&&this._callbacks.push({callback:b,publicInstance:a})};a.prototype._invokeCallbacks=function(){var b=this._callbacks;this._callbacks=[];b.forEach(function(b){b.callback.call(b.publicInstance)})};a.prototype.isMounted=function(b){return!!this._renderer._element};a.prototype.enqueueForceUpdate=function(b,a,c){this._enqueueCallback(a,b);this._renderer._forcedUpdate=!0;this._renderer.render(this._renderer._element, | ||
this._renderer._context)};a.prototype.enqueueReplaceState=function(b,a,c,g){this._enqueueCallback(c,b);this._renderer._newState=a;this._renderer.render(this._renderer._element,this._renderer._context)};a.prototype.enqueueSetState=function(b,a,c,g){this._enqueueCallback(c,b);c=this._renderer._newState||b.state;"function"===typeof a&&(a=a.call(b,c,b.props));null!==a&&void 0!==a&&(this._renderer._newState=x({},c,a),this._renderer.render(this._renderer._element,this._renderer._context))};return a}(), | ||
t=function(){function a(){I(this,a);this._reset()}a.prototype._reset=function(){this._rendered=this._newState=this._instance=this._element=this._context=null;this._forcedUpdate=this._rendering=!1;this._updater=new S(this);this._dispatcher=this._createDispatcher();this._firstWorkInProgressHook=this._workInProgressHook=null;this._didScheduleRenderPhaseUpdate=this._isReRender=!1;this._renderPhaseUpdates=null;this._numberOfReRenders=0};a.prototype._validateCurrentlyRenderingComponent=function(){if(!this._rendering|| | ||
this._instance)throw k(321);};a.prototype._createDispatcher=function(){var b=this,a=function(a,c,d){b._validateCurrentlyRenderingComponent();b._createWorkInProgressHook();var f=b._workInProgressHook;if(b._isReRender){d=f.queue;c=d.dispatch;if(0<b._numberOfReRenders){if(null!==b._renderPhaseUpdates){var g=b._renderPhaseUpdates.get(d);if(void 0!==g){b._renderPhaseUpdates.delete(d);d=f.memoizedState;do d=a(d,g.action),g=g.next;while(null!==g);f.memoizedState=d;return[d,c]}}return[f.memoizedState,c]}g= | ||
f.memoizedState;var e=d.first;if(null!==e){do g=a(g,e.action),e=e.next;while(null!==e);d.first=null;f.memoizedState=g}return[g,c]}a=a===K?"function"===typeof c?c():c:void 0!==d?d(c):c;f.memoizedState=a;a=f.queue={first:null,dispatch:null};a=a.dispatch=b._dispatchAction.bind(b,a);return[f.memoizedState,a]},c=function(){b._validateCurrentlyRenderingComponent()};return{readContext:function(b,a){return b._currentValue},useCallback:function(b){return b},useContext:function(a){b._validateCurrentlyRenderingComponent(); | ||
return a._currentValue},useDebugValue:c,useEffect:c,useImperativeHandle:c,useLayoutEffect:c,useMemo:function(a,c){b._validateCurrentlyRenderingComponent();b._createWorkInProgressHook();c=void 0!==c?c:null;if(null!==b._workInProgressHook&&null!==b._workInProgressHook.memoizedState){var d=b._workInProgressHook.memoizedState,e=d[1];if(null!==c){a:if(null===e)e=!1;else{for(var g=0;g<e.length&&g<c.length;g++)if(!v(c[g],e[g])){e=!1;break a}e=!0}if(e)return d[0]}}a=a();b._workInProgressHook.memoizedState= | ||
[a,c];return a},useReducer:a,useRef:function(a){b._validateCurrentlyRenderingComponent();b._createWorkInProgressHook();var c=b._workInProgressHook.memoizedState;return null===c?(a={current:a},b._workInProgressHook.memoizedState=a):c},useState:function(b){return a(K,b)}}};a.prototype._dispatchAction=function(b,a){if(!(25>this._numberOfReRenders))throw k(301);if(this._rendering){this._didScheduleRenderPhaseUpdate=!0;a={action:a,next:null};var c=this._renderPhaseUpdates;null===c&&(this._renderPhaseUpdates= | ||
c=new Map);var d=c.get(b);if(void 0===d)c.set(b,a);else{for(b=d;null!==b.next;)b=b.next;b.next=a}}else{a={action:a,next:null};c=b.first;if(null===c)b.first=a;else{for(;null!==c.next;)c=c.next;c.next=a}this.render(this._element,this._context)}};a.prototype._createWorkInProgressHook=function(){null===this._workInProgressHook?null===this._firstWorkInProgressHook?(this._isReRender=!1,this._firstWorkInProgressHook=this._workInProgressHook=J()):(this._isReRender=!0,this._workInProgressHook=this._firstWorkInProgressHook): | ||
null===this._workInProgressHook.next?(this._isReRender=!1,this._workInProgressHook=this._workInProgressHook.next=J()):(this._isReRender=!0,this._workInProgressHook=this._workInProgressHook.next);return this._workInProgressHook};a.prototype._finishHooks=function(a,d){this._didScheduleRenderPhaseUpdate?(this._didScheduleRenderPhaseUpdate=!1,this._numberOfReRenders+=1,this._workInProgressHook=null,this._rendering=!1,this.render(a,d)):(this._renderPhaseUpdates=this._workInProgressHook=null,this._numberOfReRenders= | ||
0)};a.prototype.getMountedInstance=function(){return this._instance};a.prototype.getRenderOutput=function(){return this._rendered};a.prototype.render=function(a){var b=1<arguments.length&&void 0!==arguments[1]?arguments[1]:r;if(!m.isValidElement(a))throw k(12,"function"===typeof a?" Instead of passing a component class, make sure to instantiate it by passing it to React.createElement.":"");if("string"===typeof a.type)throw k(13,a.type);if(p(a)!==q&&"function"!==typeof a.type&&p(a.type)!==n)throw k(249, | ||
Array.isArray(a.type)?"array":null===a.type?"null":typeof a.type);if(!this._rendering){null!=this._element&&this._element.type!==a.type&&this._reset();var c=p(a.type)===n?a.type.type:a.type,e=this._element;this._rendering=!0;this._element=a;var l;if((l=c.contextTypes)&&b){var h={},f;for(f in l)h[f]=b[f];l=h}else l=r;this._context=l;p(a.type)===n&&c.propTypes&&u(c);if(this._instance)this._updateClassComponent(c,a,this._context);else if(c.prototype&&c.prototype.isReactComponent)this._instance=new c(a.props, | ||
this._context,this._updater),"function"===typeof c.getDerivedStateFromProps&&(b=c.getDerivedStateFromProps.call(null,a.props,this._instance.state),null!=b&&(this._instance.state=x({},this._instance.state,b))),this._mountClassComponent(c,a,this._context);else if(l=!0,p(a.type)===n&&null!==e&&(a.type.compare||w)(e.props,a.props)&&(l=!1),l){e=y.current;y.current=this._dispatcher;try{if(c.$$typeof===R){if("function"!==typeof c.render)throw k(322,typeof c.render);this._rendered=c.render.call(void 0,a.props, | ||
a.ref)}else this._rendered=c(a.props,this._context)}finally{y.current=e}this._finishHooks(a,b)}this._rendering=!1;this._updater._invokeCallbacks();return this.getRenderOutput()}};a.prototype.unmount=function(){this._instance&&"function"===typeof this._instance.componentWillUnmount&&this._instance.componentWillUnmount();this._reset()};a.prototype._mountClassComponent=function(a,d,c){this._instance.context=c;this._instance.props=d.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)d=this._newState,"function"!==typeof a.getDerivedStateFromProps&&"function"!==typeof this._instance.getSnapshotBeforeUpdate&&("function"===typeof this._instance.componentWillMount&&this._instance.componentWillMount(),"function"===typeof this._instance.UNSAFE_componentWillMount&&this._instance.UNSAFE_componentWillMount()),d!==this._newState&&(this._instance.state=this._newState|| | ||
r);this._rendered=this._instance.render()};a.prototype._updateClassComponent=function(a,d,c){d=d.props;var b=this._instance.state||r,e=this._instance.props;e!==d&&"function"!==typeof a.getDerivedStateFromProps&&"function"!==typeof this._instance.getSnapshotBeforeUpdate&&("function"===typeof this._instance.componentWillReceiveProps&&this._instance.componentWillReceiveProps(d,c),"function"===typeof this._instance.UNSAFE_componentWillReceiveProps&&this._instance.UNSAFE_componentWillReceiveProps(d,c)); | ||
var h=this._newState||b;if("function"===typeof a.getDerivedStateFromProps){var f=a.getDerivedStateFromProps.call(null,d,h);null!=f&&(h=x({},h,f))}f=!0;this._forcedUpdate?(f=!0,this._forcedUpdate=!1):"function"===typeof this._instance.shouldComponentUpdate?f=!!this._instance.shouldComponentUpdate(d,h,c):a.prototype&&a.prototype.isPureReactComponent&&(f=!w(e,d)||!w(b,h));f&&"function"!==typeof a.getDerivedStateFromProps&&"function"!==typeof this._instance.getSnapshotBeforeUpdate&&("function"===typeof this._instance.componentWillUpdate&& | ||
this._instance.componentWillUpdate(d,h,c),"function"===typeof this._instance.UNSAFE_componentWillUpdate&&this._instance.UNSAFE_componentWillUpdate(d,h,c));this._instance.context=c;this._instance.props=d;this._instance.state=h;this._newState=null;f&&(this._rendered=this._instance.render())};return a}();t.createRenderer=function(){return new t};e=(e={default:t},t)||e;return e.default||e}); |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
1419048
31443
5
+ Addedscheduler@0.14.0(transitive)
- Removedscheduler@0.13.6(transitive)
Updatedreact-is@^16.9.0-alpha.0
Updatedscheduler@^0.14.0-alpha.0