react-test-renderer 15.5.4 → 15.7.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (250) hide show
  1. package/LICENSE +16 -26
  2. package/lib/CallbackQueue.js +3 -5
  3. package/lib/EventConstants.js +3 -5
  4. package/lib/EventPluginHub.js +3 -9
  5. package/lib/EventPluginRegistry.js +3 -7
  6. package/lib/EventPluginUtils.js +3 -5
  7. package/lib/EventPropagators.js +3 -5
  8. package/lib/KeyEscapeUtils.js +3 -5
  9. package/lib/PluginModuleType.js +3 -5
  10. package/lib/PooledClass.js +3 -5
  11. package/lib/ReactChildFiber.js +3 -6
  12. package/lib/ReactChildReconciler.js +7 -10
  13. package/lib/ReactComponentEnvironment.js +3 -7
  14. package/lib/ReactCompositeComponent.js +5 -9
  15. package/lib/ReactCoroutine.js +3 -5
  16. package/lib/ReactDebugTool.js +6 -6
  17. package/lib/ReactDefaultBatchingStrategy.js +3 -5
  18. package/lib/ReactElementSymbol.js +3 -5
  19. package/lib/ReactEmptyComponent.js +3 -5
  20. package/lib/ReactErrorUtils.js +6 -6
  21. package/lib/ReactEventEmitterMixin.js +3 -6
  22. package/lib/ReactFeatureFlags.js +3 -5
  23. package/lib/ReactFiber.js +3 -7
  24. package/lib/ReactFiberBeginWork.js +3 -6
  25. package/lib/ReactFiberCommitWork.js +3 -6
  26. package/lib/ReactFiberCompleteWork.js +3 -7
  27. package/lib/ReactFiberReconciler.js +3 -5
  28. package/lib/ReactFiberRoot.js +3 -5
  29. package/lib/ReactFiberScheduler.js +3 -5
  30. package/lib/ReactFiberUpdateQueue.js +3 -5
  31. package/lib/ReactHostComponent.js +3 -5
  32. package/lib/ReactHostOperationHistoryHook.js +3 -5
  33. package/lib/ReactInstanceMap.js +3 -7
  34. package/lib/ReactInstanceType.js +3 -5
  35. package/lib/ReactInstrumentation.js +3 -5
  36. package/lib/ReactInvalidSetStateWarningHook.js +3 -5
  37. package/lib/ReactMultiChild.js +3 -9
  38. package/lib/ReactMultiChildUpdateTypes.js +3 -5
  39. package/lib/ReactNodeTypes.js +3 -5
  40. package/lib/ReactOwner.js +3 -6
  41. package/lib/ReactPerf.js +9 -11
  42. package/lib/ReactPriorityLevel.js +5 -6
  43. package/lib/ReactPropTypeLocationNames.js +3 -5
  44. package/lib/ReactPropTypeLocations.js +3 -5
  45. package/lib/ReactPropTypesSecret.js +3 -5
  46. package/lib/ReactReconciler.js +5 -9
  47. package/lib/ReactRef.js +3 -5
  48. package/lib/ReactReifiedYield.js +3 -5
  49. package/lib/ReactShallowRenderer.js +3 -5
  50. package/lib/ReactSimpleEmptyComponent.js +5 -7
  51. package/lib/ReactSyntheticEventType.js +3 -5
  52. package/lib/ReactTestEmptyComponent.js +3 -5
  53. package/lib/ReactTestMount.js +8 -8
  54. package/lib/ReactTestReconcileTransaction.js +2 -4
  55. package/lib/ReactTestRenderer.js +4 -5
  56. package/lib/ReactTestTextComponent.js +3 -5
  57. package/lib/ReactTypeOfWork.js +3 -5
  58. package/lib/ReactTypes.js +3 -5
  59. package/lib/ReactUpdateQueue.js +4 -8
  60. package/lib/ReactUpdates.js +4 -6
  61. package/lib/ReactVersion.js +4 -6
  62. package/lib/ResponderEventPlugin.js +3 -7
  63. package/lib/ResponderSyntheticEvent.js +3 -5
  64. package/lib/ResponderTouchHistoryStore.js +3 -5
  65. package/lib/SyntheticEvent.js +34 -33
  66. package/lib/Transaction.js +6 -5
  67. package/lib/accumulate.js +3 -5
  68. package/lib/accumulateInto.js +3 -5
  69. package/lib/adler32.js +3 -5
  70. package/lib/canDefineProperty.js +3 -5
  71. package/lib/checkReactTypeSpec.js +3 -5
  72. package/lib/deprecated.js +6 -8
  73. package/lib/flattenChildren.js +3 -5
  74. package/lib/forEachAccumulated.js +3 -5
  75. package/lib/getHostComponentFromComposite.js +3 -5
  76. package/lib/getIteratorFn.js +3 -5
  77. package/lib/instantiateReactComponent.js +4 -6
  78. package/lib/isTextInputElement.js +17 -19
  79. package/lib/lowPriorityWarning.js +62 -0
  80. package/lib/reactProdInvariant.js +2 -4
  81. package/lib/shallow/ARIADOMPropertyConfig.js +3 -5
  82. package/lib/shallow/AutoFocusUtils.js +3 -5
  83. package/lib/shallow/BeforeInputEventPlugin.js +3 -6
  84. package/lib/shallow/CSSProperty.js +10 -5
  85. package/lib/shallow/CSSPropertyOperations.js +17 -13
  86. package/lib/shallow/CallbackQueue.js +3 -5
  87. package/lib/shallow/ChangeEventPlugin.js +52 -88
  88. package/lib/shallow/DOMChildrenOperations.js +7 -8
  89. package/lib/shallow/DOMLazyTree.js +3 -5
  90. package/lib/shallow/DOMNamespaces.js +3 -5
  91. package/lib/shallow/DOMProperty.js +3 -6
  92. package/lib/shallow/DOMPropertyOperations.js +3 -7
  93. package/lib/shallow/Danger.js +3 -7
  94. package/lib/shallow/DefaultEventPluginOrder.js +3 -5
  95. package/lib/shallow/EnterLeaveEventPlugin.js +3 -7
  96. package/lib/shallow/EventConstants.js +3 -5
  97. package/lib/shallow/EventPluginHub.js +3 -9
  98. package/lib/shallow/EventPluginRegistry.js +3 -7
  99. package/lib/shallow/EventPluginUtils.js +3 -5
  100. package/lib/shallow/EventPropagators.js +3 -5
  101. package/lib/shallow/FallbackCompositionState.js +3 -5
  102. package/lib/shallow/HTMLDOMPropertyConfig.js +4 -5
  103. package/lib/shallow/KeyEscapeUtils.js +3 -5
  104. package/lib/shallow/LinkedValueUtils.js +10 -12
  105. package/lib/shallow/PluginModuleType.js +3 -5
  106. package/lib/shallow/PooledClass.js +3 -5
  107. package/lib/shallow/ReactBrowserEventEmitter.js +3 -9
  108. package/lib/shallow/ReactChildFiber.js +3 -6
  109. package/lib/shallow/ReactChildReconciler.js +7 -10
  110. package/lib/shallow/ReactComponentBrowserEnvironment.js +3 -7
  111. package/lib/shallow/ReactComponentEnvironment.js +3 -7
  112. package/lib/shallow/ReactCompositeComponent.js +5 -9
  113. package/lib/shallow/ReactCoroutine.js +3 -5
  114. package/lib/shallow/ReactDOM.js +5 -7
  115. package/lib/shallow/ReactDOMComponent.js +40 -29
  116. package/lib/shallow/ReactDOMComponentFlags.js +3 -5
  117. package/lib/shallow/ReactDOMComponentTree.js +3 -5
  118. package/lib/shallow/ReactDOMContainerInfo.js +3 -5
  119. package/lib/shallow/ReactDOMEmptyComponent.js +3 -5
  120. package/lib/shallow/ReactDOMFeatureFlags.js +3 -5
  121. package/lib/shallow/ReactDOMFiber.js +3 -6
  122. package/lib/shallow/ReactDOMIDOperations.js +3 -6
  123. package/lib/shallow/ReactDOMInput.js +8 -8
  124. package/lib/shallow/ReactDOMInvalidARIAHook.js +3 -5
  125. package/lib/shallow/ReactDOMNullInputValuePropHook.js +3 -5
  126. package/lib/shallow/ReactDOMOption.js +3 -6
  127. package/lib/shallow/ReactDOMSelect.js +3 -5
  128. package/lib/shallow/ReactDOMSelection.js +3 -5
  129. package/lib/shallow/ReactDOMServer.js +3 -5
  130. package/lib/shallow/ReactDOMTextComponent.js +3 -7
  131. package/lib/shallow/ReactDOMTextarea.js +3 -5
  132. package/lib/shallow/ReactDOMTreeTraversal.js +3 -5
  133. package/lib/shallow/ReactDOMUnknownPropertyHook.js +3 -5
  134. package/lib/shallow/ReactDebugTool.js +6 -6
  135. package/lib/shallow/ReactDefaultBatchingStrategy.js +3 -5
  136. package/lib/shallow/ReactDefaultInjection.js +3 -5
  137. package/lib/shallow/ReactElementSymbol.js +3 -5
  138. package/lib/shallow/ReactEmptyComponent.js +3 -5
  139. package/lib/shallow/ReactErrorUtils.js +6 -6
  140. package/lib/shallow/ReactEventEmitterMixin.js +3 -6
  141. package/lib/shallow/ReactEventListener.js +3 -5
  142. package/lib/shallow/ReactFeatureFlags.js +3 -5
  143. package/lib/shallow/ReactFiber.js +3 -7
  144. package/lib/shallow/ReactFiberBeginWork.js +3 -6
  145. package/lib/shallow/ReactFiberCommitWork.js +3 -6
  146. package/lib/shallow/ReactFiberCompleteWork.js +3 -7
  147. package/lib/shallow/ReactFiberReconciler.js +3 -5
  148. package/lib/shallow/ReactFiberRoot.js +3 -5
  149. package/lib/shallow/ReactFiberScheduler.js +3 -5
  150. package/lib/shallow/ReactFiberUpdateQueue.js +3 -5
  151. package/lib/shallow/ReactHostComponent.js +3 -5
  152. package/lib/shallow/ReactHostOperationHistoryHook.js +3 -5
  153. package/lib/shallow/ReactInjection.js +3 -5
  154. package/lib/shallow/ReactInputSelection.js +3 -6
  155. package/lib/shallow/ReactInstanceMap.js +3 -7
  156. package/lib/shallow/ReactInstanceType.js +3 -5
  157. package/lib/shallow/ReactInstrumentation.js +3 -5
  158. package/lib/shallow/ReactInvalidSetStateWarningHook.js +3 -5
  159. package/lib/shallow/ReactMarkupChecksum.js +3 -5
  160. package/lib/shallow/ReactMount.js +10 -12
  161. package/lib/shallow/ReactMultiChild.js +3 -9
  162. package/lib/shallow/ReactMultiChildUpdateTypes.js +3 -5
  163. package/lib/shallow/ReactNodeTypes.js +3 -5
  164. package/lib/shallow/ReactOwner.js +3 -6
  165. package/lib/shallow/ReactPerf.js +9 -11
  166. package/lib/shallow/ReactPriorityLevel.js +5 -6
  167. package/lib/shallow/ReactPropTypeLocationNames.js +3 -5
  168. package/lib/shallow/ReactPropTypeLocations.js +3 -5
  169. package/lib/shallow/ReactPropTypesSecret.js +3 -5
  170. package/lib/shallow/ReactReconcileTransaction.js +3 -5
  171. package/lib/shallow/ReactReconciler.js +5 -9
  172. package/lib/shallow/ReactRef.js +3 -5
  173. package/lib/shallow/ReactReifiedYield.js +3 -5
  174. package/lib/shallow/ReactServerBatchingStrategy.js +3 -5
  175. package/lib/shallow/ReactServerRendering.js +3 -5
  176. package/lib/shallow/ReactServerRenderingTransaction.js +3 -5
  177. package/lib/shallow/ReactServerUpdateQueue.js +3 -5
  178. package/lib/shallow/ReactShallowRenderer.js +3 -5
  179. package/lib/shallow/ReactSimpleEmptyComponent.js +5 -7
  180. package/lib/shallow/ReactSyntheticEventType.js +3 -5
  181. package/lib/shallow/ReactTestEmptyComponent.js +3 -5
  182. package/lib/shallow/ReactTestMount.js +8 -8
  183. package/lib/shallow/ReactTestReconcileTransaction.js +2 -4
  184. package/lib/shallow/ReactTestRenderer.js +4 -5
  185. package/lib/shallow/ReactTestTextComponent.js +3 -5
  186. package/lib/shallow/ReactTypeOfWork.js +3 -5
  187. package/lib/shallow/ReactTypes.js +3 -5
  188. package/lib/shallow/ReactUpdateQueue.js +4 -8
  189. package/lib/shallow/ReactUpdates.js +4 -6
  190. package/lib/shallow/ReactVersion.js +4 -6
  191. package/lib/shallow/ResponderEventPlugin.js +3 -7
  192. package/lib/shallow/ResponderSyntheticEvent.js +3 -5
  193. package/lib/shallow/ResponderTouchHistoryStore.js +3 -5
  194. package/lib/shallow/SVGDOMPropertyConfig.js +3 -5
  195. package/lib/shallow/SelectEventPlugin.js +3 -8
  196. package/lib/shallow/SimpleEventPlugin.js +3 -7
  197. package/lib/shallow/SyntheticAnimationEvent.js +3 -5
  198. package/lib/shallow/SyntheticClipboardEvent.js +3 -5
  199. package/lib/shallow/SyntheticCompositionEvent.js +3 -5
  200. package/lib/shallow/SyntheticDragEvent.js +3 -5
  201. package/lib/shallow/SyntheticEvent.js +34 -33
  202. package/lib/shallow/SyntheticFocusEvent.js +3 -5
  203. package/lib/shallow/SyntheticInputEvent.js +3 -5
  204. package/lib/shallow/SyntheticKeyboardEvent.js +3 -5
  205. package/lib/shallow/SyntheticMouseEvent.js +3 -5
  206. package/lib/shallow/SyntheticTouchEvent.js +3 -5
  207. package/lib/shallow/SyntheticTransitionEvent.js +3 -5
  208. package/lib/shallow/SyntheticUIEvent.js +3 -5
  209. package/lib/shallow/SyntheticWheelEvent.js +6 -11
  210. package/lib/shallow/TapEventPlugin.js +3 -7
  211. package/lib/shallow/Transaction.js +6 -5
  212. package/lib/shallow/ViewportMetrics.js +3 -7
  213. package/lib/shallow/accumulate.js +3 -5
  214. package/lib/shallow/accumulateInto.js +3 -5
  215. package/lib/shallow/adler32.js +3 -5
  216. package/lib/shallow/canDefineProperty.js +3 -5
  217. package/lib/shallow/checkReactTypeSpec.js +3 -5
  218. package/lib/shallow/createMicrosoftUnsafeLocalFunction.js +3 -5
  219. package/lib/shallow/dangerousStyleValue.js +5 -7
  220. package/lib/shallow/deprecated.js +6 -8
  221. package/lib/shallow/escapeTextContentForBrowser.js +3 -6
  222. package/lib/shallow/findDOMNode.js +3 -5
  223. package/lib/shallow/flattenChildren.js +3 -5
  224. package/lib/shallow/forEachAccumulated.js +3 -5
  225. package/lib/shallow/getEventCharCode.js +3 -5
  226. package/lib/shallow/getEventKey.js +27 -19
  227. package/lib/shallow/getEventModifierState.js +7 -9
  228. package/lib/shallow/getEventTarget.js +3 -5
  229. package/lib/shallow/getHostComponentFromComposite.js +3 -5
  230. package/lib/shallow/getIteratorFn.js +3 -5
  231. package/lib/shallow/getNodeForCharacterOffset.js +3 -5
  232. package/lib/shallow/getTextContentAccessor.js +3 -5
  233. package/lib/shallow/getVendorPrefixedEventName.js +3 -5
  234. package/lib/shallow/inputValueTracking.js +120 -0
  235. package/lib/shallow/instantiateReactComponent.js +4 -6
  236. package/lib/shallow/isEventSupported.js +3 -5
  237. package/lib/shallow/isTextInputElement.js +17 -19
  238. package/lib/shallow/lowPriorityWarning.js +62 -0
  239. package/lib/shallow/quoteAttributeValueForBrowser.js +3 -5
  240. package/lib/shallow/reactProdInvariant.js +2 -4
  241. package/lib/shallow/renderSubtreeIntoContainer.js +3 -5
  242. package/lib/shallow/setInnerHTML.js +4 -6
  243. package/lib/shallow/setTextContent.js +3 -5
  244. package/lib/shallow/shouldUpdateReactComponent.js +3 -5
  245. package/lib/shallow/traverseAllChildren.js +4 -6
  246. package/lib/shallow/validateDOMNesting.js +4 -12
  247. package/lib/shouldUpdateReactComponent.js +3 -5
  248. package/lib/traverseAllChildren.js +4 -6
  249. package/package.json +21 -17
  250. package/PATENTS +0 -33
