react-dom 16.1.2 → 16.2.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/cjs/react-dom-server.browser.development.js +68 -51
- package/cjs/react-dom-server.browser.production.min.js +20 -19
- package/cjs/react-dom-server.node.development.js +69 -52
- package/cjs/react-dom-server.node.production.min.js +22 -21
- package/cjs/react-dom-test-utils.development.js +8 -1
- package/cjs/react-dom-test-utils.production.min.js +2 -1
- package/cjs/react-dom-unstable-native-dependencies.development.js +3 -1
- package/cjs/react-dom-unstable-native-dependencies.production.min.js +2 -1
- package/cjs/react-dom.development.js +297 -303
- package/cjs/react-dom.production.min.js +209 -207
- package/package.json +1 -1
- package/umd/react-dom-server.browser.development.js +120 -105
- package/umd/react-dom-server.browser.production.min.js +26 -27
- package/umd/react-dom-test-utils.development.js +1247 -0
- package/umd/react-dom-test-utils.production.min.js +29 -0
- package/umd/react-dom-unstable-native-dependencies.development.js +16 -16
- package/umd/react-dom-unstable-native-dependencies.production.min.js +1 -1
- package/umd/react-dom.development.js +511 -519
- package/umd/react-dom.production.min.js +182 -182
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/** @license React v16.
|
|
1
|
+
/** @license React v16.2.0
|
|
2
2
|
* react-dom.development.js
|
|
3
3
|
*
|
|
4
4
|
* Copyright (c) 2013-present, Facebook, Inc.
|
|
@@ -9,6 +9,8 @@
|
|
|
9
9
|
|
|
10
10
|
'use strict';
|
|
11
11
|
|
|
12
|
+
|
|
13
|
+
|
|
12
14
|
if (process.env.NODE_ENV !== "production") {
|
|
13
15
|
(function() {
|
|
14
16
|
'use strict';
|
|
@@ -18,7 +20,7 @@ var invariant = require('fbjs/lib/invariant');
|
|
|
18
20
|
var warning = require('fbjs/lib/warning');
|
|
19
21
|
var ExecutionEnvironment = require('fbjs/lib/ExecutionEnvironment');
|
|
20
22
|
var _assign = require('object-assign');
|
|
21
|
-
var emptyFunction
|
|
23
|
+
var emptyFunction = require('fbjs/lib/emptyFunction');
|
|
22
24
|
var EventListener = require('fbjs/lib/EventListener');
|
|
23
25
|
var getActiveElement = require('fbjs/lib/getActiveElement');
|
|
24
26
|
var shallowEqual = require('fbjs/lib/shallowEqual');
|
|
@@ -1099,6 +1101,11 @@ function processEventQueue(simulated) {
|
|
|
1099
1101
|
// events get enqueued while processing.
|
|
1100
1102
|
var processingEventQueue = eventQueue;
|
|
1101
1103
|
eventQueue = null;
|
|
1104
|
+
|
|
1105
|
+
if (!processingEventQueue) {
|
|
1106
|
+
return;
|
|
1107
|
+
}
|
|
1108
|
+
|
|
1102
1109
|
if (simulated) {
|
|
1103
1110
|
forEachAccumulated(processingEventQueue, executeDispatchesAndReleaseSimulated);
|
|
1104
1111
|
} else {
|
|
@@ -1560,7 +1567,7 @@ var EventInterface = {
|
|
|
1560
1567
|
type: null,
|
|
1561
1568
|
target: null,
|
|
1562
1569
|
// currentTarget is set when dispatching; no use in copying it here
|
|
1563
|
-
currentTarget: emptyFunction
|
|
1570
|
+
currentTarget: emptyFunction.thatReturnsNull,
|
|
1564
1571
|
eventPhase: null,
|
|
1565
1572
|
bubbles: null,
|
|
1566
1573
|
cancelable: null,
|
|
@@ -1623,11 +1630,11 @@ function SyntheticEvent(dispatchConfig, targetInst, nativeEvent, nativeEventTarg
|
|
|
1623
1630
|
|
|
1624
1631
|
var defaultPrevented = nativeEvent.defaultPrevented != null ? nativeEvent.defaultPrevented : nativeEvent.returnValue === false;
|
|
1625
1632
|
if (defaultPrevented) {
|
|
1626
|
-
this.isDefaultPrevented = emptyFunction
|
|
1633
|
+
this.isDefaultPrevented = emptyFunction.thatReturnsTrue;
|
|
1627
1634
|
} else {
|
|
1628
|
-
this.isDefaultPrevented = emptyFunction
|
|
1635
|
+
this.isDefaultPrevented = emptyFunction.thatReturnsFalse;
|
|
1629
1636
|
}
|
|
1630
|
-
this.isPropagationStopped = emptyFunction
|
|
1637
|
+
this.isPropagationStopped = emptyFunction.thatReturnsFalse;
|
|
1631
1638
|
return this;
|
|
1632
1639
|
}
|
|
1633
1640
|
|
|
@@ -1644,7 +1651,7 @@ _assign(SyntheticEvent.prototype, {
|
|
|
1644
1651
|
} else if (typeof event.returnValue !== 'unknown') {
|
|
1645
1652
|
event.returnValue = false;
|
|
1646
1653
|
}
|
|
1647
|
-
this.isDefaultPrevented = emptyFunction
|
|
1654
|
+
this.isDefaultPrevented = emptyFunction.thatReturnsTrue;
|
|
1648
1655
|
},
|
|
1649
1656
|
|
|
1650
1657
|
stopPropagation: function () {
|
|
@@ -1664,7 +1671,7 @@ _assign(SyntheticEvent.prototype, {
|
|
|
1664
1671
|
event.cancelBubble = true;
|
|
1665
1672
|
}
|
|
1666
1673
|
|
|
1667
|
-
this.isPropagationStopped = emptyFunction
|
|
1674
|
+
this.isPropagationStopped = emptyFunction.thatReturnsTrue;
|
|
1668
1675
|
},
|
|
1669
1676
|
|
|
1670
1677
|
/**
|
|
@@ -1673,7 +1680,7 @@ _assign(SyntheticEvent.prototype, {
|
|
|
1673
1680
|
* won't be added back into the pool.
|
|
1674
1681
|
*/
|
|
1675
1682
|
persist: function () {
|
|
1676
|
-
this.isPersistent = emptyFunction
|
|
1683
|
+
this.isPersistent = emptyFunction.thatReturnsTrue;
|
|
1677
1684
|
},
|
|
1678
1685
|
|
|
1679
1686
|
/**
|
|
@@ -1681,7 +1688,7 @@ _assign(SyntheticEvent.prototype, {
|
|
|
1681
1688
|
*
|
|
1682
1689
|
* @return {boolean} True if this should not be released, false otherwise.
|
|
1683
1690
|
*/
|
|
1684
|
-
isPersistent: emptyFunction
|
|
1691
|
+
isPersistent: emptyFunction.thatReturnsFalse,
|
|
1685
1692
|
|
|
1686
1693
|
/**
|
|
1687
1694
|
* `PooledClass` looks for `destructor` on each instance it releases.
|
|
@@ -1698,8 +1705,8 @@ _assign(SyntheticEvent.prototype, {
|
|
|
1698
1705
|
}
|
|
1699
1706
|
{
|
|
1700
1707
|
Object.defineProperty(this, 'nativeEvent', getPooledWarningPropertyDefinition('nativeEvent', null));
|
|
1701
|
-
Object.defineProperty(this, 'preventDefault', getPooledWarningPropertyDefinition('preventDefault', emptyFunction
|
|
1702
|
-
Object.defineProperty(this, 'stopPropagation', getPooledWarningPropertyDefinition('stopPropagation', emptyFunction
|
|
1708
|
+
Object.defineProperty(this, 'preventDefault', getPooledWarningPropertyDefinition('preventDefault', emptyFunction));
|
|
1709
|
+
Object.defineProperty(this, 'stopPropagation', getPooledWarningPropertyDefinition('stopPropagation', emptyFunction));
|
|
1703
1710
|
}
|
|
1704
1711
|
}
|
|
1705
1712
|
});
|
|
@@ -3714,17 +3721,7 @@ function listenTo(registrationName, contentDocumentHandle) {
|
|
|
3714
3721
|
for (var i = 0; i < dependencies.length; i++) {
|
|
3715
3722
|
var dependency = dependencies[i];
|
|
3716
3723
|
if (!(isListening.hasOwnProperty(dependency) && isListening[dependency])) {
|
|
3717
|
-
if (dependency === '
|
|
3718
|
-
if (isEventSupported('wheel')) {
|
|
3719
|
-
trapBubbledEvent('topWheel', 'wheel', mountAt);
|
|
3720
|
-
} else if (isEventSupported('mousewheel')) {
|
|
3721
|
-
trapBubbledEvent('topWheel', 'mousewheel', mountAt);
|
|
3722
|
-
} else {
|
|
3723
|
-
// Firefox needs to capture a different mouse scroll event.
|
|
3724
|
-
// @see http://www.quirksmode.org/dom/events/tests/scroll.html
|
|
3725
|
-
trapBubbledEvent('topWheel', 'DOMMouseScroll', mountAt);
|
|
3726
|
-
}
|
|
3727
|
-
} else if (dependency === 'topScroll') {
|
|
3724
|
+
if (dependency === 'topScroll') {
|
|
3728
3725
|
trapCapturedEvent('topScroll', 'scroll', mountAt);
|
|
3729
3726
|
} else if (dependency === 'topFocus' || dependency === 'topBlur') {
|
|
3730
3727
|
trapCapturedEvent('topFocus', 'focus', mountAt);
|
|
@@ -3834,10 +3831,10 @@ function getOffsets(outerNode) {
|
|
|
3834
3831
|
return null;
|
|
3835
3832
|
}
|
|
3836
3833
|
|
|
3837
|
-
var anchorNode = selection.anchorNode
|
|
3838
|
-
|
|
3839
|
-
|
|
3840
|
-
|
|
3834
|
+
var anchorNode = selection.anchorNode,
|
|
3835
|
+
anchorOffset = selection.anchorOffset,
|
|
3836
|
+
focusNode$$1 = selection.focusNode,
|
|
3837
|
+
focusOffset = selection.focusOffset;
|
|
3841
3838
|
|
|
3842
3839
|
// In Firefox, anchorNode and focusNode can be "anonymous divs", e.g. the
|
|
3843
3840
|
// up/down buttons on an <input type="number">. Anonymous divs do not seem to
|
|
@@ -3846,6 +3843,7 @@ function getOffsets(outerNode) {
|
|
|
3846
3843
|
// is to access a property that typically works for non-anonymous divs and
|
|
3847
3844
|
// catch any error that may otherwise arise. See
|
|
3848
3845
|
// https://bugzilla.mozilla.org/show_bug.cgi?id=208427
|
|
3846
|
+
|
|
3849
3847
|
try {
|
|
3850
3848
|
/* eslint-disable no-unused-expressions */
|
|
3851
3849
|
anchorNode.nodeType;
|
|
@@ -4764,8 +4762,6 @@ injection$1.injectEventPluginsByName({
|
|
|
4764
4762
|
|
|
4765
4763
|
var enableAsyncSubtreeAPI = true;
|
|
4766
4764
|
var enableAsyncSchedulingByDefaultInReactDOM = false;
|
|
4767
|
-
// Exports React.Fragment
|
|
4768
|
-
var enableReactFragment = false;
|
|
4769
4765
|
// Exports ReactDOM.createRoot
|
|
4770
4766
|
var enableCreateRoot = false;
|
|
4771
4767
|
var enableUserTimingAPI = true;
|
|
@@ -4777,6 +4773,9 @@ var enableNoopReconciler = false;
|
|
|
4777
4773
|
// Experimental persistent mode (CS):
|
|
4778
4774
|
var enablePersistentReconciler = false;
|
|
4779
4775
|
|
|
4776
|
+
// Helps identify side effects in begin-phase lifecycle hooks and setState reducers:
|
|
4777
|
+
var debugRenderPhaseSideEffects = false;
|
|
4778
|
+
|
|
4780
4779
|
// Only used in www builds.
|
|
4781
4780
|
|
|
4782
4781
|
var valueStack = [];
|
|
@@ -5557,6 +5556,10 @@ function msToExpirationTime(ms) {
|
|
|
5557
5556
|
return (ms / UNIT_SIZE | 0) + MAGIC_NUMBER_OFFSET;
|
|
5558
5557
|
}
|
|
5559
5558
|
|
|
5559
|
+
function expirationTimeToMs(expirationTime) {
|
|
5560
|
+
return (expirationTime - MAGIC_NUMBER_OFFSET) * UNIT_SIZE;
|
|
5561
|
+
}
|
|
5562
|
+
|
|
5560
5563
|
function ceiling(num, precision) {
|
|
5561
5564
|
return ((num / precision | 0) + 1) * precision;
|
|
5562
5565
|
}
|
|
@@ -5573,8 +5576,7 @@ var AsyncUpdates = 1;
|
|
|
5573
5576
|
try {
|
|
5574
5577
|
var nonExtensibleObject = Object.preventExtensions({});
|
|
5575
5578
|
/* eslint-disable no-new */
|
|
5576
|
-
|
|
5577
|
-
new Set([nonExtensibleObject]);
|
|
5579
|
+
|
|
5578
5580
|
/* eslint-enable no-new */
|
|
5579
5581
|
} catch (e) {
|
|
5580
5582
|
// TODO: Consider warning about bad polyfills
|
|
@@ -6011,6 +6013,12 @@ function getStateFromUpdate(update, instance, prevState, props) {
|
|
|
6011
6013
|
var partialState = update.partialState;
|
|
6012
6014
|
if (typeof partialState === 'function') {
|
|
6013
6015
|
var updateFn = partialState;
|
|
6016
|
+
|
|
6017
|
+
// Invoke setState callback an extra time to help detect side-effects.
|
|
6018
|
+
if (debugRenderPhaseSideEffects) {
|
|
6019
|
+
updateFn.call(instance, prevState, props);
|
|
6020
|
+
}
|
|
6021
|
+
|
|
6014
6022
|
return updateFn.call(instance, prevState, props);
|
|
6015
6023
|
} else {
|
|
6016
6024
|
return partialState;
|
|
@@ -6256,6 +6264,11 @@ var ReactFiberClassComponent = function (scheduleWork, computeExpirationForFiber
|
|
|
6256
6264
|
var shouldUpdate = instance.shouldComponentUpdate(newProps, newState, newContext);
|
|
6257
6265
|
stopPhaseTimer();
|
|
6258
6266
|
|
|
6267
|
+
// Simulate an async bailout/interruption by invoking lifecycle twice.
|
|
6268
|
+
if (debugRenderPhaseSideEffects) {
|
|
6269
|
+
instance.shouldComponentUpdate(newProps, newState, newContext);
|
|
6270
|
+
}
|
|
6271
|
+
|
|
6259
6272
|
{
|
|
6260
6273
|
warning(shouldUpdate !== undefined, '%s.shouldComponentUpdate(): Returned undefined instead of a ' + 'boolean value. Make sure to return true or false.', getComponentName(workInProgress) || 'Unknown');
|
|
6261
6274
|
}
|
|
@@ -6312,10 +6325,10 @@ var ReactFiberClassComponent = function (scheduleWork, computeExpirationForFiber
|
|
|
6312
6325
|
|
|
6313
6326
|
var state = instance.state;
|
|
6314
6327
|
if (state && (typeof state !== 'object' || isArray(state))) {
|
|
6315
|
-
|
|
6328
|
+
warning(false, '%s.state: must be set to an object or null', getComponentName(workInProgress));
|
|
6316
6329
|
}
|
|
6317
6330
|
if (typeof instance.getChildContext === 'function') {
|
|
6318
|
-
|
|
6331
|
+
warning(typeof workInProgress.type.childContextTypes === 'object', '%s.getChildContext(): childContextTypes must be defined in order to ' + 'use getChildContext().', getComponentName(workInProgress));
|
|
6319
6332
|
}
|
|
6320
6333
|
}
|
|
6321
6334
|
|
|
@@ -6355,9 +6368,13 @@ var ReactFiberClassComponent = function (scheduleWork, computeExpirationForFiber
|
|
|
6355
6368
|
startPhaseTimer(workInProgress, 'componentWillMount');
|
|
6356
6369
|
var oldState = instance.state;
|
|
6357
6370
|
instance.componentWillMount();
|
|
6358
|
-
|
|
6359
6371
|
stopPhaseTimer();
|
|
6360
6372
|
|
|
6373
|
+
// Simulate an async bailout/interruption by invoking lifecycle twice.
|
|
6374
|
+
if (debugRenderPhaseSideEffects) {
|
|
6375
|
+
instance.componentWillMount();
|
|
6376
|
+
}
|
|
6377
|
+
|
|
6361
6378
|
if (oldState !== instance.state) {
|
|
6362
6379
|
{
|
|
6363
6380
|
warning(false, '%s.componentWillMount(): Assigning directly to this.state is ' + "deprecated (except inside a component's " + 'constructor). Use setState instead.', getComponentName(workInProgress));
|
|
@@ -6372,6 +6389,11 @@ var ReactFiberClassComponent = function (scheduleWork, computeExpirationForFiber
|
|
|
6372
6389
|
instance.componentWillReceiveProps(newProps, newContext);
|
|
6373
6390
|
stopPhaseTimer();
|
|
6374
6391
|
|
|
6392
|
+
// Simulate an async bailout/interruption by invoking lifecycle twice.
|
|
6393
|
+
if (debugRenderPhaseSideEffects) {
|
|
6394
|
+
instance.componentWillReceiveProps(newProps, newContext);
|
|
6395
|
+
}
|
|
6396
|
+
|
|
6375
6397
|
if (instance.state !== oldState) {
|
|
6376
6398
|
{
|
|
6377
6399
|
var componentName = getComponentName(workInProgress) || 'Component';
|
|
@@ -6581,6 +6603,11 @@ var ReactFiberClassComponent = function (scheduleWork, computeExpirationForFiber
|
|
|
6581
6603
|
startPhaseTimer(workInProgress, 'componentWillUpdate');
|
|
6582
6604
|
instance.componentWillUpdate(newProps, newState, newContext);
|
|
6583
6605
|
stopPhaseTimer();
|
|
6606
|
+
|
|
6607
|
+
// Simulate an async bailout/interruption by invoking lifecycle twice.
|
|
6608
|
+
if (debugRenderPhaseSideEffects) {
|
|
6609
|
+
instance.componentWillUpdate(newProps, newState, newContext);
|
|
6610
|
+
}
|
|
6584
6611
|
}
|
|
6585
6612
|
if (typeof instance.componentDidUpdate === 'function') {
|
|
6586
6613
|
workInProgress.effectTag |= Update;
|
|
@@ -6618,23 +6645,28 @@ var ReactFiberClassComponent = function (scheduleWork, computeExpirationForFiber
|
|
|
6618
6645
|
};
|
|
6619
6646
|
};
|
|
6620
6647
|
|
|
6621
|
-
// The Symbol used to tag the
|
|
6648
|
+
// The Symbol used to tag the ReactElement-like types. If there is no native Symbol
|
|
6622
6649
|
// nor polyfill, then a plain number is used for performance.
|
|
6623
|
-
var
|
|
6650
|
+
var hasSymbol = typeof Symbol === 'function' && Symbol['for'];
|
|
6624
6651
|
|
|
6625
|
-
|
|
6626
|
-
|
|
6627
|
-
|
|
6628
|
-
|
|
6652
|
+
var REACT_ELEMENT_TYPE = hasSymbol ? Symbol['for']('react.element') : 0xeac7;
|
|
6653
|
+
var REACT_CALL_TYPE = hasSymbol ? Symbol['for']('react.call') : 0xeac8;
|
|
6654
|
+
var REACT_RETURN_TYPE = hasSymbol ? Symbol['for']('react.return') : 0xeac9;
|
|
6655
|
+
var REACT_PORTAL_TYPE = hasSymbol ? Symbol['for']('react.portal') : 0xeaca;
|
|
6656
|
+
var REACT_FRAGMENT_TYPE = hasSymbol ? Symbol['for']('react.fragment') : 0xeacb;
|
|
6629
6657
|
|
|
6630
|
-
|
|
6631
|
-
|
|
6632
|
-
|
|
6633
|
-
|
|
6634
|
-
|
|
6635
|
-
|
|
6636
|
-
|
|
6637
|
-
|
|
6658
|
+
var MAYBE_ITERATOR_SYMBOL = typeof Symbol === 'function' && Symbol.iterator;
|
|
6659
|
+
var FAUX_ITERATOR_SYMBOL = '@@iterator';
|
|
6660
|
+
|
|
6661
|
+
function getIteratorFn(maybeIterable) {
|
|
6662
|
+
if (maybeIterable === null || typeof maybeIterable === 'undefined') {
|
|
6663
|
+
return null;
|
|
6664
|
+
}
|
|
6665
|
+
var maybeIterator = MAYBE_ITERATOR_SYMBOL && maybeIterable[MAYBE_ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL];
|
|
6666
|
+
if (typeof maybeIterator === 'function') {
|
|
6667
|
+
return maybeIterator;
|
|
6668
|
+
}
|
|
6669
|
+
return null;
|
|
6638
6670
|
}
|
|
6639
6671
|
|
|
6640
6672
|
var getCurrentFiberStackAddendum$1 = ReactDebugCurrentFiber.getCurrentFiberStackAddendum;
|
|
@@ -6672,38 +6704,6 @@ var getCurrentFiberStackAddendum$1 = ReactDebugCurrentFiber.getCurrentFiberStack
|
|
|
6672
6704
|
|
|
6673
6705
|
var isArray$1 = Array.isArray;
|
|
6674
6706
|
|
|
6675
|
-
var ITERATOR_SYMBOL = typeof Symbol === 'function' && Symbol.iterator;
|
|
6676
|
-
var FAUX_ITERATOR_SYMBOL = '@@iterator'; // Before Symbol spec.
|
|
6677
|
-
|
|
6678
|
-
// The Symbol used to tag the ReactElement-like types. If there is no native Symbol
|
|
6679
|
-
// nor polyfill, then a plain number is used for performance.
|
|
6680
|
-
var REACT_ELEMENT_TYPE;
|
|
6681
|
-
var REACT_CALL_TYPE;
|
|
6682
|
-
var REACT_RETURN_TYPE;
|
|
6683
|
-
var REACT_FRAGMENT_TYPE;
|
|
6684
|
-
if (typeof Symbol === 'function' && Symbol['for']) {
|
|
6685
|
-
REACT_ELEMENT_TYPE = Symbol['for']('react.element');
|
|
6686
|
-
REACT_CALL_TYPE = Symbol['for']('react.call');
|
|
6687
|
-
REACT_RETURN_TYPE = Symbol['for']('react.return');
|
|
6688
|
-
REACT_FRAGMENT_TYPE = Symbol['for']('react.fragment');
|
|
6689
|
-
} else {
|
|
6690
|
-
REACT_ELEMENT_TYPE = 0xeac7;
|
|
6691
|
-
REACT_CALL_TYPE = 0xeac8;
|
|
6692
|
-
REACT_RETURN_TYPE = 0xeac9;
|
|
6693
|
-
REACT_FRAGMENT_TYPE = 0xeacb;
|
|
6694
|
-
}
|
|
6695
|
-
|
|
6696
|
-
function getIteratorFn(maybeIterable) {
|
|
6697
|
-
if (maybeIterable === null || typeof maybeIterable === 'undefined') {
|
|
6698
|
-
return null;
|
|
6699
|
-
}
|
|
6700
|
-
var iteratorFn = ITERATOR_SYMBOL && maybeIterable[ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL];
|
|
6701
|
-
if (typeof iteratorFn === 'function') {
|
|
6702
|
-
return iteratorFn;
|
|
6703
|
-
}
|
|
6704
|
-
return null;
|
|
6705
|
-
}
|
|
6706
|
-
|
|
6707
6707
|
function coerceRef(current, element) {
|
|
6708
6708
|
var mixedRef = element.ref;
|
|
6709
6709
|
if (mixedRef !== null && typeof mixedRef !== 'function') {
|
|
@@ -6764,21 +6764,12 @@ function warnOnFunctionType() {
|
|
|
6764
6764
|
// to be able to optimize each path individually by branching early. This needs
|
|
6765
6765
|
// a compiler or we can do it manually. Helpers that don't need this branching
|
|
6766
6766
|
// live outside of this function.
|
|
6767
|
-
function ChildReconciler(
|
|
6767
|
+
function ChildReconciler(shouldTrackSideEffects) {
|
|
6768
6768
|
function deleteChild(returnFiber, childToDelete) {
|
|
6769
6769
|
if (!shouldTrackSideEffects) {
|
|
6770
6770
|
// Noop.
|
|
6771
6771
|
return;
|
|
6772
6772
|
}
|
|
6773
|
-
if (!shouldClone) {
|
|
6774
|
-
// When we're reconciling in place we have a work in progress copy. We
|
|
6775
|
-
// actually want the current copy. If there is no current copy, then we
|
|
6776
|
-
// don't need to track deletion side-effects.
|
|
6777
|
-
if (childToDelete.alternate === null) {
|
|
6778
|
-
return;
|
|
6779
|
-
}
|
|
6780
|
-
childToDelete = childToDelete.alternate;
|
|
6781
|
-
}
|
|
6782
6773
|
// Deletions are added in reversed order so we add it to the front.
|
|
6783
6774
|
// At this point, the return fiber's effect list is empty except for
|
|
6784
6775
|
// deletions, so we can just append the deletion to the list. The remaining
|
|
@@ -6831,22 +6822,10 @@ function ChildReconciler(shouldClone, shouldTrackSideEffects) {
|
|
|
6831
6822
|
function useFiber(fiber, pendingProps, expirationTime) {
|
|
6832
6823
|
// We currently set sibling to null and index to 0 here because it is easy
|
|
6833
6824
|
// to forget to do before returning it. E.g. for the single child case.
|
|
6834
|
-
|
|
6835
|
-
|
|
6836
|
-
|
|
6837
|
-
|
|
6838
|
-
return clone;
|
|
6839
|
-
} else {
|
|
6840
|
-
// We override the expiration time even if it is earlier, because if
|
|
6841
|
-
// we're reconciling at a later time that means that this was
|
|
6842
|
-
// down-prioritized.
|
|
6843
|
-
fiber.expirationTime = expirationTime;
|
|
6844
|
-
fiber.effectTag = NoEffect;
|
|
6845
|
-
fiber.index = 0;
|
|
6846
|
-
fiber.sibling = null;
|
|
6847
|
-
fiber.pendingProps = pendingProps;
|
|
6848
|
-
return fiber;
|
|
6849
|
-
}
|
|
6825
|
+
var clone = createWorkInProgress(fiber, pendingProps, expirationTime);
|
|
6826
|
+
clone.index = 0;
|
|
6827
|
+
clone.sibling = null;
|
|
6828
|
+
return clone;
|
|
6850
6829
|
}
|
|
6851
6830
|
|
|
6852
6831
|
function placeChild(newFiber, lastPlacedIndex, newIndex) {
|
|
@@ -7643,7 +7622,7 @@ function ChildReconciler(shouldClone, shouldTrackSideEffects) {
|
|
|
7643
7622
|
// Handle top level unkeyed fragments as if they were arrays.
|
|
7644
7623
|
// This leads to an ambiguity between <>{[...]}</> and <>...</>.
|
|
7645
7624
|
// We treat the ambiguous cases above the same.
|
|
7646
|
-
if (
|
|
7625
|
+
if (typeof newChild === 'object' && newChild !== null && newChild.type === REACT_FRAGMENT_TYPE && newChild.key === null) {
|
|
7647
7626
|
newChild = newChild.props.children;
|
|
7648
7627
|
}
|
|
7649
7628
|
|
|
@@ -7718,11 +7697,8 @@ function ChildReconciler(shouldClone, shouldTrackSideEffects) {
|
|
|
7718
7697
|
return reconcileChildFibers;
|
|
7719
7698
|
}
|
|
7720
7699
|
|
|
7721
|
-
var reconcileChildFibers = ChildReconciler(true
|
|
7722
|
-
|
|
7723
|
-
var reconcileChildFibersInPlace = ChildReconciler(false, true);
|
|
7724
|
-
|
|
7725
|
-
var mountChildFibersInPlace = ChildReconciler(false, false);
|
|
7700
|
+
var reconcileChildFibers = ChildReconciler(true);
|
|
7701
|
+
var mountChildFibers = ChildReconciler(false);
|
|
7726
7702
|
|
|
7727
7703
|
function cloneChildFibers(current, workInProgress) {
|
|
7728
7704
|
!(current === null || workInProgress.child === current.child) ? invariant(false, 'Resuming work not yet implemented.') : void 0;
|
|
@@ -7777,20 +7753,15 @@ var ReactFiberBeginWork = function (config, hostContext, hydrationContext, sched
|
|
|
7777
7753
|
// won't update its child set by applying minimal side-effects. Instead,
|
|
7778
7754
|
// we will add them all to the child before it gets rendered. That means
|
|
7779
7755
|
// we can optimize this reconciliation pass by not tracking side-effects.
|
|
7780
|
-
workInProgress.child =
|
|
7781
|
-
} else
|
|
7756
|
+
workInProgress.child = mountChildFibers(workInProgress, null, nextChildren, renderExpirationTime);
|
|
7757
|
+
} else {
|
|
7782
7758
|
// If the current child is the same as the work in progress, it means that
|
|
7783
7759
|
// we haven't yet started any work on these children. Therefore, we use
|
|
7784
7760
|
// the clone algorithm to create a copy of all the current children.
|
|
7785
7761
|
|
|
7786
7762
|
// If we had any progressed work already, that is invalid at this point so
|
|
7787
7763
|
// let's throw it out.
|
|
7788
|
-
workInProgress.child = reconcileChildFibers(workInProgress,
|
|
7789
|
-
} else {
|
|
7790
|
-
// If, on the other hand, it is already using a clone, that means we've
|
|
7791
|
-
// already begun some work on this tree and we can continue where we left
|
|
7792
|
-
// off by reconciling against the existing children.
|
|
7793
|
-
workInProgress.child = reconcileChildFibersInPlace(workInProgress, workInProgress.child, nextChildren, renderExpirationTime);
|
|
7764
|
+
workInProgress.child = reconcileChildFibers(workInProgress, current.child, nextChildren, renderExpirationTime);
|
|
7794
7765
|
}
|
|
7795
7766
|
}
|
|
7796
7767
|
|
|
@@ -7900,6 +7871,9 @@ var ReactFiberBeginWork = function (config, hostContext, hydrationContext, sched
|
|
|
7900
7871
|
{
|
|
7901
7872
|
ReactDebugCurrentFiber.setCurrentPhase('render');
|
|
7902
7873
|
nextChildren = instance.render();
|
|
7874
|
+
if (debugRenderPhaseSideEffects) {
|
|
7875
|
+
instance.render();
|
|
7876
|
+
}
|
|
7903
7877
|
ReactDebugCurrentFiber.setCurrentPhase(null);
|
|
7904
7878
|
}
|
|
7905
7879
|
// React DevTools reads this flag.
|
|
@@ -7958,7 +7932,7 @@ var ReactFiberBeginWork = function (config, hostContext, hydrationContext, sched
|
|
|
7958
7932
|
// Ensure that children mount into this root without tracking
|
|
7959
7933
|
// side-effects. This ensures that we don't store Placement effects on
|
|
7960
7934
|
// nodes that will be hydrated.
|
|
7961
|
-
workInProgress.child =
|
|
7935
|
+
workInProgress.child = mountChildFibers(workInProgress, null, element, renderExpirationTime);
|
|
7962
7936
|
} else {
|
|
7963
7937
|
// Otherwise reset hydration state in case we aborted and resumed another
|
|
7964
7938
|
// root.
|
|
@@ -8125,11 +8099,9 @@ var ReactFiberBeginWork = function (config, hostContext, hydrationContext, sched
|
|
|
8125
8099
|
// The following is a fork of reconcileChildrenAtExpirationTime but using
|
|
8126
8100
|
// stateNode to store the child.
|
|
8127
8101
|
if (current === null) {
|
|
8128
|
-
workInProgress.stateNode =
|
|
8129
|
-
} else if (current.child === workInProgress.child) {
|
|
8130
|
-
workInProgress.stateNode = reconcileChildFibers(workInProgress, workInProgress.stateNode, nextChildren, renderExpirationTime);
|
|
8102
|
+
workInProgress.stateNode = mountChildFibers(workInProgress, workInProgress.stateNode, nextChildren, renderExpirationTime);
|
|
8131
8103
|
} else {
|
|
8132
|
-
workInProgress.stateNode =
|
|
8104
|
+
workInProgress.stateNode = reconcileChildFibers(workInProgress, workInProgress.stateNode, nextChildren, renderExpirationTime);
|
|
8133
8105
|
}
|
|
8134
8106
|
|
|
8135
8107
|
memoizeProps(workInProgress, nextCall);
|
|
@@ -8158,7 +8130,7 @@ var ReactFiberBeginWork = function (config, hostContext, hydrationContext, sched
|
|
|
8158
8130
|
// flow doesn't do during mount. This doesn't happen at the root because
|
|
8159
8131
|
// the root always starts with a "current" with a null child.
|
|
8160
8132
|
// TODO: Consider unifying this with how the root works.
|
|
8161
|
-
workInProgress.child =
|
|
8133
|
+
workInProgress.child = reconcileChildFibers(workInProgress, null, nextChildren, renderExpirationTime);
|
|
8162
8134
|
memoizeProps(workInProgress, nextChildren);
|
|
8163
8135
|
} else {
|
|
8164
8136
|
reconcileChildren(current, workInProgress, nextChildren);
|
|
@@ -9739,6 +9711,12 @@ function logCapturedError(capturedError) {
|
|
|
9739
9711
|
return;
|
|
9740
9712
|
}
|
|
9741
9713
|
|
|
9714
|
+
var error = capturedError.error;
|
|
9715
|
+
var suppressLogging = error && error.suppressReactErrorLogging;
|
|
9716
|
+
if (suppressLogging) {
|
|
9717
|
+
return;
|
|
9718
|
+
}
|
|
9719
|
+
|
|
9742
9720
|
{
|
|
9743
9721
|
var componentName = capturedError.componentName,
|
|
9744
9722
|
componentStack = capturedError.componentStack,
|
|
@@ -9834,6 +9812,7 @@ var ReactFiberScheduler = function (config) {
|
|
|
9834
9812
|
|
|
9835
9813
|
var now = config.now,
|
|
9836
9814
|
scheduleDeferredCallback = config.scheduleDeferredCallback,
|
|
9815
|
+
cancelDeferredCallback = config.cancelDeferredCallback,
|
|
9837
9816
|
useSyncScheduling = config.useSyncScheduling,
|
|
9838
9817
|
prepareForCommit = config.prepareForCommit,
|
|
9839
9818
|
resetAfterCommit = config.resetAfterCommit;
|
|
@@ -10241,6 +10220,7 @@ var ReactFiberScheduler = function (config) {
|
|
|
10241
10220
|
{
|
|
10242
10221
|
ReactDebugCurrentFiber.setCurrentFiber(workInProgress);
|
|
10243
10222
|
}
|
|
10223
|
+
|
|
10244
10224
|
var next = beginWork(current, workInProgress, nextRenderExpirationTime);
|
|
10245
10225
|
{
|
|
10246
10226
|
ReactDebugCurrentFiber.resetCurrentFiber();
|
|
@@ -10561,7 +10541,10 @@ var ReactFiberScheduler = function (config) {
|
|
|
10561
10541
|
} catch (e) {
|
|
10562
10542
|
// Prevent cycle if logCapturedError() throws.
|
|
10563
10543
|
// A cycle may still occur if logCapturedError renders a component that throws.
|
|
10564
|
-
|
|
10544
|
+
var suppressLogging = e && e.suppressReactErrorLogging;
|
|
10545
|
+
if (!suppressLogging) {
|
|
10546
|
+
console.error(e);
|
|
10547
|
+
}
|
|
10565
10548
|
}
|
|
10566
10549
|
|
|
10567
10550
|
// If we're in the commit phase, defer scheduling an update on the
|
|
@@ -10706,6 +10689,19 @@ var ReactFiberScheduler = function (config) {
|
|
|
10706
10689
|
return scheduleWorkImpl(fiber, expirationTime, false);
|
|
10707
10690
|
}
|
|
10708
10691
|
|
|
10692
|
+
function checkRootNeedsClearing(root, fiber, expirationTime) {
|
|
10693
|
+
if (!isWorking && root === nextRoot && expirationTime < nextRenderExpirationTime) {
|
|
10694
|
+
// Restart the root from the top.
|
|
10695
|
+
if (nextUnitOfWork !== null) {
|
|
10696
|
+
// This is an interruption. (Used for performance tracking.)
|
|
10697
|
+
interruptedBy = fiber;
|
|
10698
|
+
}
|
|
10699
|
+
nextRoot = null;
|
|
10700
|
+
nextUnitOfWork = null;
|
|
10701
|
+
nextRenderExpirationTime = NoWork;
|
|
10702
|
+
}
|
|
10703
|
+
}
|
|
10704
|
+
|
|
10709
10705
|
function scheduleWorkImpl(fiber, expirationTime, isErrorRecovery) {
|
|
10710
10706
|
recordScheduleUpdate();
|
|
10711
10707
|
|
|
@@ -10731,17 +10727,10 @@ var ReactFiberScheduler = function (config) {
|
|
|
10731
10727
|
if (node['return'] === null) {
|
|
10732
10728
|
if (node.tag === HostRoot) {
|
|
10733
10729
|
var root = node.stateNode;
|
|
10734
|
-
|
|
10735
|
-
|
|
10736
|
-
if (nextUnitOfWork !== null) {
|
|
10737
|
-
// This is an interruption. (Used for performance tracking.)
|
|
10738
|
-
interruptedBy = fiber;
|
|
10739
|
-
}
|
|
10740
|
-
nextRoot = null;
|
|
10741
|
-
nextUnitOfWork = null;
|
|
10742
|
-
nextRenderExpirationTime = NoWork;
|
|
10743
|
-
}
|
|
10730
|
+
|
|
10731
|
+
checkRootNeedsClearing(root, fiber, expirationTime);
|
|
10744
10732
|
requestWork(root, expirationTime);
|
|
10733
|
+
checkRootNeedsClearing(root, fiber, expirationTime);
|
|
10745
10734
|
} else {
|
|
10746
10735
|
{
|
|
10747
10736
|
if (!isErrorRecovery && fiber.tag === ClassComponent) {
|
|
@@ -10793,7 +10782,8 @@ var ReactFiberScheduler = function (config) {
|
|
|
10793
10782
|
var firstScheduledRoot = null;
|
|
10794
10783
|
var lastScheduledRoot = null;
|
|
10795
10784
|
|
|
10796
|
-
var
|
|
10785
|
+
var callbackExpirationTime = NoWork;
|
|
10786
|
+
var callbackID = -1;
|
|
10797
10787
|
var isRendering = false;
|
|
10798
10788
|
var nextFlushedRoot = null;
|
|
10799
10789
|
var nextFlushedExpirationTime = NoWork;
|
|
@@ -10811,6 +10801,31 @@ var ReactFiberScheduler = function (config) {
|
|
|
10811
10801
|
|
|
10812
10802
|
var timeHeuristicForUnitOfWork = 1;
|
|
10813
10803
|
|
|
10804
|
+
function scheduleCallbackWithExpiration(expirationTime) {
|
|
10805
|
+
if (callbackExpirationTime !== NoWork) {
|
|
10806
|
+
// A callback is already scheduled. Check its expiration time (timeout).
|
|
10807
|
+
if (expirationTime > callbackExpirationTime) {
|
|
10808
|
+
// Existing callback has sufficient timeout. Exit.
|
|
10809
|
+
return;
|
|
10810
|
+
} else {
|
|
10811
|
+
// Existing callback has insufficient timeout. Cancel and schedule a
|
|
10812
|
+
// new one.
|
|
10813
|
+
cancelDeferredCallback(callbackID);
|
|
10814
|
+
}
|
|
10815
|
+
// The request callback timer is already running. Don't start a new one.
|
|
10816
|
+
} else {
|
|
10817
|
+
startRequestCallbackTimer();
|
|
10818
|
+
}
|
|
10819
|
+
|
|
10820
|
+
// Compute a timeout for the given expiration time.
|
|
10821
|
+
var currentMs = now() - startTime;
|
|
10822
|
+
var expirationMs = expirationTimeToMs(expirationTime);
|
|
10823
|
+
var timeout = expirationMs - currentMs;
|
|
10824
|
+
|
|
10825
|
+
callbackExpirationTime = expirationTime;
|
|
10826
|
+
callbackID = scheduleDeferredCallback(performAsyncWork, { timeout: timeout });
|
|
10827
|
+
}
|
|
10828
|
+
|
|
10814
10829
|
// requestWork is called by the scheduler whenever a root receives an update.
|
|
10815
10830
|
// It's up to the renderer to call renderRoot at some point in the future.
|
|
10816
10831
|
function requestWork(root, expirationTime) {
|
|
@@ -10851,7 +10866,9 @@ var ReactFiberScheduler = function (config) {
|
|
|
10851
10866
|
if (isUnbatchingUpdates) {
|
|
10852
10867
|
// ...unless we're inside unbatchedUpdates, in which case we should
|
|
10853
10868
|
// flush it now.
|
|
10854
|
-
|
|
10869
|
+
nextFlushedRoot = root;
|
|
10870
|
+
nextFlushedExpirationTime = Sync;
|
|
10871
|
+
performWorkOnRoot(nextFlushedRoot, nextFlushedExpirationTime);
|
|
10855
10872
|
}
|
|
10856
10873
|
return;
|
|
10857
10874
|
}
|
|
@@ -10859,10 +10876,8 @@ var ReactFiberScheduler = function (config) {
|
|
|
10859
10876
|
// TODO: Get rid of Sync and use current time?
|
|
10860
10877
|
if (expirationTime === Sync) {
|
|
10861
10878
|
performWork(Sync, null);
|
|
10862
|
-
} else
|
|
10863
|
-
|
|
10864
|
-
startRequestCallbackTimer();
|
|
10865
|
-
scheduleDeferredCallback(performAsyncWork);
|
|
10879
|
+
} else {
|
|
10880
|
+
scheduleCallbackWithExpiration(expirationTime);
|
|
10866
10881
|
}
|
|
10867
10882
|
}
|
|
10868
10883
|
|
|
@@ -10959,13 +10974,12 @@ var ReactFiberScheduler = function (config) {
|
|
|
10959
10974
|
|
|
10960
10975
|
// If we're inside a callback, set this to false since we just completed it.
|
|
10961
10976
|
if (deadline !== null) {
|
|
10962
|
-
|
|
10977
|
+
callbackExpirationTime = NoWork;
|
|
10978
|
+
callbackID = -1;
|
|
10963
10979
|
}
|
|
10964
10980
|
// If there's work left over, schedule a new callback.
|
|
10965
|
-
if (
|
|
10966
|
-
|
|
10967
|
-
startRequestCallbackTimer();
|
|
10968
|
-
scheduleDeferredCallback(performAsyncWork);
|
|
10981
|
+
if (nextFlushedExpirationTime !== NoWork) {
|
|
10982
|
+
scheduleCallbackWithExpiration(nextFlushedExpirationTime);
|
|
10969
10983
|
}
|
|
10970
10984
|
|
|
10971
10985
|
// Clean-up.
|
|
@@ -11038,6 +11052,8 @@ var ReactFiberScheduler = function (config) {
|
|
|
11038
11052
|
return false;
|
|
11039
11053
|
}
|
|
11040
11054
|
if (deadline.timeRemaining() > timeHeuristicForUnitOfWork) {
|
|
11055
|
+
// Disregard deadline.didTimeout. Only expired work should be flushed
|
|
11056
|
+
// during a timeout. This path is only hit for non-expired work.
|
|
11041
11057
|
return false;
|
|
11042
11058
|
}
|
|
11043
11059
|
deadlineDidExpire = true;
|
|
@@ -11280,9 +11296,24 @@ var ReactFiberReconciler$3 = ( ReactFiberReconciler$2 && ReactFiberReconciler$1
|
|
|
11280
11296
|
// This is hacky but makes it work with both Rollup and Jest.
|
|
11281
11297
|
var reactReconciler = ReactFiberReconciler$3['default'] ? ReactFiberReconciler$3['default'] : ReactFiberReconciler$3;
|
|
11282
11298
|
|
|
11299
|
+
function createPortal$1(children, containerInfo,
|
|
11300
|
+
// TODO: figure out the API for cross-renderer implementation.
|
|
11301
|
+
implementation) {
|
|
11302
|
+
var key = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : null;
|
|
11303
|
+
|
|
11304
|
+
return {
|
|
11305
|
+
// This tag allow us to uniquely identify this as a React Portal
|
|
11306
|
+
$$typeof: REACT_PORTAL_TYPE,
|
|
11307
|
+
key: key == null ? null : '' + key,
|
|
11308
|
+
children: children,
|
|
11309
|
+
containerInfo: containerInfo,
|
|
11310
|
+
implementation: implementation
|
|
11311
|
+
};
|
|
11312
|
+
}
|
|
11313
|
+
|
|
11283
11314
|
// TODO: this is special because it gets imported during build.
|
|
11284
11315
|
|
|
11285
|
-
var ReactVersion = '16.
|
|
11316
|
+
var ReactVersion = '16.2.0';
|
|
11286
11317
|
|
|
11287
11318
|
// a requestAnimationFrame, storing the time for the start of the frame, then
|
|
11288
11319
|
// scheduling a postMessage which gets scheduled after paint. Within the
|
|
@@ -11312,24 +11343,28 @@ if (hasNativePerformanceNow) {
|
|
|
11312
11343
|
|
|
11313
11344
|
// TODO: There's no way to cancel, because Fiber doesn't atm.
|
|
11314
11345
|
var rIC = void 0;
|
|
11346
|
+
var cIC = void 0;
|
|
11315
11347
|
|
|
11316
11348
|
if (!ExecutionEnvironment.canUseDOM) {
|
|
11317
11349
|
rIC = function (frameCallback) {
|
|
11318
|
-
setTimeout(function () {
|
|
11350
|
+
return setTimeout(function () {
|
|
11319
11351
|
frameCallback({
|
|
11320
11352
|
timeRemaining: function () {
|
|
11321
11353
|
return Infinity;
|
|
11322
11354
|
}
|
|
11323
11355
|
});
|
|
11324
11356
|
});
|
|
11325
|
-
return 0;
|
|
11326
11357
|
};
|
|
11327
|
-
|
|
11328
|
-
|
|
11358
|
+
cIC = function (timeoutID) {
|
|
11359
|
+
clearTimeout(timeoutID);
|
|
11360
|
+
};
|
|
11361
|
+
} else if (typeof requestIdleCallback !== 'function' || typeof cancelIdleCallback !== 'function') {
|
|
11362
|
+
// Polyfill requestIdleCallback and cancelIdleCallback
|
|
11329
11363
|
|
|
11330
11364
|
var scheduledRICCallback = null;
|
|
11331
|
-
|
|
11332
11365
|
var isIdleScheduled = false;
|
|
11366
|
+
var timeoutTime = -1;
|
|
11367
|
+
|
|
11333
11368
|
var isAnimationFrameScheduled = false;
|
|
11334
11369
|
|
|
11335
11370
|
var frameDeadline = 0;
|
|
@@ -11342,17 +11377,21 @@ if (!ExecutionEnvironment.canUseDOM) {
|
|
|
11342
11377
|
var frameDeadlineObject;
|
|
11343
11378
|
if (hasNativePerformanceNow) {
|
|
11344
11379
|
frameDeadlineObject = {
|
|
11380
|
+
didTimeout: false,
|
|
11345
11381
|
timeRemaining: function () {
|
|
11346
11382
|
// We assume that if we have a performance timer that the rAF callback
|
|
11347
11383
|
// gets a performance timer value. Not sure if this is always true.
|
|
11348
|
-
|
|
11384
|
+
var remaining = frameDeadline - performance.now();
|
|
11385
|
+
return remaining > 0 ? remaining : 0;
|
|
11349
11386
|
}
|
|
11350
11387
|
};
|
|
11351
11388
|
} else {
|
|
11352
11389
|
frameDeadlineObject = {
|
|
11390
|
+
didTimeout: false,
|
|
11353
11391
|
timeRemaining: function () {
|
|
11354
11392
|
// Fallback to Date.now()
|
|
11355
|
-
|
|
11393
|
+
var remaining = frameDeadline - Date.now();
|
|
11394
|
+
return remaining > 0 ? remaining : 0;
|
|
11356
11395
|
}
|
|
11357
11396
|
};
|
|
11358
11397
|
}
|
|
@@ -11363,7 +11402,33 @@ if (!ExecutionEnvironment.canUseDOM) {
|
|
|
11363
11402
|
if (event.source !== window || event.data !== messageKey) {
|
|
11364
11403
|
return;
|
|
11365
11404
|
}
|
|
11405
|
+
|
|
11366
11406
|
isIdleScheduled = false;
|
|
11407
|
+
|
|
11408
|
+
var currentTime = now();
|
|
11409
|
+
if (frameDeadline - currentTime <= 0) {
|
|
11410
|
+
// There's no time left in this idle period. Check if the callback has
|
|
11411
|
+
// a timeout and whether it's been exceeded.
|
|
11412
|
+
if (timeoutTime !== -1 && timeoutTime <= currentTime) {
|
|
11413
|
+
// Exceeded the timeout. Invoke the callback even though there's no
|
|
11414
|
+
// time left.
|
|
11415
|
+
frameDeadlineObject.didTimeout = true;
|
|
11416
|
+
} else {
|
|
11417
|
+
// No timeout.
|
|
11418
|
+
if (!isAnimationFrameScheduled) {
|
|
11419
|
+
// Schedule another animation callback so we retry later.
|
|
11420
|
+
isAnimationFrameScheduled = true;
|
|
11421
|
+
requestAnimationFrame(animationTick);
|
|
11422
|
+
}
|
|
11423
|
+
// Exit without invoking the callback.
|
|
11424
|
+
return;
|
|
11425
|
+
}
|
|
11426
|
+
} else {
|
|
11427
|
+
// There's still time left in this idle period.
|
|
11428
|
+
frameDeadlineObject.didTimeout = false;
|
|
11429
|
+
}
|
|
11430
|
+
|
|
11431
|
+
timeoutTime = -1;
|
|
11367
11432
|
var callback = scheduledRICCallback;
|
|
11368
11433
|
scheduledRICCallback = null;
|
|
11369
11434
|
if (callback !== null) {
|
|
@@ -11401,10 +11466,13 @@ if (!ExecutionEnvironment.canUseDOM) {
|
|
|
11401
11466
|
}
|
|
11402
11467
|
};
|
|
11403
11468
|
|
|
11404
|
-
rIC = function (callback) {
|
|
11469
|
+
rIC = function (callback, options) {
|
|
11405
11470
|
// This assumes that we only schedule one callback at a time because that's
|
|
11406
11471
|
// how Fiber uses it.
|
|
11407
11472
|
scheduledRICCallback = callback;
|
|
11473
|
+
if (options != null && typeof options.timeout === 'number') {
|
|
11474
|
+
timeoutTime = now() + options.timeout;
|
|
11475
|
+
}
|
|
11408
11476
|
if (!isAnimationFrameScheduled) {
|
|
11409
11477
|
// If rAF didn't already schedule one, we need to schedule a frame.
|
|
11410
11478
|
// TODO: If this rAF doesn't materialize because the browser throttles, we
|
|
@@ -11415,8 +11483,15 @@ if (!ExecutionEnvironment.canUseDOM) {
|
|
|
11415
11483
|
}
|
|
11416
11484
|
return 0;
|
|
11417
11485
|
};
|
|
11486
|
+
|
|
11487
|
+
cIC = function () {
|
|
11488
|
+
scheduledRICCallback = null;
|
|
11489
|
+
isIdleScheduled = false;
|
|
11490
|
+
timeoutTime = -1;
|
|
11491
|
+
};
|
|
11418
11492
|
} else {
|
|
11419
|
-
rIC = requestIdleCallback;
|
|
11493
|
+
rIC = window.requestIdleCallback;
|
|
11494
|
+
cIC = window.cancelIdleCallback;
|
|
11420
11495
|
}
|
|
11421
11496
|
|
|
11422
11497
|
/**
|
|
@@ -11806,6 +11881,14 @@ function initWrapperState(element, props) {
|
|
|
11806
11881
|
};
|
|
11807
11882
|
}
|
|
11808
11883
|
|
|
11884
|
+
function updateChecked(element, props) {
|
|
11885
|
+
var node = element;
|
|
11886
|
+
var checked = props.checked;
|
|
11887
|
+
if (checked != null) {
|
|
11888
|
+
setValueForProperty(node, 'checked', checked);
|
|
11889
|
+
}
|
|
11890
|
+
}
|
|
11891
|
+
|
|
11809
11892
|
function updateWrapper(element, props) {
|
|
11810
11893
|
var node = element;
|
|
11811
11894
|
{
|
|
@@ -11821,10 +11904,7 @@ function updateWrapper(element, props) {
|
|
|
11821
11904
|
}
|
|
11822
11905
|
}
|
|
11823
11906
|
|
|
11824
|
-
|
|
11825
|
-
if (checked != null) {
|
|
11826
|
-
setValueForProperty(node, 'checked', checked || false);
|
|
11827
|
-
}
|
|
11907
|
+
updateChecked(element, props);
|
|
11828
11908
|
|
|
11829
11909
|
var value = props.value;
|
|
11830
11910
|
if (value != null) {
|
|
@@ -11950,6 +12030,11 @@ function updateNamedCousins(rootNode, props) {
|
|
|
11950
12030
|
// mixing React radio buttons with non-React ones.
|
|
11951
12031
|
var otherProps = getFiberCurrentPropsFromNode$1(otherNode);
|
|
11952
12032
|
!otherProps ? invariant(false, 'ReactDOMInput: Mixing React and non-React radio inputs with the same `name` is not supported.') : void 0;
|
|
12033
|
+
|
|
12034
|
+
// We need update the tracked value on the named cousin since the value
|
|
12035
|
+
// was changed but the input saw no event or value set
|
|
12036
|
+
updateValueIfChanged(otherNode);
|
|
12037
|
+
|
|
11953
12038
|
// If this is a controlled radio button group, forcing the input that
|
|
11954
12039
|
// was previously checked to update will cause it to be come re-checked
|
|
11955
12040
|
// as appropriate.
|
|
@@ -11997,7 +12082,6 @@ function postMountWrapper$1(element, props) {
|
|
|
11997
12082
|
|
|
11998
12083
|
function getHostProps$1(element, props) {
|
|
11999
12084
|
var hostProps = _assign({ children: undefined }, props);
|
|
12000
|
-
|
|
12001
12085
|
var content = flattenChildren(props.children);
|
|
12002
12086
|
|
|
12003
12087
|
if (content) {
|
|
@@ -12223,11 +12307,10 @@ function initWrapperState$2(element, props) {
|
|
|
12223
12307
|
}
|
|
12224
12308
|
}
|
|
12225
12309
|
|
|
12226
|
-
var
|
|
12227
|
-
var initialValue = value;
|
|
12310
|
+
var initialValue = props.value;
|
|
12228
12311
|
|
|
12229
12312
|
// Only bother fetching default value if we're going to use it
|
|
12230
|
-
if (
|
|
12313
|
+
if (initialValue == null) {
|
|
12231
12314
|
var defaultValue = props.defaultValue;
|
|
12232
12315
|
// TODO (yungsters): Remove support for children content in <textarea>.
|
|
12233
12316
|
var children = props.children;
|
|
@@ -12377,89 +12460,6 @@ var setInnerHTML = createMicrosoftUnsafeLocalFunction(function (node, html) {
|
|
|
12377
12460
|
}
|
|
12378
12461
|
});
|
|
12379
12462
|
|
|
12380
|
-
// code copied and modified from escape-html
|
|
12381
|
-
/**
|
|
12382
|
-
* Module variables.
|
|
12383
|
-
* @private
|
|
12384
|
-
*/
|
|
12385
|
-
|
|
12386
|
-
var matchHtmlRegExp = /["'&<>]/;
|
|
12387
|
-
|
|
12388
|
-
/**
|
|
12389
|
-
* Escape special characters in the given string of html.
|
|
12390
|
-
*
|
|
12391
|
-
* @param {string} string The string to escape for inserting into HTML
|
|
12392
|
-
* @return {string}
|
|
12393
|
-
* @public
|
|
12394
|
-
*/
|
|
12395
|
-
|
|
12396
|
-
function escapeHtml(string) {
|
|
12397
|
-
var str = '' + string;
|
|
12398
|
-
var match = matchHtmlRegExp.exec(str);
|
|
12399
|
-
|
|
12400
|
-
if (!match) {
|
|
12401
|
-
return str;
|
|
12402
|
-
}
|
|
12403
|
-
|
|
12404
|
-
var escape;
|
|
12405
|
-
var html = '';
|
|
12406
|
-
var index = 0;
|
|
12407
|
-
var lastIndex = 0;
|
|
12408
|
-
|
|
12409
|
-
for (index = match.index; index < str.length; index++) {
|
|
12410
|
-
switch (str.charCodeAt(index)) {
|
|
12411
|
-
case 34:
|
|
12412
|
-
// "
|
|
12413
|
-
escape = '"';
|
|
12414
|
-
break;
|
|
12415
|
-
case 38:
|
|
12416
|
-
// &
|
|
12417
|
-
escape = '&';
|
|
12418
|
-
break;
|
|
12419
|
-
case 39:
|
|
12420
|
-
// '
|
|
12421
|
-
escape = '''; // modified from escape-html; used to be '''
|
|
12422
|
-
break;
|
|
12423
|
-
case 60:
|
|
12424
|
-
// <
|
|
12425
|
-
escape = '<';
|
|
12426
|
-
break;
|
|
12427
|
-
case 62:
|
|
12428
|
-
// >
|
|
12429
|
-
escape = '>';
|
|
12430
|
-
break;
|
|
12431
|
-
default:
|
|
12432
|
-
continue;
|
|
12433
|
-
}
|
|
12434
|
-
|
|
12435
|
-
if (lastIndex !== index) {
|
|
12436
|
-
html += str.substring(lastIndex, index);
|
|
12437
|
-
}
|
|
12438
|
-
|
|
12439
|
-
lastIndex = index + 1;
|
|
12440
|
-
html += escape;
|
|
12441
|
-
}
|
|
12442
|
-
|
|
12443
|
-
return lastIndex !== index ? html + str.substring(lastIndex, index) : html;
|
|
12444
|
-
}
|
|
12445
|
-
// end code copied and modified from escape-html
|
|
12446
|
-
|
|
12447
|
-
/**
|
|
12448
|
-
* Escapes text to prevent scripting attacks.
|
|
12449
|
-
*
|
|
12450
|
-
* @param {*} text Text value to escape.
|
|
12451
|
-
* @return {string} An escaped string.
|
|
12452
|
-
*/
|
|
12453
|
-
function escapeTextContentForBrowser(text) {
|
|
12454
|
-
if (typeof text === 'boolean' || typeof text === 'number') {
|
|
12455
|
-
// this shortcircuit helps perf for types that we know will never have
|
|
12456
|
-
// special characters, especially given that this function is used often
|
|
12457
|
-
// for numeric dom ids.
|
|
12458
|
-
return '' + text;
|
|
12459
|
-
}
|
|
12460
|
-
return escapeHtml(text);
|
|
12461
|
-
}
|
|
12462
|
-
|
|
12463
12463
|
/**
|
|
12464
12464
|
* Set the textContent property of a node, ensuring that whitespace is preserved
|
|
12465
12465
|
* even in IE8. innerText is a poor substitute for textContent and, among many
|
|
@@ -12482,20 +12482,6 @@ var setTextContent = function (node, text) {
|
|
|
12482
12482
|
node.textContent = text;
|
|
12483
12483
|
};
|
|
12484
12484
|
|
|
12485
|
-
if (ExecutionEnvironment.canUseDOM) {
|
|
12486
|
-
if (!('textContent' in document.documentElement)) {
|
|
12487
|
-
setTextContent = function (node, text) {
|
|
12488
|
-
if (node.nodeType === TEXT_NODE) {
|
|
12489
|
-
node.nodeValue = text;
|
|
12490
|
-
return;
|
|
12491
|
-
}
|
|
12492
|
-
setInnerHTML(node, escapeTextContentForBrowser(text));
|
|
12493
|
-
};
|
|
12494
|
-
}
|
|
12495
|
-
}
|
|
12496
|
-
|
|
12497
|
-
var setTextContent$1 = setTextContent;
|
|
12498
|
-
|
|
12499
12485
|
/**
|
|
12500
12486
|
* CSS properties which accept numbers but are not in units of "px".
|
|
12501
12487
|
*/
|
|
@@ -12601,7 +12587,7 @@ function dangerousStyleValue(name, value, isCustomProperty) {
|
|
|
12601
12587
|
return ('' + value).trim();
|
|
12602
12588
|
}
|
|
12603
12589
|
|
|
12604
|
-
var warnValidStyle = emptyFunction
|
|
12590
|
+
var warnValidStyle = emptyFunction;
|
|
12605
12591
|
|
|
12606
12592
|
{
|
|
12607
12593
|
// 'msTransform' is correct, but the other prefixes should be capitalized
|
|
@@ -13471,36 +13457,46 @@ function getStackAddendum$2() {
|
|
|
13471
13457
|
{
|
|
13472
13458
|
var warnedProperties$1 = {};
|
|
13473
13459
|
var hasOwnProperty$1 = Object.prototype.hasOwnProperty;
|
|
13474
|
-
var EVENT_NAME_REGEX = /^on
|
|
13460
|
+
var EVENT_NAME_REGEX = /^on./;
|
|
13461
|
+
var INVALID_EVENT_NAME_REGEX = /^on[^A-Z]/;
|
|
13475
13462
|
var rARIA$1 = new RegExp('^(aria)-[' + ATTRIBUTE_NAME_CHAR + ']*$');
|
|
13476
13463
|
var rARIACamel$1 = new RegExp('^(aria)[A-Z][' + ATTRIBUTE_NAME_CHAR + ']*$');
|
|
13477
13464
|
|
|
13478
|
-
var validateProperty$1 = function (tagName, name, value) {
|
|
13465
|
+
var validateProperty$1 = function (tagName, name, value, canUseEventSystem) {
|
|
13479
13466
|
if (hasOwnProperty$1.call(warnedProperties$1, name) && warnedProperties$1[name]) {
|
|
13480
13467
|
return true;
|
|
13481
13468
|
}
|
|
13482
13469
|
|
|
13483
|
-
if (registrationNameModules.hasOwnProperty(name)) {
|
|
13484
|
-
return true;
|
|
13485
|
-
}
|
|
13486
|
-
|
|
13487
|
-
if (plugins.length === 0 && EVENT_NAME_REGEX.test(name)) {
|
|
13488
|
-
// If no event plugins have been injected, we might be in a server environment.
|
|
13489
|
-
// Don't check events in this case.
|
|
13490
|
-
return true;
|
|
13491
|
-
}
|
|
13492
|
-
|
|
13493
13470
|
var lowerCasedName = name.toLowerCase();
|
|
13494
|
-
|
|
13495
|
-
|
|
13496
|
-
if (registrationName != null) {
|
|
13497
|
-
warning(false, 'Invalid event handler property `%s`. Did you mean `%s`?%s', name, registrationName, getStackAddendum$2());
|
|
13471
|
+
if (lowerCasedName === 'onfocusin' || lowerCasedName === 'onfocusout') {
|
|
13472
|
+
warning(false, 'React uses onFocus and onBlur instead of onFocusIn and onFocusOut. ' + 'All React events are normalized to bubble, so onFocusIn and onFocusOut ' + 'are not needed/supported by React.');
|
|
13498
13473
|
warnedProperties$1[name] = true;
|
|
13499
13474
|
return true;
|
|
13500
13475
|
}
|
|
13501
13476
|
|
|
13502
|
-
|
|
13503
|
-
|
|
13477
|
+
// We can't rely on the event system being injected on the server.
|
|
13478
|
+
if (canUseEventSystem) {
|
|
13479
|
+
if (registrationNameModules.hasOwnProperty(name)) {
|
|
13480
|
+
return true;
|
|
13481
|
+
}
|
|
13482
|
+
var registrationName = possibleRegistrationNames.hasOwnProperty(lowerCasedName) ? possibleRegistrationNames[lowerCasedName] : null;
|
|
13483
|
+
if (registrationName != null) {
|
|
13484
|
+
warning(false, 'Invalid event handler property `%s`. Did you mean `%s`?%s', name, registrationName, getStackAddendum$2());
|
|
13485
|
+
warnedProperties$1[name] = true;
|
|
13486
|
+
return true;
|
|
13487
|
+
}
|
|
13488
|
+
if (EVENT_NAME_REGEX.test(name)) {
|
|
13489
|
+
warning(false, 'Unknown event handler property `%s`. It will be ignored.%s', name, getStackAddendum$2());
|
|
13490
|
+
warnedProperties$1[name] = true;
|
|
13491
|
+
return true;
|
|
13492
|
+
}
|
|
13493
|
+
} else if (EVENT_NAME_REGEX.test(name)) {
|
|
13494
|
+
// If no event plugins have been injected, we are in a server environment.
|
|
13495
|
+
// So we can't tell if the event name is correct for sure, but we can filter
|
|
13496
|
+
// out known bad ones like `onclick`. We can't suggest a specific replacement though.
|
|
13497
|
+
if (INVALID_EVENT_NAME_REGEX.test(name)) {
|
|
13498
|
+
warning(false, 'Invalid event handler property `%s`. ' + 'React events use the camelCase naming convention, for example `onClick`.%s', name, getStackAddendum$2());
|
|
13499
|
+
}
|
|
13504
13500
|
warnedProperties$1[name] = true;
|
|
13505
13501
|
return true;
|
|
13506
13502
|
}
|
|
@@ -13510,12 +13506,6 @@ function getStackAddendum$2() {
|
|
|
13510
13506
|
return true;
|
|
13511
13507
|
}
|
|
13512
13508
|
|
|
13513
|
-
if (lowerCasedName === 'onfocusin' || lowerCasedName === 'onfocusout') {
|
|
13514
|
-
warning(false, 'React uses onFocus and onBlur instead of onFocusIn and onFocusOut. ' + 'All React events are normalized to bubble, so onFocusIn and onFocusOut ' + 'are not needed/supported by React.');
|
|
13515
|
-
warnedProperties$1[name] = true;
|
|
13516
|
-
return true;
|
|
13517
|
-
}
|
|
13518
|
-
|
|
13519
13509
|
if (lowerCasedName === 'innerhtml') {
|
|
13520
13510
|
warning(false, 'Directly setting property `innerHTML` is not permitted. ' + 'For more information, lookup documentation on `dangerouslySetInnerHTML`.');
|
|
13521
13511
|
warnedProperties$1[name] = true;
|
|
@@ -13584,10 +13574,10 @@ function getStackAddendum$2() {
|
|
|
13584
13574
|
};
|
|
13585
13575
|
}
|
|
13586
13576
|
|
|
13587
|
-
var warnUnknownProperties = function (type, props) {
|
|
13577
|
+
var warnUnknownProperties = function (type, props, canUseEventSystem) {
|
|
13588
13578
|
var unknownProps = [];
|
|
13589
13579
|
for (var key in props) {
|
|
13590
|
-
var isValid = validateProperty$1(type, key, props[key]);
|
|
13580
|
+
var isValid = validateProperty$1(type, key, props[key], canUseEventSystem);
|
|
13591
13581
|
if (!isValid) {
|
|
13592
13582
|
unknownProps.push(key);
|
|
13593
13583
|
}
|
|
@@ -13603,11 +13593,11 @@ var warnUnknownProperties = function (type, props) {
|
|
|
13603
13593
|
}
|
|
13604
13594
|
};
|
|
13605
13595
|
|
|
13606
|
-
function validateProperties$2(type, props) {
|
|
13596
|
+
function validateProperties$2(type, props, canUseEventSystem) {
|
|
13607
13597
|
if (isCustomComponent(type, props)) {
|
|
13608
13598
|
return;
|
|
13609
13599
|
}
|
|
13610
|
-
warnUnknownProperties(type, props);
|
|
13600
|
+
warnUnknownProperties(type, props, canUseEventSystem);
|
|
13611
13601
|
}
|
|
13612
13602
|
|
|
13613
13603
|
// TODO: direct imports like some-package/src/* are bad. Fix me.
|
|
@@ -13628,7 +13618,7 @@ var HTML = '__html';
|
|
|
13628
13618
|
var HTML_NAMESPACE = Namespaces.html;
|
|
13629
13619
|
|
|
13630
13620
|
|
|
13631
|
-
var getStack = emptyFunction
|
|
13621
|
+
var getStack = emptyFunction.thatReturns('');
|
|
13632
13622
|
|
|
13633
13623
|
{
|
|
13634
13624
|
getStack = getCurrentFiberStackAddendum$2;
|
|
@@ -13646,7 +13636,7 @@ var getStack = emptyFunction$1.thatReturns('');
|
|
|
13646
13636
|
var validatePropertiesInDevelopment = function (type, props) {
|
|
13647
13637
|
validateProperties(type, props);
|
|
13648
13638
|
validateProperties$1(type, props);
|
|
13649
|
-
validateProperties$2(type, props);
|
|
13639
|
+
validateProperties$2(type, props, /* canUseEventSystem */true);
|
|
13650
13640
|
};
|
|
13651
13641
|
|
|
13652
13642
|
// HTML parsing normalizes CR and CRLF to LF.
|
|
@@ -13769,7 +13759,7 @@ function trapClickOnNonInteractiveElement(node) {
|
|
|
13769
13759
|
// bookkeeping for it. Not sure if we need to clear it when the listener is
|
|
13770
13760
|
// removed.
|
|
13771
13761
|
// TODO: Only do this for the relevant Safaris maybe?
|
|
13772
|
-
node.onclick = emptyFunction
|
|
13762
|
+
node.onclick = emptyFunction;
|
|
13773
13763
|
}
|
|
13774
13764
|
|
|
13775
13765
|
function setInitialDOMProperties(tag, domElement, rootContainerElement, nextProps, isCustomComponentTag) {
|
|
@@ -13801,10 +13791,10 @@ function setInitialDOMProperties(tag, domElement, rootContainerElement, nextProp
|
|
|
13801
13791
|
// https://github.com/facebook/react/issues/6731#issuecomment-254874553
|
|
13802
13792
|
var canSetTextContent = tag !== 'textarea' || nextProp !== '';
|
|
13803
13793
|
if (canSetTextContent) {
|
|
13804
|
-
setTextContent
|
|
13794
|
+
setTextContent(domElement, nextProp);
|
|
13805
13795
|
}
|
|
13806
13796
|
} else if (typeof nextProp === 'number') {
|
|
13807
|
-
setTextContent
|
|
13797
|
+
setTextContent(domElement, '' + nextProp);
|
|
13808
13798
|
}
|
|
13809
13799
|
} else if (propKey === SUPPRESS_CONTENT_EDITABLE_WARNING || propKey === SUPPRESS_HYDRATION_WARNING$1) {
|
|
13810
13800
|
// Noop
|
|
@@ -13839,7 +13829,7 @@ function updateDOMProperties(domElement, updatePayload, wasCustomComponentTag, i
|
|
|
13839
13829
|
} else if (propKey === DANGEROUSLY_SET_INNER_HTML) {
|
|
13840
13830
|
setInnerHTML(domElement, propValue);
|
|
13841
13831
|
} else if (propKey === CHILDREN) {
|
|
13842
|
-
setTextContent
|
|
13832
|
+
setTextContent(domElement, propValue);
|
|
13843
13833
|
} else if (isCustomComponentTag) {
|
|
13844
13834
|
if (propValue != null) {
|
|
13845
13835
|
setValueForAttribute(domElement, propKey, propValue);
|
|
@@ -14188,6 +14178,13 @@ function diffProperties$1(domElement, tag, lastRawProps, nextRawProps, rootConta
|
|
|
14188
14178
|
|
|
14189
14179
|
// Apply the diff.
|
|
14190
14180
|
function updateProperties$1(domElement, updatePayload, tag, lastRawProps, nextRawProps) {
|
|
14181
|
+
// Update checked *before* name.
|
|
14182
|
+
// In the middle of an update, it is possible to have multiple checked.
|
|
14183
|
+
// When a checked radio tries to change name, browser makes another radio's checked false.
|
|
14184
|
+
if (tag === 'input' && nextRawProps.type === 'radio' && nextRawProps.name != null) {
|
|
14185
|
+
updateChecked(domElement, nextRawProps);
|
|
14186
|
+
}
|
|
14187
|
+
|
|
14191
14188
|
var wasCustomComponentTag = isCustomComponent(tag, lastRawProps);
|
|
14192
14189
|
var isCustomComponentTag = isCustomComponent(tag, nextRawProps);
|
|
14193
14190
|
// Apply the diff.
|
|
@@ -14201,10 +14198,6 @@ function updateProperties$1(domElement, updatePayload, tag, lastRawProps, nextRa
|
|
|
14201
14198
|
// happen after `updateDOMProperties`. Otherwise HTML5 input validations
|
|
14202
14199
|
// raise warnings and prevent the new value from being assigned.
|
|
14203
14200
|
updateWrapper(domElement, nextRawProps);
|
|
14204
|
-
|
|
14205
|
-
// We also check that we haven't missed a value update, such as a
|
|
14206
|
-
// Radio group shifting the checked value to another named radio input.
|
|
14207
|
-
updateValueIfChanged(domElement);
|
|
14208
14201
|
break;
|
|
14209
14202
|
case 'textarea':
|
|
14210
14203
|
updateWrapper$1(domElement, nextRawProps);
|
|
@@ -14541,7 +14534,7 @@ var ReactDOMFiberComponent = Object.freeze({
|
|
|
14541
14534
|
// TODO: direct imports like some-package/src/* are bad. Fix me.
|
|
14542
14535
|
var getCurrentFiberStackAddendum$6 = ReactDebugCurrentFiber.getCurrentFiberStackAddendum;
|
|
14543
14536
|
|
|
14544
|
-
var validateDOMNesting = emptyFunction
|
|
14537
|
+
var validateDOMNesting = emptyFunction;
|
|
14545
14538
|
|
|
14546
14539
|
{
|
|
14547
14540
|
// This validation code was written based on the HTML5 parsing spec:
|
|
@@ -15174,6 +15167,7 @@ var DOMRenderer = reactReconciler({
|
|
|
15174
15167
|
},
|
|
15175
15168
|
|
|
15176
15169
|
scheduleDeferredCallback: rIC,
|
|
15170
|
+
cancelDeferredCallback: cIC,
|
|
15177
15171
|
|
|
15178
15172
|
useSyncScheduling: !enableAsyncSchedulingByDefaultInReactDOM
|
|
15179
15173
|
});
|