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.
- package/dist/react-with-addons.js +917 -833
- package/dist/react-with-addons.min.js +6 -6
- package/dist/react.js +836 -755
- package/dist/react.min.js +6 -6
- package/lib/DisabledInputUtils.js +50 -0
- package/lib/EventPluginUtils.js +1 -1
- package/lib/IOSDefaultEventPluginOrder.js +16 -0
- package/lib/IOSNativeBridgeEventPlugin.js +57 -0
- package/lib/KeyEscapeUtils.js +58 -0
- package/lib/NativeMethodsMixin.js +165 -0
- package/lib/ReactChildReconciler.js +2 -1
- package/lib/ReactChildren.js +1 -1
- package/lib/ReactCompositeComponent.js +38 -30
- package/lib/ReactDOMButton.js +2 -28
- package/lib/ReactDOMComponent.js +5 -1
- package/lib/ReactDOMContainerInfo.js +1 -0
- package/lib/ReactDOMInput.js +2 -1
- package/lib/ReactDOMOption.js +10 -2
- package/lib/ReactDOMSelect.js +2 -1
- package/lib/ReactDOMTextarea.js +2 -1
- package/lib/ReactDefaultPerfAnalysis.js +3 -2
- package/lib/ReactNative.js +71 -0
- package/lib/ReactNativeAttributePayload.js +397 -0
- package/lib/ReactNativeBaseComponent.js +196 -0
- package/lib/ReactNativeComponentEnvironment.js +38 -0
- package/lib/ReactNativeComponentTree.js +66 -0
- package/lib/ReactNativeContainerInfo.js +21 -0
- package/lib/ReactNativeDOMIDOperations.js +83 -0
- package/lib/ReactNativeDefaultInjection.js +96 -0
- package/lib/ReactNativeEventEmitter.js +188 -0
- package/lib/ReactNativeGlobalResponderHandler.js +25 -0
- package/lib/ReactNativeMount.js +190 -0
- package/lib/ReactNativePropRegistry.js +52 -0
- package/lib/ReactNativeReconcileTransaction.js +100 -0
- package/lib/ReactNativeTagHandles.js +54 -0
- package/lib/ReactNativeTextComponent.js +70 -0
- package/lib/ReactNativeTreeTraversal.js +127 -0
- package/lib/ReactTestUtils.js +6 -3
- package/lib/ReactVersion.js +1 -1
- package/lib/SVGDOMPropertyConfig.js +1 -1
- package/lib/TouchHistoryMath.js +99 -0
- package/lib/createReactNativeComponentClass.js +42 -0
- package/lib/findNodeHandle.js +89 -0
- package/lib/flattenChildren.js +2 -1
- package/lib/onlyChild.js +1 -1
- package/lib/traverseAllChildren.js +3 -34
- package/lib/validateDOMNesting.js +1 -0
- package/package.json +1 -1
- package/lib/OrderedMap.js +0 -454
- package/lib/ReactDOM.native.js +0 -12
- package/lib/ReactPropTransferer.js +0 -109
package/lib/ReactDOM.native.js
DELETED
|
@@ -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;
|