react 15.0.0-rc.2 → 15.0.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 (91) hide show
  1. package/dist/react-with-addons.js +1217 -1105
  2. package/dist/react-with-addons.min.js +6 -6
  3. package/dist/react.js +1083 -1001
  4. package/dist/react.min.js +6 -6
  5. package/lib/CSSPropertyOperations.js +31 -15
  6. package/lib/CallbackQueue.js +4 -3
  7. package/lib/DOMChildrenOperations.js +0 -3
  8. package/lib/DOMProperty.js +3 -3
  9. package/lib/DOMPropertyOperations.js +3 -2
  10. package/lib/Danger.js +8 -8
  11. package/lib/EventPluginHub.js +2 -2
  12. package/lib/EventPluginRegistry.js +7 -7
  13. package/lib/EventPluginUtils.js +5 -5
  14. package/lib/EventPropagators.js +1 -1
  15. package/lib/FallbackCompositionState.js +3 -2
  16. package/lib/LinkedValueUtils.js +4 -4
  17. package/lib/OrderedMap.js +16 -15
  18. package/lib/PooledClass.js +1 -1
  19. package/lib/React.js +51 -9
  20. package/lib/ReactBrowserEventEmitter.js +3 -2
  21. package/lib/ReactCSSTransitionGroup.js +3 -3
  22. package/lib/ReactChildReconciler.js +1 -1
  23. package/lib/ReactClass.js +24 -23
  24. package/lib/ReactComponent.js +5 -5
  25. package/lib/ReactComponentEnvironment.js +1 -1
  26. package/lib/ReactCompositeComponent.js +26 -25
  27. package/lib/ReactDOM.js +3 -3
  28. package/lib/ReactDOMComponent.js +27 -22
  29. package/lib/ReactDOMComponentTree.js +3 -3
  30. package/lib/ReactDOMDebugTool.js +1 -1
  31. package/lib/ReactDOMEmptyComponent.js +3 -3
  32. package/lib/ReactDOMInput.js +11 -10
  33. package/lib/ReactDOMOption.js +5 -4
  34. package/lib/ReactDOMSelect.js +8 -7
  35. package/lib/ReactDOMTextComponent.js +4 -3
  36. package/lib/ReactDOMTextarea.js +10 -9
  37. package/lib/ReactDOMTreeTraversal.js +5 -5
  38. package/lib/ReactDOMUnknownPropertyDevtool.js +2 -2
  39. package/lib/ReactDebugInstanceMap.js +102 -0
  40. package/lib/ReactDebugTool.js +1 -1
  41. package/lib/ReactDefaultBatchingStrategy.js +3 -2
  42. package/lib/ReactDefaultPerf.js +46 -7
  43. package/lib/ReactDefaultPerfAnalysis.js +7 -7
  44. package/lib/ReactElement.js +5 -4
  45. package/lib/ReactElementValidator.js +7 -7
  46. package/lib/ReactEventListener.js +3 -2
  47. package/lib/ReactFragment.js +4 -4
  48. package/lib/ReactInstanceHandles.js +6 -6
  49. package/lib/ReactInvalidSetStateWarningDevTool.js +1 -1
  50. package/lib/ReactMount.js +15 -14
  51. package/lib/ReactMultiChild.js +2 -2
  52. package/lib/ReactNativeComponent.js +4 -3
  53. package/lib/ReactNodeTypes.js +1 -1
  54. package/lib/ReactNoopUpdateQueue.js +1 -1
  55. package/lib/ReactOwner.js +2 -2
  56. package/lib/ReactPropTransferer.js +4 -3
  57. package/lib/ReactReconcileTransaction.js +3 -3
  58. package/lib/ReactServerRendering.js +2 -2
  59. package/lib/ReactServerRenderingTransaction.js +3 -3
  60. package/lib/ReactSimpleEmptyComponent.js +3 -3
  61. package/lib/ReactTestUtils.js +18 -8
  62. package/lib/ReactTransitionGroup.js +3 -2
  63. package/lib/ReactUMDEntry.js +26 -0
  64. package/lib/ReactUpdateQueue.js +23 -6
  65. package/lib/ReactUpdates.js +10 -9
  66. package/lib/ReactVersion.js +1 -1
  67. package/lib/ReactWithAddons.js +0 -7
  68. package/lib/ReactWithAddonsUMDEntry.js +26 -0
  69. package/lib/ResponderEventPlugin.js +1 -1
  70. package/lib/ResponderTouchHistoryStore.js +4 -4
  71. package/lib/SimpleEventPlugin.js +1 -1
  72. package/lib/SyntheticEvent.js +7 -6
  73. package/lib/Transaction.js +2 -2
  74. package/lib/accumulate.js +1 -1
  75. package/lib/accumulateInto.js +1 -1
  76. package/lib/dangerousStyleValue.js +1 -1
  77. package/lib/deprecated.js +4 -3
  78. package/lib/findDOMNode.js +3 -3
  79. package/lib/flattenChildren.js +1 -1
  80. package/lib/instantiateReactComponent.js +6 -5
  81. package/lib/onlyChild.js +1 -1
  82. package/lib/reactComponentExpect.js +4 -3
  83. package/lib/setInnerHTML.js +1 -0
  84. package/lib/traverseAllChildren.js +2 -2
  85. package/lib/update.js +14 -13
  86. package/lib/validateDOMNesting.js +5 -4
  87. package/package.json +5 -4
  88. package/addons.js +0 -15
  89. package/lib/Object.assign.js +0 -47
  90. package/lib/React.native.js +0 -5
  91. package/lib/ReactIsomorphic.js +0 -74
