|
|
|
@ -1,10 +1,8 @@
|
|
|
|
|
/**
|
|
|
|
|
* Copyright 2013-present, Facebook, Inc.
|
|
|
|
|
* All rights reserved.
|
|
|
|
|
* Copyright (c) 2013-present, Facebook, Inc.
|
|
|
|
|
*
|
|
|
|
|
* This source code is licensed under the BSD-style license found in the
|
|
|
|
|
* LICENSE file in the root directory of this source tree. An additional grant
|
|
|
|
|
* of patent rights can be found in the PATENTS file in the same directory.
|
|
|
|
|
* This source code is licensed under the MIT license found in the
|
|
|
|
|
* LICENSE file in the root directory of this source tree.
|
|
|
|
|
*
|
|
|
|
|
* @noflow
|
|
|
|
|
* @providesModule ReactNativeFiber-dev
|
|
|
|
@ -14,7 +12,7 @@
|
|
|
|
|
__DEV__ && function() {
|
|
|
|
|
var invariant = require("fbjs/lib/invariant"), require$$0 = require("fbjs/lib/warning"), ExceptionsManager = require("ExceptionsManager"), emptyObject = require("fbjs/lib/emptyObject"), react = require("react"), checkPropTypes = require("prop-types/checkPropTypes"), shallowEqual = require("fbjs/lib/shallowEqual"), deepDiffer = require("deepDiffer"), flattenStyle = require("flattenStyle"), TextInputState = require("TextInputState"), UIManager = require("UIManager"), deepFreezeAndThrowOnMutationInDev = require("deepFreezeAndThrowOnMutationInDev");
|
|
|
|
|
require("InitializeCore");
|
|
|
|
|
var RCTEventEmitter = require("RCTEventEmitter"), emptyFunction = require("fbjs/lib/emptyFunction"), ExecutionEnvironment = require("fbjs/lib/ExecutionEnvironment"), performanceNow = require("fbjs/lib/performanceNow"), defaultShowDialog = function(capturedError) {
|
|
|
|
|
var RCTEventEmitter = require("RCTEventEmitter"), emptyFunction = require("fbjs/lib/emptyFunction"), defaultShowDialog = function(capturedError) {
|
|
|
|
|
return !0;
|
|
|
|
|
}, showDialog = defaultShowDialog;
|
|
|
|
|
function logCapturedError(capturedError) {
|
|
|
|
@ -181,13 +179,9 @@ __DEV__ && function() {
|
|
|
|
|
function restoreStateOfTarget(target) {
|
|
|
|
|
var internalInstance = EventPluginUtils_1.getInstanceFromNode(target);
|
|
|
|
|
if (internalInstance) {
|
|
|
|
|
if ("number" == typeof internalInstance.tag) {
|
|
|
|
|
invariant(fiberHostComponent && "function" == typeof fiberHostComponent.restoreControlledState, "Fiber needs to be injected to handle a fiber target for controlled " + "events. This error is likely caused by a bug in React. Please file an issue.");
|
|
|
|
|
var props = EventPluginUtils_1.getFiberCurrentPropsFromNode(internalInstance.stateNode);
|
|
|
|
|
return void fiberHostComponent.restoreControlledState(internalInstance.stateNode, internalInstance.type, props);
|
|
|
|
|
}
|
|
|
|
|
invariant("function" == typeof internalInstance.restoreControlledState, "The internal instance must be a React host component. " + "This error is likely caused by a bug in React. Please file an issue."),
|
|
|
|
|
internalInstance.restoreControlledState();
|
|
|
|
|
fiberHostComponent.restoreControlledState(internalInstance.stateNode, internalInstance.type, props);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
var ReactControlledComponent = {
|
|
|
|
@ -201,16 +195,11 @@ __DEV__ && function() {
|
|
|
|
|
if (restoreTarget = null, restoreQueue = null, restoreStateOfTarget(target), queuedTargets) for (var i = 0; i < queuedTargets.length; i++) restoreStateOfTarget(queuedTargets[i]);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}, ReactControlledComponent_1 = ReactControlledComponent, stackBatchedUpdates = function(fn, a, b, c, d, e) {
|
|
|
|
|
return fn(a, b, c, d, e);
|
|
|
|
|
}, fiberBatchedUpdates = function(fn, bookkeeping) {
|
|
|
|
|
}, ReactControlledComponent_1 = ReactControlledComponent, fiberBatchedUpdates = function(fn, bookkeeping) {
|
|
|
|
|
return fn(bookkeeping);
|
|
|
|
|
};
|
|
|
|
|
function performFiberBatchedUpdates(fn, bookkeeping) {
|
|
|
|
|
return fiberBatchedUpdates(fn, bookkeeping);
|
|
|
|
|
}
|
|
|
|
|
function batchedUpdates(fn, bookkeeping) {
|
|
|
|
|
return stackBatchedUpdates(performFiberBatchedUpdates, fn, bookkeeping);
|
|
|
|
|
return fiberBatchedUpdates(fn, bookkeeping);
|
|
|
|
|
}
|
|
|
|
|
var isNestingBatched = !1;
|
|
|
|
|
function batchedUpdatesWithControlledComponents(fn, bookkeeping) {
|
|
|
|
@ -223,9 +212,6 @@ __DEV__ && function() {
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
var ReactGenericBatchingInjection = {
|
|
|
|
|
injectStackBatchedUpdates: function(_batchedUpdates) {
|
|
|
|
|
stackBatchedUpdates = _batchedUpdates;
|
|
|
|
|
},
|
|
|
|
|
injectFiberBatchedUpdates: function(_batchedUpdates) {
|
|
|
|
|
fiberBatchedUpdates = _batchedUpdates;
|
|
|
|
|
}
|
|
|
|
@ -262,21 +248,9 @@ __DEV__ && function() {
|
|
|
|
|
isPortal: isPortal,
|
|
|
|
|
REACT_PORTAL_TYPE: REACT_PORTAL_TYPE_1
|
|
|
|
|
}, instanceCache = {}, instanceProps = {};
|
|
|
|
|
function getRenderedHostOrTextFromComponent(component) {
|
|
|
|
|
for (var rendered; rendered = component._renderedComponent; ) component = rendered;
|
|
|
|
|
return component;
|
|
|
|
|
}
|
|
|
|
|
function precacheNode(inst, tag) {
|
|
|
|
|
var nativeInst = getRenderedHostOrTextFromComponent(inst);
|
|
|
|
|
instanceCache[tag] = nativeInst;
|
|
|
|
|
}
|
|
|
|
|
function precacheFiberNode(hostInst, tag) {
|
|
|
|
|
instanceCache[tag] = hostInst;
|
|
|
|
|
}
|
|
|
|
|
function uncacheNode(inst) {
|
|
|
|
|
var tag = inst._rootNodeID;
|
|
|
|
|
tag && delete instanceCache[tag];
|
|
|
|
|
}
|
|
|
|
|
function uncacheFiberNode(tag) {
|
|
|
|
|
delete instanceCache[tag], delete instanceProps[tag];
|
|
|
|
|
}
|
|
|
|
@ -298,9 +272,7 @@ __DEV__ && function() {
|
|
|
|
|
getInstanceFromNode: getInstanceFromTag,
|
|
|
|
|
getNodeFromInstance: getTagFromInstance,
|
|
|
|
|
precacheFiberNode: precacheFiberNode,
|
|
|
|
|
precacheNode: precacheNode,
|
|
|
|
|
uncacheFiberNode: uncacheFiberNode,
|
|
|
|
|
uncacheNode: uncacheNode,
|
|
|
|
|
getFiberCurrentPropsFromNode: getFiberCurrentPropsFromNode,
|
|
|
|
|
updateFiberProps: updateFiberProps
|
|
|
|
|
}, ReactNativeComponentTree_1 = ReactNativeComponentTree, commonjsGlobal = "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof self ? self : {}, ReactFeatureFlags = {
|
|
|
|
@ -500,16 +472,9 @@ __DEV__ && function() {
|
|
|
|
|
beginUpdateQueue: beginUpdateQueue_1,
|
|
|
|
|
commitCallbacks: commitCallbacks_1
|
|
|
|
|
};
|
|
|
|
|
function getComponentName$1(instanceOrFiber) {
|
|
|
|
|
if ("function" == typeof instanceOrFiber.getName) {
|
|
|
|
|
return instanceOrFiber.getName();
|
|
|
|
|
}
|
|
|
|
|
if ("number" == typeof instanceOrFiber.tag) {
|
|
|
|
|
var fiber = instanceOrFiber, type = fiber.type;
|
|
|
|
|
if ("string" == typeof type) return type;
|
|
|
|
|
if ("function" == typeof type) return type.displayName || type.name;
|
|
|
|
|
}
|
|
|
|
|
return null;
|
|
|
|
|
function getComponentName$1(fiber) {
|
|
|
|
|
var type = fiber.type;
|
|
|
|
|
return "string" == typeof type ? type : "function" == typeof type ? type.displayName || type.name : null;
|
|
|
|
|
}
|
|
|
|
|
var getComponentName_1 = getComponentName$1, ReactInstanceMap = {
|
|
|
|
|
remove: function(key) {
|
|
|
|
@ -528,7 +493,6 @@ __DEV__ && function() {
|
|
|
|
|
ReactCurrentOwner: ReactInternals.ReactCurrentOwner
|
|
|
|
|
};
|
|
|
|
|
Object.assign(ReactGlobalSharedState, {
|
|
|
|
|
ReactComponentTreeHook: ReactInternals.ReactComponentTreeHook,
|
|
|
|
|
ReactDebugCurrentFrame: ReactInternals.ReactDebugCurrentFrame
|
|
|
|
|
});
|
|
|
|
|
var ReactGlobalSharedState_1 = ReactGlobalSharedState, ReactCurrentOwner = ReactGlobalSharedState_1.ReactCurrentOwner, warning$4 = require$$0, ClassComponent$2 = ReactTypeOfWork.ClassComponent, HostComponent$1 = ReactTypeOfWork.HostComponent, HostRoot$2 = ReactTypeOfWork.HostRoot, HostPortal = ReactTypeOfWork.HostPortal, HostText = ReactTypeOfWork.HostText, NoEffect = ReactTypeOfSideEffect.NoEffect, Placement = ReactTypeOfSideEffect.Placement, MOUNTING = 1, MOUNTED = 2, UNMOUNTED = 3;
|
|
|
|
@ -689,7 +653,9 @@ __DEV__ && function() {
|
|
|
|
|
}, ReactDebugCurrentFrame = ReactGlobalSharedState_1.ReactDebugCurrentFrame, getComponentName$3 = getComponentName_1, _require2$1 = ReactFiberComponentTreeHook, getStackAddendumByWorkInProgressFiber = _require2$1.getStackAddendumByWorkInProgressFiber;
|
|
|
|
|
function getCurrentFiberOwnerName() {
|
|
|
|
|
var fiber = ReactDebugCurrentFiber$2.current;
|
|
|
|
|
return null === fiber ? null : null != fiber._debugOwner ? getComponentName$3(fiber._debugOwner) : null;
|
|
|
|
|
if (null === fiber) return null;
|
|
|
|
|
var owner = fiber._debugOwner;
|
|
|
|
|
return null !== owner && void 0 !== owner ? getComponentName$3(owner) : null;
|
|
|
|
|
}
|
|
|
|
|
function getCurrentFiberStackAddendum() {
|
|
|
|
|
var fiber = ReactDebugCurrentFiber$2.current;
|
|
|
|
@ -699,8 +665,11 @@ __DEV__ && function() {
|
|
|
|
|
ReactDebugCurrentFrame.getCurrentStack = null, ReactDebugCurrentFiber$2.current = null,
|
|
|
|
|
ReactDebugCurrentFiber$2.phase = null;
|
|
|
|
|
}
|
|
|
|
|
function setCurrentFiber(fiber, phase) {
|
|
|
|
|
function setCurrentFiber(fiber) {
|
|
|
|
|
ReactDebugCurrentFrame.getCurrentStack = getCurrentFiberStackAddendum, ReactDebugCurrentFiber$2.current = fiber,
|
|
|
|
|
ReactDebugCurrentFiber$2.phase = null;
|
|
|
|
|
}
|
|
|
|
|
function setCurrentPhase(phase) {
|
|
|
|
|
ReactDebugCurrentFiber$2.phase = phase;
|
|
|
|
|
}
|
|
|
|
|
var ReactDebugCurrentFiber$2 = {
|
|
|
|
@ -708,6 +677,7 @@ __DEV__ && function() {
|
|
|
|
|
phase: null,
|
|
|
|
|
resetCurrentFiber: resetCurrentFiber,
|
|
|
|
|
setCurrentFiber: setCurrentFiber,
|
|
|
|
|
setCurrentPhase: setCurrentPhase,
|
|
|
|
|
getCurrentFiberOwnerName: getCurrentFiberOwnerName,
|
|
|
|
|
getCurrentFiberStackAddendum: getCurrentFiberStackAddendum
|
|
|
|
|
}, ReactDebugCurrentFiber_1 = ReactDebugCurrentFiber$2, ReactDebugFiberPerf = null, _require$2 = ReactTypeOfWork, HostRoot$3 = _require$2.HostRoot, HostComponent$3 = _require$2.HostComponent, HostText$1 = _require$2.HostText, HostPortal$1 = _require$2.HostPortal, YieldComponent = _require$2.YieldComponent, Fragment = _require$2.Fragment, getComponentName$4 = getComponentName_1, reactEmoji = "⚛", warningEmoji = "⛔", supportsUserTiming = "undefined" != typeof performance && "function" == typeof performance.mark && "function" == typeof performance.clearMarks && "function" == typeof performance.measure && "function" == typeof performance.clearMeasures, currentFiber = null, currentPhase = null, currentPhaseFiber = null, isCommitting = !1, hasScheduledUpdateInCurrentCommit = !1, hasScheduledUpdateInCurrentPhase = !1, commitCountInCurrentWorkLoop = 0, effectCountInCurrentCommit = 0, labelsInCurrentCommit = new Set(), formatMarkName = function(markName) {
|
|
|
|
@ -859,9 +829,8 @@ __DEV__ && function() {
|
|
|
|
|
var context = {};
|
|
|
|
|
for (var key in contextTypes) context[key] = unmaskedContext[key];
|
|
|
|
|
var name = getComponentName_1(workInProgress) || "Unknown";
|
|
|
|
|
return ReactDebugCurrentFiber$1.setCurrentFiber(workInProgress, null), checkPropTypes$1(contextTypes, context, "context", name, ReactDebugCurrentFiber$1.getCurrentFiberStackAddendum),
|
|
|
|
|
ReactDebugCurrentFiber$1.resetCurrentFiber(), instance && cacheContext(workInProgress, unmaskedContext, context),
|
|
|
|
|
context;
|
|
|
|
|
return checkPropTypes$1(contextTypes, context, "context", name, ReactDebugCurrentFiber$1.getCurrentFiberStackAddendum),
|
|
|
|
|
instance && cacheContext(workInProgress, unmaskedContext, context), context;
|
|
|
|
|
}, hasContextChanged = function() {
|
|
|
|
|
return didPerformWorkStackCursor.current;
|
|
|
|
|
};
|
|
|
|
@ -882,7 +851,7 @@ __DEV__ && function() {
|
|
|
|
|
invariant(null == contextStackCursor.cursor, "Unexpected context found on stack. " + "This error is likely caused by a bug in React. Please file an issue."),
|
|
|
|
|
push(contextStackCursor, context, fiber), push(didPerformWorkStackCursor, didChange, fiber);
|
|
|
|
|
};
|
|
|
|
|
function processChildContext$1(fiber, parentContext, isReconciling) {
|
|
|
|
|
function processChildContext$1(fiber, parentContext) {
|
|
|
|
|
var instance = fiber.stateNode, childContextTypes = fiber.type.childContextTypes;
|
|
|
|
|
if ("function" != typeof instance.getChildContext) {
|
|
|
|
|
var componentName = getComponentName_1(fiber) || "Unknown";
|
|
|
|
@ -891,12 +860,12 @@ __DEV__ && function() {
|
|
|
|
|
parentContext;
|
|
|
|
|
}
|
|
|
|
|
var childContext = void 0;
|
|
|
|
|
ReactDebugCurrentFiber$1.setCurrentFiber(fiber, "getChildContext"), startPhaseTimer(fiber, "getChildContext"),
|
|
|
|
|
childContext = instance.getChildContext(), stopPhaseTimer(), ReactDebugCurrentFiber$1.resetCurrentFiber();
|
|
|
|
|
ReactDebugCurrentFiber$1.setCurrentPhase("getChildContext"), startPhaseTimer(fiber, "getChildContext"),
|
|
|
|
|
childContext = instance.getChildContext(), stopPhaseTimer(), ReactDebugCurrentFiber$1.setCurrentPhase(null);
|
|
|
|
|
for (var contextKey in childContext) invariant(contextKey in childContextTypes, '%s.getChildContext(): key "%s" is not defined in childContextTypes.', getComponentName_1(fiber) || "Unknown", contextKey);
|
|
|
|
|
var name = getComponentName_1(fiber) || "Unknown", workInProgress = isReconciling ? fiber : null;
|
|
|
|
|
return ReactDebugCurrentFiber$1.setCurrentFiber(workInProgress, null), checkPropTypes$1(childContextTypes, childContext, "child context", name, ReactDebugCurrentFiber$1.getCurrentFiberStackAddendum),
|
|
|
|
|
ReactDebugCurrentFiber$1.resetCurrentFiber(), Object.assign({}, parentContext, childContext);
|
|
|
|
|
var name = getComponentName_1(fiber) || "Unknown";
|
|
|
|
|
return checkPropTypes$1(childContextTypes, childContext, "child context", name, ReactDebugCurrentFiber$1.getCurrentFiberStackAddendum),
|
|
|
|
|
Object.assign({}, parentContext, childContext);
|
|
|
|
|
}
|
|
|
|
|
var processChildContext_1 = processChildContext$1, pushContextProvider = function(workInProgress) {
|
|
|
|
|
if (!isContextProvider$1(workInProgress)) return !1;
|
|
|
|
@ -908,7 +877,7 @@ __DEV__ && function() {
|
|
|
|
|
var instance = workInProgress.stateNode;
|
|
|
|
|
if (invariant(instance, "Expected to have an instance by this point. " + "This error is likely caused by a bug in React. Please file an issue."),
|
|
|
|
|
didChange) {
|
|
|
|
|
var mergedContext = processChildContext$1(workInProgress, previousContext, !0);
|
|
|
|
|
var mergedContext = processChildContext$1(workInProgress, previousContext);
|
|
|
|
|
instance.__reactInternalMemoizedMergedChildContext = mergedContext, pop(didPerformWorkStackCursor, workInProgress),
|
|
|
|
|
pop(contextStackCursor, workInProgress), push(contextStackCursor, mergedContext, workInProgress),
|
|
|
|
|
push(didPerformWorkStackCursor, didChange, workInProgress);
|
|
|
|
@ -1098,11 +1067,11 @@ __DEV__ && function() {
|
|
|
|
|
if (null !== mixedRef && "function" != typeof mixedRef) {
|
|
|
|
|
if (element._owner) {
|
|
|
|
|
var owner = element._owner, inst = void 0;
|
|
|
|
|
if (owner) if ("number" == typeof owner.tag) {
|
|
|
|
|
if (owner) {
|
|
|
|
|
var ownerFiber = owner;
|
|
|
|
|
invariant(ownerFiber.tag === ClassComponent$7, "Stateless function components cannot have refs."),
|
|
|
|
|
inst = ownerFiber.stateNode;
|
|
|
|
|
} else inst = owner.getPublicInstance();
|
|
|
|
|
}
|
|
|
|
|
invariant(inst, "Missing owner for string ref %s. This error is likely caused by a " + "bug in React. Please file an issue.", mixedRef);
|
|
|
|
|
var stringRef = "" + mixedRef;
|
|
|
|
|
if (null !== current && null !== current.ref && current.ref._stringRef === stringRef) return current.ref;
|
|
|
|
@ -1678,8 +1647,8 @@ __DEV__ && function() {
|
|
|
|
|
var fn = workInProgress.type, nextProps = workInProgress.pendingProps, memoizedProps = workInProgress.memoizedProps;
|
|
|
|
|
if (hasContextChanged$1()) null === nextProps && (nextProps = memoizedProps); else if (null === nextProps || memoizedProps === nextProps) return bailoutOnAlreadyFinishedWork(current, workInProgress);
|
|
|
|
|
var nextChildren, unmaskedContext = getUnmaskedContext$1(workInProgress), context = getMaskedContext$1(workInProgress, unmaskedContext);
|
|
|
|
|
return ReactCurrentOwner$2.current = workInProgress, ReactDebugCurrentFiber$4.setCurrentFiber(workInProgress, "render"),
|
|
|
|
|
nextChildren = fn(nextProps, context), ReactDebugCurrentFiber$4.setCurrentFiber(workInProgress, null),
|
|
|
|
|
return ReactCurrentOwner$2.current = workInProgress, ReactDebugCurrentFiber$4.setCurrentPhase("render"),
|
|
|
|
|
nextChildren = fn(nextProps, context), ReactDebugCurrentFiber$4.setCurrentPhase(null),
|
|
|
|
|
workInProgress.effectTag |= PerformedWork$1, reconcileChildren(current, workInProgress, nextChildren),
|
|
|
|
|
memoizeProps(workInProgress, nextProps), workInProgress.child;
|
|
|
|
|
}
|
|
|
|
@ -1695,8 +1664,8 @@ __DEV__ && function() {
|
|
|
|
|
var instance = workInProgress.stateNode;
|
|
|
|
|
ReactCurrentOwner$2.current = workInProgress;
|
|
|
|
|
var nextChildren = void 0;
|
|
|
|
|
return ReactDebugCurrentFiber$4.setCurrentFiber(workInProgress, "render"), nextChildren = instance.render(),
|
|
|
|
|
ReactDebugCurrentFiber$4.setCurrentFiber(workInProgress, null), workInProgress.effectTag |= PerformedWork$1,
|
|
|
|
|
return ReactDebugCurrentFiber$4.setCurrentPhase("render"), nextChildren = instance.render(),
|
|
|
|
|
ReactDebugCurrentFiber$4.setCurrentPhase(null), workInProgress.effectTag |= PerformedWork$1,
|
|
|
|
|
reconcileChildren(current, workInProgress, nextChildren), memoizeState(workInProgress, instance.state),
|
|
|
|
|
memoizeProps(workInProgress, instance.props), hasContext && invalidateContextProvider$1(workInProgress, !0),
|
|
|
|
|
workInProgress.child;
|
|
|
|
@ -1806,7 +1775,7 @@ __DEV__ && function() {
|
|
|
|
|
}
|
|
|
|
|
function beginWork(current, workInProgress, priorityLevel) {
|
|
|
|
|
if (workInProgress.pendingWorkPriority === NoWork$3 || workInProgress.pendingWorkPriority > priorityLevel) return bailoutOnLowPriority(current, workInProgress);
|
|
|
|
|
switch (ReactDebugCurrentFiber$4.setCurrentFiber(workInProgress, null), workInProgress.tag) {
|
|
|
|
|
switch (workInProgress.tag) {
|
|
|
|
|
case IndeterminateComponent$2:
|
|
|
|
|
return mountIndeterminateComponent(current, workInProgress, priorityLevel);
|
|
|
|
|
|
|
|
|
@ -1870,7 +1839,7 @@ __DEV__ && function() {
|
|
|
|
|
beginWork: beginWork,
|
|
|
|
|
beginFailedWork: beginFailedWork
|
|
|
|
|
};
|
|
|
|
|
}, reconcileChildFibers$2 = ReactChildFiber.reconcileChildFibers, popContextProvider$2 = ReactFiberContext.popContextProvider, popTopLevelContextObject$1 = ReactFiberContext.popTopLevelContextObject, IndeterminateComponent$3 = ReactTypeOfWork.IndeterminateComponent, FunctionalComponent$3 = ReactTypeOfWork.FunctionalComponent, ClassComponent$8 = ReactTypeOfWork.ClassComponent, HostRoot$7 = ReactTypeOfWork.HostRoot, HostComponent$7 = ReactTypeOfWork.HostComponent, HostText$5 = ReactTypeOfWork.HostText, HostPortal$6 = ReactTypeOfWork.HostPortal, CoroutineComponent$3 = ReactTypeOfWork.CoroutineComponent, CoroutineHandlerPhase$1 = ReactTypeOfWork.CoroutineHandlerPhase, YieldComponent$4 = ReactTypeOfWork.YieldComponent, Fragment$4 = ReactTypeOfWork.Fragment, Placement$4 = ReactTypeOfSideEffect.Placement, Ref$2 = ReactTypeOfSideEffect.Ref, Update$2 = ReactTypeOfSideEffect.Update, OffscreenPriority$2 = ReactPriorityLevel.OffscreenPriority, ReactDebugCurrentFiber$5 = ReactDebugCurrentFiber_1, ReactFiberCompleteWork = function(config, hostContext, hydrationContext) {
|
|
|
|
|
}, reconcileChildFibers$2 = ReactChildFiber.reconcileChildFibers, popContextProvider$2 = ReactFiberContext.popContextProvider, popTopLevelContextObject$1 = ReactFiberContext.popTopLevelContextObject, IndeterminateComponent$3 = ReactTypeOfWork.IndeterminateComponent, FunctionalComponent$3 = ReactTypeOfWork.FunctionalComponent, ClassComponent$8 = ReactTypeOfWork.ClassComponent, HostRoot$7 = ReactTypeOfWork.HostRoot, HostComponent$7 = ReactTypeOfWork.HostComponent, HostText$5 = ReactTypeOfWork.HostText, HostPortal$6 = ReactTypeOfWork.HostPortal, CoroutineComponent$3 = ReactTypeOfWork.CoroutineComponent, CoroutineHandlerPhase$1 = ReactTypeOfWork.CoroutineHandlerPhase, YieldComponent$4 = ReactTypeOfWork.YieldComponent, Fragment$4 = ReactTypeOfWork.Fragment, Placement$4 = ReactTypeOfSideEffect.Placement, Ref$2 = ReactTypeOfSideEffect.Ref, Update$2 = ReactTypeOfSideEffect.Update, OffscreenPriority$2 = ReactPriorityLevel.OffscreenPriority, ReactFiberCompleteWork = function(config, hostContext, hydrationContext) {
|
|
|
|
|
var createInstance = config.createInstance, createTextInstance = config.createTextInstance, appendInitialChild = config.appendInitialChild, finalizeInitialChildren = config.finalizeInitialChildren, prepareUpdate = config.prepareUpdate, getRootHostContainer = hostContext.getRootHostContainer, popHostContext = hostContext.popHostContext, getHostContext = hostContext.getHostContext, popHostContainer = hostContext.popHostContainer, prepareToHydrateHostInstance = hydrationContext.prepareToHydrateHostInstance, prepareToHydrateHostTextInstance = hydrationContext.prepareToHydrateHostTextInstance, popHydrationState = hydrationContext.popHydrationState;
|
|
|
|
|
function markUpdate(workInProgress) {
|
|
|
|
|
workInProgress.effectTag |= Update$2;
|
|
|
|
@ -1917,7 +1886,6 @@ __DEV__ && function() {
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
function completeWork(current, workInProgress, renderPriority) {
|
|
|
|
|
ReactDebugCurrentFiber$5.setCurrentFiber(workInProgress, null);
|
|
|
|
|
var newProps = workInProgress.pendingProps;
|
|
|
|
|
switch (null === newProps ? newProps = workInProgress.memoizedProps : workInProgress.pendingWorkPriority === OffscreenPriority$2 && renderPriority !== OffscreenPriority$2 || (workInProgress.pendingProps = null),
|
|
|
|
|
workInProgress.tag) {
|
|
|
|
@ -2453,7 +2421,7 @@ __DEV__ && function() {
|
|
|
|
|
}
|
|
|
|
|
function commitAllHostEffects() {
|
|
|
|
|
for (;null !== nextEffect; ) {
|
|
|
|
|
ReactDebugCurrentFiber$3.setCurrentFiber(nextEffect, null), recordEffect();
|
|
|
|
|
ReactDebugCurrentFiber$3.setCurrentFiber(nextEffect), recordEffect();
|
|
|
|
|
var effectTag = nextEffect.effectTag;
|
|
|
|
|
if (effectTag & ContentReset && config.resetTextContent(nextEffect.stateNode), effectTag & Ref) {
|
|
|
|
|
var current = nextEffect.alternate;
|
|
|
|
@ -2532,7 +2500,11 @@ __DEV__ && function() {
|
|
|
|
|
}
|
|
|
|
|
function completeUnitOfWork(workInProgress) {
|
|
|
|
|
for (;!0; ) {
|
|
|
|
|
var current = workInProgress.alternate, next = completeWork(current, workInProgress, nextPriorityLevel), returnFiber = workInProgress.return, siblingFiber = workInProgress.sibling;
|
|
|
|
|
var current = workInProgress.alternate;
|
|
|
|
|
ReactDebugCurrentFiber$3.setCurrentFiber(workInProgress);
|
|
|
|
|
var next = completeWork(current, workInProgress, nextPriorityLevel);
|
|
|
|
|
ReactDebugCurrentFiber$3.resetCurrentFiber();
|
|
|
|
|
var returnFiber = workInProgress.return, siblingFiber = workInProgress.sibling;
|
|
|
|
|
if (resetWorkPriority(workInProgress, nextPriorityLevel), null !== next) return stopWorkTimer(workInProgress),
|
|
|
|
|
!0 && ReactFiberInstrumentation$1.debugTool && ReactFiberInstrumentation$1.debugTool.onCompleteWork(workInProgress),
|
|
|
|
|
next;
|
|
|
|
@ -2552,19 +2524,19 @@ __DEV__ && function() {
|
|
|
|
|
}
|
|
|
|
|
function performUnitOfWork(workInProgress) {
|
|
|
|
|
var current = workInProgress.alternate;
|
|
|
|
|
startWorkTimer(workInProgress);
|
|
|
|
|
startWorkTimer(workInProgress), ReactDebugCurrentFiber$3.setCurrentFiber(workInProgress);
|
|
|
|
|
var next = beginWork(current, workInProgress, nextPriorityLevel);
|
|
|
|
|
return !0 && ReactFiberInstrumentation$1.debugTool && ReactFiberInstrumentation$1.debugTool.onBeginWork(workInProgress),
|
|
|
|
|
return ReactDebugCurrentFiber$3.resetCurrentFiber(), !0 && ReactFiberInstrumentation$1.debugTool && ReactFiberInstrumentation$1.debugTool.onBeginWork(workInProgress),
|
|
|
|
|
null === next && (next = completeUnitOfWork(workInProgress)), ReactCurrentOwner$1.current = null,
|
|
|
|
|
ReactDebugCurrentFiber$3.resetCurrentFiber(), next;
|
|
|
|
|
next;
|
|
|
|
|
}
|
|
|
|
|
function performFailedUnitOfWork(workInProgress) {
|
|
|
|
|
var current = workInProgress.alternate;
|
|
|
|
|
startWorkTimer(workInProgress);
|
|
|
|
|
startWorkTimer(workInProgress), ReactDebugCurrentFiber$3.setCurrentFiber(workInProgress);
|
|
|
|
|
var next = beginFailedWork(current, workInProgress, nextPriorityLevel);
|
|
|
|
|
return !0 && ReactFiberInstrumentation$1.debugTool && ReactFiberInstrumentation$1.debugTool.onBeginWork(workInProgress),
|
|
|
|
|
return ReactDebugCurrentFiber$3.resetCurrentFiber(), !0 && ReactFiberInstrumentation$1.debugTool && ReactFiberInstrumentation$1.debugTool.onBeginWork(workInProgress),
|
|
|
|
|
null === next && (next = completeUnitOfWork(workInProgress)), ReactCurrentOwner$1.current = null,
|
|
|
|
|
ReactDebugCurrentFiber$3.resetCurrentFiber(), next;
|
|
|
|
|
next;
|
|
|
|
|
}
|
|
|
|
|
function performDeferredWork(deadline) {
|
|
|
|
|
performWork(OffscreenPriority, deadline);
|
|
|
|
@ -2821,22 +2793,12 @@ __DEV__ && function() {
|
|
|
|
|
flushSync: flushSync,
|
|
|
|
|
deferredUpdates: deferredUpdates
|
|
|
|
|
};
|
|
|
|
|
}, getContextFiber = function(arg) {
|
|
|
|
|
invariant(!1, "Missing injection for fiber getContextForSubtree");
|
|
|
|
|
};
|
|
|
|
|
}, addTopLevelUpdate = ReactFiberUpdateQueue.addTopLevelUpdate, findCurrentUnmaskedContext = ReactFiberContext.findCurrentUnmaskedContext, isContextProvider = ReactFiberContext.isContextProvider, processChildContext = ReactFiberContext.processChildContext, createFiberRoot = ReactFiberRoot.createFiberRoot, HostComponent = ReactTypeOfWork.HostComponent, warning$1 = require$$0, ReactFiberInstrumentation = ReactFiberInstrumentation_1, ReactDebugCurrentFiber = ReactDebugCurrentFiber_1, getComponentName = getComponentName_1, findCurrentHostFiber = ReactFiberTreeReflection.findCurrentHostFiber, findCurrentHostFiberWithNoPortals = ReactFiberTreeReflection.findCurrentHostFiberWithNoPortals;
|
|
|
|
|
function getContextForSubtree(parentComponent) {
|
|
|
|
|
if (!parentComponent) return emptyObject;
|
|
|
|
|
var instance = ReactInstanceMap_1.get(parentComponent);
|
|
|
|
|
return "number" == typeof instance.tag ? getContextFiber(instance) : instance._processChildContext(instance._context);
|
|
|
|
|
var fiber = ReactInstanceMap_1.get(parentComponent), parentContext = findCurrentUnmaskedContext(fiber);
|
|
|
|
|
return isContextProvider(fiber) ? processChildContext(fiber, parentContext) : parentContext;
|
|
|
|
|
}
|
|
|
|
|
getContextForSubtree._injectFiber = function(fn) {
|
|
|
|
|
getContextFiber = fn;
|
|
|
|
|
};
|
|
|
|
|
var getContextForSubtree_1 = getContextForSubtree, addTopLevelUpdate = ReactFiberUpdateQueue.addTopLevelUpdate, findCurrentUnmaskedContext = ReactFiberContext.findCurrentUnmaskedContext, isContextProvider = ReactFiberContext.isContextProvider, processChildContext = ReactFiberContext.processChildContext, createFiberRoot = ReactFiberRoot.createFiberRoot, HostComponent = ReactTypeOfWork.HostComponent, warning$1 = require$$0, ReactFiberInstrumentation = ReactFiberInstrumentation_1, ReactDebugCurrentFiber = ReactDebugCurrentFiber_1, getComponentName = getComponentName_1, findCurrentHostFiber = ReactFiberTreeReflection.findCurrentHostFiber, findCurrentHostFiberWithNoPortals = ReactFiberTreeReflection.findCurrentHostFiberWithNoPortals;
|
|
|
|
|
getContextForSubtree_1._injectFiber(function(fiber) {
|
|
|
|
|
var parentContext = findCurrentUnmaskedContext(fiber);
|
|
|
|
|
return isContextProvider(fiber) ? processChildContext(fiber, parentContext, !1) : parentContext;
|
|
|
|
|
});
|
|
|
|
|
function _classCallCheck(instance, Constructor) {
|
|
|
|
|
if (!(instance instanceof Constructor)) throw new TypeError("Cannot call a class as a function");
|
|
|
|
|
}
|
|
|
|
@ -3036,7 +2998,7 @@ __DEV__ && function() {
|
|
|
|
|
updateContainer: function(element, container, parentComponent, callback) {
|
|
|
|
|
var current = container.current;
|
|
|
|
|
ReactFiberInstrumentation.debugTool && (null === current.alternate ? ReactFiberInstrumentation.debugTool.onMountContainer(container) : null === element ? ReactFiberInstrumentation.debugTool.onUnmountContainer(container) : ReactFiberInstrumentation.debugTool.onUpdateContainer(container));
|
|
|
|
|
var context = getContextForSubtree_1(parentComponent);
|
|
|
|
|
var context = getContextForSubtree(parentComponent);
|
|
|
|
|
null === container.context ? container.context = context : container.pendingContext = context,
|
|
|
|
|
scheduleTopLevelUpdate(current, element, callback);
|
|
|
|
|
},
|
|
|
|
@ -3213,7 +3175,7 @@ __DEV__ && function() {
|
|
|
|
|
};
|
|
|
|
|
var ReactNativeFiberInspector = {
|
|
|
|
|
getInspectorDataForViewTag: getInspectorDataForViewTag
|
|
|
|
|
}, ReactVersion = "16.0.0-rc.3", ReactCurrentOwner$3 = ReactGlobalSharedState_1.ReactCurrentOwner, warning$11 = require$$0;
|
|
|
|
|
}, ReactVersion = "16.0.0", ReactCurrentOwner$3 = ReactGlobalSharedState_1.ReactCurrentOwner, warning$11 = require$$0;
|
|
|
|
|
function findNodeHandle(componentOrHandle) {
|
|
|
|
|
var owner = ReactCurrentOwner$3.current;
|
|
|
|
|
if (null !== owner && null !== owner.stateNode && (warning$11(owner.stateNode._warnedAboutRefsInRender, "%s is accessing findNodeHandle inside its render(). " + "render() should be a pure function of props and state. It should " + "never access something that requires stale data from the previous " + "render, such as refs. Move this logic to componentDidMount and " + "componentDidUpdate instead.", getComponentName_1(owner) || "A component"),
|
|
|
|
@ -3323,22 +3285,11 @@ __DEV__ && function() {
|
|
|
|
|
injectEventPluginsByName: EventPluginRegistry_1.injectEventPluginsByName
|
|
|
|
|
},
|
|
|
|
|
getListener: function(inst, registrationName) {
|
|
|
|
|
var listener;
|
|
|
|
|
if ("number" == typeof inst.tag) {
|
|
|
|
|
var stateNode = inst.stateNode;
|
|
|
|
|
var listener, stateNode = inst.stateNode;
|
|
|
|
|
if (!stateNode) return null;
|
|
|
|
|
var props = EventPluginUtils_1.getFiberCurrentPropsFromNode(stateNode);
|
|
|
|
|
if (!props) return null;
|
|
|
|
|
if (listener = props[registrationName], shouldPreventMouseEvent(registrationName, inst.type, props)) return null;
|
|
|
|
|
} else {
|
|
|
|
|
var currentElement = inst._currentElement;
|
|
|
|
|
if ("string" == typeof currentElement || "number" == typeof currentElement) return null;
|
|
|
|
|
if (!inst._rootNodeID) return null;
|
|
|
|
|
var _props = currentElement.props;
|
|
|
|
|
if (listener = _props[registrationName], shouldPreventMouseEvent(registrationName, currentElement.type, _props)) return null;
|
|
|
|
|
}
|
|
|
|
|
return invariant(!listener || "function" == typeof listener, "Expected `%s` listener to be a function, instead got a value of `%s` type.", registrationName, typeof listener),
|
|
|
|
|
listener;
|
|
|
|
|
return props ? (listener = props[registrationName], shouldPreventMouseEvent(registrationName, inst.type, props) ? null : (invariant(!listener || "function" == typeof listener, "Expected `%s` listener to be a function, instead got a value of `%s` type.", registrationName, typeof listener),
|
|
|
|
|
listener)) : null;
|
|
|
|
|
},
|
|
|
|
|
extractEvents: function(topLevelType, targetInst, nativeEvent, nativeEventTarget) {
|
|
|
|
|
for (var events, plugins = EventPluginRegistry_1.plugins, i = 0; i < plugins.length; i++) {
|
|
|
|
@ -3361,14 +3312,10 @@ __DEV__ && function() {
|
|
|
|
|
}
|
|
|
|
|
}, EventPluginHub_1 = EventPluginHub, HostComponent$11 = ReactTypeOfWork.HostComponent;
|
|
|
|
|
function getParent(inst) {
|
|
|
|
|
if (void 0 !== inst._hostParent) return inst._hostParent;
|
|
|
|
|
if ("number" == typeof inst.tag) {
|
|
|
|
|
do {
|
|
|
|
|
inst = inst.return;
|
|
|
|
|
} while (inst && inst.tag !== HostComponent$11);
|
|
|
|
|
if (inst) return inst;
|
|
|
|
|
}
|
|
|
|
|
return null;
|
|
|
|
|
return inst || null;
|
|
|
|
|
}
|
|
|
|
|
function getLowestCommonAncestor(instA, instB) {
|
|
|
|
|
for (var depthA = 0, tempA = instA; tempA; tempA = getParent(tempA)) depthA++;
|
|
|
|
@ -3988,430 +3935,7 @@ __DEV__ && function() {
|
|
|
|
|
return "number" != typeof view && "window" !== view && (view = findNumericNodeHandle(view) || "window"),
|
|
|
|
|
UIManager.__takeSnapshot(view, options);
|
|
|
|
|
}
|
|
|
|
|
var takeSnapshot_1 = takeSnapshot, ReactInvalidSetStateWarningHook = {}, warning$17 = require$$0, processingChildContext = !1, warnInvalidSetState = function() {
|
|
|
|
|
warning$17(!processingChildContext, "setState(...): Cannot call setState() inside getChildContext()");
|
|
|
|
|
};
|
|
|
|
|
ReactInvalidSetStateWarningHook = {
|
|
|
|
|
onBeginProcessingChildContext: function() {
|
|
|
|
|
processingChildContext = !0;
|
|
|
|
|
},
|
|
|
|
|
onEndProcessingChildContext: function() {
|
|
|
|
|
processingChildContext = !1;
|
|
|
|
|
},
|
|
|
|
|
onSetState: function() {
|
|
|
|
|
warnInvalidSetState();
|
|
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
var ReactInvalidSetStateWarningHook_1 = ReactInvalidSetStateWarningHook, ReactHostOperationHistoryHook = null, history = [];
|
|
|
|
|
ReactHostOperationHistoryHook = {
|
|
|
|
|
onHostOperation: function(operation) {
|
|
|
|
|
history.push(operation);
|
|
|
|
|
},
|
|
|
|
|
clearHistory: function() {
|
|
|
|
|
ReactHostOperationHistoryHook._preventClearing || (history = []);
|
|
|
|
|
},
|
|
|
|
|
getHistory: function() {
|
|
|
|
|
return history;
|
|
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
var ReactHostOperationHistoryHook_1 = ReactHostOperationHistoryHook, ReactComponentTreeHook = ReactGlobalSharedState_1.ReactComponentTreeHook, warning$16 = require$$0, ReactDebugTool = null, hooks = [], didHookThrowForEvent = {}, callHook = function(event, fn, context, arg1, arg2, arg3, arg4, arg5) {
|
|
|
|
|
try {
|
|
|
|
|
fn.call(context, arg1, arg2, arg3, arg4, arg5);
|
|
|
|
|
} catch (e) {
|
|
|
|
|
warning$16(didHookThrowForEvent[event], "Exception thrown by hook while handling %s: %s", event, e + "\n" + e.stack),
|
|
|
|
|
didHookThrowForEvent[event] = !0;
|
|
|
|
|
}
|
|
|
|
|
}, emitEvent = function(event, arg1, arg2, arg3, arg4, arg5) {
|
|
|
|
|
for (var i = 0; i < hooks.length; i++) {
|
|
|
|
|
var hook = hooks[i], fn = hook[event];
|
|
|
|
|
fn && callHook(event, fn, hook, arg1, arg2, arg3, arg4, arg5);
|
|
|
|
|
}
|
|
|
|
|
}, isProfiling = !1, flushHistory = [], lifeCycleTimerStack = [], currentFlushNesting = 0, currentFlushMeasurements = [], currentFlushStartTime = 0, currentTimerDebugID = null, currentTimerStartTime = 0, currentTimerNestedFlushDuration = 0, currentTimerType = null, lifeCycleTimerHasWarned = !1, clearHistory = function() {
|
|
|
|
|
ReactComponentTreeHook.purgeUnmountedComponents(), ReactHostOperationHistoryHook_1.clearHistory();
|
|
|
|
|
}, getTreeSnapshot = function(registeredIDs) {
|
|
|
|
|
return registeredIDs.reduce(function(tree, id) {
|
|
|
|
|
var ownerID = ReactComponentTreeHook.getOwnerID(id), parentID = ReactComponentTreeHook.getParentID(id);
|
|
|
|
|
return tree[id] = {
|
|
|
|
|
displayName: ReactComponentTreeHook.getDisplayName(id),
|
|
|
|
|
text: ReactComponentTreeHook.getText(id),
|
|
|
|
|
updateCount: ReactComponentTreeHook.getUpdateCount(id),
|
|
|
|
|
childIDs: ReactComponentTreeHook.getChildIDs(id),
|
|
|
|
|
ownerID: ownerID || parentID && ReactComponentTreeHook.getOwnerID(parentID) || 0,
|
|
|
|
|
parentID: parentID
|
|
|
|
|
}, tree;
|
|
|
|
|
}, {});
|
|
|
|
|
}, resetMeasurements = function() {
|
|
|
|
|
var previousStartTime = currentFlushStartTime, previousMeasurements = currentFlushMeasurements, previousOperations = ReactHostOperationHistoryHook_1.getHistory();
|
|
|
|
|
if (0 === currentFlushNesting) return currentFlushStartTime = 0, currentFlushMeasurements = [],
|
|
|
|
|
void clearHistory();
|
|
|
|
|
if (previousMeasurements.length || previousOperations.length) {
|
|
|
|
|
var registeredIDs = ReactComponentTreeHook.getRegisteredIDs();
|
|
|
|
|
flushHistory.push({
|
|
|
|
|
duration: performanceNow() - previousStartTime,
|
|
|
|
|
measurements: previousMeasurements || [],
|
|
|
|
|
operations: previousOperations || [],
|
|
|
|
|
treeSnapshot: getTreeSnapshot(registeredIDs)
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
clearHistory(), currentFlushStartTime = performanceNow(), currentFlushMeasurements = [];
|
|
|
|
|
}, checkDebugID = function(debugID) {
|
|
|
|
|
arguments.length > 1 && void 0 !== arguments[1] && arguments[1] && 0 === debugID || debugID || warning$16(!1, "ReactDebugTool: debugID may not be empty.");
|
|
|
|
|
}, beginLifeCycleTimer = function(debugID, timerType) {
|
|
|
|
|
0 !== currentFlushNesting && (currentTimerType && !lifeCycleTimerHasWarned && (warning$16(!1, "There is an internal error in the React performance measurement code." + "\n\nDid not expect %s timer to start while %s timer is still in " + "progress for %s instance.", timerType, currentTimerType || "no", debugID === currentTimerDebugID ? "the same" : "another"),
|
|
|
|
|
lifeCycleTimerHasWarned = !0), currentTimerStartTime = performanceNow(), currentTimerNestedFlushDuration = 0,
|
|
|
|
|
currentTimerDebugID = debugID, currentTimerType = timerType);
|
|
|
|
|
}, endLifeCycleTimer = function(debugID, timerType) {
|
|
|
|
|
0 !== currentFlushNesting && (currentTimerType === timerType || lifeCycleTimerHasWarned || (warning$16(!1, "There is an internal error in the React performance measurement code. " + "We did not expect %s timer to stop while %s timer is still in " + "progress for %s instance. Please report this as a bug in React.", timerType, currentTimerType || "no", debugID === currentTimerDebugID ? "the same" : "another"),
|
|
|
|
|
lifeCycleTimerHasWarned = !0), isProfiling && currentFlushMeasurements.push({
|
|
|
|
|
timerType: timerType,
|
|
|
|
|
instanceID: debugID,
|
|
|
|
|
duration: performanceNow() - currentTimerStartTime - currentTimerNestedFlushDuration
|
|
|
|
|
}), currentTimerStartTime = 0, currentTimerNestedFlushDuration = 0, currentTimerDebugID = null,
|
|
|
|
|
currentTimerType = null);
|
|
|
|
|
}, pauseCurrentLifeCycleTimer = function() {
|
|
|
|
|
var currentTimer = {
|
|
|
|
|
startTime: currentTimerStartTime,
|
|
|
|
|
nestedFlushStartTime: performanceNow(),
|
|
|
|
|
debugID: currentTimerDebugID,
|
|
|
|
|
timerType: currentTimerType
|
|
|
|
|
};
|
|
|
|
|
lifeCycleTimerStack.push(currentTimer), currentTimerStartTime = 0, currentTimerNestedFlushDuration = 0,
|
|
|
|
|
currentTimerDebugID = null, currentTimerType = null;
|
|
|
|
|
}, resumeCurrentLifeCycleTimer = function() {
|
|
|
|
|
var _lifeCycleTimerStack$ = lifeCycleTimerStack.pop(), startTime = _lifeCycleTimerStack$.startTime, nestedFlushStartTime = _lifeCycleTimerStack$.nestedFlushStartTime, debugID = _lifeCycleTimerStack$.debugID, timerType = _lifeCycleTimerStack$.timerType, nestedFlushDuration = performanceNow() - nestedFlushStartTime;
|
|
|
|
|
currentTimerStartTime = startTime, currentTimerNestedFlushDuration += nestedFlushDuration,
|
|
|
|
|
currentTimerDebugID = debugID, currentTimerType = timerType;
|
|
|
|
|
}, lastMarkTimeStamp = 0, canUsePerformanceMeasure = "undefined" != typeof performance && "function" == typeof performance.mark && "function" == typeof performance.clearMarks && "function" == typeof performance.measure && "function" == typeof performance.clearMeasures, shouldMark = function(debugID) {
|
|
|
|
|
if (!isProfiling || !canUsePerformanceMeasure) return !1;
|
|
|
|
|
var element = ReactComponentTreeHook.getElement(debugID);
|
|
|
|
|
return null != element && "object" == typeof element && !("string" == typeof element.type);
|
|
|
|
|
}, markBegin = function(debugID, markType) {
|
|
|
|
|
if (shouldMark(debugID)) {
|
|
|
|
|
var markName = debugID + "::" + markType;
|
|
|
|
|
lastMarkTimeStamp = performanceNow(), performance.mark(markName);
|
|
|
|
|
}
|
|
|
|
|
}, markEnd = function(debugID, markType) {
|
|
|
|
|
if (shouldMark(debugID)) {
|
|
|
|
|
var markName = debugID + "::" + markType, displayName = ReactComponentTreeHook.getDisplayName(debugID) || "Unknown";
|
|
|
|
|
if (performanceNow() - lastMarkTimeStamp > .1) {
|
|
|
|
|
var measurementName = displayName + " [" + markType + "]";
|
|
|
|
|
performance.measure(measurementName, markName);
|
|
|
|
|
}
|
|
|
|
|
performance.clearMarks(markName), measurementName && performance.clearMeasures(measurementName);
|
|
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
ReactDebugTool = {
|
|
|
|
|
addHook: function(hook) {
|
|
|
|
|
hooks.push(hook);
|
|
|
|
|
},
|
|
|
|
|
removeHook: function(hook) {
|
|
|
|
|
for (var i = 0; i < hooks.length; i++) hooks[i] === hook && (hooks.splice(i, 1),
|
|
|
|
|
i--);
|
|
|
|
|
},
|
|
|
|
|
isProfiling: function() {
|
|
|
|
|
return isProfiling;
|
|
|
|
|
},
|
|
|
|
|
beginProfiling: function() {
|
|
|
|
|
isProfiling || (isProfiling = !0, flushHistory.length = 0, resetMeasurements(),
|
|
|
|
|
ReactDebugTool.addHook(ReactHostOperationHistoryHook_1));
|
|
|
|
|
},
|
|
|
|
|
endProfiling: function() {
|
|
|
|
|
isProfiling && (isProfiling = !1, resetMeasurements(), ReactDebugTool.removeHook(ReactHostOperationHistoryHook_1));
|
|
|
|
|
},
|
|
|
|
|
getFlushHistory: function() {
|
|
|
|
|
return flushHistory;
|
|
|
|
|
},
|
|
|
|
|
onBeginFlush: function() {
|
|
|
|
|
currentFlushNesting++, resetMeasurements(), pauseCurrentLifeCycleTimer(), emitEvent("onBeginFlush");
|
|
|
|
|
},
|
|
|
|
|
onEndFlush: function() {
|
|
|
|
|
resetMeasurements(), currentFlushNesting--, resumeCurrentLifeCycleTimer(), emitEvent("onEndFlush");
|
|
|
|
|
},
|
|
|
|
|
onBeginLifeCycleTimer: function(debugID, timerType) {
|
|
|
|
|
checkDebugID(debugID), emitEvent("onBeginLifeCycleTimer", debugID, timerType), markBegin(debugID, timerType),
|
|
|
|
|
beginLifeCycleTimer(debugID, timerType);
|
|
|
|
|
},
|
|
|
|
|
onEndLifeCycleTimer: function(debugID, timerType) {
|
|
|
|
|
checkDebugID(debugID), endLifeCycleTimer(debugID, timerType), markEnd(debugID, timerType),
|
|
|
|
|
emitEvent("onEndLifeCycleTimer", debugID, timerType);
|
|
|
|
|
},
|
|
|
|
|
onBeginProcessingChildContext: function() {
|
|
|
|
|
emitEvent("onBeginProcessingChildContext");
|
|
|
|
|
},
|
|
|
|
|
onEndProcessingChildContext: function() {
|
|
|
|
|
emitEvent("onEndProcessingChildContext");
|
|
|
|
|
},
|
|
|
|
|
onHostOperation: function(operation) {
|
|
|
|
|
checkDebugID(operation.instanceID), emitEvent("onHostOperation", operation);
|
|
|
|
|
},
|
|
|
|
|
onSetState: function() {
|
|
|
|
|
emitEvent("onSetState");
|
|
|
|
|
},
|
|
|
|
|
onSetChildren: function(debugID, childDebugIDs) {
|
|
|
|
|
checkDebugID(debugID), childDebugIDs.forEach(checkDebugID), emitEvent("onSetChildren", debugID, childDebugIDs);
|
|
|
|
|
},
|
|
|
|
|
onBeforeMountComponent: function(debugID, element, parentDebugID) {
|
|
|
|
|
checkDebugID(debugID), checkDebugID(parentDebugID, !0), emitEvent("onBeforeMountComponent", debugID, element, parentDebugID),
|
|
|
|
|
markBegin(debugID, "mount");
|
|
|
|
|
},
|
|
|
|
|
onMountComponent: function(debugID) {
|
|
|
|
|
checkDebugID(debugID), markEnd(debugID, "mount"), emitEvent("onMountComponent", debugID);
|
|
|
|
|
},
|
|
|
|
|
onBeforeUpdateComponent: function(debugID, element) {
|
|
|
|
|
checkDebugID(debugID), emitEvent("onBeforeUpdateComponent", debugID, element), markBegin(debugID, "update");
|
|
|
|
|
},
|
|
|
|
|
onUpdateComponent: function(debugID) {
|
|
|
|
|
checkDebugID(debugID), markEnd(debugID, "update"), emitEvent("onUpdateComponent", debugID);
|
|
|
|
|
},
|
|
|
|
|
onBeforeUnmountComponent: function(debugID) {
|
|
|
|
|
checkDebugID(debugID), emitEvent("onBeforeUnmountComponent", debugID), markBegin(debugID, "unmount");
|
|
|
|
|
},
|
|
|
|
|
onUnmountComponent: function(debugID) {
|
|
|
|
|
checkDebugID(debugID), markEnd(debugID, "unmount"), emitEvent("onUnmountComponent", debugID);
|
|
|
|
|
},
|
|
|
|
|
onTestEvent: function() {
|
|
|
|
|
emitEvent("onTestEvent");
|
|
|
|
|
}
|
|
|
|
|
}, ReactDebugTool.addHook(ReactInvalidSetStateWarningHook_1), ReactDebugTool.addHook(ReactComponentTreeHook),
|
|
|
|
|
/[?&]react_perf\b/.test(ExecutionEnvironment.canUseDOM && window.location.href || "") && ReactDebugTool.beginProfiling();
|
|
|
|
|
var ReactDebugTool_1 = ReactDebugTool, lowPriorityWarning = function() {}, printWarning = function(format) {
|
|
|
|
|
for (var _len = arguments.length, args = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) args[_key - 1] = arguments[_key];
|
|
|
|
|
var argIndex = 0, message = "Warning: " + format.replace(/%s/g, function() {
|
|
|
|
|
return args[argIndex++];
|
|
|
|
|
});
|
|
|
|
|
"undefined" != typeof console && console.warn(message);
|
|
|
|
|
try {
|
|
|
|
|
throw new Error(message);
|
|
|
|
|
} catch (x) {}
|
|
|
|
|
};
|
|
|
|
|
lowPriorityWarning = function(condition, format) {
|
|
|
|
|
if (void 0 === format) throw new Error("`warning(condition, format, ...args)` requires a warning " + "message argument");
|
|
|
|
|
if (!condition) {
|
|
|
|
|
for (var _len2 = arguments.length, args = Array(_len2 > 2 ? _len2 - 2 : 0), _key2 = 2; _key2 < _len2; _key2++) args[_key2 - 2] = arguments[_key2];
|
|
|
|
|
printWarning.apply(void 0, [ format ].concat(args));
|
|
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
var lowPriorityWarning_1 = lowPriorityWarning;
|
|
|
|
|
function roundFloat(val) {
|
|
|
|
|
var base = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : 2, n = Math.pow(10, base);
|
|
|
|
|
return Math.floor(val * n) / n;
|
|
|
|
|
}
|
|
|
|
|
function consoleTable(table) {
|
|
|
|
|
console.table(table);
|
|
|
|
|
}
|
|
|
|
|
function getLastMeasurements() {
|
|
|
|
|
return ReactDebugTool_1.getFlushHistory();
|
|
|
|
|
}
|
|
|
|
|
function getExclusive() {
|
|
|
|
|
var flushHistory = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : getLastMeasurements(), aggregatedStats = {}, affectedIDs = {};
|
|
|
|
|
function updateAggregatedStats(treeSnapshot, instanceID, timerType, applyUpdate) {
|
|
|
|
|
var displayName = treeSnapshot[instanceID].displayName, key = displayName, stats = aggregatedStats[key];
|
|
|
|
|
stats || (affectedIDs[key] = {}, stats = aggregatedStats[key] = {
|
|
|
|
|
key: key,
|
|
|
|
|
instanceCount: 0,
|
|
|
|
|
counts: {},
|
|
|
|
|
durations: {},
|
|
|
|
|
totalDuration: 0
|
|
|
|
|
}), stats.durations[timerType] || (stats.durations[timerType] = 0), stats.counts[timerType] || (stats.counts[timerType] = 0),
|
|
|
|
|
affectedIDs[key][instanceID] = !0, applyUpdate(stats);
|
|
|
|
|
}
|
|
|
|
|
return flushHistory.forEach(function(flush) {
|
|
|
|
|
var measurements = flush.measurements, treeSnapshot = flush.treeSnapshot;
|
|
|
|
|
measurements.forEach(function(measurement) {
|
|
|
|
|
var duration = measurement.duration, instanceID = measurement.instanceID, timerType = measurement.timerType;
|
|
|
|
|
updateAggregatedStats(treeSnapshot, instanceID, timerType, function(stats) {
|
|
|
|
|
stats.totalDuration += duration, stats.durations[timerType] += duration, stats.counts[timerType]++;
|
|
|
|
|
});
|
|
|
|
|
});
|
|
|
|
|
}), Object.keys(aggregatedStats).map(function(key) {
|
|
|
|
|
return Object.assign({}, aggregatedStats[key], {
|
|
|
|
|
instanceCount: Object.keys(affectedIDs[key]).length
|
|
|
|
|
});
|
|
|
|
|
}).sort(function(a, b) {
|
|
|
|
|
return b.totalDuration - a.totalDuration;
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
function getInclusive() {
|
|
|
|
|
var flushHistory = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : getLastMeasurements(), aggregatedStats = {}, affectedIDs = {};
|
|
|
|
|
function updateAggregatedStats(treeSnapshot, instanceID, applyUpdate) {
|
|
|
|
|
var _treeSnapshot$instanc = treeSnapshot[instanceID], displayName = _treeSnapshot$instanc.displayName, ownerID = _treeSnapshot$instanc.ownerID, owner = treeSnapshot[ownerID], key = (owner ? owner.displayName + " > " : "") + displayName, stats = aggregatedStats[key];
|
|
|
|
|
stats || (affectedIDs[key] = {}, stats = aggregatedStats[key] = {
|
|
|
|
|
key: key,
|
|
|
|
|
instanceCount: 0,
|
|
|
|
|
inclusiveRenderDuration: 0,
|
|
|
|
|
renderCount: 0
|
|
|
|
|
}), affectedIDs[key][instanceID] = !0, applyUpdate(stats);
|
|
|
|
|
}
|
|
|
|
|
var isCompositeByID = {};
|
|
|
|
|
return flushHistory.forEach(function(flush) {
|
|
|
|
|
flush.measurements.forEach(function(measurement) {
|
|
|
|
|
var instanceID = measurement.instanceID;
|
|
|
|
|
"render" === measurement.timerType && (isCompositeByID[instanceID] = !0);
|
|
|
|
|
});
|
|
|
|
|
}), flushHistory.forEach(function(flush) {
|
|
|
|
|
var measurements = flush.measurements, treeSnapshot = flush.treeSnapshot;
|
|
|
|
|
measurements.forEach(function(measurement) {
|
|
|
|
|
var duration = measurement.duration, instanceID = measurement.instanceID;
|
|
|
|
|
if ("render" === measurement.timerType) {
|
|
|
|
|
updateAggregatedStats(treeSnapshot, instanceID, function(stats) {
|
|
|
|
|
stats.renderCount++;
|
|
|
|
|
});
|
|
|
|
|
for (var nextParentID = instanceID; nextParentID; ) isCompositeByID[nextParentID] && updateAggregatedStats(treeSnapshot, nextParentID, function(stats) {
|
|
|
|
|
stats.inclusiveRenderDuration += duration;
|
|
|
|
|
}), nextParentID = treeSnapshot[nextParentID].parentID;
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
}), Object.keys(aggregatedStats).map(function(key) {
|
|
|
|
|
return Object.assign({}, aggregatedStats[key], {
|
|
|
|
|
instanceCount: Object.keys(affectedIDs[key]).length
|
|
|
|
|
});
|
|
|
|
|
}).sort(function(a, b) {
|
|
|
|
|
return b.inclusiveRenderDuration - a.inclusiveRenderDuration;
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
function getWasted() {
|
|
|
|
|
var flushHistory = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : getLastMeasurements(), aggregatedStats = {}, affectedIDs = {};
|
|
|
|
|
function updateAggregatedStats(treeSnapshot, instanceID, applyUpdate) {
|
|
|
|
|
var _treeSnapshot$instanc2 = treeSnapshot[instanceID], displayName = _treeSnapshot$instanc2.displayName, ownerID = _treeSnapshot$instanc2.ownerID, owner = treeSnapshot[ownerID], key = (owner ? owner.displayName + " > " : "") + displayName, stats = aggregatedStats[key];
|
|
|
|
|
stats || (affectedIDs[key] = {}, stats = aggregatedStats[key] = {
|
|
|
|
|
key: key,
|
|
|
|
|
instanceCount: 0,
|
|
|
|
|
inclusiveRenderDuration: 0,
|
|
|
|
|
renderCount: 0
|
|
|
|
|
}), affectedIDs[key][instanceID] = !0, applyUpdate(stats);
|
|
|
|
|
}
|
|
|
|
|
return flushHistory.forEach(function(flush) {
|
|
|
|
|
var measurements = flush.measurements, treeSnapshot = flush.treeSnapshot, operations = flush.operations, isDefinitelyNotWastedByID = {};
|
|
|
|
|
operations.forEach(function(operation) {
|
|
|
|
|
for (var instanceID = operation.instanceID, nextParentID = instanceID; nextParentID; ) isDefinitelyNotWastedByID[nextParentID] = !0,
|
|
|
|
|
nextParentID = treeSnapshot[nextParentID].parentID;
|
|
|
|
|
});
|
|
|
|
|
var renderedCompositeIDs = {};
|
|
|
|
|
measurements.forEach(function(measurement) {
|
|
|
|
|
var instanceID = measurement.instanceID;
|
|
|
|
|
"render" === measurement.timerType && (renderedCompositeIDs[instanceID] = !0);
|
|
|
|
|
}), measurements.forEach(function(measurement) {
|
|
|
|
|
var duration = measurement.duration, instanceID = measurement.instanceID;
|
|
|
|
|
if ("render" === measurement.timerType) {
|
|
|
|
|
var updateCount = treeSnapshot[instanceID].updateCount;
|
|
|
|
|
if (!isDefinitelyNotWastedByID[instanceID] && 0 !== updateCount) {
|
|
|
|
|
updateAggregatedStats(treeSnapshot, instanceID, function(stats) {
|
|
|
|
|
stats.renderCount++;
|
|
|
|
|
});
|
|
|
|
|
for (var nextParentID = instanceID; nextParentID; ) renderedCompositeIDs[nextParentID] && !isDefinitelyNotWastedByID[nextParentID] && updateAggregatedStats(treeSnapshot, nextParentID, function(stats) {
|
|
|
|
|
stats.inclusiveRenderDuration += duration;
|
|
|
|
|
}), nextParentID = treeSnapshot[nextParentID].parentID;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
}), Object.keys(aggregatedStats).map(function(key) {
|
|
|
|
|
return Object.assign({}, aggregatedStats[key], {
|
|
|
|
|
instanceCount: Object.keys(affectedIDs[key]).length
|
|
|
|
|
});
|
|
|
|
|
}).sort(function(a, b) {
|
|
|
|
|
return b.inclusiveRenderDuration - a.inclusiveRenderDuration;
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
function getOperations() {
|
|
|
|
|
var flushHistory = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : getLastMeasurements(), stats = [];
|
|
|
|
|
return flushHistory.forEach(function(flush, flushIndex) {
|
|
|
|
|
var operations = flush.operations, treeSnapshot = flush.treeSnapshot;
|
|
|
|
|
operations.forEach(function(operation) {
|
|
|
|
|
var instanceID = operation.instanceID, type = operation.type, payload = operation.payload, _treeSnapshot$instanc3 = treeSnapshot[instanceID], displayName = _treeSnapshot$instanc3.displayName, ownerID = _treeSnapshot$instanc3.ownerID, owner = treeSnapshot[ownerID], key = (owner ? owner.displayName + " > " : "") + displayName;
|
|
|
|
|
stats.push({
|
|
|
|
|
flushIndex: flushIndex,
|
|
|
|
|
instanceID: instanceID,
|
|
|
|
|
key: key,
|
|
|
|
|
type: type,
|
|
|
|
|
ownerID: ownerID,
|
|
|
|
|
payload: payload
|
|
|
|
|
});
|
|
|
|
|
});
|
|
|
|
|
}), stats;
|
|
|
|
|
}
|
|
|
|
|
function printExclusive(flushHistory) {
|
|
|
|
|
consoleTable(getExclusive(flushHistory).map(function(item) {
|
|
|
|
|
var key = item.key, instanceCount = item.instanceCount, totalDuration = item.totalDuration, renderCount = item.counts.render || 0, renderDuration = item.durations.render || 0;
|
|
|
|
|
return {
|
|
|
|
|
Component: key,
|
|
|
|
|
"Total time (ms)": roundFloat(totalDuration),
|
|
|
|
|
"Instance count": instanceCount,
|
|
|
|
|
"Total render time (ms)": roundFloat(renderDuration),
|
|
|
|
|
"Average render time (ms)": renderCount ? roundFloat(renderDuration / renderCount) : void 0,
|
|
|
|
|
"Render count": renderCount,
|
|
|
|
|
"Total lifecycle time (ms)": roundFloat(totalDuration - renderDuration)
|
|
|
|
|
};
|
|
|
|
|
}));
|
|
|
|
|
}
|
|
|
|
|
function printInclusive(flushHistory) {
|
|
|
|
|
consoleTable(getInclusive(flushHistory).map(function(item) {
|
|
|
|
|
var key = item.key, instanceCount = item.instanceCount, inclusiveRenderDuration = item.inclusiveRenderDuration, renderCount = item.renderCount;
|
|
|
|
|
return {
|
|
|
|
|
"Owner > Component": key,
|
|
|
|
|
"Inclusive render time (ms)": roundFloat(inclusiveRenderDuration),
|
|
|
|
|
"Instance count": instanceCount,
|
|
|
|
|
"Render count": renderCount
|
|
|
|
|
};
|
|
|
|
|
}));
|
|
|
|
|
}
|
|
|
|
|
function printWasted(flushHistory) {
|
|
|
|
|
consoleTable(getWasted(flushHistory).map(function(item) {
|
|
|
|
|
var key = item.key, instanceCount = item.instanceCount, inclusiveRenderDuration = item.inclusiveRenderDuration, renderCount = item.renderCount;
|
|
|
|
|
return {
|
|
|
|
|
"Owner > Component": key,
|
|
|
|
|
"Inclusive wasted time (ms)": roundFloat(inclusiveRenderDuration),
|
|
|
|
|
"Instance count": instanceCount,
|
|
|
|
|
"Render count": renderCount
|
|
|
|
|
};
|
|
|
|
|
}));
|
|
|
|
|
}
|
|
|
|
|
function printOperations(flushHistory) {
|
|
|
|
|
consoleTable(getOperations(flushHistory).map(function(stat) {
|
|
|
|
|
return {
|
|
|
|
|
"Owner > Node": stat.key,
|
|
|
|
|
Operation: stat.type,
|
|
|
|
|
Payload: "object" == typeof stat.payload ? JSON.stringify(stat.payload) : stat.payload,
|
|
|
|
|
"Flush index": stat.flushIndex,
|
|
|
|
|
"Owner Component ID": stat.ownerID,
|
|
|
|
|
"DOM Component ID": stat.instanceID
|
|
|
|
|
};
|
|
|
|
|
}));
|
|
|
|
|
}
|
|
|
|
|
var warnedAboutPrintDOM = !1;
|
|
|
|
|
function printDOM(measurements) {
|
|
|
|
|
return lowPriorityWarning_1(warnedAboutPrintDOM, "`ReactPerf.printDOM(...)` is deprecated. Use " + "`ReactPerf.printOperations(...)` instead."),
|
|
|
|
|
warnedAboutPrintDOM = !0, printOperations(measurements);
|
|
|
|
|
}
|
|
|
|
|
var warnedAboutGetMeasurementsSummaryMap = !1;
|
|
|
|
|
function getMeasurementsSummaryMap(measurements) {
|
|
|
|
|
return lowPriorityWarning_1(warnedAboutGetMeasurementsSummaryMap, "`ReactPerf.getMeasurementsSummaryMap(...)` is deprecated. Use " + "`ReactPerf.getWasted(...)` instead."),
|
|
|
|
|
warnedAboutGetMeasurementsSummaryMap = !0, getWasted(measurements);
|
|
|
|
|
}
|
|
|
|
|
function start() {
|
|
|
|
|
ReactDebugTool_1.beginProfiling();
|
|
|
|
|
}
|
|
|
|
|
function stop() {
|
|
|
|
|
ReactDebugTool_1.endProfiling();
|
|
|
|
|
}
|
|
|
|
|
function isRunning() {
|
|
|
|
|
return ReactDebugTool_1.isProfiling();
|
|
|
|
|
}
|
|
|
|
|
var ReactPerfAnalysis = {
|
|
|
|
|
getLastMeasurements: getLastMeasurements,
|
|
|
|
|
getExclusive: getExclusive,
|
|
|
|
|
getInclusive: getInclusive,
|
|
|
|
|
getWasted: getWasted,
|
|
|
|
|
getOperations: getOperations,
|
|
|
|
|
printExclusive: printExclusive,
|
|
|
|
|
printInclusive: printInclusive,
|
|
|
|
|
printWasted: printWasted,
|
|
|
|
|
printOperations: printOperations,
|
|
|
|
|
start: start,
|
|
|
|
|
stop: stop,
|
|
|
|
|
isRunning: isRunning,
|
|
|
|
|
printDOM: printDOM,
|
|
|
|
|
getMeasurementsSummaryMap: getMeasurementsSummaryMap
|
|
|
|
|
}, ReactPerf = ReactPerfAnalysis, injectInternals = ReactFiberDevToolsHook.injectInternals;
|
|
|
|
|
var takeSnapshot_1 = takeSnapshot, injectInternals = ReactFiberDevToolsHook.injectInternals;
|
|
|
|
|
ReactGenericBatching_1.injection.injectFiberBatchedUpdates(ReactNativeFiberRenderer.batchedUpdates);
|
|
|
|
|
var roots = new Map();
|
|
|
|
|
ReactFiberErrorLogger.injection.injectDialog(ReactNativeFiberErrorDialog_1.showDialog);
|
|
|
|
@ -4450,8 +3974,16 @@ __DEV__ && function() {
|
|
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
Object.assign(ReactNativeFiber.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED, {
|
|
|
|
|
ReactDebugTool: ReactDebugTool_1,
|
|
|
|
|
ReactPerf: ReactPerf
|
|
|
|
|
ReactDebugTool: {
|
|
|
|
|
addHook: function() {},
|
|
|
|
|
removeHook: function() {}
|
|
|
|
|
},
|
|
|
|
|
ReactPerf: {
|
|
|
|
|
start: function() {},
|
|
|
|
|
stop: function() {},
|
|
|
|
|
printInclusive: function() {},
|
|
|
|
|
printWasted: function() {}
|
|
|
|
|
}
|
|
|
|
|
}), injectInternals({
|
|
|
|
|
findFiberByHostInstance: ReactNativeComponentTree_1.getClosestInstanceFromNode,
|
|
|
|
|
findHostInstanceByFiber: ReactNativeFiberRenderer.findHostInstance,
|
|
|
|
|