react 0.14.8 → 15.0.0-rc.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/LICENSE +1 -1
- package/addons.js +2 -0
- package/dist/react-with-addons.js +4203 -4148
- package/dist/react-with-addons.min.js +7 -7
- package/dist/react.js +4159 -3850
- package/dist/react.min.js +7 -7
- package/lib/AutoFocusUtils.js +3 -15
- package/lib/BeforeInputEventPlugin.js +8 -25
- package/lib/CSSProperty.js +4 -1
- package/lib/CSSPropertyOperations.js +24 -10
- package/lib/CallbackQueue.js +13 -2
- package/lib/ChangeEventPlugin.js +58 -54
- package/lib/DOMChildrenOperations.js +93 -60
- package/lib/DOMLazyTree.js +96 -0
- package/lib/{ClientReactRootIndex.js → DOMNamespaces.js} +7 -10
- package/lib/DOMProperty.js +18 -39
- package/lib/DOMPropertyOperations.js +87 -53
- package/lib/Danger.js +13 -14
- package/lib/DefaultEventPluginOrder.js +1 -1
- package/lib/EnterLeaveEventPlugin.js +24 -43
- package/lib/EventConstants.js +6 -1
- package/lib/EventPluginHub.js +22 -66
- package/lib/EventPluginRegistry.js +30 -9
- package/lib/EventPluginUtils.js +61 -36
- package/lib/EventPropagators.js +19 -17
- package/lib/FallbackCompositionState.js +1 -2
- package/lib/HTMLDOMPropertyConfig.js +69 -90
- package/lib/LinkedStateMixin.js +1 -2
- package/lib/LinkedValueUtils.js +5 -6
- package/lib/MetaMatchers.js +2 -2
- package/lib/Object.assign.js +1 -1
- package/lib/OrderedMap.js +14 -14
- package/lib/PooledClass.js +2 -2
- package/lib/React.js +1 -13
- package/lib/ReactBrowserEventEmitter.js +16 -24
- package/lib/ReactCSSTransitionGroup.js +1 -2
- package/lib/ReactCSSTransitionGroupChild.js +1 -6
- package/lib/ReactChildReconciler.js +15 -13
- package/lib/ReactChildren.js +5 -4
- package/lib/ReactClass.js +37 -86
- package/lib/ReactComponent.js +7 -8
- package/lib/ReactComponentBrowserEnvironment.js +9 -6
- package/lib/ReactComponentEnvironment.js +4 -4
- package/lib/ReactComponentWithPureRenderMixin.js +2 -2
- package/lib/ReactCompositeComponent.js +160 -69
- package/lib/ReactCurrentOwner.js +2 -1
- package/lib/ReactDOM.js +27 -15
- package/lib/ReactDOMButton.js +2 -2
- package/lib/ReactDOMComponent.js +188 -244
- package/lib/ReactDOMComponentFlags.js +18 -0
- package/lib/ReactDOMComponentTree.js +186 -0
- package/lib/ReactDOMContainerInfo.js +32 -0
- package/lib/ReactDOMDebugTool.js +69 -0
- package/lib/ReactDOMEmptyComponent.js +60 -0
- package/lib/ReactDOMFactories.js +1 -2
- package/lib/ReactDOMFeatureFlags.js +2 -2
- package/lib/ReactDOMIDOperations.js +5 -60
- package/lib/ReactDOMInput.js +71 -22
- package/lib/ReactDOMInstrumentation.js +16 -0
- package/lib/ReactDOMOption.js +11 -10
- package/lib/ReactDOMSVGDeprecatedAttributeDevtool.js +61 -0
- package/lib/ReactDOMSelect.js +40 -17
- package/lib/ReactDOMSelection.js +4 -4
- package/lib/ReactDOMServer.js +1 -1
- package/lib/ReactDOMTextComponent.js +84 -43
- package/lib/ReactDOMTextarea.js +36 -9
- package/lib/ReactDOMTreeTraversal.js +134 -0
- package/lib/ReactDOMUnknownPropertyDevtool.js +64 -0
- package/lib/ReactDebugTool.js +72 -0
- package/lib/ReactDefaultBatchingStrategy.js +1 -1
- package/lib/ReactDefaultInjection.js +11 -15
- package/lib/ReactDefaultPerf.js +59 -19
- package/lib/ReactDefaultPerfAnalysis.js +17 -9
- package/lib/ReactElement.js +60 -21
- package/lib/ReactElementValidator.js +8 -8
- package/lib/ReactEmptyComponent.js +8 -33
- package/lib/ReactErrorUtils.js +1 -2
- package/lib/ReactEventEmitterMixin.js +3 -8
- package/lib/ReactEventListener.js +20 -75
- package/lib/ReactFeatureFlags.js +21 -0
- package/lib/ReactFragment.js +6 -6
- package/lib/ReactInjection.js +3 -3
- package/lib/ReactInputSelection.js +4 -4
- package/lib/ReactInstanceHandles.js +10 -12
- package/lib/ReactInstanceMap.js +2 -1
- package/lib/ReactInstrumentation.js +16 -0
- package/lib/ReactInvalidSetStateWarningDevTool.js +36 -0
- package/lib/ReactIsomorphic.js +1 -1
- package/lib/ReactLink.js +2 -3
- package/lib/ReactMarkupChecksum.js +1 -1
- package/lib/ReactMount.js +87 -460
- package/lib/ReactMultiChild.js +106 -200
- package/lib/ReactMultiChildUpdateTypes.js +1 -1
- package/lib/ReactNativeComponent.js +3 -3
- package/lib/ReactNodeTypes.js +37 -0
- package/lib/ReactNoopUpdateQueue.js +2 -25
- package/lib/ReactOwner.js +3 -3
- package/lib/ReactPerf.js +2 -2
- package/lib/ReactPropTransferer.js +1 -1
- package/lib/ReactPropTypeLocationNames.js +1 -1
- package/lib/ReactPropTypeLocations.js +1 -1
- package/lib/ReactPropTypes.js +27 -3
- package/lib/ReactReconcileTransaction.js +17 -6
- package/lib/ReactReconciler.js +29 -6
- package/lib/ReactRef.js +1 -1
- package/lib/ReactServerBatchingStrategy.js +1 -2
- package/lib/ReactServerRendering.js +17 -35
- package/lib/ReactServerRenderingTransaction.js +8 -26
- package/lib/ReactSimpleEmptyComponent.js +36 -0
- package/lib/ReactStateSetters.js +1 -1
- package/lib/ReactTestUtils.js +33 -24
- package/lib/ReactTransitionChildMapping.js +1 -2
- package/lib/ReactTransitionEvents.js +8 -44
- package/lib/ReactTransitionGroup.js +1 -1
- package/lib/ReactUpdateQueue.js +6 -65
- package/lib/ReactUpdates.js +26 -9
- package/lib/ReactVersion.js +2 -2
- package/lib/ReactWithAddons.js +1 -14
- package/lib/ResponderEventPlugin.js +54 -66
- package/lib/ResponderSyntheticEvent.js +1 -2
- package/lib/ResponderTouchHistoryStore.js +5 -5
- package/lib/SVGDOMPropertyConfig.js +25 -66
- package/lib/SelectEventPlugin.js +13 -18
- package/lib/SimpleEventPlugin.js +57 -17
- package/lib/SyntheticAnimationEvent.js +39 -0
- package/lib/SyntheticClipboardEvent.js +2 -3
- package/lib/SyntheticCompositionEvent.js +2 -3
- package/lib/SyntheticDragEvent.js +2 -3
- package/lib/SyntheticEvent.js +97 -17
- package/lib/SyntheticFocusEvent.js +2 -3
- package/lib/SyntheticInputEvent.js +2 -3
- package/lib/SyntheticKeyboardEvent.js +2 -3
- package/lib/SyntheticMouseEvent.js +2 -3
- package/lib/SyntheticTouchEvent.js +2 -3
- package/lib/SyntheticTransitionEvent.js +39 -0
- package/lib/SyntheticUIEvent.js +2 -3
- package/lib/SyntheticWheelEvent.js +2 -3
- package/lib/TapEventPlugin.js +3 -12
- package/lib/Transaction.js +3 -3
- package/lib/ViewportMetrics.js +1 -1
- package/lib/accumulate.js +2 -2
- package/lib/accumulateInto.js +2 -2
- package/lib/adler32.js +3 -2
- package/lib/canDefineProperty.js +1 -1
- package/lib/createHierarchyRenderer.js +1 -1
- package/lib/createMicrosoftUnsafeLocalFunction.js +32 -0
- package/lib/dangerousStyleValue.js +25 -3
- package/lib/deprecated.js +4 -2
- package/lib/escapeTextContentForBrowser.js +1 -1
- package/lib/findDOMNode.js +15 -8
- package/lib/flattenChildren.js +2 -2
- package/lib/forEachAccumulated.js +2 -1
- package/lib/getEventCharCode.js +2 -2
- package/lib/getEventKey.js +1 -2
- package/lib/getEventModifierState.js +1 -2
- package/lib/getEventTarget.js +8 -2
- package/lib/getIteratorFn.js +2 -2
- package/lib/getNativeComponentFromComposite.js +30 -0
- package/lib/getNodeForCharacterOffset.js +2 -1
- package/lib/getTestDocument.js +1 -1
- package/lib/getTextContentAccessor.js +1 -1
- package/lib/getVendorPrefixedEventName.js +101 -0
- package/lib/instantiateReactComponent.js +9 -11
- package/lib/isEventSupported.js +2 -2
- package/lib/isTextInputElement.js +2 -1
- package/lib/onlyChild.js +2 -2
- package/lib/quoteAttributeValueForBrowser.js +1 -1
- package/lib/reactComponentExpect.js +2 -2
- package/lib/renderSubtreeIntoContainer.js +1 -1
- package/lib/setInnerHTML.js +5 -14
- package/lib/setTextContent.js +1 -1
- package/lib/shallowCompare.js +1 -1
- package/lib/shouldUpdateReactComponent.js +2 -3
- package/lib/sliceChildren.js +1 -1
- package/lib/traverseAllChildren.js +8 -8
- package/lib/update.js +12 -12
- package/lib/validateDOMNesting.js +15 -11
- package/package.json +2 -2
- package/lib/ReactBrowserComponentMixin.js +0 -36
- package/lib/ReactEmptyComponentRegistry.js +0 -48
- package/lib/ReactRootIndex.js +0 -29
- package/lib/ServerReactRootIndex.js +0 -29
- package/lib/cloneWithProps.js +0 -54
- package/lib/webcomponents.js +0 -6379
package/lib/EventPropagators.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Copyright 2013-
|
|
2
|
+
* Copyright 2013-present, Facebook, Inc.
|
|
3
3
|
* All rights reserved.
|
|
4
4
|
*
|
|
5
5
|
* This source code is licensed under the BSD-style license found in the
|
|
@@ -13,11 +13,11 @@
|
|
|
13
13
|
|
|
14
14
|
var EventConstants = require('./EventConstants');
|
|
15
15
|
var EventPluginHub = require('./EventPluginHub');
|
|
16
|
-
|
|
17
|
-
var warning = require('fbjs/lib/warning');
|
|
16
|
+
var EventPluginUtils = require('./EventPluginUtils');
|
|
18
17
|
|
|
19
18
|
var accumulateInto = require('./accumulateInto');
|
|
20
19
|
var forEachAccumulated = require('./forEachAccumulated');
|
|
20
|
+
var warning = require('fbjs/lib/warning');
|
|
21
21
|
|
|
22
22
|
var PropagationPhases = EventConstants.PropagationPhases;
|
|
23
23
|
var getListener = EventPluginHub.getListener;
|
|
@@ -26,9 +26,9 @@ var getListener = EventPluginHub.getListener;
|
|
|
26
26
|
* Some event types have a notion of different registration names for different
|
|
27
27
|
* "phases" of propagation. This finds listeners by a given phase.
|
|
28
28
|
*/
|
|
29
|
-
function listenerAtPhase(
|
|
29
|
+
function listenerAtPhase(inst, event, propagationPhase) {
|
|
30
30
|
var registrationName = event.dispatchConfig.phasedRegistrationNames[propagationPhase];
|
|
31
|
-
return getListener(
|
|
31
|
+
return getListener(inst, registrationName);
|
|
32
32
|
}
|
|
33
33
|
|
|
34
34
|
/**
|
|
@@ -37,15 +37,15 @@ function listenerAtPhase(id, event, propagationPhase) {
|
|
|
37
37
|
* Mutating the event's members allows us to not have to create a wrapping
|
|
38
38
|
* "dispatch" object that pairs the event with the listener.
|
|
39
39
|
*/
|
|
40
|
-
function accumulateDirectionalDispatches(
|
|
40
|
+
function accumulateDirectionalDispatches(inst, upwards, event) {
|
|
41
41
|
if (process.env.NODE_ENV !== 'production') {
|
|
42
|
-
process.env.NODE_ENV !== 'production' ? warning(
|
|
42
|
+
process.env.NODE_ENV !== 'production' ? warning(inst, 'Dispatching inst must not be null') : void 0;
|
|
43
43
|
}
|
|
44
44
|
var phase = upwards ? PropagationPhases.bubbled : PropagationPhases.captured;
|
|
45
|
-
var listener = listenerAtPhase(
|
|
45
|
+
var listener = listenerAtPhase(inst, event, phase);
|
|
46
46
|
if (listener) {
|
|
47
47
|
event._dispatchListeners = accumulateInto(event._dispatchListeners, listener);
|
|
48
|
-
event.
|
|
48
|
+
event._dispatchInstances = accumulateInto(event._dispatchInstances, inst);
|
|
49
49
|
}
|
|
50
50
|
}
|
|
51
51
|
|
|
@@ -58,7 +58,7 @@ function accumulateDirectionalDispatches(domID, upwards, event) {
|
|
|
58
58
|
*/
|
|
59
59
|
function accumulateTwoPhaseDispatchesSingle(event) {
|
|
60
60
|
if (event && event.dispatchConfig.phasedRegistrationNames) {
|
|
61
|
-
|
|
61
|
+
EventPluginUtils.traverseTwoPhase(event._targetInst, accumulateDirectionalDispatches, event);
|
|
62
62
|
}
|
|
63
63
|
}
|
|
64
64
|
|
|
@@ -67,7 +67,9 @@ function accumulateTwoPhaseDispatchesSingle(event) {
|
|
|
67
67
|
*/
|
|
68
68
|
function accumulateTwoPhaseDispatchesSingleSkipTarget(event) {
|
|
69
69
|
if (event && event.dispatchConfig.phasedRegistrationNames) {
|
|
70
|
-
|
|
70
|
+
var targetInst = event._targetInst;
|
|
71
|
+
var parentInst = targetInst ? EventPluginUtils.getParentInstance(targetInst) : null;
|
|
72
|
+
EventPluginUtils.traverseTwoPhase(parentInst, accumulateDirectionalDispatches, event);
|
|
71
73
|
}
|
|
72
74
|
}
|
|
73
75
|
|
|
@@ -76,13 +78,13 @@ function accumulateTwoPhaseDispatchesSingleSkipTarget(event) {
|
|
|
76
78
|
* registration names. Same as `accumulateDirectDispatchesSingle` but without
|
|
77
79
|
* requiring that the `dispatchMarker` be the same as the dispatched ID.
|
|
78
80
|
*/
|
|
79
|
-
function accumulateDispatches(
|
|
81
|
+
function accumulateDispatches(inst, ignoredDirection, event) {
|
|
80
82
|
if (event && event.dispatchConfig.registrationName) {
|
|
81
83
|
var registrationName = event.dispatchConfig.registrationName;
|
|
82
|
-
var listener = getListener(
|
|
84
|
+
var listener = getListener(inst, registrationName);
|
|
83
85
|
if (listener) {
|
|
84
86
|
event._dispatchListeners = accumulateInto(event._dispatchListeners, listener);
|
|
85
|
-
event.
|
|
87
|
+
event._dispatchInstances = accumulateInto(event._dispatchInstances, inst);
|
|
86
88
|
}
|
|
87
89
|
}
|
|
88
90
|
}
|
|
@@ -94,7 +96,7 @@ function accumulateDispatches(id, ignoredDirection, event) {
|
|
|
94
96
|
*/
|
|
95
97
|
function accumulateDirectDispatchesSingle(event) {
|
|
96
98
|
if (event && event.dispatchConfig.registrationName) {
|
|
97
|
-
accumulateDispatches(event.
|
|
99
|
+
accumulateDispatches(event._targetInst, null, event);
|
|
98
100
|
}
|
|
99
101
|
}
|
|
100
102
|
|
|
@@ -106,8 +108,8 @@ function accumulateTwoPhaseDispatchesSkipTarget(events) {
|
|
|
106
108
|
forEachAccumulated(events, accumulateTwoPhaseDispatchesSingleSkipTarget);
|
|
107
109
|
}
|
|
108
110
|
|
|
109
|
-
function accumulateEnterLeaveDispatches(leave, enter,
|
|
110
|
-
|
|
111
|
+
function accumulateEnterLeaveDispatches(leave, enter, from, to) {
|
|
112
|
+
EventPluginUtils.traverseEnterLeave(from, to, accumulateDispatches, leave, enter);
|
|
111
113
|
}
|
|
112
114
|
|
|
113
115
|
function accumulateDirectDispatches(events) {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Copyright 2013-
|
|
2
|
+
* Copyright 2013-present, Facebook, Inc.
|
|
3
3
|
* All rights reserved.
|
|
4
4
|
*
|
|
5
5
|
* This source code is licensed under the BSD-style license found in the
|
|
@@ -7,7 +7,6 @@
|
|
|
7
7
|
* of patent rights can be found in the PATENTS file in the same directory.
|
|
8
8
|
*
|
|
9
9
|
* @providesModule FallbackCompositionState
|
|
10
|
-
* @typechecks static-only
|
|
11
10
|
*/
|
|
12
11
|
|
|
13
12
|
'use strict';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Copyright 2013-
|
|
2
|
+
* Copyright 2013-present, Facebook, Inc.
|
|
3
3
|
* All rights reserved.
|
|
4
4
|
*
|
|
5
5
|
* This source code is licensed under the BSD-style license found in the
|
|
@@ -12,9 +12,7 @@
|
|
|
12
12
|
'use strict';
|
|
13
13
|
|
|
14
14
|
var DOMProperty = require('./DOMProperty');
|
|
15
|
-
var ExecutionEnvironment = require('fbjs/lib/ExecutionEnvironment');
|
|
16
15
|
|
|
17
|
-
var MUST_USE_ATTRIBUTE = DOMProperty.injection.MUST_USE_ATTRIBUTE;
|
|
18
16
|
var MUST_USE_PROPERTY = DOMProperty.injection.MUST_USE_PROPERTY;
|
|
19
17
|
var HAS_BOOLEAN_VALUE = DOMProperty.injection.HAS_BOOLEAN_VALUE;
|
|
20
18
|
var HAS_SIDE_EFFECTS = DOMProperty.injection.HAS_SIDE_EFFECTS;
|
|
@@ -22,14 +20,8 @@ var HAS_NUMERIC_VALUE = DOMProperty.injection.HAS_NUMERIC_VALUE;
|
|
|
22
20
|
var HAS_POSITIVE_NUMERIC_VALUE = DOMProperty.injection.HAS_POSITIVE_NUMERIC_VALUE;
|
|
23
21
|
var HAS_OVERLOADED_BOOLEAN_VALUE = DOMProperty.injection.HAS_OVERLOADED_BOOLEAN_VALUE;
|
|
24
22
|
|
|
25
|
-
var hasSVG;
|
|
26
|
-
if (ExecutionEnvironment.canUseDOM) {
|
|
27
|
-
var implementation = document.implementation;
|
|
28
|
-
hasSVG = implementation && implementation.hasFeature && implementation.hasFeature('http://www.w3.org/TR/SVG11/feature#BasicStructure', '1.1');
|
|
29
|
-
}
|
|
30
|
-
|
|
31
23
|
var HTMLDOMPropertyConfig = {
|
|
32
|
-
isCustomAttribute: RegExp.prototype.test.bind(
|
|
24
|
+
isCustomAttribute: RegExp.prototype.test.bind(new RegExp('^(data|aria)-[' + DOMProperty.ATTRIBUTE_NAME_CHAR + ']*$')),
|
|
33
25
|
Properties: {
|
|
34
26
|
/**
|
|
35
27
|
* Standard Properties
|
|
@@ -38,86 +30,84 @@ var HTMLDOMPropertyConfig = {
|
|
|
38
30
|
acceptCharset: null,
|
|
39
31
|
accessKey: null,
|
|
40
32
|
action: null,
|
|
41
|
-
allowFullScreen:
|
|
42
|
-
allowTransparency:
|
|
33
|
+
allowFullScreen: HAS_BOOLEAN_VALUE,
|
|
34
|
+
allowTransparency: null,
|
|
43
35
|
alt: null,
|
|
44
36
|
async: HAS_BOOLEAN_VALUE,
|
|
45
37
|
autoComplete: null,
|
|
46
38
|
// autoFocus is polyfilled/normalized by AutoFocusUtils
|
|
47
39
|
// autoFocus: HAS_BOOLEAN_VALUE,
|
|
48
40
|
autoPlay: HAS_BOOLEAN_VALUE,
|
|
49
|
-
capture:
|
|
41
|
+
capture: HAS_BOOLEAN_VALUE,
|
|
50
42
|
cellPadding: null,
|
|
51
43
|
cellSpacing: null,
|
|
52
|
-
charSet:
|
|
53
|
-
challenge:
|
|
44
|
+
charSet: null,
|
|
45
|
+
challenge: null,
|
|
54
46
|
checked: MUST_USE_PROPERTY | HAS_BOOLEAN_VALUE,
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
// browsers that support SVG and the property in browsers that don't,
|
|
60
|
-
// regardless of whether the element is HTML or SVG.
|
|
61
|
-
className: hasSVG ? MUST_USE_ATTRIBUTE : MUST_USE_PROPERTY,
|
|
62
|
-
cols: MUST_USE_ATTRIBUTE | HAS_POSITIVE_NUMERIC_VALUE,
|
|
47
|
+
cite: null,
|
|
48
|
+
classID: null,
|
|
49
|
+
className: null,
|
|
50
|
+
cols: HAS_POSITIVE_NUMERIC_VALUE,
|
|
63
51
|
colSpan: null,
|
|
64
52
|
content: null,
|
|
65
53
|
contentEditable: null,
|
|
66
|
-
contextMenu:
|
|
67
|
-
controls:
|
|
54
|
+
contextMenu: null,
|
|
55
|
+
controls: HAS_BOOLEAN_VALUE,
|
|
68
56
|
coords: null,
|
|
69
57
|
crossOrigin: null,
|
|
70
58
|
data: null, // For `<object />` acts as `src`.
|
|
71
|
-
dateTime:
|
|
59
|
+
dateTime: null,
|
|
72
60
|
'default': HAS_BOOLEAN_VALUE,
|
|
73
61
|
defer: HAS_BOOLEAN_VALUE,
|
|
74
62
|
dir: null,
|
|
75
|
-
disabled:
|
|
63
|
+
disabled: HAS_BOOLEAN_VALUE,
|
|
76
64
|
download: HAS_OVERLOADED_BOOLEAN_VALUE,
|
|
77
65
|
draggable: null,
|
|
78
66
|
encType: null,
|
|
79
|
-
form:
|
|
80
|
-
formAction:
|
|
81
|
-
formEncType:
|
|
82
|
-
formMethod:
|
|
67
|
+
form: null,
|
|
68
|
+
formAction: null,
|
|
69
|
+
formEncType: null,
|
|
70
|
+
formMethod: null,
|
|
83
71
|
formNoValidate: HAS_BOOLEAN_VALUE,
|
|
84
|
-
formTarget:
|
|
85
|
-
frameBorder:
|
|
72
|
+
formTarget: null,
|
|
73
|
+
frameBorder: null,
|
|
86
74
|
headers: null,
|
|
87
|
-
height:
|
|
88
|
-
hidden:
|
|
75
|
+
height: null,
|
|
76
|
+
hidden: HAS_BOOLEAN_VALUE,
|
|
89
77
|
high: null,
|
|
90
78
|
href: null,
|
|
91
79
|
hrefLang: null,
|
|
92
80
|
htmlFor: null,
|
|
93
81
|
httpEquiv: null,
|
|
94
82
|
icon: null,
|
|
95
|
-
id:
|
|
96
|
-
inputMode:
|
|
83
|
+
id: null,
|
|
84
|
+
inputMode: null,
|
|
97
85
|
integrity: null,
|
|
98
|
-
is:
|
|
99
|
-
keyParams:
|
|
100
|
-
keyType:
|
|
86
|
+
is: null,
|
|
87
|
+
keyParams: null,
|
|
88
|
+
keyType: null,
|
|
101
89
|
kind: null,
|
|
102
90
|
label: null,
|
|
103
91
|
lang: null,
|
|
104
|
-
list:
|
|
105
|
-
loop:
|
|
92
|
+
list: null,
|
|
93
|
+
loop: HAS_BOOLEAN_VALUE,
|
|
106
94
|
low: null,
|
|
107
|
-
manifest:
|
|
95
|
+
manifest: null,
|
|
108
96
|
marginHeight: null,
|
|
109
97
|
marginWidth: null,
|
|
110
98
|
max: null,
|
|
111
|
-
maxLength:
|
|
112
|
-
media:
|
|
99
|
+
maxLength: null,
|
|
100
|
+
media: null,
|
|
113
101
|
mediaGroup: null,
|
|
114
102
|
method: null,
|
|
115
103
|
min: null,
|
|
116
|
-
minLength:
|
|
104
|
+
minLength: null,
|
|
105
|
+
// Caution; `option.selected` is not updated if `select.multiple` is
|
|
106
|
+
// disabled with `removeAttribute`.
|
|
117
107
|
multiple: MUST_USE_PROPERTY | HAS_BOOLEAN_VALUE,
|
|
118
108
|
muted: MUST_USE_PROPERTY | HAS_BOOLEAN_VALUE,
|
|
119
109
|
name: null,
|
|
120
|
-
nonce:
|
|
110
|
+
nonce: null,
|
|
121
111
|
noValidate: HAS_BOOLEAN_VALUE,
|
|
122
112
|
open: HAS_BOOLEAN_VALUE,
|
|
123
113
|
optimum: null,
|
|
@@ -125,29 +115,30 @@ var HTMLDOMPropertyConfig = {
|
|
|
125
115
|
placeholder: null,
|
|
126
116
|
poster: null,
|
|
127
117
|
preload: null,
|
|
118
|
+
profile: null,
|
|
128
119
|
radioGroup: null,
|
|
129
|
-
readOnly:
|
|
120
|
+
readOnly: HAS_BOOLEAN_VALUE,
|
|
130
121
|
rel: null,
|
|
131
122
|
required: HAS_BOOLEAN_VALUE,
|
|
132
123
|
reversed: HAS_BOOLEAN_VALUE,
|
|
133
|
-
role:
|
|
134
|
-
rows:
|
|
135
|
-
rowSpan:
|
|
124
|
+
role: null,
|
|
125
|
+
rows: HAS_POSITIVE_NUMERIC_VALUE,
|
|
126
|
+
rowSpan: HAS_NUMERIC_VALUE,
|
|
136
127
|
sandbox: null,
|
|
137
128
|
scope: null,
|
|
138
129
|
scoped: HAS_BOOLEAN_VALUE,
|
|
139
130
|
scrolling: null,
|
|
140
|
-
seamless:
|
|
131
|
+
seamless: HAS_BOOLEAN_VALUE,
|
|
141
132
|
selected: MUST_USE_PROPERTY | HAS_BOOLEAN_VALUE,
|
|
142
133
|
shape: null,
|
|
143
|
-
size:
|
|
144
|
-
sizes:
|
|
134
|
+
size: HAS_POSITIVE_NUMERIC_VALUE,
|
|
135
|
+
sizes: null,
|
|
145
136
|
span: HAS_POSITIVE_NUMERIC_VALUE,
|
|
146
137
|
spellCheck: null,
|
|
147
138
|
src: null,
|
|
148
|
-
srcDoc:
|
|
139
|
+
srcDoc: null,
|
|
149
140
|
srcLang: null,
|
|
150
|
-
srcSet:
|
|
141
|
+
srcSet: null,
|
|
151
142
|
start: HAS_NUMERIC_VALUE,
|
|
152
143
|
step: null,
|
|
153
144
|
style: null,
|
|
@@ -155,55 +146,56 @@ var HTMLDOMPropertyConfig = {
|
|
|
155
146
|
tabIndex: null,
|
|
156
147
|
target: null,
|
|
157
148
|
title: null,
|
|
149
|
+
// Setting .type throws on non-<input> tags
|
|
158
150
|
type: null,
|
|
159
151
|
useMap: null,
|
|
160
152
|
value: MUST_USE_PROPERTY | HAS_SIDE_EFFECTS,
|
|
161
|
-
width:
|
|
162
|
-
wmode:
|
|
153
|
+
width: null,
|
|
154
|
+
wmode: null,
|
|
163
155
|
wrap: null,
|
|
164
156
|
|
|
165
157
|
/**
|
|
166
158
|
* RDFa Properties
|
|
167
159
|
*/
|
|
168
|
-
about:
|
|
169
|
-
datatype:
|
|
170
|
-
inlist:
|
|
171
|
-
prefix:
|
|
160
|
+
about: null,
|
|
161
|
+
datatype: null,
|
|
162
|
+
inlist: null,
|
|
163
|
+
prefix: null,
|
|
172
164
|
// property is also supported for OpenGraph in meta tags.
|
|
173
|
-
property:
|
|
174
|
-
resource:
|
|
175
|
-
'typeof':
|
|
176
|
-
vocab:
|
|
165
|
+
property: null,
|
|
166
|
+
resource: null,
|
|
167
|
+
'typeof': null,
|
|
168
|
+
vocab: null,
|
|
177
169
|
|
|
178
170
|
/**
|
|
179
171
|
* Non-standard Properties
|
|
180
172
|
*/
|
|
181
173
|
// autoCapitalize and autoCorrect are supported in Mobile Safari for
|
|
182
174
|
// keyboard hints.
|
|
183
|
-
autoCapitalize:
|
|
184
|
-
autoCorrect:
|
|
175
|
+
autoCapitalize: null,
|
|
176
|
+
autoCorrect: null,
|
|
185
177
|
// autoSave allows WebKit/Blink to persist values of input fields on page reloads
|
|
186
178
|
autoSave: null,
|
|
187
179
|
// color is for Safari mask-icon link
|
|
188
180
|
color: null,
|
|
189
181
|
// itemProp, itemScope, itemType are for
|
|
190
182
|
// Microdata support. See http://schema.org/docs/gs.html
|
|
191
|
-
itemProp:
|
|
192
|
-
itemScope:
|
|
193
|
-
itemType:
|
|
183
|
+
itemProp: null,
|
|
184
|
+
itemScope: HAS_BOOLEAN_VALUE,
|
|
185
|
+
itemType: null,
|
|
194
186
|
// itemID and itemRef are for Microdata support as well but
|
|
195
|
-
// only specified in the
|
|
187
|
+
// only specified in the WHATWG spec document. See
|
|
196
188
|
// https://html.spec.whatwg.org/multipage/microdata.html#microdata-dom-api
|
|
197
|
-
itemID:
|
|
198
|
-
itemRef:
|
|
189
|
+
itemID: null,
|
|
190
|
+
itemRef: null,
|
|
199
191
|
// results show looking glass icon and recent searches on input
|
|
200
192
|
// search fields in WebKit/Blink
|
|
201
193
|
results: null,
|
|
202
194
|
// IE-only attribute that specifies security restrictions on an iframe
|
|
203
195
|
// as an alternative to the sandbox attribute on IE<10
|
|
204
|
-
security:
|
|
196
|
+
security: null,
|
|
205
197
|
// IE-only attribute that controls focus behavior
|
|
206
|
-
unselectable:
|
|
198
|
+
unselectable: null
|
|
207
199
|
},
|
|
208
200
|
DOMAttributeNames: {
|
|
209
201
|
acceptCharset: 'accept-charset',
|
|
@@ -211,20 +203,7 @@ var HTMLDOMPropertyConfig = {
|
|
|
211
203
|
htmlFor: 'for',
|
|
212
204
|
httpEquiv: 'http-equiv'
|
|
213
205
|
},
|
|
214
|
-
DOMPropertyNames: {
|
|
215
|
-
autoComplete: 'autocomplete',
|
|
216
|
-
autoFocus: 'autofocus',
|
|
217
|
-
autoPlay: 'autoplay',
|
|
218
|
-
autoSave: 'autosave',
|
|
219
|
-
// `encoding` is equivalent to `enctype`, IE8 lacks an `enctype` setter.
|
|
220
|
-
// http://www.w3.org/TR/html5/forms.html#dom-fs-encoding
|
|
221
|
-
encType: 'encoding',
|
|
222
|
-
hrefLang: 'hreflang',
|
|
223
|
-
radioGroup: 'radiogroup',
|
|
224
|
-
spellCheck: 'spellcheck',
|
|
225
|
-
srcDoc: 'srcdoc',
|
|
226
|
-
srcSet: 'srcset'
|
|
227
|
-
}
|
|
206
|
+
DOMPropertyNames: {}
|
|
228
207
|
};
|
|
229
208
|
|
|
230
209
|
module.exports = HTMLDOMPropertyConfig;
|
package/lib/LinkedStateMixin.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Copyright 2013-
|
|
2
|
+
* Copyright 2013-present, Facebook, Inc.
|
|
3
3
|
* All rights reserved.
|
|
4
4
|
*
|
|
5
5
|
* This source code is licensed under the BSD-style license found in the
|
|
@@ -7,7 +7,6 @@
|
|
|
7
7
|
* of patent rights can be found in the PATENTS file in the same directory.
|
|
8
8
|
*
|
|
9
9
|
* @providesModule LinkedStateMixin
|
|
10
|
-
* @typechecks static-only
|
|
11
10
|
*/
|
|
12
11
|
|
|
13
12
|
'use strict';
|
package/lib/LinkedValueUtils.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Copyright 2013-
|
|
2
|
+
* Copyright 2013-present, Facebook, Inc.
|
|
3
3
|
* All rights reserved.
|
|
4
4
|
*
|
|
5
5
|
* This source code is licensed under the BSD-style license found in the
|
|
@@ -7,7 +7,6 @@
|
|
|
7
7
|
* of patent rights can be found in the PATENTS file in the same directory.
|
|
8
8
|
*
|
|
9
9
|
* @providesModule LinkedValueUtils
|
|
10
|
-
* @typechecks static-only
|
|
11
10
|
*/
|
|
12
11
|
|
|
13
12
|
'use strict';
|
|
@@ -29,16 +28,16 @@ var hasReadOnlyValue = {
|
|
|
29
28
|
};
|
|
30
29
|
|
|
31
30
|
function _assertSingleLink(inputProps) {
|
|
32
|
-
!(inputProps.checkedLink == null || inputProps.valueLink == null) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'Cannot provide a checkedLink and a valueLink. If you want to use ' + 'checkedLink, you probably don\'t want to use valueLink and vice versa.') : invariant(false) :
|
|
31
|
+
!(inputProps.checkedLink == null || inputProps.valueLink == null) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'Cannot provide a checkedLink and a valueLink. If you want to use ' + 'checkedLink, you probably don\'t want to use valueLink and vice versa.') : invariant(false) : void 0;
|
|
33
32
|
}
|
|
34
33
|
function _assertValueLink(inputProps) {
|
|
35
34
|
_assertSingleLink(inputProps);
|
|
36
|
-
!(inputProps.value == null && inputProps.onChange == null) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'Cannot provide a valueLink and a value or onChange event. If you want ' + 'to use value or onChange, you probably don\'t want to use valueLink.') : invariant(false) :
|
|
35
|
+
!(inputProps.value == null && inputProps.onChange == null) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'Cannot provide a valueLink and a value or onChange event. If you want ' + 'to use value or onChange, you probably don\'t want to use valueLink.') : invariant(false) : void 0;
|
|
37
36
|
}
|
|
38
37
|
|
|
39
38
|
function _assertCheckedLink(inputProps) {
|
|
40
39
|
_assertSingleLink(inputProps);
|
|
41
|
-
!(inputProps.checked == null && inputProps.onChange == null) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'Cannot provide a checkedLink and a checked property or onChange event. ' + 'If you want to use checked or onChange, you probably don\'t want to ' + 'use checkedLink') : invariant(false) :
|
|
40
|
+
!(inputProps.checked == null && inputProps.onChange == null) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'Cannot provide a checkedLink and a checked property or onChange event. ' + 'If you want to use checked or onChange, you probably don\'t want to ' + 'use checkedLink') : invariant(false) : void 0;
|
|
42
41
|
}
|
|
43
42
|
|
|
44
43
|
var propTypes = {
|
|
@@ -84,7 +83,7 @@ var LinkedValueUtils = {
|
|
|
84
83
|
loggedTypeFailures[error.message] = true;
|
|
85
84
|
|
|
86
85
|
var addendum = getDeclarationErrorAddendum(owner);
|
|
87
|
-
process.env.NODE_ENV !== 'production' ? warning(false, 'Failed form propType: %s%s', error.message, addendum) :
|
|
86
|
+
process.env.NODE_ENV !== 'production' ? warning(false, 'Failed form propType: %s%s', error.message, addendum) : void 0;
|
|
88
87
|
}
|
|
89
88
|
}
|
|
90
89
|
},
|