@samitouri / QOS-React / commits / b2bce139a4

[docs] Update site for v15

(cherry picked from commit 0275d77fc05eba6b276c164e53f561f553b4e975)

Paul O’Shannessy committed Apr 7, 2016 at 13:16 UTC b2bce139a475fcfc7b279a4fcd390ac2b3e89fd5
4 files changed +4540 -4039
docs/_config.yml
+9 -9
@@ -36,13 +36,13 @@ sass:
36 sass_dir: _css
37 gems:
38 - jekyll-redirect-from
39 -react_version: 0.14.7
39 +react_version: 15.0.0
40 react_hashes:
41 - dev: xQae1pUPdAKUe0u0KUTNt09zzdwheX4VSUsV8vatqM+t6X7rta01qOzessL808ox
42 - prod: zTm/dblzLXQNp3CgY+hfaC/WJ6h4XtNrePh2CW2+rO9GPuNiPb9jmthvAL+oI/dQ
43 - addons_dev: I5TF2q2QDmB31aN5lcClArdUo+WJH/Yi3hcH3PBVXFe5DYtYCFh7Jx/dmpba12zn
44 - addons_prod: KPHTQfiYMhtsIRbZcY4ri1lBYZQbj4ePsSdzODR2Bu5L5ts3APVyqwKPBThO5Hgc
45 - dom_dev: A1t0GCrR06cTHvMjaxeSE8XOiz6j7NvWdmxhN/9z748wEvJTVk13Rr8gMzTUnd8G
46 - dom_prod: ntqCsHbLdMxT352UbhPbT7fqjE8xi4jLmQYQa8mYR+ylAapbXRfdsDweueDObf7m
47 - dom_server_dev: 3I5+eGB/ILYa6pQQX+rM9O0SyDltamM40RiZ5JvIijSYEfVGZU0vY4Iwx9a1eYyD
48 - dom_server_prod: Kt9dEqXzv00orFPW2o3H+kxQtSiNO8EqXsXJT3i99rCcp74N/Km98V0kUxAzy44k
41 + dev: Cq98Gnp/9Q99TFfuPlSLebblQc+9qMrZtWD0FCe4s7GUZxPiQs3xrnDfXGa4ViyS
42 + prod: 9BYbHhdnftnl0BXeFq2Vu9/Q4PbgcQEzhgGVV+AdFn45HLRsjIt7quhJDydhEhXy
43 + addons_dev: Qztew90JWMrd/+bXguDKMh+COfzS4qdH8OErl+vquQj4AUkbHVmLuhrvSYMt0vMP
44 + addons_prod: MKtYvu68gr8fPQLs3JN5YEdJWxG31GD1kTLWu/bdTs+c5PzBVqGtiOT7zPREK/G8
45 + dom_dev: WsglX3Pa1NYQZilMa8GLvlqA5nD7k1WkNmpEHgGxsVvwkb8jVAe9Xyk2FkusiMXH
46 + dom_prod: UAMUzFqVISGZygGa8Jiue1c43+A/XIz5Vqo/nhhQ+nDxFYvWtiHF88BDiqUdQeEl
47 + dom_server_dev: WTVIOMLvdH0B5Ci5GizQ6EijmhJ42lwT9AlLpxjvRxWNgAqBye3+CQjap+v3IvAn
48 + dom_server_prod: lYJlraCIcrpyivOoXRj6kFa1mPZndbT5R2Hjq70IPkxwL1MxcGOxg+14bWolaeWs
docs/downloads/react-15.0.0.zip
Binary files /dev/null and b/docs/downloads/react-15.0.0.zip differ
docs/js/react-dom.js
+2 -2
@@ -1,7 +1,7 @@
1 /**
2 - * ReactDOM v0.14.7
2 + * ReactDOM v15.0.0
3 *
4 - * Copyright 2013-2015, Facebook, Inc.
4 + * Copyright 2013-present, Facebook, Inc.
5 * All rights reserved.
6 *
7 * This source code is licensed under the BSD-style license found in the
docs/js/react.js
+4529 -4028
@@ -1,50 +1,9 @@
1 /**
2 - * React v0.14.7
2 + * React v15.0.0
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 /**
6 - * Copyright 2013-2015, Facebook, Inc.
7 - * All rights reserved.
8 - *
9 - * This source code is licensed under the BSD-style license found in the
10 - * LICENSE file in the root directory of this source tree. An additional grant
11 - * of patent rights can be found in the PATENTS file in the same directory.
12 - *
13 - * @providesModule React
14 - */
15 -
16 -'use strict';
17 -
18 -var ReactDOM = _dereq_(35);
19 -var ReactDOMServer = _dereq_(45);
20 -var ReactIsomorphic = _dereq_(63);
21 -
22 -var assign = _dereq_(23);
23 -var deprecated = _dereq_(106);
24 -
25 -// `version` will be added here by ReactIsomorphic.
26 -var React = {};
27 -
28 -assign(React, ReactIsomorphic);
29 -
30 -assign(React, {
31 - // ReactDOM
32 - findDOMNode: deprecated('findDOMNode', 'ReactDOM', 'react-dom', ReactDOM, ReactDOM.findDOMNode),
33 - render: deprecated('render', 'ReactDOM', 'react-dom', ReactDOM, ReactDOM.render),
34 - unmountComponentAtNode: deprecated('unmountComponentAtNode', 'ReactDOM', 'react-dom', ReactDOM, ReactDOM.unmountComponentAtNode),
35 -
36 - // ReactDOMServer
37 - renderToString: deprecated('renderToString', 'ReactDOMServer', 'react-dom/server', ReactDOMServer, ReactDOMServer.renderToString),
38 - renderToStaticMarkup: deprecated('renderToStaticMarkup', 'ReactDOMServer', 'react-dom/server', ReactDOMServer, ReactDOMServer.renderToStaticMarkup)
39 -});
40 -
41 -React.__SECRET_DOM_DO_NOT_USE_OR_YOU_WILL_BE_FIRED = ReactDOM;
42 -React.__SECRET_DOM_SERVER_DO_NOT_USE_OR_YOU_WILL_BE_FIRED = ReactDOMServer;
43 -
44 -module.exports = React;
45 -},{"106":106,"23":23,"35":35,"45":45,"63":63}],2:[function(_dereq_,module,exports){
46 -/**
47 - * Copyright 2013-2015, Facebook, Inc.
6 + * Copyright 2013-present, Facebook, Inc.
7 * All rights reserved.
8 *
9 * This source code is licensed under the BSD-style license found in the
@@ -52,36 +11,24 @@ module.exports = React;
11 * of patent rights can be found in the PATENTS file in the same directory.
12 *
13 * @providesModule AutoFocusUtils
55 - * @typechecks static-only
14 */
15
16 'use strict';
17
60 -var ReactMount = _dereq_(65);
61 -
62 -var findDOMNode = _dereq_(108);
63 -var focusNode = _dereq_(138);
18 +var ReactDOMComponentTree = _dereq_(38);
19
65 -var Mixin = {
66 - componentDidMount: function () {
67 - if (this.props.autoFocus) {
68 - focusNode(findDOMNode(this));
69 - }
70 - }
71 -};
20 +var focusNode = _dereq_(150);
21
22 var AutoFocusUtils = {
74 - Mixin: Mixin,
75 -
23 focusDOMComponent: function () {
77 - focusNode(ReactMount.getNode(this._rootNodeID));
24 + focusNode(ReactDOMComponentTree.getNodeFromInstance(this));
25 }
26 };
27
28 module.exports = AutoFocusUtils;
82 -},{"108":108,"138":138,"65":65}],3:[function(_dereq_,module,exports){
29 +},{"150":150,"38":38}],2:[function(_dereq_,module,exports){
30 /**
84 - * Copyright 2013-2015 Facebook, Inc.
31 + * Copyright 2013-present Facebook, Inc.
32 * All rights reserved.
33 *
34 * This source code is licensed under the BSD-style license found in the
@@ -89,19 +36,18 @@ module.exports = AutoFocusUtils;
36 * of patent rights can be found in the PATENTS file in the same directory.
37 *
38 * @providesModule BeforeInputEventPlugin
92 - * @typechecks static-only
39 */
40
41 'use strict';
42
43 var EventConstants = _dereq_(15);
44 var EventPropagators = _dereq_(19);
99 -var ExecutionEnvironment = _dereq_(130);
45 +var ExecutionEnvironment = _dereq_(142);
46 var FallbackCompositionState = _dereq_(20);
101 -var SyntheticCompositionEvent = _dereq_(90);
102 -var SyntheticInputEvent = _dereq_(94);
47 +var SyntheticCompositionEvent = _dereq_(99);
48 +var SyntheticInputEvent = _dereq_(103);
49
104 -var keyOf = _dereq_(148);
50 +var keyOf = _dereq_(160);
51
52 var END_KEYCODES = [9, 13, 27, 32]; // Tab, Return, Esc, Space
53 var START_KEYCODE = 229;
@@ -259,13 +205,9 @@ function getDataFromCustomEvent(nativeEvent) {
205 var currentComposition = null;
206
207 /**
262 - * @param {string} topLevelType Record from `EventConstants`.
263 - * @param {DOMEventTarget} topLevelTarget The listening component root node.
264 - * @param {string} topLevelTargetID ID of `topLevelTarget`.
265 - * @param {object} nativeEvent Native browser event.
208 * @return {?object} A SyntheticCompositionEvent.
209 */
268 -function extractCompositionEvent(topLevelType, topLevelTarget, topLevelTargetID, nativeEvent, nativeEventTarget) {
210 +function extractCompositionEvent(topLevelType, targetInst, nativeEvent, nativeEventTarget) {
211 var eventType;
212 var fallbackData;
213
@@ -287,7 +229,7 @@ function extractCompositionEvent(topLevelType, topLevelTarget, topLevelTargetID,
229 // The current composition is stored statically and must not be
230 // overwritten while composition continues.
231 if (!currentComposition && eventType === eventTypes.compositionStart) {
290 - currentComposition = FallbackCompositionState.getPooled(topLevelTarget);
232 + currentComposition = FallbackCompositionState.getPooled(nativeEventTarget);
233 } else if (eventType === eventTypes.compositionEnd) {
234 if (currentComposition) {
235 fallbackData = currentComposition.getData();
@@ -295,7 +237,7 @@ function extractCompositionEvent(topLevelType, topLevelTarget, topLevelTargetID,
237 }
238 }
239
298 - var event = SyntheticCompositionEvent.getPooled(eventType, topLevelTargetID, nativeEvent, nativeEventTarget);
240 + var event = SyntheticCompositionEvent.getPooled(eventType, targetInst, nativeEvent, nativeEventTarget);
241
242 if (fallbackData) {
243 // Inject data generated from fallback path into the synthetic event.
@@ -421,13 +363,9 @@ function getFallbackBeforeInputChars(topLevelType, nativeEvent) {
363 * Extract a SyntheticInputEvent for `beforeInput`, based on either native
364 * `textInput` or fallback behavior.
365 *
424 - * @param {string} topLevelType Record from `EventConstants`.
425 - * @param {DOMEventTarget} topLevelTarget The listening component root node.
426 - * @param {string} topLevelTargetID ID of `topLevelTarget`.
427 - * @param {object} nativeEvent Native browser event.
366 * @return {?object} A SyntheticInputEvent.
367 */
430 -function extractBeforeInputEvent(topLevelType, topLevelTarget, topLevelTargetID, nativeEvent, nativeEventTarget) {
368 +function extractBeforeInputEvent(topLevelType, targetInst, nativeEvent, nativeEventTarget) {
369 var chars;
370
371 if (canUseTextInputEvent) {
@@ -442,7 +380,7 @@ function extractBeforeInputEvent(topLevelType, topLevelTarget, topLevelTargetID,
380 return null;
381 }
382
445 - var event = SyntheticInputEvent.getPooled(eventTypes.beforeInput, topLevelTargetID, nativeEvent, nativeEventTarget);
383 + var event = SyntheticInputEvent.getPooled(eventTypes.beforeInput, targetInst, nativeEvent, nativeEventTarget);
384
385 event.data = chars;
386 EventPropagators.accumulateTwoPhaseDispatches(event);
@@ -471,23 +409,15 @@ var BeforeInputEventPlugin = {
409
410 eventTypes: eventTypes,
411
474 - /**
475 - * @param {string} topLevelType Record from `EventConstants`.
476 - * @param {DOMEventTarget} topLevelTarget The listening component root node.
477 - * @param {string} topLevelTargetID ID of `topLevelTarget`.
478 - * @param {object} nativeEvent Native browser event.
479 - * @return {*} An accumulation of synthetic events.
480 - * @see {EventPluginHub.extractEvents}
481 - */
482 - extractEvents: function (topLevelType, topLevelTarget, topLevelTargetID, nativeEvent, nativeEventTarget) {
483 - return [extractCompositionEvent(topLevelType, topLevelTarget, topLevelTargetID, nativeEvent, nativeEventTarget), extractBeforeInputEvent(topLevelType, topLevelTarget, topLevelTargetID, nativeEvent, nativeEventTarget)];
412 + extractEvents: function (topLevelType, targetInst, nativeEvent, nativeEventTarget) {
413 + return [extractCompositionEvent(topLevelType, targetInst, nativeEvent, nativeEventTarget), extractBeforeInputEvent(topLevelType, targetInst, nativeEvent, nativeEventTarget)];
414 }
415 };
416
417 module.exports = BeforeInputEventPlugin;
488 -},{"130":130,"148":148,"15":15,"19":19,"20":20,"90":90,"94":94}],4:[function(_dereq_,module,exports){
418 +},{"103":103,"142":142,"15":15,"160":160,"19":19,"20":20,"99":99}],3:[function(_dereq_,module,exports){
419 /**
490 - * Copyright 2013-2015, Facebook, Inc.
420 + * Copyright 2013-present, Facebook, Inc.
421 * All rights reserved.
422 *
423 * This source code is licensed under the BSD-style license found in the
@@ -502,8 +432,12 @@ module.exports = BeforeInputEventPlugin;
432 /**
433 * CSS properties which accept numbers but are not in units of "px".
434 */
435 +
436 var isUnitlessNumber = {
437 animationIterationCount: true,
438 + borderImageOutset: true,
439 + borderImageSlice: true,
440 + borderImageWidth: true,
441 boxFlex: true,
442 boxFlexGroup: true,
443 boxOrdinalGroup: true,
@@ -514,6 +448,8 @@ var isUnitlessNumber = {
448 flexShrink: true,
449 flexNegative: true,
450 flexOrder: true,
451 + gridRow: true,
452 + gridColumn: true,
453 fontWeight: true,
454 lineClamp: true,
455 lineHeight: true,
@@ -527,8 +463,11 @@ var isUnitlessNumber = {
463
464 // SVG-related properties
465 fillOpacity: true,
466 + floodOpacity: true,
467 stopOpacity: true,
468 + strokeDasharray: true,
469 strokeDashoffset: true,
470 + strokeMiterlimit: true,
471 strokeOpacity: true,
472 strokeWidth: true
473 };
@@ -625,9 +564,9 @@ var CSSProperty = {
564 };
565
566 module.exports = CSSProperty;
628 -},{}],5:[function(_dereq_,module,exports){
567 +},{}],4:[function(_dereq_,module,exports){
568 /**
630 - * Copyright 2013-2015, Facebook, Inc.
569 + * Copyright 2013-present, Facebook, Inc.
570 * All rights reserved.
571 *
572 * This source code is licensed under the BSD-style license found in the
@@ -635,20 +574,19 @@ module.exports = CSSProperty;
574 * of patent rights can be found in the PATENTS file in the same directory.
575 *
576 * @providesModule CSSPropertyOperations
638 - * @typechecks static-only
577 */
578
579 'use strict';
580
643 -var CSSProperty = _dereq_(4);
644 -var ExecutionEnvironment = _dereq_(130);
645 -var ReactPerf = _dereq_(71);
581 +var CSSProperty = _dereq_(3);
582 +var ExecutionEnvironment = _dereq_(142);
583 +var ReactPerf = _dereq_(80);
584
647 -var camelizeStyleName = _dereq_(132);
648 -var dangerousStyleValue = _dereq_(105);
649 -var hyphenateStyleName = _dereq_(143);
650 -var memoizeStringOnly = _dereq_(150);
651 -var warning = _dereq_(155);
585 +var camelizeStyleName = _dereq_(144);
586 +var dangerousStyleValue = _dereq_(116);
587 +var hyphenateStyleName = _dereq_(155);
588 +var memoizeStringOnly = _dereq_(162);
589 +var warning = _dereq_(166);
590
591 var processStyleName = memoizeStringOnly(function (styleName) {
592 return hyphenateStyleName(styleName);
@@ -679,45 +617,74 @@ if ("development" !== 'production') {
617
618 var warnedStyleNames = {};
619 var warnedStyleValues = {};
620 + var warnedForNaNValue = false;
621
683 - var warnHyphenatedStyleName = function (name) {
622 + var warnHyphenatedStyleName = function (name, owner) {
623 if (warnedStyleNames.hasOwnProperty(name) && warnedStyleNames[name]) {
624 return;
625 }
626
627 warnedStyleNames[name] = true;
689 - "development" !== 'production' ? warning(false, 'Unsupported style property %s. Did you mean %s?', name, camelizeStyleName(name)) : undefined;
628 + "development" !== 'production' ? warning(false, 'Unsupported style property %s. Did you mean %s?%s', name, camelizeStyleName(name), checkRenderMessage(owner)) : void 0;
629 };
630
692 - var warnBadVendoredStyleName = function (name) {
631 + var warnBadVendoredStyleName = function (name, owner) {
632 if (warnedStyleNames.hasOwnProperty(name) && warnedStyleNames[name]) {
633 return;
634 }
635
636 warnedStyleNames[name] = true;
698 - "development" !== 'production' ? warning(false, 'Unsupported vendor-prefixed style property %s. Did you mean %s?', name, name.charAt(0).toUpperCase() + name.slice(1)) : undefined;
637 + "development" !== 'production' ? warning(false, 'Unsupported vendor-prefixed style property %s. Did you mean %s?%s', name, name.charAt(0).toUpperCase() + name.slice(1), checkRenderMessage(owner)) : void 0;
638 };
639
701 - var warnStyleValueWithSemicolon = function (name, value) {
640 + var warnStyleValueWithSemicolon = function (name, value, owner) {
641 if (warnedStyleValues.hasOwnProperty(value) && warnedStyleValues[value]) {
642 return;
643 }
644
645 warnedStyleValues[value] = true;
707 - "development" !== 'production' ? warning(false, 'Style property values shouldn\'t contain a semicolon. ' + 'Try "%s: %s" instead.', name, value.replace(badStyleValueWithSemicolonPattern, '')) : undefined;
646 + "development" !== 'production' ? warning(false, 'Style property values shouldn\'t contain a semicolon.%s ' + 'Try "%s: %s" instead.', checkRenderMessage(owner), name, value.replace(badStyleValueWithSemicolonPattern, '')) : void 0;
647 + };
648 +
649 + var warnStyleValueIsNaN = function (name, value, owner) {
650 + if (warnedForNaNValue) {
651 + return;
652 + }
653 +
654 + warnedForNaNValue = true;
655 + "development" !== 'production' ? warning(false, '`NaN` is an invalid value for the `%s` css style property.%s', name, checkRenderMessage(owner)) : void 0;
656 + };
657 +
658 + var checkRenderMessage = function (owner) {
659 + if (owner) {
660 + var name = owner.getName();
661 + if (name) {
662 + return ' Check the render method of `' + name + '`.';
663 + }
664 + }
665 + return '';
666 };
667
668 /**
669 * @param {string} name
670 * @param {*} value
671 + * @param {ReactDOMComponent} component
672 */
714 - var warnValidStyle = function (name, value) {
673 + var warnValidStyle = function (name, value, component) {
674 + var owner;
675 + if (component) {
676 + owner = component._currentElement._owner;
677 + }
678 if (name.indexOf('-') > -1) {
716 - warnHyphenatedStyleName(name);
679 + warnHyphenatedStyleName(name, owner);
680 } else if (badVendoredStyleNamePattern.test(name)) {
718 - warnBadVendoredStyleName(name);
681 + warnBadVendoredStyleName(name, owner);
682 } else if (badStyleValueWithSemicolonPattern.test(value)) {
720 - warnStyleValueWithSemicolon(name, value);
683 + warnStyleValueWithSemicolon(name, value, owner);
684 + }
685 +
686 + if (typeof value === 'number' && isNaN(value)) {
687 + warnStyleValueIsNaN(name, value, owner);
688 }
689 };
690 }
@@ -737,9 +704,10 @@ var CSSPropertyOperations = {
704 * The result should be HTML-escaped before insertion into the DOM.
705 *
706 * @param {object} styles
707 + * @param {ReactDOMComponent} component
708 * @return {?string}
709 */
742 - createMarkupForStyles: function (styles) {
710 + createMarkupForStyles: function (styles, component) {
711 var serialized = '';
712 for (var styleName in styles) {
713 if (!styles.hasOwnProperty(styleName)) {
@@ -747,11 +715,11 @@ var CSSPropertyOperations = {
715 }
716 var styleValue = styles[styleName];
717 if ("development" !== 'production') {
750 - warnValidStyle(styleName, styleValue);
718 + warnValidStyle(styleName, styleValue, component);
719 }
720 if (styleValue != null) {
721 serialized += processStyleName(styleName) + ':';
754 - serialized += dangerousStyleValue(styleName, styleValue) + ';';
722 + serialized += dangerousStyleValue(styleName, styleValue, component) + ';';
723 }
724 }
725 return serialized || null;
@@ -763,18 +731,19 @@ var CSSPropertyOperations = {
731 *
732 * @param {DOMElement} node
733 * @param {object} styles
734 + * @param {ReactDOMComponent} component
735 */
767 - setValueForStyles: function (node, styles) {
736 + setValueForStyles: function (node, styles, component) {
737 var style = node.style;
738 for (var styleName in styles) {
739 if (!styles.hasOwnProperty(styleName)) {
740 continue;
741 }
742 if ("development" !== 'production') {
774 - warnValidStyle(styleName, styles[styleName]);
743 + warnValidStyle(styleName, styles[styleName], component);
744 }
776 - var styleValue = dangerousStyleValue(styleName, styles[styleName]);
777 - if (styleName === 'float') {
745 + var styleValue = dangerousStyleValue(styleName, styles[styleName], component);
746 + if (styleName === 'float' || styleName === 'cssFloat') {
747 styleName = styleFloatAccessor;
748 }
749 if (styleValue) {
@@ -801,9 +770,9 @@ ReactPerf.measureMethods(CSSPropertyOperations, 'CSSPropertyOperations', {
770 });
771
772 module.exports = CSSPropertyOperations;
804 -},{"105":105,"130":130,"132":132,"143":143,"150":150,"155":155,"4":4,"71":71}],6:[function(_dereq_,module,exports){
773 +},{"116":116,"142":142,"144":144,"155":155,"162":162,"166":166,"3":3,"80":80}],5:[function(_dereq_,module,exports){
774 /**
806 - * Copyright 2013-2015, Facebook, Inc.
775 + * Copyright 2013-present, Facebook, Inc.
776 * All rights reserved.
777 *
778 * This source code is licensed under the BSD-style license found in the
@@ -815,10 +784,11 @@ module.exports = CSSPropertyOperations;
784
785 'use strict';
786
818 -var PooledClass = _dereq_(24);
787 +var _assign = _dereq_(167);
788 +
789 +var PooledClass = _dereq_(23);
790
820 -var assign = _dereq_(23);
821 -var invariant = _dereq_(144);
791 +var invariant = _dereq_(156);
792
793 /**
794 * A specialized pseudo-event module to help keep track of components waiting to
@@ -836,7 +806,7 @@ function CallbackQueue() {
806 this._contexts = null;
807 }
808
839 -assign(CallbackQueue.prototype, {
809 +_assign(CallbackQueue.prototype, {
810
811 /**
812 * Enqueues a callback to be invoked when `notifyAll` is invoked.
@@ -862,7 +832,7 @@ assign(CallbackQueue.prototype, {
832 var callbacks = this._callbacks;
833 var contexts = this._contexts;
834 if (callbacks) {
865 - !(callbacks.length === contexts.length) ? "development" !== 'production' ? invariant(false, 'Mismatched list of contexts in callback queue') : invariant(false) : undefined;
835 + !(callbacks.length === contexts.length) ? "development" !== 'production' ? invariant(false, 'Mismatched list of contexts in callback queue') : invariant(false) : void 0;
836 this._callbacks = null;
837 this._contexts = null;
838 for (var i = 0; i < callbacks.length; i++) {
@@ -873,6 +843,17 @@ assign(CallbackQueue.prototype, {
843 }
844 },
845
846 + checkpoint: function () {
847 + return this._callbacks ? this._callbacks.length : 0;
848 + },
849 +
850 + rollback: function (len) {
851 + if (this._callbacks) {
852 + this._callbacks.length = len;
853 + this._contexts.length = len;
854 + }
855 + },
856 +
857 /**
858 * Resets the internal queue.
859 *
@@ -895,9 +876,9 @@ assign(CallbackQueue.prototype, {
876 PooledClass.addPoolingTo(CallbackQueue);
877
878 module.exports = CallbackQueue;
898 -},{"144":144,"23":23,"24":24}],7:[function(_dereq_,module,exports){
879 +},{"156":156,"167":167,"23":23}],6:[function(_dereq_,module,exports){
880 /**
900 - * Copyright 2013-2015, Facebook, Inc.
881 + * Copyright 2013-present, Facebook, Inc.
882 * All rights reserved.
883 *
884 * This source code is licensed under the BSD-style license found in the
@@ -912,14 +893,15 @@ module.exports = CallbackQueue;
893 var EventConstants = _dereq_(15);
894 var EventPluginHub = _dereq_(16);
895 var EventPropagators = _dereq_(19);
915 -var ExecutionEnvironment = _dereq_(130);
916 -var ReactUpdates = _dereq_(83);
917 -var SyntheticEvent = _dereq_(92);
896 +var ExecutionEnvironment = _dereq_(142);
897 +var ReactDOMComponentTree = _dereq_(38);
898 +var ReactUpdates = _dereq_(92);
899 +var SyntheticEvent = _dereq_(101);
900
919 -var getEventTarget = _dereq_(114);
920 -var isEventSupported = _dereq_(119);
921 -var isTextInputElement = _dereq_(120);
922 -var keyOf = _dereq_(148);
901 +var getEventTarget = _dereq_(124);
902 +var isEventSupported = _dereq_(131);
903 +var isTextInputElement = _dereq_(132);
904 +var keyOf = _dereq_(160);
905
906 var topLevelTypes = EventConstants.topLevelTypes;
907
@@ -937,7 +919,7 @@ var eventTypes = {
919 * For IE shims
920 */
921 var activeElement = null;
940 -var activeElementID = null;
922 +var activeElementInst = null;
923 var activeElementValue = null;
924 var activeElementValueProp = null;
925
@@ -956,7 +938,7 @@ if (ExecutionEnvironment.canUseDOM) {
938 }
939
940 function manualDispatchChangeEvent(nativeEvent) {
959 - var event = SyntheticEvent.getPooled(eventTypes.change, activeElementID, nativeEvent, getEventTarget(nativeEvent));
941 + var event = SyntheticEvent.getPooled(eventTypes.change, activeElementInst, nativeEvent, getEventTarget(nativeEvent));
942 EventPropagators.accumulateTwoPhaseDispatches(event);
943
944 // If change and propertychange bubbled, we'd just bind to it like all the
@@ -978,9 +960,9 @@ function runEventInBatch(event) {
960 EventPluginHub.processEventQueue(false);
961 }
962
981 -function startWatchingForChangeEventIE8(target, targetID) {
963 +function startWatchingForChangeEventIE8(target, targetInst) {
964 activeElement = target;
983 - activeElementID = targetID;
965 + activeElementInst = targetInst;
966 activeElement.attachEvent('onchange', manualDispatchChangeEvent);
967 }
968
@@ -990,20 +972,20 @@ function stopWatchingForChangeEventIE8() {
972 }
973 activeElement.detachEvent('onchange', manualDispatchChangeEvent);
974 activeElement = null;
993 - activeElementID = null;
975 + activeElementInst = null;
976 }
977
996 -function getTargetIDForChangeEvent(topLevelType, topLevelTarget, topLevelTargetID) {
978 +function getTargetInstForChangeEvent(topLevelType, targetInst) {
979 if (topLevelType === topLevelTypes.topChange) {
998 - return topLevelTargetID;
980 + return targetInst;
981 }
982 }
1001 -function handleEventsForChangeEventIE8(topLevelType, topLevelTarget, topLevelTargetID) {
983 +function handleEventsForChangeEventIE8(topLevelType, target, targetInst) {
984 if (topLevelType === topLevelTypes.topFocus) {
985 // stopWatching() should be a noop here but we call it just in case we
986 // missed a blur event somehow.
987 stopWatchingForChangeEventIE8();
1006 - startWatchingForChangeEventIE8(topLevelTarget, topLevelTargetID);
988 + startWatchingForChangeEventIE8(target, targetInst);
989 } else if (topLevelType === topLevelTypes.topBlur) {
990 stopWatchingForChangeEventIE8();
991 }
@@ -1015,12 +997,14 @@ function handleEventsForChangeEventIE8(topLevelType, topLevelTarget, topLevelTar
997 var isInputEventSupported = false;
998 if (ExecutionEnvironment.canUseDOM) {
999 // IE9 claims to support the input event but fails to trigger it when
1018 - // deleting text, so we ignore its input events
1019 - isInputEventSupported = isEventSupported('input') && (!('documentMode' in document) || document.documentMode > 9);
1000 + // deleting text, so we ignore its input events.
1001 + // IE10+ fire input events to often, such when a placeholder
1002 + // changes or when an input with a placeholder is focused.
1003 + isInputEventSupported = isEventSupported('input') && (!('documentMode' in document) || document.documentMode > 11);
1004 }
1005
1006 /**
1023 - * (For old IE.) Replacement getter/setter for the `value` property that gets
1007 + * (For IE <=11) Replacement getter/setter for the `value` property that gets
1008 * set on the active element.
1009 */
1010 var newValueProp = {
@@ -1035,24 +1019,28 @@ var newValueProp = {
1019 };
1020
1021 /**
1038 - * (For old IE.) Starts tracking propertychange events on the passed-in element
1022 + * (For IE <=11) Starts tracking propertychange events on the passed-in element
1023 * and override the value property so that we can distinguish user events from
1024 * value changes in JS.
1025 */
1042 -function startWatchingForValueChange(target, targetID) {
1026 +function startWatchingForValueChange(target, targetInst) {
1027 activeElement = target;
1044 - activeElementID = targetID;
1028 + activeElementInst = targetInst;
1029 activeElementValue = target.value;
1030 activeElementValueProp = Object.getOwnPropertyDescriptor(target.constructor.prototype, 'value');
1031
1032 // Not guarded in a canDefineProperty check: IE8 supports defineProperty only
1033 // on DOM elements
1034 Object.defineProperty(activeElement, 'value', newValueProp);
1051 - activeElement.attachEvent('onpropertychange', handlePropertyChange);
1035 + if (activeElement.attachEvent) {
1036 + activeElement.attachEvent('onpropertychange', handlePropertyChange);
1037 + } else {
1038 + activeElement.addEventListener('propertychange', handlePropertyChange, false);
1039 + }
1040 }
1041
1042 /**
1055 - * (For old IE.) Removes the event listeners from the currently-tracked element,
1043 + * (For IE <=11) Removes the event listeners from the currently-tracked element,
1044 * if any exists.
1045 */
1046 function stopWatchingForValueChange() {
@@ -1062,16 +1050,21 @@ function stopWatchingForValueChange() {
1050
1051 // delete restores the original property definition
1052 delete activeElement.value;
1065 - activeElement.detachEvent('onpropertychange', handlePropertyChange);
1053 +
1054 + if (activeElement.detachEvent) {
1055 + activeElement.detachEvent('onpropertychange', handlePropertyChange);
1056 + } else {
1057 + activeElement.removeEventListener('propertychange', handlePropertyChange, false);
1058 + }
1059
1060 activeElement = null;
1068 - activeElementID = null;
1061 + activeElementInst = null;
1062 activeElementValue = null;
1063 activeElementValueProp = null;
1064 }
1065
1066 /**
1074 - * (For old IE.) Handles a propertychange event, sending a `change` event if
1067 + * (For IE <=11) Handles a propertychange event, sending a `change` event if
1068 * the value of the active element has changed.
1069 */
1070 function handlePropertyChange(nativeEvent) {
@@ -1090,21 +1083,20 @@ function handlePropertyChange(nativeEvent) {
1083 /**
1084 * If a `change` event should be fired, returns the target's ID.
1085 */
1093 -function getTargetIDForInputEvent(topLevelType, topLevelTarget, topLevelTargetID) {
1086 +function getTargetInstForInputEvent(topLevelType, targetInst) {
1087 if (topLevelType === topLevelTypes.topInput) {
1088 // In modern browsers (i.e., not IE8 or IE9), the input event is exactly
1089 // what we want so fall through here and trigger an abstract event
1097 - return topLevelTargetID;
1090 + return targetInst;
1091 }
1092 }
1093
1101 -// For IE8 and IE9.
1102 -function handleEventsForInputEventIE(topLevelType, topLevelTarget, topLevelTargetID) {
1094 +function handleEventsForInputEventIE(topLevelType, target, targetInst) {
1095 if (topLevelType === topLevelTypes.topFocus) {
1096 // In IE8, we can capture almost all .value changes by adding a
1097 // propertychange handler and looking for events with propertyName
1098 // equal to 'value'
1107 - // In IE9, propertychange fires for most input events but is buggy and
1099 + // In IE9-11, propertychange fires for most input events but is buggy and
1100 // doesn't fire when text is deleted, but conveniently, selectionchange
1101 // appears to fire in all of the remaining cases so we catch those and
1102 // forward the event if the value has changed
@@ -1115,14 +1107,14 @@ function handleEventsForInputEventIE(topLevelType, topLevelTarget, topLevelTarge
1107 // stopWatching() should be a noop here but we call it just in case we
1108 // missed a blur event somehow.
1109 stopWatchingForValueChange();
1118 - startWatchingForValueChange(topLevelTarget, topLevelTargetID);
1110 + startWatchingForValueChange(target, targetInst);
1111 } else if (topLevelType === topLevelTypes.topBlur) {
1112 stopWatchingForValueChange();
1113 }
1114 }
1115
1116 // For IE8 and IE9.
1125 -function getTargetIDForInputEventIE(topLevelType, topLevelTarget, topLevelTargetID) {
1117 +function getTargetInstForInputEventIE(topLevelType, targetInst) {
1118 if (topLevelType === topLevelTypes.topSelectionChange || topLevelType === topLevelTypes.topKeyUp || topLevelType === topLevelTypes.topKeyDown) {
1119 // On the selectionchange event, the target is just document which isn't
1120 // helpful for us so just check activeElement instead.
@@ -1136,7 +1128,7 @@ function getTargetIDForInputEventIE(topLevelType, topLevelTarget, topLevelTarget
1128 // fire selectionchange normally.
1129 if (activeElement && activeElement.value !== activeElementValue) {
1130 activeElementValue = activeElement.value;
1139 - return activeElementID;
1131 + return activeElementInst;
1132 }
1133 }
1134 }
@@ -1151,9 +1143,9 @@ function shouldUseClickEvent(elem) {
1143 return elem.nodeName && elem.nodeName.toLowerCase() === 'input' && (elem.type === 'checkbox' || elem.type === 'radio');
1144 }
1145
1154 -function getTargetIDForClickEvent(topLevelType, topLevelTarget, topLevelTargetID) {
1146 +function getTargetInstForClickEvent(topLevelType, targetInst) {
1147 if (topLevelType === topLevelTypes.topClick) {
1156 - return topLevelTargetID;
1148 + return targetInst;
1149 }
1150 }
1151
@@ -1171,38 +1163,31 @@ var ChangeEventPlugin = {
1163
1164 eventTypes: eventTypes,
1165
1174 - /**
1175 - * @param {string} topLevelType Record from `EventConstants`.
1176 - * @param {DOMEventTarget} topLevelTarget The listening component root node.
1177 - * @param {string} topLevelTargetID ID of `topLevelTarget`.
1178 - * @param {object} nativeEvent Native browser event.
1179 - * @return {*} An accumulation of synthetic events.
1180 - * @see {EventPluginHub.extractEvents}
1181 - */
1182 - extractEvents: function (topLevelType, topLevelTarget, topLevelTargetID, nativeEvent, nativeEventTarget) {
1166 + extractEvents: function (topLevelType, targetInst, nativeEvent, nativeEventTarget) {
1167 + var targetNode = targetInst ? ReactDOMComponentTree.getNodeFromInstance(targetInst) : window;
1168
1184 - var getTargetIDFunc, handleEventFunc;
1185 - if (shouldUseChangeEvent(topLevelTarget)) {
1169 + var getTargetInstFunc, handleEventFunc;
1170 + if (shouldUseChangeEvent(targetNode)) {
1171 if (doesChangeEventBubble) {
1187 - getTargetIDFunc = getTargetIDForChangeEvent;
1172 + getTargetInstFunc = getTargetInstForChangeEvent;
1173 } else {
1174 handleEventFunc = handleEventsForChangeEventIE8;
1175 }
1191 - } else if (isTextInputElement(topLevelTarget)) {
1176 + } else if (isTextInputElement(targetNode)) {
1177 if (isInputEventSupported) {
1193 - getTargetIDFunc = getTargetIDForInputEvent;
1178 + getTargetInstFunc = getTargetInstForInputEvent;
1179 } else {
1195 - getTargetIDFunc = getTargetIDForInputEventIE;
1180 + getTargetInstFunc = getTargetInstForInputEventIE;
1181 handleEventFunc = handleEventsForInputEventIE;
1182 }
1198 - } else if (shouldUseClickEvent(topLevelTarget)) {
1199 - getTargetIDFunc = getTargetIDForClickEvent;
1183 + } else if (shouldUseClickEvent(targetNode)) {
1184 + getTargetInstFunc = getTargetInstForClickEvent;
1185 }
1186
1202 - if (getTargetIDFunc) {
1203 - var targetID = getTargetIDFunc(topLevelType, topLevelTarget, topLevelTargetID);
1204 - if (targetID) {
1205 - var event = SyntheticEvent.getPooled(eventTypes.change, targetID, nativeEvent, nativeEventTarget);
1187 + if (getTargetInstFunc) {
1188 + var inst = getTargetInstFunc(topLevelType, targetInst);
1189 + if (inst) {
1190 + var event = SyntheticEvent.getPooled(eventTypes.change, inst, nativeEvent, nativeEventTarget);
1191 event.type = 'change';
1192 EventPropagators.accumulateTwoPhaseDispatches(event);
1193 return event;
@@ -1210,40 +1195,16 @@ var ChangeEventPlugin = {
1195 }
1196
1197 if (handleEventFunc) {
1213 - handleEventFunc(topLevelType, topLevelTarget, topLevelTargetID);
1198 + handleEventFunc(topLevelType, targetNode, targetInst);
1199 }
1200 }
1201
1202 };
1203
1204 module.exports = ChangeEventPlugin;
1220 -},{"114":114,"119":119,"120":120,"130":130,"148":148,"15":15,"16":16,"19":19,"83":83,"92":92}],8:[function(_dereq_,module,exports){
1221 -/**
1222 - * Copyright 2013-2015, Facebook, Inc.
1223 - * All rights reserved.
1224 - *
1225 - * This source code is licensed under the BSD-style license found in the
1226 - * LICENSE file in the root directory of this source tree. An additional grant
1227 - * of patent rights can be found in the PATENTS file in the same directory.
1228 - *
1229 - * @providesModule ClientReactRootIndex
1230 - * @typechecks
1231 - */
1232 -
1233 -'use strict';
1234 -
1235 -var nextReactRootIndex = 0;
1236 -
1237 -var ClientReactRootIndex = {
1238 - createReactRootIndex: function () {
1239 - return nextReactRootIndex++;
1240 - }
1241 -};
1242 -
1243 -module.exports = ClientReactRootIndex;
1244 -},{}],9:[function(_dereq_,module,exports){
1205 +},{"101":101,"124":124,"131":131,"132":132,"142":142,"15":15,"16":16,"160":160,"19":19,"38":38,"92":92}],7:[function(_dereq_,module,exports){
1206 /**
1246 - * Copyright 2013-2015, Facebook, Inc.
1207 + * Copyright 2013-present, Facebook, Inc.
1208 * All rights reserved.
1209 *
1210 * This source code is licensed under the BSD-style license found in the
@@ -1251,18 +1212,27 @@ module.exports = ClientReactRootIndex;
1212 * of patent rights can be found in the PATENTS file in the same directory.
1213 *
1214 * @providesModule DOMChildrenOperations
1254 - * @typechecks static-only
1215 */
1216
1217 'use strict';
1218
1219 +var DOMLazyTree = _dereq_(8);
1220 var Danger = _dereq_(12);
1260 -var ReactMultiChildUpdateTypes = _dereq_(67);
1261 -var ReactPerf = _dereq_(71);
1221 +var ReactMultiChildUpdateTypes = _dereq_(75);
1222 +var ReactPerf = _dereq_(80);
1223
1263 -var setInnerHTML = _dereq_(124);
1264 -var setTextContent = _dereq_(125);
1265 -var invariant = _dereq_(144);
1224 +var createMicrosoftUnsafeLocalFunction = _dereq_(115);
1225 +var setInnerHTML = _dereq_(136);
1226 +var setTextContent = _dereq_(137);
1227 +
1228 +function getNodeAfter(parentNode, node) {
1229 + // Special case for text components, which return [open, close] comments
1230 + // from getNativeNode.
1231 + if (Array.isArray(node)) {
1232 + node = node[1];
1233 + }
1234 + return node ? node.nextSibling : parentNode.firstChild;
1235 +}
1236
1237 /**
1238 * Inserts `childNode` as a child of `parentNode` at the `index`.
@@ -1272,17 +1242,78 @@ var invariant = _dereq_(144);
1242 * @param {number} index Index at which to insert the child.
1243 * @internal
1244 */
1275 -function insertChildAt(parentNode, childNode, index) {
1276 - // By exploiting arrays returning `undefined` for an undefined index, we can
1277 - // rely exclusively on `insertBefore(node, null)` instead of also using
1278 - // `appendChild(node)`. However, using `undefined` is not allowed by all
1279 - // browsers so we must replace it with `null`.
1245 +var insertChildAt = createMicrosoftUnsafeLocalFunction(function (parentNode, childNode, referenceNode) {
1246 + // We rely exclusively on `insertBefore(node, null)` instead of also using
1247 + // `appendChild(node)`. (Using `undefined` is not allowed by all browsers so
1248 + // we are careful to use `null`.)
1249 + parentNode.insertBefore(childNode, referenceNode);
1250 +});
1251 +
1252 +function insertLazyTreeChildAt(parentNode, childTree, referenceNode) {
1253 + DOMLazyTree.insertTreeBefore(parentNode, childTree, referenceNode);
1254 +}
1255 +
1256 +function moveChild(parentNode, childNode, referenceNode) {
1257 + if (Array.isArray(childNode)) {
1258 + moveDelimitedText(parentNode, childNode[0], childNode[1], referenceNode);
1259 + } else {
1260 + insertChildAt(parentNode, childNode, referenceNode);
1261 + }
1262 +}
1263 +
1264 +function removeChild(parentNode, childNode) {
1265 + if (Array.isArray(childNode)) {
1266 + var closingComment = childNode[1];
1267 + childNode = childNode[0];
1268 + removeDelimitedText(parentNode, childNode, closingComment);
1269 + parentNode.removeChild(closingComment);
1270 + }
1271 + parentNode.removeChild(childNode);
1272 +}
1273
1281 - // fix render order error in safari
1282 - // IE8 will throw error when index out of list size.
1283 - var beforeChild = index >= parentNode.childNodes.length ? null : parentNode.childNodes.item(index);
1274 +function moveDelimitedText(parentNode, openingComment, closingComment, referenceNode) {
1275 + var node = openingComment;
1276 + while (true) {
1277 + var nextNode = node.nextSibling;
1278 + insertChildAt(parentNode, node, referenceNode);
1279 + if (node === closingComment) {
1280 + break;
1281 + }
1282 + node = nextNode;
1283 + }
1284 +}
1285 +
1286 +function removeDelimitedText(parentNode, startNode, closingComment) {
1287 + while (true) {
1288 + var node = startNode.nextSibling;
1289 + if (node === closingComment) {
1290 + // The closing comment is removed by ReactMultiChild.
1291 + break;
1292 + } else {
1293 + parentNode.removeChild(node);
1294 + }
1295 + }
1296 +}
1297
1285 - parentNode.insertBefore(childNode, beforeChild);
1298 +function replaceDelimitedText(openingComment, closingComment, stringText) {
1299 + var parentNode = openingComment.parentNode;
1300 + var nodeAfterComment = openingComment.nextSibling;
1301 + if (nodeAfterComment === closingComment) {
1302 + // There are no text nodes between the opening and closing comments; insert
1303 + // a new one if stringText isn't empty.
1304 + if (stringText) {
1305 + insertChildAt(parentNode, document.createTextNode(stringText), nodeAfterComment);
1306 + }
1307 + } else {
1308 + if (stringText) {
1309 + // Set the text content of the first node after the opening comment, and
1310 + // remove all following nodes up until the closing comment.
1311 + setTextContent(nodeAfterComment, stringText);
1312 + removeDelimitedText(parentNode, nodeAfterComment, closingComment);
1313 + } else {
1314 + removeDelimitedText(parentNode, openingComment, closingComment);
1315 + }
1316 + }
1317 }
1318
1319 /**
@@ -1292,73 +1323,33 @@ var DOMChildrenOperations = {
1323
1324 dangerouslyReplaceNodeWithMarkup: Danger.dangerouslyReplaceNodeWithMarkup,
1325
1295 - updateTextContent: setTextContent,
1326 + replaceDelimitedText: replaceDelimitedText,
1327
1328 /**
1329 * Updates a component's children by processing a series of updates. The
1330 * update configurations are each expected to have a `parentNode` property.
1331 *
1332 * @param {array<object>} updates List of update configurations.
1302 - * @param {array<string>} markupList List of markup strings.
1333 * @internal
1334 */
1305 - processUpdates: function (updates, markupList) {
1306 - var update;
1307 - // Mapping from parent IDs to initial child orderings.
1308 - var initialChildren = null;
1309 - // List of children that will be moved or removed.
1310 - var updatedChildren = null;
1311 -
1312 - for (var i = 0; i < updates.length; i++) {
1313 - update = updates[i];
1314 - if (update.type === ReactMultiChildUpdateTypes.MOVE_EXISTING || update.type === ReactMultiChildUpdateTypes.REMOVE_NODE) {
1315 - var updatedIndex = update.fromIndex;
1316 - var updatedChild = update.parentNode.childNodes[updatedIndex];
1317 - var parentID = update.parentID;
1318 -
1319 - !updatedChild ? "development" !== 'production' ? invariant(false, 'processUpdates(): Unable to find child %s of element. This ' + 'probably means the DOM was unexpectedly mutated (e.g., by the ' + 'browser), usually due to forgetting a <tbody> when using tables, ' + 'nesting tags like <form>, <p>, or <a>, or using non-SVG elements ' + 'in an <svg> parent. Try inspecting the child nodes of the element ' + 'with React ID `%s`.', updatedIndex, parentID) : invariant(false) : undefined;
1320 -
1321 - initialChildren = initialChildren || {};
1322 - initialChildren[parentID] = initialChildren[parentID] || [];
1323 - initialChildren[parentID][updatedIndex] = updatedChild;
1324 -
1325 - updatedChildren = updatedChildren || [];
1326 - updatedChildren.push(updatedChild);
1327 - }
1328 - }
1329 -
1330 - var renderedMarkup;
1331 - // markupList is either a list of markup or just a list of elements
1332 - if (markupList.length && typeof markupList[0] === 'string') {
1333 - renderedMarkup = Danger.dangerouslyRenderMarkup(markupList);
1334 - } else {
1335 - renderedMarkup = markupList;
1336 - }
1337 -
1338 - // Remove updated children first so that `toIndex` is consistent.
1339 - if (updatedChildren) {
1340 - for (var j = 0; j < updatedChildren.length; j++) {
1341 - updatedChildren[j].parentNode.removeChild(updatedChildren[j]);
1342 - }
1343 - }
1344 -
1335 + processUpdates: function (parentNode, updates) {
1336 for (var k = 0; k < updates.length; k++) {
1346 - update = updates[k];
1337 + var update = updates[k];
1338 switch (update.type) {
1339 case ReactMultiChildUpdateTypes.INSERT_MARKUP:
1349 - insertChildAt(update.parentNode, renderedMarkup[update.markupIndex], update.toIndex);
1340 + insertLazyTreeChildAt(parentNode, update.content, getNodeAfter(parentNode, update.afterNode));
1341 break;
1342 case ReactMultiChildUpdateTypes.MOVE_EXISTING:
1352 - insertChildAt(update.parentNode, initialChildren[update.parentID][update.fromIndex], update.toIndex);
1343 + moveChild(parentNode, update.fromNode, getNodeAfter(parentNode, update.afterNode));
1344 break;
1345 case ReactMultiChildUpdateTypes.SET_MARKUP:
1355 - setInnerHTML(update.parentNode, update.content);
1346 + setInnerHTML(parentNode, update.content);
1347 break;
1348 case ReactMultiChildUpdateTypes.TEXT_CONTENT:
1358 - setTextContent(update.parentNode, update.content);
1349 + setTextContent(parentNode, update.content);
1350 break;
1351 case ReactMultiChildUpdateTypes.REMOVE_NODE:
1361 - // Already removed by the for-loop above.
1352 + removeChild(parentNode, update.fromNode);
1353 break;
1354 }
1355 }
@@ -1367,13 +1358,140 @@ var DOMChildrenOperations = {
1358 };
1359
1360 ReactPerf.measureMethods(DOMChildrenOperations, 'DOMChildrenOperations', {
1370 - updateTextContent: 'updateTextContent'
1361 + replaceDelimitedText: 'replaceDelimitedText'
1362 });
1363
1364 module.exports = DOMChildrenOperations;
1374 -},{"12":12,"124":124,"125":125,"144":144,"67":67,"71":71}],10:[function(_dereq_,module,exports){
1365 +},{"115":115,"12":12,"136":136,"137":137,"75":75,"8":8,"80":80}],8:[function(_dereq_,module,exports){
1366 /**
1376 - * Copyright 2013-2015, Facebook, Inc.
1367 + * Copyright 2015-present, Facebook, Inc.
1368 + * All rights reserved.
1369 + *
1370 + * This source code is licensed under the BSD-style license found in the
1371 + * LICENSE file in the root directory of this source tree. An additional grant
1372 + * of patent rights can be found in the PATENTS file in the same directory.
1373 + *
1374 + * @providesModule DOMLazyTree
1375 + */
1376 +
1377 +'use strict';
1378 +
1379 +var createMicrosoftUnsafeLocalFunction = _dereq_(115);
1380 +var setTextContent = _dereq_(137);
1381 +
1382 +/**
1383 + * In IE (8-11) and Edge, appending nodes with no children is dramatically
1384 + * faster than appending a full subtree, so we essentially queue up the
1385 + * .appendChild calls here and apply them so each node is added to its parent
1386 + * before any children are added.
1387 + *
1388 + * In other browsers, doing so is slower or neutral compared to the other order
1389 + * (in Firefox, twice as slow) so we only do this inversion in IE.
1390 + *
1391 + * See https://github.com/spicyj/innerhtml-vs-createelement-vs-clonenode.
1392 + */
1393 +var enableLazy = typeof document !== 'undefined' && typeof document.documentMode === 'number' || typeof navigator !== 'undefined' && typeof navigator.userAgent === 'string' && /\bEdge\/\d/.test(navigator.userAgent);
1394 +
1395 +function insertTreeChildren(tree) {
1396 + if (!enableLazy) {
1397 + return;
1398 + }
1399 + var node = tree.node;
1400 + var children = tree.children;
1401 + if (children.length) {
1402 + for (var i = 0; i < children.length; i++) {
1403 + insertTreeBefore(node, children[i], null);
1404 + }
1405 + } else if (tree.html != null) {
1406 + node.innerHTML = tree.html;
1407 + } else if (tree.text != null) {
1408 + setTextContent(node, tree.text);
1409 + }
1410 +}
1411 +
1412 +var insertTreeBefore = createMicrosoftUnsafeLocalFunction(function (parentNode, tree, referenceNode) {
1413 + // DocumentFragments aren't actually part of the DOM after insertion so
1414 + // appending children won't update the DOM. We need to ensure the fragment
1415 + // is properly populated first, breaking out of our lazy approach for just
1416 + // this level.
1417 + if (tree.node.nodeType === 11) {
1418 + insertTreeChildren(tree);
1419 + parentNode.insertBefore(tree.node, referenceNode);
1420 + } else {
1421 + parentNode.insertBefore(tree.node, referenceNode);
1422 + insertTreeChildren(tree);
1423 + }
1424 +});
1425 +
1426 +function replaceChildWithTree(oldNode, newTree) {
1427 + oldNode.parentNode.replaceChild(newTree.node, oldNode);
1428 + insertTreeChildren(newTree);
1429 +}
1430 +
1431 +function queueChild(parentTree, childTree) {
1432 + if (enableLazy) {
1433 + parentTree.children.push(childTree);
1434 + } else {
1435 + parentTree.node.appendChild(childTree.node);
1436 + }
1437 +}
1438 +
1439 +function queueHTML(tree, html) {
1440 + if (enableLazy) {
1441 + tree.html = html;
1442 + } else {
1443 + tree.node.innerHTML = html;
1444 + }
1445 +}
1446 +
1447 +function queueText(tree, text) {
1448 + if (enableLazy) {
1449 + tree.text = text;
1450 + } else {
1451 + setTextContent(tree.node, text);
1452 + }
1453 +}
1454 +
1455 +function DOMLazyTree(node) {
1456 + return {
1457 + node: node,
1458 + children: [],
1459 + html: null,
1460 + text: null
1461 + };
1462 +}
1463 +
1464 +DOMLazyTree.insertTreeBefore = insertTreeBefore;
1465 +DOMLazyTree.replaceChildWithTree = replaceChildWithTree;
1466 +DOMLazyTree.queueChild = queueChild;
1467 +DOMLazyTree.queueHTML = queueHTML;
1468 +DOMLazyTree.queueText = queueText;
1469 +
1470 +module.exports = DOMLazyTree;
1471 +},{"115":115,"137":137}],9:[function(_dereq_,module,exports){
1472 +/**
1473 + * Copyright 2013-present, Facebook, Inc.
1474 + * All rights reserved.
1475 + *
1476 + * This source code is licensed under the BSD-style license found in the
1477 + * LICENSE file in the root directory of this source tree. An additional grant
1478 + * of patent rights can be found in the PATENTS file in the same directory.
1479 + *
1480 + * @providesModule DOMNamespaces
1481 + */
1482 +
1483 +'use strict';
1484 +
1485 +var DOMNamespaces = {
1486 + html: 'http://www.w3.org/1999/xhtml',
1487 + mathml: 'http://www.w3.org/1998/Math/MathML',
1488 + svg: 'http://www.w3.org/2000/svg'
1489 +};
1490 +
1491 +module.exports = DOMNamespaces;
1492 +},{}],10:[function(_dereq_,module,exports){
1493 +/**
1494 + * Copyright 2013-present, Facebook, Inc.
1495 * All rights reserved.
1496 *
1497 * This source code is licensed under the BSD-style license found in the
@@ -1381,12 +1499,11 @@ module.exports = DOMChildrenOperations;
1499 * of patent rights can be found in the PATENTS file in the same directory.
1500 *
1501 * @providesModule DOMProperty
1384 - * @typechecks static-only
1502 */
1503
1504 'use strict';
1505
1389 -var invariant = _dereq_(144);
1506 +var invariant = _dereq_(156);
1507
1508 function checkMask(value, bitmask) {
1509 return (value & bitmask) === bitmask;
@@ -1397,13 +1514,12 @@ var DOMPropertyInjection = {
1514 * Mapping from normalized, camelcased property names to a configuration that
1515 * specifies how the associated DOM property should be accessed or rendered.
1516 */
1400 - MUST_USE_ATTRIBUTE: 0x1,
1401 - MUST_USE_PROPERTY: 0x2,
1402 - HAS_SIDE_EFFECTS: 0x4,
1403 - HAS_BOOLEAN_VALUE: 0x8,
1404 - HAS_NUMERIC_VALUE: 0x10,
1405 - HAS_POSITIVE_NUMERIC_VALUE: 0x20 | 0x10,
1406 - HAS_OVERLOADED_BOOLEAN_VALUE: 0x40,
1517 + MUST_USE_PROPERTY: 0x1,
1518 + HAS_SIDE_EFFECTS: 0x2,
1519 + HAS_BOOLEAN_VALUE: 0x4,
1520 + HAS_NUMERIC_VALUE: 0x8,
1521 + HAS_POSITIVE_NUMERIC_VALUE: 0x10 | 0x8,
1522 + HAS_OVERLOADED_BOOLEAN_VALUE: 0x20,
1523
1524 /**
1525 * Inject some specialized knowledge about the DOM. This takes a config object
@@ -1446,7 +1562,7 @@ var DOMPropertyInjection = {
1562 }
1563
1564 for (var propName in Properties) {
1449 - !!DOMProperty.properties.hasOwnProperty(propName) ? "development" !== 'production' ? invariant(false, 'injectDOMPropertyConfig(...): You\'re trying to inject DOM property ' + '\'%s\' which has already been injected. You may be accidentally ' + 'injecting the same DOM property config twice, or you may be ' + 'injecting two configs that have conflicting property names.', propName) : invariant(false) : undefined;
1565 + !!DOMProperty.properties.hasOwnProperty(propName) ? "development" !== 'production' ? invariant(false, 'injectDOMPropertyConfig(...): You\'re trying to inject DOM property ' + '\'%s\' which has already been injected. You may be accidentally ' + 'injecting the same DOM property config twice, or you may be ' + 'injecting two configs that have conflicting property names.', propName) : invariant(false) : void 0;
1566
1567 var lowerCased = propName.toLowerCase();
1568 var propConfig = Properties[propName];
@@ -1457,7 +1573,6 @@ var DOMPropertyInjection = {
1573 propertyName: propName,
1574 mutationMethod: null,
1575
1460 - mustUseAttribute: checkMask(propConfig, Injection.MUST_USE_ATTRIBUTE),
1576 mustUseProperty: checkMask(propConfig, Injection.MUST_USE_PROPERTY),
1577 hasSideEffects: checkMask(propConfig, Injection.HAS_SIDE_EFFECTS),
1578 hasBooleanValue: checkMask(propConfig, Injection.HAS_BOOLEAN_VALUE),
@@ -1466,9 +1581,8 @@ var DOMPropertyInjection = {
1581 hasOverloadedBooleanValue: checkMask(propConfig, Injection.HAS_OVERLOADED_BOOLEAN_VALUE)
1582 };
1583
1469 - !(!propertyInfo.mustUseAttribute || !propertyInfo.mustUseProperty) ? "development" !== 'production' ? invariant(false, 'DOMProperty: Cannot require using both attribute and property: %s', propName) : invariant(false) : undefined;
1470 - !(propertyInfo.mustUseProperty || !propertyInfo.hasSideEffects) ? "development" !== 'production' ? invariant(false, 'DOMProperty: Properties that have side effects must use property: %s', propName) : invariant(false) : undefined;
1471 - !(propertyInfo.hasBooleanValue + propertyInfo.hasNumericValue + propertyInfo.hasOverloadedBooleanValue <= 1) ? "development" !== 'production' ? invariant(false, 'DOMProperty: Value can be one of boolean, overloaded boolean, or ' + 'numeric value, but not a combination: %s', propName) : invariant(false) : undefined;
1584 + !(propertyInfo.mustUseProperty || !propertyInfo.hasSideEffects) ? "development" !== 'production' ? invariant(false, 'DOMProperty: Properties that have side effects must use property: %s', propName) : invariant(false) : void 0;
1585 + !(propertyInfo.hasBooleanValue + propertyInfo.hasNumericValue + propertyInfo.hasOverloadedBooleanValue <= 1) ? "development" !== 'production' ? invariant(false, 'DOMProperty: Value can be one of boolean, overloaded boolean, or ' + 'numeric value, but not a combination: %s', propName) : invariant(false) : void 0;
1586
1587 if ("development" !== 'production') {
1588 DOMProperty.getPossibleStandardName[lowerCased] = propName;
@@ -1498,7 +1612,10 @@ var DOMPropertyInjection = {
1612 }
1613 }
1614 };
1501 -var defaultValueCache = {};
1615 +
1616 +/* eslint-disable max-len */
1617 +var ATTRIBUTE_NAME_START_CHAR = ':A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD';
1618 +/* eslint-enable max-len */
1619
1620 /**
1621 * DOMProperty exports lookup objects that can be used like functions:
@@ -1516,6 +1633,10 @@ var defaultValueCache = {};
1633 var DOMProperty = {
1634
1635 ID_ATTRIBUTE_NAME: 'data-reactid',
1636 + ROOT_ATTRIBUTE_NAME: 'data-reactroot',
1637 +
1638 + ATTRIBUTE_NAME_START_CHAR: ATTRIBUTE_NAME_START_CHAR,
1639 + ATTRIBUTE_NAME_CHAR: ATTRIBUTE_NAME_START_CHAR + '\\-.0-9\\uB7\\u0300-\\u036F\\u203F-\\u2040',
1640
1641 /**
1642 * Map from property "standard name" to an object with info about how to set
@@ -1530,9 +1651,6 @@ var DOMProperty = {
1651 * mutationMethod:
1652 * If non-null, used instead of the property or `setAttribute()` after
1653 * initial render.
1533 - * mustUseAttribute:
1534 - * Whether the property must be accessed and mutated using `*Attribute()`.
1535 - * (This includes anything that fails `<propName> in <element>`.)
1654 * mustUseProperty:
1655 * Whether the property must be accessed and mutated as an object property.
1656 * hasSideEffects:
@@ -1581,34 +1699,13 @@ var DOMProperty = {
1699 return false;
1700 },
1701
1584 - /**
1585 - * Returns the default property value for a DOM property (i.e., not an
1586 - * attribute). Most default values are '' or false, but not all. Worse yet,
1587 - * some (in particular, `type`) vary depending on the type of element.
1588 - *
1589 - * TODO: Is it better to grab all the possible properties when creating an
1590 - * element to avoid having to create the same element twice?
1591 - */
1592 - getDefaultValueForProperty: function (nodeName, prop) {
1593 - var nodeDefaults = defaultValueCache[nodeName];
1594 - var testElement;
1595 - if (!nodeDefaults) {
1596 - defaultValueCache[nodeName] = nodeDefaults = {};
1597 - }
1598 - if (!(prop in nodeDefaults)) {
1599 - testElement = document.createElement(nodeName);
1600 - nodeDefaults[prop] = testElement[prop];
1601 - }
1602 - return nodeDefaults[prop];
1603 - },
1604 -
1702 injection: DOMPropertyInjection
1703 };
1704
1705 module.exports = DOMProperty;
1609 -},{"144":144}],11:[function(_dereq_,module,exports){
1706 +},{"156":156}],11:[function(_dereq_,module,exports){
1707 /**
1611 - * Copyright 2013-2015, Facebook, Inc.
1708 + * Copyright 2013-present, Facebook, Inc.
1709 * All rights reserved.
1710 *
1711 * This source code is licensed under the BSD-style license found in the
@@ -1616,19 +1713,18 @@ module.exports = DOMProperty;
1713 * of patent rights can be found in the PATENTS file in the same directory.
1714 *
1715 * @providesModule DOMPropertyOperations
1619 - * @typechecks static-only
1716 */
1717
1718 'use strict';
1719
1720 var DOMProperty = _dereq_(10);
1625 -var ReactPerf = _dereq_(71);
1721 +var ReactDOMInstrumentation = _dereq_(46);
1722 +var ReactPerf = _dereq_(80);
1723
1627 -var quoteAttributeValueForBrowser = _dereq_(122);
1628 -var warning = _dereq_(155);
1724 +var quoteAttributeValueForBrowser = _dereq_(134);
1725 +var warning = _dereq_(166);
1726
1630 -// Simplified subset
1631 -var VALID_ATTRIBUTE_NAME_REGEX = /^[a-zA-Z_][\w\.\-]*$/;
1727 +var VALID_ATTRIBUTE_NAME_REGEX = new RegExp('^[' + DOMProperty.ATTRIBUTE_NAME_START_CHAR + '][' + DOMProperty.ATTRIBUTE_NAME_CHAR + ']*$');
1728 var illegalAttributeNameCache = {};
1729 var validatedAttributeNameCache = {};
1730
@@ -1644,7 +1740,7 @@ function isAttributeNameSafe(attributeName) {
1740 return true;
1741 }
1742 illegalAttributeNameCache[attributeName] = true;
1647 - "development" !== 'production' ? warning(false, 'Invalid attribute name: `%s`', attributeName) : undefined;
1743 + "development" !== 'production' ? warning(false, 'Invalid attribute name: `%s`', attributeName) : void 0;
1744 return false;
1745 }
1746
@@ -1652,32 +1748,6 @@ function shouldIgnoreValue(propertyInfo, value) {
1748 return value == null || propertyInfo.hasBooleanValue && !value || propertyInfo.hasNumericValue && isNaN(value) || propertyInfo.hasPositiveNumericValue && value < 1 || propertyInfo.hasOverloadedBooleanValue && value === false;
1749 }
1750
1655 -if ("development" !== 'production') {
1656 - var reactProps = {
1657 - children: true,
1658 - dangerouslySetInnerHTML: true,
1659 - key: true,
1660 - ref: true
1661 - };
1662 - var warnedProperties = {};
1663 -
1664 - var warnUnknownProperty = function (name) {
1665 - if (reactProps.hasOwnProperty(name) && reactProps[name] || warnedProperties.hasOwnProperty(name) && warnedProperties[name]) {
1666 - return;
1667 - }
1668 -
1669 - warnedProperties[name] = true;
1670 - var lowerCasedName = name.toLowerCase();
1671 -
1672 - // data-* attributes should be lowercase; suggest the lowercase version
1673 - var standardName = DOMProperty.isCustomAttribute(lowerCasedName) ? lowerCasedName : DOMProperty.getPossibleStandardName.hasOwnProperty(lowerCasedName) ? DOMProperty.getPossibleStandardName[lowerCasedName] : null;
1674 -
1675 - // For now, only warn when we have a suggested correction. This prevents
1676 - // logging too much when using transferPropsTo.
1677 - "development" !== 'production' ? warning(standardName == null, 'Unknown DOM property %s. Did you mean %s?', name, standardName) : undefined;
1678 - };
1679 -}
1680 -
1751 /**
1752 * Operations for dealing with DOM properties.
1753 */
@@ -1697,6 +1767,14 @@ var DOMPropertyOperations = {
1767 node.setAttribute(DOMProperty.ID_ATTRIBUTE_NAME, id);
1768 },
1769
1770 + createMarkupForRoot: function () {
1771 + return DOMProperty.ROOT_ATTRIBUTE_NAME + '=""';
1772 + },
1773 +
1774 + setAttributeForRoot: function (node) {
1775 + node.setAttribute(DOMProperty.ROOT_ATTRIBUTE_NAME, '');
1776 + },
1777 +
1778 /**
1779 * Creates markup for a property.
1780 *
@@ -1705,6 +1783,9 @@ var DOMPropertyOperations = {
1783 * @return {?string} Markup string, or null if the property was invalid.
1784 */
1785 createMarkupForProperty: function (name, value) {
1786 + if ("development" !== 'production') {
1787 + ReactDOMInstrumentation.debugTool.onCreateMarkupForProperty(name, value);
1788 + }
1789 var propertyInfo = DOMProperty.properties.hasOwnProperty(name) ? DOMProperty.properties[name] : null;
1790 if (propertyInfo) {
1791 if (shouldIgnoreValue(propertyInfo, value)) {
@@ -1720,8 +1801,6 @@ var DOMPropertyOperations = {
1801 return '';
1802 }
1803 return name + '=' + quoteAttributeValueForBrowser(value);
1723 - } else if ("development" !== 'production') {
1724 - warnUnknownProperty(name);
1804 }
1805 return null;
1806 },
@@ -1748,6 +1827,9 @@ var DOMPropertyOperations = {
1827 * @param {*} value
1828 */
1829 setValueForProperty: function (node, name, value) {
1830 + if ("development" !== 'production') {
1831 + ReactDOMInstrumentation.debugTool.onSetValueForProperty(node, name, value);
1832 + }
1833 var propertyInfo = DOMProperty.properties.hasOwnProperty(name) ? DOMProperty.properties[name] : null;
1834 if (propertyInfo) {
1835 var mutationMethod = propertyInfo.mutationMethod;
@@ -1755,7 +1837,17 @@ var DOMPropertyOperations = {
1837 mutationMethod(node, value);
1838 } else if (shouldIgnoreValue(propertyInfo, value)) {
1839 this.deleteValueForProperty(node, name);
1758 - } else if (propertyInfo.mustUseAttribute) {
1840 + } else if (propertyInfo.mustUseProperty) {
1841 + var propName = propertyInfo.propertyName;
1842 + // Must explicitly cast values for HAS_SIDE_EFFECTS-properties to the
1843 + // property type before comparing; only `value` does and is string.
1844 + // Must set `value` property if it is not null and not yet set.
1845 + if (!propertyInfo.hasSideEffects || '' + node[propName] !== '' + value || !node.hasAttribute(propertyInfo.attributeName)) {
1846 + // Contrary to `setAttribute`, object properties are properly
1847 + // `toString`ed by IE8/9.
1848 + node[propName] = value;
1849 + }
1850 + } else {
1851 var attributeName = propertyInfo.attributeName;
1852 var namespace = propertyInfo.attributeNamespace;
1853 // `setAttribute` with objects becomes only `[object]` in IE8/9,
@@ -1767,20 +1859,9 @@ var DOMPropertyOperations = {
1859 } else {
1860 node.setAttribute(attributeName, '' + value);
1861 }
1770 - } else {
1771 - var propName = propertyInfo.propertyName;
1772 - // Must explicitly cast values for HAS_SIDE_EFFECTS-properties to the
1773 - // property type before comparing; only `value` does and is string.
1774 - if (!propertyInfo.hasSideEffects || '' + node[propName] !== '' + value) {
1775 - // Contrary to `setAttribute`, object properties are properly
1776 - // `toString`ed by IE8/9.
1777 - node[propName] = value;
1778 - }
1862 }
1863 } else if (DOMProperty.isCustomAttribute(name)) {
1864 DOMPropertyOperations.setValueForAttribute(node, name, value);
1782 - } else if ("development" !== 'production') {
1783 - warnUnknownProperty(name);
1865 }
1866 },
1867
@@ -1802,24 +1883,29 @@ var DOMPropertyOperations = {
1883 * @param {string} name
1884 */
1885 deleteValueForProperty: function (node, name) {
1886 + if ("development" !== 'production') {
1887 + ReactDOMInstrumentation.debugTool.onDeleteValueForProperty(node, name);
1888 + }
1889 var propertyInfo = DOMProperty.properties.hasOwnProperty(name) ? DOMProperty.properties[name] : null;
1890 if (propertyInfo) {
1891 var mutationMethod = propertyInfo.mutationMethod;
1892 if (mutationMethod) {
1893 mutationMethod(node, undefined);
1810 - } else if (propertyInfo.mustUseAttribute) {
1811 - node.removeAttribute(propertyInfo.attributeName);
1812 - } else {
1894 + } else if (propertyInfo.mustUseProperty) {
1895 var propName = propertyInfo.propertyName;
1814 - var defaultValue = DOMProperty.getDefaultValueForProperty(node.nodeName, propName);
1815 - if (!propertyInfo.hasSideEffects || '' + node[propName] !== defaultValue) {
1816 - node[propName] = defaultValue;
1896 + if (propertyInfo.hasBooleanValue) {
1897 + // No HAS_SIDE_EFFECTS logic here, only `value` has it and is string.
1898 + node[propName] = false;
1899 + } else {
1900 + if (!propertyInfo.hasSideEffects || '' + node[propName] !== '') {
1901 + node[propName] = '';
1902 + }
1903 }
1904 + } else {
1905 + node.removeAttribute(propertyInfo.attributeName);
1906 }
1907 } else if (DOMProperty.isCustomAttribute(name)) {
1908 node.removeAttribute(name);
1821 - } else if ("development" !== 'production') {
1822 - warnUnknownProperty(name);
1909 }
1910 }
1911
@@ -1832,9 +1918,9 @@ ReactPerf.measureMethods(DOMPropertyOperations, 'DOMPropertyOperations', {
1918 });
1919
1920 module.exports = DOMPropertyOperations;
1835 -},{"10":10,"122":122,"155":155,"71":71}],12:[function(_dereq_,module,exports){
1921 +},{"10":10,"134":134,"166":166,"46":46,"80":80}],12:[function(_dereq_,module,exports){
1922 /**
1837 - * Copyright 2013-2015, Facebook, Inc.
1923 + * Copyright 2013-present, Facebook, Inc.
1924 * All rights reserved.
1925 *
1926 * This source code is licensed under the BSD-style license found in the
@@ -1842,17 +1928,17 @@ module.exports = DOMPropertyOperations;
1928 * of patent rights can be found in the PATENTS file in the same directory.
1929 *
1930 * @providesModule Danger
1845 - * @typechecks static-only
1931 */
1932
1933 'use strict';
1934
1850 -var ExecutionEnvironment = _dereq_(130);
1935 +var DOMLazyTree = _dereq_(8);
1936 +var ExecutionEnvironment = _dereq_(142);
1937
1852 -var createNodesFromMarkup = _dereq_(135);
1853 -var emptyFunction = _dereq_(136);
1854 -var getMarkupWrap = _dereq_(140);
1855 -var invariant = _dereq_(144);
1938 +var createNodesFromMarkup = _dereq_(147);
1939 +var emptyFunction = _dereq_(148);
1940 +var getMarkupWrap = _dereq_(152);
1941 +var invariant = _dereq_(156);
1942
1943 var OPEN_TAG_NAME_EXP = /^(<[^ \/>]+)/;
1944 var RESULT_INDEX_ATTR = 'data-danger-index';
@@ -1884,12 +1970,12 @@ var Danger = {
1970 * @internal
1971 */
1972 dangerouslyRenderMarkup: function (markupList) {
1887 - !ExecutionEnvironment.canUseDOM ? "development" !== 'production' ? invariant(false, 'dangerouslyRenderMarkup(...): Cannot render markup in a worker ' + 'thread. Make sure `window` and `document` are available globally ' + 'before requiring React when unit testing or use ' + 'ReactDOMServer.renderToString for server rendering.') : invariant(false) : undefined;
1973 + !ExecutionEnvironment.canUseDOM ? "development" !== 'production' ? invariant(false, 'dangerouslyRenderMarkup(...): Cannot render markup in a worker ' + 'thread. Make sure `window` and `document` are available globally ' + 'before requiring React when unit testing or use ' + 'ReactDOMServer.renderToString for server rendering.') : invariant(false) : void 0;
1974 var nodeName;
1975 var markupByNodeName = {};
1976 // Group markup by `nodeName` if a wrap is necessary, else by '*'.
1977 for (var i = 0; i < markupList.length; i++) {
1892 - !markupList[i] ? "development" !== 'production' ? invariant(false, 'dangerouslyRenderMarkup(...): Missing markup.') : invariant(false) : undefined;
1978 + !markupList[i] ? "development" !== 'production' ? invariant(false, 'dangerouslyRenderMarkup(...): Missing markup.') : invariant(false) : void 0;
1979 nodeName = getNodeName(markupList[i]);
1980 nodeName = getMarkupWrap(nodeName) ? nodeName : '*';
1981 markupByNodeName[nodeName] = markupByNodeName[nodeName] || [];
@@ -1931,7 +2017,7 @@ var Danger = {
2017 resultIndex = +renderNode.getAttribute(RESULT_INDEX_ATTR);
2018 renderNode.removeAttribute(RESULT_INDEX_ATTR);
2019
1934 - !!resultList.hasOwnProperty(resultIndex) ? "development" !== 'production' ? invariant(false, 'Danger: Assigning to an already-occupied result index.') : invariant(false) : undefined;
2020 + !!resultList.hasOwnProperty(resultIndex) ? "development" !== 'production' ? invariant(false, 'Danger: Assigning to an already-occupied result index.') : invariant(false) : void 0;
2021
2022 resultList[resultIndex] = renderNode;
2023
@@ -1946,9 +2032,9 @@ var Danger = {
2032
2033 // Although resultList was populated out of order, it should now be a dense
2034 // array.
1949 - !(resultListAssignmentCount === resultList.length) ? "development" !== 'production' ? invariant(false, 'Danger: Did not assign to every index of resultList.') : invariant(false) : undefined;
2035 + !(resultListAssignmentCount === resultList.length) ? "development" !== 'production' ? invariant(false, 'Danger: Did not assign to every index of resultList.') : invariant(false) : void 0;
2036
1951 - !(resultList.length === markupList.length) ? "development" !== 'production' ? invariant(false, 'Danger: Expected markup to render %s nodes, but rendered %s.', markupList.length, resultList.length) : invariant(false) : undefined;
2037 + !(resultList.length === markupList.length) ? "development" !== 'production' ? invariant(false, 'Danger: Expected markup to render %s nodes, but rendered %s.', markupList.length, resultList.length) : invariant(false) : void 0;
2038
2039 return resultList;
2040 },
@@ -1962,25 +2048,24 @@ var Danger = {
2048 * @internal
2049 */
2050 dangerouslyReplaceNodeWithMarkup: function (oldChild, markup) {
1965 - !ExecutionEnvironment.canUseDOM ? "development" !== 'production' ? invariant(false, 'dangerouslyReplaceNodeWithMarkup(...): Cannot render markup in a ' + 'worker thread. Make sure `window` and `document` are available ' + 'globally before requiring React when unit testing or use ' + 'ReactDOMServer.renderToString() for server rendering.') : invariant(false) : undefined;
1966 - !markup ? "development" !== 'production' ? invariant(false, 'dangerouslyReplaceNodeWithMarkup(...): Missing markup.') : invariant(false) : undefined;
1967 - !(oldChild.tagName.toLowerCase() !== 'html') ? "development" !== 'production' ? invariant(false, 'dangerouslyReplaceNodeWithMarkup(...): Cannot replace markup of the ' + '<html> node. This is because browser quirks make this unreliable ' + 'and/or slow. If you want to render to the root you must use ' + 'server rendering. See ReactDOMServer.renderToString().') : invariant(false) : undefined;
2051 + !ExecutionEnvironment.canUseDOM ? "development" !== 'production' ? invariant(false, 'dangerouslyReplaceNodeWithMarkup(...): Cannot render markup in a ' + 'worker thread. Make sure `window` and `document` are available ' + 'globally before requiring React when unit testing or use ' + 'ReactDOMServer.renderToString() for server rendering.') : invariant(false) : void 0;
2052 + !markup ? "development" !== 'production' ? invariant(false, 'dangerouslyReplaceNodeWithMarkup(...): Missing markup.') : invariant(false) : void 0;
2053 + !(oldChild.nodeName !== 'HTML') ? "development" !== 'production' ? invariant(false, 'dangerouslyReplaceNodeWithMarkup(...): Cannot replace markup of the ' + '<html> node. This is because browser quirks make this unreliable ' + 'and/or slow. If you want to render to the root you must use ' + 'server rendering. See ReactDOMServer.renderToString().') : invariant(false) : void 0;
2054
1969 - var newChild;
2055 if (typeof markup === 'string') {
1971 - newChild = createNodesFromMarkup(markup, emptyFunction)[0];
2056 + var newChild = createNodesFromMarkup(markup, emptyFunction)[0];
2057 + oldChild.parentNode.replaceChild(newChild, oldChild);
2058 } else {
1973 - newChild = markup;
2059 + DOMLazyTree.replaceChildWithTree(oldChild, markup);
2060 }
1975 - oldChild.parentNode.replaceChild(newChild, oldChild);
2061 }
2062
2063 };
2064
2065 module.exports = Danger;
1981 -},{"130":130,"135":135,"136":136,"140":140,"144":144}],13:[function(_dereq_,module,exports){
2066 +},{"142":142,"147":147,"148":148,"152":152,"156":156,"8":8}],13:[function(_dereq_,module,exports){
2067 /**
1983 - * Copyright 2013-2015, Facebook, Inc.
2068 + * Copyright 2013-present, Facebook, Inc.
2069 * All rights reserved.
2070 *
2071 * This source code is licensed under the BSD-style license found in the
@@ -1992,7 +2077,7 @@ module.exports = Danger;
2077
2078 'use strict';
2079
1995 -var keyOf = _dereq_(148);
2080 +var keyOf = _dereq_(160);
2081
2082 /**
2083 * Module that is injectable into `EventPluginHub`, that specifies a
@@ -2006,9 +2091,9 @@ var keyOf = _dereq_(148);
2091 var DefaultEventPluginOrder = [keyOf({ ResponderEventPlugin: null }), keyOf({ SimpleEventPlugin: null }), keyOf({ TapEventPlugin: null }), keyOf({ EnterLeaveEventPlugin: null }), keyOf({ ChangeEventPlugin: null }), keyOf({ SelectEventPlugin: null }), keyOf({ BeforeInputEventPlugin: null })];
2092
2093 module.exports = DefaultEventPluginOrder;
2009 -},{"148":148}],14:[function(_dereq_,module,exports){
2094 +},{"160":160}],14:[function(_dereq_,module,exports){
2095 /**
2011 - * Copyright 2013-2015, Facebook, Inc.
2096 + * Copyright 2013-present, Facebook, Inc.
2097 * All rights reserved.
2098 *
2099 * This source code is licensed under the BSD-style license found in the
@@ -2016,20 +2101,18 @@ module.exports = DefaultEventPluginOrder;
2101 * of patent rights can be found in the PATENTS file in the same directory.
2102 *
2103 * @providesModule EnterLeaveEventPlugin
2019 - * @typechecks static-only
2104 */
2105
2106 'use strict';
2107
2108 var EventConstants = _dereq_(15);
2109 var EventPropagators = _dereq_(19);
2026 -var SyntheticMouseEvent = _dereq_(96);
2110 +var ReactDOMComponentTree = _dereq_(38);
2111 +var SyntheticMouseEvent = _dereq_(105);
2112
2028 -var ReactMount = _dereq_(65);
2029 -var keyOf = _dereq_(148);
2113 +var keyOf = _dereq_(160);
2114
2115 var topLevelTypes = EventConstants.topLevelTypes;
2032 -var getFirstReactDOM = ReactMount.getFirstReactDOM;
2116
2117 var eventTypes = {
2118 mouseEnter: {
@@ -2042,8 +2125,6 @@ var eventTypes = {
2125 }
2126 };
2127
2045 -var extractedEvents = [null, null];
2046 -
2128 var EnterLeaveEventPlugin = {
2129
2130 eventTypes: eventTypes,
@@ -2054,15 +2135,8 @@ var EnterLeaveEventPlugin = {
2135 * we do not extract duplicate events. However, moving the mouse into the
2136 * browser from outside will not fire a `mouseout` event. In this case, we use
2137 * the `mouseover` top-level event.
2057 - *
2058 - * @param {string} topLevelType Record from `EventConstants`.
2059 - * @param {DOMEventTarget} topLevelTarget The listening component root node.
2060 - * @param {string} topLevelTargetID ID of `topLevelTarget`.
2061 - * @param {object} nativeEvent Native browser event.
2062 - * @return {*} An accumulation of synthetic events.
2063 - * @see {EventPluginHub.extractEvents}
2138 */
2065 - extractEvents: function (topLevelType, topLevelTarget, topLevelTargetID, nativeEvent, nativeEventTarget) {
2139 + extractEvents: function (topLevelType, targetInst, nativeEvent, nativeEventTarget) {
2140 if (topLevelType === topLevelTypes.topMouseOver && (nativeEvent.relatedTarget || nativeEvent.fromElement)) {
2141 return null;
2142 }
@@ -2072,12 +2146,12 @@ var EnterLeaveEventPlugin = {
2146 }
2147
2148 var win;
2075 - if (topLevelTarget.window === topLevelTarget) {
2076 - // `topLevelTarget` is probably a window object.
2077 - win = topLevelTarget;
2149 + if (nativeEventTarget.window === nativeEventTarget) {
2150 + // `nativeEventTarget` is probably a window object.
2151 + win = nativeEventTarget;
2152 } else {
2153 // TODO: Figure out why `ownerDocument` is sometimes undefined in IE8.
2080 - var doc = topLevelTarget.ownerDocument;
2154 + var doc = nativeEventTarget.ownerDocument;
2155 if (doc) {
2156 win = doc.defaultView || doc.parentWindow;
2157 } else {
@@ -2087,22 +2161,14 @@ var EnterLeaveEventPlugin = {
2161
2162 var from;
2163 var to;
2090 - var fromID = '';
2091 - var toID = '';
2164 if (topLevelType === topLevelTypes.topMouseOut) {
2093 - from = topLevelTarget;
2094 - fromID = topLevelTargetID;
2095 - to = getFirstReactDOM(nativeEvent.relatedTarget || nativeEvent.toElement);
2096 - if (to) {
2097 - toID = ReactMount.getID(to);
2098 - } else {
2099 - to = win;
2100 - }
2101 - to = to || win;
2165 + from = targetInst;
2166 + var related = nativeEvent.relatedTarget || nativeEvent.toElement;
2167 + to = related ? ReactDOMComponentTree.getClosestInstanceFromNode(related) : null;
2168 } else {
2103 - from = win;
2104 - to = topLevelTarget;
2105 - toID = topLevelTargetID;
2169 + // Moving to a node from outside the window.
2170 + from = null;
2171 + to = targetInst;
2172 }
2173
2174 if (from === to) {
@@ -2110,30 +2176,30 @@ var EnterLeaveEventPlugin = {
2176 return null;
2177 }
2178
2113 - var leave = SyntheticMouseEvent.getPooled(eventTypes.mouseLeave, fromID, nativeEvent, nativeEventTarget);
2179 + var fromNode = from == null ? win : ReactDOMComponentTree.getNodeFromInstance(from);
2180 + var toNode = to == null ? win : ReactDOMComponentTree.getNodeFromInstance(to);
2181 +
2182 + var leave = SyntheticMouseEvent.getPooled(eventTypes.mouseLeave, from, nativeEvent, nativeEventTarget);
2183 leave.type = 'mouseleave';
2115 - leave.target = from;
2116 - leave.relatedTarget = to;
2184 + leave.target = fromNode;
2185 + leave.relatedTarget = toNode;
2186
2118 - var enter = SyntheticMouseEvent.getPooled(eventTypes.mouseEnter, toID, nativeEvent, nativeEventTarget);
2187 + var enter = SyntheticMouseEvent.getPooled(eventTypes.mouseEnter, to, nativeEvent, nativeEventTarget);
2188 enter.type = 'mouseenter';
2120 - enter.target = to;
2121 - enter.relatedTarget = from;
2122 -
2123 - EventPropagators.accumulateEnterLeaveDispatches(leave, enter, fromID, toID);
2189 + enter.target = toNode;
2190 + enter.relatedTarget = fromNode;
2191
2125 - extractedEvents[0] = leave;
2126 - extractedEvents[1] = enter;
2192 + EventPropagators.accumulateEnterLeaveDispatches(leave, enter, from, to);
2193
2128 - return extractedEvents;
2194 + return [leave, enter];
2195 }
2196
2197 };
2198
2199 module.exports = EnterLeaveEventPlugin;
2134 -},{"148":148,"15":15,"19":19,"65":65,"96":96}],15:[function(_dereq_,module,exports){
2200 +},{"105":105,"15":15,"160":160,"19":19,"38":38}],15:[function(_dereq_,module,exports){
2201 /**
2136 - * Copyright 2013-2015, Facebook, Inc.
2202 + * Copyright 2013-present, Facebook, Inc.
2203 * All rights reserved.
2204 *
2205 * This source code is licensed under the BSD-style license found in the
@@ -2145,7 +2211,7 @@ module.exports = EnterLeaveEventPlugin;
2211
2212 'use strict';
2213
2148 -var keyMirror = _dereq_(147);
2214 +var keyMirror = _dereq_(159);
2215
2216 var PropagationPhases = keyMirror({ bubbled: null, captured: null });
2217
@@ -2154,6 +2220,9 @@ var PropagationPhases = keyMirror({ bubbled: null, captured: null });
2220 */
2221 var topLevelTypes = keyMirror({
2222 topAbort: null,
2223 + topAnimationEnd: null,
2224 + topAnimationIteration: null,
2225 + topAnimationStart: null,
2226 topBlur: null,
2227 topCanPlay: null,
2228 topCanPlayThrough: null,
@@ -2181,6 +2250,7 @@ var topLevelTypes = keyMirror({
2250 topError: null,
2251 topFocus: null,
2252 topInput: null,
2253 + topInvalid: null,
2254 topKeyDown: null,
2255 topKeyPress: null,
2256 topKeyUp: null,
@@ -2213,6 +2283,7 @@ var topLevelTypes = keyMirror({
2283 topTouchEnd: null,
2284 topTouchMove: null,
2285 topTouchStart: null,
2286 + topTransitionEnd: null,
2287 topVolumeChange: null,
2288 topWaiting: null,
2289 topWheel: null
@@ -2224,9 +2295,9 @@ var EventConstants = {
2295 };
2296
2297 module.exports = EventConstants;
2227 -},{"147":147}],16:[function(_dereq_,module,exports){
2298 +},{"159":159}],16:[function(_dereq_,module,exports){
2299 /**
2229 - * Copyright 2013-2015, Facebook, Inc.
2300 + * Copyright 2013-present, Facebook, Inc.
2301 * All rights reserved.
2302 *
2303 * This source code is licensed under the BSD-style license found in the
@@ -2240,12 +2311,11 @@ module.exports = EventConstants;
2311
2312 var EventPluginRegistry = _dereq_(17);
2313 var EventPluginUtils = _dereq_(18);
2243 -var ReactErrorUtils = _dereq_(56);
2314 +var ReactErrorUtils = _dereq_(63);
2315
2245 -var accumulateInto = _dereq_(102);
2246 -var forEachAccumulated = _dereq_(110);
2247 -var invariant = _dereq_(144);
2248 -var warning = _dereq_(155);
2316 +var accumulateInto = _dereq_(112);
2317 +var forEachAccumulated = _dereq_(120);
2318 +var invariant = _dereq_(156);
2319
2320 /**
2321 * Internal store for event listeners
@@ -2281,17 +2351,6 @@ var executeDispatchesAndReleaseTopLevel = function (e) {
2351 return executeDispatchesAndRelease(e, false);
2352 };
2353
2284 -/**
2285 - * - `InstanceHandle`: [required] Module that performs logical traversals of DOM
2286 - * hierarchy given ids of the logical DOM elements involved.
2287 - */
2288 -var InstanceHandle = null;
2289 -
2290 -function validateInstanceHandle() {
2291 - var valid = InstanceHandle && InstanceHandle.traverseTwoPhase && InstanceHandle.traverseEnterLeave;
2292 - "development" !== 'production' ? warning(valid, 'InstanceHandle not injected before use!') : undefined;
2293 -}
2294 -
2354 /**
2355 * This is a unified interface for event plugins to be installed and configured.
2356 *
@@ -2321,30 +2380,6 @@ var EventPluginHub = {
2380 */
2381 injection: {
2382
2324 - /**
2325 - * @param {object} InjectedMount
2326 - * @public
2327 - */
2328 - injectMount: EventPluginUtils.injection.injectMount,
2329 -
2330 - /**
2331 - * @param {object} InjectedInstanceHandle
2332 - * @public
2333 - */
2334 - injectInstanceHandle: function (InjectedInstanceHandle) {
2335 - InstanceHandle = InjectedInstanceHandle;
2336 - if ("development" !== 'production') {
2337 - validateInstanceHandle();
2338 - }
2339 - },
2340 -
2341 - getInstanceHandle: function () {
2342 - if ("development" !== 'production') {
2343 - validateInstanceHandle();
2344 - }
2345 - return InstanceHandle;
2346 - },
2347 -
2383 /**
2384 * @param {array} InjectedEventPluginOrder
2385 * @public
@@ -2358,75 +2393,71 @@ var EventPluginHub = {
2393
2394 },
2395
2361 - eventNameDispatchConfigs: EventPluginRegistry.eventNameDispatchConfigs,
2362 -
2363 - registrationNameModules: EventPluginRegistry.registrationNameModules,
2364 -
2396 /**
2397 * Stores `listener` at `listenerBank[registrationName][id]`. Is idempotent.
2398 *
2368 - * @param {string} id ID of the DOM element.
2399 + * @param {object} inst The instance, which is the source of events.
2400 * @param {string} registrationName Name of listener (e.g. `onClick`).
2370 - * @param {?function} listener The callback to store.
2401 + * @param {function} listener The callback to store.
2402 */
2372 - putListener: function (id, registrationName, listener) {
2373 - !(typeof listener === 'function') ? "development" !== 'production' ? invariant(false, 'Expected %s listener to be a function, instead got type %s', registrationName, typeof listener) : invariant(false) : undefined;
2403 + putListener: function (inst, registrationName, listener) {
2404 + !(typeof listener === 'function') ? "development" !== 'production' ? invariant(false, 'Expected %s listener to be a function, instead got type %s', registrationName, typeof listener) : invariant(false) : void 0;
2405
2406 var bankForRegistrationName = listenerBank[registrationName] || (listenerBank[registrationName] = {});
2376 - bankForRegistrationName[id] = listener;
2407 + bankForRegistrationName[inst._rootNodeID] = listener;
2408
2409 var PluginModule = EventPluginRegistry.registrationNameModules[registrationName];
2410 if (PluginModule && PluginModule.didPutListener) {
2380 - PluginModule.didPutListener(id, registrationName, listener);
2411 + PluginModule.didPutListener(inst, registrationName, listener);
2412 }
2413 },
2414
2415 /**
2385 - * @param {string} id ID of the DOM element.
2416 + * @param {object} inst The instance, which is the source of events.
2417 * @param {string} registrationName Name of listener (e.g. `onClick`).
2418 * @return {?function} The stored callback.
2419 */
2389 - getListener: function (id, registrationName) {
2420 + getListener: function (inst, registrationName) {
2421 var bankForRegistrationName = listenerBank[registrationName];
2391 - return bankForRegistrationName && bankForRegistrationName[id];
2422 + return bankForRegistrationName && bankForRegistrationName[inst._rootNodeID];
2423 },
2424
2425 /**
2426 * Deletes a listener from the registration bank.
2427 *
2397 - * @param {string} id ID of the DOM element.
2428 + * @param {object} inst The instance, which is the source of events.
2429 * @param {string} registrationName Name of listener (e.g. `onClick`).
2430 */
2400 - deleteListener: function (id, registrationName) {
2431 + deleteListener: function (inst, registrationName) {
2432 var PluginModule = EventPluginRegistry.registrationNameModules[registrationName];
2433 if (PluginModule && PluginModule.willDeleteListener) {
2403 - PluginModule.willDeleteListener(id, registrationName);
2434 + PluginModule.willDeleteListener(inst, registrationName);
2435 }
2436
2437 var bankForRegistrationName = listenerBank[registrationName];
2438 // TODO: This should never be null -- when is it?
2439 if (bankForRegistrationName) {
2409 - delete bankForRegistrationName[id];
2440 + delete bankForRegistrationName[inst._rootNodeID];
2441 }
2442 },
2443
2444 /**
2445 * Deletes all listeners for the DOM element with the supplied ID.
2446 *
2416 - * @param {string} id ID of the DOM element.
2447 + * @param {object} inst The instance, which is the source of events.
2448 */
2418 - deleteAllListeners: function (id) {
2449 + deleteAllListeners: function (inst) {
2450 for (var registrationName in listenerBank) {
2420 - if (!listenerBank[registrationName][id]) {
2451 + if (!listenerBank[registrationName][inst._rootNodeID]) {
2452 continue;
2453 }
2454
2455 var PluginModule = EventPluginRegistry.registrationNameModules[registrationName];
2456 if (PluginModule && PluginModule.willDeleteListener) {
2426 - PluginModule.willDeleteListener(id, registrationName);
2457 + PluginModule.willDeleteListener(inst, registrationName);
2458 }
2459
2429 - delete listenerBank[registrationName][id];
2460 + delete listenerBank[registrationName][inst._rootNodeID];
2461 }
2462 },
2463
@@ -2434,21 +2465,17 @@ var EventPluginHub = {
2465 * Allows registered plugins an opportunity to extract events from top-level
2466 * native browser events.
2467 *
2437 - * @param {string} topLevelType Record from `EventConstants`.
2438 - * @param {DOMEventTarget} topLevelTarget The listening component root node.
2439 - * @param {string} topLevelTargetID ID of `topLevelTarget`.
2440 - * @param {object} nativeEvent Native browser event.
2468 * @return {*} An accumulation of synthetic events.
2469 * @internal
2470 */
2444 - extractEvents: function (topLevelType, topLevelTarget, topLevelTargetID, nativeEvent, nativeEventTarget) {
2471 + extractEvents: function (topLevelType, targetInst, nativeEvent, nativeEventTarget) {
2472 var events;
2473 var plugins = EventPluginRegistry.plugins;
2474 for (var i = 0; i < plugins.length; i++) {
2475 // Not every plugin in the ordering may be loaded at runtime.
2476 var possiblePlugin = plugins[i];
2477 if (possiblePlugin) {
2451 - var extractedEvents = possiblePlugin.extractEvents(topLevelType, topLevelTarget, topLevelTargetID, nativeEvent, nativeEventTarget);
2478 + var extractedEvents = possiblePlugin.extractEvents(topLevelType, targetInst, nativeEvent, nativeEventTarget);
2479 if (extractedEvents) {
2480 events = accumulateInto(events, extractedEvents);
2481 }
@@ -2485,7 +2512,7 @@ var EventPluginHub = {
2512 } else {
2513 forEachAccumulated(processingEventQueue, executeDispatchesAndReleaseTopLevel);
2514 }
2488 - !!eventQueue ? "development" !== 'production' ? invariant(false, 'processEventQueue(): Additional events were enqueued while processing ' + 'an event queue. Support for this has not yet been implemented.') : invariant(false) : undefined;
2515 + !!eventQueue ? "development" !== 'production' ? invariant(false, 'processEventQueue(): Additional events were enqueued while processing ' + 'an event queue. Support for this has not yet been implemented.') : invariant(false) : void 0;
2516 // This would be a good time to rethrow if any of the event handlers threw.
2517 ReactErrorUtils.rethrowCaughtError();
2518 },
@@ -2504,9 +2531,9 @@ var EventPluginHub = {
2531 };
2532
2533 module.exports = EventPluginHub;
2507 -},{"102":102,"110":110,"144":144,"155":155,"17":17,"18":18,"56":56}],17:[function(_dereq_,module,exports){
2534 +},{"112":112,"120":120,"156":156,"17":17,"18":18,"63":63}],17:[function(_dereq_,module,exports){
2535 /**
2509 - * Copyright 2013-2015, Facebook, Inc.
2536 + * Copyright 2013-present, Facebook, Inc.
2537 * All rights reserved.
2538 *
2539 * This source code is licensed under the BSD-style license found in the
@@ -2514,12 +2541,11 @@ module.exports = EventPluginHub;
2541 * of patent rights can be found in the PATENTS file in the same directory.
2542 *
2543 * @providesModule EventPluginRegistry
2517 - * @typechecks static-only
2544 */
2545
2546 'use strict';
2547
2522 -var invariant = _dereq_(144);
2548 +var invariant = _dereq_(156);
2549
2550 /**
2551 * Injectable ordering of event plugins.
@@ -2544,15 +2570,15 @@ function recomputePluginOrdering() {
2570 for (var pluginName in namesToPlugins) {
2571 var PluginModule = namesToPlugins[pluginName];
2572 var pluginIndex = EventPluginOrder.indexOf(pluginName);
2547 - !(pluginIndex > -1) ? "development" !== 'production' ? invariant(false, 'EventPluginRegistry: Cannot inject event plugins that do not exist in ' + 'the plugin ordering, `%s`.', pluginName) : invariant(false) : undefined;
2573 + !(pluginIndex > -1) ? "development" !== 'production' ? invariant(false, 'EventPluginRegistry: Cannot inject event plugins that do not exist in ' + 'the plugin ordering, `%s`.', pluginName) : invariant(false) : void 0;
2574 if (EventPluginRegistry.plugins[pluginIndex]) {
2575 continue;
2576 }
2551 - !PluginModule.extractEvents ? "development" !== 'production' ? invariant(false, 'EventPluginRegistry: Event plugins must implement an `extractEvents` ' + 'method, but `%s` does not.', pluginName) : invariant(false) : undefined;
2577 + !PluginModule.extractEvents ? "development" !== 'production' ? invariant(false, 'EventPluginRegistry: Event plugins must implement an `extractEvents` ' + 'method, but `%s` does not.', pluginName) : invariant(false) : void 0;
2578 EventPluginRegistry.plugins[pluginIndex] = PluginModule;
2579 var publishedEvents = PluginModule.eventTypes;
2580 for (var eventName in publishedEvents) {
2555 - !publishEventForPlugin(publishedEvents[eventName], PluginModule, eventName) ? "development" !== 'production' ? invariant(false, 'EventPluginRegistry: Failed to publish event `%s` for plugin `%s`.', eventName, pluginName) : invariant(false) : undefined;
2581 + !publishEventForPlugin(publishedEvents[eventName], PluginModule, eventName) ? "development" !== 'production' ? invariant(false, 'EventPluginRegistry: Failed to publish event `%s` for plugin `%s`.', eventName, pluginName) : invariant(false) : void 0;
2582 }
2583 }
2584 }
@@ -2566,7 +2592,7 @@ function recomputePluginOrdering() {
2592 * @private
2593 */
2594 function publishEventForPlugin(dispatchConfig, PluginModule, eventName) {
2569 - !!EventPluginRegistry.eventNameDispatchConfigs.hasOwnProperty(eventName) ? "development" !== 'production' ? invariant(false, 'EventPluginHub: More than one plugin attempted to publish the same ' + 'event name, `%s`.', eventName) : invariant(false) : undefined;
2595 + !!EventPluginRegistry.eventNameDispatchConfigs.hasOwnProperty(eventName) ? "development" !== 'production' ? invariant(false, 'EventPluginHub: More than one plugin attempted to publish the same ' + 'event name, `%s`.', eventName) : invariant(false) : void 0;
2596 EventPluginRegistry.eventNameDispatchConfigs[eventName] = dispatchConfig;
2597
2598 var phasedRegistrationNames = dispatchConfig.phasedRegistrationNames;
@@ -2594,9 +2620,14 @@ function publishEventForPlugin(dispatchConfig, PluginModule, eventName) {
2620 * @private
2621 */
2622 function publishRegistrationName(registrationName, PluginModule, eventName) {
2597 - !!EventPluginRegistry.registrationNameModules[registrationName] ? "development" !== 'production' ? invariant(false, 'EventPluginHub: More than one plugin attempted to publish the same ' + 'registration name, `%s`.', registrationName) : invariant(false) : undefined;
2623 + !!EventPluginRegistry.registrationNameModules[registrationName] ? "development" !== 'production' ? invariant(false, 'EventPluginHub: More than one plugin attempted to publish the same ' + 'registration name, `%s`.', registrationName) : invariant(false) : void 0;
2624 EventPluginRegistry.registrationNameModules[registrationName] = PluginModule;
2625 EventPluginRegistry.registrationNameDependencies[registrationName] = PluginModule.eventTypes[eventName].dependencies;
2626 +
2627 + if ("development" !== 'production') {
2628 + var lowerCasedName = registrationName.toLowerCase();
2629 + EventPluginRegistry.possibleRegistrationNames[lowerCasedName] = registrationName;
2630 + }
2631 }
2632
2633 /**
@@ -2626,6 +2657,14 @@ var EventPluginRegistry = {
2657 */
2658 registrationNameDependencies: {},
2659
2660 + /**
2661 + * Mapping from lowercase registration names to the properly cased version,
2662 + * used to warn in the case of missing event handlers. Available
2663 + * only in __DEV__.
2664 + * @type {Object}
2665 + */
2666 + possibleRegistrationNames: "development" !== 'production' ? {} : null,
2667 +
2668 /**
2669 * Injects an ordering of plugins (by plugin name). This allows the ordering
2670 * to be decoupled from injection of the actual plugins so that ordering is
@@ -2636,7 +2675,7 @@ var EventPluginRegistry = {
2675 * @see {EventPluginHub.injection.injectEventPluginOrder}
2676 */
2677 injectEventPluginOrder: function (InjectedEventPluginOrder) {
2639 - !!EventPluginOrder ? "development" !== 'production' ? invariant(false, 'EventPluginRegistry: Cannot inject event plugin ordering more than ' + 'once. You are likely trying to load more than one copy of React.') : invariant(false) : undefined;
2678 + !!EventPluginOrder ? "development" !== 'production' ? invariant(false, 'EventPluginRegistry: Cannot inject event plugin ordering more than ' + 'once. You are likely trying to load more than one copy of React.') : invariant(false) : void 0;
2679 // Clone the ordering so it cannot be dynamically mutated.
2680 EventPluginOrder = Array.prototype.slice.call(InjectedEventPluginOrder);
2681 recomputePluginOrdering();
@@ -2660,7 +2699,7 @@ var EventPluginRegistry = {
2699 }
2700 var PluginModule = injectedNamesToPlugins[pluginName];
2701 if (!namesToPlugins.hasOwnProperty(pluginName) || namesToPlugins[pluginName] !== PluginModule) {
2663 - !!namesToPlugins[pluginName] ? "development" !== 'production' ? invariant(false, 'EventPluginRegistry: Cannot inject two different event plugins ' + 'using the same name, `%s`.', pluginName) : invariant(false) : undefined;
2702 + !!namesToPlugins[pluginName] ? "development" !== 'production' ? invariant(false, 'EventPluginRegistry: Cannot inject two different event plugins ' + 'using the same name, `%s`.', pluginName) : invariant(false) : void 0;
2703 namesToPlugins[pluginName] = PluginModule;
2704 isOrderingDirty = true;
2705 }
@@ -2720,14 +2759,23 @@ var EventPluginRegistry = {
2759 delete registrationNameModules[registrationName];
2760 }
2761 }
2762 +
2763 + if ("development" !== 'production') {
2764 + var possibleRegistrationNames = EventPluginRegistry.possibleRegistrationNames;
2765 + for (var lowerCasedName in possibleRegistrationNames) {
2766 + if (possibleRegistrationNames.hasOwnProperty(lowerCasedName)) {
2767 + delete possibleRegistrationNames[lowerCasedName];
2768 + }
2769 + }
2770 + }
2771 }
2772
2773 };
2774
2775 module.exports = EventPluginRegistry;
2728 -},{"144":144}],18:[function(_dereq_,module,exports){
2776 +},{"156":156}],18:[function(_dereq_,module,exports){
2777 /**
2730 - * Copyright 2013-2015, Facebook, Inc.
2778 + * Copyright 2013-present, Facebook, Inc.
2779 * All rights reserved.
2780 *
2781 * This source code is licensed under the BSD-style license found in the
@@ -2740,25 +2788,32 @@ module.exports = EventPluginRegistry;
2788 'use strict';
2789
2790 var EventConstants = _dereq_(15);
2743 -var ReactErrorUtils = _dereq_(56);
2791 +var ReactErrorUtils = _dereq_(63);
2792
2745 -var invariant = _dereq_(144);
2746 -var warning = _dereq_(155);
2793 +var invariant = _dereq_(156);
2794 +var warning = _dereq_(166);
2795
2796 /**
2797 * Injected dependencies:
2798 */
2799
2800 /**
2753 - * - `Mount`: [required] Module that can convert between React dom IDs and
2754 - * actual node references.
2801 + * - `ComponentTree`: [required] Module that can convert between React instances
2802 + * and actual node references.
2803 */
2804 +var ComponentTree;
2805 +var TreeTraversal;
2806 var injection = {
2757 - Mount: null,
2758 - injectMount: function (InjectedMount) {
2759 - injection.Mount = InjectedMount;
2807 + injectComponentTree: function (Injected) {
2808 + ComponentTree = Injected;
2809 + if ("development" !== 'production') {
2810 + "development" !== 'production' ? warning(Injected && Injected.getNodeFromInstance && Injected.getInstanceFromNode, 'EventPluginUtils.injection.injectComponentTree(...): Injected ' + 'module is missing getNodeFromInstance or getInstanceFromNode.') : void 0;
2811 + }
2812 + },
2813 + injectTreeTraversal: function (Injected) {
2814 + TreeTraversal = Injected;
2815 if ("development" !== 'production') {
2761 - "development" !== 'production' ? warning(InjectedMount && InjectedMount.getNode && InjectedMount.getID, 'EventPluginUtils.injection.injectMount(...): Injected Mount ' + 'module is missing getNode or getID.') : undefined;
2816 + "development" !== 'production' ? warning(Injected && Injected.isAncestor && Injected.getLowestCommonAncestor, 'EventPluginUtils.injection.injectTreeTraversal(...): Injected ' + 'module is missing isAncestor or getLowestCommonAncestor.') : void 0;
2817 }
2818 }
2819 };
@@ -2780,14 +2835,15 @@ var validateEventDispatches;
2835 if ("development" !== 'production') {
2836 validateEventDispatches = function (event) {
2837 var dispatchListeners = event._dispatchListeners;
2783 - var dispatchIDs = event._dispatchIDs;
2838 + var dispatchInstances = event._dispatchInstances;
2839
2840 var listenersIsArr = Array.isArray(dispatchListeners);
2786 - var idsIsArr = Array.isArray(dispatchIDs);
2787 - var IDsLen = idsIsArr ? dispatchIDs.length : dispatchIDs ? 1 : 0;
2841 var listenersLen = listenersIsArr ? dispatchListeners.length : dispatchListeners ? 1 : 0;
2842
2790 - "development" !== 'production' ? warning(idsIsArr === listenersIsArr && IDsLen === listenersLen, 'EventPluginUtils: Invalid `event`.') : undefined;
2843 + var instancesIsArr = Array.isArray(dispatchInstances);
2844 + var instancesLen = instancesIsArr ? dispatchInstances.length : dispatchInstances ? 1 : 0;
2845 +
2846 + "development" !== 'production' ? warning(instancesIsArr === listenersIsArr && instancesLen === listenersLen, 'EventPluginUtils: Invalid `event`.') : void 0;
2847 };
2848 }
2849
@@ -2796,15 +2852,15 @@ if ("development" !== 'production') {
2852 * @param {SyntheticEvent} event SyntheticEvent to handle
2853 * @param {boolean} simulated If the event is simulated (changes exn behavior)
2854 * @param {function} listener Application-level callback
2799 - * @param {string} domID DOM id to pass to the callback.
2855 + * @param {*} inst Internal component instance
2856 */
2801 -function executeDispatch(event, simulated, listener, domID) {
2857 +function executeDispatch(event, simulated, listener, inst) {
2858 var type = event.type || 'unknown-event';
2803 - event.currentTarget = injection.Mount.getNode(domID);
2859 + event.currentTarget = EventPluginUtils.getNodeFromInstance(inst);
2860 if (simulated) {
2805 - ReactErrorUtils.invokeGuardedCallbackWithCatch(type, listener, event, domID);
2861 + ReactErrorUtils.invokeGuardedCallbackWithCatch(type, listener, event);
2862 } else {
2807 - ReactErrorUtils.invokeGuardedCallback(type, listener, event, domID);
2863 + ReactErrorUtils.invokeGuardedCallback(type, listener, event);
2864 }
2865 event.currentTarget = null;
2866 }
@@ -2814,7 +2870,7 @@ function executeDispatch(event, simulated, listener, domID) {
2870 */
2871 function executeDispatchesInOrder(event, simulated) {
2872 var dispatchListeners = event._dispatchListeners;
2817 - var dispatchIDs = event._dispatchIDs;
2873 + var dispatchInstances = event._dispatchInstances;
2874 if ("development" !== 'production') {
2875 validateEventDispatches(event);
2876 }
@@ -2823,14 +2879,14 @@ function executeDispatchesInOrder(event, simulated) {
2879 if (event.isPropagationStopped()) {
2880 break;
2881 }
2826 - // Listeners and IDs are two parallel arrays that are always in sync.
2827 - executeDispatch(event, simulated, dispatchListeners[i], dispatchIDs[i]);
2882 + // Listeners and Instances are two parallel arrays that are always in sync.
2883 + executeDispatch(event, simulated, dispatchListeners[i], dispatchInstances[i]);
2884 }
2885 } else if (dispatchListeners) {
2830 - executeDispatch(event, simulated, dispatchListeners, dispatchIDs);
2886 + executeDispatch(event, simulated, dispatchListeners, dispatchInstances);
2887 }
2888 event._dispatchListeners = null;
2833 - event._dispatchIDs = null;
2889 + event._dispatchInstances = null;
2890 }
2891
2892 /**
@@ -2842,7 +2898,7 @@ function executeDispatchesInOrder(event, simulated) {
2898 */
2899 function executeDispatchesInOrderStopAtTrueImpl(event) {
2900 var dispatchListeners = event._dispatchListeners;
2845 - var dispatchIDs = event._dispatchIDs;
2901 + var dispatchInstances = event._dispatchInstances;
2902 if ("development" !== 'production') {
2903 validateEventDispatches(event);
2904 }
@@ -2851,14 +2907,14 @@ function executeDispatchesInOrderStopAtTrueImpl(event) {
2907 if (event.isPropagationStopped()) {
2908 break;
2909 }
2854 - // Listeners and IDs are two parallel arrays that are always in sync.
2855 - if (dispatchListeners[i](event, dispatchIDs[i])) {
2856 - return dispatchIDs[i];
2910 + // Listeners and Instances are two parallel arrays that are always in sync.
2911 + if (dispatchListeners[i](event, dispatchInstances[i])) {
2912 + return dispatchInstances[i];
2913 }
2914 }
2915 } else if (dispatchListeners) {
2860 - if (dispatchListeners(event, dispatchIDs)) {
2861 - return dispatchIDs;
2916 + if (dispatchListeners(event, dispatchInstances)) {
2917 + return dispatchInstances;
2918 }
2919 }
2920 return null;
@@ -2869,7 +2925,7 @@ function executeDispatchesInOrderStopAtTrueImpl(event) {
2925 */
2926 function executeDispatchesInOrderStopAtTrue(event) {
2927 var ret = executeDispatchesInOrderStopAtTrueImpl(event);
2872 - event._dispatchIDs = null;
2928 + event._dispatchInstances = null;
2929 event._dispatchListeners = null;
2930 return ret;
2931 }
@@ -2888,11 +2944,13 @@ function executeDirectDispatch(event) {
2944 validateEventDispatches(event);
2945 }
2946 var dispatchListener = event._dispatchListeners;
2891 - var dispatchID = event._dispatchIDs;
2892 - !!Array.isArray(dispatchListener) ? "development" !== 'production' ? invariant(false, 'executeDirectDispatch(...): Invalid `event`.') : invariant(false) : undefined;
2893 - var res = dispatchListener ? dispatchListener(event, dispatchID) : null;
2947 + var dispatchInstance = event._dispatchInstances;
2948 + !!Array.isArray(dispatchListener) ? "development" !== 'production' ? invariant(false, 'executeDirectDispatch(...): Invalid `event`.') : invariant(false) : void 0;
2949 + event.currentTarget = EventPluginUtils.getNodeFromInstance(dispatchInstance);
2950 + var res = dispatchListener ? dispatchListener(event) : null;
2951 + event.currentTarget = null;
2952 event._dispatchListeners = null;
2895 - event._dispatchIDs = null;
2953 + event._dispatchInstances = null;
2954 return res;
2955 }
2956
@@ -2917,20 +2975,35 @@ var EventPluginUtils = {
2975 executeDispatchesInOrderStopAtTrue: executeDispatchesInOrderStopAtTrue,
2976 hasDispatches: hasDispatches,
2977
2920 - getNode: function (id) {
2921 - return injection.Mount.getNode(id);
2978 + getInstanceFromNode: function (node) {
2979 + return ComponentTree.getInstanceFromNode(node);
2980 + },
2981 + getNodeFromInstance: function (node) {
2982 + return ComponentTree.getNodeFromInstance(node);
2983 + },
2984 + isAncestor: function (a, b) {
2985 + return TreeTraversal.isAncestor(a, b);
2986 + },
2987 + getLowestCommonAncestor: function (a, b) {
2988 + return TreeTraversal.getLowestCommonAncestor(a, b);
2989 + },
2990 + getParentInstance: function (inst) {
2991 + return TreeTraversal.getParentInstance(inst);
2992 + },
2993 + traverseTwoPhase: function (target, fn, arg) {
2994 + return TreeTraversal.traverseTwoPhase(target, fn, arg);
2995 },
2923 - getID: function (node) {
2924 - return injection.Mount.getID(node);
2996 + traverseEnterLeave: function (from, to, fn, argFrom, argTo) {
2997 + return TreeTraversal.traverseEnterLeave(from, to, fn, argFrom, argTo);
2998 },
2999
3000 injection: injection
3001 };
3002
3003 module.exports = EventPluginUtils;
2931 -},{"144":144,"15":15,"155":155,"56":56}],19:[function(_dereq_,module,exports){
3004 +},{"15":15,"156":156,"166":166,"63":63}],19:[function(_dereq_,module,exports){
3005 /**
2933 - * Copyright 2013-2015, Facebook, Inc.
3006 + * Copyright 2013-present, Facebook, Inc.
3007 * All rights reserved.
3008 *
3009 * This source code is licensed under the BSD-style license found in the
@@ -2944,11 +3017,11 @@ module.exports = EventPluginUtils;
3017
3018 var EventConstants = _dereq_(15);
3019 var EventPluginHub = _dereq_(16);
3020 +var EventPluginUtils = _dereq_(18);
3021
2948 -var warning = _dereq_(155);
2949 -
2950 -var accumulateInto = _dereq_(102);
2951 -var forEachAccumulated = _dereq_(110);
3022 +var accumulateInto = _dereq_(112);
3023 +var forEachAccumulated = _dereq_(120);
3024 +var warning = _dereq_(166);
3025
3026 var PropagationPhases = EventConstants.PropagationPhases;
3027 var getListener = EventPluginHub.getListener;
@@ -2957,9 +3030,9 @@ var getListener = EventPluginHub.getListener;
3030 * Some event types have a notion of different registration names for different
3031 * "phases" of propagation. This finds listeners by a given phase.
3032 */
2960 -function listenerAtPhase(id, event, propagationPhase) {
3033 +function listenerAtPhase(inst, event, propagationPhase) {
3034 var registrationName = event.dispatchConfig.phasedRegistrationNames[propagationPhase];
2962 - return getListener(id, registrationName);
3035 + return getListener(inst, registrationName);
3036 }
3037
3038 /**
@@ -2968,15 +3041,15 @@ function listenerAtPhase(id, event, propagationPhase) {
3041 * Mutating the event's members allows us to not have to create a wrapping
3042 * "dispatch" object that pairs the event with the listener.
3043 */
2971 -function accumulateDirectionalDispatches(domID, upwards, event) {
3044 +function accumulateDirectionalDispatches(inst, upwards, event) {
3045 if ("development" !== 'production') {
2973 - "development" !== 'production' ? warning(domID, 'Dispatching id must not be null') : undefined;
3046 + "development" !== 'production' ? warning(inst, 'Dispatching inst must not be null') : void 0;
3047 }
3048 var phase = upwards ? PropagationPhases.bubbled : PropagationPhases.captured;
2976 - var listener = listenerAtPhase(domID, event, phase);
3049 + var listener = listenerAtPhase(inst, event, phase);
3050 if (listener) {
3051 event._dispatchListeners = accumulateInto(event._dispatchListeners, listener);
2979 - event._dispatchIDs = accumulateInto(event._dispatchIDs, domID);
3052 + event._dispatchInstances = accumulateInto(event._dispatchInstances, inst);
3053 }
3054 }
3055
@@ -2989,7 +3062,7 @@ function accumulateDirectionalDispatches(domID, upwards, event) {
3062 */
3063 function accumulateTwoPhaseDispatchesSingle(event) {
3064 if (event && event.dispatchConfig.phasedRegistrationNames) {
2992 - EventPluginHub.injection.getInstanceHandle().traverseTwoPhase(event.dispatchMarker, accumulateDirectionalDispatches, event);
3065 + EventPluginUtils.traverseTwoPhase(event._targetInst, accumulateDirectionalDispatches, event);
3066 }
3067 }
3068
@@ -2998,7 +3071,9 @@ function accumulateTwoPhaseDispatchesSingle(event) {
3071 */
3072 function accumulateTwoPhaseDispatchesSingleSkipTarget(event) {
3073 if (event && event.dispatchConfig.phasedRegistrationNames) {
3001 - EventPluginHub.injection.getInstanceHandle().traverseTwoPhaseSkipTarget(event.dispatchMarker, accumulateDirectionalDispatches, event);
3074 + var targetInst = event._targetInst;
3075 + var parentInst = targetInst ? EventPluginUtils.getParentInstance(targetInst) : null;
3076 + EventPluginUtils.traverseTwoPhase(parentInst, accumulateDirectionalDispatches, event);
3077 }
3078 }
3079
@@ -3007,13 +3082,13 @@ function accumulateTwoPhaseDispatchesSingleSkipTarget(event) {
3082 * registration names. Same as `accumulateDirectDispatchesSingle` but without
3083 * requiring that the `dispatchMarker` be the same as the dispatched ID.
3084 */
3010 -function accumulateDispatches(id, ignoredDirection, event) {
3085 +function accumulateDispatches(inst, ignoredDirection, event) {
3086 if (event && event.dispatchConfig.registrationName) {
3087 var registrationName = event.dispatchConfig.registrationName;
3013 - var listener = getListener(id, registrationName);
3088 + var listener = getListener(inst, registrationName);
3089 if (listener) {
3090 event._dispatchListeners = accumulateInto(event._dispatchListeners, listener);
3016 - event._dispatchIDs = accumulateInto(event._dispatchIDs, id);
3091 + event._dispatchInstances = accumulateInto(event._dispatchInstances, inst);
3092 }
3093 }
3094 }
@@ -3025,7 +3100,7 @@ function accumulateDispatches(id, ignoredDirection, event) {
3100 */
3101 function accumulateDirectDispatchesSingle(event) {
3102 if (event && event.dispatchConfig.registrationName) {
3028 - accumulateDispatches(event.dispatchMarker, null, event);
3103 + accumulateDispatches(event._targetInst, null, event);
3104 }
3105 }
3106
@@ -3037,8 +3112,8 @@ function accumulateTwoPhaseDispatchesSkipTarget(events) {
3112 forEachAccumulated(events, accumulateTwoPhaseDispatchesSingleSkipTarget);
3113 }
3114
3040 -function accumulateEnterLeaveDispatches(leave, enter, fromID, toID) {
3041 - EventPluginHub.injection.getInstanceHandle().traverseEnterLeave(fromID, toID, accumulateDispatches, leave, enter);
3115 +function accumulateEnterLeaveDispatches(leave, enter, from, to) {
3116 + EventPluginUtils.traverseEnterLeave(from, to, accumulateDispatches, leave, enter);
3117 }
3118
3119 function accumulateDirectDispatches(events) {
@@ -3064,9 +3139,9 @@ var EventPropagators = {
3139 };
3140
3141 module.exports = EventPropagators;
3067 -},{"102":102,"110":110,"15":15,"155":155,"16":16}],20:[function(_dereq_,module,exports){
3142 +},{"112":112,"120":120,"15":15,"16":16,"166":166,"18":18}],20:[function(_dereq_,module,exports){
3143 /**
3069 - * Copyright 2013-2015, Facebook, Inc.
3144 + * Copyright 2013-present, Facebook, Inc.
3145 * All rights reserved.
3146 *
3147 * This source code is licensed under the BSD-style license found in the
@@ -3074,15 +3149,15 @@ module.exports = EventPropagators;
3149 * of patent rights can be found in the PATENTS file in the same directory.
3150 *
3151 * @providesModule FallbackCompositionState
3077 - * @typechecks static-only
3152 */
3153
3154 'use strict';
3155
3082 -var PooledClass = _dereq_(24);
3156 +var _assign = _dereq_(167);
3157 +
3158 +var PooledClass = _dereq_(23);
3159
3084 -var assign = _dereq_(23);
3085 -var getTextContentAccessor = _dereq_(117);
3160 +var getTextContentAccessor = _dereq_(128);
3161
3162 /**
3163 * This helper class stores information about text content of a target node,
@@ -3101,7 +3176,7 @@ function FallbackCompositionState(root) {
3176 this._fallbackText = null;
3177 }
3178
3104 -assign(FallbackCompositionState.prototype, {
3179 +_assign(FallbackCompositionState.prototype, {
3180 destructor: function () {
3181 this._root = null;
3182 this._startText = null;
@@ -3160,9 +3235,9 @@ assign(FallbackCompositionState.prototype, {
3235 PooledClass.addPoolingTo(FallbackCompositionState);
3236
3237 module.exports = FallbackCompositionState;
3163 -},{"117":117,"23":23,"24":24}],21:[function(_dereq_,module,exports){
3238 +},{"128":128,"167":167,"23":23}],21:[function(_dereq_,module,exports){
3239 /**
3165 - * Copyright 2013-2015, Facebook, Inc.
3240 + * Copyright 2013-present, Facebook, Inc.
3241 * All rights reserved.
3242 *
3243 * This source code is licensed under the BSD-style license found in the
@@ -3175,9 +3250,7 @@ module.exports = FallbackCompositionState;
3250 'use strict';
3251
3252 var DOMProperty = _dereq_(10);
3178 -var ExecutionEnvironment = _dereq_(130);
3253
3180 -var MUST_USE_ATTRIBUTE = DOMProperty.injection.MUST_USE_ATTRIBUTE;
3254 var MUST_USE_PROPERTY = DOMProperty.injection.MUST_USE_PROPERTY;
3255 var HAS_BOOLEAN_VALUE = DOMProperty.injection.HAS_BOOLEAN_VALUE;
3256 var HAS_SIDE_EFFECTS = DOMProperty.injection.HAS_SIDE_EFFECTS;
@@ -3185,188 +3258,182 @@ var HAS_NUMERIC_VALUE = DOMProperty.injection.HAS_NUMERIC_VALUE;
3258 var HAS_POSITIVE_NUMERIC_VALUE = DOMProperty.injection.HAS_POSITIVE_NUMERIC_VALUE;
3259 var HAS_OVERLOADED_BOOLEAN_VALUE = DOMProperty.injection.HAS_OVERLOADED_BOOLEAN_VALUE;
3260
3188 -var hasSVG;
3189 -if (ExecutionEnvironment.canUseDOM) {
3190 - var implementation = document.implementation;
3191 - hasSVG = implementation && implementation.hasFeature && implementation.hasFeature('http://www.w3.org/TR/SVG11/feature#BasicStructure', '1.1');
3192 -}
3193 -
3261 var HTMLDOMPropertyConfig = {
3195 - isCustomAttribute: RegExp.prototype.test.bind(/^(data|aria)-[a-z_][a-z\d_.\-]*$/),
3262 + isCustomAttribute: RegExp.prototype.test.bind(new RegExp('^(data|aria)-[' + DOMProperty.ATTRIBUTE_NAME_CHAR + ']*$')),
3263 Properties: {
3264 /**
3265 * Standard Properties
3266 */
3200 - accept: null,
3201 - acceptCharset: null,
3202 - accessKey: null,
3203 - action: null,
3204 - allowFullScreen: MUST_USE_ATTRIBUTE | HAS_BOOLEAN_VALUE,
3205 - allowTransparency: MUST_USE_ATTRIBUTE,
3206 - alt: null,
3267 + accept: 0,
3268 + acceptCharset: 0,
3269 + accessKey: 0,
3270 + action: 0,
3271 + allowFullScreen: HAS_BOOLEAN_VALUE,
3272 + allowTransparency: 0,
3273 + alt: 0,
3274 async: HAS_BOOLEAN_VALUE,
3208 - autoComplete: null,
3275 + autoComplete: 0,
3276 // autoFocus is polyfilled/normalized by AutoFocusUtils
3277 // autoFocus: HAS_BOOLEAN_VALUE,
3278 autoPlay: HAS_BOOLEAN_VALUE,
3212 - capture: MUST_USE_ATTRIBUTE | HAS_BOOLEAN_VALUE,
3213 - cellPadding: null,
3214 - cellSpacing: null,
3215 - charSet: MUST_USE_ATTRIBUTE,
3216 - challenge: MUST_USE_ATTRIBUTE,
3279 + capture: HAS_BOOLEAN_VALUE,
3280 + cellPadding: 0,
3281 + cellSpacing: 0,
3282 + charSet: 0,
3283 + challenge: 0,
3284 checked: MUST_USE_PROPERTY | HAS_BOOLEAN_VALUE,
3218 - classID: MUST_USE_ATTRIBUTE,
3219 - // To set className on SVG elements, it's necessary to use .setAttribute;
3220 - // this works on HTML elements too in all browsers except IE8. Conveniently,
3221 - // IE8 doesn't support SVG and so we can simply use the attribute in
3222 - // browsers that support SVG and the property in browsers that don't,
3223 - // regardless of whether the element is HTML or SVG.
3224 - className: hasSVG ? MUST_USE_ATTRIBUTE : MUST_USE_PROPERTY,
3225 - cols: MUST_USE_ATTRIBUTE | HAS_POSITIVE_NUMERIC_VALUE,
3226 - colSpan: null,
3227 - content: null,
3228 - contentEditable: null,
3229 - contextMenu: MUST_USE_ATTRIBUTE,
3230 - controls: MUST_USE_PROPERTY | HAS_BOOLEAN_VALUE,
3231 - coords: null,
3232 - crossOrigin: null,
3233 - data: null, // For `<object />` acts as `src`.
3234 - dateTime: MUST_USE_ATTRIBUTE,
3285 + cite: 0,
3286 + classID: 0,
3287 + className: 0,
3288 + cols: HAS_POSITIVE_NUMERIC_VALUE,
3289 + colSpan: 0,
3290 + content: 0,
3291 + contentEditable: 0,
3292 + contextMenu: 0,
3293 + controls: HAS_BOOLEAN_VALUE,
3294 + coords: 0,
3295 + crossOrigin: 0,
3296 + data: 0, // For `<object />` acts as `src`.
3297 + dateTime: 0,
3298 'default': HAS_BOOLEAN_VALUE,
3299 defer: HAS_BOOLEAN_VALUE,
3237 - dir: null,
3238 - disabled: MUST_USE_ATTRIBUTE | HAS_BOOLEAN_VALUE,
3300 + dir: 0,
3301 + disabled: HAS_BOOLEAN_VALUE,
3302 download: HAS_OVERLOADED_BOOLEAN_VALUE,
3240 - draggable: null,
3241 - encType: null,
3242 - form: MUST_USE_ATTRIBUTE,
3243 - formAction: MUST_USE_ATTRIBUTE,
3244 - formEncType: MUST_USE_ATTRIBUTE,
3245 - formMethod: MUST_USE_ATTRIBUTE,
3303 + draggable: 0,
3304 + encType: 0,
3305 + form: 0,
3306 + formAction: 0,
3307 + formEncType: 0,
3308 + formMethod: 0,
3309 formNoValidate: HAS_BOOLEAN_VALUE,
3247 - formTarget: MUST_USE_ATTRIBUTE,
3248 - frameBorder: MUST_USE_ATTRIBUTE,
3249 - headers: null,
3250 - height: MUST_USE_ATTRIBUTE,
3251 - hidden: MUST_USE_ATTRIBUTE | HAS_BOOLEAN_VALUE,
3252 - high: null,
3253 - href: null,
3254 - hrefLang: null,
3255 - htmlFor: null,
3256 - httpEquiv: null,
3257 - icon: null,
3258 - id: MUST_USE_PROPERTY,
3259 - inputMode: MUST_USE_ATTRIBUTE,
3260 - integrity: null,
3261 - is: MUST_USE_ATTRIBUTE,
3262 - keyParams: MUST_USE_ATTRIBUTE,
3263 - keyType: MUST_USE_ATTRIBUTE,
3264 - kind: null,
3265 - label: null,
3266 - lang: null,
3267 - list: MUST_USE_ATTRIBUTE,
3268 - loop: MUST_USE_PROPERTY | HAS_BOOLEAN_VALUE,
3269 - low: null,
3270 - manifest: MUST_USE_ATTRIBUTE,
3271 - marginHeight: null,
3272 - marginWidth: null,
3273 - max: null,
3274 - maxLength: MUST_USE_ATTRIBUTE,
3275 - media: MUST_USE_ATTRIBUTE,
3276 - mediaGroup: null,
3277 - method: null,
3278 - min: null,
3279 - minLength: MUST_USE_ATTRIBUTE,
3310 + formTarget: 0,
3311 + frameBorder: 0,
3312 + headers: 0,
3313 + height: 0,
3314 + hidden: HAS_BOOLEAN_VALUE,
3315 + high: 0,
3316 + href: 0,
3317 + hrefLang: 0,
3318 + htmlFor: 0,
3319 + httpEquiv: 0,
3320 + icon: 0,
3321 + id: 0,
3322 + inputMode: 0,
3323 + integrity: 0,
3324 + is: 0,
3325 + keyParams: 0,
3326 + keyType: 0,
3327 + kind: 0,
3328 + label: 0,
3329 + lang: 0,
3330 + list: 0,
3331 + loop: HAS_BOOLEAN_VALUE,
3332 + low: 0,
3333 + manifest: 0,
3334 + marginHeight: 0,
3335 + marginWidth: 0,
3336 + max: 0,
3337 + maxLength: 0,
3338 + media: 0,
3339 + mediaGroup: 0,
3340 + method: 0,
3341 + min: 0,
3342 + minLength: 0,
3343 + // Caution; `option.selected` is not updated if `select.multiple` is
3344 + // disabled with `removeAttribute`.
3345 multiple: MUST_USE_PROPERTY | HAS_BOOLEAN_VALUE,
3346 muted: MUST_USE_PROPERTY | HAS_BOOLEAN_VALUE,
3282 - name: null,
3283 - nonce: MUST_USE_ATTRIBUTE,
3347 + name: 0,
3348 + nonce: 0,
3349 noValidate: HAS_BOOLEAN_VALUE,
3350 open: HAS_BOOLEAN_VALUE,
3286 - optimum: null,
3287 - pattern: null,
3288 - placeholder: null,
3289 - poster: null,
3290 - preload: null,
3291 - radioGroup: null,
3292 - readOnly: MUST_USE_PROPERTY | HAS_BOOLEAN_VALUE,
3293 - rel: null,
3351 + optimum: 0,
3352 + pattern: 0,
3353 + placeholder: 0,
3354 + poster: 0,
3355 + preload: 0,
3356 + profile: 0,
3357 + radioGroup: 0,
3358 + readOnly: HAS_BOOLEAN_VALUE,
3359 + rel: 0,
3360 required: HAS_BOOLEAN_VALUE,
3361 reversed: HAS_BOOLEAN_VALUE,
3296 - role: MUST_USE_ATTRIBUTE,
3297 - rows: MUST_USE_ATTRIBUTE | HAS_POSITIVE_NUMERIC_VALUE,
3298 - rowSpan: null,
3299 - sandbox: null,
3300 - scope: null,
3362 + role: 0,
3363 + rows: HAS_POSITIVE_NUMERIC_VALUE,
3364 + rowSpan: HAS_NUMERIC_VALUE,
3365 + sandbox: 0,
3366 + scope: 0,
3367 scoped: HAS_BOOLEAN_VALUE,
3302 - scrolling: null,
3303 - seamless: MUST_USE_ATTRIBUTE | HAS_BOOLEAN_VALUE,
3368 + scrolling: 0,
3369 + seamless: HAS_BOOLEAN_VALUE,
3370 selected: MUST_USE_PROPERTY | HAS_BOOLEAN_VALUE,
3305 - shape: null,
3306 - size: MUST_USE_ATTRIBUTE | HAS_POSITIVE_NUMERIC_VALUE,
3307 - sizes: MUST_USE_ATTRIBUTE,
3371 + shape: 0,
3372 + size: HAS_POSITIVE_NUMERIC_VALUE,
3373 + sizes: 0,
3374 span: HAS_POSITIVE_NUMERIC_VALUE,
3309 - spellCheck: null,
3310 - src: null,
3311 - srcDoc: MUST_USE_PROPERTY,
3312 - srcLang: null,
3313 - srcSet: MUST_USE_ATTRIBUTE,
3375 + spellCheck: 0,
3376 + src: 0,
3377 + srcDoc: 0,
3378 + srcLang: 0,
3379 + srcSet: 0,
3380 start: HAS_NUMERIC_VALUE,
3315 - step: null,
3316 - style: null,
3317 - summary: null,
3318 - tabIndex: null,
3319 - target: null,
3320 - title: null,
3321 - type: null,
3322 - useMap: null,
3381 + step: 0,
3382 + style: 0,
3383 + summary: 0,
3384 + tabIndex: 0,
3385 + target: 0,
3386 + title: 0,
3387 + // Setting .type throws on non-<input> tags
3388 + type: 0,
3389 + useMap: 0,
3390 value: MUST_USE_PROPERTY | HAS_SIDE_EFFECTS,
3324 - width: MUST_USE_ATTRIBUTE,
3325 - wmode: MUST_USE_ATTRIBUTE,
3326 - wrap: null,
3391 + width: 0,
3392 + wmode: 0,
3393 + wrap: 0,
3394
3395 /**
3396 * RDFa Properties
3397 */
3331 - about: MUST_USE_ATTRIBUTE,
3332 - datatype: MUST_USE_ATTRIBUTE,
3333 - inlist: MUST_USE_ATTRIBUTE,
3334 - prefix: MUST_USE_ATTRIBUTE,
3398 + about: 0,
3399 + datatype: 0,
3400 + inlist: 0,
3401 + prefix: 0,
3402 // property is also supported for OpenGraph in meta tags.
3336 - property: MUST_USE_ATTRIBUTE,
3337 - resource: MUST_USE_ATTRIBUTE,
3338 - 'typeof': MUST_USE_ATTRIBUTE,
3339 - vocab: MUST_USE_ATTRIBUTE,
3403 + property: 0,
3404 + resource: 0,
3405 + 'typeof': 0,
3406 + vocab: 0,
3407
3408 /**
3409 * Non-standard Properties
3410 */
3411 // autoCapitalize and autoCorrect are supported in Mobile Safari for
3412 // keyboard hints.
3346 - autoCapitalize: MUST_USE_ATTRIBUTE,
3347 - autoCorrect: MUST_USE_ATTRIBUTE,
3413 + autoCapitalize: 0,
3414 + autoCorrect: 0,
3415 // autoSave allows WebKit/Blink to persist values of input fields on page reloads
3349 - autoSave: null,
3416 + autoSave: 0,
3417 // color is for Safari mask-icon link
3351 - color: null,
3418 + color: 0,
3419 // itemProp, itemScope, itemType are for
3420 // Microdata support. See http://schema.org/docs/gs.html
3354 - itemProp: MUST_USE_ATTRIBUTE,
3355 - itemScope: MUST_USE_ATTRIBUTE | HAS_BOOLEAN_VALUE,
3356 - itemType: MUST_USE_ATTRIBUTE,
3421 + itemProp: 0,
3422 + itemScope: HAS_BOOLEAN_VALUE,
3423 + itemType: 0,
3424 // itemID and itemRef are for Microdata support as well but
3358 - // only specified in the the WHATWG spec document. See
3425 + // only specified in the WHATWG spec document. See
3426 // https://html.spec.whatwg.org/multipage/microdata.html#microdata-dom-api
3360 - itemID: MUST_USE_ATTRIBUTE,
3361 - itemRef: MUST_USE_ATTRIBUTE,
3427 + itemID: 0,
3428 + itemRef: 0,
3429 // results show looking glass icon and recent searches on input
3430 // search fields in WebKit/Blink
3364 - results: null,
3431 + results: 0,
3432 // IE-only attribute that specifies security restrictions on an iframe
3433 // as an alternative to the sandbox attribute on IE<10
3367 - security: MUST_USE_ATTRIBUTE,
3434 + security: 0,
3435 // IE-only attribute that controls focus behavior
3369 - unselectable: MUST_USE_ATTRIBUTE
3436 + unselectable: 0
3437 },
3438 DOMAttributeNames: {
3439 acceptCharset: 'accept-charset',
@@ -3374,26 +3441,13 @@ var HTMLDOMPropertyConfig = {
3441 htmlFor: 'for',
3442 httpEquiv: 'http-equiv'
3443 },
3377 - DOMPropertyNames: {
3378 - autoComplete: 'autocomplete',
3379 - autoFocus: 'autofocus',
3380 - autoPlay: 'autoplay',
3381 - autoSave: 'autosave',
3382 - // `encoding` is equivalent to `enctype`, IE8 lacks an `enctype` setter.
3383 - // http://www.w3.org/TR/html5/forms.html#dom-fs-encoding
3384 - encType: 'encoding',
3385 - hrefLang: 'hreflang',
3386 - radioGroup: 'radiogroup',
3387 - spellCheck: 'spellcheck',
3388 - srcDoc: 'srcdoc',
3389 - srcSet: 'srcset'
3390 - }
3444 + DOMPropertyNames: {}
3445 };
3446
3447 module.exports = HTMLDOMPropertyConfig;
3394 -},{"10":10,"130":130}],22:[function(_dereq_,module,exports){
3448 +},{"10":10}],22:[function(_dereq_,module,exports){
3449 /**
3396 - * Copyright 2013-2015, Facebook, Inc.
3450 + * Copyright 2013-present, Facebook, Inc.
3451 * All rights reserved.
3452 *
3453 * This source code is licensed under the BSD-style license found in the
@@ -3401,16 +3455,15 @@ module.exports = HTMLDOMPropertyConfig;
3455 * of patent rights can be found in the PATENTS file in the same directory.
3456 *
3457 * @providesModule LinkedValueUtils
3404 - * @typechecks static-only
3458 */
3459
3460 'use strict';
3461
3409 -var ReactPropTypes = _dereq_(74);
3410 -var ReactPropTypeLocations = _dereq_(73);
3462 +var ReactPropTypes = _dereq_(83);
3463 +var ReactPropTypeLocations = _dereq_(82);
3464
3412 -var invariant = _dereq_(144);
3413 -var warning = _dereq_(155);
3465 +var invariant = _dereq_(156);
3466 +var warning = _dereq_(166);
3467
3468 var hasReadOnlyValue = {
3469 'button': true,
@@ -3423,16 +3476,16 @@ var hasReadOnlyValue = {
3476 };
3477
3478 function _assertSingleLink(inputProps) {
3426 - !(inputProps.checkedLink == null || inputProps.valueLink == null) ? "development" !== 'production' ? invariant(false, 'Cannot provide a checkedLink and a valueLink. If you want to use ' + 'checkedLink, you probably don\'t want to use valueLink and vice versa.') : invariant(false) : undefined;
3479 + !(inputProps.checkedLink == null || inputProps.valueLink == null) ? "development" !== 'production' ? invariant(false, 'Cannot provide a checkedLink and a valueLink. If you want to use ' + 'checkedLink, you probably don\'t want to use valueLink and vice versa.') : invariant(false) : void 0;
3480 }
3481 function _assertValueLink(inputProps) {
3482 _assertSingleLink(inputProps);
3430 - !(inputProps.value == null && inputProps.onChange == null) ? "development" !== 'production' ? invariant(false, 'Cannot provide a valueLink and a value or onChange event. If you want ' + 'to use value or onChange, you probably don\'t want to use valueLink.') : invariant(false) : undefined;
3483 + !(inputProps.value == null && inputProps.onChange == null) ? "development" !== 'production' ? invariant(false, 'Cannot provide a valueLink and a value or onChange event. If you want ' + 'to use value or onChange, you probably don\'t want to use valueLink.') : invariant(false) : void 0;
3484 }
3485
3486 function _assertCheckedLink(inputProps) {
3487 _assertSingleLink(inputProps);
3435 - !(inputProps.checked == null && inputProps.onChange == null) ? "development" !== 'production' ? invariant(false, 'Cannot provide a checkedLink and a checked property or onChange event. ' + 'If you want to use checked or onChange, you probably don\'t want to ' + 'use checkedLink') : invariant(false) : undefined;
3488 + !(inputProps.checked == null && inputProps.onChange == null) ? "development" !== 'production' ? invariant(false, 'Cannot provide a checkedLink and a checked property or onChange event. ' + 'If you want to use checked or onChange, you probably don\'t want to ' + 'use checkedLink') : invariant(false) : void 0;
3489 }
3490
3491 var propTypes = {
@@ -3478,7 +3531,7 @@ var LinkedValueUtils = {
3531 loggedTypeFailures[error.message] = true;
3532
3533 var addendum = getDeclarationErrorAddendum(owner);
3481 - "development" !== 'production' ? warning(false, 'Failed form propType: %s%s', error.message, addendum) : undefined;
3534 + "development" !== 'production' ? warning(false, 'Failed form propType: %s%s', error.message, addendum) : void 0;
3535 }
3536 }
3537 },
@@ -3526,57 +3579,9 @@ var LinkedValueUtils = {
3579 };
3580
3581 module.exports = LinkedValueUtils;
3529 -},{"144":144,"155":155,"73":73,"74":74}],23:[function(_dereq_,module,exports){
3530 -/**
3531 - * Copyright 2014-2015, Facebook, Inc.
3532 - * All rights reserved.
3533 - *
3534 - * This source code is licensed under the BSD-style license found in the
3535 - * LICENSE file in the root directory of this source tree. An additional grant
3536 - * of patent rights can be found in the PATENTS file in the same directory.
3537 - *
3538 - * @providesModule Object.assign
3539 - */
3540 -
3541 -// https://people.mozilla.org/~jorendorff/es6-draft.html#sec-object.assign
3542 -
3543 -'use strict';
3544 -
3545 -function assign(target, sources) {
3546 - if (target == null) {
3547 - throw new TypeError('Object.assign target cannot be null or undefined');
3548 - }
3549 -
3550 - var to = Object(target);
3551 - var hasOwnProperty = Object.prototype.hasOwnProperty;
3552 -
3553 - for (var nextIndex = 1; nextIndex < arguments.length; nextIndex++) {
3554 - var nextSource = arguments[nextIndex];
3555 - if (nextSource == null) {
3556 - continue;
3557 - }
3558 -
3559 - var from = Object(nextSource);
3560 -
3561 - // We don't currently support accessors nor proxies. Therefore this
3562 - // copy cannot throw. If we ever supported this then we must handle
3563 - // exceptions and side-effects. We don't support symbols so they won't
3564 - // be transferred.
3565 -
3566 - for (var key in from) {
3567 - if (hasOwnProperty.call(from, key)) {
3568 - to[key] = from[key];
3569 - }
3570 - }
3571 - }
3572 -
3573 - return to;
3574 -}
3575 -
3576 -module.exports = assign;
3577 -},{}],24:[function(_dereq_,module,exports){
3582 +},{"156":156,"166":166,"82":82,"83":83}],23:[function(_dereq_,module,exports){
3583 /**
3579 - * Copyright 2013-2015, Facebook, Inc.
3584 + * Copyright 2013-present, Facebook, Inc.
3585 * All rights reserved.
3586 *
3587 * This source code is licensed under the BSD-style license found in the
@@ -3588,7 +3593,7 @@ module.exports = assign;
3593
3594 'use strict';
3595
3591 -var invariant = _dereq_(144);
3596 +var invariant = _dereq_(156);
3597
3598 /**
3599 * Static poolers. Several custom versions for each potential number of
@@ -3654,7 +3659,7 @@ var fiveArgumentPooler = function (a1, a2, a3, a4, a5) {
3659
3660 var standardReleaser = function (instance) {
3661 var Klass = this;
3657 - !(instance instanceof Klass) ? "development" !== 'production' ? invariant(false, 'Trying to release an instance into a pool of a different type.') : invariant(false) : undefined;
3662 + !(instance instanceof Klass) ? "development" !== 'production' ? invariant(false, 'Trying to release an instance into a pool of a different type.') : invariant(false) : void 0;
3663 instance.destructor();
3664 if (Klass.instancePool.length < Klass.poolSize) {
3665 Klass.instancePool.push(instance);
@@ -3694,46 +3699,80 @@ var PooledClass = {
3699 };
3700
3701 module.exports = PooledClass;
3697 -},{"144":144}],25:[function(_dereq_,module,exports){
3702 +},{"156":156}],24:[function(_dereq_,module,exports){
3703 /**
3699 - * Copyright 2013-2015, Facebook, Inc.
3704 + * Copyright 2013-present, Facebook, Inc.
3705 * All rights reserved.
3706 *
3707 * This source code is licensed under the BSD-style license found in the
3708 * LICENSE file in the root directory of this source tree. An additional grant
3709 * of patent rights can be found in the PATENTS file in the same directory.
3710 *
3706 - * @providesModule ReactBrowserComponentMixin
3711 + * @providesModule React
3712 */
3713
3714 'use strict';
3715
3711 -var ReactInstanceMap = _dereq_(62);
3716 +var ReactChildren = _dereq_(27);
3717 +var ReactComponent = _dereq_(29);
3718 +var ReactClass = _dereq_(28);
3719 +var ReactDOMFactories = _dereq_(42);
3720 +var ReactElement = _dereq_(60);
3721 +var ReactElementValidator = _dereq_(61);
3722 +var ReactPropTypes = _dereq_(83);
3723 +var ReactVersion = _dereq_(93);
3724 +
3725 +var onlyChild = _dereq_(133);
3726 +
3727 +var createElement = ReactElement.createElement;
3728 +var createFactory = ReactElement.createFactory;
3729 +var cloneElement = ReactElement.cloneElement;
3730
3713 -var findDOMNode = _dereq_(108);
3714 -var warning = _dereq_(155);
3731 +if ("development" !== 'production') {
3732 + createElement = ReactElementValidator.createElement;
3733 + createFactory = ReactElementValidator.createFactory;
3734 + cloneElement = ReactElementValidator.cloneElement;
3735 +}
3736
3716 -var didWarnKey = '_getDOMNodeDidWarn';
3737 +var React = {
3738
3718 -var ReactBrowserComponentMixin = {
3719 - /**
3720 - * Returns the DOM node rendered by this component.
3721 - *
3722 - * @return {DOMElement} The root node of this component.
3723 - * @final
3724 - * @protected
3725 - */
3726 - getDOMNode: function () {
3727 - "development" !== 'production' ? warning(this.constructor[didWarnKey], '%s.getDOMNode(...) is deprecated. Please use ' + 'ReactDOM.findDOMNode(instance) instead.', ReactInstanceMap.get(this).getName() || this.tagName || 'Unknown') : undefined;
3728 - this.constructor[didWarnKey] = true;
3729 - return findDOMNode(this);
3730 - }
3739 + // Modern
3740 +
3741 + Children: {
3742 + map: ReactChildren.map,
3743 + forEach: ReactChildren.forEach,
3744 + count: ReactChildren.count,
3745 + toArray: ReactChildren.toArray,
3746 + only: onlyChild
3747 + },
3748 +
3749 + Component: ReactComponent,
3750 +
3751 + createElement: createElement,
3752 + cloneElement: cloneElement,
3753 + isValidElement: ReactElement.isValidElement,
3754 +
3755 + // Classic
3756 +
3757 + PropTypes: ReactPropTypes,
3758 + createClass: ReactClass.createClass,
3759 + createFactory: createFactory,
3760 + createMixin: function (mixin) {
3761 + // Currently a noop. Will be used to validate and trace mixins.
3762 + return mixin;
3763 + },
3764 +
3765 + // This looks DOM specific but these are actually isomorphic helpers
3766 + // since they are just generating DOM strings.
3767 + DOM: ReactDOMFactories,
3768 +
3769 + version: ReactVersion
3770 };
3771
3733 -module.exports = ReactBrowserComponentMixin;
3734 -},{"108":108,"155":155,"62":62}],26:[function(_dereq_,module,exports){
3772 +module.exports = React;
3773 +},{"133":133,"27":27,"28":28,"29":29,"42":42,"60":60,"61":61,"83":83,"93":93}],25:[function(_dereq_,module,exports){
3774 /**
3736 - * Copyright 2013-2015, Facebook, Inc.
3775 + * Copyright 2013-present, Facebook, Inc.
3776 * All rights reserved.
3777 *
3778 * This source code is licensed under the BSD-style license found in the
@@ -3741,20 +3780,19 @@ module.exports = ReactBrowserComponentMixin;
3780 * of patent rights can be found in the PATENTS file in the same directory.
3781 *
3782 * @providesModule ReactBrowserEventEmitter
3744 - * @typechecks static-only
3783 */
3784
3785 'use strict';
3786
3787 +var _assign = _dereq_(167);
3788 +
3789 var EventConstants = _dereq_(15);
3750 -var EventPluginHub = _dereq_(16);
3790 var EventPluginRegistry = _dereq_(17);
3752 -var ReactEventEmitterMixin = _dereq_(57);
3753 -var ReactPerf = _dereq_(71);
3754 -var ViewportMetrics = _dereq_(101);
3791 +var ReactEventEmitterMixin = _dereq_(64);
3792 +var ViewportMetrics = _dereq_(111);
3793
3756 -var assign = _dereq_(23);
3757 -var isEventSupported = _dereq_(119);
3794 +var getVendorPrefixedEventName = _dereq_(129);
3795 +var isEventSupported = _dereq_(131);
3796
3797 /**
3798 * Summary of `ReactBrowserEventEmitter` event handling:
@@ -3811,6 +3849,7 @@ var isEventSupported = _dereq_(119);
3849 * React Core . General Purpose Event Plugin System
3850 */
3851
3852 +var hasEventPageXY;
3853 var alreadyListeningTo = {};
3854 var isMonitoringScrollValue = false;
3855 var reactTopListenersCounter = 0;
@@ -3820,6 +3859,9 @@ var reactTopListenersCounter = 0;
3859 // events so we don't include them here
3860 var topEventMapping = {
3861 topAbort: 'abort',
3862 + topAnimationEnd: getVendorPrefixedEventName('animationend') || 'animationend',
3863 + topAnimationIteration: getVendorPrefixedEventName('animationiteration') || 'animationiteration',
3864 + topAnimationStart: getVendorPrefixedEventName('animationstart') || 'animationstart',
3865 topBlur: 'blur',
3866 topCanPlay: 'canplay',
3867 topCanPlayThrough: 'canplaythrough',
@@ -3876,6 +3918,7 @@ var topEventMapping = {
3918 topTouchEnd: 'touchend',
3919 topTouchMove: 'touchmove',
3920 topTouchStart: 'touchstart',
3921 + topTransitionEnd: getVendorPrefixedEventName('transitionend') || 'transitionend',
3922 topVolumeChange: 'volumechange',
3923 topWaiting: 'waiting',
3924 topWheel: 'wheel'
@@ -3900,13 +3943,13 @@ function getListeningForDocument(mountAt) {
3943 * `ReactBrowserEventEmitter` is used to attach top-level event listeners. For
3944 * example:
3945 *
3903 - * ReactBrowserEventEmitter.putListener('myID', 'onClick', myFunction);
3946 + * EventPluginHub.putListener('myID', 'onClick', myFunction);
3947 *
3948 * This would allocate a "registration" of `('onClick', myFunction)` on 'myID'.
3949 *
3950 * @internal
3951 */
3909 -var ReactBrowserEventEmitter = assign({}, ReactEventEmitterMixin, {
3952 +var ReactBrowserEventEmitter = _assign({}, ReactEventEmitterMixin, {
3953
3954 /**
3955 * Injectable event backend
@@ -4024,41 +4067,30 @@ var ReactBrowserEventEmitter = assign({}, ReactEventEmitterMixin, {
4067 * Listens to window scroll and resize events. We cache scroll values so that
4068 * application code can access them without triggering reflows.
4069 *
4070 + * ViewportMetrics is only used by SyntheticMouse/TouchEvent and only when
4071 + * pageX/pageY isn't supported (legacy browsers).
4072 + *
4073 * NOTE: Scroll events do not bubble.
4074 *
4075 * @see http://www.quirksmode.org/dom/events/scroll.html
4076 */
4077 ensureScrollValueMonitoring: function () {
4032 - if (!isMonitoringScrollValue) {
4078 + if (hasEventPageXY === undefined) {
4079 + hasEventPageXY = document.createEvent && 'pageX' in document.createEvent('MouseEvent');
4080 + }
4081 + if (!hasEventPageXY && !isMonitoringScrollValue) {
4082 var refresh = ViewportMetrics.refreshScrollValues;
4083 ReactBrowserEventEmitter.ReactEventListener.monitorScrollValue(refresh);
4084 isMonitoringScrollValue = true;
4085 }
4037 - },
4038 -
4039 - eventNameDispatchConfigs: EventPluginHub.eventNameDispatchConfigs,
4040 -
4041 - registrationNameModules: EventPluginHub.registrationNameModules,
4042 -
4043 - putListener: EventPluginHub.putListener,
4044 -
4045 - getListener: EventPluginHub.getListener,
4046 -
4047 - deleteListener: EventPluginHub.deleteListener,
4048 -
4049 - deleteAllListeners: EventPluginHub.deleteAllListeners
4050 -
4051 -});
4086 + }
4087
4053 -ReactPerf.measureMethods(ReactBrowserEventEmitter, 'ReactBrowserEventEmitter', {
4054 - putListener: 'putListener',
4055 - deleteListener: 'deleteListener'
4088 });
4089
4090 module.exports = ReactBrowserEventEmitter;
4059 -},{"101":101,"119":119,"15":15,"16":16,"17":17,"23":23,"57":57,"71":71}],27:[function(_dereq_,module,exports){
4091 +},{"111":111,"129":129,"131":131,"15":15,"167":167,"17":17,"64":64}],26:[function(_dereq_,module,exports){
4092 /**
4061 - * Copyright 2014-2015, Facebook, Inc.
4093 + * Copyright 2014-present, Facebook, Inc.
4094 * All rights reserved.
4095 *
4096 * This source code is licensed under the BSD-style license found in the
@@ -4066,26 +4098,25 @@ module.exports = ReactBrowserEventEmitter;
4098 * of patent rights can be found in the PATENTS file in the same directory.
4099 *
4100 * @providesModule ReactChildReconciler
4069 - * @typechecks static-only
4101 */
4102
4103 'use strict';
4104
4074 -var ReactReconciler = _dereq_(76);
4105 +var ReactReconciler = _dereq_(85);
4106
4076 -var instantiateReactComponent = _dereq_(118);
4077 -var shouldUpdateReactComponent = _dereq_(126);
4078 -var traverseAllChildren = _dereq_(127);
4079 -var warning = _dereq_(155);
4107 +var instantiateReactComponent = _dereq_(130);
4108 +var shouldUpdateReactComponent = _dereq_(138);
4109 +var traverseAllChildren = _dereq_(139);
4110 +var warning = _dereq_(166);
4111
4112 function instantiateChild(childInstances, child, name) {
4113 // We found a component instance.
4114 var keyUnique = childInstances[name] === undefined;
4115 if ("development" !== 'production') {
4085 - "development" !== 'production' ? warning(keyUnique, 'flattenChildren(...): Encountered two children with the same key, ' + '`%s`. Child keys must be unique; when two children share a key, only ' + 'the first child will be used.', name) : undefined;
4116 + "development" !== 'production' ? warning(keyUnique, 'flattenChildren(...): Encountered two children with the same key, ' + '`%s`. Child keys must be unique; when two children share a key, only ' + 'the first child will be used.', name) : void 0;
4117 }
4118 if (child != null && keyUnique) {
4088 - childInstances[name] = instantiateReactComponent(child, null);
4119 + childInstances[name] = instantiateReactComponent(child);
4120 }
4121 }
4122
@@ -4122,21 +4153,22 @@ var ReactChildReconciler = {
4153 * @return {?object} A new set of child instances.
4154 * @internal
4155 */
4125 - updateChildren: function (prevChildren, nextChildren, transaction, context) {
4156 + updateChildren: function (prevChildren, nextChildren, removedNodes, transaction, context) {
4157 // We currently don't have a way to track moves here but if we use iterators
4158 // instead of for..in we can zip the iterators and check if an item has
4159 // moved.
4160 // TODO: If nothing has changed, return the prevChildren object so that we
4161 // can quickly bailout if nothing has changed.
4162 if (!nextChildren && !prevChildren) {
4132 - return null;
4163 + return;
4164 }
4165 var name;
4166 + var prevChild;
4167 for (name in nextChildren) {
4168 if (!nextChildren.hasOwnProperty(name)) {
4169 continue;
4170 }
4139 - var prevChild = prevChildren && prevChildren[name];
4171 + prevChild = prevChildren && prevChildren[name];
4172 var prevElement = prevChild && prevChild._currentElement;
4173 var nextElement = nextChildren[name];
4174 if (prevChild != null && shouldUpdateReactComponent(prevElement, nextElement)) {
@@ -4144,20 +4176,22 @@ var ReactChildReconciler = {
4176 nextChildren[name] = prevChild;
4177 } else {
4178 if (prevChild) {
4147 - ReactReconciler.unmountComponent(prevChild, name);
4179 + removedNodes[name] = ReactReconciler.getNativeNode(prevChild);
4180 + ReactReconciler.unmountComponent(prevChild, false);
4181 }
4182 // The child must be instantiated before it's mounted.
4150 - var nextChildInstance = instantiateReactComponent(nextElement, null);
4183 + var nextChildInstance = instantiateReactComponent(nextElement);
4184 nextChildren[name] = nextChildInstance;
4185 }
4186 }
4187 // Unmount children that are no longer present.
4188 for (name in prevChildren) {
4189 if (prevChildren.hasOwnProperty(name) && !(nextChildren && nextChildren.hasOwnProperty(name))) {
4157 - ReactReconciler.unmountComponent(prevChildren[name]);
4190 + prevChild = prevChildren[name];
4191 + removedNodes[name] = ReactReconciler.getNativeNode(prevChild);
4192 + ReactReconciler.unmountComponent(prevChild, false);
4193 }
4194 }
4160 - return nextChildren;
4195 },
4196
4197 /**
@@ -4167,11 +4201,11 @@ var ReactChildReconciler = {
4201 * @param {?object} renderedChildren Previously initialized set of children.
4202 * @internal
4203 */
4170 - unmountChildren: function (renderedChildren) {
4204 + unmountChildren: function (renderedChildren, safely) {
4205 for (var name in renderedChildren) {
4206 if (renderedChildren.hasOwnProperty(name)) {
4207 var renderedChild = renderedChildren[name];
4174 - ReactReconciler.unmountComponent(renderedChild);
4208 + ReactReconciler.unmountComponent(renderedChild, safely);
4209 }
4210 }
4211 }
@@ -4179,9 +4213,9 @@ var ReactChildReconciler = {
4213 };
4214
4215 module.exports = ReactChildReconciler;
4182 -},{"118":118,"126":126,"127":127,"155":155,"76":76}],28:[function(_dereq_,module,exports){
4216 +},{"130":130,"138":138,"139":139,"166":166,"85":85}],27:[function(_dereq_,module,exports){
4217 /**
4184 - * Copyright 2013-2015, Facebook, Inc.
4218 + * Copyright 2013-present, Facebook, Inc.
4219 * All rights reserved.
4220 *
4221 * This source code is licensed under the BSD-style license found in the
@@ -4193,18 +4227,18 @@ module.exports = ReactChildReconciler;
4227
4228 'use strict';
4229
4196 -var PooledClass = _dereq_(24);
4197 -var ReactElement = _dereq_(52);
4230 +var PooledClass = _dereq_(23);
4231 +var ReactElement = _dereq_(60);
4232
4199 -var emptyFunction = _dereq_(136);
4200 -var traverseAllChildren = _dereq_(127);
4233 +var emptyFunction = _dereq_(148);
4234 +var traverseAllChildren = _dereq_(139);
4235
4236 var twoArgumentPooler = PooledClass.twoArgumentPooler;
4237 var fourArgumentPooler = PooledClass.fourArgumentPooler;
4238
4205 -var userProvidedKeyEscapeRegex = /\/(?!\/)/g;
4239 +var userProvidedKeyEscapeRegex = /\/+/g;
4240 function escapeUserProvidedKey(text) {
4207 - return ('' + text).replace(userProvidedKeyEscapeRegex, '//');
4241 + return ('' + text).replace(userProvidedKeyEscapeRegex, '$&/');
4242 }
4243
4244 /**
@@ -4284,6 +4318,7 @@ function mapSingleChildIntoContext(bookKeeping, child, childKey) {
4318 var func = bookKeeping.func;
4319 var context = bookKeeping.context;
4320
4321 +
4322 var mappedChild = func.call(context, child, bookKeeping.count++);
4323 if (Array.isArray(mappedChild)) {
4324 mapIntoWithKeyPrefixInternal(mappedChild, result, childKey, emptyFunction.thatReturnsArgument);
@@ -4292,7 +4327,7 @@ function mapSingleChildIntoContext(bookKeeping, child, childKey) {
4327 mappedChild = ReactElement.cloneAndReplaceKey(mappedChild,
4328 // Keep both the (mapped) and old keys if they differ, just as
4329 // traverseAllChildren used to do for objects as children
4295 - keyPrefix + (mappedChild !== child ? escapeUserProvidedKey(mappedChild.key || '') + '/' : '') + childKey);
4330 + keyPrefix + (mappedChild.key && (!child || child.key !== mappedChild.key) ? escapeUserProvidedKey(mappedChild.key) + '/' : '') + childKey);
4331 }
4332 result.push(mappedChild);
4333 }
@@ -4362,9 +4397,9 @@ var ReactChildren = {
4397 };
4398
4399 module.exports = ReactChildren;
4365 -},{"127":127,"136":136,"24":24,"52":52}],29:[function(_dereq_,module,exports){
4400 +},{"139":139,"148":148,"23":23,"60":60}],28:[function(_dereq_,module,exports){
4401 /**
4367 - * Copyright 2013-2015, Facebook, Inc.
4402 + * Copyright 2013-present, Facebook, Inc.
4403 * All rights reserved.
4404 *
4405 * This source code is licensed under the BSD-style license found in the
@@ -4376,18 +4411,19 @@ module.exports = ReactChildren;
4411
4412 'use strict';
4413
4379 -var ReactComponent = _dereq_(30);
4380 -var ReactElement = _dereq_(52);
4381 -var ReactPropTypeLocations = _dereq_(73);
4382 -var ReactPropTypeLocationNames = _dereq_(72);
4383 -var ReactNoopUpdateQueue = _dereq_(69);
4414 +var _assign = _dereq_(167);
4415 +
4416 +var ReactComponent = _dereq_(29);
4417 +var ReactElement = _dereq_(60);
4418 +var ReactPropTypeLocations = _dereq_(82);
4419 +var ReactPropTypeLocationNames = _dereq_(81);
4420 +var ReactNoopUpdateQueue = _dereq_(78);
4421
4385 -var assign = _dereq_(23);
4386 -var emptyObject = _dereq_(137);
4387 -var invariant = _dereq_(144);
4388 -var keyMirror = _dereq_(147);
4389 -var keyOf = _dereq_(148);
4390 -var warning = _dereq_(155);
4422 +var emptyObject = _dereq_(149);
4423 +var invariant = _dereq_(156);
4424 +var keyMirror = _dereq_(159);
4425 +var keyOf = _dereq_(160);
4426 +var warning = _dereq_(166);
4427
4428 var MIXINS_KEY = keyOf({ mixins: null });
4429
@@ -4418,14 +4454,6 @@ var SpecPolicy = keyMirror({
4454
4455 var injectedMixins = [];
4456
4421 -var warnedSetProps = false;
4422 -function warnSetProps() {
4423 - if (!warnedSetProps) {
4424 - warnedSetProps = true;
4425 - "development" !== 'production' ? warning(false, 'setProps(...) and replaceProps(...) are deprecated. ' + 'Instead, call render again at the top level.') : undefined;
4426 - }
4427 -}
4428 -
4457 /**
4458 * Composite components are higher-level components that compose other composite
4459 * or native components.
@@ -4695,13 +4723,13 @@ var RESERVED_SPEC_KEYS = {
4723 if ("development" !== 'production') {
4724 validateTypeDef(Constructor, childContextTypes, ReactPropTypeLocations.childContext);
4725 }
4698 - Constructor.childContextTypes = assign({}, Constructor.childContextTypes, childContextTypes);
4726 + Constructor.childContextTypes = _assign({}, Constructor.childContextTypes, childContextTypes);
4727 },
4728 contextTypes: function (Constructor, contextTypes) {
4729 if ("development" !== 'production') {
4730 validateTypeDef(Constructor, contextTypes, ReactPropTypeLocations.context);
4731 }
4704 - Constructor.contextTypes = assign({}, Constructor.contextTypes, contextTypes);
4732 + Constructor.contextTypes = _assign({}, Constructor.contextTypes, contextTypes);
4733 },
4734 /**
4735 * Special case getDefaultProps which should move into statics but requires
@@ -4718,7 +4746,7 @@ var RESERVED_SPEC_KEYS = {
4746 if ("development" !== 'production') {
4747 validateTypeDef(Constructor, propTypes, ReactPropTypeLocations.prop);
4748 }
4721 - Constructor.propTypes = assign({}, Constructor.propTypes, propTypes);
4749 + Constructor.propTypes = _assign({}, Constructor.propTypes, propTypes);
4750 },
4751 statics: function (Constructor, statics) {
4752 mixStaticSpecIntoComponent(Constructor, statics);
@@ -4730,39 +4758,40 @@ function validateTypeDef(Constructor, typeDef, location) {
4758 for (var propName in typeDef) {
4759 if (typeDef.hasOwnProperty(propName)) {
4760 // use a warning instead of an invariant so components
4733 - // don't show up in prod but not in __DEV__
4734 - "development" !== 'production' ? warning(typeof typeDef[propName] === 'function', '%s: %s type `%s` is invalid; it must be a function, usually from ' + 'React.PropTypes.', Constructor.displayName || 'ReactClass', ReactPropTypeLocationNames[location], propName) : undefined;
4761 + // don't show up in prod but only in __DEV__
4762 + "development" !== 'production' ? warning(typeof typeDef[propName] === 'function', '%s: %s type `%s` is invalid; it must be a function, usually from ' + 'React.PropTypes.', Constructor.displayName || 'ReactClass', ReactPropTypeLocationNames[location], propName) : void 0;
4763 }
4764 }
4765 }
4766
4739 -function validateMethodOverride(proto, name) {
4767 +function validateMethodOverride(isAlreadyDefined, name) {
4768 var specPolicy = ReactClassInterface.hasOwnProperty(name) ? ReactClassInterface[name] : null;
4769
4770 // Disallow overriding of base class methods unless explicitly allowed.
4771 if (ReactClassMixin.hasOwnProperty(name)) {
4744 - !(specPolicy === SpecPolicy.OVERRIDE_BASE) ? "development" !== 'production' ? invariant(false, 'ReactClassInterface: You are attempting to override ' + '`%s` from your class specification. Ensure that your method names ' + 'do not overlap with React methods.', name) : invariant(false) : undefined;
4772 + !(specPolicy === SpecPolicy.OVERRIDE_BASE) ? "development" !== 'production' ? invariant(false, 'ReactClassInterface: You are attempting to override ' + '`%s` from your class specification. Ensure that your method names ' + 'do not overlap with React methods.', name) : invariant(false) : void 0;
4773 }
4774
4775 // Disallow defining methods more than once unless explicitly allowed.
4748 - if (proto.hasOwnProperty(name)) {
4749 - !(specPolicy === SpecPolicy.DEFINE_MANY || specPolicy === SpecPolicy.DEFINE_MANY_MERGED) ? "development" !== 'production' ? invariant(false, 'ReactClassInterface: You are attempting to define ' + '`%s` on your component more than once. This conflict may be due ' + 'to a mixin.', name) : invariant(false) : undefined;
4776 + if (isAlreadyDefined) {
4777 + !(specPolicy === SpecPolicy.DEFINE_MANY || specPolicy === SpecPolicy.DEFINE_MANY_MERGED) ? "development" !== 'production' ? invariant(false, 'ReactClassInterface: You are attempting to define ' + '`%s` on your component more than once. This conflict may be due ' + 'to a mixin.', name) : invariant(false) : void 0;
4778 }
4779 }
4780
4781 /**
4782 * Mixin helper which handles policy validation and reserved
4755 - * specification keys when building React classses.
4783 + * specification keys when building React classes.
4784 */
4785 function mixSpecIntoComponent(Constructor, spec) {
4786 if (!spec) {
4787 return;
4788 }
4789
4762 - !(typeof spec !== 'function') ? "development" !== 'production' ? invariant(false, 'ReactClass: You\'re attempting to ' + 'use a component class as a mixin. Instead, just use a regular object.') : invariant(false) : undefined;
4763 - !!ReactElement.isValidElement(spec) ? "development" !== 'production' ? invariant(false, 'ReactClass: You\'re attempting to ' + 'use a component as a mixin. Instead, just use a regular object.') : invariant(false) : undefined;
4790 + !(typeof spec !== 'function') ? "development" !== 'production' ? invariant(false, 'ReactClass: You\'re attempting to ' + 'use a component class or function as a mixin. Instead, just use a ' + 'regular object.') : invariant(false) : void 0;
4791 + !!ReactElement.isValidElement(spec) ? "development" !== 'production' ? invariant(false, 'ReactClass: You\'re attempting to ' + 'use a component as a mixin. Instead, just use a regular object.') : invariant(false) : void 0;
4792
4793 var proto = Constructor.prototype;
4794 + var autoBindPairs = proto.__reactAutoBindPairs;
4795
4796 // By handling mixins before any other properties, we ensure the same
4797 // chaining order is applied to methods with DEFINE_MANY policy, whether
@@ -4782,7 +4811,8 @@ function mixSpecIntoComponent(Constructor, spec) {
4811 }
4812
4813 var property = spec[name];
4785 - validateMethodOverride(proto, name);
4814 + var isAlreadyDefined = proto.hasOwnProperty(name);
4815 + validateMethodOverride(isAlreadyDefined, name);
4816
4817 if (RESERVED_SPEC_KEYS.hasOwnProperty(name)) {
4818 RESERVED_SPEC_KEYS[name](Constructor, property);
@@ -4792,22 +4822,18 @@ function mixSpecIntoComponent(Constructor, spec) {
4822 // 1. Expected ReactClass methods (in the "interface").
4823 // 2. Overridden methods (that were mixed in).
4824 var isReactClassMethod = ReactClassInterface.hasOwnProperty(name);
4795 - var isAlreadyDefined = proto.hasOwnProperty(name);
4825 var isFunction = typeof property === 'function';
4826 var shouldAutoBind = isFunction && !isReactClassMethod && !isAlreadyDefined && spec.autobind !== false;
4827
4828 if (shouldAutoBind) {
4800 - if (!proto.__reactAutoBindMap) {
4801 - proto.__reactAutoBindMap = {};
4802 - }
4803 - proto.__reactAutoBindMap[name] = property;
4829 + autoBindPairs.push(name, property);
4830 proto[name] = property;
4831 } else {
4832 if (isAlreadyDefined) {
4833 var specPolicy = ReactClassInterface[name];
4834
4835 // These cases should already be caught by validateMethodOverride.
4810 - !(isReactClassMethod && (specPolicy === SpecPolicy.DEFINE_MANY_MERGED || specPolicy === SpecPolicy.DEFINE_MANY)) ? "development" !== 'production' ? invariant(false, 'ReactClass: Unexpected spec policy %s for key %s ' + 'when mixing in component specs.', specPolicy, name) : invariant(false) : undefined;
4836 + !(isReactClassMethod && (specPolicy === SpecPolicy.DEFINE_MANY_MERGED || specPolicy === SpecPolicy.DEFINE_MANY)) ? "development" !== 'production' ? invariant(false, 'ReactClass: Unexpected spec policy %s for key %s ' + 'when mixing in component specs.', specPolicy, name) : invariant(false) : void 0;
4837
4838 // For methods which are defined more than once, call the existing
4839 // methods before calling the new property, merging if appropriate.
@@ -4841,11 +4867,11 @@ function mixStaticSpecIntoComponent(Constructor, statics) {
4867 continue;
4868 }
4869
4844 - var isReserved = (name in RESERVED_SPEC_KEYS);
4845 - !!isReserved ? "development" !== 'production' ? invariant(false, 'ReactClass: You are attempting to define a reserved ' + 'property, `%s`, that shouldn\'t be on the "statics" key. Define it ' + 'as an instance property instead; it will still be accessible on the ' + 'constructor.', name) : invariant(false) : undefined;
4870 + var isReserved = name in RESERVED_SPEC_KEYS;
4871 + !!isReserved ? "development" !== 'production' ? invariant(false, 'ReactClass: You are attempting to define a reserved ' + 'property, `%s`, that shouldn\'t be on the "statics" key. Define it ' + 'as an instance property instead; it will still be accessible on the ' + 'constructor.', name) : invariant(false) : void 0;
4872
4847 - var isInherited = (name in Constructor);
4848 - !!isInherited ? "development" !== 'production' ? invariant(false, 'ReactClass: You are attempting to define ' + '`%s` on your component more than once. This conflict may be ' + 'due to a mixin.', name) : invariant(false) : undefined;
4873 + var isInherited = name in Constructor;
4874 + !!isInherited ? "development" !== 'production' ? invariant(false, 'ReactClass: You are attempting to define ' + '`%s` on your component more than once. This conflict may be ' + 'due to a mixin.', name) : invariant(false) : void 0;
4875 Constructor[name] = property;
4876 }
4877 }
@@ -4858,11 +4884,11 @@ function mixStaticSpecIntoComponent(Constructor, statics) {
4884 * @return {object} one after it has been mutated to contain everything in two.
4885 */
4886 function mergeIntoWithNoDuplicateKeys(one, two) {
4861 - !(one && two && typeof one === 'object' && typeof two === 'object') ? "development" !== 'production' ? invariant(false, 'mergeIntoWithNoDuplicateKeys(): Cannot merge non-objects.') : invariant(false) : undefined;
4887 + !(one && two && typeof one === 'object' && typeof two === 'object') ? "development" !== 'production' ? invariant(false, 'mergeIntoWithNoDuplicateKeys(): Cannot merge non-objects.') : invariant(false) : void 0;
4888
4889 for (var key in two) {
4890 if (two.hasOwnProperty(key)) {
4865 - !(one[key] === undefined) ? "development" !== 'production' ? invariant(false, 'mergeIntoWithNoDuplicateKeys(): ' + 'Tried to merge two objects with the same key: `%s`. This conflict ' + 'may be due to a mixin; in particular, this may be caused by two ' + 'getInitialState() or getDefaultProps() methods returning objects ' + 'with clashing keys.', key) : invariant(false) : undefined;
4891 + !(one[key] === undefined) ? "development" !== 'production' ? invariant(false, 'mergeIntoWithNoDuplicateKeys(): ' + 'Tried to merge two objects with the same key: `%s`. This conflict ' + 'may be due to a mixin; in particular, this may be caused by two ' + 'getInitialState() or getDefaultProps() methods returning objects ' + 'with clashing keys.', key) : invariant(false) : void 0;
4892 one[key] = two[key];
4893 }
4894 }
@@ -4923,7 +4949,6 @@ function bindAutoBindMethod(component, method) {
4949 boundMethod.__reactBoundArguments = null;
4950 var componentName = component.constructor.displayName;
4951 var _bind = boundMethod.bind;
4926 - /* eslint-disable block-scoped-var, no-undef */
4952 boundMethod.bind = function (newThis) {
4953 for (var _len = arguments.length, args = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
4954 args[_key - 1] = arguments[_key];
@@ -4933,9 +4958,9 @@ function bindAutoBindMethod(component, method) {
4958 // ignore the value of "this" that the user is trying to use, so
4959 // let's warn.
4960 if (newThis !== component && newThis !== null) {
4936 - "development" !== 'production' ? warning(false, 'bind(): React component methods may only be bound to the ' + 'component instance. See %s', componentName) : undefined;
4961 + "development" !== 'production' ? warning(false, 'bind(): React component methods may only be bound to the ' + 'component instance. See %s', componentName) : void 0;
4962 } else if (!args.length) {
4938 - "development" !== 'production' ? warning(false, 'bind(): You are binding a component method to the component. ' + 'React does this for you automatically in a high-performance ' + 'way, so you can safely remove this call. See %s', componentName) : undefined;
4963 + "development" !== 'production' ? warning(false, 'bind(): You are binding a component method to the component. ' + 'React does this for you automatically in a high-performance ' + 'way, so you can safely remove this call. See %s', componentName) : void 0;
4964 return boundMethod;
4965 }
4966 var reboundMethod = _bind.apply(boundMethod, arguments);
@@ -4943,7 +4968,6 @@ function bindAutoBindMethod(component, method) {
4968 reboundMethod.__reactBoundMethod = method;
4969 reboundMethod.__reactBoundArguments = args;
4970 return reboundMethod;
4946 - /* eslint-enable */
4971 };
4972 }
4973 return boundMethod;
@@ -4955,11 +4979,11 @@ function bindAutoBindMethod(component, method) {
4979 * @param {object} component Component whose method is going to be bound.
4980 */
4981 function bindAutoBindMethods(component) {
4958 - for (var autoBindKey in component.__reactAutoBindMap) {
4959 - if (component.__reactAutoBindMap.hasOwnProperty(autoBindKey)) {
4960 - var method = component.__reactAutoBindMap[autoBindKey];
4961 - component[autoBindKey] = bindAutoBindMethod(component, method);
4962 - }
4982 + var pairs = component.__reactAutoBindPairs;
4983 + for (var i = 0; i < pairs.length; i += 2) {
4984 + var autoBindKey = pairs[i];
4985 + var method = pairs[i + 1];
4986 + component[autoBindKey] = bindAutoBindMethod(component, method);
4987 }
4988 }
4989
@@ -4976,7 +5000,7 @@ var ReactClassMixin = {
5000 replaceState: function (newState, callback) {
5001 this.updater.enqueueReplaceState(this, newState);
5002 if (callback) {
4979 - this.updater.enqueueCallback(this, callback);
5003 + this.updater.enqueueCallback(this, callback, 'replaceState');
5004 }
5005 },
5006
@@ -4988,49 +5012,11 @@ var ReactClassMixin = {
5012 */
5013 isMounted: function () {
5014 return this.updater.isMounted(this);
4991 - },
4992 -
4993 - /**
4994 - * Sets a subset of the props.
4995 - *
4996 - * @param {object} partialProps Subset of the next props.
4997 - * @param {?function} callback Called after props are updated.
4998 - * @final
4999 - * @public
5000 - * @deprecated
5001 - */
5002 - setProps: function (partialProps, callback) {
5003 - if ("development" !== 'production') {
5004 - warnSetProps();
5005 - }
5006 - this.updater.enqueueSetProps(this, partialProps);
5007 - if (callback) {
5008 - this.updater.enqueueCallback(this, callback);
5009 - }
5010 - },
5011 -
5012 - /**
5013 - * Replace all the props.
5014 - *
5015 - * @param {object} newProps Subset of the next props.
5016 - * @param {?function} callback Called after props are updated.
5017 - * @final
5018 - * @public
5019 - * @deprecated
5020 - */
5021 - replaceProps: function (newProps, callback) {
5022 - if ("development" !== 'production') {
5023 - warnSetProps();
5024 - }
5025 - this.updater.enqueueReplaceProps(this, newProps);
5026 - if (callback) {
5027 - this.updater.enqueueCallback(this, callback);
5028 - }
5015 }
5016 };
5017
5018 var ReactClassComponent = function () {};
5033 -assign(ReactClassComponent.prototype, ReactComponent.prototype, ReactClassMixin);
5019 +_assign(ReactClassComponent.prototype, ReactComponent.prototype, ReactClassMixin);
5020
5021 /**
5022 * Module for creating composite components.
@@ -5048,15 +5034,15 @@ var ReactClass = {
5034 */
5035 createClass: function (spec) {
5036 var Constructor = function (props, context, updater) {
5051 - // This constructor is overridden by mocks. The argument is used
5037 + // This constructor gets overridden by mocks. The argument is used
5038 // by mocks to assert on what gets mounted.
5039
5040 if ("development" !== 'production') {
5055 - "development" !== 'production' ? warning(this instanceof Constructor, 'Something is calling a React component directly. Use a factory or ' + 'JSX instead. See: https://fb.me/react-legacyfactory') : undefined;
5041 + "development" !== 'production' ? warning(this instanceof Constructor, 'Something is calling a React component directly. Use a factory or ' + 'JSX instead. See: https://fb.me/react-legacyfactory') : void 0;
5042 }
5043
5044 // Wire up auto-binding
5059 - if (this.__reactAutoBindMap) {
5045 + if (this.__reactAutoBindPairs.length) {
5046 bindAutoBindMethods(this);
5047 }
5048
@@ -5073,18 +5059,19 @@ var ReactClass = {
5059 var initialState = this.getInitialState ? this.getInitialState() : null;
5060 if ("development" !== 'production') {
5061 // We allow auto-mocks to proceed as if they're returning null.
5076 - if (typeof initialState === 'undefined' && this.getInitialState._isMockFunction) {
5062 + if (initialState === undefined && this.getInitialState._isMockFunction) {
5063 // This is probably bad practice. Consider warning here and
5064 // deprecating this convenience.
5065 initialState = null;
5066 }
5067 }
5082 - !(typeof initialState === 'object' && !Array.isArray(initialState)) ? "development" !== 'production' ? invariant(false, '%s.getInitialState(): must return an object or null', Constructor.displayName || 'ReactCompositeComponent') : invariant(false) : undefined;
5068 + !(typeof initialState === 'object' && !Array.isArray(initialState)) ? "development" !== 'production' ? invariant(false, '%s.getInitialState(): must return an object or null', Constructor.displayName || 'ReactCompositeComponent') : invariant(false) : void 0;
5069
5070 this.state = initialState;
5071 };
5072 Constructor.prototype = new ReactClassComponent();
5073 Constructor.prototype.constructor = Constructor;
5074 + Constructor.prototype.__reactAutoBindPairs = [];
5075
5076 injectedMixins.forEach(mixSpecIntoComponent.bind(null, Constructor));
5077
@@ -5108,11 +5095,11 @@ var ReactClass = {
5095 }
5096 }
5097
5111 - !Constructor.prototype.render ? "development" !== 'production' ? invariant(false, 'createClass(...): Class specification must implement a `render` method.') : invariant(false) : undefined;
5098 + !Constructor.prototype.render ? "development" !== 'production' ? invariant(false, 'createClass(...): Class specification must implement a `render` method.') : invariant(false) : void 0;
5099
5100 if ("development" !== 'production') {
5114 - "development" !== 'production' ? warning(!Constructor.prototype.componentShouldUpdate, '%s has a method called ' + 'componentShouldUpdate(). Did you mean shouldComponentUpdate()? ' + 'The name is phrased as a question because the function is ' + 'expected to return a value.', spec.displayName || 'A component') : undefined;
5115 - "development" !== 'production' ? warning(!Constructor.prototype.componentWillRecieveProps, '%s has a method called ' + 'componentWillRecieveProps(). Did you mean componentWillReceiveProps()?', spec.displayName || 'A component') : undefined;
5101 + "development" !== 'production' ? warning(!Constructor.prototype.componentShouldUpdate, '%s has a method called ' + 'componentShouldUpdate(). Did you mean shouldComponentUpdate()? ' + 'The name is phrased as a question because the function is ' + 'expected to return a value.', spec.displayName || 'A component') : void 0;
5102 + "development" !== 'production' ? warning(!Constructor.prototype.componentWillRecieveProps, '%s has a method called ' + 'componentWillRecieveProps(). Did you mean componentWillReceiveProps()?', spec.displayName || 'A component') : void 0;
5103 }
5104
5105 // Reduce time spent doing lookups by setting these on the prototype.
@@ -5134,9 +5121,9 @@ var ReactClass = {
5121 };
5122
5123 module.exports = ReactClass;
5137 -},{"137":137,"144":144,"147":147,"148":148,"155":155,"23":23,"30":30,"52":52,"69":69,"72":72,"73":73}],30:[function(_dereq_,module,exports){
5124 +},{"149":149,"156":156,"159":159,"160":160,"166":166,"167":167,"29":29,"60":60,"78":78,"81":81,"82":82}],29:[function(_dereq_,module,exports){
5125 /**
5139 - * Copyright 2013-2015, Facebook, Inc.
5126 + * Copyright 2013-present, Facebook, Inc.
5127 * All rights reserved.
5128 *
5129 * This source code is licensed under the BSD-style license found in the
@@ -5148,12 +5135,13 @@ module.exports = ReactClass;
5135
5136 'use strict';
5137
5151 -var ReactNoopUpdateQueue = _dereq_(69);
5138 +var ReactNoopUpdateQueue = _dereq_(78);
5139 +var ReactInstrumentation = _dereq_(70);
5140
5153 -var canDefineProperty = _dereq_(104);
5154 -var emptyObject = _dereq_(137);
5155 -var invariant = _dereq_(144);
5156 -var warning = _dereq_(155);
5141 +var canDefineProperty = _dereq_(114);
5142 +var emptyObject = _dereq_(149);
5143 +var invariant = _dereq_(156);
5144 +var warning = _dereq_(166);
5145
5146 /**
5147 * Base class helpers for the updating state of a component.
@@ -5195,13 +5183,14 @@ ReactComponent.prototype.isReactComponent = {};
5183 * @protected
5184 */
5185 ReactComponent.prototype.setState = function (partialState, callback) {
5198 - !(typeof partialState === 'object' || typeof partialState === 'function' || partialState == null) ? "development" !== 'production' ? invariant(false, 'setState(...): takes an object of state variables to update or a ' + 'function which returns an object of state variables.') : invariant(false) : undefined;
5186 + !(typeof partialState === 'object' || typeof partialState === 'function' || partialState == null) ? "development" !== 'production' ? invariant(false, 'setState(...): takes an object of state variables to update or a ' + 'function which returns an object of state variables.') : invariant(false) : void 0;
5187 if ("development" !== 'production') {
5200 - "development" !== 'production' ? warning(partialState != null, 'setState(...): You passed an undefined or null state object; ' + 'instead, use forceUpdate().') : undefined;
5188 + ReactInstrumentation.debugTool.onSetState();
5189 + "development" !== 'production' ? warning(partialState != null, 'setState(...): You passed an undefined or null state object; ' + 'instead, use forceUpdate().') : void 0;
5190 }
5191 this.updater.enqueueSetState(this, partialState);
5192 if (callback) {
5204 - this.updater.enqueueCallback(this, callback);
5193 + this.updater.enqueueCallback(this, callback, 'setState');
5194 }
5195 };
5196
@@ -5222,7 +5211,7 @@ ReactComponent.prototype.setState = function (partialState, callback) {
5211 ReactComponent.prototype.forceUpdate = function (callback) {
5212 this.updater.enqueueForceUpdate(this);
5213 if (callback) {
5225 - this.updater.enqueueCallback(this, callback);
5214 + this.updater.enqueueCallback(this, callback, 'forceUpdate');
5215 }
5216 };
5217
@@ -5233,17 +5222,14 @@ ReactComponent.prototype.forceUpdate = function (callback) {
5222 */
5223 if ("development" !== 'production') {
5224 var deprecatedAPIs = {
5236 - getDOMNode: ['getDOMNode', 'Use ReactDOM.findDOMNode(component) instead.'],
5225 isMounted: ['isMounted', 'Instead, make sure to clean up subscriptions and pending requests in ' + 'componentWillUnmount to prevent memory leaks.'],
5238 - replaceProps: ['replaceProps', 'Instead, call render again at the top level.'],
5239 - replaceState: ['replaceState', 'Refactor your code to use setState instead (see ' + 'https://github.com/facebook/react/issues/3236).'],
5240 - setProps: ['setProps', 'Instead, call render again at the top level.']
5226 + replaceState: ['replaceState', 'Refactor your code to use setState instead (see ' + 'https://github.com/facebook/react/issues/3236).']
5227 };
5228 var defineDeprecationWarning = function (methodName, info) {
5229 if (canDefineProperty) {
5230 Object.defineProperty(ReactComponent.prototype, methodName, {
5231 get: function () {
5246 - "development" !== 'production' ? warning(false, '%s(...) is deprecated in plain JavaScript React classes. %s', info[0], info[1]) : undefined;
5232 + "development" !== 'production' ? warning(false, '%s(...) is deprecated in plain JavaScript React classes. %s', info[0], info[1]) : void 0;
5233 return undefined;
5234 }
5235 });
@@ -5257,9 +5243,9 @@ if ("development" !== 'production') {
5243 }
5244
5245 module.exports = ReactComponent;
5260 -},{"104":104,"137":137,"144":144,"155":155,"69":69}],31:[function(_dereq_,module,exports){
5246 +},{"114":114,"149":149,"156":156,"166":166,"70":70,"78":78}],30:[function(_dereq_,module,exports){
5247 /**
5262 - * Copyright 2013-2015, Facebook, Inc.
5248 + * Copyright 2013-present, Facebook, Inc.
5249 * All rights reserved.
5250 *
5251 * This source code is licensed under the BSD-style license found in the
@@ -5271,8 +5257,9 @@ module.exports = ReactComponent;
5257
5258 'use strict';
5259
5274 -var ReactDOMIDOperations = _dereq_(40);
5275 -var ReactMount = _dereq_(65);
5260 +var DOMChildrenOperations = _dereq_(7);
5261 +var ReactDOMIDOperations = _dereq_(44);
5262 +var ReactPerf = _dereq_(80);
5263
5264 /**
5265 * Abstracts away all functionality of the reconciler that requires knowledge of
@@ -5283,7 +5270,7 @@ var ReactComponentBrowserEnvironment = {
5270
5271 processChildrenUpdates: ReactDOMIDOperations.dangerouslyProcessChildrenUpdates,
5272
5286 - replaceNodeWithMarkupByID: ReactDOMIDOperations.dangerouslyReplaceNodeWithMarkupByID,
5273 + replaceNodeWithMarkup: DOMChildrenOperations.dangerouslyReplaceNodeWithMarkup,
5274
5275 /**
5276 * If a particular environment requires that some resources be cleaned up,
@@ -5292,16 +5279,18 @@ var ReactComponentBrowserEnvironment = {
5279 *
5280 * @private
5281 */
5295 - unmountIDFromEnvironment: function (rootNodeID) {
5296 - ReactMount.purgeID(rootNodeID);
5297 - }
5282 + unmountIDFromEnvironment: function (rootNodeID) {}
5283
5284 };
5285
5286 +ReactPerf.measureMethods(ReactComponentBrowserEnvironment, 'ReactComponentBrowserEnvironment', {
5287 + replaceNodeWithMarkup: 'replaceNodeWithMarkup'
5288 +});
5289 +
5290 module.exports = ReactComponentBrowserEnvironment;
5302 -},{"40":40,"65":65}],32:[function(_dereq_,module,exports){
5291 +},{"44":44,"7":7,"80":80}],31:[function(_dereq_,module,exports){
5292 /**
5304 - * Copyright 2014-2015, Facebook, Inc.
5293 + * Copyright 2014-present, Facebook, Inc.
5294 * All rights reserved.
5295 *
5296 * This source code is licensed under the BSD-style license found in the
@@ -5313,7 +5302,7 @@ module.exports = ReactComponentBrowserEnvironment;
5302
5303 'use strict';
5304
5316 -var invariant = _dereq_(144);
5305 +var invariant = _dereq_(156);
5306
5307 var injected = false;
5308
@@ -5330,7 +5319,7 @@ var ReactComponentEnvironment = {
5319 * Optionally injectable hook for swapping out mount images in the middle of
5320 * the tree.
5321 */
5333 - replaceNodeWithMarkupByID: null,
5322 + replaceNodeWithMarkup: null,
5323
5324 /**
5325 * Optionally injectable hook for processing a queue of child updates. Will
@@ -5340,9 +5329,9 @@ var ReactComponentEnvironment = {
5329
5330 injection: {
5331 injectEnvironment: function (environment) {
5343 - !!injected ? "development" !== 'production' ? invariant(false, 'ReactCompositeComponent: injectEnvironment() can only be called once.') : invariant(false) : undefined;
5332 + !!injected ? "development" !== 'production' ? invariant(false, 'ReactCompositeComponent: injectEnvironment() can only be called once.') : invariant(false) : void 0;
5333 ReactComponentEnvironment.unmountIDFromEnvironment = environment.unmountIDFromEnvironment;
5345 - ReactComponentEnvironment.replaceNodeWithMarkupByID = environment.replaceNodeWithMarkupByID;
5334 + ReactComponentEnvironment.replaceNodeWithMarkup = environment.replaceNodeWithMarkup;
5335 ReactComponentEnvironment.processChildrenUpdates = environment.processChildrenUpdates;
5336 injected = true;
5337 }
@@ -5351,9 +5340,9 @@ var ReactComponentEnvironment = {
5340 };
5341
5342 module.exports = ReactComponentEnvironment;
5354 -},{"144":144}],33:[function(_dereq_,module,exports){
5343 +},{"156":156}],32:[function(_dereq_,module,exports){
5344 /**
5356 - * Copyright 2013-2015, Facebook, Inc.
5345 + * Copyright 2013-present, Facebook, Inc.
5346 * All rights reserved.
5347 *
5348 * This source code is licensed under the BSD-style license found in the
@@ -5365,21 +5354,25 @@ module.exports = ReactComponentEnvironment;
5354
5355 'use strict';
5356
5368 -var ReactComponentEnvironment = _dereq_(32);
5369 -var ReactCurrentOwner = _dereq_(34);
5370 -var ReactElement = _dereq_(52);
5371 -var ReactInstanceMap = _dereq_(62);
5372 -var ReactPerf = _dereq_(71);
5373 -var ReactPropTypeLocations = _dereq_(73);
5374 -var ReactPropTypeLocationNames = _dereq_(72);
5375 -var ReactReconciler = _dereq_(76);
5376 -var ReactUpdateQueue = _dereq_(82);
5377 -
5378 -var assign = _dereq_(23);
5379 -var emptyObject = _dereq_(137);
5380 -var invariant = _dereq_(144);
5381 -var shouldUpdateReactComponent = _dereq_(126);
5382 -var warning = _dereq_(155);
5357 +var _assign = _dereq_(167);
5358 +
5359 +var ReactComponentEnvironment = _dereq_(31);
5360 +var ReactCurrentOwner = _dereq_(33);
5361 +var ReactElement = _dereq_(60);
5362 +var ReactErrorUtils = _dereq_(63);
5363 +var ReactInstanceMap = _dereq_(69);
5364 +var ReactInstrumentation = _dereq_(70);
5365 +var ReactNodeTypes = _dereq_(77);
5366 +var ReactPerf = _dereq_(80);
5367 +var ReactPropTypeLocations = _dereq_(82);
5368 +var ReactPropTypeLocationNames = _dereq_(81);
5369 +var ReactReconciler = _dereq_(85);
5370 +var ReactUpdateQueue = _dereq_(91);
5371 +
5372 +var emptyObject = _dereq_(149);
5373 +var invariant = _dereq_(156);
5374 +var shouldUpdateReactComponent = _dereq_(138);
5375 +var warning = _dereq_(166);
5376
5377 function getDeclarationErrorAddendum(component) {
5378 var owner = component._currentElement._owner || null;
@@ -5395,9 +5388,17 @@ function getDeclarationErrorAddendum(component) {
5388 function StatelessComponent(Component) {}
5389 StatelessComponent.prototype.render = function () {
5390 var Component = ReactInstanceMap.get(this)._currentElement.type;
5398 - return Component(this.props, this.context, this.updater);
5391 + var element = Component(this.props, this.context, this.updater);
5392 + warnIfInvalidElement(Component, element);
5393 + return element;
5394 };
5395
5396 +function warnIfInvalidElement(Component, element) {
5397 + if ("development" !== 'production') {
5398 + "development" !== 'production' ? warning(element === null || element === false || ReactElement.isValidElement(element), '%s(...): A valid React element (or null) must be returned. You may have ' + 'returned undefined, an array or some other invalid object.', Component.displayName || Component.name || 'Component') : void 0;
5399 + }
5400 +}
5401 +
5402 /**
5403 * ------------------ The Life-Cycle of a Composite Component ------------------
5404 *
@@ -5449,6 +5450,8 @@ var ReactCompositeComponentMixin = {
5450 this._currentElement = element;
5451 this._rootNodeID = null;
5452 this._instance = null;
5453 + this._nativeParent = null;
5454 + this._nativeContainerInfo = null;
5455
5456 // See ReactUpdateQueue
5457 this._pendingElement = null;
@@ -5456,8 +5459,8 @@ var ReactCompositeComponentMixin = {
5459 this._pendingReplaceState = false;
5460 this._pendingForceUpdate = false;
5461
5462 + this._renderedNodeType = null;
5463 this._renderedComponent = null;
5460 -
5464 this._context = null;
5465 this._mountOrder = 0;
5466 this._topLevelWrapper = null;
@@ -5469,16 +5472,19 @@ var ReactCompositeComponentMixin = {
5472 /**
5473 * Initializes the component, renders markup, and registers event listeners.
5474 *
5472 - * @param {string} rootID DOM ID of the root node.
5475 * @param {ReactReconcileTransaction|ReactServerRenderingTransaction} transaction
5476 + * @param {?object} nativeParent
5477 + * @param {?object} nativeContainerInfo
5478 + * @param {?object} context
5479 * @return {?string} Rendered markup to be inserted into the DOM.
5480 * @final
5481 * @internal
5482 */
5478 - mountComponent: function (rootID, transaction, context) {
5483 + mountComponent: function (transaction, nativeParent, nativeContainerInfo, context) {
5484 this._context = context;
5485 this._mountOrder = nextMountID++;
5481 - this._rootNodeID = rootID;
5486 + this._nativeParent = nativeParent;
5487 + this._nativeContainerInfo = nativeContainerInfo;
5488
5489 var publicProps = this._processProps(this._currentElement.props);
5490 var publicContext = this._processContext(context);
@@ -5489,13 +5495,7 @@ var ReactCompositeComponentMixin = {
5495 var inst;
5496 var renderedElement;
5497
5492 - // This is a way to detect if Component is a stateless arrow function
5493 - // component, which is not newable. It might not be 100% reliable but is
5494 - // something we can do until we start detecting that Component extends
5495 - // React.Component. We already assume that typeof Component === 'function'.
5496 - var canInstantiate = ('prototype' in Component);
5497 -
5498 - if (canInstantiate) {
5498 + if (Component.prototype && Component.prototype.isReactComponent) {
5499 if ("development" !== 'production') {
5500 ReactCurrentOwner.current = this;
5501 try {
@@ -5506,23 +5506,36 @@ var ReactCompositeComponentMixin = {
5506 } else {
5507 inst = new Component(publicProps, publicContext, ReactUpdateQueue);
5508 }
5509 - }
5510 -
5511 - if (!canInstantiate || inst === null || inst === false || ReactElement.isValidElement(inst)) {
5512 - renderedElement = inst;
5513 - inst = new StatelessComponent(Component);
5509 + } else {
5510 + if ("development" !== 'production') {
5511 + ReactCurrentOwner.current = this;
5512 + try {
5513 + inst = Component(publicProps, publicContext, ReactUpdateQueue);
5514 + } finally {
5515 + ReactCurrentOwner.current = null;
5516 + }
5517 + } else {
5518 + inst = Component(publicProps, publicContext, ReactUpdateQueue);
5519 + }
5520 + if (inst == null || inst.render == null) {
5521 + renderedElement = inst;
5522 + warnIfInvalidElement(Component, renderedElement);
5523 + !(inst === null || inst === false || ReactElement.isValidElement(inst)) ? "development" !== 'production' ? invariant(false, '%s(...): A valid React element (or null) must be returned. You may have ' + 'returned undefined, an array or some other invalid object.', Component.displayName || Component.name || 'Component') : invariant(false) : void 0;
5524 + inst = new StatelessComponent(Component);
5525 + }
5526 }
5527
5528 if ("development" !== 'production') {
5529 // This will throw later in _renderValidatedComponent, but add an early
5530 // warning now to help debugging
5531 if (inst.render == null) {
5520 - "development" !== 'production' ? warning(false, '%s(...): No `render` method found on the returned component ' + 'instance: you may have forgotten to define `render`, returned ' + 'null/false from a stateless component, or tried to render an ' + 'element whose type is a function that isn\'t a React component.', Component.displayName || Component.name || 'Component') : undefined;
5521 - } else {
5522 - // We support ES6 inheriting from React.Component, the module pattern,
5523 - // and stateless components, but not ES6 classes that don't extend
5524 - "development" !== 'production' ? warning(Component.prototype && Component.prototype.isReactComponent || !canInstantiate || !(inst instanceof Component), '%s(...): React component classes must extend React.Component.', Component.displayName || Component.name || 'Component') : undefined;
5532 + "development" !== 'production' ? warning(false, '%s(...): No `render` method found on the returned component ' + 'instance: you may have forgotten to define `render`.', Component.displayName || Component.name || 'Component') : void 0;
5533 }
5534 +
5535 + var propsMutated = inst.props !== publicProps;
5536 + var componentName = Component.displayName || Component.name || 'Component';
5537 +
5538 + "development" !== 'production' ? warning(inst.props === undefined || !propsMutated, '%s(...): When calling super() in `%s`, make sure to pass ' + 'up the same props that your component\'s constructor was passed.', componentName, componentName) : void 0;
5539 }
5540
5541 // These should be set up in the constructor, but as a convenience for
@@ -5541,25 +5554,65 @@ var ReactCompositeComponentMixin = {
5554 // Since plain JS classes are defined without any special initialization
5555 // logic, we can not catch common errors early. Therefore, we have to
5556 // catch them here, at initialization time, instead.
5544 - "development" !== 'production' ? warning(!inst.getInitialState || inst.getInitialState.isReactClassApproved, 'getInitialState was defined on %s, a plain JavaScript class. ' + 'This is only supported for classes created using React.createClass. ' + 'Did you mean to define a state property instead?', this.getName() || 'a component') : undefined;
5545 - "development" !== 'production' ? warning(!inst.getDefaultProps || inst.getDefaultProps.isReactClassApproved, 'getDefaultProps was defined on %s, a plain JavaScript class. ' + 'This is only supported for classes created using React.createClass. ' + 'Use a static property to define defaultProps instead.', this.getName() || 'a component') : undefined;
5546 - "development" !== 'production' ? warning(!inst.propTypes, 'propTypes was defined as an instance property on %s. Use a static ' + 'property to define propTypes instead.', this.getName() || 'a component') : undefined;
5547 - "development" !== 'production' ? warning(!inst.contextTypes, 'contextTypes was defined as an instance property on %s. Use a ' + 'static property to define contextTypes instead.', this.getName() || 'a component') : undefined;
5548 - "development" !== 'production' ? warning(typeof inst.componentShouldUpdate !== 'function', '%s has a method called ' + 'componentShouldUpdate(). Did you mean shouldComponentUpdate()? ' + 'The name is phrased as a question because the function is ' + 'expected to return a value.', this.getName() || 'A component') : undefined;
5549 - "development" !== 'production' ? warning(typeof inst.componentDidUnmount !== 'function', '%s has a method called ' + 'componentDidUnmount(). But there is no such lifecycle method. ' + 'Did you mean componentWillUnmount()?', this.getName() || 'A component') : undefined;
5550 - "development" !== 'production' ? warning(typeof inst.componentWillRecieveProps !== 'function', '%s has a method called ' + 'componentWillRecieveProps(). Did you mean componentWillReceiveProps()?', this.getName() || 'A component') : undefined;
5557 + "development" !== 'production' ? warning(!inst.getInitialState || inst.getInitialState.isReactClassApproved, 'getInitialState was defined on %s, a plain JavaScript class. ' + 'This is only supported for classes created using React.createClass. ' + 'Did you mean to define a state property instead?', this.getName() || 'a component') : void 0;
5558 + "development" !== 'production' ? warning(!inst.getDefaultProps || inst.getDefaultProps.isReactClassApproved, 'getDefaultProps was defined on %s, a plain JavaScript class. ' + 'This is only supported for classes created using React.createClass. ' + 'Use a static property to define defaultProps instead.', this.getName() || 'a component') : void 0;
5559 + "development" !== 'production' ? warning(!inst.propTypes, 'propTypes was defined as an instance property on %s. Use a static ' + 'property to define propTypes instead.', this.getName() || 'a component') : void 0;
5560 + "development" !== 'production' ? warning(!inst.contextTypes, 'contextTypes was defined as an instance property on %s. Use a ' + 'static property to define contextTypes instead.', this.getName() || 'a component') : void 0;
5561 + "development" !== 'production' ? warning(typeof inst.componentShouldUpdate !== 'function', '%s has a method called ' + 'componentShouldUpdate(). Did you mean shouldComponentUpdate()? ' + 'The name is phrased as a question because the function is ' + 'expected to return a value.', this.getName() || 'A component') : void 0;
5562 + "development" !== 'production' ? warning(typeof inst.componentDidUnmount !== 'function', '%s has a method called ' + 'componentDidUnmount(). But there is no such lifecycle method. ' + 'Did you mean componentWillUnmount()?', this.getName() || 'A component') : void 0;
5563 + "development" !== 'production' ? warning(typeof inst.componentWillRecieveProps !== 'function', '%s has a method called ' + 'componentWillRecieveProps(). Did you mean componentWillReceiveProps()?', this.getName() || 'A component') : void 0;
5564 }
5565
5566 var initialState = inst.state;
5567 if (initialState === undefined) {
5568 inst.state = initialState = null;
5569 }
5557 - !(typeof initialState === 'object' && !Array.isArray(initialState)) ? "development" !== 'production' ? invariant(false, '%s.state: must be set to an object or null', this.getName() || 'ReactCompositeComponent') : invariant(false) : undefined;
5570 + !(typeof initialState === 'object' && !Array.isArray(initialState)) ? "development" !== 'production' ? invariant(false, '%s.state: must be set to an object or null', this.getName() || 'ReactCompositeComponent') : invariant(false) : void 0;
5571
5572 this._pendingStateQueue = null;
5573 this._pendingReplaceState = false;
5574 this._pendingForceUpdate = false;
5575
5576 + var markup;
5577 + if (inst.unstable_handleError) {
5578 + markup = this.performInitialMountWithErrorHandling(renderedElement, nativeParent, nativeContainerInfo, transaction, context);
5579 + } else {
5580 + markup = this.performInitialMount(renderedElement, nativeParent, nativeContainerInfo, transaction, context);
5581 + }
5582 +
5583 + if (inst.componentDidMount) {
5584 + transaction.getReactMountReady().enqueue(inst.componentDidMount, inst);
5585 + }
5586 +
5587 + return markup;
5588 + },
5589 +
5590 + performInitialMountWithErrorHandling: function (renderedElement, nativeParent, nativeContainerInfo, transaction, context) {
5591 + var markup;
5592 + var checkpoint = transaction.checkpoint();
5593 + try {
5594 + markup = this.performInitialMount(renderedElement, nativeParent, nativeContainerInfo, transaction, context);
5595 + } catch (e) {
5596 + // Roll back to checkpoint, handle error (which may add items to the transaction), and take a new checkpoint
5597 + transaction.rollback(checkpoint);
5598 + this._instance.unstable_handleError(e);
5599 + if (this._pendingStateQueue) {
5600 + this._instance.state = this._processPendingState(this._instance.props, this._instance.context);
5601 + }
5602 + checkpoint = transaction.checkpoint();
5603 +
5604 + this._renderedComponent.unmountComponent(true);
5605 + transaction.rollback(checkpoint);
5606 +
5607 + // Try again - we've informed the component about the error, so they can render an error message this time.
5608 + // If this throws again, the error will bubble up (and can be caught by a higher error boundary).
5609 + markup = this.performInitialMount(renderedElement, nativeParent, nativeContainerInfo, transaction, context);
5610 + }
5611 + return markup;
5612 + },
5613 +
5614 + performInitialMount: function (renderedElement, nativeParent, nativeContainerInfo, transaction, context) {
5615 + var inst = this._instance;
5616 if (inst.componentWillMount) {
5617 inst.componentWillMount();
5618 // When mounting, calls to `setState` by `componentWillMount` will set
@@ -5574,32 +5627,45 @@ var ReactCompositeComponentMixin = {
5627 renderedElement = this._renderValidatedComponent();
5628 }
5629
5630 + this._renderedNodeType = ReactNodeTypes.getType(renderedElement);
5631 this._renderedComponent = this._instantiateReactComponent(renderedElement);
5632
5579 - var markup = ReactReconciler.mountComponent(this._renderedComponent, rootID, transaction, this._processChildContext(context));
5580 - if (inst.componentDidMount) {
5581 - transaction.getReactMountReady().enqueue(inst.componentDidMount, inst);
5582 - }
5633 + var markup = ReactReconciler.mountComponent(this._renderedComponent, transaction, nativeParent, nativeContainerInfo, this._processChildContext(context));
5634
5635 return markup;
5636 },
5637
5638 + getNativeNode: function () {
5639 + return ReactReconciler.getNativeNode(this._renderedComponent);
5640 + },
5641 +
5642 /**
5643 * Releases any resources allocated by `mountComponent`.
5644 *
5645 * @final
5646 * @internal
5647 */
5593 - unmountComponent: function () {
5648 + unmountComponent: function (safely) {
5649 + if (!this._renderedComponent) {
5650 + return;
5651 + }
5652 var inst = this._instance;
5653
5654 if (inst.componentWillUnmount) {
5597 - inst.componentWillUnmount();
5655 + if (safely) {
5656 + var name = this.getName() + '.componentWillUnmount()';
5657 + ReactErrorUtils.invokeGuardedCallback(name, inst.componentWillUnmount.bind(inst));
5658 + } else {
5659 + inst.componentWillUnmount();
5660 + }
5661 }
5662
5600 - ReactReconciler.unmountComponent(this._renderedComponent);
5601 - this._renderedComponent = null;
5602 - this._instance = null;
5663 + if (this._renderedComponent) {
5664 + ReactReconciler.unmountComponent(this._renderedComponent, safely);
5665 + this._renderedNodeType = null;
5666 + this._renderedComponent = null;
5667 + this._instance = null;
5668 + }
5669
5670 // Reset pending fields
5671 // Even if this component is scheduled for another update in ReactUpdates,
@@ -5637,13 +5703,12 @@ var ReactCompositeComponentMixin = {
5703 * @private
5704 */
5705 _maskContext: function (context) {
5640 - var maskedContext = null;
5706 var Component = this._currentElement.type;
5707 var contextTypes = Component.contextTypes;
5708 if (!contextTypes) {
5709 return emptyObject;
5710 }
5646 - maskedContext = {};
5711 + var maskedContext = {};
5712 for (var contextName in contextTypes) {
5713 maskedContext[contextName] = context[contextName];
5714 }
@@ -5677,16 +5742,22 @@ var ReactCompositeComponentMixin = {
5742 _processChildContext: function (currentContext) {
5743 var Component = this._currentElement.type;
5744 var inst = this._instance;
5745 + if ("development" !== 'production') {
5746 + ReactInstrumentation.debugTool.onBeginProcessingChildContext();
5747 + }
5748 var childContext = inst.getChildContext && inst.getChildContext();
5749 + if ("development" !== 'production') {
5750 + ReactInstrumentation.debugTool.onEndProcessingChildContext();
5751 + }
5752 if (childContext) {
5682 - !(typeof Component.childContextTypes === 'object') ? "development" !== 'production' ? invariant(false, '%s.getChildContext(): childContextTypes must be defined in order to ' + 'use getChildContext().', this.getName() || 'ReactCompositeComponent') : invariant(false) : undefined;
5753 + !(typeof Component.childContextTypes === 'object') ? "development" !== 'production' ? invariant(false, '%s.getChildContext(): childContextTypes must be defined in order to ' + 'use getChildContext().', this.getName() || 'ReactCompositeComponent') : invariant(false) : void 0;
5754 if ("development" !== 'production') {
5755 this._checkPropTypes(Component.childContextTypes, childContext, ReactPropTypeLocations.childContext);
5756 }
5757 for (var name in childContext) {
5687 - !(name in Component.childContextTypes) ? "development" !== 'production' ? invariant(false, '%s.getChildContext(): key "%s" is not defined in childContextTypes.', this.getName() || 'ReactCompositeComponent', name) : invariant(false) : undefined;
5758 + !(name in Component.childContextTypes) ? "development" !== 'production' ? invariant(false, '%s.getChildContext(): key "%s" is not defined in childContextTypes.', this.getName() || 'ReactCompositeComponent', name) : invariant(false) : void 0;
5759 }
5689 - return assign({}, currentContext, childContext);
5760 + return _assign({}, currentContext, childContext);
5761 }
5762 return currentContext;
5763 },
@@ -5728,7 +5799,7 @@ var ReactCompositeComponentMixin = {
5799 try {
5800 // This is intentionally an invariant that gets caught. It's the same
5801 // behavior as without this statement except with a better message.
5731 - !(typeof propTypes[propName] === 'function') ? "development" !== 'production' ? invariant(false, '%s: %s type `%s` is invalid; it must be a function, usually ' + 'from React.PropTypes.', componentName || 'React class', ReactPropTypeLocationNames[location], propName) : invariant(false) : undefined;
5802 + !(typeof propTypes[propName] === 'function') ? "development" !== 'production' ? invariant(false, '%s: %s type `%s` is invalid; it must be a function, usually ' + 'from React.PropTypes.', componentName || 'React class', ReactPropTypeLocationNames[location], propName) : invariant(false) : void 0;
5803 error = propTypes[propName](props, propName, componentName, location);
5804 } catch (ex) {
5805 error = ex;
@@ -5741,9 +5812,9 @@ var ReactCompositeComponentMixin = {
5812
5813 if (location === ReactPropTypeLocations.prop) {
5814 // Preface gives us something to blacklist in warning module
5744 - "development" !== 'production' ? warning(false, 'Failed Composite propType: %s%s', error.message, addendum) : undefined;
5815 + "development" !== 'production' ? warning(false, 'Failed Composite propType: %s%s', error.message, addendum) : void 0;
5816 } else {
5746 - "development" !== 'production' ? warning(false, 'Failed Context Types: %s%s', error.message, addendum) : undefined;
5817 + "development" !== 'production' ? warning(false, 'Failed Context Types: %s%s', error.message, addendum) : void 0;
5818 }
5819 }
5820 }
@@ -5768,7 +5839,7 @@ var ReactCompositeComponentMixin = {
5839 */
5840 performUpdateIfNecessary: function (transaction) {
5841 if (this._pendingElement != null) {
5771 - ReactReconciler.receiveComponent(this, this._pendingElement || this._currentElement, transaction, this._context);
5842 + ReactReconciler.receiveComponent(this, this._pendingElement, transaction, this._context);
5843 }
5844
5845 if (this._pendingStateQueue !== null || this._pendingForceUpdate) {
@@ -5793,10 +5864,18 @@ var ReactCompositeComponentMixin = {
5864 */
5865 updateComponent: function (transaction, prevParentElement, nextParentElement, prevUnmaskedContext, nextUnmaskedContext) {
5866 var inst = this._instance;
5796 -
5797 - var nextContext = this._context === nextUnmaskedContext ? inst.context : this._processContext(nextUnmaskedContext);
5867 + var willReceive = false;
5868 + var nextContext;
5869 var nextProps;
5870
5871 + // Determine if the context has changed or not
5872 + if (this._context === nextUnmaskedContext) {
5873 + nextContext = inst.context;
5874 + } else {
5875 + nextContext = this._processContext(nextUnmaskedContext);
5876 + willReceive = true;
5877 + }
5878 +
5879 // Distinguish between a props update versus a simple state update
5880 if (prevParentElement === nextParentElement) {
5881 // Skip checking prop types again -- we don't read inst.props to avoid
@@ -5804,13 +5883,14 @@ var ReactCompositeComponentMixin = {
5883 nextProps = nextParentElement.props;
5884 } else {
5885 nextProps = this._processProps(nextParentElement.props);
5807 - // An update here will schedule an update but immediately set
5808 - // _pendingStateQueue which will ensure that any state updates gets
5809 - // immediately reconciled instead of waiting for the next batch.
5886 + willReceive = true;
5887 + }
5888
5811 - if (inst.componentWillReceiveProps) {
5812 - inst.componentWillReceiveProps(nextProps, nextContext);
5813 - }
5889 + // An update here will schedule an update but immediately set
5890 + // _pendingStateQueue which will ensure that any state updates gets
5891 + // immediately reconciled instead of waiting for the next batch.
5892 + if (willReceive && inst.componentWillReceiveProps) {
5893 + inst.componentWillReceiveProps(nextProps, nextContext);
5894 }
5895
5896 var nextState = this._processPendingState(nextProps, nextContext);
@@ -5818,7 +5898,7 @@ var ReactCompositeComponentMixin = {
5898 var shouldUpdate = this._pendingForceUpdate || !inst.shouldComponentUpdate || inst.shouldComponentUpdate(nextProps, nextState, nextContext);
5899
5900 if ("development" !== 'production') {
5821 - "development" !== 'production' ? warning(typeof shouldUpdate !== 'undefined', '%s.shouldComponentUpdate(): Returned undefined instead of a ' + 'boolean value. Make sure to return true or false.', this.getName() || 'ReactCompositeComponent') : undefined;
5901 + "development" !== 'production' ? warning(shouldUpdate !== undefined, '%s.shouldComponentUpdate(): Returned undefined instead of a ' + 'boolean value. Make sure to return true or false.', this.getName() || 'ReactCompositeComponent') : void 0;
5902 }
5903
5904 if (shouldUpdate) {
@@ -5851,10 +5931,10 @@ var ReactCompositeComponentMixin = {
5931 return queue[0];
5932 }
5933
5854 - var nextState = assign({}, replace ? queue[0] : inst.state);
5934 + var nextState = _assign({}, replace ? queue[0] : inst.state);
5935 for (var i = replace ? 1 : 0; i < queue.length; i++) {
5936 var partial = queue[i];
5857 - assign(nextState, typeof partial === 'function' ? partial.call(inst, nextState, props, context) : partial);
5937 + _assign(nextState, typeof partial === 'function' ? partial.call(inst, nextState, props, context) : partial);
5938 }
5939
5940 return nextState;
@@ -5915,22 +5995,23 @@ var ReactCompositeComponentMixin = {
5995 if (shouldUpdateReactComponent(prevRenderedElement, nextRenderedElement)) {
5996 ReactReconciler.receiveComponent(prevComponentInstance, nextRenderedElement, transaction, this._processChildContext(context));
5997 } else {
5918 - // These two IDs are actually the same! But nothing should rely on that.
5919 - var thisID = this._rootNodeID;
5920 - var prevComponentID = prevComponentInstance._rootNodeID;
5921 - ReactReconciler.unmountComponent(prevComponentInstance);
5998 + var oldNativeNode = ReactReconciler.getNativeNode(prevComponentInstance);
5999 + ReactReconciler.unmountComponent(prevComponentInstance, false);
6000
6001 + this._renderedNodeType = ReactNodeTypes.getType(nextRenderedElement);
6002 this._renderedComponent = this._instantiateReactComponent(nextRenderedElement);
5924 - var nextMarkup = ReactReconciler.mountComponent(this._renderedComponent, thisID, transaction, this._processChildContext(context));
5925 - this._replaceNodeWithMarkupByID(prevComponentID, nextMarkup);
6003 + var nextMarkup = ReactReconciler.mountComponent(this._renderedComponent, transaction, this._nativeParent, this._nativeContainerInfo, this._processChildContext(context));
6004 + this._replaceNodeWithMarkup(oldNativeNode, nextMarkup);
6005 }
6006 },
6007
6008 /**
6009 + * Overridden in shallow rendering.
6010 + *
6011 * @protected
6012 */
5932 - _replaceNodeWithMarkupByID: function (prevComponentID, nextMarkup) {
5933 - ReactComponentEnvironment.replaceNodeWithMarkupByID(prevComponentID, nextMarkup);
6013 + _replaceNodeWithMarkup: function (oldNativeNode, nextMarkup) {
6014 + ReactComponentEnvironment.replaceNodeWithMarkup(oldNativeNode, nextMarkup);
6015 },
6016
6017 /**
@@ -5941,7 +6022,7 @@ var ReactCompositeComponentMixin = {
6022 var renderedComponent = inst.render();
6023 if ("development" !== 'production') {
6024 // We allow auto-mocks to proceed as if they're returning null.
5944 - if (typeof renderedComponent === 'undefined' && inst.render._isMockFunction) {
6025 + if (renderedComponent === undefined && inst.render._isMockFunction) {
6026 // This is probably bad practice. Consider warning here and
6027 // deprecating this convenience.
6028 renderedComponent = null;
@@ -5964,7 +6045,7 @@ var ReactCompositeComponentMixin = {
6045 }
6046 !(
6047 // TODO: An `isValidNode` function would probably be more appropriate
5967 - renderedComponent === null || renderedComponent === false || ReactElement.isValidElement(renderedComponent)) ? "development" !== 'production' ? invariant(false, '%s.render(): A valid ReactComponent must be returned. You may have ' + 'returned undefined, an array or some other invalid object.', this.getName() || 'ReactCompositeComponent') : invariant(false) : undefined;
6048 + renderedComponent === null || renderedComponent === false || ReactElement.isValidElement(renderedComponent)) ? "development" !== 'production' ? invariant(false, '%s.render(): A valid React element (or null) must be returned. You may have ' + 'returned undefined, an array or some other invalid object.', this.getName() || 'ReactCompositeComponent') : invariant(false) : void 0;
6049 return renderedComponent;
6050 },
6051
@@ -5978,11 +6059,11 @@ var ReactCompositeComponentMixin = {
6059 */
6060 attachRef: function (ref, component) {
6061 var inst = this.getPublicInstance();
5981 - !(inst != null) ? "development" !== 'production' ? invariant(false, 'Stateless function components cannot have refs.') : invariant(false) : undefined;
6062 + !(inst != null) ? "development" !== 'production' ? invariant(false, 'Stateless function components cannot have refs.') : invariant(false) : void 0;
6063 var publicComponentInstance = component.getPublicInstance();
6064 if ("development" !== 'production') {
6065 var componentName = component && component.getName ? component.getName() : 'a component';
5985 - "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()) : undefined;
6066 + "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;
6067 }
6068 var refs = inst.refs === emptyObject ? inst.refs = {} : inst.refs;
6069 refs[ref] = publicComponentInstance;
@@ -6046,9 +6127,9 @@ var ReactCompositeComponent = {
6127 };
6128
6129 module.exports = ReactCompositeComponent;
6049 -},{"126":126,"137":137,"144":144,"155":155,"23":23,"32":32,"34":34,"52":52,"62":62,"71":71,"72":72,"73":73,"76":76,"82":82}],34:[function(_dereq_,module,exports){
6130 +},{"138":138,"149":149,"156":156,"166":166,"167":167,"31":31,"33":33,"60":60,"63":63,"69":69,"70":70,"77":77,"80":80,"81":81,"82":82,"85":85,"91":91}],33:[function(_dereq_,module,exports){
6131 /**
6051 - * Copyright 2013-2015, Facebook, Inc.
6132 + * Copyright 2013-present, Facebook, Inc.
6133 * All rights reserved.
6134 *
6135 * This source code is licensed under the BSD-style license found in the
@@ -6066,6 +6147,7 @@ module.exports = ReactCompositeComponent;
6147 * The current owner is the component who should own any components that are
6148 * currently being constructed.
6149 */
6150 +
6151 var ReactCurrentOwner = {
6152
6153 /**
@@ -6077,9 +6159,9 @@ var ReactCurrentOwner = {
6159 };
6160
6161 module.exports = ReactCurrentOwner;
6080 -},{}],35:[function(_dereq_,module,exports){
6162 +},{}],34:[function(_dereq_,module,exports){
6163 /**
6082 - * Copyright 2013-2015, Facebook, Inc.
6164 + * Copyright 2013-present, Facebook, Inc.
6165 * All rights reserved.
6166 *
6167 * This source code is licensed under the BSD-style license found in the
@@ -6093,19 +6175,18 @@ module.exports = ReactCurrentOwner;
6175
6176 'use strict';
6177
6096 -var ReactCurrentOwner = _dereq_(34);
6097 -var ReactDOMTextComponent = _dereq_(46);
6098 -var ReactDefaultInjection = _dereq_(49);
6099 -var ReactInstanceHandles = _dereq_(61);
6100 -var ReactMount = _dereq_(65);
6101 -var ReactPerf = _dereq_(71);
6102 -var ReactReconciler = _dereq_(76);
6103 -var ReactUpdates = _dereq_(83);
6104 -var ReactVersion = _dereq_(84);
6178 +var ReactDOMComponentTree = _dereq_(38);
6179 +var ReactDefaultInjection = _dereq_(57);
6180 +var ReactMount = _dereq_(73);
6181 +var ReactPerf = _dereq_(80);
6182 +var ReactReconciler = _dereq_(85);
6183 +var ReactUpdates = _dereq_(92);
6184 +var ReactVersion = _dereq_(93);
6185
6106 -var findDOMNode = _dereq_(108);
6107 -var renderSubtreeIntoContainer = _dereq_(123);
6108 -var warning = _dereq_(155);
6186 +var findDOMNode = _dereq_(118);
6187 +var getNativeComponentFromComposite = _dereq_(126);
6188 +var renderSubtreeIntoContainer = _dereq_(135);
6189 +var warning = _dereq_(166);
6190
6191 ReactDefaultInjection.inject();
6192
@@ -6127,42 +6208,55 @@ var React = {
6208 /* eslint-enable camelcase */
6209 if (typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ !== 'undefined' && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.inject === 'function') {
6210 __REACT_DEVTOOLS_GLOBAL_HOOK__.inject({
6130 - CurrentOwner: ReactCurrentOwner,
6131 - InstanceHandles: ReactInstanceHandles,
6211 + ComponentTree: {
6212 + getClosestInstanceFromNode: ReactDOMComponentTree.getClosestInstanceFromNode,
6213 + getNodeFromInstance: function (inst) {
6214 + // inst is an internal instance (but could be a composite)
6215 + if (inst._renderedComponent) {
6216 + inst = getNativeComponentFromComposite(inst);
6217 + }
6218 + if (inst) {
6219 + return ReactDOMComponentTree.getNodeFromInstance(inst);
6220 + } else {
6221 + return null;
6222 + }
6223 + }
6224 + },
6225 Mount: ReactMount,
6133 - Reconciler: ReactReconciler,
6134 - TextComponent: ReactDOMTextComponent
6226 + Reconciler: ReactReconciler
6227 });
6228 }
6229
6230 if ("development" !== 'production') {
6139 - var ExecutionEnvironment = _dereq_(130);
6231 + var ExecutionEnvironment = _dereq_(142);
6232 if (ExecutionEnvironment.canUseDOM && window.top === window.self) {
6233
6234 // First check if devtools is not installed
6235 if (typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ === 'undefined') {
6236 // If we're in Chrome or Firefox, provide a download link if not installed.
6237 if (navigator.userAgent.indexOf('Chrome') > -1 && navigator.userAgent.indexOf('Edge') === -1 || navigator.userAgent.indexOf('Firefox') > -1) {
6146 - console.debug('Download the React DevTools for a better development experience: ' + 'https://fb.me/react-devtools');
6238 + // Firefox does not have the issue with devtools loaded over file://
6239 + var showFileUrlMessage = window.location.protocol.indexOf('http') === -1 && navigator.userAgent.indexOf('Firefox') === -1;
6240 + console.debug('Download the React DevTools ' + (showFileUrlMessage ? 'and use an HTTP server (instead of a file: URL) ' : '') + 'for a better development experience: ' + 'https://fb.me/react-devtools');
6241 }
6242 }
6243
6244 + var testFunc = function testFn() {};
6245 + "development" !== 'production' ? warning((testFunc.name || testFunc.toString()).indexOf('testFn') !== -1, 'It looks like you\'re using a minified copy of the development build ' + 'of React. When deploying React apps to production, make sure to use ' + 'the production build which skips development warnings and is faster. ' + 'See https://fb.me/react-minification for more details.') : void 0;
6246 +
6247 // If we're in IE8, check to see if we are in compatibility mode and provide
6248 // information on preventing compatibility mode
6249 var ieCompatibilityMode = document.documentMode && document.documentMode < 8;
6250
6154 - "development" !== 'production' ? warning(!ieCompatibilityMode, 'Internet Explorer is running in compatibility mode; please add the ' + 'following tag to your HTML to prevent this from happening: ' + '<meta http-equiv="X-UA-Compatible" content="IE=edge" />') : undefined;
6251 + "development" !== 'production' ? warning(!ieCompatibilityMode, 'Internet Explorer is running in compatibility mode; please add the ' + 'following tag to your HTML to prevent this from happening: ' + '<meta http-equiv="X-UA-Compatible" content="IE=edge" />') : void 0;
6252
6253 var expectedFeatures = [
6254 // shims
6158 - Array.isArray, Array.prototype.every, Array.prototype.forEach, Array.prototype.indexOf, Array.prototype.map, Date.now, Function.prototype.bind, Object.keys, String.prototype.split, String.prototype.trim,
6159 -
6160 - // shams
6161 - Object.create, Object.freeze];
6255 + Array.isArray, Array.prototype.every, Array.prototype.forEach, Array.prototype.indexOf, Array.prototype.map, Date.now, Function.prototype.bind, Object.keys, String.prototype.split, String.prototype.trim];
6256
6257 for (var i = 0; i < expectedFeatures.length; i++) {
6258 if (!expectedFeatures[i]) {
6165 - console.error('One or more ES5 shim/shams expected by React are not available: ' + 'https://fb.me/react-warning-polyfills');
6259 + "development" !== 'production' ? warning(false, 'One or more ES5 shims expected by React are not available: ' + 'https://fb.me/react-warning-polyfills') : void 0;
6260 break;
6261 }
6262 }
@@ -6170,9 +6264,9 @@ if ("development" !== 'production') {
6264 }
6265
6266 module.exports = React;
6173 -},{"108":108,"123":123,"130":130,"155":155,"34":34,"46":46,"49":49,"61":61,"65":65,"71":71,"76":76,"83":83,"84":84}],36:[function(_dereq_,module,exports){
6267 +},{"118":118,"126":126,"135":135,"142":142,"166":166,"38":38,"57":57,"73":73,"80":80,"85":85,"92":92,"93":93}],35:[function(_dereq_,module,exports){
6268 /**
6175 - * Copyright 2013-2015, Facebook, Inc.
6269 + * Copyright 2013-present, Facebook, Inc.
6270 * All rights reserved.
6271 *
6272 * This source code is licensed under the BSD-style license found in the
@@ -6203,7 +6297,7 @@ var mouseListenerNames = {
6297 * when `disabled` is set.
6298 */
6299 var ReactDOMButton = {
6206 - getNativeProps: function (inst, props, context) {
6300 + getNativeProps: function (inst, props) {
6301 if (!props.disabled) {
6302 return props;
6303 }
@@ -6221,9 +6315,9 @@ var ReactDOMButton = {
6315 };
6316
6317 module.exports = ReactDOMButton;
6224 -},{}],37:[function(_dereq_,module,exports){
6318 +},{}],36:[function(_dereq_,module,exports){
6319 /**
6226 - * Copyright 2013-2015, Facebook, Inc.
6320 + * Copyright 2013-present, Facebook, Inc.
6321 * All rights reserved.
6322 *
6323 * This source code is licensed under the BSD-style license found in the
@@ -6231,54 +6325,59 @@ module.exports = ReactDOMButton;
6325 * of patent rights can be found in the PATENTS file in the same directory.
6326 *
6327 * @providesModule ReactDOMComponent
6234 - * @typechecks static-only
6328 */
6329
6330 /* global hasOwnProperty:true */
6331
6332 'use strict';
6333
6241 -var AutoFocusUtils = _dereq_(2);
6242 -var CSSPropertyOperations = _dereq_(5);
6334 +var _assign = _dereq_(167);
6335 +
6336 +var AutoFocusUtils = _dereq_(1);
6337 +var CSSPropertyOperations = _dereq_(4);
6338 +var DOMLazyTree = _dereq_(8);
6339 +var DOMNamespaces = _dereq_(9);
6340 var DOMProperty = _dereq_(10);
6341 var DOMPropertyOperations = _dereq_(11);
6342 var EventConstants = _dereq_(15);
6246 -var ReactBrowserEventEmitter = _dereq_(26);
6247 -var ReactComponentBrowserEnvironment = _dereq_(31);
6248 -var ReactDOMButton = _dereq_(36);
6249 -var ReactDOMInput = _dereq_(41);
6250 -var ReactDOMOption = _dereq_(42);
6251 -var ReactDOMSelect = _dereq_(43);
6252 -var ReactDOMTextarea = _dereq_(47);
6253 -var ReactMount = _dereq_(65);
6254 -var ReactMultiChild = _dereq_(66);
6255 -var ReactPerf = _dereq_(71);
6256 -var ReactUpdateQueue = _dereq_(82);
6257 -
6258 -var assign = _dereq_(23);
6259 -var canDefineProperty = _dereq_(104);
6260 -var escapeTextContentForBrowser = _dereq_(107);
6261 -var invariant = _dereq_(144);
6262 -var isEventSupported = _dereq_(119);
6263 -var keyOf = _dereq_(148);
6264 -var setInnerHTML = _dereq_(124);
6265 -var setTextContent = _dereq_(125);
6266 -var shallowEqual = _dereq_(153);
6267 -var validateDOMNesting = _dereq_(128);
6268 -var warning = _dereq_(155);
6269 -
6270 -var deleteListener = ReactBrowserEventEmitter.deleteListener;
6343 +var EventPluginHub = _dereq_(16);
6344 +var EventPluginRegistry = _dereq_(17);
6345 +var ReactBrowserEventEmitter = _dereq_(25);
6346 +var ReactComponentBrowserEnvironment = _dereq_(30);
6347 +var ReactDOMButton = _dereq_(35);
6348 +var ReactDOMComponentFlags = _dereq_(37);
6349 +var ReactDOMComponentTree = _dereq_(38);
6350 +var ReactDOMInput = _dereq_(45);
6351 +var ReactDOMOption = _dereq_(47);
6352 +var ReactDOMSelect = _dereq_(48);
6353 +var ReactDOMTextarea = _dereq_(52);
6354 +var ReactMultiChild = _dereq_(74);
6355 +var ReactPerf = _dereq_(80);
6356 +
6357 +var escapeTextContentForBrowser = _dereq_(117);
6358 +var invariant = _dereq_(156);
6359 +var isEventSupported = _dereq_(131);
6360 +var keyOf = _dereq_(160);
6361 +var shallowEqual = _dereq_(165);
6362 +var validateDOMNesting = _dereq_(140);
6363 +var warning = _dereq_(166);
6364 +
6365 +var Flags = ReactDOMComponentFlags;
6366 +var deleteListener = EventPluginHub.deleteListener;
6367 +var getNode = ReactDOMComponentTree.getNodeFromInstance;
6368 var listenTo = ReactBrowserEventEmitter.listenTo;
6272 -var registrationNameModules = ReactBrowserEventEmitter.registrationNameModules;
6369 +var registrationNameModules = EventPluginRegistry.registrationNameModules;
6370
6371 // For quickly matching children type, to test if can be treated as content.
6372 var CONTENT_TYPES = { 'string': true, 'number': true };
6373
6277 -var CHILDREN = keyOf({ children: null });
6374 var STYLE = keyOf({ style: null });
6375 var HTML = keyOf({ __html: null });
6280 -
6281 -var ELEMENT_NODE_TYPE = 1;
6376 +var RESERVED_PROPS = {
6377 + children: null,
6378 + dangerouslySetInnerHTML: null,
6379 + suppressContentEditableWarning: null
6380 +};
6381
6382 function getDeclarationErrorAddendum(internalInstance) {
6383 if (internalInstance) {
@@ -6293,71 +6392,6 @@ function getDeclarationErrorAddendum(internalInstance) {
6392 return '';
6393 }
6394
6296 -var legacyPropsDescriptor;
6297 -if ("development" !== 'production') {
6298 - legacyPropsDescriptor = {
6299 - props: {
6300 - enumerable: false,
6301 - get: function () {
6302 - var component = this._reactInternalComponent;
6303 - "development" !== 'production' ? warning(false, 'ReactDOMComponent: Do not access .props of a DOM node; instead, ' + 'recreate the props as `render` did originally or read the DOM ' + 'properties/attributes directly from this node (e.g., ' + 'this.refs.box.className).%s', getDeclarationErrorAddendum(component)) : undefined;
6304 - return component._currentElement.props;
6305 - }
6306 - }
6307 - };
6308 -}
6309 -
6310 -function legacyGetDOMNode() {
6311 - if ("development" !== 'production') {
6312 - var component = this._reactInternalComponent;
6313 - "development" !== 'production' ? warning(false, 'ReactDOMComponent: Do not access .getDOMNode() of a DOM node; ' + 'instead, use the node directly.%s', getDeclarationErrorAddendum(component)) : undefined;
6314 - }
6315 - return this;
6316 -}
6317 -
6318 -function legacyIsMounted() {
6319 - var component = this._reactInternalComponent;
6320 - if ("development" !== 'production') {
6321 - "development" !== 'production' ? warning(false, 'ReactDOMComponent: Do not access .isMounted() of a DOM node.%s', getDeclarationErrorAddendum(component)) : undefined;
6322 - }
6323 - return !!component;
6324 -}
6325 -
6326 -function legacySetStateEtc() {
6327 - if ("development" !== 'production') {
6328 - var component = this._reactInternalComponent;
6329 - "development" !== 'production' ? warning(false, 'ReactDOMComponent: Do not access .setState(), .replaceState(), or ' + '.forceUpdate() of a DOM node. This is a no-op.%s', getDeclarationErrorAddendum(component)) : undefined;
6330 - }
6331 -}
6332 -
6333 -function legacySetProps(partialProps, callback) {
6334 - var component = this._reactInternalComponent;
6335 - if ("development" !== 'production') {
6336 - "development" !== 'production' ? warning(false, 'ReactDOMComponent: Do not access .setProps() of a DOM node. ' + 'Instead, call ReactDOM.render again at the top level.%s', getDeclarationErrorAddendum(component)) : undefined;
6337 - }
6338 - if (!component) {
6339 - return;
6340 - }
6341 - ReactUpdateQueue.enqueueSetPropsInternal(component, partialProps);
6342 - if (callback) {
6343 - ReactUpdateQueue.enqueueCallbackInternal(component, callback);
6344 - }
6345 -}
6346 -
6347 -function legacyReplaceProps(partialProps, callback) {
6348 - var component = this._reactInternalComponent;
6349 - if ("development" !== 'production') {
6350 - "development" !== 'production' ? warning(false, 'ReactDOMComponent: Do not access .replaceProps() of a DOM node. ' + 'Instead, call ReactDOM.render again at the top level.%s', getDeclarationErrorAddendum(component)) : undefined;
6351 - }
6352 - if (!component) {
6353 - return;
6354 - }
6355 - ReactUpdateQueue.enqueueReplacePropsInternal(component, partialProps);
6356 - if (callback) {
6357 - ReactUpdateQueue.enqueueCallbackInternal(component, callback);
6358 - }
6359 -}
6360 -
6395 function friendlyStringify(obj) {
6396 if (typeof obj === 'object') {
6397 if (Array.isArray(obj)) {
@@ -6377,7 +6411,7 @@ function friendlyStringify(obj) {
6411 } else if (typeof obj === 'function') {
6412 return '[function object]';
6413 }
6380 - // Differs from JSON.stringify in that undefined becauses undefined and that
6414 + // Differs from JSON.stringify in that undefined because undefined and that
6415 // inf and nan don't become null
6416 return String(obj);
6417 }
@@ -6407,7 +6441,7 @@ function checkAndWarnForMutatedStyle(style1, style2, component) {
6441
6442 styleMutationWarning[hash] = true;
6443
6410 - "development" !== 'production' ? warning(false, '`%s` was passed a style object that has previously been mutated. ' + 'Mutating `style` is deprecated. Consider cloning it beforehand. Check ' + 'the `render` %s. Previous style: %s. Mutated style: %s.', componentName, owner ? 'of `' + ownerName + '`' : 'using <' + componentName + '>', friendlyStringify(style1), friendlyStringify(style2)) : undefined;
6444 + "development" !== 'production' ? warning(false, '`%s` was passed a style object that has previously been mutated. ' + 'Mutating `style` is deprecated. Consider cloning it beforehand. Check ' + 'the `render` %s. Previous style: %s. Mutated style: %s.', componentName, owner ? 'of `' + ownerName + '`' : 'using <' + componentName + '>', friendlyStringify(style1), friendlyStringify(style2)) : void 0;
6445 }
6446
6447 /**
@@ -6419,35 +6453,36 @@ function assertValidProps(component, props) {
6453 return;
6454 }
6455 // Note the use of `==` which checks for null or undefined.
6422 - if ("development" !== 'production') {
6423 - if (voidElementTags[component._tag]) {
6424 - "development" !== 'production' ? warning(props.children == null && props.dangerouslySetInnerHTML == null, '%s is a void element tag and must not have `children` or ' + 'use `props.dangerouslySetInnerHTML`.%s', component._tag, component._currentElement._owner ? ' Check the render method of ' + component._currentElement._owner.getName() + '.' : '') : undefined;
6425 - }
6456 + if (voidElementTags[component._tag]) {
6457 + !(props.children == null && props.dangerouslySetInnerHTML == null) ? "development" !== 'production' ? invariant(false, '%s is a void element tag and must not have `children` or ' + 'use `props.dangerouslySetInnerHTML`.%s', component._tag, component._currentElement._owner ? ' Check the render method of ' + component._currentElement._owner.getName() + '.' : '') : invariant(false) : void 0;
6458 }
6459 if (props.dangerouslySetInnerHTML != null) {
6428 - !(props.children == null) ? "development" !== 'production' ? invariant(false, 'Can only set one of `children` or `props.dangerouslySetInnerHTML`.') : invariant(false) : undefined;
6429 - !(typeof props.dangerouslySetInnerHTML === 'object' && HTML in props.dangerouslySetInnerHTML) ? "development" !== 'production' ? invariant(false, '`props.dangerouslySetInnerHTML` must be in the form `{__html: ...}`. ' + 'Please visit https://fb.me/react-invariant-dangerously-set-inner-html ' + 'for more information.') : invariant(false) : undefined;
6460 + !(props.children == null) ? "development" !== 'production' ? invariant(false, 'Can only set one of `children` or `props.dangerouslySetInnerHTML`.') : invariant(false) : void 0;
6461 + !(typeof props.dangerouslySetInnerHTML === 'object' && HTML in props.dangerouslySetInnerHTML) ? "development" !== 'production' ? invariant(false, '`props.dangerouslySetInnerHTML` must be in the form `{__html: ...}`. ' + 'Please visit https://fb.me/react-invariant-dangerously-set-inner-html ' + 'for more information.') : invariant(false) : void 0;
6462 }
6463 if ("development" !== 'production') {
6432 - "development" !== 'production' ? warning(props.innerHTML == null, 'Directly setting property `innerHTML` is not permitted. ' + 'For more information, lookup documentation on `dangerouslySetInnerHTML`.') : undefined;
6433 - "development" !== 'production' ? warning(!props.contentEditable || props.children == null, 'A component is `contentEditable` and contains `children` managed by ' + 'React. It is now your responsibility to guarantee that none of ' + 'those nodes are unexpectedly modified or duplicated. This is ' + 'probably not intentional.') : undefined;
6464 + "development" !== 'production' ? warning(props.innerHTML == null, 'Directly setting property `innerHTML` is not permitted. ' + 'For more information, lookup documentation on `dangerouslySetInnerHTML`.') : void 0;
6465 + "development" !== 'production' ? warning(props.suppressContentEditableWarning || !props.contentEditable || props.children == null, 'A component is `contentEditable` and contains `children` managed by ' + 'React. It is now your responsibility to guarantee that none of ' + 'those nodes are unexpectedly modified or duplicated. This is ' + 'probably not intentional.') : void 0;
6466 + "development" !== 'production' ? warning(props.onFocusIn == null && props.onFocusOut == null, 'React uses onFocus and onBlur instead of onFocusIn and onFocusOut. ' + 'All React events are normalized to bubble, so onFocusIn and onFocusOut ' + 'are not needed/supported by React.') : void 0;
6467 }
6435 - !(props.style == null || typeof props.style === 'object') ? "development" !== 'production' ? invariant(false, 'The `style` prop expects a mapping from style properties to values, ' + 'not a string. For example, style={{marginRight: spacing + \'em\'}} when ' + 'using JSX.%s', getDeclarationErrorAddendum(component)) : invariant(false) : undefined;
6468 + !(props.style == null || typeof props.style === 'object') ? "development" !== 'production' ? invariant(false, 'The `style` prop expects a mapping from style properties to values, ' + 'not a string. For example, style={{marginRight: spacing + \'em\'}} when ' + 'using JSX.%s', getDeclarationErrorAddendum(component)) : invariant(false) : void 0;
6469 }
6470
6438 -function enqueuePutListener(id, registrationName, listener, transaction) {
6471 +function enqueuePutListener(inst, registrationName, listener, transaction) {
6472 if ("development" !== 'production') {
6473 // IE8 has no API for event capturing and the `onScroll` event doesn't
6474 // bubble.
6442 - "development" !== 'production' ? warning(registrationName !== 'onScroll' || isEventSupported('scroll', true), 'This browser doesn\'t support the `onScroll` event') : undefined;
6475 + "development" !== 'production' ? warning(registrationName !== 'onScroll' || isEventSupported('scroll', true), 'This browser doesn\'t support the `onScroll` event') : void 0;
6476 }
6444 - var container = ReactMount.findReactContainerForID(id);
6445 - if (container) {
6446 - var doc = container.nodeType === ELEMENT_NODE_TYPE ? container.ownerDocument : container;
6447 - listenTo(registrationName, doc);
6477 + var containerInfo = inst._nativeContainerInfo;
6478 + var doc = containerInfo._ownerDocument;
6479 + if (!doc) {
6480 + // Server rendering.
6481 + return;
6482 }
6483 + listenTo(registrationName, doc);
6484 transaction.getReactMountReady().enqueue(putListener, {
6450 - id: id,
6485 + inst: inst,
6486 registrationName: registrationName,
6487 listener: listener
6488 });
@@ -6455,7 +6490,7 @@ function enqueuePutListener(id, registrationName, listener, transaction) {
6490
6491 function putListener() {
6492 var listenerToPut = this;
6458 - ReactBrowserEventEmitter.putListener(listenerToPut.id, listenerToPut.registrationName, listenerToPut.listener);
6493 + EventPluginHub.putListener(listenerToPut.inst, listenerToPut.registrationName, listenerToPut.listener);
6494 }
6495
6496 // There are so many media events, it makes sense to just
@@ -6490,19 +6525,20 @@ function trapBubbledEventsLocal() {
6525 var inst = this;
6526 // If a component renders to null or if another component fatals and causes
6527 // the state of the tree to be corrupted, `node` here can be null.
6493 - !inst._rootNodeID ? "development" !== 'production' ? invariant(false, 'Must be mounted to trap events') : invariant(false) : undefined;
6494 - var node = ReactMount.getNode(inst._rootNodeID);
6495 - !node ? "development" !== 'production' ? invariant(false, 'trapBubbledEvent(...): Requires node to be rendered.') : invariant(false) : undefined;
6528 + !inst._rootNodeID ? "development" !== 'production' ? invariant(false, 'Must be mounted to trap events') : invariant(false) : void 0;
6529 + var node = getNode(inst);
6530 + !node ? "development" !== 'production' ? invariant(false, 'trapBubbledEvent(...): Requires node to be rendered.') : invariant(false) : void 0;
6531
6532 switch (inst._tag) {
6533 case 'iframe':
6534 + case 'object':
6535 inst._wrapperState.listeners = [ReactBrowserEventEmitter.trapBubbledEvent(EventConstants.topLevelTypes.topLoad, 'load', node)];
6536 break;
6537 case 'video':
6538 case 'audio':
6539
6540 inst._wrapperState.listeners = [];
6505 - // create listener for each media event
6541 + // Create listener for each media event
6542 for (var event in mediaEvents) {
6543 if (mediaEvents.hasOwnProperty(event)) {
6544 inst._wrapperState.listeners.push(ReactBrowserEventEmitter.trapBubbledEvent(EventConstants.topLevelTypes[event], mediaEvents[event], node));
@@ -6516,19 +6552,20 @@ function trapBubbledEventsLocal() {
6552 case 'form':
6553 inst._wrapperState.listeners = [ReactBrowserEventEmitter.trapBubbledEvent(EventConstants.topLevelTypes.topReset, 'reset', node), ReactBrowserEventEmitter.trapBubbledEvent(EventConstants.topLevelTypes.topSubmit, 'submit', node)];
6554 break;
6555 + case 'input':
6556 + case 'select':
6557 + case 'textarea':
6558 + inst._wrapperState.listeners = [ReactBrowserEventEmitter.trapBubbledEvent(EventConstants.topLevelTypes.topInvalid, 'invalid', node)];
6559 + break;
6560 }
6561 }
6562
6522 -function mountReadyInputWrapper() {
6523 - ReactDOMInput.mountReadyWrapper(this);
6524 -}
6525 -
6563 function postUpdateSelectWrapper() {
6564 ReactDOMSelect.postUpdateWrapper(this);
6565 }
6566
6567 // For HTML, certain tags should omit their close tag. We keep a whitelist for
6531 -// those special cased tags.
6568 +// those special-case tags.
6569
6570 var omittedCloseTags = {
6571 'area': true,
@@ -6558,7 +6595,7 @@ var newlineEatingTags = {
6595 // For HTML, certain tags cannot have children. This has the same purpose as
6596 // `omittedCloseTags` except that `menuitem` should still have its closing tag.
6597
6561 -var voidElementTags = assign({
6598 +var voidElementTags = _assign({
6599 'menuitem': true
6600 }, omittedCloseTags);
6601
@@ -6568,27 +6605,21 @@ var voidElementTags = assign({
6605
6606 var VALID_TAG_REGEX = /^[a-zA-Z][a-zA-Z:_\.\-\d]*$/; // Simplified subset
6607 var validatedTagCache = {};
6571 -var hasOwnProperty = ({}).hasOwnProperty;
6608 +var hasOwnProperty = {}.hasOwnProperty;
6609
6610 function validateDangerousTag(tag) {
6611 if (!hasOwnProperty.call(validatedTagCache, tag)) {
6575 - !VALID_TAG_REGEX.test(tag) ? "development" !== 'production' ? invariant(false, 'Invalid tag: %s', tag) : invariant(false) : undefined;
6612 + !VALID_TAG_REGEX.test(tag) ? "development" !== 'production' ? invariant(false, 'Invalid tag: %s', tag) : invariant(false) : void 0;
6613 validatedTagCache[tag] = true;
6614 }
6615 }
6616
6580 -function processChildContextDev(context, inst) {
6581 - // Pass down our tag name to child components for validation purposes
6582 - context = assign({}, context);
6583 - var info = context[validateDOMNesting.ancestorInfoContextKey];
6584 - context[validateDOMNesting.ancestorInfoContextKey] = validateDOMNesting.updatedAncestorInfo(info, inst._tag, inst);
6585 - return context;
6586 -}
6587 -
6617 function isCustomComponent(tagName, props) {
6618 return tagName.indexOf('-') >= 0 || props.is != null;
6619 }
6620
6621 +var globalIdCounter = 1;
6622 +
6623 /**
6624 * Creates a new React class that is idempotent and capable of containing other
6625 * React components. It accepts event listeners and DOM properties that are
@@ -6603,19 +6634,25 @@ function isCustomComponent(tagName, props) {
6634 * @constructor ReactDOMComponent
6635 * @extends ReactMultiChild
6636 */
6606 -function ReactDOMComponent(tag) {
6637 +function ReactDOMComponent(element) {
6638 + var tag = element.type;
6639 validateDangerousTag(tag);
6640 + this._currentElement = element;
6641 this._tag = tag.toLowerCase();
6642 + this._namespaceURI = null;
6643 this._renderedChildren = null;
6644 this._previousStyle = null;
6645 this._previousStyleCopy = null;
6646 + this._nativeNode = null;
6647 + this._nativeParent = null;
6648 this._rootNodeID = null;
6649 + this._domID = null;
6650 + this._nativeContainerInfo = null;
6651 this._wrapperState = null;
6652 this._topLevelWrapper = null;
6615 - this._nodeWithLegacyProperties = null;
6653 + this._flags = 0;
6654 if ("development" !== 'production') {
6617 - this._unprocessedContextDev = null;
6618 - this._processedContextDev = null;
6655 + this._ancestorInfo = null;
6656 }
6657 }
6658
@@ -6623,27 +6660,28 @@ ReactDOMComponent.displayName = 'ReactDOMComponent';
6660
6661 ReactDOMComponent.Mixin = {
6662
6626 - construct: function (element) {
6627 - this._currentElement = element;
6628 - },
6629 -
6663 /**
6664 * Generates root tag markup then recurses. This method has side effects and
6665 * is not idempotent.
6666 *
6667 * @internal
6635 - * @param {string} rootID The root DOM ID for this node.
6668 * @param {ReactReconcileTransaction|ReactServerRenderingTransaction} transaction
6669 + * @param {?ReactDOMComponent} the containing DOM component instance
6670 + * @param {?object} info about the native container
6671 * @param {object} context
6672 * @return {string} The computed markup.
6673 */
6640 - mountComponent: function (rootID, transaction, context) {
6641 - this._rootNodeID = rootID;
6674 + mountComponent: function (transaction, nativeParent, nativeContainerInfo, context) {
6675 + this._rootNodeID = globalIdCounter++;
6676 + this._domID = nativeContainerInfo._idCounter++;
6677 + this._nativeParent = nativeParent;
6678 + this._nativeContainerInfo = nativeContainerInfo;
6679
6680 var props = this._currentElement.props;
6681
6682 switch (this._tag) {
6683 case 'iframe':
6684 + case 'object':
6685 case 'img':
6686 case 'form':
6687 case 'video':
@@ -6654,50 +6692,96 @@ ReactDOMComponent.Mixin = {
6692 transaction.getReactMountReady().enqueue(trapBubbledEventsLocal, this);
6693 break;
6694 case 'button':
6657 - props = ReactDOMButton.getNativeProps(this, props, context);
6695 + props = ReactDOMButton.getNativeProps(this, props, nativeParent);
6696 break;
6697 case 'input':
6660 - ReactDOMInput.mountWrapper(this, props, context);
6661 - props = ReactDOMInput.getNativeProps(this, props, context);
6698 + ReactDOMInput.mountWrapper(this, props, nativeParent);
6699 + props = ReactDOMInput.getNativeProps(this, props);
6700 + transaction.getReactMountReady().enqueue(trapBubbledEventsLocal, this);
6701 break;
6702 case 'option':
6664 - ReactDOMOption.mountWrapper(this, props, context);
6665 - props = ReactDOMOption.getNativeProps(this, props, context);
6703 + ReactDOMOption.mountWrapper(this, props, nativeParent);
6704 + props = ReactDOMOption.getNativeProps(this, props);
6705 break;
6706 case 'select':
6668 - ReactDOMSelect.mountWrapper(this, props, context);
6669 - props = ReactDOMSelect.getNativeProps(this, props, context);
6670 - context = ReactDOMSelect.processChildContext(this, props, context);
6707 + ReactDOMSelect.mountWrapper(this, props, nativeParent);
6708 + props = ReactDOMSelect.getNativeProps(this, props);
6709 + transaction.getReactMountReady().enqueue(trapBubbledEventsLocal, this);
6710 break;
6711 case 'textarea':
6673 - ReactDOMTextarea.mountWrapper(this, props, context);
6674 - props = ReactDOMTextarea.getNativeProps(this, props, context);
6712 + ReactDOMTextarea.mountWrapper(this, props, nativeParent);
6713 + props = ReactDOMTextarea.getNativeProps(this, props);
6714 + transaction.getReactMountReady().enqueue(trapBubbledEventsLocal, this);
6715 break;
6716 }
6717
6718 assertValidProps(this, props);
6679 - if ("development" !== 'production') {
6680 - if (context[validateDOMNesting.ancestorInfoContextKey]) {
6681 - validateDOMNesting(this._tag, this, context[validateDOMNesting.ancestorInfoContextKey]);
6719 +
6720 + // We create tags in the namespace of their parent container, except HTML
6721 + // tags get no namespace.
6722 + var namespaceURI;
6723 + var parentTag;
6724 + if (nativeParent != null) {
6725 + namespaceURI = nativeParent._namespaceURI;
6726 + parentTag = nativeParent._tag;
6727 + } else if (nativeContainerInfo._tag) {
6728 + namespaceURI = nativeContainerInfo._namespaceURI;
6729 + parentTag = nativeContainerInfo._tag;
6730 + }
6731 + if (namespaceURI == null || namespaceURI === DOMNamespaces.svg && parentTag === 'foreignobject') {
6732 + namespaceURI = DOMNamespaces.html;
6733 + }
6734 + if (namespaceURI === DOMNamespaces.html) {
6735 + if (this._tag === 'svg') {
6736 + namespaceURI = DOMNamespaces.svg;
6737 + } else if (this._tag === 'math') {
6738 + namespaceURI = DOMNamespaces.mathml;

This file is too large to show in full.