react 15.3.1-rc.2 → 15.4.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.
Files changed (190) hide show
  1. package/dist/react-with-addons.js +3961 -21387
  2. package/dist/react-with-addons.min.js +3 -6
  3. package/dist/react.js +2701 -19464
  4. package/dist/react.min.js +2 -6
  5. package/lib/LinkedStateMixin.js +1 -2
  6. package/lib/PooledClass.js +3 -0
  7. package/lib/ReactAddonsDOMDependencies.js +36 -0
  8. package/lib/ReactAddonsDOMDependenciesUMDShim.js +32 -0
  9. package/lib/ReactCSSTransitionGroup.js +60 -42
  10. package/lib/ReactCSSTransitionGroupChild.js +2 -2
  11. package/lib/ReactClass.js +38 -53
  12. package/lib/ReactComponentTreeHook.js +84 -100
  13. package/lib/{DOMNamespaces.js → ReactComponentTreeHookUMDShim.js} +5 -7
  14. package/lib/ReactCurrentOwner.js +1 -1
  15. package/lib/{renderSubtreeIntoContainer.js → ReactCurrentOwnerUMDShim.js} +6 -4
  16. package/lib/ReactElement.js +6 -29
  17. package/lib/ReactElementSymbol.js +20 -0
  18. package/lib/{ReactDOMComponentFlags.js → ReactElementType.js} +4 -9
  19. package/lib/ReactElementValidator.js +1 -2
  20. package/lib/ReactPropTypeLocationNames.js +1 -0
  21. package/lib/ReactPropTypeLocations.js +2 -11
  22. package/lib/ReactPropTypes.js +30 -13
  23. package/lib/ReactPropTypesSecret.js +1 -0
  24. package/lib/ReactTransitionEvents.js +1 -1
  25. package/lib/ReactTransitionGroup.js +145 -141
  26. package/lib/ReactUMDEntry.js +11 -5
  27. package/lib/{ReactDOMFeatureFlags.js → ReactUMDShim.js} +4 -6
  28. package/lib/ReactVersion.js +1 -1
  29. package/lib/ReactWithAddons.js +15 -2
  30. package/lib/ReactWithAddonsUMDEntry.js +11 -5
  31. package/lib/canDefineProperty.js +2 -0
  32. package/lib/onlyChild.js +1 -1
  33. package/lib/traverseAllChildren.js +11 -2
  34. package/lib/update.js +6 -7
  35. package/package.json +2 -2
  36. package/lib/AutoFocusUtils.js +0 -24
  37. package/lib/BeforeInputEventPlugin.js +0 -388
  38. package/lib/CSSProperty.js +0 -148
  39. package/lib/CSSPropertyOperations.js +0 -205
  40. package/lib/CallbackQueue.js +0 -106
  41. package/lib/ChangeEventPlugin.js +0 -325
  42. package/lib/DOMChildrenOperations.js +0 -194
  43. package/lib/DOMLazyTree.js +0 -118
  44. package/lib/DOMProperty.js +0 -206
  45. package/lib/DOMPropertyOperations.js +0 -221
  46. package/lib/Danger.js +0 -48
  47. package/lib/DefaultEventPluginOrder.js +0 -27
  48. package/lib/DisabledInputUtils.js +0 -50
  49. package/lib/EnterLeaveEventPlugin.js +0 -105
  50. package/lib/EventConstants.js +0 -97
  51. package/lib/EventPluginHub.js +0 -251
  52. package/lib/EventPluginRegistry.js +0 -247
  53. package/lib/EventPluginUtils.js +0 -229
  54. package/lib/EventPropagators.js +0 -137
  55. package/lib/FallbackCompositionState.js +0 -95
  56. package/lib/HTMLDOMPropertyConfig.js +0 -209
  57. package/lib/LinkedValueUtils.js +0 -136
  58. package/lib/NativeMethodsMixin.js +0 -167
  59. package/lib/ReactBrowserEventEmitter.js +0 -317
  60. package/lib/ReactChildReconciler.js +0 -154
  61. package/lib/ReactChildrenMutationWarningHook.js +0 -54
  62. package/lib/ReactComponentBrowserEnvironment.js +0 -30
  63. package/lib/ReactComponentEnvironment.js +0 -45
  64. package/lib/ReactComponentTreeTestUtils.js +0 -87
  65. package/lib/ReactCompositeComponent.js +0 -920
  66. package/lib/ReactDOM.js +0 -110
  67. package/lib/ReactDOMButton.js +0 -24
  68. package/lib/ReactDOMComponent.js +0 -1005
  69. package/lib/ReactDOMComponentTree.js +0 -188
  70. package/lib/ReactDOMContainerInfo.js +0 -33
  71. package/lib/ReactDOMEmptyComponent.js +0 -60
  72. package/lib/ReactDOMFiber.js +0 -78
  73. package/lib/ReactDOMIDOperations.js +0 -34
  74. package/lib/ReactDOMInput.js +0 -269
  75. package/lib/ReactDOMNullInputValuePropHook.js +0 -43
  76. package/lib/ReactDOMOption.js +0 -123
  77. package/lib/ReactDOMSelect.js +0 -201
  78. package/lib/ReactDOMSelection.js +0 -212
  79. package/lib/ReactDOMServer.js +0 -26
  80. package/lib/ReactDOMTextComponent.js +0 -164
  81. package/lib/ReactDOMTextarea.js +0 -155
  82. package/lib/ReactDOMTreeTraversal.js +0 -136
  83. package/lib/ReactDOMUnknownPropertyHook.js +0 -112
  84. package/lib/ReactDebugTool.js +0 -307
  85. package/lib/ReactDefaultBatchingStrategy.js +0 -68
  86. package/lib/ReactDefaultInjection.js +0 -84
  87. package/lib/ReactEmptyComponent.js +0 -30
  88. package/lib/ReactErrorUtils.js +0 -76
  89. package/lib/ReactEventEmitterMixin.js +0 -33
  90. package/lib/ReactEventListener.js +0 -157
  91. package/lib/ReactFeatureFlags.js +0 -22
  92. package/lib/ReactHostComponent.js +0 -76
  93. package/lib/ReactHostOperationHistoryHook.js +0 -37
  94. package/lib/ReactInjection.js +0 -36
  95. package/lib/ReactInputSelection.js +0 -124
  96. package/lib/ReactInstanceHandles.js +0 -302
  97. package/lib/ReactInstanceMap.js +0 -48
  98. package/lib/ReactInstrumentation.js +0 -21
  99. package/lib/ReactInvalidSetStateWarningHook.js +0 -36
  100. package/lib/ReactMarkupChecksum.js +0 -50
  101. package/lib/ReactMount.js +0 -495
  102. package/lib/ReactMultiChild.js +0 -451
  103. package/lib/ReactMultiChildUpdateTypes.js +0 -32
  104. package/lib/ReactNative.js +0 -71
  105. package/lib/ReactNativeAttributePayload.js +0 -371
  106. package/lib/ReactNativeBaseComponent.js +0 -198
  107. package/lib/ReactNativeBridgeEventPlugin.js +0 -60
  108. package/lib/ReactNativeComponentEnvironment.js +0 -31
  109. package/lib/ReactNativeComponentTree.js +0 -68
  110. package/lib/ReactNativeContainerInfo.js +0 -21
  111. package/lib/ReactNativeDOMIDOperations.js +0 -79
  112. package/lib/ReactNativeDefaultInjection.js +0 -101
  113. package/lib/ReactNativeEventEmitter.js +0 -191
  114. package/lib/ReactNativeEventPluginOrder.js +0 -16
  115. package/lib/ReactNativeGlobalResponderHandler.js +0 -25
  116. package/lib/ReactNativeMount.js +0 -193
  117. package/lib/ReactNativePropRegistry.js +0 -52
  118. package/lib/ReactNativeReconcileTransaction.js +0 -116
  119. package/lib/ReactNativeTagHandles.js +0 -56
  120. package/lib/ReactNativeTextComponent.js +0 -71
  121. package/lib/ReactNativeTreeTraversal.js +0 -127
  122. package/lib/ReactNodeTypes.js +0 -40
  123. package/lib/ReactNoop.js +0 -173
  124. package/lib/ReactOwner.js +0 -94
  125. package/lib/ReactPerf.js +0 -494
  126. package/lib/ReactReconcileTransaction.js +0 -178
  127. package/lib/ReactReconciler.js +0 -168
  128. package/lib/ReactRef.js +0 -80
  129. package/lib/ReactServerBatchingStrategy.js +0 -22
  130. package/lib/ReactServerRendering.js +0 -90
  131. package/lib/ReactServerRenderingTransaction.js +0 -90
  132. package/lib/ReactServerUpdateQueue.js +0 -141
  133. package/lib/ReactSimpleEmptyComponent.js +0 -37
  134. package/lib/ReactTestMount.js +0 -123
  135. package/lib/ReactTestReconcileTransaction.js +0 -108
  136. package/lib/ReactTestRenderer.js +0 -144
  137. package/lib/ReactTestUtils.js +0 -518
  138. package/lib/ReactUpdateQueue.js +0 -226
  139. package/lib/ReactUpdates.js +0 -251
  140. package/lib/ResponderEventPlugin.js +0 -510
  141. package/lib/ResponderSyntheticEvent.js +0 -39
  142. package/lib/ResponderTouchHistoryStore.js +0 -184
  143. package/lib/SVGDOMPropertyConfig.js +0 -302
  144. package/lib/SelectEventPlugin.js +0 -196
  145. package/lib/SimpleEventPlugin.js +0 -635
  146. package/lib/SyntheticAnimationEvent.js +0 -39
  147. package/lib/SyntheticClipboardEvent.js +0 -38
  148. package/lib/SyntheticCompositionEvent.js +0 -36
  149. package/lib/SyntheticDragEvent.js +0 -36
  150. package/lib/SyntheticEvent.js +0 -267
  151. package/lib/SyntheticFocusEvent.js +0 -36
  152. package/lib/SyntheticInputEvent.js +0 -37
  153. package/lib/SyntheticKeyboardEvent.js +0 -84
  154. package/lib/SyntheticMouseEvent.js +0 -72
  155. package/lib/SyntheticTouchEvent.js +0 -45
  156. package/lib/SyntheticTransitionEvent.js +0 -39
  157. package/lib/SyntheticUIEvent.js +0 -59
  158. package/lib/SyntheticWheelEvent.js +0 -54
  159. package/lib/TapEventPlugin.js +0 -110
  160. package/lib/TouchHistoryMath.js +0 -99
  161. package/lib/Transaction.js +0 -233
  162. package/lib/ViewportMetrics.js +0 -27
  163. package/lib/accumulate.js +0 -46
  164. package/lib/accumulateInto.js +0 -58
  165. package/lib/adler32.js +0 -44
  166. package/lib/createMicrosoftUnsafeLocalFunction.js +0 -32
  167. package/lib/createReactNativeComponentClass.js +0 -42
  168. package/lib/dangerousStyleValue.js +0 -79
  169. package/lib/escapeTextContentForBrowser.js +0 -122
  170. package/lib/findDOMNode.js +0 -60
  171. package/lib/findNodeHandle.js +0 -91
  172. package/lib/forEachAccumulated.js +0 -31
  173. package/lib/getEventCharCode.js +0 -50
  174. package/lib/getEventKey.js +0 -102
  175. package/lib/getEventModifierState.js +0 -43
  176. package/lib/getEventTarget.js +0 -35
  177. package/lib/getHostComponentFromComposite.js +0 -30
  178. package/lib/getNodeForCharacterOffset.js +0 -74
  179. package/lib/getTestDocument.js +0 -21
  180. package/lib/getTextContentAccessor.js +0 -33
  181. package/lib/getVendorPrefixedEventName.js +0 -101
  182. package/lib/instantiateReactComponent.js +0 -119
  183. package/lib/isEventSupported.js +0 -60
  184. package/lib/isTextInputElement.js +0 -51
  185. package/lib/quoteAttributeValueForBrowser.js +0 -26
  186. package/lib/reactComponentExpect.js +0 -217
  187. package/lib/setInnerHTML.js +0 -98
  188. package/lib/setTextContent.js +0 -48
  189. package/lib/shouldUpdateReactComponent.js +0 -42
  190. package/lib/validateDOMNesting.js +0 -369
