@ -1,5 +1,5 @@
/ * *
* React v15 . 3.1
* React v15 . 3.2
* /
( function ( f ) { if ( typeof exports === "object" && typeof module !== "undefined" ) { module . exports = f ( ) } else if ( typeof define === "function" && define . amd ) { define ( [ ] , f ) } else { var g ; if ( typeof window !== "undefined" ) { g = window } else if ( typeof global !== "undefined" ) { g = global } else if ( typeof self !== "undefined" ) { g = self } else { g = this } g . React = f ( ) } } ) ( function ( ) { var define , module , exports ; return ( function e ( t , n , r ) { function s ( o , u ) { if ( ! n [ o ] ) { if ( ! t [ o ] ) { var a = typeof require == "function" && require ; if ( ! u && a ) return a ( o , ! 0 ) ; if ( i ) return i ( o , ! 0 ) ; var f = new Error ( "Cannot find module '" + o + "'" ) ; throw f . code = "MODULE_NOT_FOUND" , f } var l = n [ o ] = { exports : { } } ; t [ o ] [ 0 ] . call ( l . exports , function ( e ) { var n = t [ o ] [ 1 ] [ e ] ; return s ( n ? n : e ) } , l , l . exports , e , t , n , r ) } return n [ o ] . exports } var i = typeof require == "function" && require ; for ( var o = 0 ; o < r . length ; o ++ ) s ( r [ o ] ) ; return s } ) ( { 1 : [ function ( _ dereq_ , module , exports ) {
/ * *
@ -316,8 +316,10 @@ function getNativeBeforeInputChars(topLevelType, nativeEvent) {
function getFallbackBeforeInputChars ( topLevelType , nativeEvent ) {
// If we are currently composing (IME) and using a fallback to do so,
// try to extract the composed characters from the fallback object.
// If composition event is available, we extract a string only at
// compositionevent, otherwise extract it at fallback events.
if ( currentComposition ) {
if ( topLevelType === topLevelTypes . topCompositionEnd || isFallbackCompositionEnd ( topLevelType , nativeEvent ) ) {
if ( topLevelType === topLevelTypes . topCompositionEnd || ! canUseCompositionEvent && isFallbackCompositionEnd ( topLevelType , nativeEvent ) ) {
var chars = currentComposition . getData ( ) ;
FallbackCompositionState . release ( currentComposition ) ;
currentComposition = null ;
@ -935,7 +937,7 @@ function shouldUseChangeEvent(elem) {
var doesChangeEventBubble = false ;
if ( ExecutionEnvironment . canUseDOM ) {
// See `handleChange` comment below
doesChangeEventBubble = isEventSupported ( 'change' ) && ( ! ( 'documentMode' in document ) || document . documentMode > 8 ) ;
doesChangeEventBubble = isEventSupported ( 'change' ) && ( ! document . documentMode || document . documentMode > 8 ) ;
}
function manualDispatchChangeEvent ( nativeEvent ) {
@ -1001,7 +1003,7 @@ if (ExecutionEnvironment.canUseDOM) {
// deleting text, so we ignore its input events.
// IE10+ fire input events to often, such when a placeholder
// changes or when an input with a placeholder is focused.
isInputEventSupported = isEventSupported ( 'input' ) && ( ! ( 'documentMode' in document ) || document . documentMode > 11 ) ;
isInputEventSupported = isEventSupported ( 'input' ) && ( ! document . documentMode || document . documentMode > 11 ) ;
}
/ * *
@ -3298,6 +3300,8 @@ var HTMLDOMPropertyConfig = {
allowFullScreen : HAS_BOOLEAN_VALUE ,
allowTransparency : 0 ,
alt : 0 ,
// specifies target context for links with `preload` type
as : 0 ,
async : HAS_BOOLEAN_VALUE ,
autoComplete : 0 ,
// autoFocus is polyfilled/normalized by AutoFocusUtils
@ -3378,6 +3382,7 @@ var HTMLDOMPropertyConfig = {
optimum : 0 ,
pattern : 0 ,
placeholder : 0 ,
playsInline : HAS_BOOLEAN_VALUE ,
poster : 0 ,
preload : 0 ,
profile : 0 ,
@ -4175,6 +4180,19 @@ var ReactBrowserEventEmitter = _assign({}, ReactEventEmitterMixin, {
return ReactBrowserEventEmitter . ReactEventListener . trapCapturedEvent ( topLevelType , handlerBaseName , handle ) ;
} ,
/ * *
* Protect against document . createEvent ( ) returning null
* Some popup blocker extensions appear to do this :
* https : //github.com/facebook/react/issues/6887
* /
supportsEventPageXY : function ( ) {
if ( ! document . createEvent ) {
return false ;
}
var ev = document . createEvent ( 'MouseEvent' ) ;
return ev != null && 'pageX' in ev ;
} ,
/ * *
* Listens to window scroll and resize events . We cache scroll values so that
* application code can access them without triggering reflows .
@ -4188,7 +4206,7 @@ var ReactBrowserEventEmitter = _assign({}, ReactEventEmitterMixin, {
* /
ensureScrollValueMonitoring : function ( ) {
if ( hasEventPageXY === undefined ) {
hasEventPageXY = document . createEvent && 'pageX' in document . createEvent ( 'MouseEvent' ) ;
hasEventPageXY = ReactBrowserEventEmitter . supportsEventPageXY ( ) ;
}
if ( ! hasEventPageXY && ! isMonitoringScrollValue ) {
var refresh = ViewportMetrics . refreshScrollValues ;
@ -5931,28 +5949,6 @@ function warnIfInvalidElement(Component, element) {
}
}
function invokeComponentDidMountWithTimer ( ) {
var publicInstance = this . _ instance ;
if ( this . _ debugID !== 0 ) {
ReactInstrumentation . debugTool . onBeginLifeCycleTimer ( this . _ debugID , 'componentDidMount' ) ;
}
publicInstance . componentDidMount ( ) ;
if ( this . _ debugID !== 0 ) {
ReactInstrumentation . debugTool . onEndLifeCycleTimer ( this . _ debugID , 'componentDidMount' ) ;
}
}
function invokeComponentDidUpdateWithTimer ( prevProps , prevState , prevContext ) {
var publicInstance = this . _ instance ;
if ( this . _ debugID !== 0 ) {
ReactInstrumentation . debugTool . onBeginLifeCycleTimer ( this . _ debugID , 'componentDidUpdate' ) ;
}
publicInstance . componentDidUpdate ( prevProps , prevState , prevContext ) ;
if ( this . _ debugID !== 0 ) {
ReactInstrumentation . debugTool . onEndLifeCycleTimer ( this . _ debugID , 'componentDidUpdate' ) ;
}
}
function shouldConstruct ( Component ) {
return ! ! ( Component . prototype && Component . prototype . isReactComponent ) ;
}
@ -5961,6 +5957,23 @@ function isPureComponent(Component) {
return ! ! ( Component . prototype && Component . prototype . isPureReactComponent ) ;
}
// Separated into a function to contain deoptimizations caused by try/finally.
function measureLifeCyclePerf ( fn , debugID , timerType ) {
if ( debugID === 0 ) {
// Top-level wrappers (see ReactMount) and empty components (see
// ReactDOMEmptyComponent) are invisible to hooks and devtools.
// Both are implementation details that should go away in the future.
return fn ( ) ;
}
ReactInstrumentation . debugTool . onBeginLifeCycleTimer ( debugID , timerType ) ;
try {
return fn ( ) ;
} finally {
ReactInstrumentation . debugTool . onEndLifeCycleTimer ( debugID , timerType ) ;
}
}
/ * *
* -- -- -- -- -- -- -- -- -- The Life - Cycle of a Composite Component -- -- -- -- -- -- -- -- --
*
@ -6052,6 +6065,8 @@ var ReactCompositeComponentMixin = {
* @ internal
* /
mountComponent : function ( transaction , hostParent , hostContainerInfo , context ) {
var _ this = this ;
this . _ context = context ;
this . _ mountOrder = nextMountID ++ ;
this . _ hostParent = hostParent ;
@ -6141,7 +6156,11 @@ var ReactCompositeComponentMixin = {
if ( inst . componentDidMount ) {
if ( "development" !== 'production' ) {
transaction . getReactMountReady ( ) . enqueue ( invokeComponentDidMountWithTimer , this ) ;
transaction . getReactMountReady ( ) . enqueue ( function ( ) {
measureLifeCyclePerf ( function ( ) {
return inst . componentDidMount ( ) ;
} , _ this . _ debugID , 'componentDidMount' ) ;
} ) ;
} else {
transaction . getReactMountReady ( ) . enqueue ( inst . componentDidMount , inst ) ;
}
@ -6165,35 +6184,26 @@ var ReactCompositeComponentMixin = {
_ constructComponentWithoutOwner : function ( doConstruct , publicProps , publicContext , updateQueue ) {
var Component = this . _ currentElement . type ;
var instanceOrElement ;
if ( doConstruct ) {
if ( "development" !== 'production' ) {
if ( this . _ debugID !== 0 ) {
ReactInstrumentation . debugTool . onBeginLifeCycleTimer ( this . _ debugID , 'ctor' ) ;
}
}
instanceOrElement = new Component ( publicProps , publicContext , updateQueue ) ;
if ( "development" !== 'production' ) {
if ( this . _ debugID !== 0 ) {
ReactInstrumentation . debugTool . onEndLifeCycleTimer ( this . _ debugID , 'ctor' ) ;
}
return measureLifeCyclePerf ( function ( ) {
return new Component ( publicProps , publicContext , updateQueue ) ;
} , this . _ debugID , 'ctor' ) ;
} else {
return new Component ( publicProps , publicContext , updateQueue ) ;
}
}
// This can still be an instance in case of factory components
// but we'll count this as time spent rendering as the more common case.
if ( "development" !== 'production' ) {
return measureLifeCyclePerf ( function ( ) {
return Component ( publicProps , publicContext , updateQueue ) ;
} , this . _ debugID , 'render' ) ;
} else {
// This can still be an instance in case of factory components
// but we'll count this as time spent rendering as the more common case.
if ( "development" !== 'production' ) {
if ( this . _ debugID !== 0 ) {
ReactInstrumentation . debugTool . onBeginLifeCycleTimer ( this . _ debugID , 'render' ) ;
}
}
instanceOrElement = Component ( publicProps , publicContext , updateQueue ) ;
if ( "development" !== 'production' ) {
if ( this . _ debugID !== 0 ) {
ReactInstrumentation . debugTool . onEndLifeCycleTimer ( this . _ debugID , 'render' ) ;
}
}
return Component ( publicProps , publicContext , updateQueue ) ;
}
return instanceOrElement ;
} ,
performInitialMountWithErrorHandling : function ( renderedElement , hostParent , hostContainerInfo , transaction , context ) {
@ -6202,11 +6212,6 @@ var ReactCompositeComponentMixin = {
try {
markup = this . performInitialMount ( renderedElement , hostParent , hostContainerInfo , transaction , context ) ;
} catch ( e ) {
if ( "development" !== 'production' ) {
if ( this . _ debugID !== 0 ) {
ReactInstrumentation . debugTool . onError ( ) ;
}
}
// Roll back to checkpoint, handle error (which may add items to the transaction), and take a new checkpoint
transaction . rollback ( checkpoint ) ;
this . _ instance . unstable_handleError ( e ) ;
@ -6227,17 +6232,19 @@ var ReactCompositeComponentMixin = {
performInitialMount : function ( renderedElement , hostParent , hostContainerInfo , transaction , context ) {
var inst = this . _ instance ;
var debugID = 0 ;
if ( "development" !== 'production' ) {
debugID = this . _ debugID ;
}
if ( inst . componentWillMount ) {
if ( "development" !== 'production' ) {
if ( this . _ debugID !== 0 ) {
ReactInstrumentation . debugTool . onBeginLifeCycleTimer ( this . _ debugID , 'componentWillMount' ) ;
}
}
inst . componentWillMount ( ) ;
if ( "development" !== 'production' ) {
if ( this . _ debugID !== 0 ) {
ReactInstrumentation . debugTool . onEndLifeCycleTimer ( this . _ debugID , 'componentWillMount' ) ;
}
measureLifeCyclePerf ( function ( ) {
return inst . componentWillMount ( ) ;
} , debugID , 'componentWillMount' ) ;
} else {
inst . componentWillMount ( ) ;
}
// When mounting, calls to `setState` by `componentWillMount` will set
// `this._pendingStateQueue` without triggering a re-render.
@ -6257,15 +6264,12 @@ var ReactCompositeComponentMixin = {
) ;
this . _ renderedComponent = child ;
var selfDebugID = 0 ;
if ( "development" !== 'production' ) {
selfDebugID = this . _ debugID ;
}
var markup = ReactReconciler . mountComponent ( child , transaction , hostParent , hostContainerInfo , this . _ processChildContext ( context ) , selfDebugID ) ;
var markup = ReactReconciler . mountComponent ( child , transaction , hostParent , hostContainerInfo , this . _ processChildContext ( context ) , debugID ) ;
if ( "development" !== 'production' ) {
if ( this . _ debugID !== 0 ) {
ReactInstrumentation . debugTool . onSetChildren ( this . _ debugID , child . _ debugID !== 0 ? [ child . _ debugID ] : [ ] ) ;
if ( debugID !== 0 ) {
var childDebugIDs = child . _ debugID !== 0 ? [ child . _ debugID ] : [ ] ;
ReactInstrumentation . debugTool . onSetChildren ( debugID , childDebugIDs ) ;
}
}
@ -6286,24 +6290,22 @@ var ReactCompositeComponentMixin = {
if ( ! this . _ renderedComponent ) {
return ;
}
var inst = this . _ instance ;
if ( inst . componentWillUnmount && ! inst . _ calledComponentWillUnmount ) {
inst . _ calledComponentWillUnmount = true ;
if ( "development" !== 'production' ) {
if ( this . _ debugID !== 0 ) {
ReactInstrumentation . debugTool . onBeginLifeCycleTimer ( this . _ debugID , 'componentWillUnmount' ) ;
}
}
if ( safely ) {
var name = this . getName ( ) + '.componentWillUnmount()' ;
ReactErrorUtils . invokeGuardedCallback ( name , inst . componentWillUnmount . bind ( inst ) ) ;
} else {
inst . componentWillUnmount ( ) ;
}
if ( "development" !== 'production' ) {
if ( this . _ debugID !== 0 ) {
ReactInstrumentation . debugTool . onEndLifeCycleTimer ( this . _ debugID , 'componentWillUnmount' ) ;
if ( "development" !== 'production' ) {
measureLifeCyclePerf ( function ( ) {
return inst . componentWillUnmount ( ) ;
} , this . _ debugID , 'componentWillUnmount' ) ;
} else {
inst . componentWillUnmount ( ) ;
}
}
}
@ -6390,13 +6392,21 @@ var ReactCompositeComponentMixin = {
_ processChildContext : function ( currentContext ) {
var Component = this . _ currentElement . type ;
var inst = this . _ instance ;
if ( "development" !== 'production' ) {
ReactInstrumentation . debugTool . onBeginProcessingChildContext ( ) ;
}
var childContext = inst . getChildContext && inst . getChildContext ( ) ;
if ( "development" !== 'production' ) {
ReactInstrumentation . debugTool . onEndProcessingChildContext ( ) ;
var childContext ;
if ( inst . getChildContext ) {
if ( "development" !== 'production' ) {
ReactInstrumentation . debugTool . onBeginProcessingChildContext ( ) ;
try {
childContext = inst . getChildContext ( ) ;
} finally {
ReactInstrumentation . debugTool . onEndProcessingChildContext ( ) ;
}
} else {
childContext = inst . getChildContext ( ) ;
}
}
if ( childContext ) {
! ( typeof Component . childContextTypes === 'object' ) ? "development" !== 'production' ? invariant ( false , '%s.getChildContext(): childContextTypes must be defined in order to use getChildContext().' , this . getName ( ) || 'ReactCompositeComponent' ) : _ prodInvariant ( '107' , this . getName ( ) || 'ReactCompositeComponent' ) : void 0 ;
if ( "development" !== 'production' ) {
@ -6491,15 +6501,11 @@ var ReactCompositeComponentMixin = {
// immediately reconciled instead of waiting for the next batch.
if ( willReceive && inst . componentWillReceiveProps ) {
if ( "development" !== 'production' ) {
if ( this . _ debugID !== 0 ) {
ReactInstrumentation . debugTool . onBeginLifeCycleTimer ( this . _ debugID , 'componentWillReceiveProps' ) ;
}
}
inst . componentWillReceiveProps ( nextProps , nextContext ) ;
if ( "development" !== 'production' ) {
if ( this . _ debugID !== 0 ) {
ReactInstrumentation . debugTool . onEndLifeCycleTimer ( this . _ debugID , 'componentWillReceiveProps' ) ;
}
measureLifeCyclePerf ( function ( ) {
return inst . componentWillReceiveProps ( nextProps , nextContext ) ;
} , this . _ debugID , 'componentWillReceiveProps' ) ;
} else {
inst . componentWillReceiveProps ( nextProps , nextContext ) ;
}
}
@ -6509,15 +6515,11 @@ var ReactCompositeComponentMixin = {
if ( ! this . _ pendingForceUpdate ) {
if ( inst . shouldComponentUpdate ) {
if ( "development" !== 'production' ) {
if ( this . _ debugID !== 0 ) {
ReactInstrumentation . debugTool . onBeginLifeCycleTimer ( this . _ debugID , 'shouldComponentUpdate' ) ;
}
}
shouldUpdate = inst . shouldComponentUpdate ( nextProps , nextState , nextContext ) ;
if ( "development" !== 'production' ) {
if ( this . _ debugID !== 0 ) {
ReactInstrumentation . debugTool . onEndLifeCycleTimer ( this . _ debugID , 'shouldComponentUpdate' ) ;
}
shouldUpdate = measureLifeCyclePerf ( function ( ) {
return inst . shouldComponentUpdate ( nextProps , nextState , nextContext ) ;
} , this . _ debugID , 'shouldComponentUpdate' ) ;
} else {
shouldUpdate = inst . shouldComponentUpdate ( nextProps , nextState , nextContext ) ;
}
} else {
if ( this . _ compositeType === CompositeTypes . PureClass ) {
@ -6583,6 +6585,8 @@ var ReactCompositeComponentMixin = {
* @ private
* /
_ performComponentUpdate : function ( nextElement , nextProps , nextState , nextContext , transaction , unmaskedContext ) {
var _ this2 = this ;
var inst = this . _ instance ;
var hasComponentDidUpdate = Boolean ( inst . componentDidUpdate ) ;
@ -6597,15 +6601,11 @@ var ReactCompositeComponentMixin = {
if ( inst . componentWillUpdate ) {
if ( "development" !== 'production' ) {
if ( this . _ debugID !== 0 ) {
ReactInstrumentation . debugTool . onBeginLifeCycleTimer ( this . _ debugID , 'componentWillUpdate' ) ;
}
}
inst . componentWillUpdate ( nextProps , nextState , nextContext ) ;
if ( "development" !== 'production' ) {
if ( this . _ debugID !== 0 ) {
ReactInstrumentation . debugTool . onEndLifeCycleTimer ( this . _ debugID , 'componentWillUpdate' ) ;
}
measureLifeCyclePerf ( function ( ) {
return inst . componentWillUpdate ( nextProps , nextState , nextContext ) ;
} , this . _ debugID , 'componentWillUpdate' ) ;
} else {
inst . componentWillUpdate ( nextProps , nextState , nextContext ) ;
}
}
@ -6619,7 +6619,9 @@ var ReactCompositeComponentMixin = {
if ( hasComponentDidUpdate ) {
if ( "development" !== 'production' ) {
transaction . getReactMountReady ( ) . enqueue ( invokeComponentDidUpdateWithTimer . bind ( this , prevProps , prevState , prevContext ) , this ) ;
transaction . getReactMountReady ( ) . enqueue ( function ( ) {
measureLifeCyclePerf ( inst . componentDidUpdate . bind ( inst , prevProps , prevState , prevContext ) , _ this2 . _ debugID , 'componentDidUpdate' ) ;
} ) ;
} else {
transaction . getReactMountReady ( ) . enqueue ( inst . componentDidUpdate . bind ( inst , prevProps , prevState , prevContext ) , inst ) ;
}
@ -6636,6 +6638,12 @@ var ReactCompositeComponentMixin = {
var prevComponentInstance = this . _ renderedComponent ;
var prevRenderedElement = prevComponentInstance . _ currentElement ;
var nextRenderedElement = this . _ renderValidatedComponent ( ) ;
var debugID = 0 ;
if ( "development" !== 'production' ) {
debugID = this . _ debugID ;
}
if ( shouldUpdateReactComponent ( prevRenderedElement , nextRenderedElement ) ) {
ReactReconciler . receiveComponent ( prevComponentInstance , nextRenderedElement , transaction , this . _ processChildContext ( context ) ) ;
} else {
@ -6648,15 +6656,12 @@ var ReactCompositeComponentMixin = {
) ;
this . _ renderedComponent = child ;
var selfDebugID = 0 ;
if ( "development" !== 'production' ) {
selfDebugID = this . _ debugID ;
}
var nextMarkup = ReactReconciler . mountComponent ( child , transaction , this . _ hostParent , this . _ hostContainerInfo , this . _ processChildContext ( context ) , selfDebugID ) ;
var nextMarkup = ReactReconciler . mountComponent ( child , transaction , this . _ hostParent , this . _ hostContainerInfo , this . _ processChildContext ( context ) , debugID ) ;
if ( "development" !== 'production' ) {
if ( this . _ debugID !== 0 ) {
ReactInstrumentation . debugTool . onSetChildren ( this . _ debugID , child . _ debugID !== 0 ? [ child . _ debugID ] : [ ] ) ;
if ( debugID !== 0 ) {
var childDebugIDs = child . _ debugID !== 0 ? [ child . _ debugID ] : [ ] ;
ReactInstrumentation . debugTool . onSetChildren ( debugID , childDebugIDs ) ;
}
}
@ -6678,17 +6683,14 @@ var ReactCompositeComponentMixin = {
* /
_ renderValidatedComponentWithoutOwnerOrContext : function ( ) {
var inst = this . _ instance ;
var renderedComponent ;
if ( "development" !== 'production' ) {
if ( this . _ debugID !== 0 ) {
ReactInstrumentation . debugTool . onBeginLifeCycleTimer ( this . _ debugID , 'render' ) ;
}
}
var renderedComponent = inst . render ( ) ;
if ( "development" !== 'production' ) {
if ( this . _ debugID !== 0 ) {
ReactInstrumentation . debugTool . onEndLifeCycleTimer ( this . _ debugID , 'render' ) ;
}
renderedComponent = measureLifeCyclePerf ( function ( ) {
return inst . render ( ) ;
} , this . _ debugID , 'render' ) ;
} else {
renderedComponent = inst . render ( ) ;
}
if ( "development" !== 'production' ) {
@ -6739,7 +6741,7 @@ var ReactCompositeComponentMixin = {
var publicComponentInstance = component . getPublicInstance ( ) ;
if ( "development" !== 'production' ) {
var componentName = component && component . getName ? component . getName ( ) : 'a component' ;
"development" !== 'production' ? warning ( publicComponentInstance != null , 'Stateless function components cannot be given refs ' + '(See ref "%s" in %s created by %s). ' + 'Attempts to access this ref will fail.' , ref , componentName , this . getName ( ) ) : void 0 ;
"development" !== 'production' ? warning ( publicComponentInstance != null || component . _ compositeType !== CompositeTypes . StatelessFunctional , 'Stateless function components cannot be given refs ' + '(See ref "%s" in %s created by %s). ' + 'Attempts to access this ref will fail.' , ref , componentName , this . getName ( ) ) : void 0 ;
}
var refs = inst . refs === emptyObject ? inst . refs = { } : inst . refs ;
refs [ ref ] = publicComponentInstance ;
@ -7163,9 +7165,9 @@ function optionPostMount() {
ReactDOMOption . postMountWrapper ( inst ) ;
}
var setContentChildForInstrumentation = emptyFunction ;
var setAndValidateContentChildDev = emptyFunction ;
if ( "development" !== 'production' ) {
setContentChildForInstrumentation = function ( content ) {
setAndValidateContentChildDev = function ( content ) {
var hasExistingContent = this . _ contentDebugID != null ;
var debugID = this . _ debugID ;
// This ID represents the inlined child that has no backing instance:
@ -7179,6 +7181,7 @@ if ("development" !== 'production') {
return ;
}
validateDOMNesting ( null , String ( content ) , this , this . _ ancestorInfo ) ;
this . _ contentDebugID = contentDebugID ;
if ( hasExistingContent ) {
ReactInstrumentation . debugTool . onBeforeUpdateComponent ( contentDebugID , content ) ;
@ -7353,7 +7356,7 @@ function ReactDOMComponent(element) {
this . _ flags = 0 ;
if ( "development" !== 'production' ) {
this . _ ancestorInfo = null ;
setContentChildForInstrumentation . call ( this , null ) ;
setAndValidateContentChildDev . call ( this , null ) ;
}
}
@ -7453,7 +7456,7 @@ ReactDOMComponent.Mixin = {
if ( parentInfo ) {
// parentInfo should always be present except for the top-level
// component when server rendering
validateDOMNesting ( this . _ tag , this , parentInfo ) ;
validateDOMNesting ( this . _ tag , null , this , parentInfo ) ;
}
this . _ ancestorInfo = validateDOMNesting . updatedAncestorInfo ( parentInfo , this . _ tag , this ) ;
}
@ -7622,7 +7625,7 @@ ReactDOMComponent.Mixin = {
// TODO: Validate that text is allowed as a child of this node
ret = escapeTextContentForBrowser ( contentToUse ) ;
if ( "development" !== 'production' ) {
setContentChildForInstrumentation . call ( this , contentToUse ) ;
setAndValidateContentChildDev . call ( this , contentToUse ) ;
}
} else if ( childrenToUse != null ) {
var mountImages = this . mountChildren ( childrenToUse , transaction , context ) ;
@ -7659,7 +7662,7 @@ ReactDOMComponent.Mixin = {
if ( contentToUse != null ) {
// TODO: Validate that text is allowed as a child of this node
if ( "development" !== 'production' ) {
setContentChildForInstrumentation . call ( this , contentToUse ) ;
setAndValidateContentChildDev . call ( this , contentToUse ) ;
}
DOMLazyTree . queueText ( lazyTree , contentToUse ) ;
} else if ( childrenToUse != null ) {
@ -7891,7 +7894,7 @@ ReactDOMComponent.Mixin = {
if ( lastContent !== nextContent ) {
this . updateTextContent ( '' + nextContent ) ;
if ( "development" !== 'production' ) {
setContentChildForInstrumentation . call ( this , nextContent ) ;
setAndValidateContentChildDev . call ( this , nextContent ) ;
}
}
} else if ( nextHtml != null ) {
@ -7903,7 +7906,7 @@ ReactDOMComponent.Mixin = {
}
} else if ( nextChildren != null ) {
if ( "development" !== 'production' ) {
setContentChildForInstrumentation . call ( this , null ) ;
setAndValidateContentChildDev . call ( this , null ) ;
}
this . updateChildren ( nextChildren , transaction , context ) ;
@ -7958,7 +7961,7 @@ ReactDOMComponent.Mixin = {
this . _ wrapperState = null ;
if ( "development" !== 'production' ) {
setContentChildForInstrumentation . call ( this , null ) ;
setAndValidateContentChildDev . call ( this , null ) ;
}
} ,
@ -8541,7 +8544,7 @@ function forceUpdateIfMounted() {
function isControlled ( props ) {
var usesChecked = props . type === 'checkbox' || props . type === 'radio' ;
return usesChecked ? props . checked !== undefined : props . value !== undefined ;
return usesChecked ? props . checked != null : props . value != null ;
}
/ * *
@ -9455,7 +9458,7 @@ _assign(ReactDOMTextComponent.prototype, {
if ( parentInfo ) {
// parentInfo should always be present except for the top-level
// component when server rendering
validateDOMNesting ( '#text' , this , parentInfo ) ;
validateDOMNesting ( null , this . _ stringText , this , parentInfo ) ;
}
}
@ -10191,12 +10194,6 @@ var ReactDebugTool = {
endLifeCycleTimer ( debugID , timerType ) ;
emitEvent ( 'onEndLifeCycleTimer' , debugID , timerType ) ;
} ,
onError : function ( debugID ) {
if ( currentTimerDebugID != null ) {
endLifeCycleTimer ( currentTimerDebugID , currentTimerType ) ;
}
emitEvent ( 'onError' , debugID ) ;
} ,
onBeginProcessingChildContext : function ( ) {
emitEvent ( 'onBeginProcessingChildContext' ) ;
} ,
@ -10605,14 +10602,6 @@ ReactElement.createElement = function (type, config, children) {
var source = null ;
if ( config != null ) {
if ( "development" !== 'production' ) {
"development" !== 'production' ? warning (
/* eslint-disable no-proto */
config . __ proto__ == null || config . __ proto__ === Object . prototype ,
/* eslint-enable no-proto */
'React.createElement(...): Expected props argument to be a plain object. ' + 'Properties defined in its prototype chain will be ignored.' ) : void 0 ;
}
if ( hasValidRef ( config ) ) {
ref = config . ref ;
}
@ -10713,14 +10702,6 @@ ReactElement.cloneElement = function (element, config, children) {
var owner = element . _ owner ;
if ( config != null ) {
if ( "development" !== 'production' ) {
"development" !== 'production' ? warning (
/* eslint-disable no-proto */
config . __ proto__ == null || config . __ proto__ === Object . prototype ,
/* eslint-enable no-proto */
'React.cloneElement(...): Expected props argument to be a plain object. ' + 'Properties defined in its prototype chain will be ignored.' ) : void 0 ;
}
if ( hasValidRef ( config ) ) {
// Silently steal the ref from the parent.
ref = config . ref ;
@ -14854,7 +14835,7 @@ module.exports = ReactUpdates;
'use strict' ;
module . exports = '15.3.1 ' ;
module . exports = '15.3.2 ' ;
} , { } ] , 98 : [ function ( _ dereq_ , module , exports ) {
/ * *
* Copyright 2013 - present , Facebook , Inc .
@ -15194,7 +15175,7 @@ var eventTypes = {
bubbled : keyOf ( { onSelect : null } ) ,
captured : keyOf ( { onSelectCapture : null } )
} ,
dependencies : [ topLevelTypes . topBlur , topLevelTypes . topContextMenu , topLevelTypes . topFocus , topLevelTypes . topKeyDown , topLevelTypes . topMouseDown , topLevelTypes . topMouseUp , topLevelTypes . topSelectionChange ]
dependencies : [ topLevelTypes . topBlur , topLevelTypes . topContextMenu , topLevelTypes . topFocus , topLevelTypes . topKeyDown , topLevelTypes . topKeyUp , topLevelTypes . top MouseDown , topLevelTypes . topMouseUp , topLevelTypes . topSelectionChange ]
}
} ;
@ -16260,7 +16241,8 @@ _assign(SyntheticEvent.prototype, {
if ( event . preventDefault ) {
event . preventDefault ( ) ;
} else {
} else if ( typeof event . returnValue !== 'unknown' ) {
// eslint-disable-line valid-typeof
event . returnValue = false ;
}
this . isDefaultPrevented = emptyFunction . thatReturnsTrue ;
@ -18650,9 +18632,9 @@ var setInnerHTML = createMicrosoftUnsafeLocalFunction(function (node, html) {
if ( node . namespaceURI === DOMNamespaces . svg && ! ( 'innerHTML' in node ) ) {
reusableSVGContainer = reusableSVGContainer || document . createElement ( 'div' ) ;
reusableSVGContainer . innerHTML = '<svg>' + html + '</svg>' ;
var newNodes = reusableSVGContainer . firstChild . childNodes ;
for ( var i = 0 ; i < newNodes . length ; i ++ ) {
node . appendChild ( newNodes [ i ] ) ;
var svgNode = reusableSVGContainer . firstChild ;
while ( svgNode . firstChild ) {
node . appendChild ( svgNode . firstChild ) ;
}
} else {
node . innerHTML = html ;
@ -19259,11 +19241,16 @@ if ("development" !== 'production') {
var didWarn = { } ;
validateDOMNesting = function ( childTag , childInstance , ancestorInfo ) {
validateDOMNesting = function ( childTag , childText , child Instance , ancestorInfo ) {
ancestorInfo = ancestorInfo || emptyAncestorInfo ;
var parentInfo = ancestorInfo . current ;
var parentTag = parentInfo && parentInfo . tag ;
if ( childText != null ) {
"development" !== 'production' ? warning ( childTag == null , 'validateDOMNesting: when childText is passed, childTag should be null' ) : void 0 ;
childTag = '#text' ;
}
var invalidParent = isTagValidWithParent ( childTag , parentTag ) ? null : parentInfo ;
var invalidAncestor = invalidParent ? null : findInvalidAncestorForTag ( childTag , ancestorInfo ) ;
var problematic = invalidParent || invalidAncestor ;
@ -19311,7 +19298,15 @@ if ("development" !== 'production') {
didWarn [ warnKey ] = true ;
var tagDisplayName = childTag ;
if ( childTag !== '#text' ) {
var whitespaceInfo = '' ;
if ( childTag === '#text' ) {
if ( /\S/ . test ( childText ) ) {
tagDisplayName = 'Text nodes' ;
} else {
tagDisplayName = 'Whitespace text nodes' ;
whitespaceInfo = ' Make sure you don\'t have any extra whitespace between tags on ' + 'each line of your source code.' ;
}
} else {
tagDisplayName = '<' + childTag + '>' ;
}
@ -19320,7 +19315,7 @@ if ("development" !== 'production') {
if ( ancestorTag === 'table' && childTag === 'tr' ) {
info += ' Add a <tbody> to your code to match the DOM tree generated by ' + 'the browser.' ;
}
"development" !== 'production' ? warning ( false , 'validateDOMNesting(...): %s cannot appear as a child of <%s>. ' + 'See %s.%s' , tagDisplayName , ancestorTag , ownerInfo , info ) : void 0 ;
"development" !== 'production' ? warning ( false , 'validateDOMNesting(...): %s cannot appear as a child of <%s>.%s ' + 'See %s.%s' , tagDisplayName , ancestorTag , whitespaceInfo , ownerInfo , info ) : void 0 ;
} else {
"development" !== 'production' ? warning ( false , 'validateDOMNesting(...): %s cannot appear as a descendant of ' + '<%s>. See %s.' , tagDisplayName , ancestorTag , ownerInfo ) : void 0 ;
}