react 15.4.1 → 15.5.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.
- package/README.md +0 -7
- package/dist/react-with-addons.js +1005 -778
- package/dist/react-with-addons.min.js +3 -3
- package/dist/react.js +721 -501
- package/dist/react.min.js +2 -2
- package/lib/PooledClass.js +1 -13
- package/lib/React.js +15 -0
- package/lib/ReactAddonsDOMDependencies.js +8 -7
- package/lib/ReactAddonsDOMDependenciesUMDShim.js +13 -9
- package/lib/ReactCSSTransitionGroup.js +5 -3
- package/lib/ReactCSSTransitionGroupChild.js +131 -113
- package/lib/ReactClass.js +7 -1
- package/lib/ReactElementValidator.js +27 -1
- package/lib/ReactPropTypes.js +4 -419
- package/lib/ReactTransitionGroup.js +9 -27
- package/lib/ReactUMDEntry.js +4 -3
- package/lib/ReactVersion.js +1 -1
- package/lib/ReactWithAddonsUMDEntry.js +5 -3
- package/lib/getNextDebugIDUMDShim.js +17 -0
- package/package.json +4 -3
|
@@ -19,9 +19,11 @@ function _possibleConstructorReturn(self, call) { if (!self) { throw new Referen
|
|
|
19
19
|
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
|
|
20
20
|
|
|
21
21
|
var React = require('./React');
|
|
22
|
-
var ReactAddonsDOMDependencies = require('./ReactAddonsDOMDependencies');
|
|
23
22
|
var ReactTransitionChildMapping = require('./ReactTransitionChildMapping');
|
|
24
23
|
|
|
24
|
+
var propTypesFactory = require('prop-types/factory');
|
|
25
|
+
var PropTypes = propTypesFactory(React.isValidElement);
|
|
26
|
+
|
|
25
27
|
var emptyFunction = require('fbjs/lib/emptyFunction');
|
|
26
28
|
|
|
27
29
|
/**
|
|
@@ -63,12 +65,7 @@ var ReactTransitionGroup = function (_React$Component) {
|
|
|
63
65
|
|
|
64
66
|
delete _this.currentlyTransitioningKeys[key];
|
|
65
67
|
|
|
66
|
-
var currentChildMapping;
|
|
67
|
-
if (process.env.NODE_ENV !== 'production') {
|
|
68
|
-
currentChildMapping = ReactTransitionChildMapping.getChildMapping(_this.props.children, ReactAddonsDOMDependencies.getReactInstanceMap().get(_this)._debugID);
|
|
69
|
-
} else {
|
|
70
|
-
currentChildMapping = ReactTransitionChildMapping.getChildMapping(_this.props.children);
|
|
71
|
-
}
|
|
68
|
+
var currentChildMapping = ReactTransitionChildMapping.getChildMapping(_this.props.children);
|
|
72
69
|
|
|
73
70
|
if (!currentChildMapping || !currentChildMapping.hasOwnProperty(key)) {
|
|
74
71
|
// This was removed before it had fully appeared. Remove it.
|
|
@@ -92,12 +89,7 @@ var ReactTransitionGroup = function (_React$Component) {
|
|
|
92
89
|
|
|
93
90
|
delete _this.currentlyTransitioningKeys[key];
|
|
94
91
|
|
|
95
|
-
var currentChildMapping;
|
|
96
|
-
if (process.env.NODE_ENV !== 'production') {
|
|
97
|
-
currentChildMapping = ReactTransitionChildMapping.getChildMapping(_this.props.children, ReactAddonsDOMDependencies.getReactInstanceMap().get(_this)._debugID);
|
|
98
|
-
} else {
|
|
99
|
-
currentChildMapping = ReactTransitionChildMapping.getChildMapping(_this.props.children);
|
|
100
|
-
}
|
|
92
|
+
var currentChildMapping = ReactTransitionChildMapping.getChildMapping(_this.props.children);
|
|
101
93
|
|
|
102
94
|
if (!currentChildMapping || !currentChildMapping.hasOwnProperty(key)) {
|
|
103
95
|
// This was removed before it had fully entered. Remove it.
|
|
@@ -124,12 +116,7 @@ var ReactTransitionGroup = function (_React$Component) {
|
|
|
124
116
|
|
|
125
117
|
delete _this.currentlyTransitioningKeys[key];
|
|
126
118
|
|
|
127
|
-
var currentChildMapping;
|
|
128
|
-
if (process.env.NODE_ENV !== 'production') {
|
|
129
|
-
currentChildMapping = ReactTransitionChildMapping.getChildMapping(_this.props.children, ReactAddonsDOMDependencies.getReactInstanceMap().get(_this)._debugID);
|
|
130
|
-
} else {
|
|
131
|
-
currentChildMapping = ReactTransitionChildMapping.getChildMapping(_this.props.children);
|
|
132
|
-
}
|
|
119
|
+
var currentChildMapping = ReactTransitionChildMapping.getChildMapping(_this.props.children);
|
|
133
120
|
|
|
134
121
|
if (currentChildMapping && currentChildMapping.hasOwnProperty(key)) {
|
|
135
122
|
// This entered again before it fully left. Add it again.
|
|
@@ -160,12 +147,7 @@ var ReactTransitionGroup = function (_React$Component) {
|
|
|
160
147
|
};
|
|
161
148
|
|
|
162
149
|
ReactTransitionGroup.prototype.componentWillReceiveProps = function componentWillReceiveProps(nextProps) {
|
|
163
|
-
var nextChildMapping;
|
|
164
|
-
if (process.env.NODE_ENV !== 'production') {
|
|
165
|
-
nextChildMapping = ReactTransitionChildMapping.getChildMapping(nextProps.children, ReactAddonsDOMDependencies.getReactInstanceMap().get(this)._debugID);
|
|
166
|
-
} else {
|
|
167
|
-
nextChildMapping = ReactTransitionChildMapping.getChildMapping(nextProps.children);
|
|
168
|
-
}
|
|
150
|
+
var nextChildMapping = ReactTransitionChildMapping.getChildMapping(nextProps.children);
|
|
169
151
|
var prevChildMapping = this.state.children;
|
|
170
152
|
|
|
171
153
|
this.setState({
|
|
@@ -237,8 +219,8 @@ var ReactTransitionGroup = function (_React$Component) {
|
|
|
237
219
|
|
|
238
220
|
ReactTransitionGroup.displayName = 'ReactTransitionGroup';
|
|
239
221
|
ReactTransitionGroup.propTypes = {
|
|
240
|
-
component:
|
|
241
|
-
childFactory:
|
|
222
|
+
component: PropTypes.any,
|
|
223
|
+
childFactory: PropTypes.func
|
|
242
224
|
};
|
|
243
225
|
ReactTransitionGroup.defaultProps = {
|
|
244
226
|
component: 'span',
|
package/lib/ReactUMDEntry.js
CHANGED
|
@@ -15,16 +15,17 @@ var _assign = require('object-assign');
|
|
|
15
15
|
var React = require('./React');
|
|
16
16
|
|
|
17
17
|
// `version` will be added here by the React module.
|
|
18
|
-
var ReactUMDEntry = _assign({
|
|
18
|
+
var ReactUMDEntry = _assign(React, {
|
|
19
19
|
__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED: {
|
|
20
20
|
ReactCurrentOwner: require('./ReactCurrentOwner')
|
|
21
21
|
}
|
|
22
|
-
}
|
|
22
|
+
});
|
|
23
23
|
|
|
24
24
|
if (process.env.NODE_ENV !== 'production') {
|
|
25
25
|
_assign(ReactUMDEntry.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED, {
|
|
26
26
|
// ReactComponentTreeHook should not be included in production.
|
|
27
|
-
ReactComponentTreeHook: require('./ReactComponentTreeHook')
|
|
27
|
+
ReactComponentTreeHook: require('./ReactComponentTreeHook'),
|
|
28
|
+
getNextDebugID: require('./getNextDebugID')
|
|
28
29
|
});
|
|
29
30
|
}
|
|
30
31
|
|
package/lib/ReactVersion.js
CHANGED
|
@@ -15,16 +15,18 @@ var _assign = require('object-assign');
|
|
|
15
15
|
var ReactWithAddons = require('./ReactWithAddons');
|
|
16
16
|
|
|
17
17
|
// `version` will be added here by the React module.
|
|
18
|
-
var ReactWithAddonsUMDEntry = _assign({
|
|
18
|
+
var ReactWithAddonsUMDEntry = _assign(ReactWithAddons, {
|
|
19
|
+
__SECRET_INJECTED_REACT_DOM_DO_NOT_USE_OR_YOU_WILL_BE_FIRED: null, // Will be injected by ReactDOM UMD build.
|
|
19
20
|
__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED: {
|
|
20
21
|
ReactCurrentOwner: require('./ReactCurrentOwner')
|
|
21
22
|
}
|
|
22
|
-
}
|
|
23
|
+
});
|
|
23
24
|
|
|
24
25
|
if (process.env.NODE_ENV !== 'production') {
|
|
25
26
|
_assign(ReactWithAddonsUMDEntry.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED, {
|
|
26
27
|
// ReactComponentTreeHook should not be included in production.
|
|
27
|
-
ReactComponentTreeHook: require('./ReactComponentTreeHook')
|
|
28
|
+
ReactComponentTreeHook: require('./ReactComponentTreeHook'),
|
|
29
|
+
getNextDebugID: require('./getNextDebugID')
|
|
28
30
|
});
|
|
29
31
|
}
|
|
30
32
|
|
|
@@ -0,0 +1,17 @@
|
|
|
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
|
+
*/
|
|
10
|
+
|
|
11
|
+
/* globals React */
|
|
12
|
+
|
|
13
|
+
'use strict';
|
|
14
|
+
|
|
15
|
+
var ReactInternals = React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
|
|
16
|
+
|
|
17
|
+
module.exports = ReactInternals.getNextDebugID;
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "react",
|
|
3
3
|
"description": "React is a JavaScript library for building user interfaces.",
|
|
4
|
-
"version": "15.
|
|
4
|
+
"version": "15.5.0",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"react"
|
|
7
7
|
],
|
|
@@ -23,9 +23,10 @@
|
|
|
23
23
|
"node": ">=0.10.0"
|
|
24
24
|
},
|
|
25
25
|
"dependencies": {
|
|
26
|
-
"fbjs": "^0.8.
|
|
26
|
+
"fbjs": "^0.8.9",
|
|
27
27
|
"loose-envify": "^1.1.0",
|
|
28
|
-
"object-assign": "^4.1.0"
|
|
28
|
+
"object-assign": "^4.1.0",
|
|
29
|
+
"prop-types": "15.5.0-alpha.0"
|
|
29
30
|
},
|
|
30
31
|
"browserify": {
|
|
31
32
|
"transform": [
|