@@ -11,10 +11,11 @@
11
11
 
12
12
  'use strict';
13
13
 
14
+ var _assign = require('object-assign');
15
+
14
16
  var React = require('./React');
15
17
  var ReactTransitionChildMapping = require('./ReactTransitionChildMapping');
16
18
 
17
- var assign = require('./Object.assign');
18
19
  var emptyFunction = require('fbjs/lib/emptyFunction');
19
20
 
20
21
  var ReactTransitionGroup = React.createClass({
@@ -176,7 +177,7 @@ var ReactTransitionGroup = React.createClass({
176
177
  this.performEnter(key);
177
178
  } else {
178
179
  this.setState(function (state) {
179
- var newChildren = assign({}, state.children);
180
+ var newChildren = _assign({}, state.children);
180
181
  delete newChildren[key];
181
182
  return { children: newChildren };
182
183
  });
@@ -0,0 +1,26 @@
1
+ /**
2
+ * Copyright 2013-present, Facebook, Inc.
3
+ * All rights reserved.
4
+ *
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.
8
+ *
9
+ * @providesModule ReactUMDEntry
10
+ */
11
+
12
+ 'use strict';
13
+
14
+ var _assign = require('object-assign');
15
+
16
+ var ReactDOM = require('./ReactDOM');
17
+ var ReactDOMServer = require('./ReactDOMServer');
18
+ var React = require('./React');
19
+
20
+ // `version` will be added here by ReactIsomorphic.
21
+ var ReactUMDEntry = _assign({
22
+ __SECRET_DOM_DO_NOT_USE_OR_YOU_WILL_BE_FIRED: ReactDOM,
23
+ __SECRET_DOM_SERVER_DO_NOT_USE_OR_YOU_WILL_BE_FIRED: ReactDOMServer
24
+ }, React);
25
+
26
+ module.exports = ReactUMDEntry;
@@ -22,6 +22,19 @@ function enqueueUpdate(internalInstance) {
22
22
  ReactUpdates.enqueueUpdate(internalInstance);
23
23
  }
24
24
 
25
+ function formatUnexpectedArgument(arg) {
26
+ var type = typeof arg;
27
+ if (type !== 'object') {
28
+ return type;
29
+ }
30
+ var displayName = arg.constructor && arg.constructor.name || type;
31
+ var keys = Object.keys(arg);
32
+ if (keys.length > 0 && keys.length < 20) {
33
+ return displayName + ' (keys: ' + keys.join(', ') + ')';
34
+ }
35
+ return displayName;
36
+ }
37
+
25
38
  function getInternalInstanceReadyForUpdate(publicInstance, callerName) {
26
39
  var internalInstance = ReactInstanceMap.get(publicInstance);
27
40
  if (!internalInstance) {
@@ -29,13 +42,13 @@ function getInternalInstanceReadyForUpdate(publicInstance, callerName) {
29
42
  // Only warn when we have a callerName. Otherwise we should be silent.
30
43
  // We're probably calling from enqueueCallback. We don't want to warn
31
44
  // there because we already warned for the corresponding lifecycle method.
32
- process.env.NODE_ENV !== 'production' ? warning(!callerName, '%s(...): Can only update a mounted or mounting component. ' + 'This usually means you called %s() on an unmounted component. ' + 'This is a no-op. Please check the code for the %s component.', callerName, callerName, publicInstance.constructor.displayName) : undefined;
45
+ process.env.NODE_ENV !== 'production' ? warning(!callerName, '%s(...): Can only update a mounted or mounting component. ' + 'This usually means you called %s() on an unmounted component. ' + 'This is a no-op. Please check the code for the %s component.', callerName, callerName, publicInstance.constructor.displayName) : void 0;
33
46
  }
34
47
  return null;
35
48
  }
36
49
 
37
50
  if (process.env.NODE_ENV !== 'production') {
38
- process.env.NODE_ENV !== 'production' ? warning(ReactCurrentOwner.current == null, '%s(...): Cannot update during an existing state transition (such as ' + 'within `render` or another component\'s constructor). Render methods ' + 'should be a pure function of props and state; constructor ' + 'side-effects are an anti-pattern, but can be moved to ' + '`componentWillMount`.', callerName) : undefined;
51
+ process.env.NODE_ENV !== 'production' ? warning(ReactCurrentOwner.current == null, '%s(...): Cannot update during an existing state transition (such as ' + 'within `render` or another component\'s constructor). Render methods ' + 'should be a pure function of props and state; constructor ' + 'side-effects are an anti-pattern, but can be moved to ' + '`componentWillMount`.', callerName) : void 0;
39
52
  }
40
53
 
41
54
  return internalInstance;
@@ -58,7 +71,7 @@ var ReactUpdateQueue = {
58
71
  if (process.env.NODE_ENV !== 'production') {
59
72
  var owner = ReactCurrentOwner.current;
60
73
  if (owner !== null) {
61
- process.env.NODE_ENV !== 'production' ? warning(owner._warnedAboutRefsInRender, '%s is accessing isMounted inside its render() function. ' + 'render() should be a pure function of props and state. It should ' + 'never access something that requires stale data from the previous ' + 'render, such as refs. Move this logic to componentDidMount and ' + 'componentDidUpdate instead.', owner.getName() || 'A component') : undefined;
74
+ process.env.NODE_ENV !== 'production' ? warning(owner._warnedAboutRefsInRender, '%s is accessing isMounted inside its render() function. ' + 'render() should be a pure function of props and state. It should ' + 'never access something that requires stale data from the previous ' + 'render, such as refs. Move this logic to componentDidMount and ' + 'componentDidUpdate instead.', owner.getName() || 'A component') : void 0;
62
75
  owner._warnedAboutRefsInRender = true;
63
76
  }
64
77
  }
@@ -79,10 +92,11 @@ var ReactUpdateQueue = {
79
92
  *
80
93
  * @param {ReactClass} publicInstance The instance to use as `this` context.
81
94
  * @param {?function} callback Called after state is updated.
95
+ * @param {string} callerName Name of the calling function in the public API.
82
96
  * @internal
83
97
  */
84
- enqueueCallback: function (publicInstance, callback) {
85
- !(typeof callback === 'function') ? process.env.NODE_ENV !== 'production' ? invariant(false, 'enqueueCallback(...): You called `setProps`, `replaceProps`, ' + '`setState`, `replaceState`, or `forceUpdate` with a callback of type ' + '%s. A function is expected', typeof callback === 'object' && Object.keys(callback).length && Object.keys(callback).length < 20 ? typeof callback + ' (keys: ' + Object.keys(callback) + ')' : typeof callback) : invariant(false) : undefined;
98
+ enqueueCallback: function (publicInstance, callback, callerName) {
99
+ ReactUpdateQueue.validateCallback(callback, callerName);
86
100
  var internalInstance = getInternalInstanceReadyForUpdate(publicInstance);
87
101
 
88
102
  // Previously we would throw an error if we didn't have an internal
@@ -107,7 +121,6 @@ var ReactUpdateQueue = {
107
121
  },
108
122
 
109
123
  enqueueCallbackInternal: function (internalInstance, callback) {
110
- !(typeof callback === 'function') ? process.env.NODE_ENV !== 'production' ? invariant(false, 'enqueueCallback(...): You called `setProps`, `replaceProps`, ' + '`setState`, `replaceState`, or `forceUpdate` with a callback of type ' + '%s. A function is expected', typeof callback === 'object' && Object.keys(callback).length && Object.keys(callback).length < 20 ? typeof callback + ' (keys: ' + Object.keys(callback) + ')' : typeof callback) : invariant(false) : undefined;
111
124
  if (internalInstance._pendingCallbacks) {
112
125
  internalInstance._pendingCallbacks.push(callback);
113
126
  } else {
@@ -191,6 +204,10 @@ var ReactUpdateQueue = {
191
204
  enqueueElementInternal: function (internalInstance, newElement) {
192
205
  internalInstance._pendingElement = newElement;
193
206
  enqueueUpdate(internalInstance);
207
+ },
208
+
209
+ validateCallback: function (callback, callerName) {
210
+ !(!callback || typeof callback === 'function') ? process.env.NODE_ENV !== 'production' ? invariant(false, '%s(...): Expected the last optional `callback` argument to be a ' + 'function. Instead received: %s.', callerName, formatUnexpectedArgument(callback)) : invariant(false) : void 0;
194
211
  }
195
212
 
196
213
  };
@@ -11,6 +11,8 @@
11
11
 
12
12
  'use strict';
13
13
 
14
+ var _assign = require('object-assign');
15
+
14
16
  var CallbackQueue = require('./CallbackQueue');
15
17
  var PooledClass = require('./PooledClass');
16
18
  var ReactFeatureFlags = require('./ReactFeatureFlags');
@@ -18,7 +20,6 @@ var ReactPerf = require('./ReactPerf');
18
20
  var ReactReconciler = require('./ReactReconciler');
19
21
  var Transaction = require('./Transaction');
20
22
 
21
- var assign = require('./Object.assign');
22
23
  var invariant = require('fbjs/lib/invariant');
23
24
 
24
25
  var dirtyComponents = [];
@@ -28,7 +29,7 @@ var asapEnqueued = false;
28
29
  var batchingStrategy = null;
29
30
 
30
31
  function ensureInjected() {
31
- !(ReactUpdates.ReactReconcileTransaction && batchingStrategy) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'ReactUpdates: must inject a reconcile transaction class and batching ' + 'strategy') : invariant(false) : undefined;
32
+ !(ReactUpdates.ReactReconcileTransaction && batchingStrategy) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'ReactUpdates: must inject a reconcile transaction class and batching ' + 'strategy') : invariant(false) : void 0;
32
33
  }
33
34
 
34
35
  var NESTED_UPDATES = {
@@ -69,7 +70,7 @@ function ReactUpdatesFlushTransaction() {
69
70
  /* useCreateElement */true);
70
71
  }
71
72
 
72
- assign(ReactUpdatesFlushTransaction.prototype, Transaction.Mixin, {
73
+ _assign(ReactUpdatesFlushTransaction.prototype, Transaction.Mixin, {
73
74
  getTransactionWrappers: function () {
74
75
  return TRANSACTION_WRAPPERS;
75
76
  },
@@ -109,7 +110,7 @@ function mountOrderComparator(c1, c2) {
109
110
 
110
111
  function runBatchedUpdates(transaction) {
111
112
  var len = transaction.dirtyComponentsLength;
112
- !(len === dirtyComponents.length) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'Expected flush transaction\'s stored dirty-components length (%s) to ' + 'match dirty-components array length (%s).', len, dirtyComponents.length) : invariant(false) : undefined;
113
+ !(len === dirtyComponents.length) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'Expected flush transaction\'s stored dirty-components length (%s) to ' + 'match dirty-components array length (%s).', len, dirtyComponents.length) : invariant(false) : void 0;
113
114
 
114
115
  // Since reconciling a component higher in the owner hierarchy usually (not
115
116
  // always -- see shouldComponentUpdate()) will reconcile children, reconcile
@@ -202,21 +203,21 @@ function enqueueUpdate(component) {
202
203
  * if no updates are currently being performed.
203
204
  */
204
205
  function asap(callback, context) {
205
- !batchingStrategy.isBatchingUpdates ? process.env.NODE_ENV !== 'production' ? invariant(false, 'ReactUpdates.asap: Can\'t enqueue an asap callback in a context where' + 'updates are not being batched.') : invariant(false) : undefined;
206
+ !batchingStrategy.isBatchingUpdates ? process.env.NODE_ENV !== 'production' ? invariant(false, 'ReactUpdates.asap: Can\'t enqueue an asap callback in a context where' + 'updates are not being batched.') : invariant(false) : void 0;
206
207
  asapCallbackQueue.enqueue(callback, context);
207
208
  asapEnqueued = true;
208
209
  }
209
210
 
210
211
  var ReactUpdatesInjection = {
211
212
  injectReconcileTransaction: function (ReconcileTransaction) {
212
- !ReconcileTransaction ? process.env.NODE_ENV !== 'production' ? invariant(false, 'ReactUpdates: must provide a reconcile transaction class') : invariant(false) : undefined;
213
+ !ReconcileTransaction ? process.env.NODE_ENV !== 'production' ? invariant(false, 'ReactUpdates: must provide a reconcile transaction class') : invariant(false) : void 0;
213
214
  ReactUpdates.ReactReconcileTransaction = ReconcileTransaction;
214
215
  },
215
216
 
216
217
  injectBatchingStrategy: function (_batchingStrategy) {
217
- !_batchingStrategy ? process.env.NODE_ENV !== 'production' ? invariant(false, 'ReactUpdates: must provide a batching strategy') : invariant(false) : undefined;
218
- !(typeof _batchingStrategy.batchedUpdates === 'function') ? process.env.NODE_ENV !== 'production' ? invariant(false, 'ReactUpdates: must provide a batchedUpdates() function') : invariant(false) : undefined;
219
- !(typeof _batchingStrategy.isBatchingUpdates === 'boolean') ? process.env.NODE_ENV !== 'production' ? invariant(false, 'ReactUpdates: must provide an isBatchingUpdates boolean attribute') : invariant(false) : undefined;
218
+ !_batchingStrategy ? process.env.NODE_ENV !== 'production' ? invariant(false, 'ReactUpdates: must provide a batching strategy') : invariant(false) : void 0;
219
+ !(typeof _batchingStrategy.batchedUpdates === 'function') ? process.env.NODE_ENV !== 'production' ? invariant(false, 'ReactUpdates: must provide a batchedUpdates() function') : invariant(false) : void 0;
220
+ !(typeof _batchingStrategy.isBatchingUpdates === 'boolean') ? process.env.NODE_ENV !== 'production' ? invariant(false, 'ReactUpdates: must provide an isBatchingUpdates boolean attribute') : invariant(false) : void 0;
220
221
  batchingStrategy = _batchingStrategy;
221
222
  }
222
223
  };
@@ -11,4 +11,4 @@
11
11
 
12
12
  'use strict';
13
13
 
14
- module.exports = '15.0.0-rc.2';
14
+ module.exports = '15.0.0';
@@ -9,13 +9,6 @@
9
9
  * @providesModule ReactWithAddons
10
10
  */
11
11
 
12
- /**
13
- * This module exists purely in the open source project, and is meant as a way
14
- * to create a separate standalone build of React. This build has "addons", or
15
- * functionality we've built and think might be useful but doesn't have a good
16
- * place to live inside React core.
17
- */
18
-
19
12
  'use strict';
20
13
 
21
14
  var LinkedStateMixin = require('./LinkedStateMixin');
@@ -0,0 +1,26 @@
1
+ /**
2
+ * Copyright 2013-present, Facebook, Inc.
3
+ * All rights reserved.
4
+ *
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.
8
+ *
9
+ * @providesModule ReactWithAddonsUMDEntry
10
+ */
11
+
12
+ 'use strict';
13
+
14
+ var _assign = require('object-assign');
15
+
16
+ var ReactDOM = require('./ReactDOM');
17
+ var ReactDOMServer = require('./ReactDOMServer');
18
+ var ReactWithAddons = require('./ReactWithAddons');
19
+
20
+ // `version` will be added here by ReactIsomorphic.
21
+ var ReactWithAddonsUMDEntry = _assign({
22
+ __SECRET_DOM_DO_NOT_USE_OR_YOU_WILL_BE_FIRED: ReactDOM,
23
+ __SECRET_DOM_SERVER_DO_NOT_USE_OR_YOU_WILL_BE_FIRED: ReactDOMServer
24
+ }, ReactWithAddons);
25
+
26
+ module.exports = ReactWithAddonsUMDEntry;
@@ -433,7 +433,7 @@ var ResponderEventPlugin = {
433
433
  trackedTouchCount += 1;
434
434
  } else if (isEndish(topLevelType)) {
435
435
  trackedTouchCount -= 1;
436
- !(trackedTouchCount >= 0) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'Ended a touch event which was not counted in trackedTouchCount.') : invariant(false) : undefined;
436
+ !(trackedTouchCount >= 0) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'Ended a touch event which was not counted in trackedTouchCount.') : invariant(false) : void 0;
437
437
  }
438
438
 
439
439
  ResponderTouchHistoryStore.recordTouchTrack(topLevelType, nativeEvent, nativeEventTarget);
@@ -88,7 +88,7 @@ var reinitializeTouchTrack = function (touchTrack, touch) {
88
88
 
89
89
  var validateTouch = function (touch) {
90
90
  var identifier = touch.identifier;
91
- !(identifier != null) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'Touch object is missing identifier') : invariant(false) : undefined;
91
+ !(identifier != null) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'Touch object is missing identifier') : invariant(false) : void 0;
92
92
  if (identifier > MAX_TOUCH_BANK) {
93
93
  console.warn('Touch identifier ' + identifier + ' is greater than maximum ' + 'supported ' + MAX_TOUCH_BANK + ' which causes performance issues ' + 'backfilling array locations for all of the indices.');
94
94
  }
@@ -114,7 +114,7 @@ var recordMoveTouchData = function (touch) {
114
114
  var touchTrack = touchBank[touch.identifier];
115
115
  if (process.env.NODE_ENV !== 'production') {
116
116
  validateTouch(touch);
117
- !touchTrack ? process.env.NODE_ENV !== 'production' ? invariant(false, 'Touch data should have been recorded on start') : invariant(false) : undefined;
117
+ !touchTrack ? process.env.NODE_ENV !== 'production' ? invariant(false, 'Touch data should have been recorded on start') : invariant(false) : void 0;
118
118
  }
119
119
  touchTrack.touchActive = true;
120
120
  touchTrack.previousPageX = touchTrack.currentPageX;
@@ -131,7 +131,7 @@ var recordEndTouchData = function (touch) {
131
131
  var touchTrack = touchBank[touch.identifier];
132
132
  if (process.env.NODE_ENV !== 'production') {
133
133
  validateTouch(touch);
134
- !touchTrack ? process.env.NODE_ENV !== 'production' ? invariant(false, 'Touch data should have been recorded on start') : invariant(false) : undefined;
134
+ !touchTrack ? process.env.NODE_ENV !== 'production' ? invariant(false, 'Touch data should have been recorded on start') : invariant(false) : void 0;
135
135
  }
136
136
  touchTrack.previousPageX = touchTrack.currentPageX;
137
137
  touchTrack.previousPageY = touchTrack.currentPageY;
@@ -168,7 +168,7 @@ var ResponderTouchHistoryStore = {
168
168
  if (process.env.NODE_ENV !== 'production') {
169
169
  var activeTouchData = touchBank[touchHistory.indexOfSingleActiveTouch];
170
170
  var foundActive = activeTouchData != null && !!activeTouchData.touchActive;
171
- !foundActive ? process.env.NODE_ENV !== 'production' ? invariant(false, 'Cannot find single active touch') : invariant(false) : undefined;
171
+ !foundActive ? process.env.NODE_ENV !== 'production' ? invariant(false, 'Cannot find single active touch') : invariant(false) : void 0;
172
172
  }
173
173
  }
174
174
  }
@@ -594,7 +594,7 @@ var SimpleEventPlugin = {
594
594
  EventConstructor = SyntheticClipboardEvent;
595
595
  break;
596
596
  }
597
- !EventConstructor ? process.env.NODE_ENV !== 'production' ? invariant(false, 'SimpleEventPlugin: Unhandled event type, `%s`.', topLevelType) : invariant(false) : undefined;
597
+ !EventConstructor ? process.env.NODE_ENV !== 'production' ? invariant(false, 'SimpleEventPlugin: Unhandled event type, `%s`.', topLevelType) : invariant(false) : void 0;
598
598
  var event = EventConstructor.getPooled(dispatchConfig, targetInst, nativeEvent, nativeEventTarget);
599
599
  EventPropagators.accumulateTwoPhaseDispatches(event);
600
600
  return event;
@@ -11,9 +11,10 @@
11
11
 
12
12
  'use strict';
13
13
 
14
+ var _assign = require('object-assign');
15
+
14
16
  var PooledClass = require('./PooledClass');
15
17
 
16
- var assign = require('./Object.assign');
17
18
  var emptyFunction = require('fbjs/lib/emptyFunction');
18
19
  var warning = require('fbjs/lib/warning');
19
20
 
@@ -101,7 +102,7 @@ function SyntheticEvent(dispatchConfig, targetInst, nativeEvent, nativeEventTarg
101
102
  return this;
102
103
  }
103
104
 
104
- assign(SyntheticEvent.prototype, {
105
+ _assign(SyntheticEvent.prototype, {
105
106
 
106
107
  preventDefault: function () {
107
108
  this.defaultPrevented = true;
@@ -186,7 +187,7 @@ if (process.env.NODE_ENV !== 'production') {
186
187
  return new Proxy(constructor.apply(that, args), {
187
188
  set: function (target, prop, value) {
188
189
  if (prop !== 'isPersistent' && !target.constructor.Interface.hasOwnProperty(prop) && shouldBeReleasedProperties.indexOf(prop) === -1) {
189
- process.env.NODE_ENV !== 'production' ? warning(didWarnForAddedNewProperty || target.isPersistent(), 'This synthetic event is reused for performance reasons. If you\'re ' + 'seeing this, you\'re adding a new property in the synthetic event object. ' + 'The property is never released. See ' + 'https://fb.me/react-event-pooling for more information.') : undefined;
190
+ process.env.NODE_ENV !== 'production' ? warning(didWarnForAddedNewProperty || target.isPersistent(), 'This synthetic event is reused for performance reasons. If you\'re ' + 'seeing this, you\'re adding a new property in the synthetic event object. ' + 'The property is never released. See ' + 'https://fb.me/react-event-pooling for more information.') : void 0;
190
191
  didWarnForAddedNewProperty = true;
191
192
  }
192
193
  target[prop] = value;
@@ -211,11 +212,11 @@ SyntheticEvent.augmentClass = function (Class, Interface) {
211
212
  E.prototype = Super.prototype;
212
213
  var prototype = new E();
213
214
 
214
- assign(prototype, Class.prototype);
215
+ _assign(prototype, Class.prototype);
215
216
  Class.prototype = prototype;
216
217
  Class.prototype.constructor = Class;
217
218
 
218
- Class.Interface = assign({}, Super.Interface, Interface);
219
+ Class.Interface = _assign({}, Super.Interface, Interface);
219
220
  Class.augmentClass = Super.augmentClass;
220
221
 
221
222
  PooledClass.addPoolingTo(Class, PooledClass.fourArgumentPooler);
@@ -255,6 +256,6 @@ function getPooledWarningPropertyDefinition(propName, getVal) {
255
256
 
256
257
  function warn(action, result) {
257
258
  var warningCondition = false;
258
- process.env.NODE_ENV !== 'production' ? warning(warningCondition, 'This synthetic event is reused for performance reasons. If you\'re seeing this, ' + 'you\'re %s `%s` on a released/nullified synthetic event. %s. ' + 'If you must keep the original synthetic event around, use event.persist(). ' + 'See https://fb.me/react-event-pooling for more information.', action, propName, result) : undefined;
259
+ process.env.NODE_ENV !== 'production' ? warning(warningCondition, 'This synthetic event is reused for performance reasons. If you\'re seeing this, ' + 'you\'re %s `%s` on a released/nullified synthetic event. %s. ' + 'If you must keep the original synthetic event around, use event.persist(). ' + 'See https://fb.me/react-event-pooling for more information.', action, propName, result) : void 0;
259
260
  }
260
261
  }
@@ -122,7 +122,7 @@ var Mixin = {
122
122
  * @return {*} Return value from `method`.
123
123
  */
124
124
  perform: function (method, scope, a, b, c, d, e, f) {
125
- !!this.isInTransaction() ? process.env.NODE_ENV !== 'production' ? invariant(false, 'Transaction.perform(...): Cannot initialize a transaction when there ' + 'is already an outstanding transaction.') : invariant(false) : undefined;
125
+ !!this.isInTransaction() ? process.env.NODE_ENV !== 'production' ? invariant(false, 'Transaction.perform(...): Cannot initialize a transaction when there ' + 'is already an outstanding transaction.') : invariant(false) : void 0;
126
126
  var errorThrown;
127
127
  var ret;
128
128
  try {
@@ -186,7 +186,7 @@ var Mixin = {
186
186
  * invoked).
187
187
  */
188
188
  closeAll: function (startIndex) {
189
- !this.isInTransaction() ? process.env.NODE_ENV !== 'production' ? invariant(false, 'Transaction.closeAll(): Cannot close transaction when none are open.') : invariant(false) : undefined;
189
+ !this.isInTransaction() ? process.env.NODE_ENV !== 'production' ? invariant(false, 'Transaction.closeAll(): Cannot close transaction when none are open.') : invariant(false) : void 0;
190
190
  var transactionWrappers = this.transactionWrappers;
191
191
  for (var i = startIndex; i < transactionWrappers.length; i++) {
192
192
  var wrapper = transactionWrappers[i];
package/lib/accumulate.js CHANGED
@@ -21,7 +21,7 @@ var invariant = require('fbjs/lib/invariant');
21
21
  * @return {*|array<*>} An accumulation of items.
22
22
  */
23
23
  function accumulate(current, next) {
24
- !(next != null) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'accumulate(...): Accumulated items must be not be null or undefined.') : invariant(false) : undefined;
24
+ !(next != null) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'accumulate(...): Accumulated items must be not be null or undefined.') : invariant(false) : void 0;
25
25
  if (current == null) {
26
26
  return next;
27
27
  } else {
@@ -28,7 +28,7 @@ var invariant = require('fbjs/lib/invariant');
28
28
  */
29
29
 
30
30
  function accumulateInto(current, next) {
31
- !(next != null) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'accumulateInto(...): Accumulated items must not be null or undefined.') : invariant(false) : undefined;
31
+ !(next != null) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'accumulateInto(...): Accumulated items must not be null or undefined.') : invariant(false) : void 0;
32
32
  if (current == null) {
33
33
  return next;
34
34
  }
@@ -65,7 +65,7 @@ function dangerousStyleValue(name, value, component) {
65
65
  }
66
66
  }
67
67
  if (!warned) {
68
- process.env.NODE_ENV !== 'production' ? warning(false, 'a `%s` tag (owner: `%s`) was passed a numeric string value ' + 'for CSS property `%s` (value: `%s`) which will be treated ' + 'as a unitless number in a future version of React.', component._currentElement.type, ownerName || 'unknown', name, value) : undefined;
68
+ process.env.NODE_ENV !== 'production' ? warning(false, 'a `%s` tag (owner: `%s`) was passed a numeric string value ' + 'for CSS property `%s` (value: `%s`) which will be treated ' + 'as a unitless number in a future version of React.', component._currentElement.type, ownerName || 'unknown', name, value) : void 0;
69
69
  }
70
70
  }
71
71
  }
package/lib/deprecated.js CHANGED
@@ -11,7 +11,8 @@
11
11
 
12
12
  'use strict';
13
13
 
14
- var assign = require('./Object.assign');
14
+ var _assign = require('object-assign');
15
+
15
16
  var warning = require('fbjs/lib/warning');
16
17
 
17
18
  /**
@@ -34,14 +35,14 @@ function deprecated(fnName, newModule, newPackage, ctx, fn) {
34
35
  // Require examples in this string must be split to prevent React's
35
36
  // build tools from mistaking them for real requires.
36
37
  // Otherwise the build tools will attempt to build a '%s' module.
37
- 'React.%s is deprecated. Please use %s.%s from require' + '(\'%s\') ' + 'instead.', fnName, newModule, fnName, newPackage) : undefined;
38
+ 'React.%s is deprecated. Please use %s.%s from require' + '(\'%s\') ' + 'instead.', fnName, newModule, fnName, newPackage) : void 0;
38
39
  /* eslint-enable no-useless-concat */
39
40
  warned = true;
40
41
  return fn.apply(ctx, arguments);
41
42
  };
42
43
  // We need to make sure all properties of the original fn are copied over.
43
44
  // In particular, this is needed to support PropTypes
44
- return assign(newFn, fn);
45
+ return _assign(newFn, fn);
45
46
  }
46
47
 
47
48
  return fn;
@@ -29,7 +29,7 @@ function findDOMNode(componentOrElement) {
29
29
  if (process.env.NODE_ENV !== 'production') {
30
30
  var owner = ReactCurrentOwner.current;
31
31
  if (owner !== null) {
32
- process.env.NODE_ENV !== 'production' ? warning(owner._warnedAboutRefsInRender, '%s is accessing findDOMNode inside its render(). ' + 'render() should be a pure function of props and state. It should ' + 'never access something that requires stale data from the previous ' + 'render, such as refs. Move this logic to componentDidMount and ' + 'componentDidUpdate instead.', owner.getName() || 'A component') : undefined;
32
+ process.env.NODE_ENV !== 'production' ? warning(owner._warnedAboutRefsInRender, '%s is accessing findDOMNode inside its render(). ' + 'render() should be a pure function of props and state. It should ' + 'never access something that requires stale data from the previous ' + 'render, such as refs. Move this logic to componentDidMount and ' + 'componentDidUpdate instead.', owner.getName() || 'A component') : void 0;
33
33
  owner._warnedAboutRefsInRender = true;
34
34
  }
35
35
  }
@@ -47,9 +47,9 @@ function findDOMNode(componentOrElement) {
47
47
  }
48
48
 
49
49
  if (typeof componentOrElement.render === 'function') {
50
- !false ? process.env.NODE_ENV !== 'production' ? invariant(false, 'findDOMNode was called on an unmounted component.') : invariant(false) : undefined;
50
+ !false ? process.env.NODE_ENV !== 'production' ? invariant(false, 'findDOMNode was called on an unmounted component.') : invariant(false) : void 0;
51
51
  } else {
52
- !false ? process.env.NODE_ENV !== 'production' ? invariant(false, 'Element appears to be neither ReactComponent nor DOMNode (keys: %s)', Object.keys(componentOrElement)) : invariant(false) : undefined;
52
+ !false ? process.env.NODE_ENV !== 'production' ? invariant(false, 'Element appears to be neither ReactComponent nor DOMNode (keys: %s)', Object.keys(componentOrElement)) : invariant(false) : void 0;
53
53
  }
54
54
  }
55
55