react 0.12.2 → 0.13.0-beta.2
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 +986 -511
- package/dist/react-with-addons.js +6076 -4560
- package/dist/react-with-addons.min.js +6 -7
- package/dist/react.js +5386 -4170
- package/dist/react.min.js +6 -7
- package/lib/AutoFocusMixin.js +2 -2
- package/lib/BeforeInputEventPlugin.js +388 -115
- package/lib/CSSCore.js +1 -1
- package/lib/CSSProperty.js +2 -2
- package/lib/CSSPropertyOperations.js +58 -11
- package/lib/CallbackQueue.js +3 -3
- package/lib/ChangeEventPlugin.js +4 -4
- package/lib/ClientReactRootIndex.js +2 -2
- package/lib/DOMChildrenOperations.js +10 -47
- package/lib/DOMProperty.js +2 -2
- package/lib/DOMPropertyOperations.js +11 -16
- package/lib/Danger.js +8 -7
- package/lib/DefaultEventPluginOrder.js +3 -4
- package/lib/EnterLeaveEventPlugin.js +2 -2
- package/lib/EventConstants.js +2 -2
- package/lib/EventListener.js +1 -1
- package/lib/EventPluginHub.js +10 -8
- package/lib/EventPluginRegistry.js +2 -2
- package/lib/EventPluginUtils.js +4 -4
- package/lib/EventPropagators.js +2 -2
- package/lib/ExecutionEnvironment.js +3 -4
- package/lib/FallbackCompositionState.js +89 -0
- package/lib/HTMLDOMPropertyConfig.js +23 -10
- package/lib/LinkedStateMixin.js +2 -2
- package/lib/LinkedValueUtils.js +4 -4
- package/lib/LocalEventTrapMixin.js +10 -3
- package/lib/MobileSafariClickEventPlugin.js +2 -2
- package/lib/Object.assign.js +4 -2
- package/lib/PooledClass.js +2 -2
- package/lib/React.js +19 -58
- package/lib/ReactBrowserComponentMixin.js +4 -14
- package/lib/ReactBrowserEventEmitter.js +6 -8
- package/lib/ReactCSSTransitionGroup.js +5 -2
- package/lib/ReactCSSTransitionGroupChild.js +20 -7
- package/lib/ReactChildReconciler.js +125 -0
- package/lib/ReactChildren.js +13 -10
- package/lib/ReactClass.js +918 -0
- package/lib/ReactComponent.js +98 -406
- package/lib/ReactComponentBrowserEnvironment.js +11 -84
- package/lib/ReactComponentEnvironment.js +57 -0
- package/lib/ReactComponentWithPureRenderMixin.js +2 -2
- package/lib/ReactCompositeComponent.js +574 -1140
- package/lib/ReactContext.js +17 -3
- package/lib/ReactCurrentOwner.js +2 -2
- package/lib/ReactDOM.js +4 -9
- package/lib/ReactDOMButton.js +6 -7
- package/lib/ReactDOMComponent.js +123 -105
- package/lib/ReactDOMForm.js +6 -7
- package/lib/ReactDOMIDOperations.js +59 -77
- package/lib/ReactDOMIframe.js +43 -0
- package/lib/ReactDOMImg.js +5 -7
- package/lib/ReactDOMInput.js +6 -7
- package/lib/ReactDOMOption.js +6 -7
- package/lib/ReactDOMSelect.js +58 -66
- package/lib/ReactDOMSelection.js +7 -3
- package/lib/{ReactTextComponent.js → ReactDOMTextComponent.js} +48 -37
- package/lib/ReactDOMTextarea.js +6 -7
- package/lib/ReactDefaultBatchingStrategy.js +5 -5
- package/lib/ReactDefaultInjection.js +39 -9
- package/lib/ReactDefaultPerf.js +17 -8
- package/lib/ReactDefaultPerfAnalysis.js +2 -2
- package/lib/ReactElement.js +23 -15
- package/lib/ReactElementValidator.js +206 -89
- package/lib/ReactEmptyComponent.js +33 -15
- package/lib/ReactErrorUtils.js +1 -1
- package/lib/ReactEventEmitterMixin.js +2 -2
- package/lib/ReactEventListener.js +4 -5
- package/lib/ReactFragment.js +172 -0
- package/lib/ReactInjection.js +8 -6
- package/lib/ReactInputSelection.js +4 -5
- package/lib/ReactInstanceHandles.js +4 -3
- package/lib/ReactInstanceMap.js +47 -0
- package/lib/ReactLifeCycle.js +35 -0
- package/lib/ReactLink.js +2 -2
- package/lib/ReactMarkupChecksum.js +2 -2
- package/lib/ReactMount.js +264 -71
- package/lib/ReactMultiChild.js +50 -48
- package/lib/ReactMultiChildUpdateTypes.js +2 -2
- package/lib/ReactNativeComponent.js +59 -25
- package/lib/ReactOwner.js +5 -49
- package/lib/ReactPerf.js +22 -2
- package/lib/ReactPropTransferer.js +3 -58
- package/lib/ReactPropTypeLocationNames.js +2 -2
- package/lib/ReactPropTypeLocations.js +2 -2
- package/lib/ReactPropTypes.js +17 -25
- package/lib/ReactPutListenerQueue.js +2 -2
- package/lib/ReactReconcileTransaction.js +2 -2
- package/lib/ReactReconciler.js +121 -0
- package/lib/ReactRef.js +69 -0
- package/lib/ReactRootIndex.js +2 -2
- package/lib/ReactServerRendering.js +6 -4
- package/lib/ReactServerRenderingTransaction.js +2 -2
- package/lib/ReactStateSetters.js +2 -2
- package/lib/ReactTestUtils.js +113 -27
- package/lib/ReactTransitionChildMapping.js +8 -4
- package/lib/ReactTransitionEvents.js +2 -2
- package/lib/ReactTransitionGroup.js +53 -12
- package/lib/ReactUpdateQueue.js +295 -0
- package/lib/ReactUpdates.js +54 -62
- package/lib/ReactWithAddons.js +4 -2
- package/lib/SVGDOMPropertyConfig.js +2 -2
- package/lib/SelectEventPlugin.js +4 -4
- package/lib/ServerReactRootIndex.js +2 -2
- package/lib/SimpleEventPlugin.js +4 -4
- package/lib/SyntheticClipboardEvent.js +2 -3
- package/lib/SyntheticCompositionEvent.js +2 -3
- package/lib/SyntheticDragEvent.js +2 -2
- package/lib/SyntheticEvent.js +12 -4
- package/lib/SyntheticFocusEvent.js +2 -2
- package/lib/SyntheticInputEvent.js +2 -3
- package/lib/SyntheticKeyboardEvent.js +2 -2
- package/lib/SyntheticMouseEvent.js +3 -5
- package/lib/SyntheticTouchEvent.js +2 -2
- package/lib/SyntheticUIEvent.js +2 -2
- package/lib/SyntheticWheelEvent.js +2 -2
- package/lib/Transaction.js +4 -4
- package/lib/ViewportMetrics.js +3 -6
- package/lib/accumulateInto.js +2 -2
- package/lib/adler32.js +2 -2
- package/lib/camelize.js +1 -1
- package/lib/camelizeStyleName.js +1 -1
- package/lib/cloneWithProps.js +4 -4
- package/lib/containsNode.js +1 -1
- package/lib/{createArrayFrom.js → createArrayFromMixed.js} +6 -6
- package/lib/createFullPageComponent.js +4 -4
- package/lib/createNodesFromMarkup.js +4 -4
- package/lib/cx.js +1 -1
- package/lib/dangerousStyleValue.js +2 -2
- package/lib/emptyFunction.js +1 -1
- package/lib/emptyObject.js +1 -1
- package/lib/{escapeTextForBrowser.js → escapeTextContentForBrowser.js} +10 -11
- package/lib/findDOMNode.js +51 -0
- package/lib/flattenChildren.js +12 -23
- package/lib/focusNode.js +1 -1
- package/lib/forEachAccumulated.js +2 -2
- package/lib/getActiveElement.js +1 -1
- package/lib/getEventCharCode.js +2 -2
- package/lib/getEventKey.js +2 -2
- package/lib/getEventModifierState.js +2 -2
- package/lib/getEventTarget.js +2 -2
- package/lib/getIteratorFn.js +42 -0
- package/lib/getMarkupWrap.js +1 -1
- package/lib/getNodeForCharacterOffset.js +3 -3
- package/lib/getReactRootElementInContainer.js +2 -2
- package/lib/getTextContentAccessor.js +2 -2
- package/lib/getUnboundedScrollPosition.js +1 -1
- package/lib/hyphenate.js +1 -1
- package/lib/hyphenateStyleName.js +1 -1
- package/lib/instantiateReactComponent.js +90 -68
- package/lib/invariant.js +1 -1
- package/lib/isEventSupported.js +2 -2
- package/lib/isNode.js +4 -5
- package/lib/isTextInputElement.js +3 -4
- package/lib/isTextNode.js +1 -1
- package/lib/joinClasses.js +2 -2
- package/lib/keyMirror.js +2 -2
- package/lib/keyOf.js +1 -1
- package/lib/mapObject.js +1 -1
- package/lib/memoizeStringOnly.js +5 -6
- package/lib/onlyChild.js +2 -2
- package/lib/performance.js +1 -1
- package/lib/performanceNow.js +1 -1
- package/lib/quoteAttributeValueForBrowser.js +26 -0
- package/lib/setInnerHTML.js +13 -2
- package/lib/setTextContent.js +40 -0
- package/lib/shallowEqual.js +2 -2
- package/lib/shouldUpdateReactComponent.js +71 -7
- package/lib/toArray.js +2 -2
- package/lib/traverseAllChildren.js +114 -56
- package/lib/update.js +2 -2
- package/lib/warning.js +20 -2
- package/package.json +1 -1
- package/lib/CompositionEventPlugin.js +0 -257
- package/lib/ReactLegacyElement.js +0 -243
- package/lib/copyProperties.js +0 -54
- package/lib/deprecated.js +0 -47
- package/lib/merge.js +0 -34
- package/lib/mergeInto.js +0 -24
- package/lib/monitorCodeUse.js +0 -30
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Copyright 2013-
|
|
2
|
+
* Copyright 2013-2015, Facebook, Inc.
|
|
3
3
|
* All rights reserved.
|
|
4
4
|
*
|
|
5
5
|
* This source code is licensed under the BSD-style license found in the
|
|
@@ -9,9 +9,9 @@
|
|
|
9
9
|
* @providesModule DefaultEventPluginOrder
|
|
10
10
|
*/
|
|
11
11
|
|
|
12
|
-
|
|
12
|
+
'use strict';
|
|
13
13
|
|
|
14
|
-
|
|
14
|
+
var keyOf = require("./keyOf");
|
|
15
15
|
|
|
16
16
|
/**
|
|
17
17
|
* Module that is injectable into `EventPluginHub`, that specifies a
|
|
@@ -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})
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Copyright 2013-
|
|
2
|
+
* Copyright 2013-2015, Facebook, Inc.
|
|
3
3
|
* All rights reserved.
|
|
4
4
|
*
|
|
5
5
|
* This source code is licensed under the BSD-style license found in the
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
* @typechecks static-only
|
|
11
11
|
*/
|
|
12
12
|
|
|
13
|
-
|
|
13
|
+
'use strict';
|
|
14
14
|
|
|
15
15
|
var EventConstants = require("./EventConstants");
|
|
16
16
|
var EventPropagators = require("./EventPropagators");
|
package/lib/EventConstants.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Copyright 2013-
|
|
2
|
+
* Copyright 2013-2015, Facebook, Inc.
|
|
3
3
|
* All rights reserved.
|
|
4
4
|
*
|
|
5
5
|
* This source code is licensed under the BSD-style license found in the
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
* @providesModule EventConstants
|
|
10
10
|
*/
|
|
11
11
|
|
|
12
|
-
|
|
12
|
+
'use strict';
|
|
13
13
|
|
|
14
14
|
var keyMirror = require("./keyMirror");
|
|
15
15
|
|
package/lib/EventListener.js
CHANGED
package/lib/EventPluginHub.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Copyright 2013-
|
|
2
|
+
* Copyright 2013-2015, Facebook, Inc.
|
|
3
3
|
* All rights reserved.
|
|
4
4
|
*
|
|
5
5
|
* This source code is licensed under the BSD-style license found in the
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
* @providesModule EventPluginHub
|
|
10
10
|
*/
|
|
11
11
|
|
|
12
|
-
|
|
12
|
+
'use strict';
|
|
13
13
|
|
|
14
14
|
var EventPluginRegistry = require("./EventPluginRegistry");
|
|
15
15
|
var EventPluginUtils = require("./EventPluginUtils");
|
|
@@ -58,12 +58,14 @@ var executeDispatchesAndRelease = function(event) {
|
|
|
58
58
|
var InstanceHandle = null;
|
|
59
59
|
|
|
60
60
|
function validateInstanceHandle() {
|
|
61
|
-
var
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
61
|
+
var valid =
|
|
62
|
+
InstanceHandle &&
|
|
63
|
+
InstanceHandle.traverseTwoPhase &&
|
|
64
|
+
InstanceHandle.traverseEnterLeave;
|
|
65
|
+
("production" !== process.env.NODE_ENV ? invariant(
|
|
66
|
+
valid,
|
|
67
|
+
'InstanceHandle not injected before use!'
|
|
68
|
+
) : invariant(valid));
|
|
67
69
|
}
|
|
68
70
|
|
|
69
71
|
/**
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Copyright 2013-
|
|
2
|
+
* Copyright 2013-2015, Facebook, Inc.
|
|
3
3
|
* All rights reserved.
|
|
4
4
|
*
|
|
5
5
|
* This source code is licensed under the BSD-style license found in the
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
* @typechecks static-only
|
|
11
11
|
*/
|
|
12
12
|
|
|
13
|
-
|
|
13
|
+
'use strict';
|
|
14
14
|
|
|
15
15
|
var invariant = require("./invariant");
|
|
16
16
|
|
package/lib/EventPluginUtils.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Copyright 2013-
|
|
2
|
+
* Copyright 2013-2015, Facebook, Inc.
|
|
3
3
|
* All rights reserved.
|
|
4
4
|
*
|
|
5
5
|
* This source code is licensed under the BSD-style license found in the
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
* @providesModule EventPluginUtils
|
|
10
10
|
*/
|
|
11
11
|
|
|
12
|
-
|
|
12
|
+
'use strict';
|
|
13
13
|
|
|
14
14
|
var EventConstants = require("./EventConstants");
|
|
15
15
|
|
|
@@ -115,8 +115,8 @@ function executeDispatch(event, listener, domID) {
|
|
|
115
115
|
/**
|
|
116
116
|
* Standard/simple iteration through an event's collected dispatches.
|
|
117
117
|
*/
|
|
118
|
-
function executeDispatchesInOrder(event,
|
|
119
|
-
forEachEventDispatch(event,
|
|
118
|
+
function executeDispatchesInOrder(event, cb) {
|
|
119
|
+
forEachEventDispatch(event, cb);
|
|
120
120
|
event._dispatchListeners = null;
|
|
121
121
|
event._dispatchIDs = null;
|
|
122
122
|
}
|
package/lib/EventPropagators.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Copyright 2013-
|
|
2
|
+
* Copyright 2013-2015, Facebook, Inc.
|
|
3
3
|
* All rights reserved.
|
|
4
4
|
*
|
|
5
5
|
* This source code is licensed under the BSD-style license found in the
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
* @providesModule EventPropagators
|
|
10
10
|
*/
|
|
11
11
|
|
|
12
|
-
|
|
12
|
+
'use strict';
|
|
13
13
|
|
|
14
14
|
var EventConstants = require("./EventConstants");
|
|
15
15
|
var EventPluginHub = require("./EventPluginHub");
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Copyright 2013-
|
|
2
|
+
* Copyright 2013-2015, Facebook, Inc.
|
|
3
3
|
* All rights reserved.
|
|
4
4
|
*
|
|
5
5
|
* This source code is licensed under the BSD-style license found in the
|
|
@@ -14,9 +14,8 @@
|
|
|
14
14
|
"use strict";
|
|
15
15
|
|
|
16
16
|
var canUseDOM = !!(
|
|
17
|
-
typeof window !== 'undefined' &&
|
|
18
|
-
window.document &&
|
|
19
|
-
window.document.createElement
|
|
17
|
+
(typeof window !== 'undefined' &&
|
|
18
|
+
window.document && window.document.createElement)
|
|
20
19
|
);
|
|
21
20
|
|
|
22
21
|
/**
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright 2013-2015, 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 start;
|
|
62
|
+
var startValue = this._startText;
|
|
63
|
+
var startLength = startValue.length;
|
|
64
|
+
var end;
|
|
65
|
+
var endValue = this.getText();
|
|
66
|
+
var endLength = endValue.length;
|
|
67
|
+
|
|
68
|
+
for (start = 0; start < startLength; start++) {
|
|
69
|
+
if (startValue[start] !== endValue[start]) {
|
|
70
|
+
break;
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
var minEnd = startLength - start;
|
|
75
|
+
for (end = 1; end <= minEnd; end++) {
|
|
76
|
+
if (startValue[startLength - end] !== endValue[endLength - end]) {
|
|
77
|
+
break;
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
var sliceTail = end > 1 ? 1 - end : undefined;
|
|
82
|
+
this._fallbackText = endValue.slice(start, sliceTail);
|
|
83
|
+
return this._fallbackText;
|
|
84
|
+
}
|
|
85
|
+
});
|
|
86
|
+
|
|
87
|
+
PooledClass.addPoolingTo(FallbackCompositionState);
|
|
88
|
+
|
|
89
|
+
module.exports = FallbackCompositionState;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Copyright 2013-
|
|
2
|
+
* Copyright 2013-2015, Facebook, Inc.
|
|
3
3
|
* All rights reserved.
|
|
4
4
|
*
|
|
5
5
|
* This source code is licensed under the BSD-style license found in the
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
|
|
12
12
|
/*jslint bitwise: true*/
|
|
13
13
|
|
|
14
|
-
|
|
14
|
+
'use strict';
|
|
15
15
|
|
|
16
16
|
var DOMProperty = require("./DOMProperty");
|
|
17
17
|
var ExecutionEnvironment = require("./ExecutionEnvironment");
|
|
@@ -94,6 +94,7 @@ var HTMLDOMPropertyConfig = {
|
|
|
94
94
|
formNoValidate: HAS_BOOLEAN_VALUE,
|
|
95
95
|
formTarget: MUST_USE_ATTRIBUTE,
|
|
96
96
|
frameBorder: MUST_USE_ATTRIBUTE,
|
|
97
|
+
headers: null,
|
|
97
98
|
height: MUST_USE_ATTRIBUTE,
|
|
98
99
|
hidden: MUST_USE_ATTRIBUTE | HAS_BOOLEAN_VALUE,
|
|
99
100
|
href: null,
|
|
@@ -119,7 +120,7 @@ var HTMLDOMPropertyConfig = {
|
|
|
119
120
|
muted: MUST_USE_PROPERTY | HAS_BOOLEAN_VALUE,
|
|
120
121
|
name: null,
|
|
121
122
|
noValidate: HAS_BOOLEAN_VALUE,
|
|
122
|
-
open:
|
|
123
|
+
open: HAS_BOOLEAN_VALUE,
|
|
123
124
|
pattern: null,
|
|
124
125
|
placeholder: null,
|
|
125
126
|
poster: null,
|
|
@@ -159,12 +160,22 @@ var HTMLDOMPropertyConfig = {
|
|
|
159
160
|
/**
|
|
160
161
|
* Non-standard Properties
|
|
161
162
|
*/
|
|
162
|
-
autoCapitalize
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
163
|
+
// autoCapitalize and autoCorrect are supported in Mobile Safari for
|
|
164
|
+
// keyboard hints.
|
|
165
|
+
autoCapitalize: null,
|
|
166
|
+
autoCorrect: null,
|
|
167
|
+
// itemProp, itemScope, itemType are for
|
|
168
|
+
// Microdata support. See http://schema.org/docs/gs.html
|
|
169
|
+
itemProp: MUST_USE_ATTRIBUTE,
|
|
170
|
+
itemScope: MUST_USE_ATTRIBUTE | HAS_BOOLEAN_VALUE,
|
|
171
|
+
itemType: MUST_USE_ATTRIBUTE,
|
|
172
|
+
// itemID and itemRef are for Microdata support as well but
|
|
173
|
+
// only specified in the the WHATWG spec document. See
|
|
174
|
+
// https://html.spec.whatwg.org/multipage/microdata.html#microdata-dom-api
|
|
175
|
+
itemID: MUST_USE_ATTRIBUTE,
|
|
176
|
+
itemRef: MUST_USE_ATTRIBUTE,
|
|
177
|
+
// property is supported for OpenGraph in meta tags.
|
|
178
|
+
property: null
|
|
168
179
|
},
|
|
169
180
|
DOMAttributeNames: {
|
|
170
181
|
acceptCharset: 'accept-charset',
|
|
@@ -178,7 +189,9 @@ var HTMLDOMPropertyConfig = {
|
|
|
178
189
|
autoCorrect: 'autocorrect',
|
|
179
190
|
autoFocus: 'autofocus',
|
|
180
191
|
autoPlay: 'autoplay',
|
|
181
|
-
|
|
192
|
+
// `encoding` is equivalent to `enctype`, IE8 lacks an `enctype` setter.
|
|
193
|
+
// http://www.w3.org/TR/html5/forms.html#dom-fs-encoding
|
|
194
|
+
encType: 'encoding',
|
|
182
195
|
hrefLang: 'hreflang',
|
|
183
196
|
radioGroup: 'radiogroup',
|
|
184
197
|
spellCheck: 'spellcheck',
|
package/lib/LinkedStateMixin.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Copyright 2013-
|
|
2
|
+
* Copyright 2013-2015, Facebook, Inc.
|
|
3
3
|
* All rights reserved.
|
|
4
4
|
*
|
|
5
5
|
* This source code is licensed under the BSD-style license found in the
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
* @typechecks static-only
|
|
11
11
|
*/
|
|
12
12
|
|
|
13
|
-
|
|
13
|
+
'use strict';
|
|
14
14
|
|
|
15
15
|
var ReactLink = require("./ReactLink");
|
|
16
16
|
var ReactStateSetters = require("./ReactStateSetters");
|
package/lib/LinkedValueUtils.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Copyright 2013-
|
|
2
|
+
* Copyright 2013-2015, Facebook, Inc.
|
|
3
3
|
* All rights reserved.
|
|
4
4
|
*
|
|
5
5
|
* This source code is licensed under the BSD-style license found in the
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
* @typechecks static-only
|
|
11
11
|
*/
|
|
12
12
|
|
|
13
|
-
|
|
13
|
+
'use strict';
|
|
14
14
|
|
|
15
15
|
var ReactPropTypes = require("./ReactPropTypes");
|
|
16
16
|
|
|
@@ -81,7 +81,7 @@ var LinkedValueUtils = {
|
|
|
81
81
|
props.onChange ||
|
|
82
82
|
props.readOnly ||
|
|
83
83
|
props.disabled) {
|
|
84
|
-
return;
|
|
84
|
+
return null;
|
|
85
85
|
}
|
|
86
86
|
return new Error(
|
|
87
87
|
'You provided a `value` prop to a form field without an ' +
|
|
@@ -95,7 +95,7 @@ var LinkedValueUtils = {
|
|
|
95
95
|
props.onChange ||
|
|
96
96
|
props.readOnly ||
|
|
97
97
|
props.disabled) {
|
|
98
|
-
return;
|
|
98
|
+
return null;
|
|
99
99
|
}
|
|
100
100
|
return new Error(
|
|
101
101
|
'You provided a `checked` prop to a form field without an ' +
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Copyright 2014, Facebook, Inc.
|
|
2
|
+
* Copyright 2014-2015, Facebook, Inc.
|
|
3
3
|
* All rights reserved.
|
|
4
4
|
*
|
|
5
5
|
* This source code is licensed under the BSD-style license found in the
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
* @providesModule LocalEventTrapMixin
|
|
10
10
|
*/
|
|
11
11
|
|
|
12
|
-
|
|
12
|
+
'use strict';
|
|
13
13
|
|
|
14
14
|
var ReactBrowserEventEmitter = require("./ReactBrowserEventEmitter");
|
|
15
15
|
|
|
@@ -24,10 +24,17 @@ function remove(event) {
|
|
|
24
24
|
var LocalEventTrapMixin = {
|
|
25
25
|
trapBubbledEvent:function(topLevelType, handlerBaseName) {
|
|
26
26
|
("production" !== process.env.NODE_ENV ? invariant(this.isMounted(), 'Must be mounted to trap events') : invariant(this.isMounted()));
|
|
27
|
+
// If a component renders to null or if another component fatals and causes
|
|
28
|
+
// the state of the tree to be corrupted, `node` here can be null.
|
|
29
|
+
var node = this.getDOMNode();
|
|
30
|
+
("production" !== process.env.NODE_ENV ? invariant(
|
|
31
|
+
node,
|
|
32
|
+
'LocalEventTrapMixin.trapBubbledEvent(...): Requires node to be rendered.'
|
|
33
|
+
) : invariant(node));
|
|
27
34
|
var listener = ReactBrowserEventEmitter.trapBubbledEvent(
|
|
28
35
|
topLevelType,
|
|
29
36
|
handlerBaseName,
|
|
30
|
-
|
|
37
|
+
node
|
|
31
38
|
);
|
|
32
39
|
this._localEventListeners =
|
|
33
40
|
accumulateInto(this._localEventListeners, listener);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Copyright 2013-
|
|
2
|
+
* Copyright 2013-2015, Facebook, Inc.
|
|
3
3
|
* All rights reserved.
|
|
4
4
|
*
|
|
5
5
|
* This source code is licensed under the BSD-style license found in the
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
* @typechecks static-only
|
|
11
11
|
*/
|
|
12
12
|
|
|
13
|
-
|
|
13
|
+
'use strict';
|
|
14
14
|
|
|
15
15
|
var EventConstants = require("./EventConstants");
|
|
16
16
|
|