react-dom 16.9.0 → 16.10.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.
- package/build-info.json +4 -4
- package/cjs/react-dom-server.browser.development.js +815 -470
- package/cjs/react-dom-server.browser.production.min.js +46 -46
- package/cjs/react-dom-server.node.development.js +827 -483
- package/cjs/react-dom-server.node.production.min.js +47 -47
- package/cjs/react-dom-test-utils.development.js +302 -177
- package/cjs/react-dom-test-utils.production.min.js +17 -18
- package/cjs/react-dom-unstable-fizz.browser.development.js +20 -17
- package/cjs/react-dom-unstable-fizz.browser.production.min.js +2 -2
- package/cjs/react-dom-unstable-fizz.node.development.js +20 -13
- package/cjs/react-dom-unstable-fizz.node.production.min.js +1 -1
- package/cjs/react-dom-unstable-native-dependencies.development.js +166 -101
- package/cjs/react-dom-unstable-native-dependencies.production.min.js +27 -27
- package/cjs/react-dom.development.js +19212 -16498
- package/cjs/react-dom.production.min.js +281 -266
- package/cjs/react-dom.profiling.min.js +287 -275
- package/package.json +2 -2
- package/umd/react-dom-server.browser.development.js +828 -473
- package/umd/react-dom-server.browser.production.min.js +38 -38
- package/umd/react-dom-test-utils.development.js +302 -179
- package/umd/react-dom-test-utils.production.min.js +23 -23
- package/umd/react-dom-unstable-fizz.browser.development.js +20 -17
- package/umd/react-dom-unstable-fizz.browser.production.min.js +2 -2
- package/umd/react-dom-unstable-native-dependencies.development.js +166 -102
- package/umd/react-dom-unstable-native-dependencies.production.min.js +22 -22
- package/umd/react-dom.development.js +19438 -16716
- package/umd/react-dom.production.min.js +234 -221
- package/umd/react-dom.profiling.min.js +241 -228
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/** @license React v16.
|
|
1
|
+
/** @license React v16.10.0
|
|
2
2
|
* react-dom-unstable-native-dependencies.production.min.js
|
|
3
3
|
*
|
|
4
4
|
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
@@ -7,29 +7,29 @@
|
|
|
7
7
|
* LICENSE file in the root directory of this source tree.
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
|
-
'use strict';var
|
|
11
|
-
function r(a){var b=a._dispatchListeners,c=a._dispatchInstances;if(Array.isArray(b))throw
|
|
12
|
-
function v(a,b){if(null==b)throw
|
|
13
|
-
function x(a,b){var c=a.stateNode;if(!c)return null;var
|
|
14
|
-
return c}function y(a,b,c){if(b=x(a,c.dispatchConfig.phasedRegistrationNames[b]))c._dispatchListeners=v(c._dispatchListeners,b),c._dispatchInstances=v(c._dispatchInstances,a)}function
|
|
15
|
-
function z(a){if(a&&a.dispatchConfig.registrationName){var b=a._targetInst;if(b&&a&&a.dispatchConfig.registrationName){var c=x(b,a.dispatchConfig.registrationName);c&&(a._dispatchListeners=v(a._dispatchListeners,c),a._dispatchInstances=v(a._dispatchInstances,b))}}}function
|
|
16
|
-
function
|
|
17
|
-
|
|
18
|
-
null;this.nativeEvent=this._targetInst=this.dispatchConfig=null;this.isPropagationStopped=this.isDefaultPrevented=
|
|
19
|
-
|
|
20
|
-
function
|
|
21
|
-
var
|
|
22
|
-
function
|
|
23
|
-
function
|
|
24
|
-
function
|
|
25
|
-
function R(){var a=JSON.stringify(
|
|
26
|
-
var S={recordTouchTrack:function(a,b){if(
|
|
27
|
-
function T(a,b){if(null==b)throw
|
|
28
|
-
var Y={startShouldSetResponder:{phasedRegistrationNames:{bubbled:"onStartShouldSetResponder",captured:"onStartShouldSetResponderCapture"},dependencies:
|
|
29
|
-
moveShouldSetResponder:{phasedRegistrationNames:{bubbled:"onMoveShouldSetResponder",captured:"onMoveShouldSetResponderCapture"},dependencies:
|
|
30
|
-
responderGrant:{registrationName:"onResponderGrant",dependencies:[]},responderReject:{registrationName:"onResponderReject",dependencies:[]},responderTerminate:{registrationName:"onResponderTerminate",dependencies:[]}},X={_getResponder:function(){return U},eventTypes:Y,extractEvents:function(a,b,c,
|
|
31
|
-
0<V&&"selectionchange"===a||
|
|
32
|
-
if(Array.isArray(
|
|
33
|
-
|
|
34
|
-
null!==
|
|
35
|
-
module.exports={ResponderEventPlugin:X,ResponderTouchHistoryStore:S,injectEventPluginsByName:
|
|
10
|
+
'use strict';var aa=require("react-dom"),h=require("object-assign");function k(a){for(var b=a.message,c="https://reactjs.org/docs/error-decoder.html?invariant="+b,d=1;d<arguments.length;d++)c+="&args[]="+encodeURIComponent(arguments[d]);a.message="Minified React error #"+b+"; visit "+c+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings. ";return a}var l=null,n=null,p=null;
|
|
11
|
+
function r(a){var b=a._dispatchListeners,c=a._dispatchInstances;if(Array.isArray(b))throw k(Error(103));a.currentTarget=b?p(c):null;b=b?b(a):null;a.currentTarget=null;a._dispatchListeners=null;a._dispatchInstances=null;return b}function t(a){do a=a.return;while(a&&5!==a.tag);return a?a:null}function u(a,b,c){for(var d=[];a;)d.push(a),a=t(a);for(a=d.length;0<a--;)b(d[a],"captured",c);for(a=0;a<d.length;a++)b(d[a],"bubbled",c)}
|
|
12
|
+
function v(a,b){if(null==b)throw k(Error(30));if(null==a)return b;if(Array.isArray(a)){if(Array.isArray(b))return a.push.apply(a,b),a;a.push(b);return a}return Array.isArray(b)?[a].concat(b):[a,b]}function w(a,b,c){Array.isArray(a)?a.forEach(b,c):a&&b.call(c,a)}
|
|
13
|
+
function x(a,b){var c=a.stateNode;if(!c)return null;var d=l(c);if(!d)return null;c=d[b];a:switch(b){case "onClick":case "onClickCapture":case "onDoubleClick":case "onDoubleClickCapture":case "onMouseDown":case "onMouseDownCapture":case "onMouseMove":case "onMouseMoveCapture":case "onMouseUp":case "onMouseUpCapture":(d=!d.disabled)||(a=a.type,d=!("button"===a||"input"===a||"select"===a||"textarea"===a));a=!d;break a;default:a=!1}if(a)return null;if(c&&"function"!==typeof c)throw k(Error(231),b,typeof c);
|
|
14
|
+
return c}function y(a,b,c){if(b=x(a,c.dispatchConfig.phasedRegistrationNames[b]))c._dispatchListeners=v(c._dispatchListeners,b),c._dispatchInstances=v(c._dispatchInstances,a)}function ba(a){a&&a.dispatchConfig.phasedRegistrationNames&&u(a._targetInst,y,a)}function ca(a){if(a&&a.dispatchConfig.phasedRegistrationNames){var b=a._targetInst;b=b?t(b):null;u(b,y,a)}}
|
|
15
|
+
function z(a){if(a&&a.dispatchConfig.registrationName){var b=a._targetInst;if(b&&a&&a.dispatchConfig.registrationName){var c=x(b,a.dispatchConfig.registrationName);c&&(a._dispatchListeners=v(a._dispatchListeners,c),a._dispatchInstances=v(a._dispatchInstances,b))}}}function A(){return!0}function B(){return!1}
|
|
16
|
+
function C(a,b,c,d){this.dispatchConfig=a;this._targetInst=b;this.nativeEvent=c;a=this.constructor.Interface;for(var g in a)a.hasOwnProperty(g)&&((b=a[g])?this[g]=b(c):"target"===g?this.target=d:this[g]=c[g]);this.isDefaultPrevented=(null!=c.defaultPrevented?c.defaultPrevented:!1===c.returnValue)?A:B;this.isPropagationStopped=B;return this}
|
|
17
|
+
h(C.prototype,{preventDefault:function(){this.defaultPrevented=!0;var a=this.nativeEvent;a&&(a.preventDefault?a.preventDefault():"unknown"!==typeof a.returnValue&&(a.returnValue=!1),this.isDefaultPrevented=A)},stopPropagation:function(){var a=this.nativeEvent;a&&(a.stopPropagation?a.stopPropagation():"unknown"!==typeof a.cancelBubble&&(a.cancelBubble=!0),this.isPropagationStopped=A)},persist:function(){this.isPersistent=A},isPersistent:B,destructor:function(){var a=this.constructor.Interface,b;for(b in a)this[b]=
|
|
18
|
+
null;this.nativeEvent=this._targetInst=this.dispatchConfig=null;this.isPropagationStopped=this.isDefaultPrevented=B;this._dispatchInstances=this._dispatchListeners=null}});C.Interface={type:null,target:null,currentTarget:function(){return null},eventPhase:null,bubbles:null,cancelable:null,timeStamp:function(a){return a.timeStamp||Date.now()},defaultPrevented:null,isTrusted:null};
|
|
19
|
+
C.extend=function(a){function b(){}function c(){return d.apply(this,arguments)}var d=this;b.prototype=d.prototype;var g=new b;h(g,c.prototype);c.prototype=g;c.prototype.constructor=c;c.Interface=h({},d.Interface,a);c.extend=d.extend;D(c);return c};D(C);function da(a,b,c,d){if(this.eventPool.length){var g=this.eventPool.pop();this.call(g,a,b,c,d);return g}return new this(a,b,c,d)}
|
|
20
|
+
function ea(a){if(!(a instanceof this))throw k(Error(279));a.destructor();10>this.eventPool.length&&this.eventPool.push(a)}function D(a){a.eventPool=[];a.getPooled=da;a.release=ea}var E=C.extend({touchHistory:function(){return null}});function F(a){return"touchstart"===a||"mousedown"===a}function G(a){return"touchmove"===a||"mousemove"===a}function H(a){return"touchend"===a||"touchcancel"===a||"mouseup"===a}
|
|
21
|
+
var I=["touchstart","mousedown"],J=["touchmove","mousemove"],K=["touchcancel","touchend","mouseup"],L=[],N={touchBank:L,numberActiveTouches:0,indexOfSingleActiveTouch:-1,mostRecentTimeStamp:0};function O(a){return a.timeStamp||a.timestamp}function P(a){a=a.identifier;if(null==a)throw k(Error(138));return a}
|
|
22
|
+
function fa(a){var b=P(a),c=L[b];c?(c.touchActive=!0,c.startPageX=a.pageX,c.startPageY=a.pageY,c.startTimeStamp=O(a),c.currentPageX=a.pageX,c.currentPageY=a.pageY,c.currentTimeStamp=O(a),c.previousPageX=a.pageX,c.previousPageY=a.pageY,c.previousTimeStamp=O(a)):(c={touchActive:!0,startPageX:a.pageX,startPageY:a.pageY,startTimeStamp:O(a),currentPageX:a.pageX,currentPageY:a.pageY,currentTimeStamp:O(a),previousPageX:a.pageX,previousPageY:a.pageY,previousTimeStamp:O(a)},L[b]=c);N.mostRecentTimeStamp=O(a)}
|
|
23
|
+
function ha(a){var b=L[P(a)];b?(b.touchActive=!0,b.previousPageX=b.currentPageX,b.previousPageY=b.currentPageY,b.previousTimeStamp=b.currentTimeStamp,b.currentPageX=a.pageX,b.currentPageY=a.pageY,b.currentTimeStamp=O(a),N.mostRecentTimeStamp=O(a)):console.warn("Cannot record touch move without a touch start.\nTouch Move: %s\n","Touch Bank: %s",Q(a),R())}
|
|
24
|
+
function ia(a){var b=L[P(a)];b?(b.touchActive=!1,b.previousPageX=b.currentPageX,b.previousPageY=b.currentPageY,b.previousTimeStamp=b.currentTimeStamp,b.currentPageX=a.pageX,b.currentPageY=a.pageY,b.currentTimeStamp=O(a),N.mostRecentTimeStamp=O(a)):console.warn("Cannot record touch end without a touch start.\nTouch End: %s\n","Touch Bank: %s",Q(a),R())}function Q(a){return JSON.stringify({identifier:a.identifier,pageX:a.pageX,pageY:a.pageY,timestamp:O(a)})}
|
|
25
|
+
function R(){var a=JSON.stringify(L.slice(0,20));20<L.length&&(a+=" (original size: "+L.length+")");return a}
|
|
26
|
+
var S={recordTouchTrack:function(a,b){if(G(a))b.changedTouches.forEach(ha);else if(F(a))b.changedTouches.forEach(fa),N.numberActiveTouches=b.touches.length,1===N.numberActiveTouches&&(N.indexOfSingleActiveTouch=b.touches[0].identifier);else if(H(a)&&(b.changedTouches.forEach(ia),N.numberActiveTouches=b.touches.length,1===N.numberActiveTouches))for(a=0;a<L.length;a++)if(b=L[a],null!=b&&b.touchActive){N.indexOfSingleActiveTouch=a;break}},touchHistory:N};
|
|
27
|
+
function T(a,b){if(null==b)throw k(Error(334));return null==a?b:Array.isArray(a)?a.concat(b):Array.isArray(b)?[a].concat(b):[a,b]}var U=null,V=0;function W(a,b){var c=U;U=a;if(null!==X.GlobalResponderHandler)X.GlobalResponderHandler.onChange(c,a,b)}
|
|
28
|
+
var Y={startShouldSetResponder:{phasedRegistrationNames:{bubbled:"onStartShouldSetResponder",captured:"onStartShouldSetResponderCapture"},dependencies:I},scrollShouldSetResponder:{phasedRegistrationNames:{bubbled:"onScrollShouldSetResponder",captured:"onScrollShouldSetResponderCapture"},dependencies:["scroll"]},selectionChangeShouldSetResponder:{phasedRegistrationNames:{bubbled:"onSelectionChangeShouldSetResponder",captured:"onSelectionChangeShouldSetResponderCapture"},dependencies:["selectionchange"]},
|
|
29
|
+
moveShouldSetResponder:{phasedRegistrationNames:{bubbled:"onMoveShouldSetResponder",captured:"onMoveShouldSetResponderCapture"},dependencies:J},responderStart:{registrationName:"onResponderStart",dependencies:I},responderMove:{registrationName:"onResponderMove",dependencies:J},responderEnd:{registrationName:"onResponderEnd",dependencies:K},responderRelease:{registrationName:"onResponderRelease",dependencies:K},responderTerminationRequest:{registrationName:"onResponderTerminationRequest",dependencies:[]},
|
|
30
|
+
responderGrant:{registrationName:"onResponderGrant",dependencies:[]},responderReject:{registrationName:"onResponderReject",dependencies:[]},responderTerminate:{registrationName:"onResponderTerminate",dependencies:[]}},X={_getResponder:function(){return U},eventTypes:Y,extractEvents:function(a,b,c,d,g){if(F(a))V+=1;else if(H(a))if(0<=V)--V;else return console.warn("Ended a touch event which was not counted in `trackedTouchCount`."),null;S.recordTouchTrack(a,d);if(c&&("scroll"===a&&!d.responderIgnoreScroll||
|
|
31
|
+
0<V&&"selectionchange"===a||F(a)||G(a))){b=F(a)?Y.startShouldSetResponder:G(a)?Y.moveShouldSetResponder:"selectionchange"===a?Y.selectionChangeShouldSetResponder:Y.scrollShouldSetResponder;if(U)b:{var e=U;for(var f=0,q=e;q;q=t(q))f++;q=0;for(var M=c;M;M=t(M))q++;for(;0<f-q;)e=t(e),f--;for(;0<q-f;)c=t(c),q--;for(;f--;){if(e===c||e===c.alternate)break b;e=t(e);c=t(c)}e=null}else e=c;c=e===U;e=E.getPooled(b,e,d,g);e.touchHistory=S.touchHistory;c?w(e,ca):w(e,ba);b:{b=e._dispatchListeners;c=e._dispatchInstances;
|
|
32
|
+
if(Array.isArray(b))for(f=0;f<b.length&&!e.isPropagationStopped();f++){if(b[f](e,c[f])){b=c[f];break b}}else if(b&&b(e,c)){b=c;break b}b=null}e._dispatchInstances=null;e._dispatchListeners=null;e.isPersistent()||e.constructor.release(e);if(b&&b!==U)if(e=E.getPooled(Y.responderGrant,b,d,g),e.touchHistory=S.touchHistory,w(e,z),c=!0===r(e),U)if(f=E.getPooled(Y.responderTerminationRequest,U,d,g),f.touchHistory=S.touchHistory,w(f,z),q=!f._dispatchListeners||r(f),f.isPersistent()||f.constructor.release(f),
|
|
33
|
+
q){f=E.getPooled(Y.responderTerminate,U,d,g);f.touchHistory=S.touchHistory;w(f,z);var m=T(m,[e,f]);W(b,c)}else b=E.getPooled(Y.responderReject,b,d,g),b.touchHistory=S.touchHistory,w(b,z),m=T(m,b);else m=T(m,e),W(b,c);else m=null}else m=null;b=U&&F(a);e=U&&G(a);c=U&&H(a);if(b=b?Y.responderStart:e?Y.responderMove:c?Y.responderEnd:null)b=E.getPooled(b,U,d,g),b.touchHistory=S.touchHistory,w(b,z),m=T(m,b);b=U&&"touchcancel"===a;if(a=U&&!b&&H(a))a:{if((a=d.touches)&&0!==a.length)for(e=0;e<a.length;e++)if(c=
|
|
34
|
+
a[e].target,null!==c&&void 0!==c&&0!==c){f=n(c);b:{for(c=U;f;){if(c===f||c===f.alternate){c=!0;break b}f=t(f)}c=!1}if(c){a=!1;break a}}a=!0}if(a=b?Y.responderTerminate:a?Y.responderRelease:null)d=E.getPooled(a,U,d,g),d.touchHistory=S.touchHistory,w(d,z),m=T(m,d),W(null);return m},GlobalResponderHandler:null,injection:{injectGlobalResponderHandler:function(a){X.GlobalResponderHandler=a}}},Z=aa.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.Events,ja=Z[3],ka=Z[0],la=Z[1];l=Z[2];n=ka;p=la;
|
|
35
|
+
module.exports={ResponderEventPlugin:X,ResponderTouchHistoryStore:S,injectEventPluginsByName:ja};
|