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.
|
|
@@ -6,24 +6,25 @@
|
|
|
6
6
|
* This source code is licensed under the MIT license found in the
|
|
7
7
|
* LICENSE file in the root directory of this source tree.
|
|
8
8
|
*/
|
|
9
|
-
'use strict';(function(
|
|
10
|
-
function(){
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
!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;
|
|
16
|
-
b){return function(c,e){var d=new
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
function(a){
|
|
23
|
-
|
|
24
|
-
function(a){return
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
[
|
|
28
|
-
["
|
|
29
|
-
|
|
9
|
+
'use strict';(function(l,n){"object"===typeof exports&&"undefined"!==typeof module?module.exports=n(require("react"),require("react-dom")):"function"===typeof define&&define.amd?define(["react","react-dom"],n):l.ReactTestUtils=n(l.React,l.ReactDOM)})(this,function(l,n){function m(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. ";
|
|
10
|
+
return a}function F(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 G(a){if(2!==F(a))throw m(Error(188));}function Q(a){var b=a.alternate;if(!b){b=F(a);if(3===b)throw m(Error(188));return 1===b?null:a}for(var c=a,e=b;;){var d=c.return;if(null===d)break;var h=d.alternate;if(null===h){e=d.return;if(null!==e){c=e;continue}break}if(d.child===h.child){for(h=d.child;h;){if(h===
|
|
11
|
+
c)return G(d),a;if(h===e)return G(d),b;h=h.sibling}throw m(Error(188));}if(c.return!==e.return)c=d,e=h;else{for(var g=!1,f=d.child;f;){if(f===c){g=!0;c=d;e=h;break}if(f===e){g=!0;e=d;c=h;break}f=f.sibling}if(!g){for(f=h.child;f;){if(f===c){g=!0;c=h;e=d;break}if(f===e){g=!0;e=h;c=d;break}f=f.sibling}if(!g)throw m(Error(189));}}if(c.alternate!==e)throw m(Error(190));}if(3!==c.tag)throw m(Error(188));return c.stateNode.current===c?a:b}function u(){return!0}function v(){return!1}function r(a,b,c,e){this.dispatchConfig=
|
|
12
|
+
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)?u:v;this.isPropagationStopped=v;return this}function R(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)}function S(a){if(!(a instanceof this))throw m(Error(279));a.destructor();
|
|
13
|
+
10>this.eventPool.length&&this.eventPool.push(a)}function H(a){a.eventPool=[];a.getPooled=R;a.release=S}function w(a,b){var c={};c[a.toLowerCase()]=b.toLowerCase();c["Webkit"+a]="webkit"+b;c["Moz"+a]="moz"+b;return c}function x(a){if(A[a])return A[a];if(!p[a])return a;var b=p[a],c;for(c in b)if(b.hasOwnProperty(c)&&c in I)return A[a]=b[c];return a}function J(a){try{B(),T(function(){B()?J(a):a()})}catch(b){a(b)}}function U(a){function b(){y--;C.current=c;D.current=e}!1===K&&(K=!0,console.error("act(...) is not supported in production builds of React, and might not behave as expected."));
|
|
14
|
+
var c=void 0,e=void 0;y++;c=C.current;e=D.current;C.current=!0;D.current=!0;var d=void 0;try{d=V(a)}catch(h){throw b(),h;}if(null!==d&&"object"===typeof d&&"function"===typeof d.then)return{then:function(a,e){d.then(function(){1<y||!0===L&&!0===c?(b(),a()):J(function(c){b();c?e(c):a()})},function(a){b();e(a)})}};try{1!==y||!1!==L&&!1!==c||B(),b()}catch(h){throw b(),h;}return{then:function(a){a()}}}function M(a){}function W(a,b){if(!a)return[];a=Q(a);if(!a)return[];for(var c=a,e=[];;){if(5===c.tag||
|
|
15
|
+
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}}}function k(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 m(Error(286),b,a);}}function X(a){return function(b,c){if(l.isValidElement(b))throw m(Error(228));
|
|
16
|
+
if(f.isCompositeComponent(b))throw m(Error(229));var e=N[a],d=new M;d.target=b;d.type=a.toLowerCase();var g=Y(b),k=new r(e,g,d,b);k.persist();t(k,c);e.phasedRegistrationNames?Z(k):aa(k);n.unstable_batchedUpdates(function(){ba(b);ca(k)});da()}}function ea(a,b){return function(c,e){var d=new M(a);t(d,e);f.isDOMComponent(c)?(c=fa(c),d.target=c,O(b,1,d)):c.tagName&&(d.target=c,O(b,1,d))}}var t=l.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.assign,g=l.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
|
|
17
|
+
g.hasOwnProperty("ReactCurrentDispatcher")||(g.ReactCurrentDispatcher={current:null});g.hasOwnProperty("ReactCurrentBatchConfig")||(g.ReactCurrentBatchConfig={suspense:null});t(r.prototype,{preventDefault:function(){this.defaultPrevented=!0;var a=this.nativeEvent;a&&(a.preventDefault?a.preventDefault():"unknown"!==typeof a.returnValue&&(a.returnValue=!1),this.isDefaultPrevented=u)},stopPropagation:function(){var a=this.nativeEvent;a&&(a.stopPropagation?a.stopPropagation():"unknown"!==typeof a.cancelBubble&&
|
|
18
|
+
(a.cancelBubble=!0),this.isPropagationStopped=u)},persist:function(){this.isPersistent=u},isPersistent:v,destructor:function(){var a=this.constructor.Interface,b;for(b in a)this[b]=null;this.nativeEvent=this._targetInst=this.dispatchConfig=null;this.isPropagationStopped=this.isDefaultPrevented=v;this._dispatchInstances=this._dispatchListeners=null}});r.Interface={type:null,target:null,currentTarget:function(){return null},eventPhase:null,bubbles:null,cancelable:null,timeStamp:function(a){return a.timeStamp||
|
|
19
|
+
Date.now()},defaultPrevented:null,isTrusted:null};r.extend=function(a){function b(){return c.apply(this,arguments)}var c=this,e=function(){};e.prototype=c.prototype;e=new e;t(e,b.prototype);b.prototype=e;b.prototype.constructor=b;b.Interface=t({},c.Interface,a);b.extend=c.extend;H(b);return b};H(r);var E=!("undefined"===typeof window||"undefined"===typeof window.document||"undefined"===typeof window.document.createElement),p={animationend:w("Animation","AnimationEnd"),animationiteration:w("Animation",
|
|
20
|
+
"AnimationIteration"),animationstart:w("Animation","AnimationStart"),transitionend:w("Transition","TransitionEnd")},A={},I={};E&&(I=document.createElement("div").style,"AnimationEvent"in window||(delete p.animationend.animation,delete p.animationiteration.animation,delete p.animationstart.animation),"TransitionEvent"in window||delete p.transitionend.transition);E=x("animationend");var ha=x("animationiteration"),ia=x("animationstart"),ja=x("transitionend"),q=void 0;try{var z=("require"+Math.random()).slice(0,
|
|
21
|
+
7);q=(module&&module[z])("timers").setImmediate}catch(a){q=function(a){var b=new MessageChannel;b.port1.onmessage=a;b.port2.postMessage(void 0)}}var T=q;z=l.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.Scheduler.unstable_flushAllWithoutAsserting;q=n.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.Events;var ka=q[11],D=q[12],V=n.unstable_batchedUpdates,C=g.IsSomeRendererActing,L="function"===typeof z,B=z||function(){for(var a=!1;ka();)a=!0;return a},y=0,K=!1,fa=n.findDOMNode;g=n.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.Events;
|
|
22
|
+
var Y=g[0],N=g[4],Z=g[5],aa=g[6],ba=g[7],da=g[8],O=g[9],ca=g[10],P=null,f={renderIntoDocument:function(a){var b=document.createElement("div");return n.render(a,b)},isElement:function(a){return l.isValidElement(a)},isElementOfType:function(a,b){return l.isValidElement(a)&&a.type===b},isDOMComponent:function(a){return!(!a||1!==a.nodeType||!a.tagName)},isDOMComponentElement:function(a){return!!(a&&l.isValidElement(a)&&a.tagName)},isCompositeComponent:function(a){return f.isDOMComponent(a)?!1:null!=a&&
|
|
23
|
+
"function"===typeof a.render&&"function"===typeof a.setState},isCompositeComponentWithType:function(a,b){return f.isCompositeComponent(a)?a._reactInternalFiber.type===b:!1},findAllInRenderedTree:function(a,b){k(a,"findAllInRenderedTree");return a?W(a._reactInternalFiber,b):[]},scryRenderedDOMComponentsWithClass:function(a,b){k(a,"scryRenderedDOMComponentsWithClass");return f.findAllInRenderedTree(a,function(a){if(f.isDOMComponent(a)){var c=a.className;"string"!==typeof c&&(c=a.getAttribute("class")||
|
|
24
|
+
"");var d=c.split(/\s+/);if(!Array.isArray(b)){if(void 0===b)throw m(Error(11));b=b.split(/\s+/)}return b.every(function(a){return-1!==d.indexOf(a)})}return!1})},findRenderedDOMComponentWithClass:function(a,b){k(a,"findRenderedDOMComponentWithClass");a=f.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){k(a,"scryRenderedDOMComponentsWithTag");return f.findAllInRenderedTree(a,
|
|
25
|
+
function(a){return f.isDOMComponent(a)&&a.tagName.toUpperCase()===b.toUpperCase()})},findRenderedDOMComponentWithTag:function(a,b){k(a,"findRenderedDOMComponentWithTag");a=f.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){k(a,"scryRenderedComponentsWithType");return f.findAllInRenderedTree(a,function(a){return f.isCompositeComponentWithType(a,b)})},findRenderedComponentWithType:function(a,
|
|
26
|
+
b){k(a,"findRenderedComponentWithType");a=f.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 l.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===P&&(P=document.createElement("div"));
|
|
27
|
+
return U(a)}};(function(){f.Simulate={};var a=void 0;for(a in N)f.Simulate[a]=X(a)})();[["abort","abort"],[E,"animationEnd"],[ha,"animationIteration"],[ia,"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"],
|
|
28
|
+
["dblclick","doubleClick"],["dragend","dragEnd"],["dragenter","dragEnter"],["dragexit","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",
|
|
29
|
+
"loadedData"],["loadedmetadata","loadedMetadata"],["mousedown","mouseDown"],["mousemove","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",
|
|
30
|
+
"toggle"],["touchcancel","touchCancel"],["touchend","touchEnd"],["touchmove","touchMove"],["touchstart","touchStart"],[ja,"transitionEnd"],["volumechange","volumeChange"],["waiting","waiting"],["wheel","wheel"]].forEach(function(a){var b=a[1];f.SimulateNative[b]=ea(b,a[0])});g=(g={default:f},f)||g;return g.default||g});
|
|
@@ -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-native-dependencies.development.js
|
|
3
3
|
*
|
|
4
4
|
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
@@ -15,6 +15,19 @@
|
|
|
15
15
|
(global.ReactDOMUnstableNativeDependencies = factory(global.ReactDOM,global.React));
|
|
16
16
|
}(this, (function (ReactDOM,React) { 'use strict';
|
|
17
17
|
|
|
18
|
+
// Do not require this module directly! Use normal `invariant` calls with
|
|
19
|
+
// template literal strings. The messages will be converted to ReactError during
|
|
20
|
+
// build, and in production they will be minified.
|
|
21
|
+
|
|
22
|
+
// Do not require this module directly! Use normal `invariant` calls with
|
|
23
|
+
// template literal strings. The messages will be converted to ReactError during
|
|
24
|
+
// build, and in production they will be minified.
|
|
25
|
+
|
|
26
|
+
function ReactError(error) {
|
|
27
|
+
error.name = 'Invariant Violation';
|
|
28
|
+
return error;
|
|
29
|
+
}
|
|
30
|
+
|
|
18
31
|
/**
|
|
19
32
|
* Use invariant() to assert state which your program assumes to be true.
|
|
20
33
|
*
|
|
@@ -26,40 +39,6 @@
|
|
|
26
39
|
* will remain to ensure logic does not differ in production.
|
|
27
40
|
*/
|
|
28
41
|
|
|
29
|
-
var validateFormat = function () {};
|
|
30
|
-
|
|
31
|
-
{
|
|
32
|
-
validateFormat = function (format) {
|
|
33
|
-
if (format === undefined) {
|
|
34
|
-
throw new Error('invariant requires an error message argument');
|
|
35
|
-
}
|
|
36
|
-
};
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
function invariant(condition, format, a, b, c, d, e, f) {
|
|
40
|
-
validateFormat(format);
|
|
41
|
-
|
|
42
|
-
if (!condition) {
|
|
43
|
-
var error = void 0;
|
|
44
|
-
if (format === undefined) {
|
|
45
|
-
error = new Error('Minified exception occurred; use the non-minified dev environment ' + 'for the full error message and additional helpful warnings.');
|
|
46
|
-
} else {
|
|
47
|
-
var args = [a, b, c, d, e, f];
|
|
48
|
-
var argIndex = 0;
|
|
49
|
-
error = new Error(format.replace(/%s/g, function () {
|
|
50
|
-
return args[argIndex++];
|
|
51
|
-
}));
|
|
52
|
-
error.name = 'Invariant Violation';
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
error.framesToPop = 1; // we don't care about invariant's own frame
|
|
56
|
-
throw error;
|
|
57
|
-
}
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
// Relying on the `invariant()` implementation lets us
|
|
61
|
-
// preserve the format and params in the www builds.
|
|
62
|
-
|
|
63
42
|
{
|
|
64
43
|
// In DEV mode, we swap out invokeGuardedCallback for a special version
|
|
65
44
|
// that plays more nicely with the browser's DevTools. The idea is to preserve
|
|
@@ -200,6 +179,14 @@ var validateEventDispatches = void 0;
|
|
|
200
179
|
};
|
|
201
180
|
}
|
|
202
181
|
|
|
182
|
+
/**
|
|
183
|
+
* Dispatch the event to the listener.
|
|
184
|
+
* @param {SyntheticEvent} event SyntheticEvent to handle
|
|
185
|
+
* @param {function} listener Application-level callback
|
|
186
|
+
* @param {*} inst Internal component instance
|
|
187
|
+
*/
|
|
188
|
+
|
|
189
|
+
|
|
203
190
|
/**
|
|
204
191
|
* Standard/simple iteration through an event's collected dispatches.
|
|
205
192
|
*/
|
|
@@ -261,7 +248,13 @@ function executeDirectDispatch(event) {
|
|
|
261
248
|
}
|
|
262
249
|
var dispatchListener = event._dispatchListeners;
|
|
263
250
|
var dispatchInstance = event._dispatchInstances;
|
|
264
|
-
|
|
251
|
+
(function () {
|
|
252
|
+
if (!!Array.isArray(dispatchListener)) {
|
|
253
|
+
{
|
|
254
|
+
throw ReactError(Error('executeDirectDispatch(...): Invalid `event`.'));
|
|
255
|
+
}
|
|
256
|
+
}
|
|
257
|
+
})();
|
|
265
258
|
event.currentTarget = dispatchListener ? getNodeFromInstance$1(dispatchInstance) : null;
|
|
266
259
|
var res = dispatchListener ? dispatchListener(event) : null;
|
|
267
260
|
event.currentTarget = null;
|
|
@@ -453,7 +446,13 @@ function traverseTwoPhase(inst, fn, arg) {
|
|
|
453
446
|
*/
|
|
454
447
|
|
|
455
448
|
function accumulateInto(current, next) {
|
|
456
|
-
|
|
449
|
+
(function () {
|
|
450
|
+
if (!(next != null)) {
|
|
451
|
+
{
|
|
452
|
+
throw ReactError(Error('accumulateInto(...): Accumulated items must not be null or undefined.'));
|
|
453
|
+
}
|
|
454
|
+
}
|
|
455
|
+
})();
|
|
457
456
|
|
|
458
457
|
if (current == null) {
|
|
459
458
|
return next;
|
|
@@ -569,7 +568,13 @@ function getListener(inst, registrationName) {
|
|
|
569
568
|
if (shouldPreventMouseEvent(registrationName, inst.type, props)) {
|
|
570
569
|
return null;
|
|
571
570
|
}
|
|
572
|
-
|
|
571
|
+
(function () {
|
|
572
|
+
if (!(!listener || typeof listener === 'function')) {
|
|
573
|
+
{
|
|
574
|
+
throw ReactError(Error('Expected `' + registrationName + '` listener to be a function, instead got a value of `' + typeof listener + '` type.'));
|
|
575
|
+
}
|
|
576
|
+
}
|
|
577
|
+
})();
|
|
573
578
|
return listener;
|
|
574
579
|
}
|
|
575
580
|
|
|
@@ -926,7 +931,13 @@ function getPooledEvent(dispatchConfig, targetInst, nativeEvent, nativeInst) {
|
|
|
926
931
|
|
|
927
932
|
function releasePooledEvent(event) {
|
|
928
933
|
var EventConstructor = this;
|
|
929
|
-
|
|
934
|
+
(function () {
|
|
935
|
+
if (!(event instanceof EventConstructor)) {
|
|
936
|
+
{
|
|
937
|
+
throw ReactError(Error('Trying to release an event instance into a pool of a different type.'));
|
|
938
|
+
}
|
|
939
|
+
}
|
|
940
|
+
})();
|
|
930
941
|
event.destructor();
|
|
931
942
|
if (EventConstructor.eventPool.length < EVENT_POOL_SIZE) {
|
|
932
943
|
EventConstructor.eventPool.push(event);
|
|
@@ -1040,7 +1051,13 @@ function resetTouchRecord(touchRecord, touch) {
|
|
|
1040
1051
|
function getTouchIdentifier(_ref) {
|
|
1041
1052
|
var identifier = _ref.identifier;
|
|
1042
1053
|
|
|
1043
|
-
|
|
1054
|
+
(function () {
|
|
1055
|
+
if (!(identifier != null)) {
|
|
1056
|
+
{
|
|
1057
|
+
throw ReactError(Error('Touch object is missing identifier.'));
|
|
1058
|
+
}
|
|
1059
|
+
}
|
|
1060
|
+
})();
|
|
1044
1061
|
{
|
|
1045
1062
|
!(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;
|
|
1046
1063
|
}
|
|
@@ -1070,7 +1087,7 @@ function recordTouchMove(touch) {
|
|
|
1070
1087
|
touchRecord.currentTimeStamp = timestampForTouch(touch);
|
|
1071
1088
|
touchHistory.mostRecentTimeStamp = timestampForTouch(touch);
|
|
1072
1089
|
} else {
|
|
1073
|
-
console.
|
|
1090
|
+
console.warn('Cannot record touch move without a touch start.\n' + 'Touch Move: %s\n', 'Touch Bank: %s', printTouch(touch), printTouchBank());
|
|
1074
1091
|
}
|
|
1075
1092
|
}
|
|
1076
1093
|
|
|
@@ -1086,7 +1103,7 @@ function recordTouchEnd(touch) {
|
|
|
1086
1103
|
touchRecord.currentTimeStamp = timestampForTouch(touch);
|
|
1087
1104
|
touchHistory.mostRecentTimeStamp = timestampForTouch(touch);
|
|
1088
1105
|
} else {
|
|
1089
|
-
console.
|
|
1106
|
+
console.warn('Cannot record touch end without a touch start.\n' + 'Touch End: %s\n', 'Touch Bank: %s', printTouch(touch), printTouchBank());
|
|
1090
1107
|
}
|
|
1091
1108
|
}
|
|
1092
1109
|
|
|
@@ -1148,7 +1165,13 @@ var ResponderTouchHistoryStore = {
|
|
|
1148
1165
|
* @return {*|array<*>} An accumulation of items.
|
|
1149
1166
|
*/
|
|
1150
1167
|
function accumulate(current, next) {
|
|
1151
|
-
|
|
1168
|
+
(function () {
|
|
1169
|
+
if (!(next != null)) {
|
|
1170
|
+
{
|
|
1171
|
+
throw ReactError(Error('accumulate(...): Accumulated items must not be null or undefined.'));
|
|
1172
|
+
}
|
|
1173
|
+
}
|
|
1174
|
+
})();
|
|
1152
1175
|
|
|
1153
1176
|
if (current == null) {
|
|
1154
1177
|
return next;
|
|
@@ -1652,7 +1675,7 @@ var ResponderEventPlugin = {
|
|
|
1652
1675
|
};
|
|
1653
1676
|
|
|
1654
1677
|
// Inject react-dom's ComponentTree into this module.
|
|
1655
|
-
// Keep in sync with ReactDOM.js and
|
|
1678
|
+
// Keep in sync with ReactDOM.js, ReactTestUtils.js, and ReactTestUtilsAct.js:
|
|
1656
1679
|
var _ReactDOM$__SECRET_IN = ReactDOM.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.Events;
|
|
1657
1680
|
var getInstanceFromNode = _ReactDOM$__SECRET_IN[0];
|
|
1658
1681
|
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.
|
|
@@ -6,25 +6,24 @@
|
|
|
6
6
|
* This source code is licensed under the MIT license found in the
|
|
7
7
|
* LICENSE file in the root directory of this source tree.
|
|
8
8
|
*/
|
|
9
|
-
'use strict';(function(n,p){"object"===typeof exports&&"undefined"!==typeof module?module.exports=p(require("react-dom"),require("react")):"function"===typeof define&&define.amd?define(["react-dom","react"],p):n.ReactDOMUnstableNativeDependencies=p(n.ReactDOM,n.React)})(this,function(n,p){function
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
a
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
b
|
|
28
|
-
|
|
29
|
-
null)d=w.getPooled(d,k,c,f),d.touchHistory=u.touchHistory,v(d,y),e=B(e,d);d=k&&"touchcancel"===a;if(a=k&&!d&&G(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=V(g);b:{for(g=k;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?m.responderTerminate:a?m.responderRelease:null)c=w.getPooled(a,k,c,f),c.touchHistory=u.touchHistory,v(c,y),e=B(e,c),L(null);return e},GlobalResponderHandler:null,injection:{injectGlobalResponderHandler:function(a){I.GlobalResponderHandler=
|
|
9
|
+
'use strict';(function(n,p){"object"===typeof exports&&"undefined"!==typeof module?module.exports=p(require("react-dom"),require("react")):"function"===typeof define&&define.amd?define(["react-dom","react"],p):n.ReactDOMUnstableNativeDependencies=p(n.ReactDOM,n.React)})(this,function(n,p){function x(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 "+
|
|
10
|
+
c+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings. ";return a}function M(a){var b=a._dispatchListeners,c=a._dispatchInstances;if(Array.isArray(b))throw x(Error(103));a.currentTarget=b?N(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 O(a,b,c){for(var f=[];a;)f.push(a),a=t(a);for(a=f.length;0<a--;)b(f[a],"captured",
|
|
11
|
+
c);for(a=0;a<f.length;a++)b(f[a],"bubbled",c)}function C(a,b){if(null==b)throw x(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 v(a,b,c){Array.isArray(a)?a.forEach(b,c):a&&b.call(c,a)}function P(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=
|
|
12
|
+
!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 x(Error(231),b,typeof c);return c}function R(a,b,c){if(b=P(a,c.dispatchConfig.phasedRegistrationNames[b]))c._dispatchListeners=C(c._dispatchListeners,b),c._dispatchInstances=C(c._dispatchInstances,a)}function Y(a){a&&a.dispatchConfig.phasedRegistrationNames&&O(a._targetInst,R,a)}function Z(a){if(a&&a.dispatchConfig.phasedRegistrationNames){var b=
|
|
13
|
+
a._targetInst;b=b?t(b):null;O(b,R,a)}}function y(a){if(a&&a.dispatchConfig.registrationName){var b=a._targetInst;if(b&&a&&a.dispatchConfig.registrationName){var c=P(b,a.dispatchConfig.registrationName);c&&(a._dispatchListeners=C(a._dispatchListeners,c),a._dispatchInstances=C(a._dispatchInstances,b))}}}function D(){return!0}function E(){return!1}function z(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])?
|
|
14
|
+
this[e]=b(c):"target"===e?this.target=f:this[e]=c[e]);this.isDefaultPrevented=(null!=c.defaultPrevented?c.defaultPrevented:!1===c.returnValue)?D:E;this.isPropagationStopped=E;return this}function aa(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 ba(a){if(!(a instanceof this))throw x(Error(279));a.destructor();10>this.eventPool.length&&this.eventPool.push(a)}function S(a){a.eventPool=[];a.getPooled=aa;a.release=ba}function A(a){return"touchstart"===
|
|
15
|
+
a||"mousedown"===a}function F(a){return"touchmove"===a||"mousemove"===a}function G(a){return"touchend"===a||"touchcancel"===a||"mouseup"===a}function k(a){return a.timeStamp||a.timestamp}function J(a){a=a.identifier;if(null==a)throw x(Error(138));return a}function ca(a){var b=J(a),c=q[b];c?(c.touchActive=!0,c.startPageX=a.pageX,c.startPageY=a.pageY,c.startTimeStamp=k(a),c.currentPageX=a.pageX,c.currentPageY=a.pageY,c.currentTimeStamp=k(a),c.previousPageX=a.pageX,c.previousPageY=a.pageY,c.previousTimeStamp=
|
|
16
|
+
k(a)):(c={touchActive:!0,startPageX:a.pageX,startPageY:a.pageY,startTimeStamp:k(a),currentPageX:a.pageX,currentPageY:a.pageY,currentTimeStamp:k(a),previousPageX:a.pageX,previousPageY:a.pageY,previousTimeStamp:k(a)},q[b]=c);r.mostRecentTimeStamp=k(a)}function da(a){var b=q[J(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=k(a),r.mostRecentTimeStamp=k(a)):console.warn("Cannot record touch move without a touch start.\nTouch Move: %s\n",
|
|
17
|
+
"Touch Bank: %s",T(a),U())}function ea(a){var b=q[J(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=k(a),r.mostRecentTimeStamp=k(a)):console.warn("Cannot record touch end without a touch start.\nTouch End: %s\n","Touch Bank: %s",T(a),U())}function T(a){return JSON.stringify({identifier:a.identifier,pageX:a.pageX,pageY:a.pageY,timestamp:k(a)})}function U(){var a=
|
|
18
|
+
JSON.stringify(q.slice(0,20));20<q.length&&(a+=" (original size: "+q.length+")");return a}function B(a,b){if(null==b)throw x(Error(334));return null==a?b:Array.isArray(a)?a.concat(b):Array.isArray(b)?[a].concat(b):[a,b]}var Q=null,V=null,N=null,K=p.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.assign;K(z.prototype,{preventDefault:function(){this.defaultPrevented=!0;var a=this.nativeEvent;a&&(a.preventDefault?a.preventDefault():"unknown"!==typeof a.returnValue&&(a.returnValue=!1),this.isDefaultPrevented=
|
|
19
|
+
D)},stopPropagation:function(){var a=this.nativeEvent;a&&(a.stopPropagation?a.stopPropagation():"unknown"!==typeof a.cancelBubble&&(a.cancelBubble=!0),this.isPropagationStopped=D)},persist:function(){this.isPersistent=D},isPersistent:E,destructor:function(){var a=this.constructor.Interface,b;for(b in a)this[b]=null;this.nativeEvent=this._targetInst=this.dispatchConfig=null;this.isPropagationStopped=this.isDefaultPrevented=E;this._dispatchInstances=this._dispatchListeners=null}});z.Interface={type:null,
|
|
20
|
+
target:null,currentTarget:function(){return null},eventPhase:null,bubbles:null,cancelable:null,timeStamp:function(a){return a.timeStamp||Date.now()},defaultPrevented:null,isTrusted:null};z.extend=function(a){function b(){return c.apply(this,arguments)}var c=this,f=function(){};f.prototype=c.prototype;f=new f;K(f,b.prototype);b.prototype=f;b.prototype.constructor=b;b.Interface=K({},c.Interface,a);b.extend=c.extend;S(b);return b};S(z);var w=z.extend({touchHistory:function(a){return null}});p=["touchstart",
|
|
21
|
+
"mousedown"];var W=["touchmove","mousemove"],X=["touchcancel","touchend","mouseup"],q=[],r={touchBank:q,numberActiveTouches:0,indexOfSingleActiveTouch:-1,mostRecentTimeStamp:0},u={recordTouchTrack:function(a,b){if(F(a))b.changedTouches.forEach(da);else if(A(a))b.changedTouches.forEach(ca),r.numberActiveTouches=b.touches.length,1===r.numberActiveTouches&&(r.indexOfSingleActiveTouch=b.touches[0].identifier);else if(G(a)&&(b.changedTouches.forEach(ea),r.numberActiveTouches=b.touches.length,1===r.numberActiveTouches))for(a=
|
|
22
|
+
0;a<q.length;a++)if(b=q[a],null!=b&&b.touchActive){r.indexOfSingleActiveTouch=a;break}},touchHistory:r},l=null,H=0,L=function(a,b){var c=l;l=a;if(null!==I.GlobalResponderHandler)I.GlobalResponderHandler.onChange(c,a,b)},m={startShouldSetResponder:{phasedRegistrationNames:{bubbled:"onStartShouldSetResponder",captured:"onStartShouldSetResponderCapture"},dependencies:p},scrollShouldSetResponder:{phasedRegistrationNames:{bubbled:"onScrollShouldSetResponder",captured:"onScrollShouldSetResponderCapture"},
|
|
23
|
+
dependencies:["scroll"]},selectionChangeShouldSetResponder:{phasedRegistrationNames:{bubbled:"onSelectionChangeShouldSetResponder",captured:"onSelectionChangeShouldSetResponderCapture"},dependencies:["selectionchange"]},moveShouldSetResponder:{phasedRegistrationNames:{bubbled:"onMoveShouldSetResponder",captured:"onMoveShouldSetResponderCapture"},dependencies:W},responderStart:{registrationName:"onResponderStart",dependencies:p},responderMove:{registrationName:"onResponderMove",dependencies:W},responderEnd:{registrationName:"onResponderEnd",
|
|
24
|
+
dependencies:X},responderRelease:{registrationName:"onResponderRelease",dependencies:X},responderTerminationRequest:{registrationName:"onResponderTerminationRequest",dependencies:[]},responderGrant:{registrationName:"onResponderGrant",dependencies:[]},responderReject:{registrationName:"onResponderReject",dependencies:[]},responderTerminate:{registrationName:"onResponderTerminate",dependencies:[]}},I={_getResponder:function(){return l},eventTypes:m,extractEvents:function(a,b,c,f){if(A(a))H+=1;else if(G(a))if(0<=
|
|
25
|
+
H)--H;else return console.error("Ended a touch event which was not counted in `trackedTouchCount`."),null;u.recordTouchTrack(a,c);if(b&&("scroll"===a&&!c.responderIgnoreScroll||0<H&&"selectionchange"===a||A(a)||F(a))){var e=A(a)?m.startShouldSetResponder:F(a)?m.moveShouldSetResponder:"selectionchange"===a?m.selectionChangeShouldSetResponder:m.scrollShouldSetResponder;if(l)b:{var d=l;for(var g=0,h=d;h;h=t(h))g++;h=0;for(var k=b;k;k=t(k))h++;for(;0<g-h;)d=t(d),g--;for(;0<h-g;)b=t(b),h--;for(;g--;){if(d===
|
|
26
|
+
b||d===b.alternate)break b;d=t(d);b=t(b)}d=null}else d=b;b=d===l;d=w.getPooled(e,d,c,f);d.touchHistory=u.touchHistory;b?v(d,Z):v(d,Y);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;d.isPersistent()||d.constructor.release(d);e&&e!==l?(d=void 0,b=w.getPooled(m.responderGrant,e,c,f),b.touchHistory=u.touchHistory,
|
|
27
|
+
v(b,y),g=!0===M(b),l?(h=w.getPooled(m.responderTerminationRequest,l,c,f),h.touchHistory=u.touchHistory,v(h,y),k=!h._dispatchListeners||M(h),h.isPersistent()||h.constructor.release(h),k?(h=w.getPooled(m.responderTerminate,l,c,f),h.touchHistory=u.touchHistory,v(h,y),d=B(d,[b,h]),L(e,g)):(e=w.getPooled(m.responderReject,e,c,f),e.touchHistory=u.touchHistory,v(e,y),d=B(d,e))):(d=B(d,b),L(e,g)),e=d):e=null}else e=null;d=l&&A(a);b=l&&F(a);g=l&&G(a);if(d=d?m.responderStart:b?m.responderMove:g?m.responderEnd:
|
|
28
|
+
null)d=w.getPooled(d,l,c,f),d.touchHistory=u.touchHistory,v(d,y),e=B(e,d);d=l&&"touchcancel"===a;if(a=l&&!d&&G(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=V(g);b:{for(g=l;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?m.responderTerminate:a?m.responderRelease:null)c=w.getPooled(a,l,c,f),c.touchHistory=u.touchHistory,v(c,y),e=B(e,c),L(null);return e},GlobalResponderHandler:null,injection:{injectGlobalResponderHandler:function(a){I.GlobalResponderHandler=
|
|
30
29
|
a}}};n=n.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.Events;p=n[3];(function(a,b,c){Q=a;V=b;N=c})(n[2],n[0],n[1]);return{ResponderEventPlugin:I,ResponderTouchHistoryStore:u,injectEventPluginsByName:p}});
|