react 15.3.2-rc.1 → 15.4.0-rc.3

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.
Files changed (209) hide show
  1. package/dist/react-with-addons.js +3863 -21388
  2. package/dist/react-with-addons.min.js +3 -6
  3. package/dist/react.js +2639 -19486
  4. package/dist/react.min.js +2 -6
  5. package/lib/KeyEscapeUtils.js +0 -1
  6. package/lib/LinkedStateMixin.js +1 -3
  7. package/lib/PooledClass.js +3 -1
  8. package/lib/React.js +0 -1
  9. package/lib/ReactAddonsDOMDependencies.js +35 -0
  10. package/lib/ReactAddonsDOMDependenciesUMDShim.js +31 -0
  11. package/lib/ReactCSSTransitionGroup.js +60 -43
  12. package/lib/ReactCSSTransitionGroupChild.js +2 -3
  13. package/lib/ReactChildren.js +0 -1
  14. package/lib/ReactClass.js +38 -54
  15. package/lib/ReactComponent.js +0 -1
  16. package/lib/ReactComponentTreeDevtool.js +0 -1
  17. package/lib/ReactComponentTreeHook.js +84 -101
  18. package/lib/{DOMNamespaces.js → ReactComponentTreeHookUMDShim.js} +4 -7
  19. package/lib/ReactComponentWithPureRenderMixin.js +0 -1
  20. package/lib/ReactCurrentOwner.js +1 -2
  21. package/lib/{renderSubtreeIntoContainer.js → ReactCurrentOwnerUMDShim.js} +5 -4
  22. package/lib/ReactDOMFactories.js +0 -1
  23. package/lib/ReactElement.js +6 -14
  24. package/lib/ReactElementSymbol.js +19 -0
  25. package/lib/{ReactDOMComponentFlags.js → ReactElementType.js} +3 -9
  26. package/lib/ReactElementValidator.js +1 -3
  27. package/lib/ReactFragment.js +0 -1
  28. package/lib/ReactLink.js +0 -1
  29. package/lib/ReactNoopUpdateQueue.js +0 -1
  30. package/lib/ReactPropTypeLocationNames.js +1 -1
  31. package/lib/ReactPropTypeLocations.js +2 -12
  32. package/lib/ReactPropTypes.js +5 -3
  33. package/lib/ReactPropTypesSecret.js +1 -1
  34. package/lib/ReactPureComponent.js +0 -1
  35. package/lib/ReactStateSetters.js +0 -1
  36. package/lib/ReactTransitionChildMapping.js +0 -1
  37. package/lib/ReactTransitionEvents.js +1 -2
  38. package/lib/ReactTransitionGroup.js +145 -142
  39. package/lib/ReactUMDEntry.js +11 -6
  40. package/lib/{ReactDOMFeatureFlags.js → ReactUMDShim.js} +3 -6
  41. package/lib/ReactVersion.js +1 -2
  42. package/lib/ReactWithAddons.js +15 -3
  43. package/lib/ReactWithAddonsUMDEntry.js +11 -6
  44. package/lib/canDefineProperty.js +2 -1
  45. package/lib/checkReactTypeSpec.js +0 -1
  46. package/lib/deprecated.js +0 -1
  47. package/lib/flattenChildren.js +0 -1
  48. package/lib/getIteratorFn.js +0 -1
  49. package/lib/onlyChild.js +0 -1
  50. package/lib/reactProdInvariant.js +0 -1
  51. package/lib/sliceChildren.js +0 -1
  52. package/lib/traverseAllChildren.js +11 -3
  53. package/lib/update.js +6 -8
  54. package/package.json +1 -1
  55. package/lib/AutoFocusUtils.js +0 -24
  56. package/lib/BeforeInputEventPlugin.js +0 -390
  57. package/lib/CSSProperty.js +0 -148
  58. package/lib/CSSPropertyOperations.js +0 -205
  59. package/lib/CallbackQueue.js +0 -106
  60. package/lib/ChangeEventPlugin.js +0 -325
  61. package/lib/DOMChildrenOperations.js +0 -194
  62. package/lib/DOMLazyTree.js +0 -118
  63. package/lib/DOMProperty.js +0 -206
  64. package/lib/DOMPropertyOperations.js +0 -221
  65. package/lib/Danger.js +0 -48
  66. package/lib/DefaultEventPluginOrder.js +0 -27
  67. package/lib/DisabledInputUtils.js +0 -50
  68. package/lib/EnterLeaveEventPlugin.js +0 -105
  69. package/lib/EventConstants.js +0 -97
  70. package/lib/EventPluginHub.js +0 -251
  71. package/lib/EventPluginRegistry.js +0 -247
  72. package/lib/EventPluginUtils.js +0 -229
  73. package/lib/EventPropagators.js +0 -137
  74. package/lib/FallbackCompositionState.js +0 -95
  75. package/lib/HTMLDOMPropertyConfig.js +0 -212
  76. package/lib/LinkedValueUtils.js +0 -136
  77. package/lib/NativeMethodsMixin.js +0 -167
  78. package/lib/ReactBrowserEventEmitter.js +0 -330
  79. package/lib/ReactChildReconciler.js +0 -154
  80. package/lib/ReactChildrenMutationWarningHook.js +0 -54
  81. package/lib/ReactComponentBrowserEnvironment.js +0 -30
  82. package/lib/ReactComponentEnvironment.js +0 -45
  83. package/lib/ReactComponentTreeTestUtils.js +0 -87
  84. package/lib/ReactCompositeComponent.js +0 -904
  85. package/lib/ReactDOM.js +0 -110
  86. package/lib/ReactDOMButton.js +0 -24
  87. package/lib/ReactDOMComponent.js +0 -1006
  88. package/lib/ReactDOMComponentTree.js +0 -188
  89. package/lib/ReactDOMContainerInfo.js +0 -33
  90. package/lib/ReactDOMEmptyComponent.js +0 -60
  91. package/lib/ReactDOMFiber.js +0 -76
  92. package/lib/ReactDOMIDOperations.js +0 -34
  93. package/lib/ReactDOMInput.js +0 -269
  94. package/lib/ReactDOMNullInputValuePropHook.js +0 -43
  95. package/lib/ReactDOMOption.js +0 -123
  96. package/lib/ReactDOMSelect.js +0 -201
  97. package/lib/ReactDOMSelection.js +0 -212
  98. package/lib/ReactDOMServer.js +0 -26
  99. package/lib/ReactDOMTextComponent.js +0 -164
  100. package/lib/ReactDOMTextarea.js +0 -155
  101. package/lib/ReactDOMTreeTraversal.js +0 -136
  102. package/lib/ReactDOMUnknownPropertyHook.js +0 -112
  103. package/lib/ReactDebugTool.js +0 -301
  104. package/lib/ReactDefaultBatchingStrategy.js +0 -68
  105. package/lib/ReactDefaultInjection.js +0 -84
  106. package/lib/ReactEmptyComponent.js +0 -30
  107. package/lib/ReactErrorUtils.js +0 -76
  108. package/lib/ReactEventEmitterMixin.js +0 -33
  109. package/lib/ReactEventListener.js +0 -157
  110. package/lib/ReactFeatureFlags.js +0 -22
  111. package/lib/ReactHostComponent.js +0 -76
  112. package/lib/ReactHostOperationHistoryHook.js +0 -37
  113. package/lib/ReactInjection.js +0 -36
  114. package/lib/ReactInputSelection.js +0 -124
  115. package/lib/ReactInstanceHandles.js +0 -302
  116. package/lib/ReactInstanceMap.js +0 -48
  117. package/lib/ReactInstrumentation.js +0 -21
  118. package/lib/ReactInvalidSetStateWarningHook.js +0 -36
  119. package/lib/ReactMarkupChecksum.js +0 -50
  120. package/lib/ReactMount.js +0 -534
  121. package/lib/ReactMultiChild.js +0 -451
  122. package/lib/ReactMultiChildUpdateTypes.js +0 -32
  123. package/lib/ReactNative.js +0 -71
  124. package/lib/ReactNativeAttributePayload.js +0 -371
  125. package/lib/ReactNativeBaseComponent.js +0 -198
  126. package/lib/ReactNativeBridgeEventPlugin.js +0 -60
  127. package/lib/ReactNativeComponentEnvironment.js +0 -31
  128. package/lib/ReactNativeComponentTree.js +0 -68
  129. package/lib/ReactNativeContainerInfo.js +0 -21
  130. package/lib/ReactNativeDOMIDOperations.js +0 -79
  131. package/lib/ReactNativeDefaultInjection.js +0 -101
  132. package/lib/ReactNativeEventEmitter.js +0 -191
  133. package/lib/ReactNativeEventPluginOrder.js +0 -16
  134. package/lib/ReactNativeGlobalResponderHandler.js +0 -25
  135. package/lib/ReactNativeMount.js +0 -193
  136. package/lib/ReactNativePropRegistry.js +0 -52
  137. package/lib/ReactNativeReconcileTransaction.js +0 -129
  138. package/lib/ReactNativeTagHandles.js +0 -56
  139. package/lib/ReactNativeTextComponent.js +0 -71
  140. package/lib/ReactNativeTreeTraversal.js +0 -127
  141. package/lib/ReactNodeTypes.js +0 -40
  142. package/lib/ReactNoop.js +0 -173
  143. package/lib/ReactOwner.js +0 -94
  144. package/lib/ReactPerf.js +0 -494
  145. package/lib/ReactReconcileTransaction.js +0 -178
  146. package/lib/ReactReconciler.js +0 -168
  147. package/lib/ReactRef.js +0 -80
  148. package/lib/ReactServerBatchingStrategy.js +0 -22
  149. package/lib/ReactServerRendering.js +0 -90
  150. package/lib/ReactServerRenderingTransaction.js +0 -90
  151. package/lib/ReactServerUpdateQueue.js +0 -141
  152. package/lib/ReactSimpleEmptyComponent.js +0 -37
  153. package/lib/ReactTestMount.js +0 -126
  154. package/lib/ReactTestReconcileTransaction.js +0 -121
  155. package/lib/ReactTestRenderer.js +0 -144
  156. package/lib/ReactTestUtils.js +0 -518
  157. package/lib/ReactUpdateQueue.js +0 -226
  158. package/lib/ReactUpdates.js +0 -251
  159. package/lib/ResponderEventPlugin.js +0 -510
  160. package/lib/ResponderSyntheticEvent.js +0 -39
  161. package/lib/ResponderTouchHistoryStore.js +0 -184
  162. package/lib/SVGDOMPropertyConfig.js +0 -302
  163. package/lib/SelectEventPlugin.js +0 -196
  164. package/lib/SimpleEventPlugin.js +0 -635
  165. package/lib/SyntheticAnimationEvent.js +0 -39
  166. package/lib/SyntheticClipboardEvent.js +0 -38
  167. package/lib/SyntheticCompositionEvent.js +0 -36
  168. package/lib/SyntheticDragEvent.js +0 -36
  169. package/lib/SyntheticEvent.js +0 -268
  170. package/lib/SyntheticFocusEvent.js +0 -36
  171. package/lib/SyntheticInputEvent.js +0 -37
  172. package/lib/SyntheticKeyboardEvent.js +0 -84
  173. package/lib/SyntheticMouseEvent.js +0 -72
  174. package/lib/SyntheticTouchEvent.js +0 -45
  175. package/lib/SyntheticTransitionEvent.js +0 -39
  176. package/lib/SyntheticUIEvent.js +0 -59
  177. package/lib/SyntheticWheelEvent.js +0 -54
  178. package/lib/TapEventPlugin.js +0 -110
  179. package/lib/TouchHistoryMath.js +0 -99
  180. package/lib/Transaction.js +0 -233
  181. package/lib/ViewportMetrics.js +0 -27
  182. package/lib/accumulate.js +0 -46
  183. package/lib/accumulateInto.js +0 -58
  184. package/lib/adler32.js +0 -44
  185. package/lib/createMicrosoftUnsafeLocalFunction.js +0 -32
  186. package/lib/createReactNativeComponentClass.js +0 -42
  187. package/lib/dangerousStyleValue.js +0 -79
  188. package/lib/escapeTextContentForBrowser.js +0 -123
  189. package/lib/findDOMNode.js +0 -60
  190. package/lib/findNodeHandle.js +0 -91
  191. package/lib/forEachAccumulated.js +0 -31
  192. package/lib/getEventCharCode.js +0 -50
  193. package/lib/getEventKey.js +0 -102
  194. package/lib/getEventModifierState.js +0 -43
  195. package/lib/getEventTarget.js +0 -35
  196. package/lib/getHostComponentFromComposite.js +0 -30
  197. package/lib/getNodeForCharacterOffset.js +0 -74
  198. package/lib/getTestDocument.js +0 -21
  199. package/lib/getTextContentAccessor.js +0 -33
  200. package/lib/getVendorPrefixedEventName.js +0 -101
  201. package/lib/instantiateReactComponent.js +0 -119
  202. package/lib/isEventSupported.js +0 -60
  203. package/lib/isTextInputElement.js +0 -51
  204. package/lib/quoteAttributeValueForBrowser.js +0 -26
  205. package/lib/reactComponentExpect.js +0 -217
  206. package/lib/setInnerHTML.js +0 -98
  207. package/lib/setTextContent.js +0 -48
  208. package/lib/shouldUpdateReactComponent.js +0 -42
  209. package/lib/validateDOMNesting.js +0 -382