@@ -1,10 +1,8 @@
1
1
  /**
2
- * Copyright 2013-present, Facebook, Inc.
3
- * All rights reserved.
2
+ * Copyright (c) 2013-present, Facebook, Inc.
4
3
  *
5
- * This source code is licensed under the BSD-style license found in the
6
- * LICENSE file in the root directory of this source tree. An additional grant
7
- * of patent rights can be found in the PATENTS file in the same directory.
4
+ * This source code is licensed under the MIT license found in the
5
+ * LICENSE file in the root directory of this source tree.
8
6
  *
9
7
  */
10
8
 
@@ -105,12 +103,10 @@ function shouldPreventMouseEvent(name, type, props) {
105
103
  * @public
106
104
  */
107
105
  var EventPluginHub = {
108
-
109
106
  /**
110
107
  * Methods for injecting dependencies.
111
108
  */
112
109
  injection: {
113
-
114
110
  /**
115
111
  * @param {array} InjectedEventPluginOrder
116
112
  * @public
@@ -121,7 +117,6 @@ var EventPluginHub = {
121
117
  * @param {object} injectedNamesToPlugins Map from names to plugin modules.
122
118
  */
123
119
  injectEventPluginsByName: EventPluginRegistry.injectEventPluginsByName
124
-
125
120
  },
126
121
 
127
122
  /**
@@ -271,7 +266,6 @@ var EventPluginHub = {
271
266
  __getListenerBank: function () {
272
267
  return listenerBank;
273
268
  }
274
-
275
269
  };
276
270
 
277
271
  module.exports = EventPluginHub;
@@ -1,10 +1,8 @@
1
1
  /**
2
- * Copyright 2013-present, Facebook, Inc.
3
- * All rights reserved.
2
+ * Copyright (c) 2013-present, Facebook, Inc.
4
3
  *
5
- * This source code is licensed under the BSD-style license found in the
6
- * LICENSE file in the root directory of this source tree. An additional grant
7
- * of patent rights can be found in the PATENTS file in the same directory.
4
+ * This source code is licensed under the MIT license found in the
5
+ * LICENSE file in the root directory of this source tree.
8
6
  *
9
7
  *
10
8
  */
@@ -108,7 +106,6 @@ function publishRegistrationName(registrationName, pluginModule, eventName) {
108
106
  * @see {EventPluginHub}
109
107
  */
110
108
  var EventPluginRegistry = {
111
-
112
109
  /**
113
110
  * Ordered list of injected plugins.
114
111
  */
@@ -248,7 +245,6 @@ var EventPluginRegistry = {
248
245
  }
249
246
  }
250
247
  }
251
-
252
248
  };
253
249
 
254
250
  module.exports = EventPluginRegistry;
@@ -1,10 +1,8 @@
1
1
  /**
2
- * Copyright 2013-present, Facebook, Inc.
3
- * All rights reserved.
2
+ * Copyright (c) 2013-present, Facebook, Inc.
4
3
  *
5
- * This source code is licensed under the BSD-style license found in the
6
- * LICENSE file in the root directory of this source tree. An additional grant
7
- * of patent rights can be found in the PATENTS file in the same directory.
4
+ * This source code is licensed under the MIT license found in the
5
+ * LICENSE file in the root directory of this source tree.
8
6
  *
9
7
  */
10
8
 
@@ -1,10 +1,8 @@
1
1
  /**
2
- * Copyright 2013-present, Facebook, Inc.
3
- * All rights reserved.
2
+ * Copyright (c) 2013-present, Facebook, Inc.
4
3
  *
5
- * This source code is licensed under the BSD-style license found in the
6
- * LICENSE file in the root directory of this source tree. An additional grant
7
- * of patent rights can be found in the PATENTS file in the same directory.
4
+ * This source code is licensed under the MIT license found in the
5
+ * LICENSE file in the root directory of this source tree.
8
6
  *
9
7
  */
10
8
 
@@ -1,10 +1,8 @@
1
1
  /**
2
- * Copyright 2013-present, Facebook, Inc.
3
- * All rights reserved.
2
+ * Copyright (c) 2013-present, Facebook, Inc.
4
3
  *
5
- * This source code is licensed under the BSD-style license found in the
6
- * LICENSE file in the root directory of this source tree. An additional grant
7
- * of patent rights can be found in the PATENTS file in the same directory.
4
+ * This source code is licensed under the MIT license found in the
5
+ * LICENSE file in the root directory of this source tree.
8
6
  *
9
7
  */
10
8
 
@@ -1,10 +1,8 @@
1
1
  /**
2
- * Copyright 2013-present, Facebook, Inc.
3
- * All rights reserved.
2
+ * Copyright (c) 2013-present, Facebook, Inc.
4
3
  *
5
- * This source code is licensed under the BSD-style license found in the
6
- * LICENSE file in the root directory of this source tree. An additional grant
7
- * of patent rights can be found in the PATENTS file in the same directory.
4
+ * This source code is licensed under the MIT license found in the
5
+ * LICENSE file in the root directory of this source tree.
8
6
  *
9
7
  */
10
8
 
@@ -53,6 +51,7 @@ var HTMLDOMPropertyConfig = {
53
51
  contentEditable: 0,
54
52
  contextMenu: 0,
55
53
  controls: HAS_BOOLEAN_VALUE,
54
+ controlsList: 0,
56
55
  coords: 0,
57
56
  crossOrigin: 0,
58
57
  data: 0, // For `<object />` acts as `src`.
@@ -1,10 +1,8 @@
1
1
  /**
2
- * Copyright 2013-present, Facebook, Inc.
3
- * All rights reserved.
2
+ * Copyright (c) 2013-present, Facebook, Inc.
4
3
  *
5
- * This source code is licensed under the BSD-style license found in the
6
- * LICENSE file in the root directory of this source tree. An additional grant
7
- * of patent rights can be found in the PATENTS file in the same directory.
4
+ * This source code is licensed under the MIT license found in the
5
+ * LICENSE file in the root directory of this source tree.
8
6
  *
9
7
  *
10
8
  */
@@ -1,10 +1,8 @@
1
1
  /**
2
- * Copyright 2013-present, Facebook, Inc.
3
- * All rights reserved.
2
+ * Copyright (c) 2013-present, Facebook, Inc.
4
3
  *
5
- * This source code is licensed under the BSD-style license found in the
6
- * LICENSE file in the root directory of this source tree. An additional grant
7
- * of patent rights can be found in the PATENTS file in the same directory.
4
+ * This source code is licensed under the MIT license found in the
5
+ * LICENSE file in the root directory of this source tree.
8
6
  *
9
7
  */
10
8
 
@@ -22,13 +20,13 @@ var invariant = require('fbjs/lib/invariant');
22
20
  var warning = require('fbjs/lib/warning');
23
21
 
24
22
  var hasReadOnlyValue = {
25
- 'button': true,
26
- 'checkbox': true,
27
- 'image': true,
28
- 'hidden': true,
29
- 'radio': true,
30
- 'reset': true,
31
- 'submit': true
23
+ button: true,
24
+ checkbox: true,
25
+ image: true,
26
+ hidden: true,
27
+ radio: true,
28
+ reset: true,
29
+ submit: true
32
30
  };
33
31
 
34
32
  function _assertSingleLink(inputProps) {
@@ -1,10 +1,8 @@
1
1
  /**
2
- * Copyright 2013-present, Facebook, Inc.
3
- * All rights reserved.
2
+ * Copyright (c) 2013-present, Facebook, Inc.
4
3
  *
5
- * This source code is licensed under the BSD-style license found in the
6
- * LICENSE file in the root directory of this source tree. An additional grant
7
- * of patent rights can be found in the PATENTS file in the same directory.
4
+ * This source code is licensed under the MIT license found in the
5
+ * LICENSE file in the root directory of this source tree.
8
6
  *
9
7
  *
10
8
  */
@@ -1,10 +1,8 @@
1
1
  /**
2
- * Copyright 2013-present, Facebook, Inc.
3
- * All rights reserved.
2
+ * Copyright (c) 2013-present, Facebook, Inc.
4
3
  *
5
- * This source code is licensed under the BSD-style license found in the
6
- * LICENSE file in the root directory of this source tree. An additional grant
7
- * of patent rights can be found in the PATENTS file in the same directory.
4
+ * This source code is licensed under the MIT license found in the
5
+ * LICENSE file in the root directory of this source tree.
8
6
  *
9
7
  *
10
8
  */
@@ -1,10 +1,8 @@
1
1
  /**
2
- * Copyright 2013-present, Facebook, Inc.
3
- * All rights reserved.
2
+ * Copyright (c) 2013-present, Facebook, Inc.
4
3
  *
5
- * This source code is licensed under the BSD-style license found in the
6
- * LICENSE file in the root directory of this source tree. An additional grant
7
- * of patent rights can be found in the PATENTS file in the same directory.
4
+ * This source code is licensed under the MIT license found in the
5
+ * LICENSE file in the root directory of this source tree.
8
6
  *
9
7
  */
10
8
 
@@ -175,7 +173,6 @@ function getListeningForDocument(mountAt) {
175
173
  * @internal
176
174
  */
177
175
  var ReactBrowserEventEmitter = _assign({}, ReactEventEmitterMixin, {
178
-
179
176
  /**
180
177
  * Injectable event backend
181
178
  */
@@ -249,14 +246,12 @@ var ReactBrowserEventEmitter = _assign({}, ReactEventEmitterMixin, {
249
246
  ReactBrowserEventEmitter.ReactEventListener.trapBubbledEvent('topWheel', 'DOMMouseScroll', mountAt);
250
247
  }
251
248
  } else if (dependency === 'topScroll') {
252
-
253
249
  if (isEventSupported('scroll', true)) {
254
250
  ReactBrowserEventEmitter.ReactEventListener.trapCapturedEvent('topScroll', 'scroll', mountAt);
255
251
  } else {
256
252
  ReactBrowserEventEmitter.ReactEventListener.trapBubbledEvent('topScroll', 'scroll', ReactBrowserEventEmitter.ReactEventListener.WINDOW_HANDLE);
257
253
  }
258
254
  } else if (dependency === 'topFocus' || dependency === 'topBlur') {
259
-
260
255
  if (isEventSupported('focus', true)) {
261
256
  ReactBrowserEventEmitter.ReactEventListener.trapCapturedEvent('topFocus', 'focus', mountAt);
262
257
  ReactBrowserEventEmitter.ReactEventListener.trapCapturedEvent('topBlur', 'blur', mountAt);
@@ -321,7 +316,6 @@ var ReactBrowserEventEmitter = _assign({}, ReactEventEmitterMixin, {
321
316
  isMonitoringScrollValue = true;
322
317
  }
323
318
  }
324
-
325
319
  });
326
320
 
327
321
  module.exports = ReactBrowserEventEmitter;
@@ -1,10 +1,8 @@
1
1
  /**
2
- * Copyright 2013-present, Facebook, Inc.
3
- * All rights reserved.
2
+ * Copyright (c) 2013-present, Facebook, Inc.
4
3
  *
5
- * This source code is licensed under the BSD-style license found in the
6
- * LICENSE file in the root directory of this source tree. An additional grant
7
- * of patent rights can be found in the PATENTS file in the same directory.
4
+ * This source code is licensed under the MIT license found in the
5
+ * LICENSE file in the root directory of this source tree.
8
6
  *
9
7
  *
10
8
  */
@@ -30,7 +28,6 @@ var createReifiedYield = ReactReifiedYield.createReifiedYield;
30
28
  var isArray = Array.isArray;
31
29
 
32
30
  function ChildReconciler(shouldClone) {
33
-
34
31
  function createSubsequentChild(returnFiber, existingChild, previousSibling, newChildren, priority) {
35
32
  if (typeof newChildren !== 'object' || newChildren === null) {
36
33
  return previousSibling;
@@ -1,10 +1,8 @@
1
1
  /**
2
- * Copyright 2014-present, Facebook, Inc.
3
- * All rights reserved.
2
+ * Copyright (c) 2014-present, Facebook, Inc.
4
3
  *
5
- * This source code is licensed under the BSD-style license found in the
6
- * LICENSE file in the root directory of this source tree. An additional grant
7
- * of patent rights can be found in the PATENTS file in the same directory.
4
+ * This source code is licensed under the MIT license found in the
5
+ * LICENSE file in the root directory of this source tree.
8
6
  *
9
7
  */
10
8
 
@@ -59,8 +57,8 @@ var ReactChildReconciler = {
59
57
  * @return {?object} A set of child instances.
60
58
  * @internal
61
59
  */
62
- instantiateChildren: function (nestedChildNodes, transaction, context, selfDebugID // 0 in production and for roots
63
- ) {
60
+ instantiateChildren: function (nestedChildNodes, transaction, context, selfDebugID) // 0 in production and for roots
61
+ {
64
62
  if (nestedChildNodes == null) {
65
63
  return null;
66
64
  }
@@ -86,8 +84,8 @@ var ReactChildReconciler = {
86
84
  * @return {?object} A new set of child instances.
87
85
  * @internal
88
86
  */
89
- updateChildren: function (prevChildren, nextChildren, mountImages, removedNodes, transaction, hostParent, hostContainerInfo, context, selfDebugID // 0 in production and for roots
90
- ) {
87
+ updateChildren: function (prevChildren, nextChildren, mountImages, removedNodes, transaction, hostParent, hostContainerInfo, context, selfDebugID) // 0 in production and for roots
88
+ {
91
89
  // We currently don't have a way to track moves here but if we use iterators
92
90
  // instead of for..in we can zip the iterators and check if an item has
93
91
  // moved.
@@ -147,7 +145,6 @@ var ReactChildReconciler = {
147
145
  }
148
146
  }
149
147
  }
150
-
151
148
  };
152
149
 
153
150
  module.exports = ReactChildReconciler;
@@ -1,10 +1,8 @@
1
1
  /**
2
- * Copyright 2013-present, Facebook, Inc.
3
- * All rights reserved.
2
+ * Copyright (c) 2013-present, Facebook, Inc.
4
3
  *
5
- * This source code is licensed under the BSD-style license found in the
6
- * LICENSE file in the root directory of this source tree. An additional grant
7
- * of patent rights can be found in the PATENTS file in the same directory.
4
+ * This source code is licensed under the MIT license found in the
5
+ * LICENSE file in the root directory of this source tree.
8
6
  *
9
7
  */
10
8
 
@@ -19,11 +17,9 @@ var ReactDOMIDOperations = require('./ReactDOMIDOperations');
19
17
  * need for this injection.
20
18
  */
21
19
  var ReactComponentBrowserEnvironment = {
22
-
23
20
  processChildrenUpdates: ReactDOMIDOperations.dangerouslyProcessChildrenUpdates,
24
21
 
25
22
  replaceNodeWithMarkup: DOMChildrenOperations.dangerouslyReplaceNodeWithMarkup
26
-
27
23
  };
28
24
 
29
25
  module.exports = ReactComponentBrowserEnvironment;
@@ -1,10 +1,8 @@
1
1
  /**
2
- * Copyright 2014-present, Facebook, Inc.
3
- * All rights reserved.
2
+ * Copyright (c) 2014-present, Facebook, Inc.
4
3
  *
5
- * This source code is licensed under the BSD-style license found in the
6
- * LICENSE file in the root directory of this source tree. An additional grant
7
- * of patent rights can be found in the PATENTS file in the same directory.
4
+ * This source code is licensed under the MIT license found in the
5
+ * LICENSE file in the root directory of this source tree.
8
6
  *
9
7
  *
10
8
  */
@@ -18,7 +16,6 @@ var invariant = require('fbjs/lib/invariant');
18
16
  var injected = false;
19
17
 
20
18
  var ReactComponentEnvironment = {
21
-
22
19
  /**
23
20
  * Optionally injectable hook for swapping out mount images in the middle of
24
21
  * the tree.
@@ -39,7 +36,6 @@ var ReactComponentEnvironment = {
39
36
  injected = true;
40
37
  }
41
38
  }
42
-
43
39
  };
44
40
 
45
41
  module.exports = ReactComponentEnvironment;
@@ -1,10 +1,8 @@
1
1
  /**
2
- * Copyright 2013-present, Facebook, Inc.
3
- * All rights reserved.
2
+ * Copyright (c) 2013-present, Facebook, Inc.
4
3
  *
5
- * This source code is licensed under the BSD-style license found in the
6
- * LICENSE file in the root directory of this source tree. An additional grant
7
- * of patent rights can be found in the PATENTS file in the same directory.
4
+ * This source code is licensed under the MIT license found in the
5
+ * LICENSE file in the root directory of this source tree.
8
6
  *
9
7
  */
10
8
 
@@ -117,7 +115,6 @@ var nextMountID = 1;
117
115
  * @lends {ReactCompositeComponent.prototype}
118
116
  */
119
117
  var ReactCompositeComponent = {
120
-
121
118
  /**
122
119
  * Base constructor for all composite component.
123
120
  *
@@ -213,7 +210,7 @@ var ReactCompositeComponent = {
213
210
  var propsMutated = inst.props !== publicProps;
214
211
  var componentName = Component.displayName || Component.name || 'Component';
215
212
 
216
- process.env.NODE_ENV !== 'production' ? warning(inst.props === undefined || !propsMutated, '%s(...): When calling super() in `%s`, make sure to pass ' + 'up the same props that your component\'s constructor was passed.', componentName, componentName) : void 0;
213
+ process.env.NODE_ENV !== 'production' ? warning(inst.props === undefined || !propsMutated, '%s(...): When calling super() in `%s`, make sure to pass ' + "up the same props that your component's constructor was passed.", componentName, componentName) : void 0;
217
214
  }
218
215
 
219
216
  // These should be set up in the constructor, but as a convenience for
@@ -274,7 +271,7 @@ var ReactCompositeComponent = {
274
271
  },
275
272
 
276
273
  _constructComponent: function (doConstruct, publicProps, publicContext, updateQueue) {
277
- if (process.env.NODE_ENV !== 'production') {
274
+ if (process.env.NODE_ENV !== 'production' && !doConstruct) {
278
275
  ReactCurrentOwner.current = this;
279
276
  try {
280
277
  return this._constructComponentWithoutOwner(doConstruct, publicProps, publicContext, updateQueue);
@@ -895,7 +892,6 @@ var ReactCompositeComponent = {
895
892
 
896
893
  // Stub
897
894
  _instantiateReactComponent: null
898
-
899
895
  };
900
896
 
901
897
  module.exports = ReactCompositeComponent;
@@ -1,10 +1,8 @@
1
1
  /**
2
- * Copyright 2014-present, Facebook, Inc.
3
- * All rights reserved.
2
+ * Copyright (c) 2014-present, Facebook, Inc.
4
3
  *
5
- * This source code is licensed under the BSD-style license found in the
6
- * LICENSE file in the root directory of this source tree. An additional grant
7
- * of patent rights can be found in the PATENTS file in the same directory.
4
+ * This source code is licensed under the MIT license found in the
5
+ * LICENSE file in the root directory of this source tree.
8
6
  *
9
7
  *
10
8
  */
@@ -1,10 +1,8 @@
1
1
  /**
2
- * Copyright 2013-present, Facebook, Inc.
3
- * All rights reserved.
2
+ * Copyright (c) 2013-present, Facebook, Inc.
4
3
  *
5
- * This source code is licensed under the BSD-style license found in the
6
- * LICENSE file in the root directory of this source tree. An additional grant
7
- * of patent rights can be found in the PATENTS file in the same directory.
4
+ * This source code is licensed under the MIT license found in the
5
+ * LICENSE file in the root directory of this source tree.
8
6
  *
9
7
  */
10
8
 
@@ -35,6 +33,7 @@ var ReactDOM = {
35
33
  /* eslint-disable camelcase */
36
34
  unstable_batchedUpdates: ReactUpdates.batchedUpdates,
37
35
  unstable_renderSubtreeIntoContainer: renderSubtreeIntoContainer
36
+ /* eslint-enable camelcase */
38
37
  };
39
38
 
40
39
  // Inject the runtime into a devtools global hook regardless of browser.
@@ -63,7 +62,6 @@ if (typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ !== 'undefined' && typeof __REACT_DEVT
63
62
  if (process.env.NODE_ENV !== 'production') {
64
63
  var ExecutionEnvironment = require('fbjs/lib/ExecutionEnvironment');
65
64
  if (ExecutionEnvironment.canUseDOM && window.top === window.self) {
66
-
67
65
  // First check if devtools is not installed
68
66
  if (typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ === 'undefined') {
69
67
  // If we're in Chrome or Firefox, provide a download link if not installed.
@@ -75,7 +73,7 @@ if (process.env.NODE_ENV !== 'production') {
75
73
  }
76
74
 
77
75
  var testFunc = function testFn() {};
78
- process.env.NODE_ENV !== 'production' ? warning((testFunc.name || testFunc.toString()).indexOf('testFn') !== -1, 'It looks like you\'re using a minified copy of the development build ' + 'of React. When deploying React apps to production, make sure to use ' + 'the production build which skips development warnings and is faster. ' + 'See https://fb.me/react-minification for more details.') : void 0;
76
+ process.env.NODE_ENV !== 'production' ? warning((testFunc.name || testFunc.toString()).indexOf('testFn') !== -1, "It looks like you're using a minified copy of the development build " + 'of React. When deploying React apps to production, make sure to use ' + 'the production build which skips development warnings and is faster. ' + 'See https://fb.me/react-minification for more details.') : void 0;
79
77
 
80
78
  // If we're in IE8, check to see if we are in compatibility mode and provide
81
79
  // information on preventing compatibility mode
@@ -1,10 +1,8 @@
1
1
  /**
2
- * Copyright 2013-present, Facebook, Inc.
3
- * All rights reserved.
2
+ * Copyright (c) 2013-present, Facebook, Inc.
4
3
  *
5
- * This source code is licensed under the BSD-style license found in the
6
- * LICENSE file in the root directory of this source tree. An additional grant
7
- * of patent rights can be found in the PATENTS file in the same directory.
4
+ * This source code is licensed under the MIT license found in the
5
+ * LICENSE file in the root directory of this source tree.
8
6
  *
9
7
  */
10
8
 
@@ -39,6 +37,7 @@ var escapeTextContentForBrowser = require('./escapeTextContentForBrowser');
39
37
  var invariant = require('fbjs/lib/invariant');
40
38
  var isEventSupported = require('./isEventSupported');
41
39
  var shallowEqual = require('fbjs/lib/shallowEqual');
40
+ var inputValueTracking = require('./inputValueTracking');
42
41
  var validateDOMNesting = require('./validateDOMNesting');
43
42
  var warning = require('fbjs/lib/warning');
44
43
 
@@ -49,7 +48,7 @@ var listenTo = ReactBrowserEventEmitter.listenTo;
49
48
  var registrationNameModules = EventPluginRegistry.registrationNameModules;
50
49
 
51
50
  // For quickly matching children type, to test if can be treated as content.
52
- var CONTENT_TYPES = { 'string': true, 'number': true };
51
+ var CONTENT_TYPES = { string: true, number: true };
53
52
 
54
53
  var STYLE = 'style';
55
54
  var HTML = '__html';
@@ -158,7 +157,7 @@ function enqueuePutListener(inst, registrationName, listener, transaction) {
158
157
  if (process.env.NODE_ENV !== 'production') {
159
158
  // IE8 has no API for event capturing and the `onScroll` event doesn't
160
159
  // bubble.
161
- process.env.NODE_ENV !== 'production' ? warning(registrationName !== 'onScroll' || isEventSupported('scroll', true), 'This browser doesn\'t support the `onScroll` event') : void 0;
160
+ process.env.NODE_ENV !== 'production' ? warning(registrationName !== 'onScroll' || isEventSupported('scroll', true), "This browser doesn't support the `onScroll` event") : void 0;
162
161
  }
163
162
  var containerInfo = inst._hostContainerInfo;
164
163
  var isDocumentFragment = containerInfo._node && containerInfo._node.nodeType === DOC_FRAGMENT_TYPE;
@@ -248,6 +247,10 @@ var mediaEvents = {
248
247
  topWaiting: 'waiting'
249
248
  };
250
249
 
250
+ function trackInputValue() {
251
+ inputValueTracking.track(this);
252
+ }
253
+
251
254
  function trapBubbledEventsLocal() {
252
255
  var inst = this;
253
256
  // If a component renders to null or if another component fatals and causes
@@ -263,7 +266,6 @@ function trapBubbledEventsLocal() {
263
266
  break;
264
267
  case 'video':
265
268
  case 'audio':
266
-
267
269
  inst._wrapperState.listeners = [];
268
270
  // Create listener for each media event
269
271
  for (var event in mediaEvents) {
@@ -297,34 +299,35 @@ function postUpdateSelectWrapper() {
297
299
  // those special-case tags.
298
300
 
299
301
  var omittedCloseTags = {
300
- 'area': true,
301
- 'base': true,
302
- 'br': true,
303
- 'col': true,
304
- 'embed': true,
305
- 'hr': true,
306
- 'img': true,
307
- 'input': true,
308
- 'keygen': true,
309
- 'link': true,
310
- 'meta': true,
311
- 'param': true,
312
- 'source': true,
313
- 'track': true,
314
- 'wbr': true
302
+ area: true,
303
+ base: true,
304
+ br: true,
305
+ col: true,
306
+ embed: true,
307
+ hr: true,
308
+ img: true,
309
+ input: true,
310
+ keygen: true,
311
+ link: true,
312
+ meta: true,
313
+ param: true,
314
+ source: true,
315
+ track: true,
316
+ wbr: true
317
+ // NOTE: menuitem's close tag should be omitted, but that causes problems.
315
318
  };
316
319
 
317
320
  var newlineEatingTags = {
318
- 'listing': true,
319
- 'pre': true,
320
- 'textarea': true
321
+ listing: true,
322
+ pre: true,
323
+ textarea: true
321
324
  };
322
325
 
323
326
  // For HTML, certain tags cannot have children. This has the same purpose as
324
327
  // `omittedCloseTags` except that `menuitem` should still have its closing tag.
325
328
 
326
329
  var voidElementTags = _assign({
327
- 'menuitem': true
330
+ menuitem: true
328
331
  }, omittedCloseTags);
329
332
 
330
333
  // We accept any tag to be rendered but since this gets injected into arbitrary
@@ -388,7 +391,6 @@ function ReactDOMComponent(element) {
388
391
  ReactDOMComponent.displayName = 'ReactDOMComponent';
389
392
 
390
393
  ReactDOMComponent.Mixin = {
391
-
392
394
  /**
393
395
  * Generates root tag markup then recurses. This method has side effects and
394
396
  * is not idempotent.
@@ -425,6 +427,7 @@ ReactDOMComponent.Mixin = {
425
427
  case 'input':
426
428
  ReactDOMInput.mountWrapper(this, props, hostParent);
427
429
  props = ReactDOMInput.getHostProps(this, props);
430
+ transaction.getReactMountReady().enqueue(trackInputValue, this);
428
431
  transaction.getReactMountReady().enqueue(trapBubbledEventsLocal, this);
429
432
  break;
430
433
  case 'option':
@@ -439,6 +442,7 @@ ReactDOMComponent.Mixin = {
439
442
  case 'textarea':
440
443
  ReactDOMTextarea.mountWrapper(this, props, hostParent);
441
444
  props = ReactDOMTextarea.getHostProps(this, props);
445
+ transaction.getReactMountReady().enqueue(trackInputValue, this);
442
446
  transaction.getReactMountReady().enqueue(trapBubbledEventsLocal, this);
443
447
  break;
444
448
  }
@@ -759,6 +763,10 @@ ReactDOMComponent.Mixin = {
759
763
  // happen after `_updateDOMProperties`. Otherwise HTML5 input validations
760
764
  // raise warnings and prevent the new value from being assigned.
761
765
  ReactDOMInput.updateWrapper(this);
766
+
767
+ // We also check that we haven't missed a value update, such as a
768
+ // Radio group shifting the checked value to another named radio input.
769
+ inputValueTracking.updateValueIfChanged(this);
762
770
  break;
763
771
  case 'textarea':
764
772
  ReactDOMTextarea.updateWrapper(this);
@@ -964,6 +972,10 @@ ReactDOMComponent.Mixin = {
964
972
  }
965
973
  }
966
974
  break;
975
+ case 'input':
976
+ case 'textarea':
977
+ inputValueTracking.stopTracking(this);
978
+ break;
967
979
  case 'html':
968
980
  case 'head':
969
981
  case 'body':
@@ -992,7 +1004,6 @@ ReactDOMComponent.Mixin = {
992
1004
  getPublicInstance: function () {
993
1005
  return getNode(this);
994
1006
  }
995
-
996
1007
  };
997
1008
 
998
1009
  _assign(ReactDOMComponent.prototype, ReactDOMComponent.Mixin, ReactMultiChild.Mixin);
@@ -1,10 +1,8 @@
1
1
  /**
2
- * Copyright 2015-present, Facebook, Inc.
3
- * All rights reserved.
2
+ * Copyright (c) 2015-present, Facebook, Inc.
4
3
  *
5
- * This source code is licensed under the BSD-style license found in the
6
- * LICENSE file in the root directory of this source tree. An additional grant
7
- * of patent rights can be found in the PATENTS file in the same directory.
4
+ * This source code is licensed under the MIT license found in the
5
+ * LICENSE file in the root directory of this source tree.
8
6
  *
9
7
  */
10
8