react 0.12.0-rc1 → 0.13.0-alpha.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/JSXTransformer.js +1862 -519
- package/dist/react-with-addons.js +4099 -3299
- package/dist/react-with-addons.min.js +6 -6
- package/dist/react.js +3893 -3353
- package/dist/react.min.js +6 -6
- package/lib/BeforeInputEventPlugin.js +388 -111
- package/lib/CSSProperty.js +5 -2
- package/lib/CSSPropertyOperations.js +20 -0
- package/lib/ChangeEventPlugin.js +2 -2
- package/lib/Danger.js +1 -1
- package/lib/DefaultEventPluginOrder.js +0 -1
- package/lib/ExecutionEnvironment.js +2 -3
- package/lib/FallbackCompositionState.js +87 -0
- package/lib/HTMLDOMPropertyConfig.js +7 -0
- package/lib/Object.assign.js +3 -1
- package/lib/React.js +14 -49
- package/lib/ReactBrowserComponentMixin.js +2 -12
- package/lib/ReactBrowserEventEmitter.js +2 -4
- package/lib/ReactCSSTransitionGroup.js +3 -0
- package/lib/ReactCSSTransitionGroupChild.js +8 -0
- package/lib/ReactChildReconciler.js +121 -0
- package/lib/ReactClass.js +916 -0
- package/lib/ReactComponent.js +36 -286
- package/lib/ReactComponentBrowserEnvironment.js +9 -82
- package/lib/ReactComponentEnvironment.js +57 -0
- package/lib/ReactCompositeComponent.js +608 -1026
- package/lib/ReactContext.js +5 -1
- package/lib/ReactDOM.js +2 -7
- package/lib/ReactDOMButton.js +4 -5
- package/lib/ReactDOMComponent.js +97 -69
- package/lib/ReactDOMForm.js +4 -5
- package/lib/ReactDOMIDOperations.js +55 -73
- package/lib/ReactDOMImg.js +3 -5
- package/lib/ReactDOMInput.js +4 -5
- package/lib/ReactDOMOption.js +4 -5
- package/lib/ReactDOMSelect.js +55 -63
- package/lib/ReactDOMSelection.js +5 -1
- package/lib/{ReactTextComponent.js → ReactDOMTextComponent.js} +54 -34
- package/lib/ReactDOMTextarea.js +4 -5
- package/lib/ReactDefaultInjection.js +13 -7
- package/lib/ReactDefaultPerf.js +7 -6
- package/lib/ReactDefaultPerfAnalysis.js +1 -1
- package/lib/ReactElement.js +24 -5
- package/lib/ReactElementValidator.js +101 -52
- package/lib/ReactEmptyComponent.js +17 -10
- package/lib/ReactInjection.js +6 -4
- package/lib/ReactInputSelection.js +2 -3
- package/lib/ReactInstanceMap.js +47 -0
- package/lib/ReactMount.js +193 -64
- package/lib/ReactMultiChild.js +32 -42
- package/lib/ReactNativeComponent.js +46 -9
- package/lib/ReactOwner.js +3 -47
- package/lib/ReactPerf.js +20 -0
- package/lib/ReactPropTransferer.js +0 -55
- package/lib/ReactPropTypes.js +1 -17
- package/lib/ReactRef.js +96 -0
- package/lib/ReactServerRendering.js +3 -2
- package/lib/ReactTestUtils.js +82 -25
- package/lib/ReactTransitionGroup.js +47 -6
- package/lib/ReactUpdates.js +43 -42
- package/lib/SyntheticMouseEvent.js +1 -3
- package/lib/ViewportMetrics.js +1 -4
- package/lib/accumulate.js +47 -0
- package/lib/cloneWithProps.js +2 -2
- package/lib/copyProperties.js +2 -0
- package/lib/createFullPageComponent.js +2 -2
- package/lib/findDOMNode.js +52 -0
- package/lib/flattenChildren.js +1 -14
- package/lib/getIteratorFn.js +42 -0
- package/lib/instantiateReactComponent.js +88 -65
- package/lib/isNode.js +3 -4
- package/lib/isTextInputElement.js +1 -2
- package/lib/shouldUpdateReactComponent.js +13 -5
- package/lib/traverseAllChildren.js +110 -54
- package/lib/warning.js +1 -1
- package/package.json +1 -1
- package/lib/CompositionEventPlugin.js +0 -257
- package/lib/ReactLegacyElement.js +0 -232
- package/lib/deprecated.js +0 -47
package/lib/CSSProperty.js
CHANGED
|
@@ -16,7 +16,6 @@
|
|
|
16
16
|
*/
|
|
17
17
|
var isUnitlessNumber = {
|
|
18
18
|
columnCount: true,
|
|
19
|
-
fillOpacity: true,
|
|
20
19
|
flex: true,
|
|
21
20
|
flexGrow: true,
|
|
22
21
|
flexShrink: true,
|
|
@@ -28,7 +27,11 @@ var isUnitlessNumber = {
|
|
|
28
27
|
orphans: true,
|
|
29
28
|
widows: true,
|
|
30
29
|
zIndex: true,
|
|
31
|
-
zoom: true
|
|
30
|
+
zoom: true,
|
|
31
|
+
|
|
32
|
+
// SVG-related properties
|
|
33
|
+
fillOpacity: true,
|
|
34
|
+
strokeOpacity: true
|
|
32
35
|
};
|
|
33
36
|
|
|
34
37
|
/**
|
|
@@ -34,6 +34,9 @@ if (ExecutionEnvironment.canUseDOM) {
|
|
|
34
34
|
}
|
|
35
35
|
|
|
36
36
|
if ("production" !== process.env.NODE_ENV) {
|
|
37
|
+
// 'msTransform' is correct, but the other prefixes should be capitalized
|
|
38
|
+
var badVendoredStyleNamePattern = /^(?:webkit|moz|o)[A-Z]/;
|
|
39
|
+
|
|
37
40
|
var warnedStyleNames = {};
|
|
38
41
|
|
|
39
42
|
var warnHyphenatedStyleName = function(name) {
|
|
@@ -48,6 +51,19 @@ if ("production" !== process.env.NODE_ENV) {
|
|
|
48
51
|
camelizeStyleName(name) + '?'
|
|
49
52
|
) : null);
|
|
50
53
|
};
|
|
54
|
+
|
|
55
|
+
var warnBadVendoredStyleName = function(name) {
|
|
56
|
+
if (warnedStyleNames.hasOwnProperty(name) && warnedStyleNames[name]) {
|
|
57
|
+
return;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
warnedStyleNames[name] = true;
|
|
61
|
+
("production" !== process.env.NODE_ENV ? warning(
|
|
62
|
+
false,
|
|
63
|
+
'Unsupported vendor-prefixed style property ' + name + '. Did you mean ' +
|
|
64
|
+
name.charAt(0).toUpperCase() + name.slice(1) + '?'
|
|
65
|
+
) : null);
|
|
66
|
+
};
|
|
51
67
|
}
|
|
52
68
|
|
|
53
69
|
/**
|
|
@@ -76,6 +92,8 @@ var CSSPropertyOperations = {
|
|
|
76
92
|
if ("production" !== process.env.NODE_ENV) {
|
|
77
93
|
if (styleName.indexOf('-') > -1) {
|
|
78
94
|
warnHyphenatedStyleName(styleName);
|
|
95
|
+
} else if (badVendoredStyleNamePattern.test(styleName)) {
|
|
96
|
+
warnBadVendoredStyleName(styleName);
|
|
79
97
|
}
|
|
80
98
|
}
|
|
81
99
|
var styleValue = styles[styleName];
|
|
@@ -103,6 +121,8 @@ var CSSPropertyOperations = {
|
|
|
103
121
|
if ("production" !== process.env.NODE_ENV) {
|
|
104
122
|
if (styleName.indexOf('-') > -1) {
|
|
105
123
|
warnHyphenatedStyleName(styleName);
|
|
124
|
+
} else if (badVendoredStyleNamePattern.test(styleName)) {
|
|
125
|
+
warnBadVendoredStyleName(styleName);
|
|
106
126
|
}
|
|
107
127
|
}
|
|
108
128
|
var styleValue = dangerousStyleValue(styleName, styles[styleName]);
|
package/lib/ChangeEventPlugin.js
CHANGED
|
@@ -65,7 +65,7 @@ var doesChangeEventBubble = false;
|
|
|
65
65
|
if (ExecutionEnvironment.canUseDOM) {
|
|
66
66
|
// See `handleChange` comment below
|
|
67
67
|
doesChangeEventBubble = isEventSupported('change') && (
|
|
68
|
-
!('documentMode' in document) || document.documentMode > 8
|
|
68
|
+
(!('documentMode' in document) || document.documentMode > 8)
|
|
69
69
|
);
|
|
70
70
|
}
|
|
71
71
|
|
|
@@ -142,7 +142,7 @@ if (ExecutionEnvironment.canUseDOM) {
|
|
|
142
142
|
// IE9 claims to support the input event but fails to trigger it when
|
|
143
143
|
// deleting text, so we ignore its input events
|
|
144
144
|
isInputEventSupported = isEventSupported('input') && (
|
|
145
|
-
!('documentMode' in document) || document.documentMode > 9
|
|
145
|
+
(!('documentMode' in document) || document.documentMode > 9)
|
|
146
146
|
);
|
|
147
147
|
}
|
|
148
148
|
|
package/lib/Danger.js
CHANGED
|
@@ -170,7 +170,7 @@ var Danger = {
|
|
|
170
170
|
'dangerouslyReplaceNodeWithMarkup(...): Cannot replace markup of the ' +
|
|
171
171
|
'<html> node. This is because browser quirks make this unreliable ' +
|
|
172
172
|
'and/or slow. If you want to render to the root you must use ' +
|
|
173
|
-
'server rendering. See
|
|
173
|
+
'server rendering. See React.renderToString().'
|
|
174
174
|
) : invariant(oldChild.tagName.toLowerCase() !== 'html'));
|
|
175
175
|
|
|
176
176
|
var newChild = createNodesFromMarkup(markup, emptyFunction)[0];
|
|
@@ -29,7 +29,6 @@ var DefaultEventPluginOrder = [
|
|
|
29
29
|
keyOf({EnterLeaveEventPlugin: null}),
|
|
30
30
|
keyOf({ChangeEventPlugin: null}),
|
|
31
31
|
keyOf({SelectEventPlugin: null}),
|
|
32
|
-
keyOf({CompositionEventPlugin: null}),
|
|
33
32
|
keyOf({BeforeInputEventPlugin: null}),
|
|
34
33
|
keyOf({AnalyticsEventPlugin: null}),
|
|
35
34
|
keyOf({MobileSafariClickEventPlugin: null})
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright 2013 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 FallbackCompositionState
|
|
10
|
+
* @typechecks static-only
|
|
11
|
+
*/
|
|
12
|
+
|
|
13
|
+
"use strict";
|
|
14
|
+
|
|
15
|
+
var PooledClass = require("./PooledClass");
|
|
16
|
+
|
|
17
|
+
var assign = require("./Object.assign");
|
|
18
|
+
var getTextContentAccessor = require("./getTextContentAccessor");
|
|
19
|
+
|
|
20
|
+
/**
|
|
21
|
+
* This helper class stores information about text content of a target node,
|
|
22
|
+
* allowing comparison of content before and after a given event.
|
|
23
|
+
*
|
|
24
|
+
* Identify the node where selection currently begins, then observe
|
|
25
|
+
* both its text content and its current position in the DOM. Since the
|
|
26
|
+
* browser may natively replace the target node during composition, we can
|
|
27
|
+
* use its position to find its replacement.
|
|
28
|
+
*
|
|
29
|
+
* @param {DOMEventTarget} root
|
|
30
|
+
*/
|
|
31
|
+
function FallbackCompositionState(root) {
|
|
32
|
+
this._root = root;
|
|
33
|
+
this._startText = this.getText();
|
|
34
|
+
this._fallbackText = null;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
assign(FallbackCompositionState.prototype, {
|
|
38
|
+
/**
|
|
39
|
+
* Get current text of input.
|
|
40
|
+
*
|
|
41
|
+
* @return {string}
|
|
42
|
+
*/
|
|
43
|
+
getText: function() {
|
|
44
|
+
if ('value' in this._root) {
|
|
45
|
+
return this._root.value;
|
|
46
|
+
}
|
|
47
|
+
return this._root[getTextContentAccessor()];
|
|
48
|
+
},
|
|
49
|
+
|
|
50
|
+
/**
|
|
51
|
+
* Determine the differing substring between the initially stored
|
|
52
|
+
* text content and the current content.
|
|
53
|
+
*
|
|
54
|
+
* @return {string}
|
|
55
|
+
*/
|
|
56
|
+
getData: function() {
|
|
57
|
+
if (this._fallbackText) {
|
|
58
|
+
return this._fallbackText;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
var endValue = this.getText();
|
|
62
|
+
var startValue = this._startText;
|
|
63
|
+
var startLength = startValue.length;
|
|
64
|
+
var endLength = endValue.length;
|
|
65
|
+
|
|
66
|
+
for (var start = 0; start < startLength; start++) {
|
|
67
|
+
if (startValue[start] !== endValue[start]) {
|
|
68
|
+
break;
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
var minEnd = startLength - start;
|
|
73
|
+
for (var end = 1; end <= minEnd; end++) {
|
|
74
|
+
if (startValue[startLength - end] !== endValue[endLength - end]) {
|
|
75
|
+
break;
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
var sliceTail = end > 1 ? 1 - end : undefined;
|
|
80
|
+
this._fallbackText = endValue.slice(start, sliceTail);
|
|
81
|
+
return this._fallbackText;
|
|
82
|
+
}
|
|
83
|
+
});
|
|
84
|
+
|
|
85
|
+
PooledClass.addPoolingTo(FallbackCompositionState);
|
|
86
|
+
|
|
87
|
+
module.exports = FallbackCompositionState;
|
|
@@ -88,8 +88,13 @@ var HTMLDOMPropertyConfig = {
|
|
|
88
88
|
draggable: null,
|
|
89
89
|
encType: null,
|
|
90
90
|
form: MUST_USE_ATTRIBUTE,
|
|
91
|
+
formAction: MUST_USE_ATTRIBUTE,
|
|
92
|
+
formEncType: MUST_USE_ATTRIBUTE,
|
|
93
|
+
formMethod: MUST_USE_ATTRIBUTE,
|
|
91
94
|
formNoValidate: HAS_BOOLEAN_VALUE,
|
|
95
|
+
formTarget: MUST_USE_ATTRIBUTE,
|
|
92
96
|
frameBorder: MUST_USE_ATTRIBUTE,
|
|
97
|
+
headers: null,
|
|
93
98
|
height: MUST_USE_ATTRIBUTE,
|
|
94
99
|
hidden: MUST_USE_ATTRIBUTE | HAS_BOOLEAN_VALUE,
|
|
95
100
|
href: null,
|
|
@@ -103,6 +108,8 @@ var HTMLDOMPropertyConfig = {
|
|
|
103
108
|
list: MUST_USE_ATTRIBUTE,
|
|
104
109
|
loop: MUST_USE_PROPERTY | HAS_BOOLEAN_VALUE,
|
|
105
110
|
manifest: MUST_USE_ATTRIBUTE,
|
|
111
|
+
marginHeight: null,
|
|
112
|
+
marginWidth: null,
|
|
106
113
|
max: null,
|
|
107
114
|
maxLength: MUST_USE_ATTRIBUTE,
|
|
108
115
|
media: MUST_USE_ATTRIBUTE,
|
package/lib/Object.assign.js
CHANGED
|
@@ -11,6 +11,8 @@
|
|
|
11
11
|
|
|
12
12
|
// https://people.mozilla.org/~jorendorff/es6-draft.html#sec-object.assign
|
|
13
13
|
|
|
14
|
+
"use strict";
|
|
15
|
+
|
|
14
16
|
function assign(target, sources) {
|
|
15
17
|
if (target == null) {
|
|
16
18
|
throw new TypeError('Object.assign target cannot be null or undefined');
|
|
@@ -40,6 +42,6 @@ function assign(target, sources) {
|
|
|
40
42
|
}
|
|
41
43
|
|
|
42
44
|
return to;
|
|
43
|
-
}
|
|
45
|
+
}
|
|
44
46
|
|
|
45
47
|
module.exports = assign;
|
package/lib/React.js
CHANGED
|
@@ -9,31 +9,33 @@
|
|
|
9
9
|
* @providesModule React
|
|
10
10
|
*/
|
|
11
11
|
|
|
12
|
+
/* globals __REACT_DEVTOOLS_GLOBAL_HOOK__*/
|
|
13
|
+
|
|
12
14
|
"use strict";
|
|
13
15
|
|
|
14
16
|
var DOMPropertyOperations = require("./DOMPropertyOperations");
|
|
15
17
|
var EventPluginUtils = require("./EventPluginUtils");
|
|
16
18
|
var ReactChildren = require("./ReactChildren");
|
|
17
19
|
var ReactComponent = require("./ReactComponent");
|
|
18
|
-
var
|
|
20
|
+
var ReactClass = require("./ReactClass");
|
|
19
21
|
var ReactContext = require("./ReactContext");
|
|
20
22
|
var ReactCurrentOwner = require("./ReactCurrentOwner");
|
|
21
23
|
var ReactElement = require("./ReactElement");
|
|
22
24
|
var ReactElementValidator = require("./ReactElementValidator");
|
|
23
25
|
var ReactDOM = require("./ReactDOM");
|
|
24
26
|
var ReactDOMComponent = require("./ReactDOMComponent");
|
|
27
|
+
var ReactDOMTextComponent = require("./ReactDOMTextComponent");
|
|
25
28
|
var ReactDefaultInjection = require("./ReactDefaultInjection");
|
|
26
29
|
var ReactInstanceHandles = require("./ReactInstanceHandles");
|
|
27
|
-
var ReactLegacyElement = require("./ReactLegacyElement");
|
|
28
30
|
var ReactMount = require("./ReactMount");
|
|
29
31
|
var ReactMultiChild = require("./ReactMultiChild");
|
|
30
32
|
var ReactPerf = require("./ReactPerf");
|
|
31
33
|
var ReactPropTypes = require("./ReactPropTypes");
|
|
34
|
+
var ReactRef = require("./ReactRef");
|
|
32
35
|
var ReactServerRendering = require("./ReactServerRendering");
|
|
33
|
-
var ReactTextComponent = require("./ReactTextComponent");
|
|
34
36
|
|
|
35
37
|
var assign = require("./Object.assign");
|
|
36
|
-
var
|
|
38
|
+
var findDOMNode = require("./findDOMNode");
|
|
37
39
|
var onlyChild = require("./onlyChild");
|
|
38
40
|
|
|
39
41
|
ReactDefaultInjection.inject();
|
|
@@ -46,14 +48,6 @@ if ("production" !== process.env.NODE_ENV) {
|
|
|
46
48
|
createFactory = ReactElementValidator.createFactory;
|
|
47
49
|
}
|
|
48
50
|
|
|
49
|
-
// TODO: Drop legacy elements once classes no longer export these factories
|
|
50
|
-
createElement = ReactLegacyElement.wrapCreateElement(
|
|
51
|
-
createElement
|
|
52
|
-
);
|
|
53
|
-
createFactory = ReactLegacyElement.wrapCreateFactory(
|
|
54
|
-
createFactory
|
|
55
|
-
);
|
|
56
|
-
|
|
57
51
|
var render = ReactPerf.measure('React', 'render', ReactMount.render);
|
|
58
52
|
|
|
59
53
|
var React = {
|
|
@@ -68,51 +62,24 @@ var React = {
|
|
|
68
62
|
initializeTouchEvents: function(shouldUseTouch) {
|
|
69
63
|
EventPluginUtils.useTouchEvents = shouldUseTouch;
|
|
70
64
|
},
|
|
71
|
-
createClass:
|
|
65
|
+
createClass: ReactClass.createClass,
|
|
72
66
|
createElement: createElement,
|
|
73
67
|
createFactory: createFactory,
|
|
68
|
+
createRef: function() {
|
|
69
|
+
return new ReactRef();
|
|
70
|
+
},
|
|
74
71
|
constructAndRenderComponent: ReactMount.constructAndRenderComponent,
|
|
75
72
|
constructAndRenderComponentByID: ReactMount.constructAndRenderComponentByID,
|
|
73
|
+
findDOMNode: findDOMNode,
|
|
76
74
|
render: render,
|
|
77
75
|
renderToString: ReactServerRendering.renderToString,
|
|
78
76
|
renderToStaticMarkup: ReactServerRendering.renderToStaticMarkup,
|
|
79
77
|
unmountComponentAtNode: ReactMount.unmountComponentAtNode,
|
|
80
|
-
isValidClass: ReactLegacyElement.isValidFactory,
|
|
81
78
|
isValidElement: ReactElement.isValidElement,
|
|
82
79
|
withContext: ReactContext.withContext,
|
|
83
80
|
|
|
84
81
|
// Hook for JSX spread, don't use this for anything else.
|
|
85
|
-
__spread: assign
|
|
86
|
-
|
|
87
|
-
// Deprecations (remove for 0.13)
|
|
88
|
-
renderComponent: deprecated(
|
|
89
|
-
'React',
|
|
90
|
-
'renderComponent',
|
|
91
|
-
'render',
|
|
92
|
-
this,
|
|
93
|
-
render
|
|
94
|
-
),
|
|
95
|
-
renderComponentToString: deprecated(
|
|
96
|
-
'React',
|
|
97
|
-
'renderComponentToString',
|
|
98
|
-
'renderToString',
|
|
99
|
-
this,
|
|
100
|
-
ReactServerRendering.renderToString
|
|
101
|
-
),
|
|
102
|
-
renderComponentToStaticMarkup: deprecated(
|
|
103
|
-
'React',
|
|
104
|
-
'renderComponentToStaticMarkup',
|
|
105
|
-
'renderToStaticMarkup',
|
|
106
|
-
this,
|
|
107
|
-
ReactServerRendering.renderToStaticMarkup
|
|
108
|
-
),
|
|
109
|
-
isValidComponent: deprecated(
|
|
110
|
-
'React',
|
|
111
|
-
'isValidComponent',
|
|
112
|
-
'isValidElement',
|
|
113
|
-
this,
|
|
114
|
-
ReactElement.isValidElement
|
|
115
|
-
)
|
|
82
|
+
__spread: assign
|
|
116
83
|
};
|
|
117
84
|
|
|
118
85
|
// Inject the runtime into a devtools global hook regardless of browser.
|
|
@@ -128,7 +95,7 @@ if (
|
|
|
128
95
|
InstanceHandles: ReactInstanceHandles,
|
|
129
96
|
Mount: ReactMount,
|
|
130
97
|
MultiChild: ReactMultiChild,
|
|
131
|
-
TextComponent:
|
|
98
|
+
TextComponent: ReactDOMTextComponent
|
|
132
99
|
});
|
|
133
100
|
}
|
|
134
101
|
|
|
@@ -177,8 +144,6 @@ if ("production" !== process.env.NODE_ENV) {
|
|
|
177
144
|
}
|
|
178
145
|
}
|
|
179
146
|
|
|
180
|
-
|
|
181
|
-
// internal version.
|
|
182
|
-
React.version = '0.12.0-rc1';
|
|
147
|
+
React.version = '0.13.0-alpha.1';
|
|
183
148
|
|
|
184
149
|
module.exports = React;
|
|
@@ -11,10 +11,7 @@
|
|
|
11
11
|
|
|
12
12
|
"use strict";
|
|
13
13
|
|
|
14
|
-
var
|
|
15
|
-
var ReactMount = require("./ReactMount");
|
|
16
|
-
|
|
17
|
-
var invariant = require("./invariant");
|
|
14
|
+
var findDOMNode = require("./findDOMNode");
|
|
18
15
|
|
|
19
16
|
var ReactBrowserComponentMixin = {
|
|
20
17
|
/**
|
|
@@ -25,14 +22,7 @@ var ReactBrowserComponentMixin = {
|
|
|
25
22
|
* @protected
|
|
26
23
|
*/
|
|
27
24
|
getDOMNode: function() {
|
|
28
|
-
|
|
29
|
-
this.isMounted(),
|
|
30
|
-
'getDOMNode(): A component must be mounted to have a DOM node.'
|
|
31
|
-
) : invariant(this.isMounted()));
|
|
32
|
-
if (ReactEmptyComponent.isNullComponentID(this._rootNodeID)) {
|
|
33
|
-
return null;
|
|
34
|
-
}
|
|
35
|
-
return ReactMount.getNode(this._rootNodeID);
|
|
25
|
+
return findDOMNode(this);
|
|
36
26
|
}
|
|
37
27
|
};
|
|
38
28
|
|
|
@@ -183,8 +183,7 @@ var ReactBrowserEventEmitter = assign({}, ReactEventEmitterMixin, {
|
|
|
183
183
|
*/
|
|
184
184
|
isEnabled: function() {
|
|
185
185
|
return !!(
|
|
186
|
-
ReactBrowserEventEmitter.ReactEventListener &&
|
|
187
|
-
ReactBrowserEventEmitter.ReactEventListener.isEnabled()
|
|
186
|
+
(ReactBrowserEventEmitter.ReactEventListener && ReactBrowserEventEmitter.ReactEventListener.isEnabled())
|
|
188
187
|
);
|
|
189
188
|
},
|
|
190
189
|
|
|
@@ -219,8 +218,7 @@ var ReactBrowserEventEmitter = assign({}, ReactEventEmitterMixin, {
|
|
|
219
218
|
for (var i = 0, l = dependencies.length; i < l; i++) {
|
|
220
219
|
var dependency = dependencies[i];
|
|
221
220
|
if (!(
|
|
222
|
-
isListening.hasOwnProperty(dependency) &&
|
|
223
|
-
isListening[dependency]
|
|
221
|
+
(isListening.hasOwnProperty(dependency) && isListening[dependency])
|
|
224
222
|
)) {
|
|
225
223
|
if (dependency === topLevelTypes.topWheel) {
|
|
226
224
|
if (isEventSupported('wheel')) {
|
|
@@ -28,12 +28,14 @@ var ReactCSSTransitionGroup = React.createClass({
|
|
|
28
28
|
|
|
29
29
|
propTypes: {
|
|
30
30
|
transitionName: React.PropTypes.string.isRequired,
|
|
31
|
+
transitionAppear: React.PropTypes.bool,
|
|
31
32
|
transitionEnter: React.PropTypes.bool,
|
|
32
33
|
transitionLeave: React.PropTypes.bool
|
|
33
34
|
},
|
|
34
35
|
|
|
35
36
|
getDefaultProps: function() {
|
|
36
37
|
return {
|
|
38
|
+
transitionAppear: false,
|
|
37
39
|
transitionEnter: true,
|
|
38
40
|
transitionLeave: true
|
|
39
41
|
};
|
|
@@ -46,6 +48,7 @@ var ReactCSSTransitionGroup = React.createClass({
|
|
|
46
48
|
return ReactCSSTransitionGroupChild(
|
|
47
49
|
{
|
|
48
50
|
name: this.props.transitionName,
|
|
51
|
+
appear: this.props.transitionAppear,
|
|
49
52
|
enter: this.props.transitionEnter,
|
|
50
53
|
leave: this.props.transitionLeave
|
|
51
54
|
},
|