@@ -1,137 +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 EventPropagators
10
- */
11
-
12
- 'use strict';
13
-
14
- var EventConstants = require('./EventConstants');
15
- var EventPluginHub = require('./EventPluginHub');
16
- var EventPluginUtils = require('./EventPluginUtils');
17
-
18
- var accumulateInto = require('./accumulateInto');
19
- var forEachAccumulated = require('./forEachAccumulated');
20
- var warning = require('fbjs/lib/warning');
21
-
22
- var PropagationPhases = EventConstants.PropagationPhases;
23
- var getListener = EventPluginHub.getListener;
24
-
25
- /**
26
- * Some event types have a notion of different registration names for different
27
- * "phases" of propagation. This finds listeners by a given phase.
28
- */
29
- function listenerAtPhase(inst, event, propagationPhase) {
30
- var registrationName = event.dispatchConfig.phasedRegistrationNames[propagationPhase];
31
- return getListener(inst, registrationName);
32
- }
33
-
34
- /**
35
- * Tags a `SyntheticEvent` with dispatched listeners. Creating this function
36
- * here, allows us to not have to bind or create functions for each event.
37
- * Mutating the event's members allows us to not have to create a wrapping
38
- * "dispatch" object that pairs the event with the listener.
39
- */
40
- function accumulateDirectionalDispatches(inst, upwards, event) {
41
- if (process.env.NODE_ENV !== 'production') {
42
- process.env.NODE_ENV !== 'production' ? warning(inst, 'Dispatching inst must not be null') : void 0;
43
- }
44
- var phase = upwards ? PropagationPhases.bubbled : PropagationPhases.captured;
45
- var listener = listenerAtPhase(inst, event, phase);
46
- if (listener) {
47
- event._dispatchListeners = accumulateInto(event._dispatchListeners, listener);
48
- event._dispatchInstances = accumulateInto(event._dispatchInstances, inst);
49
- }
50
- }
51
-
52
- /**
53
- * Collect dispatches (must be entirely collected before dispatching - see unit
54
- * tests). Lazily allocate the array to conserve memory. We must loop through
55
- * each event and perform the traversal for each one. We cannot perform a
56
- * single traversal for the entire collection of events because each event may
57
- * have a different target.
58
- */
59
- function accumulateTwoPhaseDispatchesSingle(event) {
60
- if (event && event.dispatchConfig.phasedRegistrationNames) {
61
- EventPluginUtils.traverseTwoPhase(event._targetInst, accumulateDirectionalDispatches, event);
62
- }
63
- }
64
-
65
- /**
66
- * Same as `accumulateTwoPhaseDispatchesSingle`, but skips over the targetID.
67
- */
68
- function accumulateTwoPhaseDispatchesSingleSkipTarget(event) {
69
- if (event && event.dispatchConfig.phasedRegistrationNames) {
70
- var targetInst = event._targetInst;
71
- var parentInst = targetInst ? EventPluginUtils.getParentInstance(targetInst) : null;
72
- EventPluginUtils.traverseTwoPhase(parentInst, accumulateDirectionalDispatches, event);
73
- }
74
- }
75
-
76
- /**
77
- * Accumulates without regard to direction, does not look for phased
78
- * registration names. Same as `accumulateDirectDispatchesSingle` but without
79
- * requiring that the `dispatchMarker` be the same as the dispatched ID.
80
- */
81
- function accumulateDispatches(inst, ignoredDirection, event) {
82
- if (event && event.dispatchConfig.registrationName) {
83
- var registrationName = event.dispatchConfig.registrationName;
84
- var listener = getListener(inst, registrationName);
85
- if (listener) {
86
- event._dispatchListeners = accumulateInto(event._dispatchListeners, listener);
87
- event._dispatchInstances = accumulateInto(event._dispatchInstances, inst);
88
- }
89
- }
90
- }
91
-
92
- /**
93
- * Accumulates dispatches on an `SyntheticEvent`, but only for the
94
- * `dispatchMarker`.
95
- * @param {SyntheticEvent} event
96
- */
97
- function accumulateDirectDispatchesSingle(event) {
98
- if (event && event.dispatchConfig.registrationName) {
99
- accumulateDispatches(event._targetInst, null, event);
100
- }
101
- }
102
-
103
- function accumulateTwoPhaseDispatches(events) {
104
- forEachAccumulated(events, accumulateTwoPhaseDispatchesSingle);
105
- }
106
-
107
- function accumulateTwoPhaseDispatchesSkipTarget(events) {
108
- forEachAccumulated(events, accumulateTwoPhaseDispatchesSingleSkipTarget);
109
- }
110
-
111
- function accumulateEnterLeaveDispatches(leave, enter, from, to) {
112
- EventPluginUtils.traverseEnterLeave(from, to, accumulateDispatches, leave, enter);
113
- }
114
-
115
- function accumulateDirectDispatches(events) {
116
- forEachAccumulated(events, accumulateDirectDispatchesSingle);
117
- }
118
-
119
- /**
120
- * A small set of propagation patterns, each of which will accept a small amount
121
- * of information, and generate a set of "dispatch ready event objects" - which
122
- * are sets of events that have already been annotated with a set of dispatched
123
- * listener functions/ids. The API is designed this way to discourage these
124
- * propagation strategies from actually executing the dispatches, since we
125
- * always want to collect the entire set of dispatches before executing event a
126
- * single one.
127
- *
128
- * @constructor EventPropagators
129
- */
130
- var EventPropagators = {
131
- accumulateTwoPhaseDispatches: accumulateTwoPhaseDispatches,
132
- accumulateTwoPhaseDispatchesSkipTarget: accumulateTwoPhaseDispatchesSkipTarget,
133
- accumulateDirectDispatches: accumulateDirectDispatches,
134
- accumulateEnterLeaveDispatches: accumulateEnterLeaveDispatches
135
- };
136
-
137
- module.exports = EventPropagators;
@@ -1,95 +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 FallbackCompositionState
10
- */
11
-
12
- 'use strict';
13
-
14
- var _assign = require('object-assign');
15
-
16
- var PooledClass = require('./PooledClass');
17
-
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
- destructor: function () {
39
- this._root = null;
40
- this._startText = null;
41
- this._fallbackText = null;
42
- },
43
-
44
- /**
45
- * Get current text of input.
46
- *
47
- * @return {string}
48
- */
49
- getText: function () {
50
- if ('value' in this._root) {
51
- return this._root.value;
52
- }
53
- return this._root[getTextContentAccessor()];
54
- },
55
-
56
- /**
57
- * Determine the differing substring between the initially stored
58
- * text content and the current content.
59
- *
60
- * @return {string}
61
- */
62
- getData: function () {
63
- if (this._fallbackText) {
64
- return this._fallbackText;
65
- }
66
-
67
- var start;
68
- var startValue = this._startText;
69
- var startLength = startValue.length;
70
- var end;
71
- var endValue = this.getText();
72
- var endLength = endValue.length;
73
-
74
- for (start = 0; start < startLength; start++) {
75
- if (startValue[start] !== endValue[start]) {
76
- break;
77
- }
78
- }
79
-
80
- var minEnd = startLength - start;
81
- for (end = 1; end <= minEnd; end++) {
82
- if (startValue[startLength - end] !== endValue[endLength - end]) {
83
- break;
84
- }
85
- }
86
-
87
- var sliceTail = end > 1 ? 1 - end : undefined;
88
- this._fallbackText = endValue.slice(start, sliceTail);
89
- return this._fallbackText;
90
- }
91
- });
92
-
93
- PooledClass.addPoolingTo(FallbackCompositionState);
94
-
95
- module.exports = FallbackCompositionState;
@@ -1,212 +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 HTMLDOMPropertyConfig
10
- */
11
-
12
- 'use strict';
13
-
14
- var DOMProperty = require('./DOMProperty');
15
-
16
- var MUST_USE_PROPERTY = DOMProperty.injection.MUST_USE_PROPERTY;
17
- var HAS_BOOLEAN_VALUE = DOMProperty.injection.HAS_BOOLEAN_VALUE;
18
- var HAS_NUMERIC_VALUE = DOMProperty.injection.HAS_NUMERIC_VALUE;
19
- var HAS_POSITIVE_NUMERIC_VALUE = DOMProperty.injection.HAS_POSITIVE_NUMERIC_VALUE;
20
- var HAS_OVERLOADED_BOOLEAN_VALUE = DOMProperty.injection.HAS_OVERLOADED_BOOLEAN_VALUE;
21
-
22
- var HTMLDOMPropertyConfig = {
23
- isCustomAttribute: RegExp.prototype.test.bind(new RegExp('^(data|aria)-[' + DOMProperty.ATTRIBUTE_NAME_CHAR + ']*$')),
24
- Properties: {
25
- /**
26
- * Standard Properties
27
- */
28
- accept: 0,
29
- acceptCharset: 0,
30
- accessKey: 0,
31
- action: 0,
32
- allowFullScreen: HAS_BOOLEAN_VALUE,
33
- allowTransparency: 0,
34
- alt: 0,
35
- // specifies target context for links with `preload` type
36
- as: 0,
37
- async: HAS_BOOLEAN_VALUE,
38
- autoComplete: 0,
39
- // autoFocus is polyfilled/normalized by AutoFocusUtils
40
- // autoFocus: HAS_BOOLEAN_VALUE,
41
- autoPlay: HAS_BOOLEAN_VALUE,
42
- capture: HAS_BOOLEAN_VALUE,
43
- cellPadding: 0,
44
- cellSpacing: 0,
45
- charSet: 0,
46
- challenge: 0,
47
- checked: MUST_USE_PROPERTY | HAS_BOOLEAN_VALUE,
48
- cite: 0,
49
- classID: 0,
50
- className: 0,
51
- cols: HAS_POSITIVE_NUMERIC_VALUE,
52
- colSpan: 0,
53
- content: 0,
54
- contentEditable: 0,
55
- contextMenu: 0,
56
- controls: HAS_BOOLEAN_VALUE,
57
- coords: 0,
58
- crossOrigin: 0,
59
- data: 0, // For `<object />` acts as `src`.
60
- dateTime: 0,
61
- 'default': HAS_BOOLEAN_VALUE,
62
- defer: HAS_BOOLEAN_VALUE,
63
- dir: 0,
64
- disabled: HAS_BOOLEAN_VALUE,
65
- download: HAS_OVERLOADED_BOOLEAN_VALUE,
66
- draggable: 0,
67
- encType: 0,
68
- form: 0,
69
- formAction: 0,
70
- formEncType: 0,
71
- formMethod: 0,
72
- formNoValidate: HAS_BOOLEAN_VALUE,
73
- formTarget: 0,
74
- frameBorder: 0,
75
- headers: 0,
76
- height: 0,
77
- hidden: HAS_BOOLEAN_VALUE,
78
- high: 0,
79
- href: 0,
80
- hrefLang: 0,
81
- htmlFor: 0,
82
- httpEquiv: 0,
83
- icon: 0,
84
- id: 0,
85
- inputMode: 0,
86
- integrity: 0,
87
- is: 0,
88
- keyParams: 0,
89
- keyType: 0,
90
- kind: 0,
91
- label: 0,
92
- lang: 0,
93
- list: 0,
94
- loop: HAS_BOOLEAN_VALUE,
95
- low: 0,
96
- manifest: 0,
97
- marginHeight: 0,
98
- marginWidth: 0,
99
- max: 0,
100
- maxLength: 0,
101
- media: 0,
102
- mediaGroup: 0,
103
- method: 0,
104
- min: 0,
105
- minLength: 0,
106
- // Caution; `option.selected` is not updated if `select.multiple` is
107
- // disabled with `removeAttribute`.
108
- multiple: MUST_USE_PROPERTY | HAS_BOOLEAN_VALUE,
109
- muted: MUST_USE_PROPERTY | HAS_BOOLEAN_VALUE,
110
- name: 0,
111
- nonce: 0,
112
- noValidate: HAS_BOOLEAN_VALUE,
113
- open: HAS_BOOLEAN_VALUE,
114
- optimum: 0,
115
- pattern: 0,
116
- placeholder: 0,
117
- playsInline: HAS_BOOLEAN_VALUE,
118
- poster: 0,
119
- preload: 0,
120
- profile: 0,
121
- radioGroup: 0,
122
- readOnly: HAS_BOOLEAN_VALUE,
123
- referrerPolicy: 0,
124
- rel: 0,
125
- required: HAS_BOOLEAN_VALUE,
126
- reversed: HAS_BOOLEAN_VALUE,
127
- role: 0,
128
- rows: HAS_POSITIVE_NUMERIC_VALUE,
129
- rowSpan: HAS_NUMERIC_VALUE,
130
- sandbox: 0,
131
- scope: 0,
132
- scoped: HAS_BOOLEAN_VALUE,
133
- scrolling: 0,
134
- seamless: HAS_BOOLEAN_VALUE,
135
- selected: MUST_USE_PROPERTY | HAS_BOOLEAN_VALUE,
136
- shape: 0,
137
- size: HAS_POSITIVE_NUMERIC_VALUE,
138
- sizes: 0,
139
- span: HAS_POSITIVE_NUMERIC_VALUE,
140
- spellCheck: 0,
141
- src: 0,
142
- srcDoc: 0,
143
- srcLang: 0,
144
- srcSet: 0,
145
- start: HAS_NUMERIC_VALUE,
146
- step: 0,
147
- style: 0,
148
- summary: 0,
149
- tabIndex: 0,
150
- target: 0,
151
- title: 0,
152
- // Setting .type throws on non-<input> tags
153
- type: 0,
154
- useMap: 0,
155
- value: 0,
156
- width: 0,
157
- wmode: 0,
158
- wrap: 0,
159
-
160
- /**
161
- * RDFa Properties
162
- */
163
- about: 0,
164
- datatype: 0,
165
- inlist: 0,
166
- prefix: 0,
167
- // property is also supported for OpenGraph in meta tags.
168
- property: 0,
169
- resource: 0,
170
- 'typeof': 0,
171
- vocab: 0,
172
-
173
- /**
174
- * Non-standard Properties
175
- */
176
- // autoCapitalize and autoCorrect are supported in Mobile Safari for
177
- // keyboard hints.
178
- autoCapitalize: 0,
179
- autoCorrect: 0,
180
- // autoSave allows WebKit/Blink to persist values of input fields on page reloads
181
- autoSave: 0,
182
- // color is for Safari mask-icon link
183
- color: 0,
184
- // itemProp, itemScope, itemType are for
185
- // Microdata support. See http://schema.org/docs/gs.html
186
- itemProp: 0,
187
- itemScope: HAS_BOOLEAN_VALUE,
188
- itemType: 0,
189
- // itemID and itemRef are for Microdata support as well but
190
- // only specified in the WHATWG spec document. See
191
- // https://html.spec.whatwg.org/multipage/microdata.html#microdata-dom-api
192
- itemID: 0,
193
- itemRef: 0,
194
- // results show looking glass icon and recent searches on input
195
- // search fields in WebKit/Blink
196
- results: 0,
197
- // IE-only attribute that specifies security restrictions on an iframe
198
- // as an alternative to the sandbox attribute on IE<10
199
- security: 0,
200
- // IE-only attribute that controls focus behavior
201
- unselectable: 0
202
- },
203
- DOMAttributeNames: {
204
- acceptCharset: 'accept-charset',
205
- className: 'class',
206
- htmlFor: 'for',
207
- httpEquiv: 'http-equiv'
208
- },
209
- DOMPropertyNames: {}
210
- };
211
-
212
- module.exports = HTMLDOMPropertyConfig;
@@ -1,136 +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 LinkedValueUtils
10
- */
11
-
12
- 'use strict';
13
-
14
- var _prodInvariant = require('./reactProdInvariant');
15
-
16
- var ReactPropTypes = require('./ReactPropTypes');
17
- var ReactPropTypeLocations = require('./ReactPropTypeLocations');
18
- var ReactPropTypesSecret = require('./ReactPropTypesSecret');
19
-
20
- var invariant = require('fbjs/lib/invariant');
21
- var warning = require('fbjs/lib/warning');
22
-
23
- var hasReadOnlyValue = {
24
- 'button': true,
25
- 'checkbox': true,
26
- 'image': true,
27
- 'hidden': true,
28
- 'radio': true,
29
- 'reset': true,
30
- 'submit': true
31
- };
32
-
33
- function _assertSingleLink(inputProps) {
34
- !(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.') : _prodInvariant('87') : void 0;
35
- }
36
- function _assertValueLink(inputProps) {
37
- _assertSingleLink(inputProps);
38
- !(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.') : _prodInvariant('88') : void 0;
39
- }
40
-
41
- function _assertCheckedLink(inputProps) {
42
- _assertSingleLink(inputProps);
43
- !(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') : _prodInvariant('89') : void 0;
44
- }
45
-
46
- var propTypes = {
47
- value: function (props, propName, componentName) {
48
- if (!props[propName] || hasReadOnlyValue[props.type] || props.onChange || props.readOnly || props.disabled) {
49
- return null;
50
- }
51
- return new Error('You provided a `value` prop to a form field without an ' + '`onChange` handler. This will render a read-only field. If ' + 'the field should be mutable use `defaultValue`. Otherwise, ' + 'set either `onChange` or `readOnly`.');
52
- },
53
- checked: function (props, propName, componentName) {
54
- if (!props[propName] || props.onChange || props.readOnly || props.disabled) {
55
- return null;
56
- }
57
- return new Error('You provided a `checked` prop to a form field without an ' + '`onChange` handler. This will render a read-only field. If ' + 'the field should be mutable use `defaultChecked`. Otherwise, ' + 'set either `onChange` or `readOnly`.');
58
- },
59
- onChange: ReactPropTypes.func
60
- };
61
-
62
- var loggedTypeFailures = {};
63
- function getDeclarationErrorAddendum(owner) {
64
- if (owner) {
65
- var name = owner.getName();
66
- if (name) {
67
- return ' Check the render method of `' + name + '`.';
68
- }
69
- }
70
- return '';
71
- }
72
-
73
- /**
74
- * Provide a linked `value` attribute for controlled forms. You should not use
75
- * this outside of the ReactDOM controlled form components.
76
- */
77
- var LinkedValueUtils = {
78
- checkPropTypes: function (tagName, props, owner) {
79
- for (var propName in propTypes) {
80
- if (propTypes.hasOwnProperty(propName)) {
81
- var error = propTypes[propName](props, propName, tagName, ReactPropTypeLocations.prop, null, ReactPropTypesSecret);
82
- }
83
- if (error instanceof Error && !(error.message in loggedTypeFailures)) {
84
- // Only monitor this failure once because there tends to be a lot of the
85
- // same error.
86
- loggedTypeFailures[error.message] = true;
87
-
88
- var addendum = getDeclarationErrorAddendum(owner);
89
- process.env.NODE_ENV !== 'production' ? warning(false, 'Failed form propType: %s%s', error.message, addendum) : void 0;
90
- }
91
- }
92
- },
93
-
94
- /**
95
- * @param {object} inputProps Props for form component
96
- * @return {*} current value of the input either from value prop or link.
97
- */
98
- getValue: function (inputProps) {
99
- if (inputProps.valueLink) {
100
- _assertValueLink(inputProps);
101
- return inputProps.valueLink.value;
102
- }
103
- return inputProps.value;
104
- },
105
-
106
- /**
107
- * @param {object} inputProps Props for form component
108
- * @return {*} current checked status of the input either from checked prop
109
- * or link.
110
- */
111
- getChecked: function (inputProps) {
112
- if (inputProps.checkedLink) {
113
- _assertCheckedLink(inputProps);
114
- return inputProps.checkedLink.value;
115
- }
116
- return inputProps.checked;
117
- },
118
-
119
- /**
120
- * @param {object} inputProps Props for form component
121
- * @param {SyntheticEvent} event change event to handle
122
- */
123
- executeOnChange: function (inputProps, event) {
124
- if (inputProps.valueLink) {
125
- _assertValueLink(inputProps);
126
- return inputProps.valueLink.requestChange(event.target.value);
127
- } else if (inputProps.checkedLink) {
128
- _assertCheckedLink(inputProps);
129
- return inputProps.checkedLink.requestChange(event.target.checked);
130
- } else if (inputProps.onChange) {
131
- return inputProps.onChange.call(undefined, event);
132
- }
133
- }
134
- };
135
-
136
- module.exports = LinkedValueUtils;