react 15.3.0-rc.3 → 15.3.1
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 +1404 -1444
- package/dist/react-with-addons.min.js +6 -6
- package/dist/react.js +1336 -1376
- package/dist/react.min.js +6 -6
- package/lib/DOMPropertyOperations.js +0 -7
- package/lib/EventPluginHub.js +2 -0
- package/lib/ReactChildReconciler.js +11 -8
- package/lib/{ReactChildrenMutationWarningDevtool.js → ReactChildrenMutationWarningHook.js} +11 -19
- package/lib/ReactComponentBrowserEnvironment.js +1 -10
- package/lib/ReactComponentEnvironment.js +0 -8
- package/lib/ReactComponentTreeDevtool.js +2 -205
- package/lib/ReactComponentTreeHook.js +342 -0
- package/lib/ReactComponentTreeTestUtils.js +11 -11
- package/lib/ReactCompositeComponent.js +10 -34
- package/lib/ReactDOM.js +9 -0
- package/lib/ReactDOMComponent.js +23 -43
- package/lib/ReactDOMComponentTree.js +1 -1
- package/lib/ReactDOMEmptyComponent.js +1 -1
- package/lib/ReactDOMFactories.js +138 -144
- package/lib/ReactDOMFiber.js +0 -2
- package/lib/ReactDOMInput.js +25 -3
- package/lib/{ReactDOMNullInputValuePropDevtool.js → ReactDOMNullInputValuePropHook.js} +5 -5
- package/lib/ReactDOMSelect.js +5 -4
- package/lib/ReactDOMTextComponent.js +1 -8
- package/lib/{ReactDOMUnknownPropertyDevtool.js → ReactDOMUnknownPropertyHook.js} +8 -8
- package/lib/ReactDebugTool.js +63 -77
- package/lib/ReactElement.js +37 -33
- package/lib/ReactElementValidator.js +5 -3
- package/lib/{ReactHostOperationHistoryDevtool.js → ReactHostOperationHistoryHook.js} +4 -4
- package/lib/{ReactInvalidSetStateWarningDevTool.js → ReactInvalidSetStateWarningHook.js} +3 -3
- package/lib/ReactMount.js +45 -10
- package/lib/ReactMultiChild.js +11 -13
- package/lib/ReactNativeBaseComponent.js +5 -3
- package/lib/ReactNativeComponentEnvironment.js +0 -7
- package/lib/ReactNativeMount.js +2 -5
- package/lib/ReactNativeTextComponent.js +2 -10
- package/lib/ReactPropTypes.js +26 -12
- package/lib/ReactReconciler.js +5 -11
- package/lib/ReactRef.js +1 -1
- package/lib/ReactServerRendering.js +2 -1
- package/lib/ReactSimpleEmptyComponent.js +3 -2
- package/lib/ReactTestMount.js +3 -5
- package/lib/ReactTestUtils.js +5 -5
- package/lib/ReactVersion.js +1 -1
- package/lib/ResponderEventPlugin.js +6 -5
- package/lib/SimpleEventPlugin.js +2 -0
- package/lib/SyntheticEvent.js +8 -1
- package/lib/checkReactTypeSpec.js +6 -6
- package/lib/createReactNativeComponentClass.js +1 -1
- package/lib/escapeTextContentForBrowser.js +1 -0
- package/lib/flattenChildren.js +7 -5
- package/lib/instantiateReactComponent.js +1 -28
- package/lib/onlyChild.js +1 -1
- package/package.json +2 -2
- package/lib/ReactDOMDebugTool.js +0 -67
- package/lib/ReactDOMInstrumentation.js +0 -21
- package/lib/createHierarchyRenderer.js +0 -85
|
@@ -1,21 +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 ReactDOMInstrumentation
|
|
10
|
-
*/
|
|
11
|
-
|
|
12
|
-
'use strict';
|
|
13
|
-
|
|
14
|
-
var debugTool = null;
|
|
15
|
-
|
|
16
|
-
if (process.env.NODE_ENV !== 'production') {
|
|
17
|
-
var ReactDOMDebugTool = require('./ReactDOMDebugTool');
|
|
18
|
-
debugTool = ReactDOMDebugTool;
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
module.exports = { debugTool: debugTool };
|
|
@@ -1,85 +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 createHierarchyRenderer
|
|
10
|
-
*/
|
|
11
|
-
|
|
12
|
-
'use strict';
|
|
13
|
-
|
|
14
|
-
var React = require('./React');
|
|
15
|
-
|
|
16
|
-
/**
|
|
17
|
-
* Creates a render method that makes it easier to create, render, and inspect a
|
|
18
|
-
* hierarchy of mock React component classes.
|
|
19
|
-
*
|
|
20
|
-
* A component class is created for each of the supplied render methods. Each
|
|
21
|
-
* render method is invoked with the classes created using the render methods
|
|
22
|
-
* that come after it in the supplied list of render methods.
|
|
23
|
-
*
|
|
24
|
-
* var renderHierarchy = createHierarchyRenderer(
|
|
25
|
-
* function ComponentA(ComponentB, ComponentC) {...},
|
|
26
|
-
* function ComponentB(ComponentC) {...},
|
|
27
|
-
* function ComponentC() {...}
|
|
28
|
-
* );
|
|
29
|
-
*
|
|
30
|
-
* When the hierarchy is invoked, a two-dimensional array is returned. Each
|
|
31
|
-
* array corresponds to a supplied render method and contains the instances
|
|
32
|
-
* returned by that render method in the order it was invoked.
|
|
33
|
-
*
|
|
34
|
-
* var instances = renderHierarchy(
|
|
35
|
-
* function(ComponentA[, ComponentB, ComponentC]) {
|
|
36
|
-
* ReactDOM.render(<ComponentA />, ...);
|
|
37
|
-
* })
|
|
38
|
-
* );
|
|
39
|
-
* instances[0][0]; // First return value of first render method.
|
|
40
|
-
* instances[1][0]; // First return value of second render method.
|
|
41
|
-
* instances[1][1]; // Second return value of second render method.
|
|
42
|
-
*
|
|
43
|
-
* Refs should be used to reference components that are not the return value of
|
|
44
|
-
* render methods.
|
|
45
|
-
*
|
|
46
|
-
* expect(instances[0][0].refs.X).toBe(...);
|
|
47
|
-
*
|
|
48
|
-
* NOTE: The component classes created for each render method are re-used for
|
|
49
|
-
* each invocation of the hierarchy renderer. If new classes are needed, you
|
|
50
|
-
* should re-execute `createHierarchyRenderer` with the same arguments.
|
|
51
|
-
*
|
|
52
|
-
* @param {array<function>} ...renderMethods
|
|
53
|
-
* @return {function}
|
|
54
|
-
*/
|
|
55
|
-
function createHierarchyRenderer() {
|
|
56
|
-
for (var _len = arguments.length, renderMethods = Array(_len), _key = 0; _key < _len; _key++) {
|
|
57
|
-
renderMethods[_key] = arguments[_key];
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
var instances;
|
|
61
|
-
var Components = renderMethods.reduceRight(function (ComponentsAccumulator, renderMethod, depth) {
|
|
62
|
-
var Component = React.createClass({
|
|
63
|
-
displayName: renderMethod.name,
|
|
64
|
-
render: function () {
|
|
65
|
-
instances[depth].push(this);
|
|
66
|
-
return renderMethod.apply(this, ComponentsAccumulator);
|
|
67
|
-
}
|
|
68
|
-
});
|
|
69
|
-
return [Component].concat(ComponentsAccumulator);
|
|
70
|
-
}, []);
|
|
71
|
-
/**
|
|
72
|
-
* @param {function} renderComponent
|
|
73
|
-
* @return {array<array<*>>}
|
|
74
|
-
*/
|
|
75
|
-
function renderHierarchy(renderComponent) {
|
|
76
|
-
instances = renderMethods.map(function () {
|
|
77
|
-
return [];
|
|
78
|
-
});
|
|
79
|
-
renderComponent.apply(null, Components);
|
|
80
|
-
return instances;
|
|
81
|
-
}
|
|
82
|
-
return renderHierarchy;
|
|
83
|
-
}
|
|
84
|
-
|
|
85
|
-
module.exports = createHierarchyRenderer;
|