Update website for 15.3.2
(cherry picked from commit b52ea6bd8f403b9247584373761de509fa15f118)
Paul O’Shannessy committed
Sep 19, 2016 at 10:44 UTC
7b0d5d0e74afcc8b748e47faa52c1939277569d5
4 files changed
+181
-186
docs/_config.yml
+9
-9
@@ -53,13 +53,13 @@ sass:
53
gems:
54
- jekyll-redirect-from
55
- jekyll-paginate
56
-react_version: 15.3.1
56
+react_version: 15.3.2
57
react_hashes:
58
- dev: gS+zau+tpUQYisQ0pOWmfNOfcczNoZQjeQ6+5jOgVqV1WBYqkIbdqpay3VuCHQjt
59
- prod: GjSRThJn3fjCmKim4Jou04Ax7vvKfk76xSCKUo7/V70VNIlidvZd3ZnT9rtJk0KM
60
- addons_dev: 37FL10I5CNyIhpG9UrOeUrUKONP5CUt3PYHxWz9Eo4kYWS7weaFzDRP7BxRfhB75
61
- addons_prod: hSlojvw2moZ49rKg6U9wW83sJi7QnWC6nB53jlsGy5hmltJC6ET/cRRKzMifYEg5
62
- dom_dev: yMyOXveaWIIfHWhBZNUrKSPQCw+BWRGucJIdsQeltkvBNDrWXKo+jKVKyx6hH/5r
63
- dom_prod: 3AR/0xGUlR37VpbeHbKQhvizC4T8sNTU8t5GS9JC/4odeRePZuPYl5Pyv/zTeSd8
64
- dom_server_dev: sPg6+OzdWmnH1aArppe66vtLc7tZ2gxh5KxXoZFHAxZoquTi4J71PHASGmv7meE1
65
- dom_server_prod: L4CScwloTXP7xdPmmp3KRAKqASCN8hQpjM6DsrAyCl4K8RXi8Ig+9i0X6k8AyfM9
58
+ dev: bQIyvl+8Ufi5KiKZPG9VItNWmhcAXA1pa5nHIEoBGob+rdbjJnpNV3s288Mz2yZu
59
+ prod: drG4TSBgFQ0Hb/A3ynRyFDT22irpJDL+duuxvYD5mkC9adCYDqEwnX13371waqiH
60
+ addons_dev: gCLxBq3yes/qREmjcw3Tdk5dUh3iB54huWqgxq1lAJZTYzLahJqEik5ZiVnq9Zt4
61
+ addons_prod: pmUKSclxJREtkrfcUJvBYTEoJCvO6Vj5ob8IgPSiIX0G3c4w2dKBJMoGEhlv9Gev
62
+ dom_dev: ZzFfcTbsRst34N23lWs6TtlfonXwDgpeALh+ObwYXav5BSo0j7KsaAtcdn+xrnS1
63
+ dom_prod: MTxlP+/p3lyvc2+LZc2B5xy5reGwrA80whnflxNc6zPgLUmMvbwUoKy7qorBH+P4
64
+ dom_server_dev: jHjmbawtj2AhVuJlmE/O1HXAIbQMzHvoXRZEVdhTSrfJXACRVpZm/BpuAi4K89xn
65
+ dom_server_prod: LCYUMPll/9t/UsNa/Q1zfti2awxxiiczBUZcQBdeGACH0sU6BEAllZuGxo5b6/kf
docs/downloads/react-15.3.2.zip
Binary files /dev/null and b/docs/downloads/react-15.3.2.zip differ
docs/js/react-dom.js
+1
-1
@@ -1,5 +1,5 @@
1
/**
2
- * ReactDOM v15.3.1
2
+ * ReactDOM v15.3.2
3
*
4
* Copyright 2013-present, Facebook, Inc.
5
* All rights reserved.
docs/js/react.js
+171
-176
@@ -1,5 +1,5 @@
1
/**
2
- * React v15.3.1
2
+ * React v15.3.2
3
*/
4
(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){
5
/**
@@ -316,8 +316,10 @@ function getNativeBeforeInputChars(topLevelType, nativeEvent) {
316
function getFallbackBeforeInputChars(topLevelType, nativeEvent) {
317
// If we are currently composing (IME) and using a fallback to do so,
318
// try to extract the composed characters from the fallback object.
319
+ // If composition event is available, we extract a string only at
320
+ // compositionevent, otherwise extract it at fallback events.
321
if (currentComposition) {
320
- if (topLevelType === topLevelTypes.topCompositionEnd || isFallbackCompositionEnd(topLevelType, nativeEvent)) {
322
+ if (topLevelType === topLevelTypes.topCompositionEnd || !canUseCompositionEvent && isFallbackCompositionEnd(topLevelType, nativeEvent)) {
323
var chars = currentComposition.getData();
324
FallbackCompositionState.release(currentComposition);
325
currentComposition = null;
@@ -935,7 +937,7 @@ function shouldUseChangeEvent(elem) {
937
var doesChangeEventBubble = false;
938
if (ExecutionEnvironment.canUseDOM) {
939
// See `handleChange` comment below
938
- doesChangeEventBubble = isEventSupported('change') && (!('documentMode' in document) || document.documentMode > 8);
940
+ doesChangeEventBubble = isEventSupported('change') && (!document.documentMode || document.documentMode > 8);
941
}
942
943
function manualDispatchChangeEvent(nativeEvent) {
@@ -1001,7 +1003,7 @@ if (ExecutionEnvironment.canUseDOM) {
1003
// deleting text, so we ignore its input events.
1004
// IE10+ fire input events to often, such when a placeholder
1005
// changes or when an input with a placeholder is focused.
1004
- isInputEventSupported = isEventSupported('input') && (!('documentMode' in document) || document.documentMode > 11);
1006
+ isInputEventSupported = isEventSupported('input') && (!document.documentMode || document.documentMode > 11);
1007
}
1008
1009
/**
@@ -3298,6 +3300,8 @@ var HTMLDOMPropertyConfig = {
3300
allowFullScreen: HAS_BOOLEAN_VALUE,
3301
allowTransparency: 0,
3302
alt: 0,
3303
+ // specifies target context for links with `preload` type
3304
+ as: 0,
3305
async: HAS_BOOLEAN_VALUE,
3306
autoComplete: 0,
3307
// autoFocus is polyfilled/normalized by AutoFocusUtils
@@ -3378,6 +3382,7 @@ var HTMLDOMPropertyConfig = {
3382
optimum: 0,
3383
pattern: 0,
3384
placeholder: 0,
3385
+ playsInline: HAS_BOOLEAN_VALUE,
3386
poster: 0,
3387
preload: 0,
3388
profile: 0,
@@ -4175,6 +4180,19 @@ var ReactBrowserEventEmitter = _assign({}, ReactEventEmitterMixin, {
4180
return ReactBrowserEventEmitter.ReactEventListener.trapCapturedEvent(topLevelType, handlerBaseName, handle);
4181
},
4182
4183
+ /**
4184
+ * Protect against document.createEvent() returning null
4185
+ * Some popup blocker extensions appear to do this:
4186
+ * https://github.com/facebook/react/issues/6887
4187
+ */
4188
+ supportsEventPageXY: function () {
4189
+ if (!document.createEvent) {
4190
+ return false;
4191
+ }
4192
+ var ev = document.createEvent('MouseEvent');
4193
+ return ev != null && 'pageX' in ev;
4194
+ },
4195
+
4196
/**
4197
* Listens to window scroll and resize events. We cache scroll values so that
4198
* application code can access them without triggering reflows.
@@ -4188,7 +4206,7 @@ var ReactBrowserEventEmitter = _assign({}, ReactEventEmitterMixin, {
4206
*/
4207
ensureScrollValueMonitoring: function () {
4208
if (hasEventPageXY === undefined) {
4191
- hasEventPageXY = document.createEvent && 'pageX' in document.createEvent('MouseEvent');
4209
+ hasEventPageXY = ReactBrowserEventEmitter.supportsEventPageXY();
4210
}
4211
if (!hasEventPageXY && !isMonitoringScrollValue) {
4212
var refresh = ViewportMetrics.refreshScrollValues;
@@ -5931,28 +5949,6 @@ function warnIfInvalidElement(Component, element) {
5949
}
5950
}
5951
5934
-function invokeComponentDidMountWithTimer() {
5935
- var publicInstance = this._instance;
5936
- if (this._debugID !== 0) {
5937
- ReactInstrumentation.debugTool.onBeginLifeCycleTimer(this._debugID, 'componentDidMount');
5938
- }
5939
- publicInstance.componentDidMount();
5940
- if (this._debugID !== 0) {
5941
- ReactInstrumentation.debugTool.onEndLifeCycleTimer(this._debugID, 'componentDidMount');
5942
- }
5943
-}
5944
-
5945
-function invokeComponentDidUpdateWithTimer(prevProps, prevState, prevContext) {
5946
- var publicInstance = this._instance;
5947
- if (this._debugID !== 0) {
5948
- ReactInstrumentation.debugTool.onBeginLifeCycleTimer(this._debugID, 'componentDidUpdate');
5949
- }
5950
- publicInstance.componentDidUpdate(prevProps, prevState, prevContext);
5951
- if (this._debugID !== 0) {
5952
- ReactInstrumentation.debugTool.onEndLifeCycleTimer(this._debugID, 'componentDidUpdate');
5953
- }
5954
-}
5955
-
5952
function shouldConstruct(Component) {
5953
return !!(Component.prototype && Component.prototype.isReactComponent);
5954
}
@@ -5961,6 +5957,23 @@ function isPureComponent(Component) {
5957
return !!(Component.prototype && Component.prototype.isPureReactComponent);
5958
}
5959
5960
+// Separated into a function to contain deoptimizations caused by try/finally.
5961
+function measureLifeCyclePerf(fn, debugID, timerType) {
5962
+ if (debugID === 0) {
5963
+ // Top-level wrappers (see ReactMount) and empty components (see
5964
+ // ReactDOMEmptyComponent) are invisible to hooks and devtools.
5965
+ // Both are implementation details that should go away in the future.
5966
+ return fn();
5967
+ }
5968
+
5969
+ ReactInstrumentation.debugTool.onBeginLifeCycleTimer(debugID, timerType);
5970
+ try {
5971
+ return fn();
5972
+ } finally {
5973
+ ReactInstrumentation.debugTool.onEndLifeCycleTimer(debugID, timerType);
5974
+ }
5975
+}
5976
+
5977
/**
5978
* ------------------ The Life-Cycle of a Composite Component ------------------
5979
*
@@ -6052,6 +6065,8 @@ var ReactCompositeComponentMixin = {
6065
* @internal
6066
*/
6067
mountComponent: function (transaction, hostParent, hostContainerInfo, context) {
6068
+ var _this = this;
6069
+
6070
this._context = context;
6071
this._mountOrder = nextMountID++;
6072
this._hostParent = hostParent;
@@ -6141,7 +6156,11 @@ var ReactCompositeComponentMixin = {
6156
6157
if (inst.componentDidMount) {
6158
if ("development" !== 'production') {
6144
- transaction.getReactMountReady().enqueue(invokeComponentDidMountWithTimer, this);
6159
+ transaction.getReactMountReady().enqueue(function () {
6160
+ measureLifeCyclePerf(function () {
6161
+ return inst.componentDidMount();
6162
+ }, _this._debugID, 'componentDidMount');
6163
+ });
6164
} else {
6165
transaction.getReactMountReady().enqueue(inst.componentDidMount, inst);
6166
}
@@ -6165,35 +6184,26 @@ var ReactCompositeComponentMixin = {
6184
6185
_constructComponentWithoutOwner: function (doConstruct, publicProps, publicContext, updateQueue) {
6186
var Component = this._currentElement.type;
6168
- var instanceOrElement;
6187
+
6188
if (doConstruct) {
6189
if ("development" !== 'production') {
6171
- if (this._debugID !== 0) {
6172
- ReactInstrumentation.debugTool.onBeginLifeCycleTimer(this._debugID, 'ctor');
6173
- }
6174
- }
6175
- instanceOrElement = new Component(publicProps, publicContext, updateQueue);
6176
- if ("development" !== 'production') {
6177
- if (this._debugID !== 0) {
6178
- ReactInstrumentation.debugTool.onEndLifeCycleTimer(this._debugID, 'ctor');
6179
- }
6190
+ return measureLifeCyclePerf(function () {
6191
+ return new Component(publicProps, publicContext, updateQueue);
6192
+ }, this._debugID, 'ctor');
6193
+ } else {
6194
+ return new Component(publicProps, publicContext, updateQueue);
6195
}
6196
+ }
6197
+
6198
+ // This can still be an instance in case of factory components
6199
+ // but we'll count this as time spent rendering as the more common case.
6200
+ if ("development" !== 'production') {
6201
+ return measureLifeCyclePerf(function () {
6202
+ return Component(publicProps, publicContext, updateQueue);
6203
+ }, this._debugID, 'render');
6204
} else {
6182
- // This can still be an instance in case of factory components
6183
- // but we'll count this as time spent rendering as the more common case.
6184
- if ("development" !== 'production') {
6185
- if (this._debugID !== 0) {
6186
- ReactInstrumentation.debugTool.onBeginLifeCycleTimer(this._debugID, 'render');
6187
- }
6188
- }
6189
- instanceOrElement = Component(publicProps, publicContext, updateQueue);
6190
- if ("development" !== 'production') {
6191
- if (this._debugID !== 0) {
6192
- ReactInstrumentation.debugTool.onEndLifeCycleTimer(this._debugID, 'render');
6193
- }
6194
- }
6205
+ return Component(publicProps, publicContext, updateQueue);
6206
}
6196
- return instanceOrElement;
6207
},
6208
6209
performInitialMountWithErrorHandling: function (renderedElement, hostParent, hostContainerInfo, transaction, context) {
@@ -6202,11 +6212,6 @@ var ReactCompositeComponentMixin = {
6212
try {
6213
markup = this.performInitialMount(renderedElement, hostParent, hostContainerInfo, transaction, context);
6214
} catch (e) {
6205
- if ("development" !== 'production') {
6206
- if (this._debugID !== 0) {
6207
- ReactInstrumentation.debugTool.onError();
6208
- }
6209
- }
6215
// Roll back to checkpoint, handle error (which may add items to the transaction), and take a new checkpoint
6216
transaction.rollback(checkpoint);
6217
this._instance.unstable_handleError(e);
@@ -6227,17 +6232,19 @@ var ReactCompositeComponentMixin = {
6232
6233
performInitialMount: function (renderedElement, hostParent, hostContainerInfo, transaction, context) {
6234
var inst = this._instance;
6235
+
6236
+ var debugID = 0;
6237
+ if ("development" !== 'production') {
6238
+ debugID = this._debugID;
6239
+ }
6240
+
6241
if (inst.componentWillMount) {
6242
if ("development" !== 'production') {
6232
- if (this._debugID !== 0) {
6233
- ReactInstrumentation.debugTool.onBeginLifeCycleTimer(this._debugID, 'componentWillMount');
6234
- }
6235
- }
6236
- inst.componentWillMount();
6237
- if ("development" !== 'production') {
6238
- if (this._debugID !== 0) {
6239
- ReactInstrumentation.debugTool.onEndLifeCycleTimer(this._debugID, 'componentWillMount');
6240
- }
6243
+ measureLifeCyclePerf(function () {
6244
+ return inst.componentWillMount();
6245
+ }, debugID, 'componentWillMount');
6246
+ } else {
6247
+ inst.componentWillMount();
6248
}
6249
// When mounting, calls to `setState` by `componentWillMount` will set
6250
// `this._pendingStateQueue` without triggering a re-render.
@@ -6257,15 +6264,12 @@ var ReactCompositeComponentMixin = {
6264
);
6265
this._renderedComponent = child;
6266
6260
- var selfDebugID = 0;
6261
- if ("development" !== 'production') {
6262
- selfDebugID = this._debugID;
6263
- }
6264
- var markup = ReactReconciler.mountComponent(child, transaction, hostParent, hostContainerInfo, this._processChildContext(context), selfDebugID);
6267
+ var markup = ReactReconciler.mountComponent(child, transaction, hostParent, hostContainerInfo, this._processChildContext(context), debugID);
6268
6269
if ("development" !== 'production') {
6267
- if (this._debugID !== 0) {
6268
- ReactInstrumentation.debugTool.onSetChildren(this._debugID, child._debugID !== 0 ? [child._debugID] : []);
6270
+ if (debugID !== 0) {
6271
+ var childDebugIDs = child._debugID !== 0 ? [child._debugID] : [];
6272
+ ReactInstrumentation.debugTool.onSetChildren(debugID, childDebugIDs);
6273
}
6274
}
6275
@@ -6286,24 +6290,22 @@ var ReactCompositeComponentMixin = {
6290
if (!this._renderedComponent) {
6291
return;
6292
}
6293
+
6294
var inst = this._instance;
6295
6296
if (inst.componentWillUnmount && !inst._calledComponentWillUnmount) {
6297
inst._calledComponentWillUnmount = true;
6293
- if ("development" !== 'production') {
6294
- if (this._debugID !== 0) {
6295
- ReactInstrumentation.debugTool.onBeginLifeCycleTimer(this._debugID, 'componentWillUnmount');
6296
- }
6297
- }
6298
+
6299
if (safely) {
6300
var name = this.getName() + '.componentWillUnmount()';
6301
ReactErrorUtils.invokeGuardedCallback(name, inst.componentWillUnmount.bind(inst));
6302
} else {
6302
- inst.componentWillUnmount();
6303
- }
6304
- if ("development" !== 'production') {
6305
- if (this._debugID !== 0) {
6306
- ReactInstrumentation.debugTool.onEndLifeCycleTimer(this._debugID, 'componentWillUnmount');
6303
+ if ("development" !== 'production') {
6304
+ measureLifeCyclePerf(function () {
6305
+ return inst.componentWillUnmount();
6306
+ }, this._debugID, 'componentWillUnmount');
6307
+ } else {
6308
+ inst.componentWillUnmount();
6309
}
6310
}
6311
}
@@ -6390,13 +6392,21 @@ var ReactCompositeComponentMixin = {
6392
_processChildContext: function (currentContext) {
6393
var Component = this._currentElement.type;
6394
var inst = this._instance;
6393
- if ("development" !== 'production') {
6394
- ReactInstrumentation.debugTool.onBeginProcessingChildContext();
6395
- }
6396
- var childContext = inst.getChildContext && inst.getChildContext();
6397
- if ("development" !== 'production') {
6398
- ReactInstrumentation.debugTool.onEndProcessingChildContext();
6395
+ var childContext;
6396
+
6397
+ if (inst.getChildContext) {
6398
+ if ("development" !== 'production') {
6399
+ ReactInstrumentation.debugTool.onBeginProcessingChildContext();
6400
+ try {
6401
+ childContext = inst.getChildContext();
6402
+ } finally {
6403
+ ReactInstrumentation.debugTool.onEndProcessingChildContext();
6404
+ }
6405
+ } else {
6406
+ childContext = inst.getChildContext();
6407
+ }
6408
}
6409
+
6410
if (childContext) {
6411
!(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;
6412
if ("development" !== 'production') {
@@ -6491,15 +6501,11 @@ var ReactCompositeComponentMixin = {
6501
// immediately reconciled instead of waiting for the next batch.
6502
if (willReceive && inst.componentWillReceiveProps) {
6503
if ("development" !== 'production') {
6494
- if (this._debugID !== 0) {
6495
- ReactInstrumentation.debugTool.onBeginLifeCycleTimer(this._debugID, 'componentWillReceiveProps');
6496
- }
6497
- }
6498
- inst.componentWillReceiveProps(nextProps, nextContext);
6499
- if ("development" !== 'production') {
6500
- if (this._debugID !== 0) {
6501
- ReactInstrumentation.debugTool.onEndLifeCycleTimer(this._debugID, 'componentWillReceiveProps');
6502
- }
6504
+ measureLifeCyclePerf(function () {
6505
+ return inst.componentWillReceiveProps(nextProps, nextContext);
6506
+ }, this._debugID, 'componentWillReceiveProps');
6507
+ } else {
6508
+ inst.componentWillReceiveProps(nextProps, nextContext);
6509
}
6510
}
6511
@@ -6509,15 +6515,11 @@ var ReactCompositeComponentMixin = {
6515
if (!this._pendingForceUpdate) {
6516
if (inst.shouldComponentUpdate) {
6517
if ("development" !== 'production') {
6512
- if (this._debugID !== 0) {
6513
- ReactInstrumentation.debugTool.onBeginLifeCycleTimer(this._debugID, 'shouldComponentUpdate');
6514
- }
6515
- }
6516
- shouldUpdate = inst.shouldComponentUpdate(nextProps, nextState, nextContext);
6517
- if ("development" !== 'production') {
6518
- if (this._debugID !== 0) {
6519
- ReactInstrumentation.debugTool.onEndLifeCycleTimer(this._debugID, 'shouldComponentUpdate');
6520
- }
6518
+ shouldUpdate = measureLifeCyclePerf(function () {
6519
+ return inst.shouldComponentUpdate(nextProps, nextState, nextContext);
6520
+ }, this._debugID, 'shouldComponentUpdate');
6521
+ } else {
6522
+ shouldUpdate = inst.shouldComponentUpdate(nextProps, nextState, nextContext);
6523
}
6524
} else {
6525
if (this._compositeType === CompositeTypes.PureClass) {
@@ -6583,6 +6585,8 @@ var ReactCompositeComponentMixin = {
6585
* @private
6586
*/
6587
_performComponentUpdate: function (nextElement, nextProps, nextState, nextContext, transaction, unmaskedContext) {
6588
+ var _this2 = this;
6589
+
6590
var inst = this._instance;
6591
6592
var hasComponentDidUpdate = Boolean(inst.componentDidUpdate);
@@ -6597,15 +6601,11 @@ var ReactCompositeComponentMixin = {
6601
6602
if (inst.componentWillUpdate) {
6603
if ("development" !== 'production') {
6600
- if (this._debugID !== 0) {
6601
- ReactInstrumentation.debugTool.onBeginLifeCycleTimer(this._debugID, 'componentWillUpdate');
6602
- }
6603
- }
6604
- inst.componentWillUpdate(nextProps, nextState, nextContext);
6605
- if ("development" !== 'production') {
6606
- if (this._debugID !== 0) {
6607
- ReactInstrumentation.debugTool.onEndLifeCycleTimer(this._debugID, 'componentWillUpdate');
6608
- }
6604
+ measureLifeCyclePerf(function () {
6605
+ return inst.componentWillUpdate(nextProps, nextState, nextContext);
6606
+ }, this._debugID, 'componentWillUpdate');
6607
+ } else {
6608
+ inst.componentWillUpdate(nextProps, nextState, nextContext);
6609
}
6610
}
6611
@@ -6619,7 +6619,9 @@ var ReactCompositeComponentMixin = {
6619
6620
if (hasComponentDidUpdate) {
6621
if ("development" !== 'production') {
6622
- transaction.getReactMountReady().enqueue(invokeComponentDidUpdateWithTimer.bind(this, prevProps, prevState, prevContext), this);
6622
+ transaction.getReactMountReady().enqueue(function () {
6623
+ measureLifeCyclePerf(inst.componentDidUpdate.bind(inst, prevProps, prevState, prevContext), _this2._debugID, 'componentDidUpdate');
6624
+ });
6625
} else {
6626
transaction.getReactMountReady().enqueue(inst.componentDidUpdate.bind(inst, prevProps, prevState, prevContext), inst);
6627
}
@@ -6636,6 +6638,12 @@ var ReactCompositeComponentMixin = {
6638
var prevComponentInstance = this._renderedComponent;
6639
var prevRenderedElement = prevComponentInstance._currentElement;
6640
var nextRenderedElement = this._renderValidatedComponent();
6641
+
6642
+ var debugID = 0;
6643
+ if ("development" !== 'production') {
6644
+ debugID = this._debugID;
6645
+ }
6646
+
6647
if (shouldUpdateReactComponent(prevRenderedElement, nextRenderedElement)) {
6648
ReactReconciler.receiveComponent(prevComponentInstance, nextRenderedElement, transaction, this._processChildContext(context));
6649
} else {
@@ -6648,15 +6656,12 @@ var ReactCompositeComponentMixin = {
6656
);
6657
this._renderedComponent = child;
6658
6651
- var selfDebugID = 0;
6652
- if ("development" !== 'production') {
6653
- selfDebugID = this._debugID;
6654
- }
6655
- var nextMarkup = ReactReconciler.mountComponent(child, transaction, this._hostParent, this._hostContainerInfo, this._processChildContext(context), selfDebugID);
6659
+ var nextMarkup = ReactReconciler.mountComponent(child, transaction, this._hostParent, this._hostContainerInfo, this._processChildContext(context), debugID);
6660
6661
if ("development" !== 'production') {
6658
- if (this._debugID !== 0) {
6659
- ReactInstrumentation.debugTool.onSetChildren(this._debugID, child._debugID !== 0 ? [child._debugID] : []);
6662
+ if (debugID !== 0) {
6663
+ var childDebugIDs = child._debugID !== 0 ? [child._debugID] : [];
6664
+ ReactInstrumentation.debugTool.onSetChildren(debugID, childDebugIDs);
6665
}
6666
}
6667
@@ -6678,17 +6683,14 @@ var ReactCompositeComponentMixin = {
6683
*/
6684
_renderValidatedComponentWithoutOwnerOrContext: function () {
6685
var inst = this._instance;
6686
+ var renderedComponent;
6687
6688
if ("development" !== 'production') {
6683
- if (this._debugID !== 0) {
6684
- ReactInstrumentation.debugTool.onBeginLifeCycleTimer(this._debugID, 'render');
6685
- }
6686
- }
6687
- var renderedComponent = inst.render();
6688
- if ("development" !== 'production') {
6689
- if (this._debugID !== 0) {
6690
- ReactInstrumentation.debugTool.onEndLifeCycleTimer(this._debugID, 'render');
6691
- }
6689
+ renderedComponent = measureLifeCyclePerf(function () {
6690
+ return inst.render();
6691
+ }, this._debugID, 'render');
6692
+ } else {
6693
+ renderedComponent = inst.render();
6694
}
6695
6696
if ("development" !== 'production') {
@@ -6739,7 +6741,7 @@ var ReactCompositeComponentMixin = {
6741
var publicComponentInstance = component.getPublicInstance();
6742
if ("development" !== 'production') {
6743
var componentName = component && component.getName ? component.getName() : 'a component';
6742
- "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;
6744
+ "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;
6745
}
6746
var refs = inst.refs === emptyObject ? inst.refs = {} : inst.refs;
6747
refs[ref] = publicComponentInstance;
@@ -7163,9 +7165,9 @@ function optionPostMount() {
7165
ReactDOMOption.postMountWrapper(inst);
7166
}
7167
7166
-var setContentChildForInstrumentation = emptyFunction;
7168
+var setAndValidateContentChildDev = emptyFunction;
7169
if ("development" !== 'production') {
7168
- setContentChildForInstrumentation = function (content) {
7170
+ setAndValidateContentChildDev = function (content) {
7171
var hasExistingContent = this._contentDebugID != null;
7172
var debugID = this._debugID;
7173
// This ID represents the inlined child that has no backing instance:
@@ -7179,6 +7181,7 @@ if ("development" !== 'production') {
7181
return;
7182
}
7183
7184
+ validateDOMNesting(null, String(content), this, this._ancestorInfo);
7185
this._contentDebugID = contentDebugID;
7186
if (hasExistingContent) {
7187
ReactInstrumentation.debugTool.onBeforeUpdateComponent(contentDebugID, content);
@@ -7353,7 +7356,7 @@ function ReactDOMComponent(element) {
7356
this._flags = 0;
7357
if ("development" !== 'production') {
7358
this._ancestorInfo = null;
7356
- setContentChildForInstrumentation.call(this, null);
7359
+ setAndValidateContentChildDev.call(this, null);
7360
}
7361
}
7362
@@ -7453,7 +7456,7 @@ ReactDOMComponent.Mixin = {
7456
if (parentInfo) {
7457
// parentInfo should always be present except for the top-level
7458
// component when server rendering
7456
- validateDOMNesting(this._tag, this, parentInfo);
7459
+ validateDOMNesting(this._tag, null, this, parentInfo);
7460
}
7461
this._ancestorInfo = validateDOMNesting.updatedAncestorInfo(parentInfo, this._tag, this);
7462
}
@@ -7622,7 +7625,7 @@ ReactDOMComponent.Mixin = {
7625
// TODO: Validate that text is allowed as a child of this node
7626
ret = escapeTextContentForBrowser(contentToUse);
7627
if ("development" !== 'production') {
7625
- setContentChildForInstrumentation.call(this, contentToUse);
7628
+ setAndValidateContentChildDev.call(this, contentToUse);
7629
}
7630
} else if (childrenToUse != null) {
7631
var mountImages = this.mountChildren(childrenToUse, transaction, context);
@@ -7659,7 +7662,7 @@ ReactDOMComponent.Mixin = {
7662
if (contentToUse != null) {
7663
// TODO: Validate that text is allowed as a child of this node
7664
if ("development" !== 'production') {
7662
- setContentChildForInstrumentation.call(this, contentToUse);
7665
+ setAndValidateContentChildDev.call(this, contentToUse);
7666
}
7667
DOMLazyTree.queueText(lazyTree, contentToUse);
7668
} else if (childrenToUse != null) {
@@ -7891,7 +7894,7 @@ ReactDOMComponent.Mixin = {
7894
if (lastContent !== nextContent) {
7895
this.updateTextContent('' + nextContent);
7896
if ("development" !== 'production') {
7894
- setContentChildForInstrumentation.call(this, nextContent);
7897
+ setAndValidateContentChildDev.call(this, nextContent);
7898
}
7899
}
7900
} else if (nextHtml != null) {
@@ -7903,7 +7906,7 @@ ReactDOMComponent.Mixin = {
7906
}
7907
} else if (nextChildren != null) {
7908
if ("development" !== 'production') {
7906
- setContentChildForInstrumentation.call(this, null);
7909
+ setAndValidateContentChildDev.call(this, null);
7910
}
7911
7912
this.updateChildren(nextChildren, transaction, context);
@@ -7958,7 +7961,7 @@ ReactDOMComponent.Mixin = {
7961
this._wrapperState = null;
7962
7963
if ("development" !== 'production') {
7961
- setContentChildForInstrumentation.call(this, null);
7964
+ setAndValidateContentChildDev.call(this, null);
7965
}
7966
},
7967
@@ -8541,7 +8544,7 @@ function forceUpdateIfMounted() {
8544
8545
function isControlled(props) {
8546
var usesChecked = props.type === 'checkbox' || props.type === 'radio';
8544
- return usesChecked ? props.checked !== undefined : props.value !== undefined;
8547
+ return usesChecked ? props.checked != null : props.value != null;
8548
}
8549
8550
/**
@@ -9455,7 +9458,7 @@ _assign(ReactDOMTextComponent.prototype, {
9458
if (parentInfo) {
9459
// parentInfo should always be present except for the top-level
9460
// component when server rendering
9458
- validateDOMNesting('#text', this, parentInfo);
9461
+ validateDOMNesting(null, this._stringText, this, parentInfo);
9462
}
9463
}
9464
@@ -10191,12 +10194,6 @@ var ReactDebugTool = {
10194
endLifeCycleTimer(debugID, timerType);
10195
emitEvent('onEndLifeCycleTimer', debugID, timerType);
10196
},
10194
- onError: function (debugID) {
10195
- if (currentTimerDebugID != null) {
10196
- endLifeCycleTimer(currentTimerDebugID, currentTimerType);
10197
- }
10198
- emitEvent('onError', debugID);
10199
- },
10197
onBeginProcessingChildContext: function () {
10198
emitEvent('onBeginProcessingChildContext');
10199
},
@@ -10605,14 +10602,6 @@ ReactElement.createElement = function (type, config, children) {
10602
var source = null;
10603
10604
if (config != null) {
10608
- if ("development" !== 'production') {
10609
- "development" !== 'production' ? warning(
10610
- /* eslint-disable no-proto */
10611
- config.__proto__ == null || config.__proto__ === Object.prototype,
10612
- /* eslint-enable no-proto */
10613
- 'React.createElement(...): Expected props argument to be a plain object. ' + 'Properties defined in its prototype chain will be ignored.') : void 0;
10614
- }
10615
-
10605
if (hasValidRef(config)) {
10606
ref = config.ref;
10607
}
@@ -10713,14 +10702,6 @@ ReactElement.cloneElement = function (element, config, children) {
10702
var owner = element._owner;
10703
10704
if (config != null) {
10716
- if ("development" !== 'production') {
10717
- "development" !== 'production' ? warning(
10718
- /* eslint-disable no-proto */
10719
- config.__proto__ == null || config.__proto__ === Object.prototype,
10720
- /* eslint-enable no-proto */
10721
- 'React.cloneElement(...): Expected props argument to be a plain object. ' + 'Properties defined in its prototype chain will be ignored.') : void 0;
10722
- }
10723
-
10705
if (hasValidRef(config)) {
10706
// Silently steal the ref from the parent.
10707
ref = config.ref;
@@ -14854,7 +14835,7 @@ module.exports = ReactUpdates;
14835
14836
'use strict';
14837
14857
-module.exports = '15.3.1';
14838
+module.exports = '15.3.2';
14839
},{}],98:[function(_dereq_,module,exports){
14840
/**
14841
* Copyright 2013-present, Facebook, Inc.
@@ -15194,7 +15175,7 @@ var eventTypes = {
15175
bubbled: keyOf({ onSelect: null }),
15176
captured: keyOf({ onSelectCapture: null })
15177
},
15197
- dependencies: [topLevelTypes.topBlur, topLevelTypes.topContextMenu, topLevelTypes.topFocus, topLevelTypes.topKeyDown, topLevelTypes.topMouseDown, topLevelTypes.topMouseUp, topLevelTypes.topSelectionChange]
15178
+ dependencies: [topLevelTypes.topBlur, topLevelTypes.topContextMenu, topLevelTypes.topFocus, topLevelTypes.topKeyDown, topLevelTypes.topKeyUp, topLevelTypes.topMouseDown, topLevelTypes.topMouseUp, topLevelTypes.topSelectionChange]
15179
}
15180
};
15181
@@ -16260,7 +16241,8 @@ _assign(SyntheticEvent.prototype, {
16241
16242
if (event.preventDefault) {
16243
event.preventDefault();
16263
- } else {
16244
+ } else if (typeof event.returnValue !== 'unknown') {
16245
+ // eslint-disable-line valid-typeof
16246
event.returnValue = false;
16247
}
16248
this.isDefaultPrevented = emptyFunction.thatReturnsTrue;
@@ -18650,9 +18632,9 @@ var setInnerHTML = createMicrosoftUnsafeLocalFunction(function (node, html) {
18632
if (node.namespaceURI === DOMNamespaces.svg && !('innerHTML' in node)) {
18633
reusableSVGContainer = reusableSVGContainer || document.createElement('div');
18634
reusableSVGContainer.innerHTML = '<svg>' + html + '</svg>';
18653
- var newNodes = reusableSVGContainer.firstChild.childNodes;
18654
- for (var i = 0; i < newNodes.length; i++) {
18655
- node.appendChild(newNodes[i]);
18635
+ var svgNode = reusableSVGContainer.firstChild;
18636
+ while (svgNode.firstChild) {
18637
+ node.appendChild(svgNode.firstChild);
18638
}
18639
} else {
18640
node.innerHTML = html;
@@ -19259,11 +19241,16 @@ if ("development" !== 'production') {
19241
19242
var didWarn = {};
19243
19262
- validateDOMNesting = function (childTag, childInstance, ancestorInfo) {
19244
+ validateDOMNesting = function (childTag, childText, childInstance, ancestorInfo) {
19245
ancestorInfo = ancestorInfo || emptyAncestorInfo;
19246
var parentInfo = ancestorInfo.current;
19247
var parentTag = parentInfo && parentInfo.tag;
19248
19249
+ if (childText != null) {
19250
+ "development" !== 'production' ? warning(childTag == null, 'validateDOMNesting: when childText is passed, childTag should be null') : void 0;
19251
+ childTag = '#text';
19252
+ }
19253
+
19254
var invalidParent = isTagValidWithParent(childTag, parentTag) ? null : parentInfo;
19255
var invalidAncestor = invalidParent ? null : findInvalidAncestorForTag(childTag, ancestorInfo);
19256
var problematic = invalidParent || invalidAncestor;
@@ -19311,7 +19298,15 @@ if ("development" !== 'production') {
19298
didWarn[warnKey] = true;
19299
19300
var tagDisplayName = childTag;
19314
- if (childTag !== '#text') {
19301
+ var whitespaceInfo = '';
19302
+ if (childTag === '#text') {
19303
+ if (/\S/.test(childText)) {
19304
+ tagDisplayName = 'Text nodes';
19305
+ } else {
19306
+ tagDisplayName = 'Whitespace text nodes';
19307
+ whitespaceInfo = ' Make sure you don\'t have any extra whitespace between tags on ' + 'each line of your source code.';
19308
+ }
19309
+ } else {
19310
tagDisplayName = '<' + childTag + '>';
19311
}
19312
@@ -19320,7 +19315,7 @@ if ("development" !== 'production') {
19315
if (ancestorTag === 'table' && childTag === 'tr') {
19316
info += ' Add a <tbody> to your code to match the DOM tree generated by ' + 'the browser.';
19317
}
19323
- "development" !== 'production' ? warning(false, 'validateDOMNesting(...): %s cannot appear as a child of <%s>. ' + 'See %s.%s', tagDisplayName, ancestorTag, ownerInfo, info) : void 0;
19318
+ "development" !== 'production' ? warning(false, 'validateDOMNesting(...): %s cannot appear as a child of <%s>.%s ' + 'See %s.%s', tagDisplayName, ancestorTag, whitespaceInfo, ownerInfo, info) : void 0;
19319
} else {
19320
"development" !== 'production' ? warning(false, 'validateDOMNesting(...): %s cannot appear as a descendant of ' + '<%s>. See %s.', tagDisplayName, ancestorTag, ownerInfo) : void 0;
19321
}