From 021e209ce0fbfa5fa993ad43e8167a29a759d120 Mon Sep 17 00:00:00 2001 From: Maximilian Hils Date: Thu, 27 Nov 2014 01:37:36 +0100 Subject: web: update dependencies --- libmproxy/web/static/js/vendor.js | 10664 ++++++++++++++++-------------------- 1 file changed, 4622 insertions(+), 6042 deletions(-) (limited to 'libmproxy/web') diff --git a/libmproxy/web/static/js/vendor.js b/libmproxy/web/static/js/vendor.js index c4a12946..bdb525fc 100644 --- a/libmproxy/web/static/js/vendor.js +++ b/libmproxy/web/static/js/vendor.js @@ -15976,23 +15976,68 @@ return jQuery; }.call(this)); /** - * React (with addons) v0.11.1 + * React (with addons) v0.12.1 */ -!function(e){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var f;"undefined"!=typeof window?f=window:"undefined"!=typeof global?f=global:"undefined"!=typeof self&&(f=self),f.React=e()}}(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);throw new Error("Cannot find module '"+o+"'")}var f=n[o]={exports:{}};t[o][0].call(f.exports,function(e){var n=t[o][1][e];return s(n?n:e)},f,f.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o -1) { + warnHyphenatedStyleName(styleName); + } + } var styleValue = styles[styleName]; if (styleValue != null) { serialized += processStyleName(styleName) + ':'; @@ -16553,7 +16608,15 @@ var CSSPropertyOperations = { if (!styles.hasOwnProperty(styleName)) { continue; } + if ("production" !== "development") { + if (styleName.indexOf('-') > -1) { + warnHyphenatedStyleName(styleName); + } + } var styleValue = dangerousStyleValue(styleName, styles[styleName]); + if (styleName === 'float') { + styleName = styleFloatAccessor; + } if (styleValue) { style[styleName] = styleValue; } else { @@ -16575,21 +16638,14 @@ var CSSPropertyOperations = { module.exports = CSSPropertyOperations; -},{"./CSSProperty":4,"./dangerousStyleValue":115,"./hyphenateStyleName":132,"./memoizeStringOnly":143}],6:[function(_dereq_,module,exports){ +},{"./CSSProperty":5,"./ExecutionEnvironment":23,"./camelizeStyleName":112,"./dangerousStyleValue":119,"./hyphenateStyleName":138,"./memoizeStringOnly":149,"./warning":160}],7:[function(_dereq_,module,exports){ /** - * Copyright 2013-2014 Facebook, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * Copyright 2013-2014, Facebook, Inc. + * All rights reserved. * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. * * @providesModule CallbackQueue */ @@ -16598,8 +16654,8 @@ module.exports = CSSPropertyOperations; var PooledClass = _dereq_("./PooledClass"); +var assign = _dereq_("./Object.assign"); var invariant = _dereq_("./invariant"); -var mixInto = _dereq_("./mixInto"); /** * A specialized pseudo-event module to help keep track of components waiting to @@ -16617,7 +16673,7 @@ function CallbackQueue() { this._contexts = null; } -mixInto(CallbackQueue, { +assign(CallbackQueue.prototype, { /** * Enqueues a callback to be invoked when `notifyAll` is invoked. @@ -16680,21 +16736,14 @@ PooledClass.addPoolingTo(CallbackQueue); module.exports = CallbackQueue; -},{"./PooledClass":28,"./invariant":134,"./mixInto":147}],7:[function(_dereq_,module,exports){ +},{"./Object.assign":29,"./PooledClass":30,"./invariant":140}],8:[function(_dereq_,module,exports){ /** - * Copyright 2013-2014 Facebook, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * Copyright 2013-2014, Facebook, Inc. + * All rights reserved. * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. * * @providesModule ChangeEventPlugin */ @@ -17069,21 +17118,14 @@ var ChangeEventPlugin = { module.exports = ChangeEventPlugin; -},{"./EventConstants":16,"./EventPluginHub":18,"./EventPropagators":21,"./ExecutionEnvironment":22,"./ReactUpdates":87,"./SyntheticEvent":96,"./isEventSupported":135,"./isTextInputElement":137,"./keyOf":141}],8:[function(_dereq_,module,exports){ +},{"./EventConstants":17,"./EventPluginHub":19,"./EventPropagators":22,"./ExecutionEnvironment":23,"./ReactUpdates":91,"./SyntheticEvent":99,"./isEventSupported":141,"./isTextInputElement":143,"./keyOf":147}],9:[function(_dereq_,module,exports){ /** - * Copyright 2013-2014 Facebook, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * Copyright 2013-2014, Facebook, Inc. + * All rights reserved. * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. * * @providesModule ClientReactRootIndex * @typechecks @@ -17101,21 +17143,14 @@ var ClientReactRootIndex = { module.exports = ClientReactRootIndex; -},{}],9:[function(_dereq_,module,exports){ +},{}],10:[function(_dereq_,module,exports){ /** - * Copyright 2013-2014 Facebook, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * Copyright 2013-2014, Facebook, Inc. + * All rights reserved. * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. * * @providesModule CompositionEventPlugin * @typechecks static-only @@ -17367,21 +17402,14 @@ var CompositionEventPlugin = { module.exports = CompositionEventPlugin; -},{"./EventConstants":16,"./EventPropagators":21,"./ExecutionEnvironment":22,"./ReactInputSelection":63,"./SyntheticCompositionEvent":94,"./getTextContentAccessor":129,"./keyOf":141}],10:[function(_dereq_,module,exports){ +},{"./EventConstants":17,"./EventPropagators":22,"./ExecutionEnvironment":23,"./ReactInputSelection":65,"./SyntheticCompositionEvent":97,"./getTextContentAccessor":135,"./keyOf":147}],11:[function(_dereq_,module,exports){ /** - * Copyright 2013-2014 Facebook, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * Copyright 2013-2014, Facebook, Inc. + * All rights reserved. * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. * * @providesModule DOMChildrenOperations * @typechecks static-only @@ -17489,9 +17517,9 @@ var DOMChildrenOperations = { '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 when using tables, ' + - 'nesting

or tags, or using non-SVG elements in an '+ - 'parent. Try inspecting the child nodes of the element with React ' + - 'ID `%s`.', + 'nesting tags like
,

, or , or using non-SVG elements '+ + 'in an parent. Try inspecting the child nodes of the element ' + + 'with React ID `%s`.', updatedIndex, parentID ) : invariant(updatedChild)); @@ -17547,21 +17575,14 @@ var DOMChildrenOperations = { module.exports = DOMChildrenOperations; -},{"./Danger":13,"./ReactMultiChildUpdateTypes":69,"./getTextContentAccessor":129,"./invariant":134}],11:[function(_dereq_,module,exports){ +},{"./Danger":14,"./ReactMultiChildUpdateTypes":72,"./getTextContentAccessor":135,"./invariant":140}],12:[function(_dereq_,module,exports){ /** - * Copyright 2013-2014 Facebook, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * Copyright 2013-2014, Facebook, Inc. + * All rights reserved. * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. * * @providesModule DOMProperty * @typechecks static-only @@ -17573,6 +17594,10 @@ module.exports = DOMChildrenOperations; var invariant = _dereq_("./invariant"); +function checkMask(value, bitmask) { + return (value & bitmask) === bitmask; +} + var DOMPropertyInjection = { /** * Mapping from normalized, camelcased property names to a configuration that @@ -17659,19 +17684,19 @@ var DOMPropertyInjection = { var propConfig = Properties[propName]; DOMProperty.mustUseAttribute[propName] = - propConfig & DOMPropertyInjection.MUST_USE_ATTRIBUTE; + checkMask(propConfig, DOMPropertyInjection.MUST_USE_ATTRIBUTE); DOMProperty.mustUseProperty[propName] = - propConfig & DOMPropertyInjection.MUST_USE_PROPERTY; + checkMask(propConfig, DOMPropertyInjection.MUST_USE_PROPERTY); DOMProperty.hasSideEffects[propName] = - propConfig & DOMPropertyInjection.HAS_SIDE_EFFECTS; + checkMask(propConfig, DOMPropertyInjection.HAS_SIDE_EFFECTS); DOMProperty.hasBooleanValue[propName] = - propConfig & DOMPropertyInjection.HAS_BOOLEAN_VALUE; + checkMask(propConfig, DOMPropertyInjection.HAS_BOOLEAN_VALUE); DOMProperty.hasNumericValue[propName] = - propConfig & DOMPropertyInjection.HAS_NUMERIC_VALUE; + checkMask(propConfig, DOMPropertyInjection.HAS_NUMERIC_VALUE); DOMProperty.hasPositiveNumericValue[propName] = - propConfig & DOMPropertyInjection.HAS_POSITIVE_NUMERIC_VALUE; + checkMask(propConfig, DOMPropertyInjection.HAS_POSITIVE_NUMERIC_VALUE); DOMProperty.hasOverloadedBooleanValue[propName] = - propConfig & DOMPropertyInjection.HAS_OVERLOADED_BOOLEAN_VALUE; + checkMask(propConfig, DOMPropertyInjection.HAS_OVERLOADED_BOOLEAN_VALUE); ("production" !== "development" ? invariant( !DOMProperty.mustUseAttribute[propName] || @@ -17847,21 +17872,14 @@ var DOMProperty = { module.exports = DOMProperty; -},{"./invariant":134}],12:[function(_dereq_,module,exports){ +},{"./invariant":140}],13:[function(_dereq_,module,exports){ /** - * Copyright 2013-2014 Facebook, Inc. + * Copyright 2013-2014, Facebook, Inc. + * All rights reserved. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. * * @providesModule DOMPropertyOperations * @typechecks static-only @@ -17988,10 +18006,17 @@ var DOMPropertyOperations = { } else if (shouldIgnoreValue(name, value)) { this.deleteValueForProperty(node, name); } else if (DOMProperty.mustUseAttribute[name]) { + // `setAttribute` with objects becomes only `[object]` in IE8/9, + // ('' + value) makes it output the correct toString()-value. node.setAttribute(DOMProperty.getAttributeName[name], '' + value); } else { var propName = DOMProperty.getPropertyName[name]; - if (!DOMProperty.hasSideEffects[name] || node[propName] !== value) { + // Must explicitly cast values for HAS_SIDE_EFFECTS-properties to the + // property type before comparing; only `value` does and is string. + if (!DOMProperty.hasSideEffects[name] || + ('' + node[propName]) !== ('' + value)) { + // Contrary to `setAttribute`, object properties are properly + // `toString`ed by IE8/9. node[propName] = value; } } @@ -18027,7 +18052,7 @@ var DOMPropertyOperations = { propName ); if (!DOMProperty.hasSideEffects[name] || - node[propName] !== defaultValue) { + ('' + node[propName]) !== defaultValue) { node[propName] = defaultValue; } } @@ -18042,21 +18067,14 @@ var DOMPropertyOperations = { module.exports = DOMPropertyOperations; -},{"./DOMProperty":11,"./escapeTextForBrowser":118,"./memoizeStringOnly":143,"./warning":158}],13:[function(_dereq_,module,exports){ +},{"./DOMProperty":12,"./escapeTextForBrowser":123,"./memoizeStringOnly":149,"./warning":160}],14:[function(_dereq_,module,exports){ /** - * Copyright 2013-2014 Facebook, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * Copyright 2013-2014, Facebook, Inc. + * All rights reserved. * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. * * @providesModule Danger * @typechecks static-only @@ -18105,9 +18123,10 @@ var Danger = { dangerouslyRenderMarkup: function(markupList) { ("production" !== "development" ? invariant( ExecutionEnvironment.canUseDOM, - 'dangerouslyRenderMarkup(...): Cannot render markup in a Worker ' + - 'thread. This is likely a bug in the framework. Please report ' + - 'immediately.' + 'dangerouslyRenderMarkup(...): Cannot render markup in a worker ' + + 'thread. Make sure `window` and `document` are available globally ' + + 'before requiring React when unit testing or use ' + + 'React.renderToString for server rendering.' ) : invariant(ExecutionEnvironment.canUseDOM)); var nodeName; var markupByNodeName = {}; @@ -18211,8 +18230,9 @@ var Danger = { ("production" !== "development" ? invariant( ExecutionEnvironment.canUseDOM, 'dangerouslyReplaceNodeWithMarkup(...): Cannot render markup in a ' + - 'worker thread. This is likely a bug in the framework. Please report ' + - 'immediately.' + 'worker thread. Make sure `window` and `document` are available ' + + 'globally before requiring React when unit testing or use ' + + 'React.renderToString for server rendering.' ) : invariant(ExecutionEnvironment.canUseDOM)); ("production" !== "development" ? invariant(markup, 'dangerouslyReplaceNodeWithMarkup(...): Missing markup.') : invariant(markup)); ("production" !== "development" ? invariant( @@ -18231,21 +18251,14 @@ var Danger = { module.exports = Danger; -},{"./ExecutionEnvironment":22,"./createNodesFromMarkup":113,"./emptyFunction":116,"./getMarkupWrap":126,"./invariant":134}],14:[function(_dereq_,module,exports){ +},{"./ExecutionEnvironment":23,"./createNodesFromMarkup":117,"./emptyFunction":121,"./getMarkupWrap":132,"./invariant":140}],15:[function(_dereq_,module,exports){ /** - * Copyright 2013-2014 Facebook, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * Copyright 2013-2014, Facebook, Inc. + * All rights reserved. * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. * * @providesModule DefaultEventPluginOrder */ @@ -18278,21 +18291,14 @@ var DefaultEventPluginOrder = [ module.exports = DefaultEventPluginOrder; -},{"./keyOf":141}],15:[function(_dereq_,module,exports){ +},{"./keyOf":147}],16:[function(_dereq_,module,exports){ /** - * Copyright 2013-2014 Facebook, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * Copyright 2013-2014, Facebook, Inc. + * All rights reserved. * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. * * @providesModule EnterLeaveEventPlugin * @typechecks static-only @@ -18425,21 +18431,14 @@ var EnterLeaveEventPlugin = { module.exports = EnterLeaveEventPlugin; -},{"./EventConstants":16,"./EventPropagators":21,"./ReactMount":67,"./SyntheticMouseEvent":100,"./keyOf":141}],16:[function(_dereq_,module,exports){ +},{"./EventConstants":17,"./EventPropagators":22,"./ReactMount":70,"./SyntheticMouseEvent":103,"./keyOf":147}],17:[function(_dereq_,module,exports){ /** - * Copyright 2013-2014 Facebook, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * Copyright 2013-2014, Facebook, Inc. + * All rights reserved. * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. * * @providesModule EventConstants */ @@ -18504,8 +18503,22 @@ var EventConstants = { module.exports = EventConstants; -},{"./keyMirror":140}],17:[function(_dereq_,module,exports){ +},{"./keyMirror":146}],18:[function(_dereq_,module,exports){ /** + * Copyright 2013-2014 Facebook, Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * * @providesModule EventListener * @typechecks */ @@ -18578,21 +18591,14 @@ var EventListener = { module.exports = EventListener; -},{"./emptyFunction":116}],18:[function(_dereq_,module,exports){ +},{"./emptyFunction":121}],19:[function(_dereq_,module,exports){ /** - * Copyright 2013-2014 Facebook, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * Copyright 2013-2014, Facebook, Inc. + * All rights reserved. * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. * * @providesModule EventPluginHub */ @@ -18602,11 +18608,9 @@ module.exports = EventListener; var EventPluginRegistry = _dereq_("./EventPluginRegistry"); var EventPluginUtils = _dereq_("./EventPluginUtils"); -var accumulate = _dereq_("./accumulate"); +var accumulateInto = _dereq_("./accumulateInto"); var forEachAccumulated = _dereq_("./forEachAccumulated"); var invariant = _dereq_("./invariant"); -var isEventSupported = _dereq_("./isEventSupported"); -var monitorCodeUse = _dereq_("./monitorCodeUse"); /** * Internal store for event listeners @@ -18740,15 +18744,6 @@ var EventPluginHub = { registrationName, typeof listener ) : invariant(!listener || typeof listener === 'function')); - if ("production" !== "development") { - // IE8 has no API for event capturing and the `onScroll` event doesn't - // bubble. - if (registrationName === 'onScroll' && - !isEventSupported('scroll', true)) { - monitorCodeUse('react_no_scroll_event'); - console.warn('This browser doesn\'t support the `onScroll` event'); - } - } var bankForRegistrationName = listenerBank[registrationName] || (listenerBank[registrationName] = {}); bankForRegistrationName[id] = listener; @@ -18817,7 +18812,7 @@ var EventPluginHub = { nativeEvent ); if (extractedEvents) { - events = accumulate(events, extractedEvents); + events = accumulateInto(events, extractedEvents); } } } @@ -18833,7 +18828,7 @@ var EventPluginHub = { */ enqueueEvents: function(events) { if (events) { - eventQueue = accumulate(eventQueue, events); + eventQueue = accumulateInto(eventQueue, events); } }, @@ -18870,21 +18865,14 @@ var EventPluginHub = { module.exports = EventPluginHub; -},{"./EventPluginRegistry":19,"./EventPluginUtils":20,"./accumulate":106,"./forEachAccumulated":121,"./invariant":134,"./isEventSupported":135,"./monitorCodeUse":148}],19:[function(_dereq_,module,exports){ +},{"./EventPluginRegistry":20,"./EventPluginUtils":21,"./accumulateInto":109,"./forEachAccumulated":126,"./invariant":140}],20:[function(_dereq_,module,exports){ /** - * Copyright 2013-2014 Facebook, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * Copyright 2013-2014, Facebook, Inc. + * All rights reserved. * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. * * @providesModule EventPluginRegistry * @typechecks static-only @@ -19155,21 +19143,14 @@ var EventPluginRegistry = { module.exports = EventPluginRegistry; -},{"./invariant":134}],20:[function(_dereq_,module,exports){ +},{"./invariant":140}],21:[function(_dereq_,module,exports){ /** - * Copyright 2013-2014 Facebook, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * Copyright 2013-2014, Facebook, Inc. + * All rights reserved. * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. * * @providesModule EventPluginUtils */ @@ -19381,21 +19362,14 @@ var EventPluginUtils = { module.exports = EventPluginUtils; -},{"./EventConstants":16,"./invariant":134}],21:[function(_dereq_,module,exports){ +},{"./EventConstants":17,"./invariant":140}],22:[function(_dereq_,module,exports){ /** - * Copyright 2013-2014 Facebook, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * Copyright 2013-2014, Facebook, Inc. + * All rights reserved. * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. * * @providesModule EventPropagators */ @@ -19405,7 +19379,7 @@ module.exports = EventPluginUtils; var EventConstants = _dereq_("./EventConstants"); var EventPluginHub = _dereq_("./EventPluginHub"); -var accumulate = _dereq_("./accumulate"); +var accumulateInto = _dereq_("./accumulateInto"); var forEachAccumulated = _dereq_("./forEachAccumulated"); var PropagationPhases = EventConstants.PropagationPhases; @@ -19436,8 +19410,9 @@ function accumulateDirectionalDispatches(domID, upwards, event) { var phase = upwards ? PropagationPhases.bubbled : PropagationPhases.captured; var listener = listenerAtPhase(domID, event, phase); if (listener) { - event._dispatchListeners = accumulate(event._dispatchListeners, listener); - event._dispatchIDs = accumulate(event._dispatchIDs, domID); + event._dispatchListeners = + accumulateInto(event._dispatchListeners, listener); + event._dispatchIDs = accumulateInto(event._dispatchIDs, domID); } } @@ -19469,8 +19444,9 @@ function accumulateDispatches(id, ignoredDirection, event) { var registrationName = event.dispatchConfig.registrationName; var listener = getListener(id, registrationName); if (listener) { - event._dispatchListeners = accumulate(event._dispatchListeners, listener); - event._dispatchIDs = accumulate(event._dispatchIDs, id); + event._dispatchListeners = + accumulateInto(event._dispatchListeners, listener); + event._dispatchIDs = accumulateInto(event._dispatchIDs, id); } } } @@ -19526,21 +19502,14 @@ var EventPropagators = { module.exports = EventPropagators; -},{"./EventConstants":16,"./EventPluginHub":18,"./accumulate":106,"./forEachAccumulated":121}],22:[function(_dereq_,module,exports){ +},{"./EventConstants":17,"./EventPluginHub":19,"./accumulateInto":109,"./forEachAccumulated":126}],23:[function(_dereq_,module,exports){ /** - * Copyright 2013-2014 Facebook, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * Copyright 2013-2014, Facebook, Inc. + * All rights reserved. * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. * * @providesModule ExecutionEnvironment */ @@ -19578,21 +19547,14 @@ var ExecutionEnvironment = { module.exports = ExecutionEnvironment; -},{}],23:[function(_dereq_,module,exports){ +},{}],24:[function(_dereq_,module,exports){ /** - * Copyright 2013-2014 Facebook, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * Copyright 2013-2014, Facebook, Inc. + * All rights reserved. * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. * * @providesModule HTMLDOMPropertyConfig */ @@ -19637,6 +19599,7 @@ var HTMLDOMPropertyConfig = { * Standard Properties */ accept: null, + acceptCharset: null, accessKey: null, action: null, allowFullScreen: MUST_USE_ATTRIBUTE | HAS_BOOLEAN_VALUE, @@ -19651,6 +19614,7 @@ var HTMLDOMPropertyConfig = { cellSpacing: null, charSet: MUST_USE_ATTRIBUTE, checked: MUST_USE_PROPERTY | HAS_BOOLEAN_VALUE, + classID: MUST_USE_ATTRIBUTE, // To set className on SVG elements, it's necessary to use .setAttribute; // this works on HTML elements too in all browsers except IE8. Conveniently, // IE8 doesn't support SVG and so we can simply use the attribute in @@ -19686,10 +19650,12 @@ var HTMLDOMPropertyConfig = { id: MUST_USE_PROPERTY, label: null, lang: null, - list: null, + list: MUST_USE_ATTRIBUTE, loop: MUST_USE_PROPERTY | HAS_BOOLEAN_VALUE, + manifest: MUST_USE_ATTRIBUTE, max: null, maxLength: MUST_USE_ATTRIBUTE, + media: MUST_USE_ATTRIBUTE, mediaGroup: null, method: null, min: null, @@ -19697,6 +19663,7 @@ var HTMLDOMPropertyConfig = { muted: MUST_USE_PROPERTY | HAS_BOOLEAN_VALUE, name: null, noValidate: HAS_BOOLEAN_VALUE, + open: null, pattern: null, placeholder: null, poster: null, @@ -19710,18 +19677,17 @@ var HTMLDOMPropertyConfig = { rowSpan: null, sandbox: null, scope: null, - scrollLeft: MUST_USE_PROPERTY, scrolling: null, - scrollTop: MUST_USE_PROPERTY, seamless: MUST_USE_ATTRIBUTE | HAS_BOOLEAN_VALUE, selected: MUST_USE_PROPERTY | HAS_BOOLEAN_VALUE, shape: null, size: MUST_USE_ATTRIBUTE | HAS_POSITIVE_NUMERIC_VALUE, + sizes: MUST_USE_ATTRIBUTE, span: HAS_POSITIVE_NUMERIC_VALUE, spellCheck: null, src: null, srcDoc: MUST_USE_PROPERTY, - srcSet: null, + srcSet: MUST_USE_ATTRIBUTE, start: HAS_NUMERIC_VALUE, step: null, style: null, @@ -19745,6 +19711,7 @@ var HTMLDOMPropertyConfig = { property: null // Supports OG in meta tags }, DOMAttributeNames: { + acceptCharset: 'accept-charset', className: 'class', htmlFor: 'for', httpEquiv: 'http-equiv' @@ -19766,21 +19733,14 @@ var HTMLDOMPropertyConfig = { module.exports = HTMLDOMPropertyConfig; -},{"./DOMProperty":11,"./ExecutionEnvironment":22}],24:[function(_dereq_,module,exports){ +},{"./DOMProperty":12,"./ExecutionEnvironment":23}],25:[function(_dereq_,module,exports){ /** - * Copyright 2013-2014 Facebook, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * Copyright 2013-2014, Facebook, Inc. + * All rights reserved. * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. * * @providesModule LinkedStateMixin * @typechecks static-only @@ -19814,21 +19774,14 @@ var LinkedStateMixin = { module.exports = LinkedStateMixin; -},{"./ReactLink":65,"./ReactStateSetters":81}],25:[function(_dereq_,module,exports){ +},{"./ReactLink":68,"./ReactStateSetters":85}],26:[function(_dereq_,module,exports){ /** - * Copyright 2013-2014 Facebook, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * Copyright 2013-2014, Facebook, Inc. + * All rights reserved. * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. * * @providesModule LinkedValueUtils * @typechecks static-only @@ -19975,21 +19928,14 @@ var LinkedValueUtils = { module.exports = LinkedValueUtils; -},{"./ReactPropTypes":75,"./invariant":134}],26:[function(_dereq_,module,exports){ +},{"./ReactPropTypes":79,"./invariant":140}],27:[function(_dereq_,module,exports){ /** - * Copyright 2014 Facebook, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * Copyright 2014, Facebook, Inc. + * All rights reserved. * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. * * @providesModule LocalEventTrapMixin */ @@ -19998,7 +19944,7 @@ module.exports = LinkedValueUtils; var ReactBrowserEventEmitter = _dereq_("./ReactBrowserEventEmitter"); -var accumulate = _dereq_("./accumulate"); +var accumulateInto = _dereq_("./accumulateInto"); var forEachAccumulated = _dereq_("./forEachAccumulated"); var invariant = _dereq_("./invariant"); @@ -20014,7 +19960,8 @@ var LocalEventTrapMixin = { handlerBaseName, this.getDOMNode() ); - this._localEventListeners = accumulate(this._localEventListeners, listener); + this._localEventListeners = + accumulateInto(this._localEventListeners, listener); }, // trapCapturedEvent would look nearly identical. We don't implement that @@ -20029,21 +19976,14 @@ var LocalEventTrapMixin = { module.exports = LocalEventTrapMixin; -},{"./ReactBrowserEventEmitter":31,"./accumulate":106,"./forEachAccumulated":121,"./invariant":134}],27:[function(_dereq_,module,exports){ +},{"./ReactBrowserEventEmitter":33,"./accumulateInto":109,"./forEachAccumulated":126,"./invariant":140}],28:[function(_dereq_,module,exports){ /** - * Copyright 2013-2014 Facebook, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * Copyright 2013-2014, Facebook, Inc. + * All rights reserved. * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. * * @providesModule MobileSafariClickEventPlugin * @typechecks static-only @@ -20094,21 +20034,61 @@ var MobileSafariClickEventPlugin = { module.exports = MobileSafariClickEventPlugin; -},{"./EventConstants":16,"./emptyFunction":116}],28:[function(_dereq_,module,exports){ +},{"./EventConstants":17,"./emptyFunction":121}],29:[function(_dereq_,module,exports){ /** - * Copyright 2013-2014 Facebook, Inc. + * Copyright 2014, Facebook, Inc. + * All rights reserved. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. * - * http://www.apache.org/licenses/LICENSE-2.0 + * @providesModule Object.assign + */ + +// https://people.mozilla.org/~jorendorff/es6-draft.html#sec-object.assign + +function assign(target, sources) { + if (target == null) { + throw new TypeError('Object.assign target cannot be null or undefined'); + } + + var to = Object(target); + var hasOwnProperty = Object.prototype.hasOwnProperty; + + for (var nextIndex = 1; nextIndex < arguments.length; nextIndex++) { + var nextSource = arguments[nextIndex]; + if (nextSource == null) { + continue; + } + + var from = Object(nextSource); + + // We don't currently support accessors nor proxies. Therefore this + // copy cannot throw. If we ever supported this then we must handle + // exceptions and side-effects. We don't support symbols so they won't + // be transferred. + + for (var key in from) { + if (hasOwnProperty.call(from, key)) { + to[key] = from[key]; + } + } + } + + return to; +}; + +module.exports = assign; + +},{}],30:[function(_dereq_,module,exports){ +/** + * Copyright 2013-2014, Facebook, Inc. + * All rights reserved. * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. * * @providesModule PooledClass */ @@ -20215,21 +20195,14 @@ var PooledClass = { module.exports = PooledClass; -},{"./invariant":134}],29:[function(_dereq_,module,exports){ +},{"./invariant":140}],31:[function(_dereq_,module,exports){ /** - * Copyright 2013-2014 Facebook, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * Copyright 2013-2014, Facebook, Inc. + * All rights reserved. * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. * * @providesModule React */ @@ -20243,11 +20216,13 @@ var ReactComponent = _dereq_("./ReactComponent"); var ReactCompositeComponent = _dereq_("./ReactCompositeComponent"); var ReactContext = _dereq_("./ReactContext"); var ReactCurrentOwner = _dereq_("./ReactCurrentOwner"); -var ReactDescriptor = _dereq_("./ReactDescriptor"); +var ReactElement = _dereq_("./ReactElement"); +var ReactElementValidator = _dereq_("./ReactElementValidator"); var ReactDOM = _dereq_("./ReactDOM"); var ReactDOMComponent = _dereq_("./ReactDOMComponent"); var ReactDefaultInjection = _dereq_("./ReactDefaultInjection"); var ReactInstanceHandles = _dereq_("./ReactInstanceHandles"); +var ReactLegacyElement = _dereq_("./ReactLegacyElement"); var ReactMount = _dereq_("./ReactMount"); var ReactMultiChild = _dereq_("./ReactMultiChild"); var ReactPerf = _dereq_("./ReactPerf"); @@ -20255,10 +20230,30 @@ var ReactPropTypes = _dereq_("./ReactPropTypes"); var ReactServerRendering = _dereq_("./ReactServerRendering"); var ReactTextComponent = _dereq_("./ReactTextComponent"); +var assign = _dereq_("./Object.assign"); +var deprecated = _dereq_("./deprecated"); var onlyChild = _dereq_("./onlyChild"); ReactDefaultInjection.inject(); +var createElement = ReactElement.createElement; +var createFactory = ReactElement.createFactory; + +if ("production" !== "development") { + createElement = ReactElementValidator.createElement; + createFactory = ReactElementValidator.createFactory; +} + +// TODO: Drop legacy elements once classes no longer export these factories +createElement = ReactLegacyElement.wrapCreateElement( + createElement +); +createFactory = ReactLegacyElement.wrapCreateFactory( + createFactory +); + +var render = ReactPerf.measure('React', 'render', ReactMount.render); + var React = { Children: { map: ReactChildren.map, @@ -20272,25 +20267,58 @@ var React = { EventPluginUtils.useTouchEvents = shouldUseTouch; }, createClass: ReactCompositeComponent.createClass, - createDescriptor: function(type, props, children) { - var args = Array.prototype.slice.call(arguments, 1); - return type.apply(null, args); - }, + createElement: createElement, + createFactory: createFactory, constructAndRenderComponent: ReactMount.constructAndRenderComponent, constructAndRenderComponentByID: ReactMount.constructAndRenderComponentByID, - renderComponent: ReactPerf.measure( + render: render, + renderToString: ReactServerRendering.renderToString, + renderToStaticMarkup: ReactServerRendering.renderToStaticMarkup, + unmountComponentAtNode: ReactMount.unmountComponentAtNode, + isValidClass: ReactLegacyElement.isValidClass, + isValidElement: ReactElement.isValidElement, + withContext: ReactContext.withContext, + + // Hook for JSX spread, don't use this for anything else. + __spread: assign, + + // Deprecations (remove for 0.13) + renderComponent: deprecated( 'React', 'renderComponent', - ReactMount.renderComponent + 'render', + this, + render ), - renderComponentToString: ReactServerRendering.renderComponentToString, - renderComponentToStaticMarkup: - ReactServerRendering.renderComponentToStaticMarkup, - unmountComponentAtNode: ReactMount.unmountComponentAtNode, - isValidClass: ReactDescriptor.isValidFactory, - isValidComponent: ReactDescriptor.isValidDescriptor, - withContext: ReactContext.withContext, - __internals: { + renderComponentToString: deprecated( + 'React', + 'renderComponentToString', + 'renderToString', + this, + ReactServerRendering.renderToString + ), + renderComponentToStaticMarkup: deprecated( + 'React', + 'renderComponentToStaticMarkup', + 'renderToStaticMarkup', + this, + ReactServerRendering.renderToStaticMarkup + ), + isValidComponent: deprecated( + 'React', + 'isValidComponent', + 'isValidElement', + this, + ReactElement.isValidElement + ) +}; + +// Inject the runtime into a devtools global hook regardless of browser. +// Allows for debugging when the hook is injected on the page. +if ( + typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ !== 'undefined' && + typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.inject === 'function') { + __REACT_DEVTOOLS_GLOBAL_HOOK__.inject({ Component: ReactComponent, CurrentOwner: ReactCurrentOwner, DOMComponent: ReactDOMComponent, @@ -20299,18 +20327,23 @@ var React = { Mount: ReactMount, MultiChild: ReactMultiChild, TextComponent: ReactTextComponent - } -}; + }); +} if ("production" !== "development") { var ExecutionEnvironment = _dereq_("./ExecutionEnvironment"); - if (ExecutionEnvironment.canUseDOM && - window.top === window.self && - navigator.userAgent.indexOf('Chrome') > -1) { - console.debug( - 'Download the React DevTools for a better development experience: ' + - 'http://fb.me/react-devtools' - ); + if (ExecutionEnvironment.canUseDOM && window.top === window.self) { + + // If we're in Chrome, look for the devtools marker and provide a download + // link if not installed. + if (navigator.userAgent.indexOf('Chrome') > -1) { + if (typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ === 'undefined') { + console.debug( + 'Download the React DevTools for a better development experience: ' + + 'http://fb.me/react-devtools' + ); + } + } var expectedFeatures = [ // shims @@ -20330,7 +20363,7 @@ if ("production" !== "development") { Object.freeze ]; - for (var i in expectedFeatures) { + for (var i = 0; i < expectedFeatures.length; i++) { if (!expectedFeatures[i]) { console.error( 'One or more ES5 shim/shams expected by React are not available: ' + @@ -20344,25 +20377,18 @@ if ("production" !== "development") { // Version exists only in the open-source version of React, not in Facebook's // internal version. -React.version = '0.11.1'; +React.version = '0.12.1'; module.exports = React; -},{"./DOMPropertyOperations":12,"./EventPluginUtils":20,"./ExecutionEnvironment":22,"./ReactChildren":34,"./ReactComponent":35,"./ReactCompositeComponent":38,"./ReactContext":39,"./ReactCurrentOwner":40,"./ReactDOM":41,"./ReactDOMComponent":43,"./ReactDefaultInjection":53,"./ReactDescriptor":56,"./ReactInstanceHandles":64,"./ReactMount":67,"./ReactMultiChild":68,"./ReactPerf":71,"./ReactPropTypes":75,"./ReactServerRendering":79,"./ReactTextComponent":83,"./onlyChild":149}],30:[function(_dereq_,module,exports){ +},{"./DOMPropertyOperations":13,"./EventPluginUtils":21,"./ExecutionEnvironment":23,"./Object.assign":29,"./ReactChildren":36,"./ReactComponent":37,"./ReactCompositeComponent":40,"./ReactContext":41,"./ReactCurrentOwner":42,"./ReactDOM":43,"./ReactDOMComponent":45,"./ReactDefaultInjection":55,"./ReactElement":58,"./ReactElementValidator":59,"./ReactInstanceHandles":66,"./ReactLegacyElement":67,"./ReactMount":70,"./ReactMultiChild":71,"./ReactPerf":75,"./ReactPropTypes":79,"./ReactServerRendering":83,"./ReactTextComponent":87,"./deprecated":120,"./onlyChild":151}],32:[function(_dereq_,module,exports){ /** - * Copyright 2013-2014 Facebook, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * Copyright 2013-2014, Facebook, Inc. + * All rights reserved. * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. * * @providesModule ReactBrowserComponentMixin */ @@ -20396,21 +20422,14 @@ var ReactBrowserComponentMixin = { module.exports = ReactBrowserComponentMixin; -},{"./ReactEmptyComponent":58,"./ReactMount":67,"./invariant":134}],31:[function(_dereq_,module,exports){ +},{"./ReactEmptyComponent":60,"./ReactMount":70,"./invariant":140}],33:[function(_dereq_,module,exports){ /** - * Copyright 2013-2014 Facebook, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * Copyright 2013-2014, Facebook, Inc. + * All rights reserved. * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. * * @providesModule ReactBrowserEventEmitter * @typechecks static-only @@ -20424,8 +20443,8 @@ var EventPluginRegistry = _dereq_("./EventPluginRegistry"); var ReactEventEmitterMixin = _dereq_("./ReactEventEmitterMixin"); var ViewportMetrics = _dereq_("./ViewportMetrics"); +var assign = _dereq_("./Object.assign"); var isEventSupported = _dereq_("./isEventSupported"); -var merge = _dereq_("./merge"); /** * Summary of `ReactBrowserEventEmitter` event handling: @@ -20554,7 +20573,7 @@ function getListeningForDocument(mountAt) { * * @internal */ -var ReactBrowserEventEmitter = merge(ReactEventEmitterMixin, { +var ReactBrowserEventEmitter = assign({}, ReactEventEmitterMixin, { /** * Injectable event backend @@ -20758,21 +20777,14 @@ var ReactBrowserEventEmitter = merge(ReactEventEmitterMixin, { module.exports = ReactBrowserEventEmitter; -},{"./EventConstants":16,"./EventPluginHub":18,"./EventPluginRegistry":19,"./ReactEventEmitterMixin":60,"./ViewportMetrics":105,"./isEventSupported":135,"./merge":144}],32:[function(_dereq_,module,exports){ +},{"./EventConstants":17,"./EventPluginHub":19,"./EventPluginRegistry":20,"./Object.assign":29,"./ReactEventEmitterMixin":62,"./ViewportMetrics":108,"./isEventSupported":141}],34:[function(_dereq_,module,exports){ /** - * Copyright 2013-2014 Facebook, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * Copyright 2013-2014, Facebook, Inc. + * All rights reserved. * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. * * @typechecks * @providesModule ReactCSSTransitionGroup @@ -20782,8 +20794,14 @@ module.exports = ReactBrowserEventEmitter; var React = _dereq_("./React"); -var ReactTransitionGroup = _dereq_("./ReactTransitionGroup"); -var ReactCSSTransitionGroupChild = _dereq_("./ReactCSSTransitionGroupChild"); +var assign = _dereq_("./Object.assign"); + +var ReactTransitionGroup = React.createFactory( + _dereq_("./ReactTransitionGroup") +); +var ReactCSSTransitionGroupChild = React.createFactory( + _dereq_("./ReactCSSTransitionGroupChild") +); var ReactCSSTransitionGroup = React.createClass({ displayName: 'ReactCSSTransitionGroup', @@ -20816,10 +20834,9 @@ var ReactCSSTransitionGroup = React.createClass({ }, render: function() { - return this.transferPropsTo( + return ( ReactTransitionGroup( - {childFactory: this._wrapChild}, - this.props.children + assign({}, this.props, {childFactory: this._wrapChild}) ) ); } @@ -20827,21 +20844,14 @@ var ReactCSSTransitionGroup = React.createClass({ module.exports = ReactCSSTransitionGroup; -},{"./React":29,"./ReactCSSTransitionGroupChild":33,"./ReactTransitionGroup":86}],33:[function(_dereq_,module,exports){ +},{"./Object.assign":29,"./React":31,"./ReactCSSTransitionGroupChild":35,"./ReactTransitionGroup":90}],35:[function(_dereq_,module,exports){ /** - * Copyright 2013-2014 Facebook, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * Copyright 2013-2014, Facebook, Inc. + * All rights reserved. * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. * * @typechecks * @providesModule ReactCSSTransitionGroupChild @@ -20886,7 +20896,10 @@ var ReactCSSTransitionGroupChild = React.createClass({ var activeClassName = className + '-active'; var noEventTimeout = null; - var endListener = function() { + var endListener = function(e) { + if (e && e.target !== node) { + return; + } if ("production" !== "development") { clearTimeout(noEventTimeout); } @@ -20964,21 +20977,14 @@ var ReactCSSTransitionGroupChild = React.createClass({ module.exports = ReactCSSTransitionGroupChild; -},{"./CSSCore":3,"./React":29,"./ReactTransitionEvents":85,"./onlyChild":149}],34:[function(_dereq_,module,exports){ +},{"./CSSCore":4,"./React":31,"./ReactTransitionEvents":89,"./onlyChild":151}],36:[function(_dereq_,module,exports){ /** - * Copyright 2013-2014 Facebook, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * Copyright 2013-2014, Facebook, Inc. + * All rights reserved. * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. * * @providesModule ReactChildren */ @@ -21119,34 +21125,27 @@ var ReactChildren = { module.exports = ReactChildren; -},{"./PooledClass":28,"./traverseAllChildren":156,"./warning":158}],35:[function(_dereq_,module,exports){ +},{"./PooledClass":30,"./traverseAllChildren":158,"./warning":160}],37:[function(_dereq_,module,exports){ /** - * Copyright 2013-2014 Facebook, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * Copyright 2013-2014, Facebook, Inc. + * All rights reserved. * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. * * @providesModule ReactComponent */ "use strict"; -var ReactDescriptor = _dereq_("./ReactDescriptor"); +var ReactElement = _dereq_("./ReactElement"); var ReactOwner = _dereq_("./ReactOwner"); var ReactUpdates = _dereq_("./ReactUpdates"); +var assign = _dereq_("./Object.assign"); var invariant = _dereq_("./invariant"); var keyMirror = _dereq_("./keyMirror"); -var merge = _dereq_("./merge"); /** * Every React component is in one of these life cycles. @@ -21269,11 +21268,11 @@ var ReactComponent = { * @public */ setProps: function(partialProps, callback) { - // Merge with the pending descriptor if it exists, otherwise with existing - // descriptor props. - var descriptor = this._pendingDescriptor || this._descriptor; + // Merge with the pending element if it exists, otherwise with existing + // element props. + var element = this._pendingElement || this._currentElement; this.replaceProps( - merge(descriptor.props, partialProps), + assign({}, element.props, partialProps), callback ); }, @@ -21299,10 +21298,10 @@ var ReactComponent = { '`render` method to pass the correct value as props to the component ' + 'where it is created.' ) : invariant(this._mountDepth === 0)); - // This is a deoptimized path. We optimize for always having a descriptor. - // This creates an extra internal descriptor. - this._pendingDescriptor = ReactDescriptor.cloneAndReplaceProps( - this._pendingDescriptor || this._descriptor, + // This is a deoptimized path. We optimize for always having a element. + // This creates an extra internal element. + this._pendingElement = ReactElement.cloneAndReplaceProps( + this._pendingElement || this._currentElement, props ); ReactUpdates.enqueueUpdate(this, callback); @@ -21317,12 +21316,12 @@ var ReactComponent = { * @internal */ _setPropsInternal: function(partialProps, callback) { - // This is a deoptimized path. We optimize for always having a descriptor. - // This creates an extra internal descriptor. - var descriptor = this._pendingDescriptor || this._descriptor; - this._pendingDescriptor = ReactDescriptor.cloneAndReplaceProps( - descriptor, - merge(descriptor.props, partialProps) + // This is a deoptimized path. We optimize for always having a element. + // This creates an extra internal element. + var element = this._pendingElement || this._currentElement; + this._pendingElement = ReactElement.cloneAndReplaceProps( + element, + assign({}, element.props, partialProps) ); ReactUpdates.enqueueUpdate(this, callback); }, @@ -21333,19 +21332,19 @@ var ReactComponent = { * Subclasses that override this method should make sure to invoke * `ReactComponent.Mixin.construct.call(this, ...)`. * - * @param {ReactDescriptor} descriptor + * @param {ReactElement} element * @internal */ - construct: function(descriptor) { + construct: function(element) { // This is the public exposed props object after it has been processed - // with default props. The descriptor's props represents the true internal + // with default props. The element's props represents the true internal // state of the props. - this.props = descriptor.props; + this.props = element.props; // Record the component responsible for creating this component. - // This is accessible through the descriptor but we maintain an extra + // This is accessible through the element but we maintain an extra // field for compatibility with devtools and as a way to make an // incremental update. TODO: Consider deprecating this field. - this._owner = descriptor._owner; + this._owner = element._owner; // All components start unmounted. this._lifeCycleState = ComponentLifeCycle.UNMOUNTED; @@ -21353,10 +21352,10 @@ var ReactComponent = { // See ReactUpdates. this._pendingCallbacks = null; - // We keep the old descriptor and a reference to the pending descriptor + // We keep the old element and a reference to the pending element // to track updates. - this._descriptor = descriptor; - this._pendingDescriptor = null; + this._currentElement = element; + this._pendingElement = null; }, /** @@ -21381,10 +21380,10 @@ var ReactComponent = { 'single component instance in multiple places.', rootID ) : invariant(!this.isMounted())); - var props = this._descriptor.props; - if (props.ref != null) { - var owner = this._descriptor._owner; - ReactOwner.addComponentAsRefTo(this, props.ref, owner); + var ref = this._currentElement.ref; + if (ref != null) { + var owner = this._currentElement._owner; + ReactOwner.addComponentAsRefTo(this, ref, owner); } this._rootNodeID = rootID; this._lifeCycleState = ComponentLifeCycle.MOUNTED; @@ -21407,9 +21406,9 @@ var ReactComponent = { this.isMounted(), 'unmountComponent(): Can only unmount a mounted component.' ) : invariant(this.isMounted())); - var props = this.props; - if (props.ref != null) { - ReactOwner.removeComponentAsRefFrom(this, props.ref, this._owner); + var ref = this._currentElement.ref; + if (ref != null) { + ReactOwner.removeComponentAsRefFrom(this, ref, this._owner); } unmountIDFromEnvironment(this._rootNodeID); this._rootNodeID = null; @@ -21427,49 +21426,49 @@ var ReactComponent = { * @param {ReactReconcileTransaction} transaction * @internal */ - receiveComponent: function(nextDescriptor, transaction) { + receiveComponent: function(nextElement, transaction) { ("production" !== "development" ? invariant( this.isMounted(), 'receiveComponent(...): Can only update a mounted component.' ) : invariant(this.isMounted())); - this._pendingDescriptor = nextDescriptor; + this._pendingElement = nextElement; this.performUpdateIfNecessary(transaction); }, /** - * If `_pendingDescriptor` is set, update the component. + * If `_pendingElement` is set, update the component. * * @param {ReactReconcileTransaction} transaction * @internal */ performUpdateIfNecessary: function(transaction) { - if (this._pendingDescriptor == null) { + if (this._pendingElement == null) { return; } - var prevDescriptor = this._descriptor; - var nextDescriptor = this._pendingDescriptor; - this._descriptor = nextDescriptor; - this.props = nextDescriptor.props; - this._owner = nextDescriptor._owner; - this._pendingDescriptor = null; - this.updateComponent(transaction, prevDescriptor); + var prevElement = this._currentElement; + var nextElement = this._pendingElement; + this._currentElement = nextElement; + this.props = nextElement.props; + this._owner = nextElement._owner; + this._pendingElement = null; + this.updateComponent(transaction, prevElement); }, /** * Updates the component's currently mounted representation. * * @param {ReactReconcileTransaction} transaction - * @param {object} prevDescriptor + * @param {object} prevElement * @internal */ - updateComponent: function(transaction, prevDescriptor) { - var nextDescriptor = this._descriptor; + updateComponent: function(transaction, prevElement) { + var nextElement = this._currentElement; // If either the owner or a `ref` has changed, make sure the newest owner // has stored a reference to `this`, and the previous owner (if different) - // has forgotten the reference to `this`. We use the descriptor instead + // has forgotten the reference to `this`. We use the element instead // of the public this.props because the post processing cannot determine - // a ref. The ref conceptually lives on the descriptor. + // a ref. The ref conceptually lives on the element. // TODO: Should this even be possible? The owner cannot change because // it's forbidden by shouldUpdateReactComponent. The ref can change @@ -21477,19 +21476,19 @@ var ReactComponent = { // is made. It probably belongs where the key checking and // instantiateReactComponent is done. - if (nextDescriptor._owner !== prevDescriptor._owner || - nextDescriptor.props.ref !== prevDescriptor.props.ref) { - if (prevDescriptor.props.ref != null) { + if (nextElement._owner !== prevElement._owner || + nextElement.ref !== prevElement.ref) { + if (prevElement.ref != null) { ReactOwner.removeComponentAsRefFrom( - this, prevDescriptor.props.ref, prevDescriptor._owner + this, prevElement.ref, prevElement._owner ); } // Correct, even if the owner is the same, and only the ref has changed. - if (nextDescriptor.props.ref != null) { + if (nextElement.ref != null) { ReactOwner.addComponentAsRefTo( this, - nextDescriptor.props.ref, - nextDescriptor._owner + nextElement.ref, + nextElement._owner ); } } @@ -21503,7 +21502,7 @@ var ReactComponent = { * @param {boolean} shouldReuseMarkup If true, do not insert markup * @final * @internal - * @see {ReactMount.renderComponent} + * @see {ReactMount.render} */ mountComponentIntoNode: function(rootID, container, shouldReuseMarkup) { var transaction = ReactUpdates.ReactReconcileTransaction.getPooled(); @@ -21567,21 +21566,14 @@ var ReactComponent = { module.exports = ReactComponent; -},{"./ReactDescriptor":56,"./ReactOwner":70,"./ReactUpdates":87,"./invariant":134,"./keyMirror":140,"./merge":144}],36:[function(_dereq_,module,exports){ +},{"./Object.assign":29,"./ReactElement":58,"./ReactOwner":74,"./ReactUpdates":91,"./invariant":140,"./keyMirror":146}],38:[function(_dereq_,module,exports){ /** - * Copyright 2013-2014 Facebook, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * Copyright 2013-2014, Facebook, Inc. + * All rights reserved. * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. * * @providesModule ReactComponentBrowserEnvironment */ @@ -21694,21 +21686,14 @@ var ReactComponentBrowserEnvironment = { module.exports = ReactComponentBrowserEnvironment; -},{"./ReactDOMIDOperations":45,"./ReactMarkupChecksum":66,"./ReactMount":67,"./ReactPerf":71,"./ReactReconcileTransaction":77,"./getReactRootElementInContainer":128,"./invariant":134,"./setInnerHTML":152}],37:[function(_dereq_,module,exports){ +},{"./ReactDOMIDOperations":47,"./ReactMarkupChecksum":69,"./ReactMount":70,"./ReactPerf":75,"./ReactReconcileTransaction":81,"./getReactRootElementInContainer":134,"./invariant":140,"./setInnerHTML":154}],39:[function(_dereq_,module,exports){ /** - * Copyright 2013-2014 Facebook, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * Copyright 2013-2014, Facebook, Inc. + * All rights reserved. * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. * * @providesModule ReactComponentWithPureRenderMixin */ @@ -21750,21 +21735,14 @@ var ReactComponentWithPureRenderMixin = { module.exports = ReactComponentWithPureRenderMixin; -},{"./shallowEqual":153}],38:[function(_dereq_,module,exports){ +},{"./shallowEqual":155}],40:[function(_dereq_,module,exports){ /** - * Copyright 2013-2014 Facebook, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * Copyright 2013-2014, Facebook, Inc. + * All rights reserved. * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. * * @providesModule ReactCompositeComponent */ @@ -21774,10 +21752,11 @@ module.exports = ReactComponentWithPureRenderMixin; var ReactComponent = _dereq_("./ReactComponent"); var ReactContext = _dereq_("./ReactContext"); var ReactCurrentOwner = _dereq_("./ReactCurrentOwner"); -var ReactDescriptor = _dereq_("./ReactDescriptor"); -var ReactDescriptorValidator = _dereq_("./ReactDescriptorValidator"); +var ReactElement = _dereq_("./ReactElement"); +var ReactElementValidator = _dereq_("./ReactElementValidator"); var ReactEmptyComponent = _dereq_("./ReactEmptyComponent"); var ReactErrorUtils = _dereq_("./ReactErrorUtils"); +var ReactLegacyElement = _dereq_("./ReactLegacyElement"); var ReactOwner = _dereq_("./ReactOwner"); var ReactPerf = _dereq_("./ReactPerf"); var ReactPropTransferer = _dereq_("./ReactPropTransferer"); @@ -21785,16 +21764,18 @@ var ReactPropTypeLocations = _dereq_("./ReactPropTypeLocations"); var ReactPropTypeLocationNames = _dereq_("./ReactPropTypeLocationNames"); var ReactUpdates = _dereq_("./ReactUpdates"); +var assign = _dereq_("./Object.assign"); var instantiateReactComponent = _dereq_("./instantiateReactComponent"); var invariant = _dereq_("./invariant"); var keyMirror = _dereq_("./keyMirror"); -var merge = _dereq_("./merge"); -var mixInto = _dereq_("./mixInto"); +var keyOf = _dereq_("./keyOf"); var monitorCodeUse = _dereq_("./monitorCodeUse"); var mapObject = _dereq_("./mapObject"); var shouldUpdateReactComponent = _dereq_("./shouldUpdateReactComponent"); var warning = _dereq_("./warning"); +var MIXINS_KEY = keyOf({mixins: null}); + /** * Policies that describe methods in `ReactCompositeComponentInterface`. */ @@ -22098,7 +22079,8 @@ var RESERVED_SPEC_KEYS = { childContextTypes, ReactPropTypeLocations.childContext ); - Constructor.childContextTypes = merge( + Constructor.childContextTypes = assign( + {}, Constructor.childContextTypes, childContextTypes ); @@ -22109,7 +22091,11 @@ var RESERVED_SPEC_KEYS = { contextTypes, ReactPropTypeLocations.context ); - Constructor.contextTypes = merge(Constructor.contextTypes, contextTypes); + Constructor.contextTypes = assign( + {}, + Constructor.contextTypes, + contextTypes + ); }, /** * Special case getDefaultProps which should move into statics but requires @@ -22131,7 +22117,11 @@ var RESERVED_SPEC_KEYS = { propTypes, ReactPropTypeLocations.prop ); - Constructor.propTypes = merge(Constructor.propTypes, propTypes); + Constructor.propTypes = assign( + {}, + Constructor.propTypes, + propTypes + ); }, statics: function(Constructor, statics) { mixStaticSpecIntoComponent(Constructor, statics); @@ -22200,11 +22190,12 @@ function validateLifeCycleOnReplaceState(instance) { 'replaceState(...): Can only update a mounted or mounting component.' ) : invariant(instance.isMounted() || compositeLifeCycleState === CompositeLifeCycle.MOUNTING)); - ("production" !== "development" ? invariant(compositeLifeCycleState !== CompositeLifeCycle.RECEIVING_STATE, + ("production" !== "development" ? invariant( + ReactCurrentOwner.current == null, 'replaceState(...): Cannot update during an existing state transition ' + - '(such as within `render`). This could potentially cause an infinite ' + - 'loop so it is forbidden.' - ) : invariant(compositeLifeCycleState !== CompositeLifeCycle.RECEIVING_STATE)); + '(such as within `render`). Render methods should be a pure function ' + + 'of props and state.' + ) : invariant(ReactCurrentOwner.current == null)); ("production" !== "development" ? invariant(compositeLifeCycleState !== CompositeLifeCycle.UNMOUNTING, 'replaceState(...): Cannot update while unmounting component. This ' + 'usually means you called setState() on an unmounted component.' @@ -22212,28 +22203,45 @@ function validateLifeCycleOnReplaceState(instance) { } /** - * Custom version of `mixInto` which handles policy validation and reserved + * Mixin helper which handles policy validation and reserved * specification keys when building `ReactCompositeComponent` classses. */ function mixSpecIntoComponent(Constructor, spec) { + if (!spec) { + return; + } + ("production" !== "development" ? invariant( - !ReactDescriptor.isValidFactory(spec), + !ReactLegacyElement.isValidFactory(spec), 'ReactCompositeComponent: You\'re attempting to ' + 'use a component class as a mixin. Instead, just use a regular object.' - ) : invariant(!ReactDescriptor.isValidFactory(spec))); + ) : invariant(!ReactLegacyElement.isValidFactory(spec))); ("production" !== "development" ? invariant( - !ReactDescriptor.isValidDescriptor(spec), + !ReactElement.isValidElement(spec), 'ReactCompositeComponent: You\'re attempting to ' + 'use a component as a mixin. Instead, just use a regular object.' - ) : invariant(!ReactDescriptor.isValidDescriptor(spec))); + ) : invariant(!ReactElement.isValidElement(spec))); var proto = Constructor.prototype; + + // By handling mixins before any other properties, we ensure the same + // chaining order is applied to methods with DEFINE_MANY policy, whether + // mixins are listed before or after these methods in the spec. + if (spec.hasOwnProperty(MIXINS_KEY)) { + RESERVED_SPEC_KEYS.mixins(Constructor, spec.mixins); + } + for (var name in spec) { - var property = spec[name]; if (!spec.hasOwnProperty(name)) { continue; } + if (name === MIXINS_KEY) { + // We have already handled mixins in a special case above + continue; + } + + var property = spec[name]; validateMethodOverride(proto, name); if (RESERVED_SPEC_KEYS.hasOwnProperty(name)) { @@ -22311,23 +22319,25 @@ function mixStaticSpecIntoComponent(Constructor, statics) { continue; } + var isReserved = name in RESERVED_SPEC_KEYS; + ("production" !== "development" ? invariant( + !isReserved, + 'ReactCompositeComponent: 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(!isReserved)); + var isInherited = name in Constructor; - var result = property; - if (isInherited) { - var existingProperty = Constructor[name]; - var existingType = typeof existingProperty; - var propertyType = typeof property; - ("production" !== "development" ? invariant( - existingType === 'function' && propertyType === 'function', - 'ReactCompositeComponent: You are attempting to define ' + - '`%s` on your component more than once, but that is only supported ' + - 'for functions, which are chained together. This conflict may be ' + - 'due to a mixin.', - name - ) : invariant(existingType === 'function' && propertyType === 'function')); - result = createChainedFunction(existingProperty, property); - } - Constructor[name] = result; + ("production" !== "development" ? invariant( + !isInherited, + 'ReactCompositeComponent: You are attempting to define ' + + '`%s` on your component more than once. This conflict may be ' + + 'due to a mixin.', + name + ) : invariant(!isInherited)); + Constructor[name] = property; } } @@ -22348,7 +22358,10 @@ function mergeObjectsWithNoDuplicateKeys(one, two) { ("production" !== "development" ? invariant( one[key] === undefined, 'mergeObjectsWithNoDuplicateKeys(): ' + - 'Tried to merge two objects with the same key: %s', + '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(one[key] === undefined)); one[key] = value; @@ -22404,19 +22417,19 @@ function createChainedFunction(one, two) { * Top Row: ReactComponent.ComponentLifeCycle * Low Row: ReactComponent.CompositeLifeCycle * - * +-------+------------------------------------------------------+--------+ - * | UN | MOUNTED | UN | - * |MOUNTED| | MOUNTED| - * +-------+------------------------------------------------------+--------+ - * | ^--------+ +------+ +------+ +------+ +--------^ | - * | | | | | | | | | | | | - * | 0--|MOUNTING|-0-|RECEIV|-0-|RECEIV|-0-|RECEIV|-0-| UN |--->0 | - * | | | |PROPS | | PROPS| | STATE| |MOUNTING| | - * | | | | | | | | | | | | - * | | | | | | | | | | | | - * | +--------+ +------+ +------+ +------+ +--------+ | - * | | | | - * +-------+------------------------------------------------------+--------+ + * +-------+---------------------------------+--------+ + * | UN | MOUNTED | UN | + * |MOUNTED| | MOUNTED| + * +-------+---------------------------------+--------+ + * | ^--------+ +-------+ +--------^ | + * | | | | | | | | + * | 0--|MOUNTING|-0-|RECEIVE|-0-| UN |--->0 | + * | | | |PROPS | |MOUNTING| | + * | | | | | | | | + * | | | | | | | | + * | +--------+ +-------+ +--------+ | + * | | | | + * +-------+---------------------------------+--------+ */ var CompositeLifeCycle = keyMirror({ /** @@ -22433,12 +22446,7 @@ var CompositeLifeCycle = keyMirror({ * Components that are mounted and receiving new props respond to state * changes differently. */ - RECEIVING_PROPS: null, - /** - * Components that are mounted and receiving new state are guarded against - * additional state changes. - */ - RECEIVING_STATE: null + RECEIVING_PROPS: null }); /** @@ -22449,11 +22457,11 @@ var ReactCompositeComponentMixin = { /** * Base constructor for all composite component. * - * @param {ReactDescriptor} descriptor + * @param {ReactElement} element * @final * @internal */ - construct: function(descriptor) { + construct: function(element) { // Children can be either an array or more than one argument ReactComponent.Mixin.construct.apply(this, arguments); ReactOwner.Mixin.construct.apply(this, arguments); @@ -22462,7 +22470,7 @@ var ReactCompositeComponentMixin = { this._pendingState = null; // This is the public post-processed context. The real context and pending - // context lives on the descriptor. + // context lives on the element. this.context = null; this._compositeLifeCycleState = null; @@ -22505,7 +22513,7 @@ var ReactCompositeComponentMixin = { this._bindAutoBindMethods(); } - this.context = this._processContext(this._descriptor._context); + this.context = this._processContext(this._currentElement._context); this.props = this._processProps(this.props); this.state = this.getInitialState ? this.getInitialState() : null; @@ -22529,7 +22537,8 @@ var ReactCompositeComponentMixin = { } this._renderedComponent = instantiateReactComponent( - this._renderValidatedComponent() + this._renderValidatedComponent(), + this._currentElement.type // The wrapping type ); // Done with mounting, `setState` will now trigger UI changes. @@ -22601,7 +22610,7 @@ var ReactCompositeComponentMixin = { } // Merge with `_pendingState` if it exists, otherwise with existing state. this.replaceState( - merge(this._pendingState || this.state, partialState), + assign({}, this._pendingState || this.state, partialState), callback ); }, @@ -22689,7 +22698,7 @@ var ReactCompositeComponentMixin = { name ) : invariant(name in this.constructor.childContextTypes)); } - return merge(currentContext, childContext); + return assign({}, currentContext, childContext); } return currentContext; }, @@ -22704,25 +22713,13 @@ var ReactCompositeComponentMixin = { * @private */ _processProps: function(newProps) { - var defaultProps = this.constructor.defaultProps; - var props; - if (defaultProps) { - props = merge(newProps); - for (var propName in defaultProps) { - if (typeof props[propName] === 'undefined') { - props[propName] = defaultProps[propName]; - } - } - } else { - props = newProps; - } if ("production" !== "development") { var propTypes = this.constructor.propTypes; if (propTypes) { - this._checkPropTypes(propTypes, props, ReactPropTypeLocations.prop); + this._checkPropTypes(propTypes, newProps, ReactPropTypeLocations.prop); } } - return props; + return newProps; }, /** @@ -22734,7 +22731,7 @@ var ReactCompositeComponentMixin = { * @private */ _checkPropTypes: function(propTypes, props, location) { - // TODO: Stop validating prop types here and only use the descriptor + // TODO: Stop validating prop types here and only use the element // validation. var componentName = this.constructor.displayName; for (var propName in propTypes) { @@ -22753,7 +22750,7 @@ var ReactCompositeComponentMixin = { }, /** - * If any of `_pendingDescriptor`, `_pendingState`, or `_pendingForceUpdate` + * If any of `_pendingElement`, `_pendingState`, or `_pendingForceUpdate` * is set, update the component. * * @param {ReactReconcileTransaction} transaction @@ -22768,7 +22765,7 @@ var ReactCompositeComponentMixin = { return; } - if (this._pendingDescriptor == null && + if (this._pendingElement == null && this._pendingState == null && !this._pendingForceUpdate) { return; @@ -22776,12 +22773,12 @@ var ReactCompositeComponentMixin = { var nextContext = this.context; var nextProps = this.props; - var nextDescriptor = this._descriptor; - if (this._pendingDescriptor != null) { - nextDescriptor = this._pendingDescriptor; - nextContext = this._processContext(nextDescriptor._context); - nextProps = this._processProps(nextDescriptor.props); - this._pendingDescriptor = null; + var nextElement = this._currentElement; + if (this._pendingElement != null) { + nextElement = this._pendingElement; + nextContext = this._processContext(nextElement._context); + nextProps = this._processProps(nextElement.props); + this._pendingElement = null; this._compositeLifeCycleState = CompositeLifeCycle.RECEIVING_PROPS; if (this.componentWillReceiveProps) { @@ -22789,51 +22786,47 @@ var ReactCompositeComponentMixin = { } } - this._compositeLifeCycleState = CompositeLifeCycle.RECEIVING_STATE; + this._compositeLifeCycleState = null; var nextState = this._pendingState || this.state; this._pendingState = null; - try { - var shouldUpdate = - this._pendingForceUpdate || - !this.shouldComponentUpdate || - this.shouldComponentUpdate(nextProps, nextState, nextContext); + var shouldUpdate = + this._pendingForceUpdate || + !this.shouldComponentUpdate || + this.shouldComponentUpdate(nextProps, nextState, nextContext); - if ("production" !== "development") { - if (typeof shouldUpdate === "undefined") { - console.warn( - (this.constructor.displayName || 'ReactCompositeComponent') + - '.shouldComponentUpdate(): Returned undefined instead of a ' + - 'boolean value. Make sure to return true or false.' - ); - } + if ("production" !== "development") { + if (typeof shouldUpdate === "undefined") { + console.warn( + (this.constructor.displayName || 'ReactCompositeComponent') + + '.shouldComponentUpdate(): Returned undefined instead of a ' + + 'boolean value. Make sure to return true or false.' + ); } + } - if (shouldUpdate) { - this._pendingForceUpdate = false; - // Will set `this.props`, `this.state` and `this.context`. - this._performComponentUpdate( - nextDescriptor, - nextProps, - nextState, - nextContext, - transaction - ); - } else { - // If it's determined that a component should not update, we still want - // to set props and state. - this._descriptor = nextDescriptor; - this.props = nextProps; - this.state = nextState; - this.context = nextContext; + if (shouldUpdate) { + this._pendingForceUpdate = false; + // Will set `this.props`, `this.state` and `this.context`. + this._performComponentUpdate( + nextElement, + nextProps, + nextState, + nextContext, + transaction + ); + } else { + // If it's determined that a component should not update, we still want + // to set props and state. + this._currentElement = nextElement; + this.props = nextProps; + this.state = nextState; + this.context = nextContext; - // Owner cannot change because shouldUpdateReactComponent doesn't allow - // it. TODO: Remove this._owner completely. - this._owner = nextDescriptor._owner; - } - } finally { - this._compositeLifeCycleState = null; + // Owner cannot change because shouldUpdateReactComponent doesn't allow + // it. TODO: Remove this._owner completely. + this._owner = nextElement._owner; } }, @@ -22841,7 +22834,7 @@ var ReactCompositeComponentMixin = { * Merges new props and state, notifies delegate methods of update and * performs update. * - * @param {ReactDescriptor} nextDescriptor Next descriptor + * @param {ReactElement} nextElement Next element * @param {object} nextProps Next public object to set as properties. * @param {?object} nextState Next object to set as state. * @param {?object} nextContext Next public object to set as context. @@ -22849,13 +22842,13 @@ var ReactCompositeComponentMixin = { * @private */ _performComponentUpdate: function( - nextDescriptor, + nextElement, nextProps, nextState, nextContext, transaction ) { - var prevDescriptor = this._descriptor; + var prevElement = this._currentElement; var prevProps = this.props; var prevState = this.state; var prevContext = this.context; @@ -22864,18 +22857,18 @@ var ReactCompositeComponentMixin = { this.componentWillUpdate(nextProps, nextState, nextContext); } - this._descriptor = nextDescriptor; + this._currentElement = nextElement; this.props = nextProps; this.state = nextState; this.context = nextContext; // Owner cannot change because shouldUpdateReactComponent doesn't allow // it. TODO: Remove this._owner completely. - this._owner = nextDescriptor._owner; + this._owner = nextElement._owner; this.updateComponent( transaction, - prevDescriptor + prevElement ); if (this.componentDidUpdate) { @@ -22886,22 +22879,22 @@ var ReactCompositeComponentMixin = { } }, - receiveComponent: function(nextDescriptor, transaction) { - if (nextDescriptor === this._descriptor && - nextDescriptor._owner != null) { - // Since descriptors are immutable after the owner is rendered, + receiveComponent: function(nextElement, transaction) { + if (nextElement === this._currentElement && + nextElement._owner != null) { + // Since elements are immutable after the owner is rendered, // we can do a cheap identity compare here to determine if this is a // superfluous reconcile. It's possible for state to be mutable but such // change should trigger an update of the owner which would recreate - // the descriptor. We explicitly check for the existence of an owner since - // it's possible for a descriptor created outside a composite to be + // the element. We explicitly check for the existence of an owner since + // it's possible for a element created outside a composite to be // deeply mutated and reused. return; } ReactComponent.Mixin.receiveComponent.call( this, - nextDescriptor, + nextElement, transaction ); }, @@ -22913,31 +22906,34 @@ var ReactCompositeComponentMixin = { * Sophisticated clients may wish to override this. * * @param {ReactReconcileTransaction} transaction - * @param {ReactDescriptor} prevDescriptor + * @param {ReactElement} prevElement * @internal * @overridable */ updateComponent: ReactPerf.measure( 'ReactCompositeComponent', 'updateComponent', - function(transaction, prevParentDescriptor) { + function(transaction, prevParentElement) { ReactComponent.Mixin.updateComponent.call( this, transaction, - prevParentDescriptor + prevParentElement ); var prevComponentInstance = this._renderedComponent; - var prevDescriptor = prevComponentInstance._descriptor; - var nextDescriptor = this._renderValidatedComponent(); - if (shouldUpdateReactComponent(prevDescriptor, nextDescriptor)) { - prevComponentInstance.receiveComponent(nextDescriptor, transaction); + var prevElement = prevComponentInstance._currentElement; + var nextElement = this._renderValidatedComponent(); + if (shouldUpdateReactComponent(prevElement, nextElement)) { + prevComponentInstance.receiveComponent(nextElement, transaction); } else { // These two IDs are actually the same! But nothing should rely on that. var thisID = this._rootNodeID; var prevComponentID = prevComponentInstance._rootNodeID; prevComponentInstance.unmountComponent(); - this._renderedComponent = instantiateReactComponent(nextDescriptor); + this._renderedComponent = instantiateReactComponent( + nextElement, + this._currentElement.type + ); var nextMarkup = this._renderedComponent.mountComponent( thisID, transaction, @@ -22975,12 +22971,12 @@ var ReactCompositeComponentMixin = { ) : invariant(this.isMounted() || compositeLifeCycleState === CompositeLifeCycle.MOUNTING)); ("production" !== "development" ? invariant( - compositeLifeCycleState !== CompositeLifeCycle.RECEIVING_STATE && - compositeLifeCycleState !== CompositeLifeCycle.UNMOUNTING, + compositeLifeCycleState !== CompositeLifeCycle.UNMOUNTING && + ReactCurrentOwner.current == null, 'forceUpdate(...): Cannot force an update while unmounting component ' + - 'or during an existing state transition (such as within `render`).' - ) : invariant(compositeLifeCycleState !== CompositeLifeCycle.RECEIVING_STATE && - compositeLifeCycleState !== CompositeLifeCycle.UNMOUNTING)); + 'or within a `render` function.' + ) : invariant(compositeLifeCycleState !== CompositeLifeCycle.UNMOUNTING && + ReactCurrentOwner.current == null)); this._pendingForceUpdate = true; ReactUpdates.enqueueUpdate(this, callback); }, @@ -22995,7 +22991,7 @@ var ReactCompositeComponentMixin = { var renderedComponent; var previousContext = ReactContext.current; ReactContext.current = this._processChildContext( - this._descriptor._context + this._currentElement._context ); ReactCurrentOwner.current = this; try { @@ -23011,11 +23007,11 @@ var ReactCompositeComponentMixin = { ReactCurrentOwner.current = null; } ("production" !== "development" ? invariant( - ReactDescriptor.isValidDescriptor(renderedComponent), + ReactElement.isValidElement(renderedComponent), '%s.render(): A valid ReactComponent must be returned. You may have ' + 'returned undefined, an array or some other invalid object.', this.constructor.displayName || 'ReactCompositeComponent' - ) : invariant(ReactDescriptor.isValidDescriptor(renderedComponent))); + ) : invariant(ReactElement.isValidElement(renderedComponent))); return renderedComponent; } ), @@ -23044,16 +23040,14 @@ var ReactCompositeComponentMixin = { */ _bindAutoBindMethod: function(method) { var component = this; - var boundMethod = function() { - return method.apply(component, arguments); - }; + var boundMethod = method.bind(component); if ("production" !== "development") { boundMethod.__reactBoundContext = component; boundMethod.__reactBoundMethod = method; boundMethod.__reactBoundArguments = null; var componentName = component.constructor.displayName; var _bind = boundMethod.bind; - boundMethod.bind = function(newThis ) {var args=Array.prototype.slice.call(arguments,1); + boundMethod.bind = function(newThis ) {for (var args=[],$__0=1,$__1=arguments.length;$__0<$__1;$__0++) args.push(arguments[$__0]); // User is trying to bind() an autobound method; we effectively will // ignore the value of "this" that the user is trying to use, so // let's warn. @@ -23084,10 +23078,13 @@ var ReactCompositeComponentMixin = { }; var ReactCompositeComponentBase = function() {}; -mixInto(ReactCompositeComponentBase, ReactComponent.Mixin); -mixInto(ReactCompositeComponentBase, ReactOwner.Mixin); -mixInto(ReactCompositeComponentBase, ReactPropTransferer.Mixin); -mixInto(ReactCompositeComponentBase, ReactCompositeComponentMixin); +assign( + ReactCompositeComponentBase.prototype, + ReactComponent.Mixin, + ReactOwner.Mixin, + ReactPropTransferer.Mixin, + ReactCompositeComponentMixin +); /** * Module for creating composite components. @@ -23111,8 +23108,10 @@ var ReactCompositeComponent = { * @public */ createClass: function(spec) { - var Constructor = function(props, owner) { - this.construct(props, owner); + var Constructor = function(props) { + // This constructor is overridden by mocks. The argument is used + // by mocks to assert on what gets mounted. This will later be used + // by the stand-alone class implementation. }; Constructor.prototype = new ReactCompositeComponentBase(); Constructor.prototype.constructor = Constructor; @@ -23155,17 +23154,14 @@ var ReactCompositeComponent = { } } - var descriptorFactory = ReactDescriptor.createFactory(Constructor); - if ("production" !== "development") { - return ReactDescriptorValidator.createFactory( - descriptorFactory, - Constructor.propTypes, - Constructor.contextTypes + return ReactLegacyElement.wrapFactory( + ReactElementValidator.createFactory(Constructor) ); } - - return descriptorFactory; + return ReactLegacyElement.wrapFactory( + ReactElement.createFactory(Constructor) + ); }, injection: { @@ -23177,28 +23173,21 @@ var ReactCompositeComponent = { module.exports = ReactCompositeComponent; -},{"./ReactComponent":35,"./ReactContext":39,"./ReactCurrentOwner":40,"./ReactDescriptor":56,"./ReactDescriptorValidator":57,"./ReactEmptyComponent":58,"./ReactErrorUtils":59,"./ReactOwner":70,"./ReactPerf":71,"./ReactPropTransferer":72,"./ReactPropTypeLocationNames":73,"./ReactPropTypeLocations":74,"./ReactUpdates":87,"./instantiateReactComponent":133,"./invariant":134,"./keyMirror":140,"./mapObject":142,"./merge":144,"./mixInto":147,"./monitorCodeUse":148,"./shouldUpdateReactComponent":154,"./warning":158}],39:[function(_dereq_,module,exports){ +},{"./Object.assign":29,"./ReactComponent":37,"./ReactContext":41,"./ReactCurrentOwner":42,"./ReactElement":58,"./ReactElementValidator":59,"./ReactEmptyComponent":60,"./ReactErrorUtils":61,"./ReactLegacyElement":67,"./ReactOwner":74,"./ReactPerf":75,"./ReactPropTransferer":76,"./ReactPropTypeLocationNames":77,"./ReactPropTypeLocations":78,"./ReactUpdates":91,"./instantiateReactComponent":139,"./invariant":140,"./keyMirror":146,"./keyOf":147,"./mapObject":148,"./monitorCodeUse":150,"./shouldUpdateReactComponent":156,"./warning":160}],41:[function(_dereq_,module,exports){ /** - * Copyright 2013-2014 Facebook, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * Copyright 2013-2014, Facebook, Inc. + * All rights reserved. * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. * * @providesModule ReactContext */ "use strict"; -var merge = _dereq_("./merge"); +var assign = _dereq_("./Object.assign"); /** * Keeps track of the current context. @@ -23220,7 +23209,7 @@ var ReactContext = { * A typical use case might look like * * render: function() { - * var children = ReactContext.withContext({foo: 'foo'} () => ( + * var children = ReactContext.withContext({foo: 'foo'}, () => ( * * )); * return

{children}
; @@ -23233,7 +23222,7 @@ var ReactContext = { withContext: function(newContext, scopedCallback) { var result; var previousContext = ReactContext.current; - ReactContext.current = merge(previousContext, newContext); + ReactContext.current = assign({}, previousContext, newContext); try { result = scopedCallback(); } finally { @@ -23246,21 +23235,14 @@ var ReactContext = { module.exports = ReactContext; -},{"./merge":144}],40:[function(_dereq_,module,exports){ +},{"./Object.assign":29}],42:[function(_dereq_,module,exports){ /** - * Copyright 2013-2014 Facebook, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * Copyright 2013-2014, Facebook, Inc. + * All rights reserved. * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. * * @providesModule ReactCurrentOwner */ @@ -23287,21 +23269,14 @@ var ReactCurrentOwner = { module.exports = ReactCurrentOwner; -},{}],41:[function(_dereq_,module,exports){ +},{}],43:[function(_dereq_,module,exports){ /** - * Copyright 2013-2014 Facebook, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * Copyright 2013-2014, Facebook, Inc. + * All rights reserved. * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. * * @providesModule ReactDOM * @typechecks static-only @@ -23309,45 +23284,27 @@ module.exports = ReactCurrentOwner; "use strict"; -var ReactDescriptor = _dereq_("./ReactDescriptor"); -var ReactDescriptorValidator = _dereq_("./ReactDescriptorValidator"); -var ReactDOMComponent = _dereq_("./ReactDOMComponent"); +var ReactElement = _dereq_("./ReactElement"); +var ReactElementValidator = _dereq_("./ReactElementValidator"); +var ReactLegacyElement = _dereq_("./ReactLegacyElement"); -var mergeInto = _dereq_("./mergeInto"); var mapObject = _dereq_("./mapObject"); /** - * Creates a new React class that is idempotent and capable of containing other - * React components. It accepts event listeners and DOM properties that are - * valid according to `DOMProperty`. - * - * - Event listeners: `onClick`, `onMouseDown`, etc. - * - DOM properties: `className`, `name`, `title`, etc. + * Create a factory that creates HTML tag elements. * - * The `style` property functions differently from the DOM API. It accepts an - * object mapping of style properties to values. - * - * @param {boolean} omitClose True if the close tag should be omitted. * @param {string} tag Tag name (e.g. `div`). * @private */ -function createDOMComponentClass(omitClose, tag) { - var Constructor = function(descriptor) { - this.construct(descriptor); - }; - Constructor.prototype = new ReactDOMComponent(tag, omitClose); - Constructor.prototype.constructor = Constructor; - Constructor.displayName = tag; - - var ConvenienceConstructor = ReactDescriptor.createFactory(Constructor); - +function createDOMFactory(tag) { if ("production" !== "development") { - return ReactDescriptorValidator.createFactory( - ConvenienceConstructor + return ReactLegacyElement.markNonLegacyFactory( + ReactElementValidator.createFactory(tag) ); } - - return ConvenienceConstructor; + return ReactLegacyElement.markNonLegacyFactory( + ReactElement.createFactory(tag) + ); } /** @@ -23357,162 +23314,150 @@ function createDOMComponentClass(omitClose, tag) { * @public */ var ReactDOM = mapObject({ - a: false, - abbr: false, - address: false, - area: true, - article: false, - aside: false, - audio: false, - b: false, - base: true, - bdi: false, - bdo: false, - big: false, - blockquote: false, - body: false, - br: true, - button: false, - canvas: false, - caption: false, - cite: false, - code: false, - col: true, - colgroup: false, - data: false, - datalist: false, - dd: false, - del: false, - details: false, - dfn: false, - div: false, - dl: false, - dt: false, - em: false, - embed: true, - fieldset: false, - figcaption: false, - figure: false, - footer: false, - form: false, // NOTE: Injected, see `ReactDOMForm`. - h1: false, - h2: false, - h3: false, - h4: false, - h5: false, - h6: false, - head: false, - header: false, - hr: true, - html: false, - i: false, - iframe: false, - img: true, - input: true, - ins: false, - kbd: false, - keygen: true, - label: false, - legend: false, - li: false, - link: true, - main: false, - map: false, - mark: false, - menu: false, - menuitem: false, // NOTE: Close tag should be omitted, but causes problems. - meta: true, - meter: false, - nav: false, - noscript: false, - object: false, - ol: false, - optgroup: false, - option: false, - output: false, - p: false, - param: true, - pre: false, - progress: false, - q: false, - rp: false, - rt: false, - ruby: false, - s: false, - samp: false, - script: false, - section: false, - select: false, - small: false, - source: true, - span: false, - strong: false, - style: false, - sub: false, - summary: false, - sup: false, - table: false, - tbody: false, - td: false, - textarea: false, // NOTE: Injected, see `ReactDOMTextarea`. - tfoot: false, - th: false, - thead: false, - time: false, - title: false, - tr: false, - track: true, - u: false, - ul: false, - 'var': false, - video: false, - wbr: true, + a: 'a', + abbr: 'abbr', + address: 'address', + area: 'area', + article: 'article', + aside: 'aside', + audio: 'audio', + b: 'b', + base: 'base', + bdi: 'bdi', + bdo: 'bdo', + big: 'big', + blockquote: 'blockquote', + body: 'body', + br: 'br', + button: 'button', + canvas: 'canvas', + caption: 'caption', + cite: 'cite', + code: 'code', + col: 'col', + colgroup: 'colgroup', + data: 'data', + datalist: 'datalist', + dd: 'dd', + del: 'del', + details: 'details', + dfn: 'dfn', + dialog: 'dialog', + div: 'div', + dl: 'dl', + dt: 'dt', + em: 'em', + embed: 'embed', + fieldset: 'fieldset', + figcaption: 'figcaption', + figure: 'figure', + footer: 'footer', + form: 'form', + h1: 'h1', + h2: 'h2', + h3: 'h3', + h4: 'h4', + h5: 'h5', + h6: 'h6', + head: 'head', + header: 'header', + hr: 'hr', + html: 'html', + i: 'i', + iframe: 'iframe', + img: 'img', + input: 'input', + ins: 'ins', + kbd: 'kbd', + keygen: 'keygen', + label: 'label', + legend: 'legend', + li: 'li', + link: 'link', + main: 'main', + map: 'map', + mark: 'mark', + menu: 'menu', + menuitem: 'menuitem', + meta: 'meta', + meter: 'meter', + nav: 'nav', + noscript: 'noscript', + object: 'object', + ol: 'ol', + optgroup: 'optgroup', + option: 'option', + output: 'output', + p: 'p', + param: 'param', + picture: 'picture', + pre: 'pre', + progress: 'progress', + q: 'q', + rp: 'rp', + rt: 'rt', + ruby: 'ruby', + s: 's', + samp: 'samp', + script: 'script', + section: 'section', + select: 'select', + small: 'small', + source: 'source', + span: 'span', + strong: 'strong', + style: 'style', + sub: 'sub', + summary: 'summary', + sup: 'sup', + table: 'table', + tbody: 'tbody', + td: 'td', + textarea: 'textarea', + tfoot: 'tfoot', + th: 'th', + thead: 'thead', + time: 'time', + title: 'title', + tr: 'tr', + track: 'track', + u: 'u', + ul: 'ul', + 'var': 'var', + video: 'video', + wbr: 'wbr', // SVG - circle: false, - defs: false, - ellipse: false, - g: false, - line: false, - linearGradient: false, - mask: false, - path: false, - pattern: false, - polygon: false, - polyline: false, - radialGradient: false, - rect: false, - stop: false, - svg: false, - text: false, - tspan: false -}, createDOMComponentClass); - -var injection = { - injectComponentClasses: function(componentClasses) { - mergeInto(ReactDOM, componentClasses); - } -}; - -ReactDOM.injection = injection; + circle: 'circle', + defs: 'defs', + ellipse: 'ellipse', + g: 'g', + line: 'line', + linearGradient: 'linearGradient', + mask: 'mask', + path: 'path', + pattern: 'pattern', + polygon: 'polygon', + polyline: 'polyline', + radialGradient: 'radialGradient', + rect: 'rect', + stop: 'stop', + svg: 'svg', + text: 'text', + tspan: 'tspan' + +}, createDOMFactory); module.exports = ReactDOM; -},{"./ReactDOMComponent":43,"./ReactDescriptor":56,"./ReactDescriptorValidator":57,"./mapObject":142,"./mergeInto":146}],42:[function(_dereq_,module,exports){ +},{"./ReactElement":58,"./ReactElementValidator":59,"./ReactLegacyElement":67,"./mapObject":148}],44:[function(_dereq_,module,exports){ /** - * Copyright 2013-2014 Facebook, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * Copyright 2013-2014, Facebook, Inc. + * All rights reserved. * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. * * @providesModule ReactDOMButton */ @@ -23522,12 +23467,13 @@ module.exports = ReactDOM; var AutoFocusMixin = _dereq_("./AutoFocusMixin"); var ReactBrowserComponentMixin = _dereq_("./ReactBrowserComponentMixin"); var ReactCompositeComponent = _dereq_("./ReactCompositeComponent"); +var ReactElement = _dereq_("./ReactElement"); var ReactDOM = _dereq_("./ReactDOM"); var keyMirror = _dereq_("./keyMirror"); -// Store a reference to the