react-dom 16.3.1 → 16.3.2
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/cjs/react-dom-server.browser.development.js +7 -11
- package/cjs/react-dom-server.browser.production.min.js +25 -25
- package/cjs/react-dom-server.node.development.js +8 -12
- package/cjs/react-dom-server.node.production.min.js +27 -27
- package/cjs/react-dom-test-utils.development.js +6 -10
- package/cjs/react-dom-test-utils.production.min.js +25 -25
- package/cjs/react-dom-unstable-native-dependencies.development.js +10 -14
- package/cjs/react-dom-unstable-native-dependencies.production.min.js +27 -27
- package/cjs/react-dom.development.js +97 -67
- package/cjs/react-dom.production.min.js +201 -200
- package/package.json +1 -1
- package/umd/react-dom-server.browser.development.js +11 -15
- package/umd/react-dom-server.browser.production.min.js +24 -23
- package/umd/react-dom-test-utils.development.js +6 -10
- package/umd/react-dom-test-utils.production.min.js +22 -22
- package/umd/react-dom-unstable-native-dependencies.development.js +11 -15
- package/umd/react-dom-unstable-native-dependencies.production.min.js +23 -23
- package/umd/react-dom.development.js +97 -67
- package/umd/react-dom.production.min.js +195 -195
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/** @license React v16.3.
|
|
1
|
+
/** @license React v16.3.2
|
|
2
2
|
* react-dom-unstable-native-dependencies.development.js
|
|
3
3
|
*
|
|
4
4
|
* Copyright (c) 2013-present, Facebook, Inc.
|
|
@@ -21,12 +21,8 @@ var warning = require('fbjs/lib/warning');
|
|
|
21
21
|
var _assign = require('object-assign');
|
|
22
22
|
var emptyFunction = require('fbjs/lib/emptyFunction');
|
|
23
23
|
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
* This is a replacement for `invariant(...)` used by the error code system
|
|
27
|
-
* and will _only_ be required by the corresponding babel pass.
|
|
28
|
-
* It always throws.
|
|
29
|
-
*/
|
|
24
|
+
// Relying on the `invariant()` implementation lets us
|
|
25
|
+
// have preserve the format and params in the www builds.
|
|
30
26
|
|
|
31
27
|
{
|
|
32
28
|
// In DEV mode, we swap out invokeGuardedCallback for a special version
|
|
@@ -68,7 +64,7 @@ var injection = {
|
|
|
68
64
|
getNodeFromInstance = Injected.getNodeFromInstance;
|
|
69
65
|
|
|
70
66
|
{
|
|
71
|
-
|
|
67
|
+
!(getNodeFromInstance && getInstanceFromNode) ? warning(false, 'EventPluginUtils.injection.injectComponentTree(...): Injected ' + 'module is missing getNodeFromInstance or getInstanceFromNode.') : void 0;
|
|
72
68
|
}
|
|
73
69
|
}
|
|
74
70
|
};
|
|
@@ -96,7 +92,7 @@ var validateEventDispatches = void 0;
|
|
|
96
92
|
var instancesIsArr = Array.isArray(dispatchInstances);
|
|
97
93
|
var instancesLen = instancesIsArr ? dispatchInstances.length : dispatchInstances ? 1 : 0;
|
|
98
94
|
|
|
99
|
-
|
|
95
|
+
!(instancesIsArr === listenersIsArr && instancesLen === listenersLen) ? warning(false, 'EventPluginUtils: Invalid `event`.') : void 0;
|
|
100
96
|
};
|
|
101
97
|
}
|
|
102
98
|
|
|
@@ -502,7 +498,7 @@ function listenerAtPhase(inst, event, propagationPhase) {
|
|
|
502
498
|
*/
|
|
503
499
|
function accumulateDirectionalDispatches(inst, phase, event) {
|
|
504
500
|
{
|
|
505
|
-
warning(
|
|
501
|
+
!inst ? warning(false, 'Dispatching inst must not be null') : void 0;
|
|
506
502
|
}
|
|
507
503
|
var listener = listenerAtPhase(inst, event, phase);
|
|
508
504
|
if (listener) {
|
|
@@ -780,7 +776,7 @@ SyntheticEvent.extend = function (Interface) {
|
|
|
780
776
|
return new Proxy(constructor.apply(that, args), {
|
|
781
777
|
set: function (target, prop, value) {
|
|
782
778
|
if (prop !== 'isPersistent' && !target.constructor.Interface.hasOwnProperty(prop) && shouldBeReleasedProperties.indexOf(prop) === -1) {
|
|
783
|
-
|
|
779
|
+
!(didWarnForAddedNewProperty || target.isPersistent()) ? warning(false, "This synthetic event is reused for performance reasons. If you're " + "seeing this, you're adding a new property in the synthetic event object. " + 'The property is never released. See ' + 'https://fb.me/react-event-pooling for more information.') : void 0;
|
|
784
780
|
didWarnForAddedNewProperty = true;
|
|
785
781
|
}
|
|
786
782
|
target[prop] = value;
|
|
@@ -825,7 +821,7 @@ function getPooledWarningPropertyDefinition(propName, getVal) {
|
|
|
825
821
|
|
|
826
822
|
function warn(action, result) {
|
|
827
823
|
var warningCondition = false;
|
|
828
|
-
warning(
|
|
824
|
+
!warningCondition ? warning(false, "This synthetic event is reused for performance reasons. If you're seeing this, " + "you're %s `%s` on a released/nullified synthetic event. %s. " + 'If you must keep the original synthetic event around, use event.persist(). ' + 'See https://fb.me/react-event-pooling for more information.', action, propName, result) : void 0;
|
|
829
825
|
}
|
|
830
826
|
}
|
|
831
827
|
|
|
@@ -930,7 +926,7 @@ function getTouchIdentifier(_ref) {
|
|
|
930
926
|
|
|
931
927
|
!(identifier != null) ? invariant(false, 'Touch object is missing identifier.') : void 0;
|
|
932
928
|
{
|
|
933
|
-
|
|
929
|
+
!(identifier <= MAX_TOUCH_BANK) ? warning(false, 'Touch identifier %s is greater than maximum supported %s which causes ' + 'performance issues backfilling array locations for all of the indices.', identifier, MAX_TOUCH_BANK) : void 0;
|
|
934
930
|
}
|
|
935
931
|
return identifier;
|
|
936
932
|
}
|
|
@@ -1018,7 +1014,7 @@ var ResponderTouchHistoryStore = {
|
|
|
1018
1014
|
}
|
|
1019
1015
|
{
|
|
1020
1016
|
var activeRecord = touchBank[touchHistory.indexOfSingleActiveTouch];
|
|
1021
|
-
|
|
1017
|
+
!(activeRecord != null && activeRecord.touchActive) ? warning(false, 'Cannot find single active touch.') : void 0;
|
|
1022
1018
|
}
|
|
1023
1019
|
}
|
|
1024
1020
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/** @license React v16.3.
|
|
1
|
+
/** @license React v16.3.2
|
|
2
2
|
* react-dom-unstable-native-dependencies.production.min.js
|
|
3
3
|
*
|
|
4
4
|
* Copyright (c) 2013-present, Facebook, Inc.
|
|
@@ -7,30 +7,30 @@
|
|
|
7
7
|
* LICENSE file in the root directory of this source tree.
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
|
-
'use strict';var k=require("react-dom"),l=require("object-assign"),
|
|
11
|
-
function
|
|
12
|
-
function
|
|
13
|
-
function
|
|
14
|
-
function
|
|
15
|
-
return c}function
|
|
16
|
-
function
|
|
17
|
-
var
|
|
18
|
-
function
|
|
19
|
-
|
|
20
|
-
destructor:function(){var a=this.constructor.Interface,b;for(b in a)this[b]=null;for(a=0;a<
|
|
21
|
-
function
|
|
22
|
-
function
|
|
23
|
-
function
|
|
24
|
-
function
|
|
25
|
-
function
|
|
26
|
-
function
|
|
27
|
-
var
|
|
28
|
-
function
|
|
29
|
-
var
|
|
10
|
+
'use strict';var k=require("react-dom"),l=require("fbjs/lib/invariant"),m=require("object-assign"),n=require("fbjs/lib/emptyFunction");function p(a){for(var b=arguments.length-1,c="http://reactjs.org/docs/error-decoder.html?invariant\x3d"+a,f=0;f<b;f++)c+="\x26args[]\x3d"+encodeURIComponent(arguments[f+1]);l(!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)}
|
|
11
|
+
var q=null,r=null,t=null,u={injectComponentTree:function(a){q=a.getFiberCurrentPropsFromNode;r=a.getInstanceFromNode;t=a.getNodeFromInstance}};function v(a){return"topMouseUp"===a||"topTouchEnd"===a||"topTouchCancel"===a}function w(a){return"topMouseMove"===a||"topTouchMove"===a}function x(a){return"topMouseDown"===a||"topTouchStart"===a}
|
|
12
|
+
function y(a){var b=a._dispatchListeners,c=a._dispatchInstances;Array.isArray(b)?p("103"):void 0;a.currentTarget=b?t(c):null;b=b?b(a):null;a.currentTarget=null;a._dispatchListeners=null;a._dispatchInstances=null;return b}function z(a){do a=a["return"];while(a&&5!==a.tag);return a?a:null}function A(a,b,c){for(var f=[];a;)f.push(a),a=z(a);for(a=f.length;0<a--;)b(f[a],"captured",c);for(a=0;a<f.length;a++)b(f[a],"bubbled",c)}
|
|
13
|
+
function B(a,b){null==b?p("30"):void 0;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 D(a,b,c){Array.isArray(a)?a.forEach(b,c):a&&b.call(c,a)}
|
|
14
|
+
function E(a,b){var c=a.stateNode;if(!c)return null;var f=q(c);if(!f)return null;c=f[b];a:switch(b){case "onClick":case "onClickCapture":case "onDoubleClick":case "onDoubleClickCapture":case "onMouseDown":case "onMouseDownCapture":case "onMouseMove":case "onMouseMoveCapture":case "onMouseUp":case "onMouseUpCapture":(f=!f.disabled)||(a=a.type,f=!("button"===a||"input"===a||"select"===a||"textarea"===a));a=!f;break a;default:a=!1}if(a)return null;c&&"function"!==typeof c?p("231",b,typeof c):void 0;
|
|
15
|
+
return c}function F(a,b,c){if(b=E(a,c.dispatchConfig.phasedRegistrationNames[b]))c._dispatchListeners=B(c._dispatchListeners,b),c._dispatchInstances=B(c._dispatchInstances,a)}function G(a){a&&a.dispatchConfig.phasedRegistrationNames&&A(a._targetInst,F,a)}function aa(a){if(a&&a.dispatchConfig.phasedRegistrationNames){var b=a._targetInst;b=b?z(b):null;A(b,F,a)}}
|
|
16
|
+
function H(a){if(a&&a.dispatchConfig.registrationName){var b=a._targetInst;if(b&&a&&a.dispatchConfig.registrationName){var c=E(b,a.dispatchConfig.registrationName);c&&(a._dispatchListeners=B(a._dispatchListeners,c),a._dispatchInstances=B(a._dispatchInstances,b))}}}
|
|
17
|
+
var I="dispatchConfig _targetInst nativeEvent isDefaultPrevented isPropagationStopped _dispatchListeners _dispatchInstances".split(" "),ba={type:null,target:null,currentTarget:n.thatReturnsNull,eventPhase:null,bubbles:null,cancelable:null,timeStamp:function(a){return a.timeStamp||Date.now()},defaultPrevented:null,isTrusted:null};
|
|
18
|
+
function J(a,b,c,f){this.dispatchConfig=a;this._targetInst=b;this.nativeEvent=c;a=this.constructor.Interface;for(var e in a)a.hasOwnProperty(e)&&((b=a[e])?this[e]=b(c):"target"===e?this.target=f:this[e]=c[e]);this.isDefaultPrevented=(null!=c.defaultPrevented?c.defaultPrevented:!1===c.returnValue)?n.thatReturnsTrue:n.thatReturnsFalse;this.isPropagationStopped=n.thatReturnsFalse;return this}
|
|
19
|
+
m(J.prototype,{preventDefault:function(){this.defaultPrevented=!0;var a=this.nativeEvent;a&&(a.preventDefault?a.preventDefault():"unknown"!==typeof a.returnValue&&(a.returnValue=!1),this.isDefaultPrevented=n.thatReturnsTrue)},stopPropagation:function(){var a=this.nativeEvent;a&&(a.stopPropagation?a.stopPropagation():"unknown"!==typeof a.cancelBubble&&(a.cancelBubble=!0),this.isPropagationStopped=n.thatReturnsTrue)},persist:function(){this.isPersistent=n.thatReturnsTrue},isPersistent:n.thatReturnsFalse,
|
|
20
|
+
destructor:function(){var a=this.constructor.Interface,b;for(b in a)this[b]=null;for(a=0;a<I.length;a++)this[I[a]]=null}});J.Interface=ba;J.extend=function(a){function b(){}function c(){return f.apply(this,arguments)}var f=this;b.prototype=f.prototype;var e=new b;m(e,c.prototype);c.prototype=e;c.prototype.constructor=c;c.Interface=m({},f.Interface,a);c.extend=f.extend;K(c);return c};K(J);
|
|
21
|
+
function ca(a,b,c,f){if(this.eventPool.length){var e=this.eventPool.pop();this.call(e,a,b,c,f);return e}return new this(a,b,c,f)}function da(a){a instanceof this?void 0:p("223");a.destructor();10>this.eventPool.length&&this.eventPool.push(a)}function K(a){a.eventPool=[];a.getPooled=ca;a.release=da}var L=J.extend({touchHistory:function(){return null}}),M=[],N={touchBank:M,numberActiveTouches:0,indexOfSingleActiveTouch:-1,mostRecentTimeStamp:0};function O(a){return a.timeStamp||a.timestamp}
|
|
22
|
+
function P(a){a=a.identifier;null==a?p("138"):void 0;return a}
|
|
23
|
+
function ea(a){var b=P(a),c=M[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)},M[b]=c);N.mostRecentTimeStamp=O(a)}
|
|
24
|
+
function fa(a){var b=M[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.error("Cannot record touch move without a touch start.\nTouch Move: %s\n","Touch Bank: %s",Q(a),R())}
|
|
25
|
+
function ha(a){var b=M[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.error("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)})}
|
|
26
|
+
function R(){var a=JSON.stringify(M.slice(0,20));20<M.length&&(a+=" (original size: "+M.length+")");return a}
|
|
27
|
+
var S={recordTouchTrack:function(a,b){if(w(a))b.changedTouches.forEach(fa);else if(x(a))b.changedTouches.forEach(ea),N.numberActiveTouches=b.touches.length,1===N.numberActiveTouches&&(N.indexOfSingleActiveTouch=b.touches[0].identifier);else if(v(a)&&(b.changedTouches.forEach(ha),N.numberActiveTouches=b.touches.length,1===N.numberActiveTouches))for(a=0;a<M.length;a++)if(b=M[a],null!=b&&b.touchActive){N.indexOfSingleActiveTouch=a;break}},touchHistory:N};
|
|
28
|
+
function T(a,b){null==b?p("29"):void 0;return null==a?b:Array.isArray(a)?a.concat(b):Array.isArray(b)?[a].concat(b):[a,b]}var U=null,V=0,W=0;function X(a,b){var c=U;U=a;if(null!==Y.GlobalResponderHandler)Y.GlobalResponderHandler.onChange(c,a,b)}
|
|
29
|
+
var Z={startShouldSetResponder:{phasedRegistrationNames:{bubbled:"onStartShouldSetResponder",captured:"onStartShouldSetResponderCapture"}},scrollShouldSetResponder:{phasedRegistrationNames:{bubbled:"onScrollShouldSetResponder",captured:"onScrollShouldSetResponderCapture"}},selectionChangeShouldSetResponder:{phasedRegistrationNames:{bubbled:"onSelectionChangeShouldSetResponder",captured:"onSelectionChangeShouldSetResponderCapture"}},moveShouldSetResponder:{phasedRegistrationNames:{bubbled:"onMoveShouldSetResponder",
|
|
30
30
|
captured:"onMoveShouldSetResponderCapture"}},responderStart:{registrationName:"onResponderStart"},responderMove:{registrationName:"onResponderMove"},responderEnd:{registrationName:"onResponderEnd"},responderRelease:{registrationName:"onResponderRelease"},responderTerminationRequest:{registrationName:"onResponderTerminationRequest"},responderGrant:{registrationName:"onResponderGrant"},responderReject:{registrationName:"onResponderReject"},responderTerminate:{registrationName:"onResponderTerminate"}},
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
d.isPersistent()||d.constructor.release(d);e&&e!==
|
|
34
|
-
(d=
|
|
35
|
-
|
|
36
|
-
|
|
31
|
+
Y={_getResponder:function(){return U},eventTypes:Z,extractEvents:function(a,b,c,f){if(x(a))V+=1;else if(v(a))if(0<=V)--V;else return console.error("Ended a touch event which was not counted in `trackedTouchCount`."),null;S.recordTouchTrack(a,c);if(b&&("topScroll"===a&&!c.responderIgnoreScroll||0<V&&"topSelectionChange"===a||x(a)||w(a))){var e=x(a)?Z.startShouldSetResponder:w(a)?Z.moveShouldSetResponder:"topSelectionChange"===a?Z.selectionChangeShouldSetResponder:Z.scrollShouldSetResponder;if(U)b:{var d=
|
|
32
|
+
U;for(var g=0,h=d;h;h=z(h))g++;h=0;for(var C=b;C;C=z(C))h++;for(;0<g-h;)d=z(d),g--;for(;0<h-g;)b=z(b),h--;for(;g--;){if(d===b||d===b.alternate)break b;d=z(d);b=z(b)}d=null}else d=b;b=d===U;d=L.getPooled(e,d,c,f);d.touchHistory=S.touchHistory;b?D(d,aa):D(d,G);b:{e=d._dispatchListeners;b=d._dispatchInstances;if(Array.isArray(e))for(g=0;g<e.length&&!d.isPropagationStopped();g++){if(e[g](d,b[g])){e=b[g];break b}}else if(e&&e(d,b)){e=b;break b}e=null}d._dispatchInstances=null;d._dispatchListeners=null;
|
|
33
|
+
d.isPersistent()||d.constructor.release(d);e&&e!==U?(d=void 0,b=L.getPooled(Z.responderGrant,e,c,f),b.touchHistory=S.touchHistory,D(b,H),g=!0===y(b),U?(h=L.getPooled(Z.responderTerminationRequest,U,c,f),h.touchHistory=S.touchHistory,D(h,H),C=!h._dispatchListeners||y(h),h.isPersistent()||h.constructor.release(h),C?(h=L.getPooled(Z.responderTerminate,U,c,f),h.touchHistory=S.touchHistory,D(h,H),d=T(d,[b,h]),X(e,g)):(e=L.getPooled(Z.responderReject,e,c,f),e.touchHistory=S.touchHistory,D(e,H),d=T(d,e))):
|
|
34
|
+
(d=T(d,b),X(e,g)),e=d):e=null}else e=null;d=U&&x(a);b=U&&w(a);g=U&&v(a);if(d=d?Z.responderStart:b?Z.responderMove:g?Z.responderEnd:null)d=L.getPooled(d,U,c,f),d.touchHistory=S.touchHistory,D(d,H),e=T(e,d);d=U&&"topTouchCancel"===a;if(a=U&&!d&&v(a))a:{if((a=c.touches)&&0!==a.length)for(b=0;b<a.length;b++)if(g=a[b].target,null!==g&&void 0!==g&&0!==g){h=r(g);b:{for(g=U;h;){if(g===h||g===h.alternate){g=!0;break b}h=z(h)}g=!1}if(g){a=!1;break a}}a=!0}if(a=d?Z.responderTerminate:a?Z.responderRelease:null)c=
|
|
35
|
+
L.getPooled(a,U,c,f),c.touchHistory=S.touchHistory,D(c,H),e=T(e,c),X(null);c=S.touchHistory.numberActiveTouches;if(Y.GlobalInteractionHandler&&c!==W)Y.GlobalInteractionHandler.onChange(c);W=c;return e},GlobalResponderHandler:null,GlobalInteractionHandler:null,injection:{injectGlobalResponderHandler:function(a){Y.GlobalResponderHandler=a},injectGlobalInteractionHandler:function(a){Y.GlobalInteractionHandler=a}}};(0,u.injectComponentTree)(k.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactDOMComponentTree);
|
|
36
|
+
var ia=Object.freeze({injectComponentTree:u.injectComponentTree,ResponderEventPlugin:Y,ResponderTouchHistoryStore:S});module.exports=ia;
|