react-dom 16.8.5 → 16.9.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 +5 -5
- package/cjs/react-dom-server.browser.development.js +473 -136
- package/cjs/react-dom-server.browser.production.min.js +45 -42
- package/cjs/react-dom-server.node.development.js +456 -131
- package/cjs/react-dom-server.node.production.min.js +46 -44
- package/cjs/react-dom-test-utils.development.js +328 -82
- package/cjs/react-dom-test-utils.production.min.js +26 -23
- package/cjs/react-dom-unstable-fizz.browser.development.js +9 -1
- package/cjs/react-dom-unstable-fizz.browser.production.min.js +1 -1
- package/cjs/react-dom-unstable-fizz.node.development.js +9 -1
- package/cjs/react-dom-unstable-fizz.node.production.min.js +1 -1
- package/cjs/react-dom-unstable-native-dependencies.development.js +67 -44
- package/cjs/react-dom-unstable-native-dependencies.production.min.js +20 -21
- package/cjs/react-dom.development.js +15465 -11493
- package/cjs/react-dom.production.min.js +266 -257
- package/cjs/react-dom.profiling.min.js +272 -263
- package/package.json +2 -2
- package/umd/react-dom-server.browser.development.js +473 -136
- package/umd/react-dom-server.browser.production.min.js +38 -37
- package/umd/react-dom-test-utils.development.js +349 -82
- package/umd/react-dom-test-utils.production.min.js +23 -22
- package/umd/react-dom-unstable-fizz.browser.development.js +9 -1
- package/umd/react-dom-unstable-fizz.browser.production.min.js +1 -1
- package/umd/react-dom-unstable-native-dependencies.development.js +67 -44
- package/umd/react-dom-unstable-native-dependencies.production.min.js +21 -22
- package/umd/react-dom.development.js +12006 -8031
- package/umd/react-dom.production.min.js +220 -209
- package/umd/react-dom.profiling.min.js +227 -214
- package/cjs/react-dom-unstable-fire.development.js +0 -21252
- package/cjs/react-dom-unstable-fire.production.min.js +0 -269
- package/cjs/react-dom-unstable-fire.profiling.min.js +0 -278
- package/umd/react-dom-unstable-fire.development.js +0 -21387
- package/umd/react-dom-unstable-fire.production.min.js +0 -220
- package/umd/react-dom-unstable-fire.profiling.min.js +0 -225
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/** @license React v16.
|
|
1
|
+
/** @license React v16.9.0
|
|
2
2
|
* react-dom-test-utils.production.min.js
|
|
3
3
|
*
|
|
4
4
|
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
@@ -7,27 +7,30 @@
|
|
|
7
7
|
* LICENSE file in the root directory of this source tree.
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
|
-
'use strict';var g=require("object-assign"),
|
|
11
|
-
function
|
|
12
|
-
function
|
|
13
|
-
|
|
14
|
-
|
|
10
|
+
'use strict';var g=require("object-assign"),k=require("react"),m=require("react-dom"),n=require("scheduler");function p(a){for(var b=a.message,c="https://reactjs.org/docs/error-decoder.html?invariant="+b,e=1;e<arguments.length;e++)c+="&args[]="+encodeURIComponent(arguments[e]);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 q=k.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
|
|
11
|
+
q.hasOwnProperty("ReactCurrentDispatcher")||(q.ReactCurrentDispatcher={current:null});q.hasOwnProperty("ReactCurrentBatchConfig")||(q.ReactCurrentBatchConfig={suspense:null});function r(a){var b=a;if(a.alternate)for(;b.return;)b=b.return;else{if(0!==(b.effectTag&2))return 1;for(;b.return;)if(b=b.return,0!==(b.effectTag&2))return 1}return 3===b.tag?2:3}function t(a){if(2!==r(a))throw p(Error(188));}
|
|
12
|
+
function u(a){var b=a.alternate;if(!b){b=r(a);if(3===b)throw p(Error(188));return 1===b?null:a}for(var c=a,e=b;;){var d=c.return;if(null===d)break;var f=d.alternate;if(null===f){e=d.return;if(null!==e){c=e;continue}break}if(d.child===f.child){for(f=d.child;f;){if(f===c)return t(d),a;if(f===e)return t(d),b;f=f.sibling}throw p(Error(188));}if(c.return!==e.return)c=d,e=f;else{for(var h=!1,l=d.child;l;){if(l===c){h=!0;c=d;e=f;break}if(l===e){h=!0;e=d;c=f;break}l=l.sibling}if(!h){for(l=f.child;l;){if(l===
|
|
13
|
+
c){h=!0;c=f;e=d;break}if(l===e){h=!0;e=f;c=d;break}l=l.sibling}if(!h)throw p(Error(189));}}if(c.alternate!==e)throw p(Error(190));}if(3!==c.tag)throw p(Error(188));return c.stateNode.current===c?a:b}function v(){return!0}function w(){return!1}
|
|
14
|
+
function x(a,b,c,e){this.dispatchConfig=a;this._targetInst=b;this.nativeEvent=c;a=this.constructor.Interface;for(var d in a)a.hasOwnProperty(d)&&((b=a[d])?this[d]=b(c):"target"===d?this.target=e:this[d]=c[d]);this.isDefaultPrevented=(null!=c.defaultPrevented?c.defaultPrevented:!1===c.returnValue)?v:w;this.isPropagationStopped=w;return this}
|
|
15
15
|
g(x.prototype,{preventDefault:function(){this.defaultPrevented=!0;var a=this.nativeEvent;a&&(a.preventDefault?a.preventDefault():"unknown"!==typeof a.returnValue&&(a.returnValue=!1),this.isDefaultPrevented=v)},stopPropagation:function(){var a=this.nativeEvent;a&&(a.stopPropagation?a.stopPropagation():"unknown"!==typeof a.cancelBubble&&(a.cancelBubble=!0),this.isPropagationStopped=v)},persist:function(){this.isPersistent=v},isPersistent:w,destructor:function(){var a=this.constructor.Interface,b;for(b in a)this[b]=
|
|
16
16
|
null;this.nativeEvent=this._targetInst=this.dispatchConfig=null;this.isPropagationStopped=this.isDefaultPrevented=w;this._dispatchInstances=this._dispatchListeners=null}});x.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};
|
|
17
|
-
x.extend=function(a){function b(){}function c(){return e.apply(this,arguments)}var e=this;b.prototype=e.prototype;var d=new b;g(d,c.prototype);c.prototype=d;c.prototype.constructor=c;c.Interface=g({},e.Interface,a);c.extend=e.extend;y(c);return c};y(x);function z(a,b,c,e){if(this.eventPool.length){var d=this.eventPool.pop();this.call(d,a,b,c,e);return d}return new this(a,b,c,e)}
|
|
18
|
-
function y(a){a.eventPool=[];a.getPooled=z;a.release=A}var B=!("undefined"===typeof window
|
|
19
|
-
B&&(F=document.createElement("div").style,"AnimationEvent"in window||(delete D.animationend.animation,delete D.animationiteration.animation,delete D.animationstart.animation),"TransitionEvent"in window||delete D.transitionend.transition);
|
|
20
|
-
var
|
|
21
|
-
|
|
22
|
-
function
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
function
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
"
|
|
17
|
+
x.extend=function(a){function b(){}function c(){return e.apply(this,arguments)}var e=this;b.prototype=e.prototype;var d=new b;g(d,c.prototype);c.prototype=d;c.prototype.constructor=c;c.Interface=g({},e.Interface,a);c.extend=e.extend;y(c);return c};y(x);function z(a,b,c,e){if(this.eventPool.length){var d=this.eventPool.pop();this.call(d,a,b,c,e);return d}return new this(a,b,c,e)}
|
|
18
|
+
function A(a){if(!(a instanceof this))throw p(Error(279));a.destructor();10>this.eventPool.length&&this.eventPool.push(a)}function y(a){a.eventPool=[];a.getPooled=z;a.release=A}var B=!("undefined"===typeof window||"undefined"===typeof window.document||"undefined"===typeof window.document.createElement);function C(a,b){var c={};c[a.toLowerCase()]=b.toLowerCase();c["Webkit"+a]="webkit"+b;c["Moz"+a]="moz"+b;return c}
|
|
19
|
+
var D={animationend:C("Animation","AnimationEnd"),animationiteration:C("Animation","AnimationIteration"),animationstart:C("Animation","AnimationStart"),transitionend:C("Transition","TransitionEnd")},E={},F={};B&&(F=document.createElement("div").style,"AnimationEvent"in window||(delete D.animationend.animation,delete D.animationiteration.animation,delete D.animationstart.animation),"TransitionEvent"in window||delete D.transitionend.transition);
|
|
20
|
+
function G(a){if(E[a])return E[a];if(!D[a])return a;var b=D[a],c;for(c in b)if(b.hasOwnProperty(c)&&c in F)return E[a]=b[c];return a}var aa=G("animationend"),ba=G("animationiteration"),ca=G("animationstart"),da=G("transitionend"),H=void 0;try{var ea=("require"+Math.random()).slice(0,7);H=(module&&module[ea])("timers").setImmediate}catch(a){H=function(b){var c=new MessageChannel;c.port1.onmessage=b;c.port2.postMessage(void 0)}}
|
|
21
|
+
var fa=H,I=m.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.Events,ha=I[11],J=I[12],ia=m.unstable_batchedUpdates,K=q.IsSomeRendererActing,L="function"===typeof n.unstable_flushAllWithoutAsserting,M=n.unstable_flushAllWithoutAsserting||function(){for(var a=!1;ha();)a=!0;return a};function N(a){try{M(),fa(function(){M()?N(a):a()})}catch(b){a(b)}}var O=0,P=!1;
|
|
22
|
+
function ja(a){function b(){O--;K.current=c;J.current=e}!1===P&&(P=!0,console.error("act(...) is not supported in production builds of React, and might not behave as expected."));var c=void 0,e=void 0;O++;c=K.current;e=J.current;K.current=!0;J.current=!0;var d=void 0;try{d=ia(a)}catch(f){throw b(),f;}if(null!==d&&"object"===typeof d&&"function"===typeof d.then)return{then:function(a,e){d.then(function(){1<O||!0===L&&!0===c?(b(),a()):N(function(c){b();c?e(c):a()})},function(a){b();e(a)})}};try{1!==
|
|
23
|
+
O||!1!==L&&!1!==c||M(),b()}catch(f){throw b(),f;}return{then:function(a){a()}}}var ka=m.findDOMNode,Q=m.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.Events,la=Q[0],R=Q[4],ma=Q[5],na=Q[6],oa=Q[7],pa=Q[8],S=Q[9],qa=Q[10];function T(){}
|
|
24
|
+
function ra(a,b){if(!a)return[];a=u(a);if(!a)return[];for(var c=a,e=[];;){if(5===c.tag||6===c.tag||1===c.tag||0===c.tag){var d=c.stateNode;b(d)&&e.push(d)}if(c.child)c.child.return=c,c=c.child;else{if(c===a)return e;for(;!c.sibling;){if(!c.return||c.return===a)return e;c=c.return}c.sibling.return=c.return;c=c.sibling}}}
|
|
25
|
+
function U(a,b){if(a&&!a._reactInternalFiber){var c=""+a;a=Array.isArray(a)?"an array":a&&1===a.nodeType&&a.tagName?"a DOM node":"[object Object]"===c?"object with keys {"+Object.keys(a).join(", ")+"}":c;throw p(Error(286),b,a);}}
|
|
26
|
+
var V=null,W={renderIntoDocument:function(a){var b=document.createElement("div");return m.render(a,b)},isElement:function(a){return k.isValidElement(a)},isElementOfType:function(a,b){return k.isValidElement(a)&&a.type===b},isDOMComponent:function(a){return!(!a||1!==a.nodeType||!a.tagName)},isDOMComponentElement:function(a){return!!(a&&k.isValidElement(a)&&a.tagName)},isCompositeComponent:function(a){return W.isDOMComponent(a)?!1:null!=a&&"function"===typeof a.render&&"function"===typeof a.setState},
|
|
27
|
+
isCompositeComponentWithType:function(a,b){return W.isCompositeComponent(a)?a._reactInternalFiber.type===b:!1},findAllInRenderedTree:function(a,b){U(a,"findAllInRenderedTree");return a?ra(a._reactInternalFiber,b):[]},scryRenderedDOMComponentsWithClass:function(a,b){U(a,"scryRenderedDOMComponentsWithClass");return W.findAllInRenderedTree(a,function(a){if(W.isDOMComponent(a)){var c=a.className;"string"!==typeof c&&(c=a.getAttribute("class")||"");var d=c.split(/\s+/);if(!Array.isArray(b)){if(void 0===
|
|
28
|
+
b)throw p(Error(11));b=b.split(/\s+/)}return b.every(function(a){return-1!==d.indexOf(a)})}return!1})},findRenderedDOMComponentWithClass:function(a,b){U(a,"findRenderedDOMComponentWithClass");a=W.scryRenderedDOMComponentsWithClass(a,b);if(1!==a.length)throw Error("Did not find exactly one match (found: "+a.length+") for class:"+b);return a[0]},scryRenderedDOMComponentsWithTag:function(a,b){U(a,"scryRenderedDOMComponentsWithTag");return W.findAllInRenderedTree(a,function(a){return W.isDOMComponent(a)&&
|
|
29
|
+
a.tagName.toUpperCase()===b.toUpperCase()})},findRenderedDOMComponentWithTag:function(a,b){U(a,"findRenderedDOMComponentWithTag");a=W.scryRenderedDOMComponentsWithTag(a,b);if(1!==a.length)throw Error("Did not find exactly one match (found: "+a.length+") for tag:"+b);return a[0]},scryRenderedComponentsWithType:function(a,b){U(a,"scryRenderedComponentsWithType");return W.findAllInRenderedTree(a,function(a){return W.isCompositeComponentWithType(a,b)})},findRenderedComponentWithType:function(a,b){U(a,
|
|
30
|
+
"findRenderedComponentWithType");a=W.scryRenderedComponentsWithType(a,b);if(1!==a.length)throw Error("Did not find exactly one match (found: "+a.length+") for componentType:"+b);return a[0]},mockComponent:function(a,b){b=b||a.mockTagName||"div";a.prototype.render.mockImplementation(function(){return k.createElement(b,null,this.props.children)});return this},nativeTouchData:function(a,b){return{touches:[{pageX:a,pageY:b}]}},Simulate:null,SimulateNative:{},act:function(a){null===V&&(V=document.createElement("div"));
|
|
31
|
+
return ja(a)}};function sa(a){return function(b,c){if(k.isValidElement(b))throw p(Error(228));if(W.isCompositeComponent(b))throw p(Error(229));var e=R[a],d=new T;d.target=b;d.type=a.toLowerCase();var f=la(b),h=new x(e,f,d,b);h.persist();g(h,c);e.phasedRegistrationNames?ma(h):na(h);m.unstable_batchedUpdates(function(){oa(b);qa(h)});pa()}}W.Simulate={};var X=void 0;for(X in R)W.Simulate[X]=sa(X);
|
|
32
|
+
function ta(a,b){return function(c,e){var d=new T(a);g(d,e);W.isDOMComponent(c)?(c=ka(c),d.target=c,S(b,1,d)):c.tagName&&(d.target=c,S(b,1,d))}}
|
|
33
|
+
[["abort","abort"],[aa,"animationEnd"],[ba,"animationIteration"],[ca,"animationStart"],["blur","blur"],["canplaythrough","canPlayThrough"],["canplay","canPlay"],["cancel","cancel"],["change","change"],["click","click"],["close","close"],["compositionend","compositionEnd"],["compositionstart","compositionStart"],["compositionupdate","compositionUpdate"],["contextmenu","contextMenu"],["copy","copy"],["cut","cut"],["dblclick","doubleClick"],["dragend","dragEnd"],["dragenter","dragEnter"],["dragexit",
|
|
34
|
+
"dragExit"],["dragleave","dragLeave"],["dragover","dragOver"],["dragstart","dragStart"],["drag","drag"],["drop","drop"],["durationchange","durationChange"],["emptied","emptied"],["encrypted","encrypted"],["ended","ended"],["error","error"],["focus","focus"],["input","input"],["keydown","keyDown"],["keypress","keyPress"],["keyup","keyUp"],["loadstart","loadStart"],["loadstart","loadStart"],["load","load"],["loadeddata","loadedData"],["loadedmetadata","loadedMetadata"],["mousedown","mouseDown"],["mousemove",
|
|
35
|
+
"mouseMove"],["mouseout","mouseOut"],["mouseover","mouseOver"],["mouseup","mouseUp"],["paste","paste"],["pause","pause"],["play","play"],["playing","playing"],["progress","progress"],["ratechange","rateChange"],["scroll","scroll"],["seeked","seeked"],["seeking","seeking"],["selectionchange","selectionChange"],["stalled","stalled"],["suspend","suspend"],["textInput","textInput"],["timeupdate","timeUpdate"],["toggle","toggle"],["touchcancel","touchCancel"],["touchend","touchEnd"],["touchmove","touchMove"],
|
|
36
|
+
["touchstart","touchStart"],[da,"transitionEnd"],["volumechange","volumeChange"],["waiting","waiting"],["wheel","wheel"]].forEach(function(a){var b=a[1];W.SimulateNative[b]=ta(b,a[0])});var Y={default:W},Z=Y&&W||Y;module.exports=Z.default||Z;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/** @license React v16.
|
|
1
|
+
/** @license React v16.9.0
|
|
2
2
|
* react-dom-unstable-fizz.browser.development.js
|
|
3
3
|
*
|
|
4
4
|
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
@@ -57,6 +57,14 @@ var hasSymbol = typeof Symbol === 'function' && Symbol.for;
|
|
|
57
57
|
|
|
58
58
|
var REACT_ELEMENT_TYPE = hasSymbol ? Symbol.for('react.element') : 0xeac7;
|
|
59
59
|
|
|
60
|
+
|
|
61
|
+
|
|
62
|
+
|
|
63
|
+
|
|
64
|
+
|
|
65
|
+
// TODO: We don't use AsyncMode or ConcurrentMode anymore. They were temporary
|
|
66
|
+
// (unstable) APIs that have been removed. Can we remove the symbols?
|
|
67
|
+
|
|
60
68
|
function createRequest(children, destination) {
|
|
61
69
|
return { destination: destination, children: children, completedChunks: [], flowing: false };
|
|
62
70
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/** @license React v16.
|
|
1
|
+
/** @license React v16.9.0
|
|
2
2
|
* react-dom-unstable-fizz.node.development.js
|
|
3
3
|
*
|
|
4
4
|
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
@@ -64,6 +64,14 @@ var hasSymbol = typeof Symbol === 'function' && Symbol.for;
|
|
|
64
64
|
|
|
65
65
|
var REACT_ELEMENT_TYPE = hasSymbol ? Symbol.for('react.element') : 0xeac7;
|
|
66
66
|
|
|
67
|
+
|
|
68
|
+
|
|
69
|
+
|
|
70
|
+
|
|
71
|
+
|
|
72
|
+
// TODO: We don't use AsyncMode or ConcurrentMode anymore. They were temporary
|
|
73
|
+
// (unstable) APIs that have been removed. Can we remove the symbols?
|
|
74
|
+
|
|
67
75
|
function createRequest(children, destination) {
|
|
68
76
|
return { destination: destination, children: children, completedChunks: [], flowing: false };
|
|
69
77
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/** @license React v16.
|
|
1
|
+
/** @license React v16.9.0
|
|
2
2
|
* react-dom-unstable-native-dependencies.development.js
|
|
3
3
|
*
|
|
4
4
|
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
@@ -18,6 +18,19 @@ if (process.env.NODE_ENV !== "production") {
|
|
|
18
18
|
var ReactDOM = require('react-dom');
|
|
19
19
|
var _assign = require('object-assign');
|
|
20
20
|
|
|
21
|
+
// Do not require this module directly! Use normal `invariant` calls with
|
|
22
|
+
// template literal strings. The messages will be converted to ReactError during
|
|
23
|
+
// build, and in production they will be minified.
|
|
24
|
+
|
|
25
|
+
// Do not require this module directly! Use normal `invariant` calls with
|
|
26
|
+
// template literal strings. The messages will be converted to ReactError during
|
|
27
|
+
// build, and in production they will be minified.
|
|
28
|
+
|
|
29
|
+
function ReactError(error) {
|
|
30
|
+
error.name = 'Invariant Violation';
|
|
31
|
+
return error;
|
|
32
|
+
}
|
|
33
|
+
|
|
21
34
|
/**
|
|
22
35
|
* Use invariant() to assert state which your program assumes to be true.
|
|
23
36
|
*
|
|
@@ -29,40 +42,6 @@ var _assign = require('object-assign');
|
|
|
29
42
|
* will remain to ensure logic does not differ in production.
|
|
30
43
|
*/
|
|
31
44
|
|
|
32
|
-
var validateFormat = function () {};
|
|
33
|
-
|
|
34
|
-
{
|
|
35
|
-
validateFormat = function (format) {
|
|
36
|
-
if (format === undefined) {
|
|
37
|
-
throw new Error('invariant requires an error message argument');
|
|
38
|
-
}
|
|
39
|
-
};
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
function invariant(condition, format, a, b, c, d, e, f) {
|
|
43
|
-
validateFormat(format);
|
|
44
|
-
|
|
45
|
-
if (!condition) {
|
|
46
|
-
var error = void 0;
|
|
47
|
-
if (format === undefined) {
|
|
48
|
-
error = new Error('Minified exception occurred; use the non-minified dev environment ' + 'for the full error message and additional helpful warnings.');
|
|
49
|
-
} else {
|
|
50
|
-
var args = [a, b, c, d, e, f];
|
|
51
|
-
var argIndex = 0;
|
|
52
|
-
error = new Error(format.replace(/%s/g, function () {
|
|
53
|
-
return args[argIndex++];
|
|
54
|
-
}));
|
|
55
|
-
error.name = 'Invariant Violation';
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
error.framesToPop = 1; // we don't care about invariant's own frame
|
|
59
|
-
throw error;
|
|
60
|
-
}
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
// Relying on the `invariant()` implementation lets us
|
|
64
|
-
// preserve the format and params in the www builds.
|
|
65
|
-
|
|
66
45
|
{
|
|
67
46
|
// In DEV mode, we swap out invokeGuardedCallback for a special version
|
|
68
47
|
// that plays more nicely with the browser's DevTools. The idea is to preserve
|
|
@@ -203,6 +182,14 @@ var validateEventDispatches = void 0;
|
|
|
203
182
|
};
|
|
204
183
|
}
|
|
205
184
|
|
|
185
|
+
/**
|
|
186
|
+
* Dispatch the event to the listener.
|
|
187
|
+
* @param {SyntheticEvent} event SyntheticEvent to handle
|
|
188
|
+
* @param {function} listener Application-level callback
|
|
189
|
+
* @param {*} inst Internal component instance
|
|
190
|
+
*/
|
|
191
|
+
|
|
192
|
+
|
|
206
193
|
/**
|
|
207
194
|
* Standard/simple iteration through an event's collected dispatches.
|
|
208
195
|
*/
|
|
@@ -264,7 +251,13 @@ function executeDirectDispatch(event) {
|
|
|
264
251
|
}
|
|
265
252
|
var dispatchListener = event._dispatchListeners;
|
|
266
253
|
var dispatchInstance = event._dispatchInstances;
|
|
267
|
-
|
|
254
|
+
(function () {
|
|
255
|
+
if (!!Array.isArray(dispatchListener)) {
|
|
256
|
+
{
|
|
257
|
+
throw ReactError(Error('executeDirectDispatch(...): Invalid `event`.'));
|
|
258
|
+
}
|
|
259
|
+
}
|
|
260
|
+
})();
|
|
268
261
|
event.currentTarget = dispatchListener ? getNodeFromInstance$1(dispatchInstance) : null;
|
|
269
262
|
var res = dispatchListener ? dispatchListener(event) : null;
|
|
270
263
|
event.currentTarget = null;
|
|
@@ -456,7 +449,13 @@ function traverseTwoPhase(inst, fn, arg) {
|
|
|
456
449
|
*/
|
|
457
450
|
|
|
458
451
|
function accumulateInto(current, next) {
|
|
459
|
-
|
|
452
|
+
(function () {
|
|
453
|
+
if (!(next != null)) {
|
|
454
|
+
{
|
|
455
|
+
throw ReactError(Error('accumulateInto(...): Accumulated items must not be null or undefined.'));
|
|
456
|
+
}
|
|
457
|
+
}
|
|
458
|
+
})();
|
|
460
459
|
|
|
461
460
|
if (current == null) {
|
|
462
461
|
return next;
|
|
@@ -572,7 +571,13 @@ function getListener(inst, registrationName) {
|
|
|
572
571
|
if (shouldPreventMouseEvent(registrationName, inst.type, props)) {
|
|
573
572
|
return null;
|
|
574
573
|
}
|
|
575
|
-
|
|
574
|
+
(function () {
|
|
575
|
+
if (!(!listener || typeof listener === 'function')) {
|
|
576
|
+
{
|
|
577
|
+
throw ReactError(Error('Expected `' + registrationName + '` listener to be a function, instead got a value of `' + typeof listener + '` type.'));
|
|
578
|
+
}
|
|
579
|
+
}
|
|
580
|
+
})();
|
|
576
581
|
return listener;
|
|
577
582
|
}
|
|
578
583
|
|
|
@@ -925,7 +930,13 @@ function getPooledEvent(dispatchConfig, targetInst, nativeEvent, nativeInst) {
|
|
|
925
930
|
|
|
926
931
|
function releasePooledEvent(event) {
|
|
927
932
|
var EventConstructor = this;
|
|
928
|
-
|
|
933
|
+
(function () {
|
|
934
|
+
if (!(event instanceof EventConstructor)) {
|
|
935
|
+
{
|
|
936
|
+
throw ReactError(Error('Trying to release an event instance into a pool of a different type.'));
|
|
937
|
+
}
|
|
938
|
+
}
|
|
939
|
+
})();
|
|
929
940
|
event.destructor();
|
|
930
941
|
if (EventConstructor.eventPool.length < EVENT_POOL_SIZE) {
|
|
931
942
|
EventConstructor.eventPool.push(event);
|
|
@@ -1039,7 +1050,13 @@ function resetTouchRecord(touchRecord, touch) {
|
|
|
1039
1050
|
function getTouchIdentifier(_ref) {
|
|
1040
1051
|
var identifier = _ref.identifier;
|
|
1041
1052
|
|
|
1042
|
-
|
|
1053
|
+
(function () {
|
|
1054
|
+
if (!(identifier != null)) {
|
|
1055
|
+
{
|
|
1056
|
+
throw ReactError(Error('Touch object is missing identifier.'));
|
|
1057
|
+
}
|
|
1058
|
+
}
|
|
1059
|
+
})();
|
|
1043
1060
|
{
|
|
1044
1061
|
!(identifier <= MAX_TOUCH_BANK) ? warningWithoutStack$1(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;
|
|
1045
1062
|
}
|
|
@@ -1069,7 +1086,7 @@ function recordTouchMove(touch) {
|
|
|
1069
1086
|
touchRecord.currentTimeStamp = timestampForTouch(touch);
|
|
1070
1087
|
touchHistory.mostRecentTimeStamp = timestampForTouch(touch);
|
|
1071
1088
|
} else {
|
|
1072
|
-
console.
|
|
1089
|
+
console.warn('Cannot record touch move without a touch start.\n' + 'Touch Move: %s\n', 'Touch Bank: %s', printTouch(touch), printTouchBank());
|
|
1073
1090
|
}
|
|
1074
1091
|
}
|
|
1075
1092
|
|
|
@@ -1085,7 +1102,7 @@ function recordTouchEnd(touch) {
|
|
|
1085
1102
|
touchRecord.currentTimeStamp = timestampForTouch(touch);
|
|
1086
1103
|
touchHistory.mostRecentTimeStamp = timestampForTouch(touch);
|
|
1087
1104
|
} else {
|
|
1088
|
-
console.
|
|
1105
|
+
console.warn('Cannot record touch end without a touch start.\n' + 'Touch End: %s\n', 'Touch Bank: %s', printTouch(touch), printTouchBank());
|
|
1089
1106
|
}
|
|
1090
1107
|
}
|
|
1091
1108
|
|
|
@@ -1147,7 +1164,13 @@ var ResponderTouchHistoryStore = {
|
|
|
1147
1164
|
* @return {*|array<*>} An accumulation of items.
|
|
1148
1165
|
*/
|
|
1149
1166
|
function accumulate(current, next) {
|
|
1150
|
-
|
|
1167
|
+
(function () {
|
|
1168
|
+
if (!(next != null)) {
|
|
1169
|
+
{
|
|
1170
|
+
throw ReactError(Error('accumulate(...): Accumulated items must not be null or undefined.'));
|
|
1171
|
+
}
|
|
1172
|
+
}
|
|
1173
|
+
})();
|
|
1151
1174
|
|
|
1152
1175
|
if (current == null) {
|
|
1153
1176
|
return next;
|
|
@@ -1651,7 +1674,7 @@ var ResponderEventPlugin = {
|
|
|
1651
1674
|
};
|
|
1652
1675
|
|
|
1653
1676
|
// Inject react-dom's ComponentTree into this module.
|
|
1654
|
-
// Keep in sync with ReactDOM.js and
|
|
1677
|
+
// Keep in sync with ReactDOM.js, ReactTestUtils.js, and ReactTestUtilsAct.js:
|
|
1655
1678
|
var _ReactDOM$__SECRET_IN = ReactDOM.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.Events;
|
|
1656
1679
|
var getInstanceFromNode = _ReactDOM$__SECRET_IN[0];
|
|
1657
1680
|
var getNodeFromInstance = _ReactDOM$__SECRET_IN[1];
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/** @license React v16.
|
|
1
|
+
/** @license React v16.9.0
|
|
2
2
|
* react-dom-unstable-native-dependencies.production.min.js
|
|
3
3
|
*
|
|
4
4
|
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
@@ -7,30 +7,29 @@
|
|
|
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");function
|
|
11
|
-
function
|
|
12
|
-
function
|
|
13
|
-
function
|
|
14
|
-
function y(a,b){
|
|
15
|
-
|
|
16
|
-
function A(a){if(a&&a.dispatchConfig.registrationName){var b=a._targetInst;if(b&&a&&a.dispatchConfig.registrationName){var c=y(b,a.dispatchConfig.registrationName);c&&(a._dispatchListeners=w(a._dispatchListeners,c),a._dispatchInstances=w(a._dispatchInstances,b))}}}function B(){return!0}function C(){return!1}
|
|
10
|
+
'use strict';var k=require("react-dom"),l=require("object-assign");function m(a){for(var b=a.message,c="https://reactjs.org/docs/error-decoder.html?invariant="+b,f=1;f<arguments.length;f++)c+="&args[]="+encodeURIComponent(arguments[f]);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 n=null,p=null,q=null;
|
|
11
|
+
function r(a){var b=a._dispatchListeners,c=a._dispatchInstances;if(Array.isArray(b))throw m(Error(103));a.currentTarget=b?q(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 f=[];a;)f.push(a),a=t(a);for(a=f.length;0<a--;)b(f[a],"captured",c);for(a=0;a<f.length;a++)b(f[a],"bubbled",c)}
|
|
12
|
+
function v(a,b){if(null==b)throw m(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 f=n(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;if(c&&"function"!==typeof c)throw m(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 aa(a){a&&a.dispatchConfig.phasedRegistrationNames&&u(a._targetInst,y,a)}function ba(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 B(){return!0}function C(){return!1}
|
|
17
16
|
function D(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)?B:C;this.isPropagationStopped=C;return this}
|
|
18
17
|
l(D.prototype,{preventDefault:function(){this.defaultPrevented=!0;var a=this.nativeEvent;a&&(a.preventDefault?a.preventDefault():"unknown"!==typeof a.returnValue&&(a.returnValue=!1),this.isDefaultPrevented=B)},stopPropagation:function(){var a=this.nativeEvent;a&&(a.stopPropagation?a.stopPropagation():"unknown"!==typeof a.cancelBubble&&(a.cancelBubble=!0),this.isPropagationStopped=B)},persist:function(){this.isPersistent=B},isPersistent:C,destructor:function(){var a=this.constructor.Interface,b;for(b in a)this[b]=
|
|
19
18
|
null;this.nativeEvent=this._targetInst=this.dispatchConfig=null;this.isPropagationStopped=this.isDefaultPrevented=C;this._dispatchInstances=this._dispatchListeners=null}});D.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};
|
|
20
|
-
D.extend=function(a){function b(){}function c(){return f.apply(this,arguments)}var f=this;b.prototype=f.prototype;var e=new b;l(e,c.prototype);c.prototype=e;c.prototype.constructor=c;c.Interface=l({},f.Interface,a);c.extend=f.extend;E(c);return c};E(D);function
|
|
21
|
-
function E(a){a.eventPool=[];a.getPooled=
|
|
22
|
-
function O(a){return a.timeStamp||a.timestamp}function P(a){a=a.identifier;null==a
|
|
23
|
-
function
|
|
24
|
-
function
|
|
25
|
-
function
|
|
19
|
+
D.extend=function(a){function b(){}function c(){return f.apply(this,arguments)}var f=this;b.prototype=f.prototype;var e=new b;l(e,c.prototype);c.prototype=e;c.prototype.constructor=c;c.Interface=l({},f.Interface,a);c.extend=f.extend;E(c);return c};E(D);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)}
|
|
20
|
+
function da(a){if(!(a instanceof this))throw m(Error(279));a.destructor();10>this.eventPool.length&&this.eventPool.push(a)}function E(a){a.eventPool=[];a.getPooled=ca;a.release=da}var F=D.extend({touchHistory:function(){return null}});function G(a){return"touchstart"===a||"mousedown"===a}function H(a){return"touchmove"===a||"mousemove"===a}function I(a){return"touchend"===a||"touchcancel"===a||"mouseup"===a}
|
|
21
|
+
var J=["touchstart","mousedown"],K=["touchmove","mousemove"],L=["touchcancel","touchend","mouseup"],M=[],N={touchBank:M,numberActiveTouches:0,indexOfSingleActiveTouch:-1,mostRecentTimeStamp:0};function O(a){return a.timeStamp||a.timestamp}function P(a){a=a.identifier;if(null==a)throw m(Error(138));return a}
|
|
22
|
+
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)}
|
|
23
|
+
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.warn("Cannot record touch move without a touch start.\nTouch Move: %s\n","Touch Bank: %s",Q(a),R())}
|
|
24
|
+
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.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)})}
|
|
26
25
|
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(H(a))b.changedTouches.forEach(
|
|
28
|
-
function T(a,b){null==b
|
|
26
|
+
var S={recordTouchTrack:function(a,b){if(H(a))b.changedTouches.forEach(fa);else if(G(a))b.changedTouches.forEach(ea),N.numberActiveTouches=b.touches.length,1===N.numberActiveTouches&&(N.indexOfSingleActiveTouch=b.touches[0].identifier);else if(I(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};
|
|
27
|
+
function T(a,b){if(null==b)throw m(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)}
|
|
29
28
|
var Y={startShouldSetResponder:{phasedRegistrationNames:{bubbled:"onStartShouldSetResponder",captured:"onStartShouldSetResponderCapture"},dependencies:J},scrollShouldSetResponder:{phasedRegistrationNames:{bubbled:"onScrollShouldSetResponder",captured:"onScrollShouldSetResponderCapture"},dependencies:["scroll"]},selectionChangeShouldSetResponder:{phasedRegistrationNames:{bubbled:"onSelectionChangeShouldSetResponder",captured:"onSelectionChangeShouldSetResponderCapture"},dependencies:["selectionchange"]},
|
|
30
29
|
moveShouldSetResponder:{phasedRegistrationNames:{bubbled:"onMoveShouldSetResponder",captured:"onMoveShouldSetResponderCapture"},dependencies:K},responderStart:{registrationName:"onResponderStart",dependencies:J},responderMove:{registrationName:"onResponderMove",dependencies:K},responderEnd:{registrationName:"onResponderEnd",dependencies:L},responderRelease:{registrationName:"onResponderRelease",dependencies:L},responderTerminationRequest:{registrationName:"onResponderTerminationRequest",dependencies:[]},
|
|
31
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,f){if(G(a))V+=1;else if(I(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&&("scroll"===a&&!c.responderIgnoreScroll||
|
|
32
|
-
0<V&&"selectionchange"===a||G(a)||H(a))){var e=G(a)?Y.startShouldSetResponder:H(a)?Y.moveShouldSetResponder:"selectionchange"===a?Y.selectionChangeShouldSetResponder:Y.scrollShouldSetResponder;if(U)b:{var d=U;for(var g=0,h=d;h;h=t(h))g++;h=0;for(var
|
|
33
|
-
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;d.isPersistent()||d.constructor.release(d);e&&e!==U?(d=void 0,b=F.getPooled(Y.responderGrant,e,c,f),b.touchHistory=S.touchHistory,
|
|
34
|
-
|
|
35
|
-
null!==g&&void 0!==g&&0!==g){h=p(g);b:{for(g=U;h;){if(g===h||g===h.alternate){g=!0;break b}h=t(h)}g=!1}if(g){a=!1;break a}}a=!0}if(a=d?Y.responderTerminate:a?Y.responderRelease:null)c=F.getPooled(a,U,c,f),c.touchHistory=S.touchHistory,
|
|
36
|
-
module.exports={ResponderEventPlugin:X,ResponderTouchHistoryStore:S,injectEventPluginsByName:
|
|
31
|
+
0<V&&"selectionchange"===a||G(a)||H(a))){var e=G(a)?Y.startShouldSetResponder:H(a)?Y.moveShouldSetResponder:"selectionchange"===a?Y.selectionChangeShouldSetResponder:Y.scrollShouldSetResponder;if(U)b:{var d=U;for(var g=0,h=d;h;h=t(h))g++;h=0;for(var A=b;A;A=t(A))h++;for(;0<g-h;)d=t(d),g--;for(;0<h-g;)b=t(b),h--;for(;g--;){if(d===b||d===b.alternate)break b;d=t(d);b=t(b)}d=null}else d=b;b=d===U;d=F.getPooled(e,d,c,f);d.touchHistory=S.touchHistory;b?w(d,ba):w(d,aa);b:{e=d._dispatchListeners;b=d._dispatchInstances;
|
|
32
|
+
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;d.isPersistent()||d.constructor.release(d);e&&e!==U?(d=void 0,b=F.getPooled(Y.responderGrant,e,c,f),b.touchHistory=S.touchHistory,w(b,z),g=!0===r(b),U?(h=F.getPooled(Y.responderTerminationRequest,U,c,f),h.touchHistory=S.touchHistory,w(h,z),A=!h._dispatchListeners||r(h),h.isPersistent()||h.constructor.release(h),
|
|
33
|
+
A?(h=F.getPooled(Y.responderTerminate,U,c,f),h.touchHistory=S.touchHistory,w(h,z),d=T(d,[b,h]),W(e,g)):(e=F.getPooled(Y.responderReject,e,c,f),e.touchHistory=S.touchHistory,w(e,z),d=T(d,e))):(d=T(d,b),W(e,g)),e=d):e=null}else e=null;d=U&&G(a);b=U&&H(a);g=U&&I(a);if(d=d?Y.responderStart:b?Y.responderMove:g?Y.responderEnd:null)d=F.getPooled(d,U,c,f),d.touchHistory=S.touchHistory,w(d,z),e=T(e,d);d=U&&"touchcancel"===a;if(a=U&&!d&&I(a))a:{if((a=c.touches)&&0!==a.length)for(b=0;b<a.length;b++)if(g=a[b].target,
|
|
34
|
+
null!==g&&void 0!==g&&0!==g){h=p(g);b:{for(g=U;h;){if(g===h||g===h.alternate){g=!0;break b}h=t(h)}g=!1}if(g){a=!1;break a}}a=!0}if(a=d?Y.responderTerminate:a?Y.responderRelease:null)c=F.getPooled(a,U,c,f),c.touchHistory=S.touchHistory,w(c,z),e=T(e,c),W(null);return e},GlobalResponderHandler:null,injection:{injectGlobalResponderHandler:function(a){X.GlobalResponderHandler=a}}},Z=k.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.Events,ia=Z[3],ja=Z[0],ka=Z[1];n=Z[2];p=ja;q=ka;
|
|
35
|
+
module.exports={ResponderEventPlugin:X,ResponderTouchHistoryStore:S,injectEventPluginsByName:ia};
|