react 15.0.1 → 15.0.2-alpha.4

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 (51) hide show
  1. package/dist/react-with-addons.js +917 -833
  2. package/dist/react-with-addons.min.js +6 -6
  3. package/dist/react.js +836 -755
  4. package/dist/react.min.js +6 -6
  5. package/lib/DisabledInputUtils.js +50 -0
  6. package/lib/EventPluginUtils.js +1 -1
  7. package/lib/IOSDefaultEventPluginOrder.js +16 -0
  8. package/lib/IOSNativeBridgeEventPlugin.js +57 -0
  9. package/lib/KeyEscapeUtils.js +58 -0
  10. package/lib/NativeMethodsMixin.js +165 -0
  11. package/lib/ReactChildReconciler.js +2 -1
  12. package/lib/ReactChildren.js +1 -1
  13. package/lib/ReactCompositeComponent.js +38 -30
  14. package/lib/ReactDOMButton.js +2 -28
  15. package/lib/ReactDOMComponent.js +5 -1
  16. package/lib/ReactDOMContainerInfo.js +1 -0
  17. package/lib/ReactDOMInput.js +2 -1
  18. package/lib/ReactDOMOption.js +10 -2
  19. package/lib/ReactDOMSelect.js +2 -1
  20. package/lib/ReactDOMTextarea.js +2 -1
  21. package/lib/ReactDefaultPerfAnalysis.js +3 -2
  22. package/lib/ReactNative.js +71 -0
  23. package/lib/ReactNativeAttributePayload.js +397 -0
  24. package/lib/ReactNativeBaseComponent.js +196 -0
  25. package/lib/ReactNativeComponentEnvironment.js +38 -0
  26. package/lib/ReactNativeComponentTree.js +66 -0
  27. package/lib/ReactNativeContainerInfo.js +21 -0
  28. package/lib/ReactNativeDOMIDOperations.js +83 -0
  29. package/lib/ReactNativeDefaultInjection.js +96 -0
  30. package/lib/ReactNativeEventEmitter.js +188 -0
  31. package/lib/ReactNativeGlobalResponderHandler.js +25 -0
  32. package/lib/ReactNativeMount.js +190 -0
  33. package/lib/ReactNativePropRegistry.js +52 -0
  34. package/lib/ReactNativeReconcileTransaction.js +100 -0
  35. package/lib/ReactNativeTagHandles.js +54 -0
  36. package/lib/ReactNativeTextComponent.js +70 -0
  37. package/lib/ReactNativeTreeTraversal.js +127 -0
  38. package/lib/ReactTestUtils.js +6 -3
  39. package/lib/ReactVersion.js +1 -1
  40. package/lib/SVGDOMPropertyConfig.js +1 -1
  41. package/lib/TouchHistoryMath.js +99 -0
  42. package/lib/createReactNativeComponentClass.js +42 -0
  43. package/lib/findNodeHandle.js +89 -0
  44. package/lib/flattenChildren.js +2 -1
  45. package/lib/onlyChild.js +1 -1
  46. package/lib/traverseAllChildren.js +3 -34
  47. package/lib/validateDOMNesting.js +1 -0
  48. package/package.json +1 -1
  49. package/lib/OrderedMap.js +0 -454
  50. package/lib/ReactDOM.native.js +0 -12
  51. package/lib/ReactPropTransferer.js +0 -109
@@ -1,12 +0,0 @@
1
- 'use strict';
2
-
3
- var ReactUpdates = require('./ReactUpdates');
4
-
5
- // TODO: In React Native, ReactTestUtils depends on ./ReactDOM (for
6
- // renderIntoDocument, which should never be called) and Relay depends on
7
- // react-dom (for batching). Once those are fixed, nothing in RN should import
8
- // this module and this file can go away.
9
-
10
- module.exports = {
11
- unstable_batchedUpdates: ReactUpdates.batchedUpdates,
12
- };
@@ -1,109 +0,0 @@
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 ReactPropTransferer
10
- */
11
-
12
- 'use strict';
13
-
14
- var _assign = require('object-assign');
15
-
16
- var emptyFunction = require('fbjs/lib/emptyFunction');
17
- var joinClasses = require('fbjs/lib/joinClasses');
18
-
19
- /**
20
- * Creates a transfer strategy that will merge prop values using the supplied
21
- * `mergeStrategy`. If a prop was previously unset, this just sets it.
22
- *
23
- * @param {function} mergeStrategy
24
- * @return {function}
25
- */
26
- function createTransferStrategy(mergeStrategy) {
27
- return function (props, key, value) {
28
- if (!props.hasOwnProperty(key)) {
29
- props[key] = value;
30
- } else {
31
- props[key] = mergeStrategy(props[key], value);
32
- }
33
- };
34
- }
35
-
36
- var transferStrategyMerge = createTransferStrategy(function (a, b) {
37
- // `merge` overrides the first object's (`props[key]` above) keys using the
38
- // second object's (`value`) keys. An object's style's existing `propA` would
39
- // get overridden. Flip the order here.
40
- return _assign({}, b, a);
41
- });
42
-
43
- /**
44
- * Transfer strategies dictate how props are transferred by `transferPropsTo`.
45
- * NOTE: if you add any more exceptions to this list you should be sure to
46
- * update `cloneWithProps()` accordingly.
47
- */
48
- var TransferStrategies = {
49
- /**
50
- * Never transfer `children`.
51
- */
52
- children: emptyFunction,
53
- /**
54
- * Transfer the `className` prop by merging them.
55
- */
56
- className: createTransferStrategy(joinClasses),
57
- /**
58
- * Transfer the `style` prop (which is an object) by merging them.
59
- */
60
- style: transferStrategyMerge
61
- };
62
-
63
- /**
64
- * Mutates the first argument by transferring the properties from the second
65
- * argument.
66
- *
67
- * @param {object} props
68
- * @param {object} newProps
69
- * @return {object}
70
- */
71
- function transferInto(props, newProps) {
72
- for (var thisKey in newProps) {
73
- if (!newProps.hasOwnProperty(thisKey)) {
74
- continue;
75
- }
76
-
77
- var transferStrategy = TransferStrategies[thisKey];
78
-
79
- if (transferStrategy && TransferStrategies.hasOwnProperty(thisKey)) {
80
- transferStrategy(props, thisKey, newProps[thisKey]);
81
- } else if (!props.hasOwnProperty(thisKey)) {
82
- props[thisKey] = newProps[thisKey];
83
- }
84
- }
85
- return props;
86
- }
87
-
88
- /**
89
- * ReactPropTransferer are capable of transferring props to another component
90
- * using a `transferPropsTo` method.
91
- *
92
- * @class ReactPropTransferer
93
- */
94
- var ReactPropTransferer = {
95
-
96
- /**
97
- * Merge two props objects using TransferStrategies.
98
- *
99
- * @param {object} oldProps original props (they take precedence)
100
- * @param {object} newProps new props to merge in
101
- * @return {object} a new object containing both sets of props merged.
102
- */
103
- mergeProps: function (oldProps, newProps) {
104
- return transferInto(_assign({}, oldProps), newProps);
105
- }
106
-
107
- };
108
-
109
- module.exports = ReactPropTransferer;