react-dom 17.0.0-rc.2 → 17.0.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/build-info.json +5 -5
- package/cjs/react-dom-server.browser.development.js +2 -2
- package/cjs/react-dom-server.browser.production.min.js +2 -2
- package/cjs/react-dom-server.node.development.js +2 -2
- package/cjs/react-dom-server.node.production.min.js +2 -2
- package/cjs/react-dom-test-utils.development.js +131 -101
- package/cjs/react-dom-test-utils.production.min.js +33 -33
- package/cjs/react-dom.development.js +931 -973
- package/cjs/react-dom.production.min.js +284 -287
- package/cjs/react-dom.profiling.min.js +278 -280
- package/package.json +3 -3
- package/umd/react-dom-server.browser.development.js +2 -2
- package/umd/react-dom-server.browser.production.min.js +2 -2
- package/umd/react-dom-test-utils.development.js +131 -101
- package/umd/react-dom-test-utils.production.min.js +27 -27
- package/umd/react-dom.development.js +931 -973
- package/umd/react-dom.production.min.js +234 -233
- package/umd/react-dom.profiling.min.js +240 -242
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "react-dom",
|
|
3
|
-
"version": "17.0.
|
|
3
|
+
"version": "17.0.2",
|
|
4
4
|
"description": "React package for working with the DOM.",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"repository": {
|
|
@@ -19,10 +19,10 @@
|
|
|
19
19
|
"dependencies": {
|
|
20
20
|
"loose-envify": "^1.1.0",
|
|
21
21
|
"object-assign": "^4.1.1",
|
|
22
|
-
"scheduler": "0.20.
|
|
22
|
+
"scheduler": "^0.20.2"
|
|
23
23
|
},
|
|
24
24
|
"peerDependencies": {
|
|
25
|
-
"react": "17.0.
|
|
25
|
+
"react": "17.0.2"
|
|
26
26
|
},
|
|
27
27
|
"files": [
|
|
28
28
|
"LICENSE",
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/** @license React v17.0.
|
|
1
|
+
/** @license React v17.0.2
|
|
2
2
|
* react-dom-server.browser.development.js
|
|
3
3
|
*
|
|
4
4
|
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
}
|
|
27
27
|
|
|
28
28
|
// TODO: this is special because it gets imported during build.
|
|
29
|
-
var ReactVersion = '17.0.
|
|
29
|
+
var ReactVersion = '17.0.2';
|
|
30
30
|
|
|
31
31
|
var ReactSharedInternals = React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
|
|
32
32
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/** @license React v17.0.
|
|
1
|
+
/** @license React v17.0.2
|
|
2
2
|
* react-dom-server.browser.production.min.js
|
|
3
3
|
*
|
|
4
4
|
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
@@ -42,5 +42,5 @@ var g=Ja(d.children);if(null!=e){var l=null!=d.value?d.value+"":g;h=!1;if(Array.
|
|
|
42
42
|
}if(null!=h.style&&"object"!==typeof h.style)throw Error(t(62));}h=d;e=this.makeStaticMarkup;g=1===this.stack.length;l="<"+a.type;b:if(-1===c.indexOf("-"))n="string"===typeof h.is;else switch(c){case "annotation-xml":case "color-profile":case "font-face":case "font-face-src":case "font-face-uri":case "font-face-format":case "font-face-name":case "missing-glyph":n=!1;break b;default:n=!0}for(y in h)if(Sa.call(h,y)){var m=h[y];if(null!=m){if("style"===y){var p=void 0,q="",r="";for(p in m)if(m.hasOwnProperty(p)){var x=
|
|
43
43
|
0===p.indexOf("--"),u=m[p];if(null!=u){if(x)var v=p;else if(v=p,da.hasOwnProperty(v))v=da[v];else{var A=v.replace(Oa,"-$1").toLowerCase().replace(Pa,"-ms-");v=da[v]=A}q+=r+v+":";r=p;x=null==u||"boolean"===typeof u||""===u?"":x||"number"!==typeof u||0===u||H.hasOwnProperty(r)&&H[r]?(""+u).trim():u+"px";q+=x;r=";"}}m=q||null}p=null;n?Ta.hasOwnProperty(y)||(p=y,p=ha(p)&&null!=m?p+'="'+(C(m)+'"'):""):p=Fa(y,m);p&&(l+=" "+p)}}e||g&&(l+=' data-reactroot=""');var y=l;h="";xa.hasOwnProperty(c)?y+="/>":(y+=
|
|
44
44
|
">",h="</"+a.type+">");a:{e=d.dangerouslySetInnerHTML;if(null!=e){if(null!=e.__html){e=e.__html;break a}}else if(e=d.children,"string"===typeof e||"number"===typeof e){e=C(e);break a}e=null}null!=e?(d=[],Qa.hasOwnProperty(c)&&"\n"===e.charAt(0)&&(y+="\n"),y+=e):d=B(d.children);a=a.type;f=null==f||"http://www.w3.org/1999/xhtml"===f?ra(a):"http://www.w3.org/2000/svg"===f&&"foreignObject"===a?"http://www.w3.org/1999/xhtml":f;this.stack.push({domNamespace:f,type:c,children:d,childIndex:0,context:b,footer:h});
|
|
45
|
-
this.previousWasTextNode=!1;return y};return a}();x.renderToNodeStream=function(){throw Error(t(207));};x.renderToStaticMarkup=function(a,b){a=new za(a,!0,b);try{return a.read(Infinity)}finally{a.destroy()}};x.renderToStaticNodeStream=function(){throw Error(t(208));};x.renderToString=function(a,b){a=new za(a,!1,b);try{return a.read(Infinity)}finally{a.destroy()}};x.version="17.0.
|
|
45
|
+
this.previousWasTextNode=!1;return y};return a}();x.renderToNodeStream=function(){throw Error(t(207));};x.renderToStaticMarkup=function(a,b){a=new za(a,!0,b);try{return a.read(Infinity)}finally{a.destroy()}};x.renderToStaticNodeStream=function(){throw Error(t(208));};x.renderToString=function(a,b){a=new za(a,!1,b);try{return a.read(Infinity)}finally{a.destroy()}};x.version="17.0.2"});
|
|
46
46
|
})();
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/** @license React v17.0.
|
|
1
|
+
/** @license React v17.0.2
|
|
2
2
|
* react-dom-test-utils.development.js
|
|
3
3
|
*
|
|
4
4
|
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
@@ -138,7 +138,7 @@
|
|
|
138
138
|
|
|
139
139
|
// Don't change these two values. They're used by React Dev Tools.
|
|
140
140
|
var NoFlags =
|
|
141
|
-
/*
|
|
141
|
+
/* */
|
|
142
142
|
0;
|
|
143
143
|
|
|
144
144
|
var Placement =
|
|
@@ -406,136 +406,144 @@
|
|
|
406
406
|
return 0;
|
|
407
407
|
}
|
|
408
408
|
|
|
409
|
-
/**
|
|
410
|
-
* @interface Event
|
|
411
|
-
* @see http://www.w3.org/TR/DOM-Level-3-Events/
|
|
412
|
-
*/
|
|
413
|
-
var EventInterface = {
|
|
414
|
-
eventPhase: 0,
|
|
415
|
-
bubbles: 0,
|
|
416
|
-
cancelable: 0,
|
|
417
|
-
timeStamp: function (event) {
|
|
418
|
-
return event.timeStamp || Date.now();
|
|
419
|
-
},
|
|
420
|
-
defaultPrevented: 0,
|
|
421
|
-
isTrusted: 0
|
|
422
|
-
};
|
|
423
|
-
|
|
424
409
|
function functionThatReturnsTrue() {
|
|
425
410
|
return true;
|
|
426
411
|
}
|
|
427
412
|
|
|
428
413
|
function functionThatReturnsFalse() {
|
|
429
414
|
return false;
|
|
430
|
-
}
|
|
431
|
-
|
|
432
|
-
* Synthetic events are dispatched by event plugins, typically in response to a
|
|
433
|
-
* top-level event delegation handler.
|
|
434
|
-
*
|
|
435
|
-
* These systems should generally use pooling to reduce the frequency of garbage
|
|
436
|
-
* collection. The system should check `isPersistent` to determine whether the
|
|
437
|
-
* event should be released into the pool after being dispatched. Users that
|
|
438
|
-
* need a persisted event should invoke `persist`.
|
|
439
|
-
*
|
|
440
|
-
* Synthetic events (and subclasses) implement the DOM Level 3 Events API by
|
|
441
|
-
* normalizing browser quirks. Subclasses do not necessarily have to implement a
|
|
442
|
-
* DOM interface; custom application-specific events can also subclass this.
|
|
443
|
-
*/
|
|
415
|
+
} // This is intentionally a factory so that we have different returned constructors.
|
|
416
|
+
// If we had a single constructor, it would be megamorphic and engines would deopt.
|
|
444
417
|
|
|
445
418
|
|
|
446
|
-
function
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
419
|
+
function createSyntheticEvent(Interface) {
|
|
420
|
+
/**
|
|
421
|
+
* Synthetic events are dispatched by event plugins, typically in response to a
|
|
422
|
+
* top-level event delegation handler.
|
|
423
|
+
*
|
|
424
|
+
* These systems should generally use pooling to reduce the frequency of garbage
|
|
425
|
+
* collection. The system should check `isPersistent` to determine whether the
|
|
426
|
+
* event should be released into the pool after being dispatched. Users that
|
|
427
|
+
* need a persisted event should invoke `persist`.
|
|
428
|
+
*
|
|
429
|
+
* Synthetic events (and subclasses) implement the DOM Level 3 Events API by
|
|
430
|
+
* normalizing browser quirks. Subclasses do not necessarily have to implement a
|
|
431
|
+
* DOM interface; custom application-specific events can also subclass this.
|
|
432
|
+
*/
|
|
433
|
+
function SyntheticBaseEvent(reactName, reactEventType, targetInst, nativeEvent, nativeEventTarget) {
|
|
434
|
+
this._reactName = reactName;
|
|
435
|
+
this._targetInst = targetInst;
|
|
436
|
+
this.type = reactEventType;
|
|
437
|
+
this.nativeEvent = nativeEvent;
|
|
438
|
+
this.target = nativeEventTarget;
|
|
439
|
+
this.currentTarget = null;
|
|
440
|
+
|
|
441
|
+
for (var _propName in Interface) {
|
|
442
|
+
if (!Interface.hasOwnProperty(_propName)) {
|
|
443
|
+
continue;
|
|
444
|
+
}
|
|
454
445
|
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
446
|
+
var normalize = Interface[_propName];
|
|
447
|
+
|
|
448
|
+
if (normalize) {
|
|
449
|
+
this[_propName] = normalize(nativeEvent);
|
|
450
|
+
} else {
|
|
451
|
+
this[_propName] = nativeEvent[_propName];
|
|
452
|
+
}
|
|
458
453
|
}
|
|
459
454
|
|
|
460
|
-
var
|
|
455
|
+
var defaultPrevented = nativeEvent.defaultPrevented != null ? nativeEvent.defaultPrevented : nativeEvent.returnValue === false;
|
|
461
456
|
|
|
462
|
-
if (
|
|
463
|
-
this
|
|
457
|
+
if (defaultPrevented) {
|
|
458
|
+
this.isDefaultPrevented = functionThatReturnsTrue;
|
|
464
459
|
} else {
|
|
465
|
-
this
|
|
460
|
+
this.isDefaultPrevented = functionThatReturnsFalse;
|
|
466
461
|
}
|
|
467
|
-
}
|
|
468
|
-
|
|
469
|
-
var defaultPrevented = nativeEvent.defaultPrevented != null ? nativeEvent.defaultPrevented : nativeEvent.returnValue === false;
|
|
470
462
|
|
|
471
|
-
|
|
472
|
-
this
|
|
473
|
-
} else {
|
|
474
|
-
this.isDefaultPrevented = functionThatReturnsFalse;
|
|
463
|
+
this.isPropagationStopped = functionThatReturnsFalse;
|
|
464
|
+
return this;
|
|
475
465
|
}
|
|
476
466
|
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
467
|
+
_assign(SyntheticBaseEvent.prototype, {
|
|
468
|
+
preventDefault: function () {
|
|
469
|
+
this.defaultPrevented = true;
|
|
470
|
+
var event = this.nativeEvent;
|
|
480
471
|
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
var event = this.nativeEvent;
|
|
472
|
+
if (!event) {
|
|
473
|
+
return;
|
|
474
|
+
}
|
|
485
475
|
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
476
|
+
if (event.preventDefault) {
|
|
477
|
+
event.preventDefault(); // $FlowFixMe - flow is not aware of `unknown` in IE
|
|
478
|
+
} else if (typeof event.returnValue !== 'unknown') {
|
|
479
|
+
event.returnValue = false;
|
|
480
|
+
}
|
|
489
481
|
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
event
|
|
494
|
-
}
|
|
482
|
+
this.isDefaultPrevented = functionThatReturnsTrue;
|
|
483
|
+
},
|
|
484
|
+
stopPropagation: function () {
|
|
485
|
+
var event = this.nativeEvent;
|
|
495
486
|
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
var event = this.nativeEvent;
|
|
487
|
+
if (!event) {
|
|
488
|
+
return;
|
|
489
|
+
}
|
|
500
490
|
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
491
|
+
if (event.stopPropagation) {
|
|
492
|
+
event.stopPropagation(); // $FlowFixMe - flow is not aware of `unknown` in IE
|
|
493
|
+
} else if (typeof event.cancelBubble !== 'unknown') {
|
|
494
|
+
// The ChangeEventPlugin registers a "propertychange" event for
|
|
495
|
+
// IE. This event does not support bubbling or cancelling, and
|
|
496
|
+
// any references to cancelBubble throw "Member not found". A
|
|
497
|
+
// typeof check of "unknown" circumvents this issue (and is also
|
|
498
|
+
// IE specific).
|
|
499
|
+
event.cancelBubble = true;
|
|
500
|
+
}
|
|
504
501
|
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
}
|
|
502
|
+
this.isPropagationStopped = functionThatReturnsTrue;
|
|
503
|
+
},
|
|
504
|
+
|
|
505
|
+
/**
|
|
506
|
+
* We release all dispatched `SyntheticEvent`s after each event loop, adding
|
|
507
|
+
* them back into the pool. This allows a way to hold onto a reference that
|
|
508
|
+
* won't be added back into the pool.
|
|
509
|
+
*/
|
|
510
|
+
persist: function () {// Modern event system doesn't use pooling.
|
|
511
|
+
},
|
|
512
|
+
|
|
513
|
+
/**
|
|
514
|
+
* Checks if this event should be released back into the pool.
|
|
515
|
+
*
|
|
516
|
+
* @return {boolean} True if this should not be released, false otherwise.
|
|
517
|
+
*/
|
|
518
|
+
isPersistent: functionThatReturnsTrue
|
|
519
|
+
});
|
|
515
520
|
|
|
516
|
-
|
|
517
|
-
|
|
521
|
+
return SyntheticBaseEvent;
|
|
522
|
+
}
|
|
523
|
+
/**
|
|
524
|
+
* @interface Event
|
|
525
|
+
* @see http://www.w3.org/TR/DOM-Level-3-Events/
|
|
526
|
+
*/
|
|
518
527
|
|
|
519
|
-
/**
|
|
520
|
-
* We release all dispatched `SyntheticEvent`s after each event loop, adding
|
|
521
|
-
* them back into the pool. This allows a way to hold onto a reference that
|
|
522
|
-
* won't be added back into the pool.
|
|
523
|
-
*/
|
|
524
|
-
persist: function () {// Modern event system doesn't use pooling.
|
|
525
|
-
},
|
|
526
528
|
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
529
|
+
var EventInterface = {
|
|
530
|
+
eventPhase: 0,
|
|
531
|
+
bubbles: 0,
|
|
532
|
+
cancelable: 0,
|
|
533
|
+
timeStamp: function (event) {
|
|
534
|
+
return event.timeStamp || Date.now();
|
|
535
|
+
},
|
|
536
|
+
defaultPrevented: 0,
|
|
537
|
+
isTrusted: 0
|
|
538
|
+
};
|
|
539
|
+
var SyntheticEvent = createSyntheticEvent(EventInterface);
|
|
534
540
|
|
|
535
541
|
var UIEventInterface = _assign({}, EventInterface, {
|
|
536
542
|
view: 0,
|
|
537
543
|
detail: 0
|
|
538
544
|
});
|
|
545
|
+
|
|
546
|
+
var SyntheticUIEvent = createSyntheticEvent(UIEventInterface);
|
|
539
547
|
var lastMovementX;
|
|
540
548
|
var lastMovementY;
|
|
541
549
|
var lastMouseEvent;
|
|
@@ -596,6 +604,8 @@
|
|
|
596
604
|
return lastMovementY;
|
|
597
605
|
}
|
|
598
606
|
});
|
|
607
|
+
|
|
608
|
+
var SyntheticMouseEvent = createSyntheticEvent(MouseEventInterface);
|
|
599
609
|
/**
|
|
600
610
|
* @interface DragEvent
|
|
601
611
|
* @see http://www.w3.org/TR/DOM-Level-3-Events/
|
|
@@ -604,6 +614,8 @@
|
|
|
604
614
|
var DragEventInterface = _assign({}, MouseEventInterface, {
|
|
605
615
|
dataTransfer: 0
|
|
606
616
|
});
|
|
617
|
+
|
|
618
|
+
var SyntheticDragEvent = createSyntheticEvent(DragEventInterface);
|
|
607
619
|
/**
|
|
608
620
|
* @interface FocusEvent
|
|
609
621
|
* @see http://www.w3.org/TR/DOM-Level-3-Events/
|
|
@@ -612,6 +624,8 @@
|
|
|
612
624
|
var FocusEventInterface = _assign({}, UIEventInterface, {
|
|
613
625
|
relatedTarget: 0
|
|
614
626
|
});
|
|
627
|
+
|
|
628
|
+
var SyntheticFocusEvent = createSyntheticEvent(FocusEventInterface);
|
|
615
629
|
/**
|
|
616
630
|
* @interface Event
|
|
617
631
|
* @see http://www.w3.org/TR/css3-animations/#AnimationEvent-interface
|
|
@@ -623,6 +637,8 @@
|
|
|
623
637
|
elapsedTime: 0,
|
|
624
638
|
pseudoElement: 0
|
|
625
639
|
});
|
|
640
|
+
|
|
641
|
+
var SyntheticAnimationEvent = createSyntheticEvent(AnimationEventInterface);
|
|
626
642
|
/**
|
|
627
643
|
* @interface Event
|
|
628
644
|
* @see http://www.w3.org/TR/clipboard-apis/
|
|
@@ -633,6 +649,8 @@
|
|
|
633
649
|
return 'clipboardData' in event ? event.clipboardData : window.clipboardData;
|
|
634
650
|
}
|
|
635
651
|
});
|
|
652
|
+
|
|
653
|
+
var SyntheticClipboardEvent = createSyntheticEvent(ClipboardEventInterface);
|
|
636
654
|
/**
|
|
637
655
|
* @interface Event
|
|
638
656
|
* @see http://www.w3.org/TR/DOM-Level-3-Events/#events-compositionevents
|
|
@@ -641,6 +659,8 @@
|
|
|
641
659
|
var CompositionEventInterface = _assign({}, EventInterface, {
|
|
642
660
|
data: 0
|
|
643
661
|
});
|
|
662
|
+
|
|
663
|
+
var SyntheticCompositionEvent = createSyntheticEvent(CompositionEventInterface);
|
|
644
664
|
/**
|
|
645
665
|
* Normalization of deprecated HTML5 `key` values
|
|
646
666
|
* @see https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent#Key_names
|
|
@@ -824,6 +844,8 @@
|
|
|
824
844
|
return 0;
|
|
825
845
|
}
|
|
826
846
|
});
|
|
847
|
+
|
|
848
|
+
var SyntheticKeyboardEvent = createSyntheticEvent(KeyboardEventInterface);
|
|
827
849
|
/**
|
|
828
850
|
* @interface PointerEvent
|
|
829
851
|
* @see http://www.w3.org/TR/pointerevents/
|
|
@@ -841,6 +863,8 @@
|
|
|
841
863
|
pointerType: 0,
|
|
842
864
|
isPrimary: 0
|
|
843
865
|
});
|
|
866
|
+
|
|
867
|
+
var SyntheticPointerEvent = createSyntheticEvent(PointerEventInterface);
|
|
844
868
|
/**
|
|
845
869
|
* @interface TouchEvent
|
|
846
870
|
* @see http://www.w3.org/TR/touch-events/
|
|
@@ -856,6 +880,8 @@
|
|
|
856
880
|
shiftKey: 0,
|
|
857
881
|
getModifierState: getEventModifierState
|
|
858
882
|
});
|
|
883
|
+
|
|
884
|
+
var SyntheticTouchEvent = createSyntheticEvent(TouchEventInterface);
|
|
859
885
|
/**
|
|
860
886
|
* @interface Event
|
|
861
887
|
* @see http://www.w3.org/TR/2009/WD-css3-transitions-20090320/#transition-events-
|
|
@@ -867,6 +893,8 @@
|
|
|
867
893
|
elapsedTime: 0,
|
|
868
894
|
pseudoElement: 0
|
|
869
895
|
});
|
|
896
|
+
|
|
897
|
+
var SyntheticTransitionEvent = createSyntheticEvent(TransitionEventInterface);
|
|
870
898
|
/**
|
|
871
899
|
* @interface WheelEvent
|
|
872
900
|
* @see http://www.w3.org/TR/DOM-Level-3-Events/
|
|
@@ -890,6 +918,8 @@
|
|
|
890
918
|
deltaMode: 0
|
|
891
919
|
});
|
|
892
920
|
|
|
921
|
+
var SyntheticWheelEvent = createSyntheticEvent(WheelEventInterface);
|
|
922
|
+
|
|
893
923
|
/**
|
|
894
924
|
* HTML nodeType values that represent the type of the node
|
|
895
925
|
*/
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/** @license React v17.0.
|
|
1
|
+
/** @license React v17.0.2
|
|
2
2
|
* react-dom-test-utils.production.min.js
|
|
3
3
|
*
|
|
4
4
|
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
@@ -6,30 +6,30 @@
|
|
|
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
|
-
(function(){'use strict';(function(
|
|
10
|
-
function
|
|
11
|
-
d)return
|
|
12
|
-
a&&(a=13);return 32<=a||13===a?a:0}function
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
"
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
a?a.movementY:
|
|
24
|
-
16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},
|
|
25
|
-
b)return b}return"keypress"===a.type?(a=
|
|
26
|
-
width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0});
|
|
27
|
-
null,
|
|
28
|
-
3);try{b.apply(c,
|
|
29
|
-
(function(){
|
|
30
|
-
c?d(c):a()})},function(a){b();d(a)})}};try{1!==
|
|
31
|
-
a.length+") for class:"+b);return a[0]};
|
|
32
|
-
a.type===b};
|
|
33
|
-
function(a){if(void 0===
|
|
34
|
-
b(a)})}};try{do var g=
|
|
9
|
+
(function(){'use strict';(function(h,p){"object"===typeof exports&&"undefined"!==typeof module?p(exports,require("react"),require("react-dom")):"function"===typeof define&&define.amd?define(["exports","react","react-dom"],p):(h=h||self,p(h.ReactTestUtils={},h.React,h.ReactDOM))})(this,function(h,p,v){function q(a){for(var b="https://reactjs.org/docs/error-decoder.html?invariant="+a,c=1;c<arguments.length;c++)b+="&args[]="+encodeURIComponent(arguments[c]);return"Minified React error #"+a+"; visit "+b+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}
|
|
10
|
+
function T(a){var b=a,c=a;if(a.alternate)for(;b.return;)b=b.return;else{a=b;do b=a,0!==(b.flags&1026)&&(c=b.return),a=b.return;while(a)}return 3===b.tag?c:null}function U(a){if(T(a)!==a)throw Error(q(188));}function ka(a){var b=a.alternate;if(!b){b=T(a);if(null===b)throw Error(q(188));return b!==a?null:a}for(var c=a,d=b;;){var e=c.return;if(null===e)break;var g=e.alternate;if(null===g){d=e.return;if(null!==d){c=d;continue}break}if(e.child===g.child){for(g=e.child;g;){if(g===c)return U(e),a;if(g===
|
|
11
|
+
d)return U(e),b;g=g.sibling}throw Error(q(188));}if(c.return!==d.return)c=e,d=g;else{for(var f=!1,l=e.child;l;){if(l===c){f=!0;c=e;d=g;break}if(l===d){f=!0;d=e;c=g;break}l=l.sibling}if(!f){for(l=g.child;l;){if(l===c){f=!0;c=g;d=e;break}if(l===d){f=!0;d=g;c=e;break}l=l.sibling}if(!f)throw Error(q(189));}}if(c.alternate!==d)throw Error(q(190));}if(3!==c.tag)throw Error(q(188));return c.stateNode.current===c?a:b}function I(a){var b=a.keyCode;"charCode"in a?(a=a.charCode,0===a&&13===b&&(a=13)):a=b;10===
|
|
12
|
+
a&&(a=13);return 32<=a||13===a?a:0}function B(){return!0}function V(){return!1}function m(a){function b(c,b,e,g,f){this._reactName=c;this._targetInst=e;this.type=b;this.nativeEvent=g;this.target=f;this.currentTarget=null;for(var d in a)a.hasOwnProperty(d)&&(c=a[d],this[d]=c?c(g):g[d]);this.isDefaultPrevented=(null!=g.defaultPrevented?g.defaultPrevented:!1===g.returnValue)?B:V;this.isPropagationStopped=V;return this}k(b.prototype,{preventDefault:function(){this.defaultPrevented=!0;var a=this.nativeEvent;
|
|
13
|
+
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(){},isPersistent:B});return b}function la(a){var b=this.nativeEvent;return b.getModifierState?b.getModifierState(a):(a=ma[a])?!!b[a]:!1}function J(a){return la}function W(a){if(null===C)try{var b=
|
|
14
|
+
("require"+Math.random()).slice(0,7);C=(module&&module[b]).call(module,"timers").setImmediate}catch(c){C=function(a){var b=new MessageChannel;b.port1.onmessage=a;b.port2.postMessage(void 0)}}return C(a)}function X(a){try{K(),W(function(){K()?X(a):a()})}catch(b){a(b)}}function Y(a,b){jest.runOnlyPendingTimers();W(function(){try{y()?Y(a,b):a()}catch(c){b(c)}})}function na(a,b,c,d,e,g,f,l,h){z=!1;D=null;oa.apply(pa,arguments)}function qa(a,b,c,d,e,g,f,l,h){na.apply(this,arguments);if(z){if(z){var k=
|
|
15
|
+
D;z=!1;D=null}else throw Error(q(198));E||(E=!0,L=k)}}function ra(a){}function sa(a,b){if(!a)return[];a=ka(a);if(!a)return[];for(var c=a,d=[];;){if(5===c.tag||6===c.tag||1===c.tag||0===c.tag){var e=c.stateNode;b(e)&&d.push(e)}if(c.child)c.child.return=c,c=c.child;else{if(c===a)return d;for(;!c.sibling;){if(!c.return||c.return===a)return d;c=c.return}c.sibling.return=c.return;c=c.sibling}}}function w(a,b){if(a&&!a._reactInternals){var c=""+a;a=Array.isArray(a)?"an array":a&&1===a.nodeType&&a.tagName?
|
|
16
|
+
"a DOM node":"[object Object]"===c?"object with keys {"+Object.keys(a).join(", ")+"}":c;throw Error(q(286,b,a));}}function F(a){return!(!a||1!==a.nodeType||!a.tagName)}function M(a){return F(a)?!1:null!=a&&"function"===typeof a.render&&"function"===typeof a.setState}function Z(a,b){return M(a)?a._reactInternals.type===b:!1}function G(a,b){w(a,"findAllInRenderedTree");return a?sa(a._reactInternals,b):[]}function aa(a,b){w(a,"scryRenderedDOMComponentsWithClass");return G(a,function(a){if(F(a)){var c=
|
|
17
|
+
a.className;"string"!==typeof c&&(c=a.getAttribute("class")||"");var e=c.split(/\s+/);if(!Array.isArray(b)){if(void 0===b)throw Error(q(11));b=b.split(/\s+/)}return b.every(function(a){return-1!==e.indexOf(a)})}return!1})}function ba(a,b){w(a,"scryRenderedDOMComponentsWithTag");return G(a,function(a){return F(a)&&a.tagName.toUpperCase()===b.toUpperCase()})}function ca(a,b){w(a,"scryRenderedComponentsWithType");return G(a,function(a){return Z(a,b)})}function da(a,b,c){var d=a.type||"unknown-event";
|
|
18
|
+
a.currentTarget=ta(c);qa(d,b,void 0,a);a.currentTarget=null}function ea(a,b,c){for(var d=[];a;){d.push(a);do a=a.return;while(a&&5!==a.tag);a=a?a:null}for(a=d.length;0<a--;)b(d[a],"captured",c);for(a=0;a<d.length;a++)b(d[a],"bubbled",c)}function fa(a,b){var c=a.stateNode;if(!c)return null;var d=ua(c);if(!d)return null;c=d[b];a:switch(b){case "onClick":case "onClickCapture":case "onDoubleClick":case "onDoubleClickCapture":case "onMouseDown":case "onMouseDownCapture":case "onMouseMove":case "onMouseMoveCapture":case "onMouseUp":case "onMouseUpCapture":case "onMouseEnter":(d=
|
|
19
|
+
!d.disabled)||(a=a.type,d=!("button"===a||"input"===a||"select"===a||"textarea"===a));a=!d;break a;default:a=!1}if(a)return null;if(c&&"function"!==typeof c)throw Error(q(231,b,typeof c));return c}function va(a,b,c){a&&c&&c._reactName&&(b=fa(a,c._reactName))&&(null==c._dispatchListeners&&(c._dispatchListeners=[]),null==c._dispatchInstances&&(c._dispatchInstances=[]),c._dispatchListeners.push(b),c._dispatchInstances.push(a))}function wa(a,b,c){var d=c._reactName;"captured"===b&&(d+="Capture");if(b=
|
|
20
|
+
fa(a,d))null==c._dispatchListeners&&(c._dispatchListeners=[]),null==c._dispatchInstances&&(c._dispatchInstances=[]),c._dispatchListeners.push(b),c._dispatchInstances.push(a)}function xa(a){return function(b,c){if(p.isValidElement(b))throw Error(q(228));if(M(b))throw Error(q(229));var d="on"+a[0].toUpperCase()+a.slice(1),e=new ra;e.target=b;e.type=a.toLowerCase();var g=ya(b),f=new za(d,e.type,g,e,b);f.persist();k(f,c);Aa.has(a)?f&&f._reactName&&va(f._targetInst,null,f):f&&f._reactName&&ea(f._targetInst,
|
|
21
|
+
wa,f);v.unstable_batchedUpdates(function(){Ba(b);if(f){var a=f._dispatchListeners,c=f._dispatchInstances;if(Array.isArray(a))for(var d=0;d<a.length&&!f.isPropagationStopped();d++)da(f,a[d],c[d]);else a&&da(f,a,c);f._dispatchListeners=null;f._dispatchInstances=null;f.isPersistent()||f.constructor.release(f)}if(E)throw a=L,E=!1,L=null,a;});Ca()}}var k=p.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.assign,t=p.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,u={eventPhase:0,bubbles:0,cancelable:0,
|
|
22
|
+
timeStamp:function(a){return a.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},za=m(u),x=k({},u,{view:0,detail:0});m(x);var N,O,A,r=k({},x,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:J,button:0,buttons:0,relatedTarget:function(a){return void 0===a.relatedTarget?a.fromElement===a.srcElement?a.toElement:a.fromElement:a.relatedTarget},movementX:function(a){if("movementX"in a)return a.movementX;a!==A&&(A&&"mousemove"===a.type?
|
|
23
|
+
(N=a.screenX-A.screenX,O=a.screenY-A.screenY):O=N=0,A=a);return N},movementY:function(a){return"movementY"in a?a.movementY:O}});m(r);var n=k({},r,{dataTransfer:0});m(n);n=k({},x,{relatedTarget:0});m(n);n=k({},u,{animationName:0,elapsedTime:0,pseudoElement:0});m(n);n=k({},u,{clipboardData:function(a){return"clipboardData"in a?a.clipboardData:window.clipboardData}});m(n);n=k({},u,{data:0});m(n);var Da={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",
|
|
24
|
+
Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Ea={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},
|
|
25
|
+
ma={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};n=k({},x,{key:function(a){if(a.key){var b=Da[a.key]||a.key;if("Unidentified"!==b)return b}return"keypress"===a.type?(a=I(a),13===a?"Enter":String.fromCharCode(a)):"keydown"===a.type||"keyup"===a.type?Ea[a.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:J,charCode:function(a){return"keypress"===a.type?I(a):0},keyCode:function(a){return"keydown"===a.type||"keyup"===
|
|
26
|
+
a.type?a.keyCode:0},which:function(a){return"keypress"===a.type?I(a):"keydown"===a.type||"keyup"===a.type?a.keyCode:0}});m(n);n=k({},r,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0});m(n);x=k({},x,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:J});m(x);u=k({},u,{propertyName:0,elapsedTime:0,pseudoElement:0});m(u);r=k({},r,{deltaX:function(a){return"deltaX"in a?a.deltaX:"wheelDeltaX"in
|
|
27
|
+
a?-a.wheelDeltaX:0},deltaY:function(a){return"deltaY"in a?a.deltaY:"wheelDeltaY"in a?-a.wheelDeltaY:"wheelDelta"in a?-a.wheelDelta:0},deltaZ:0,deltaMode:0});m(r);var C=null,y=p.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.Scheduler.unstable_flushAllWithoutAsserting;r=v.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.Events;var Fa=r[5],P=r[6],Ga=v.unstable_batchedUpdates,Q=t.IsSomeRendererActing,ha="function"===typeof y,K=y||function(){for(var a=!1;Fa();)a=!0;return a},H=0,ia=!1,R=v.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.Events[6],
|
|
28
|
+
Ha=v.unstable_batchedUpdates,S=t.IsSomeRendererActing,oa=function(a,b,c,d,e,g,f,h,k){var l=Array.prototype.slice.call(arguments,3);try{b.apply(c,l)}catch(Ia){this.onError(Ia)}},z=!1,D=null,E=!1,L=null,pa={onError:function(a){z=!0;D=a}};t=v.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.Events;var ya=t[0],ta=t[1],ua=t[2],Ba=t[3],Ca=t[4],ja={},Aa=new Set(["mouseEnter","mouseLeave","pointerEnter","pointerLeave"]),Ja="blur cancel click close contextMenu copy cut auxClick doubleClick dragEnd dragStart drop focus input invalid keyDown keyPress keyUp mouseDown mouseUp paste pause play pointerCancel pointerDown pointerUp rateChange reset seeked submit touchCancel touchEnd touchStart volumeChange drag dragEnter dragExit dragLeave dragOver mouseMove mouseOut mouseOver pointerMove pointerOut pointerOver scroll toggle touchMove wheel abort animationEnd animationIteration animationStart canPlay canPlayThrough durationChange emptied encrypted ended error gotPointerCapture load loadedData loadedMetadata loadStart lostPointerCapture playing progress seeking stalled suspend timeUpdate transitionEnd waiting mouseEnter mouseLeave pointerEnter pointerLeave change select beforeInput compositionEnd compositionStart compositionUpdate".split(" ");
|
|
29
|
+
(function(){Ja.forEach(function(a){ja[a]=xa(a)})})();h.Simulate=ja;h.act=function(a){function b(){H--;Q.current=c;P.current=d}!1===ia&&(ia=!0,console.error("act(...) is not supported in production builds of React, and might not behave as expected."));H++;var c=Q.current,d=P.current;Q.current=!0;P.current=!0;try{var e=Ga(a)}catch(g){throw b(),g;}if(null!==e&&"object"===typeof e&&"function"===typeof e.then)return{then:function(a,d){e.then(function(){1<H||!0===ha&&!0===c?(b(),a()):X(function(c){b();
|
|
30
|
+
c?d(c):a()})},function(a){b();d(a)})}};try{1!==H||!1!==ha&&!1!==c||K(),b()}catch(g){throw b(),g;}return{then:function(a){a()}}};h.findAllInRenderedTree=G;h.findRenderedComponentWithType=function(a,b){w(a,"findRenderedComponentWithType");a=ca(a,b);if(1!==a.length)throw Error("Did not find exactly one match (found: "+a.length+") for componentType:"+b);return a[0]};h.findRenderedDOMComponentWithClass=function(a,b){w(a,"findRenderedDOMComponentWithClass");a=aa(a,b);if(1!==a.length)throw Error("Did not find exactly one match (found: "+
|
|
31
|
+
a.length+") for class:"+b);return a[0]};h.findRenderedDOMComponentWithTag=function(a,b){w(a,"findRenderedDOMComponentWithTag");a=ba(a,b);if(1!==a.length)throw Error("Did not find exactly one match (found: "+a.length+") for tag:"+b);return a[0]};h.isCompositeComponent=M;h.isCompositeComponentWithType=Z;h.isDOMComponent=F;h.isDOMComponentElement=function(a){return!!(a&&p.isValidElement(a)&&a.tagName)};h.isElement=function(a){return p.isValidElement(a)};h.isElementOfType=function(a,b){return p.isValidElement(a)&&
|
|
32
|
+
a.type===b};h.mockComponent=function(a,b){b=b||a.mockTagName||"div";a.prototype.render.mockImplementation(function(){return p.createElement(b,null,this.props.children)});return this};h.nativeTouchData=function(a,b){return{touches:[{pageX:a,pageY:b}]}};h.renderIntoDocument=function(a){var b=document.createElement("div");return v.render(a,b)};h.scryRenderedComponentsWithType=ca;h.scryRenderedDOMComponentsWithClass=aa;h.scryRenderedDOMComponentsWithTag=ba;h.traverseTwoPhase=ea;h.unstable_concurrentAct=
|
|
33
|
+
function(a){if(void 0===y)throw Error("This version of `act` requires a special mock build of Scheduler.");if(!0!==setTimeout._isMockFunction)throw Error("This version of `act` requires Jest's timer mocks (i.e. jest.useFakeTimers).");var b=S.current,c=R.current;S.current=!0;R.current=!0;var d=function(){S.current=b;R.current=c};try{var e=Ha(a);if("object"===typeof e&&null!==e&&"function"===typeof e.then)return{then:function(a,b){e.then(function(){Y(function(){d();a()},function(a){d();b(a)})},function(a){d();
|
|
34
|
+
b(a)})}};try{do var g=y();while(g)}finally{d()}}catch(f){throw d(),f;}}});
|
|
35
35
|
})();
|