@@ -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,209 +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
- async: HAS_BOOLEAN_VALUE,
36
- autoComplete: 0,
37
- // autoFocus is polyfilled/normalized by AutoFocusUtils
38
- // autoFocus: HAS_BOOLEAN_VALUE,
39
- autoPlay: HAS_BOOLEAN_VALUE,
40
- capture: HAS_BOOLEAN_VALUE,
41
- cellPadding: 0,
42
- cellSpacing: 0,
43
- charSet: 0,
44
- challenge: 0,
45
- checked: MUST_USE_PROPERTY | HAS_BOOLEAN_VALUE,
46
- cite: 0,
47
- classID: 0,
48
- className: 0,
49
- cols: HAS_POSITIVE_NUMERIC_VALUE,
50
- colSpan: 0,
51
- content: 0,
52
- contentEditable: 0,
53
- contextMenu: 0,
54
- controls: HAS_BOOLEAN_VALUE,
55
- coords: 0,
56
- crossOrigin: 0,
57
- data: 0, // For `<object />` acts as `src`.
58
- dateTime: 0,
59
- 'default': HAS_BOOLEAN_VALUE,
60
- defer: HAS_BOOLEAN_VALUE,
61
- dir: 0,
62
- disabled: HAS_BOOLEAN_VALUE,
63
- download: HAS_OVERLOADED_BOOLEAN_VALUE,
64
- draggable: 0,
65
- encType: 0,
66
- form: 0,
67
- formAction: 0,
68
- formEncType: 0,
69
- formMethod: 0,
70
- formNoValidate: HAS_BOOLEAN_VALUE,
71
- formTarget: 0,
72
- frameBorder: 0,
73
- headers: 0,
74
- height: 0,
75
- hidden: HAS_BOOLEAN_VALUE,
76
- high: 0,
77
- href: 0,
78
- hrefLang: 0,
79
- htmlFor: 0,
80
- httpEquiv: 0,
81
- icon: 0,
82
- id: 0,
83
- inputMode: 0,
84
- integrity: 0,
85
- is: 0,
86
- keyParams: 0,
87
- keyType: 0,
88
- kind: 0,
89
- label: 0,
90
- lang: 0,
91
- list: 0,
92
- loop: HAS_BOOLEAN_VALUE,
93
- low: 0,
94
- manifest: 0,
95
- marginHeight: 0,
96
- marginWidth: 0,
97
- max: 0,
98
- maxLength: 0,
99
- media: 0,
100
- mediaGroup: 0,
101
- method: 0,
102
- min: 0,
103
- minLength: 0,
104
- // Caution; `option.selected` is not updated if `select.multiple` is
105
- // disabled with `removeAttribute`.
106
- multiple: MUST_USE_PROPERTY | HAS_BOOLEAN_VALUE,
107
- muted: MUST_USE_PROPERTY | HAS_BOOLEAN_VALUE,
108
- name: 0,
109
- nonce: 0,
110
- noValidate: HAS_BOOLEAN_VALUE,
111
- open: HAS_BOOLEAN_VALUE,
112
- optimum: 0,
113
- pattern: 0,
114
- placeholder: 0,
115
- poster: 0,
116
- preload: 0,
117
- profile: 0,
118
- radioGroup: 0,
119
- readOnly: HAS_BOOLEAN_VALUE,
120
- referrerPolicy: 0,
121
- rel: 0,
122
- required: HAS_BOOLEAN_VALUE,
123
- reversed: HAS_BOOLEAN_VALUE,
124
- role: 0,
125
- rows: HAS_POSITIVE_NUMERIC_VALUE,
126
- rowSpan: HAS_NUMERIC_VALUE,
127
- sandbox: 0,
128
- scope: 0,
129
- scoped: HAS_BOOLEAN_VALUE,
130
- scrolling: 0,
131
- seamless: HAS_BOOLEAN_VALUE,
132
- selected: MUST_USE_PROPERTY | HAS_BOOLEAN_VALUE,
133
- shape: 0,
134
- size: HAS_POSITIVE_NUMERIC_VALUE,
135
- sizes: 0,
136
- span: HAS_POSITIVE_NUMERIC_VALUE,
137
- spellCheck: 0,
138
- src: 0,
139
- srcDoc: 0,
140
- srcLang: 0,
141
- srcSet: 0,
142
- start: HAS_NUMERIC_VALUE,
143
- step: 0,
144
- style: 0,
145
- summary: 0,
146
- tabIndex: 0,
147
- target: 0,
148
- title: 0,
149
- // Setting .type throws on non-<input> tags
150
- type: 0,
151
- useMap: 0,
152
- value: 0,
153
- width: 0,
154
- wmode: 0,
155
- wrap: 0,
156
-
157
- /**
158
- * RDFa Properties
159
- */
160
- about: 0,
161
- datatype: 0,
162
- inlist: 0,
163
- prefix: 0,
164
- // property is also supported for OpenGraph in meta tags.
165
- property: 0,
166
- resource: 0,
167
- 'typeof': 0,
168
- vocab: 0,
169
-
170
- /**
171
- * Non-standard Properties
172
- */
173
- // autoCapitalize and autoCorrect are supported in Mobile Safari for
174
- // keyboard hints.
175
- autoCapitalize: 0,
176
- autoCorrect: 0,
177
- // autoSave allows WebKit/Blink to persist values of input fields on page reloads
178
- autoSave: 0,
179
- // color is for Safari mask-icon link
180
- color: 0,
181
- // itemProp, itemScope, itemType are for
182
- // Microdata support. See http://schema.org/docs/gs.html
183
- itemProp: 0,
184
- itemScope: HAS_BOOLEAN_VALUE,
185
- itemType: 0,
186
- // itemID and itemRef are for Microdata support as well but
187
- // only specified in the WHATWG spec document. See
188
- // https://html.spec.whatwg.org/multipage/microdata.html#microdata-dom-api
189
- itemID: 0,
190
- itemRef: 0,
191
- // results show looking glass icon and recent searches on input
192
- // search fields in WebKit/Blink
193
- results: 0,
194
- // IE-only attribute that specifies security restrictions on an iframe
195
- // as an alternative to the sandbox attribute on IE<10
196
- security: 0,
197
- // IE-only attribute that controls focus behavior
198
- unselectable: 0
199
- },
200
- DOMAttributeNames: {
201
- acceptCharset: 'accept-charset',
202
- className: 'class',
203
- htmlFor: 'for',
204
- httpEquiv: 'http-equiv'
205
- },
206
- DOMPropertyNames: {}
207
- };
208
-
209
- 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;