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,148 +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 CSSProperty
10
- */
11
-
12
- 'use strict';
13
-
14
- /**
15
- * CSS properties which accept numbers but are not in units of "px".
16
- */
17
-
18
- var isUnitlessNumber = {
19
- animationIterationCount: true,
20
- borderImageOutset: true,
21
- borderImageSlice: true,
22
- borderImageWidth: true,
23
- boxFlex: true,
24
- boxFlexGroup: true,
25
- boxOrdinalGroup: true,
26
- columnCount: true,
27
- flex: true,
28
- flexGrow: true,
29
- flexPositive: true,
30
- flexShrink: true,
31
- flexNegative: true,
32
- flexOrder: true,
33
- gridRow: true,
34
- gridColumn: true,
35
- fontWeight: true,
36
- lineClamp: true,
37
- lineHeight: true,
38
- opacity: true,
39
- order: true,
40
- orphans: true,
41
- tabSize: true,
42
- widows: true,
43
- zIndex: true,
44
- zoom: true,
45
-
46
- // SVG-related properties
47
- fillOpacity: true,
48
- floodOpacity: true,
49
- stopOpacity: true,
50
- strokeDasharray: true,
51
- strokeDashoffset: true,
52
- strokeMiterlimit: true,
53
- strokeOpacity: true,
54
- strokeWidth: true
55
- };
56
-
57
- /**
58
- * @param {string} prefix vendor-specific prefix, eg: Webkit
59
- * @param {string} key style name, eg: transitionDuration
60
- * @return {string} style name prefixed with `prefix`, properly camelCased, eg:
61
- * WebkitTransitionDuration
62
- */
63
- function prefixKey(prefix, key) {
64
- return prefix + key.charAt(0).toUpperCase() + key.substring(1);
65
- }
66
-
67
- /**
68
- * Support style names that may come passed in prefixed by adding permutations
69
- * of vendor prefixes.
70
- */
71
- var prefixes = ['Webkit', 'ms', 'Moz', 'O'];
72
-
73
- // Using Object.keys here, or else the vanilla for-in loop makes IE8 go into an
74
- // infinite loop, because it iterates over the newly added props too.
75
- Object.keys(isUnitlessNumber).forEach(function (prop) {
76
- prefixes.forEach(function (prefix) {
77
- isUnitlessNumber[prefixKey(prefix, prop)] = isUnitlessNumber[prop];
78
- });
79
- });
80
-
81
- /**
82
- * Most style properties can be unset by doing .style[prop] = '' but IE8
83
- * doesn't like doing that with shorthand properties so for the properties that
84
- * IE8 breaks on, which are listed here, we instead unset each of the
85
- * individual properties. See http://bugs.jquery.com/ticket/12385.
86
- * The 4-value 'clock' properties like margin, padding, border-width seem to
87
- * behave without any problems. Curiously, list-style works too without any
88
- * special prodding.
89
- */
90
- var shorthandPropertyExpansions = {
91
- background: {
92
- backgroundAttachment: true,
93
- backgroundColor: true,
94
- backgroundImage: true,
95
- backgroundPositionX: true,
96
- backgroundPositionY: true,
97
- backgroundRepeat: true
98
- },
99
- backgroundPosition: {
100
- backgroundPositionX: true,
101
- backgroundPositionY: true
102
- },
103
- border: {
104
- borderWidth: true,
105
- borderStyle: true,
106
- borderColor: true
107
- },
108
- borderBottom: {
109
- borderBottomWidth: true,
110
- borderBottomStyle: true,
111
- borderBottomColor: true
112
- },
113
- borderLeft: {
114
- borderLeftWidth: true,
115
- borderLeftStyle: true,
116
- borderLeftColor: true
117
- },
118
- borderRight: {
119
- borderRightWidth: true,
120
- borderRightStyle: true,
121
- borderRightColor: true
122
- },
123
- borderTop: {
124
- borderTopWidth: true,
125
- borderTopStyle: true,
126
- borderTopColor: true
127
- },
128
- font: {
129
- fontStyle: true,
130
- fontVariant: true,
131
- fontWeight: true,
132
- fontSize: true,
133
- lineHeight: true,
134
- fontFamily: true
135
- },
136
- outline: {
137
- outlineWidth: true,
138
- outlineStyle: true,
139
- outlineColor: true
140
- }
141
- };
142
-
143
- var CSSProperty = {
144
- isUnitlessNumber: isUnitlessNumber,
145
- shorthandPropertyExpansions: shorthandPropertyExpansions
146
- };
147
-
148
- module.exports = CSSProperty;
@@ -1,205 +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 CSSPropertyOperations
10
- */
11
-
12
- 'use strict';
13
-
14
- var CSSProperty = require('./CSSProperty');
15
- var ExecutionEnvironment = require('fbjs/lib/ExecutionEnvironment');
16
- var ReactInstrumentation = require('./ReactInstrumentation');
17
-
18
- var camelizeStyleName = require('fbjs/lib/camelizeStyleName');
19
- var dangerousStyleValue = require('./dangerousStyleValue');
20
- var hyphenateStyleName = require('fbjs/lib/hyphenateStyleName');
21
- var memoizeStringOnly = require('fbjs/lib/memoizeStringOnly');
22
- var warning = require('fbjs/lib/warning');
23
-
24
- var processStyleName = memoizeStringOnly(function (styleName) {
25
- return hyphenateStyleName(styleName);
26
- });
27
-
28
- var hasShorthandPropertyBug = false;
29
- var styleFloatAccessor = 'cssFloat';
30
- if (ExecutionEnvironment.canUseDOM) {
31
- var tempStyle = document.createElement('div').style;
32
- try {
33
- // IE8 throws "Invalid argument." if resetting shorthand style properties.
34
- tempStyle.font = '';
35
- } catch (e) {
36
- hasShorthandPropertyBug = true;
37
- }
38
- // IE8 only supports accessing cssFloat (standard) as styleFloat
39
- if (document.documentElement.style.cssFloat === undefined) {
40
- styleFloatAccessor = 'styleFloat';
41
- }
42
- }
43
-
44
- if (process.env.NODE_ENV !== 'production') {
45
- // 'msTransform' is correct, but the other prefixes should be capitalized
46
- var badVendoredStyleNamePattern = /^(?:webkit|moz|o)[A-Z]/;
47
-
48
- // style values shouldn't contain a semicolon
49
- var badStyleValueWithSemicolonPattern = /;\s*$/;
50
-
51
- var warnedStyleNames = {};
52
- var warnedStyleValues = {};
53
- var warnedForNaNValue = false;
54
-
55
- var warnHyphenatedStyleName = function (name, owner) {
56
- if (warnedStyleNames.hasOwnProperty(name) && warnedStyleNames[name]) {
57
- return;
58
- }
59
-
60
- warnedStyleNames[name] = true;
61
- process.env.NODE_ENV !== 'production' ? warning(false, 'Unsupported style property %s. Did you mean %s?%s', name, camelizeStyleName(name), checkRenderMessage(owner)) : void 0;
62
- };
63
-
64
- var warnBadVendoredStyleName = function (name, owner) {
65
- if (warnedStyleNames.hasOwnProperty(name) && warnedStyleNames[name]) {
66
- return;
67
- }
68
-
69
- warnedStyleNames[name] = true;
70
- process.env.NODE_ENV !== 'production' ? warning(false, 'Unsupported vendor-prefixed style property %s. Did you mean %s?%s', name, name.charAt(0).toUpperCase() + name.slice(1), checkRenderMessage(owner)) : void 0;
71
- };
72
-
73
- var warnStyleValueWithSemicolon = function (name, value, owner) {
74
- if (warnedStyleValues.hasOwnProperty(value) && warnedStyleValues[value]) {
75
- return;
76
- }
77
-
78
- warnedStyleValues[value] = true;
79
- process.env.NODE_ENV !== 'production' ? warning(false, 'Style property values shouldn\'t contain a semicolon.%s ' + 'Try "%s: %s" instead.', checkRenderMessage(owner), name, value.replace(badStyleValueWithSemicolonPattern, '')) : void 0;
80
- };
81
-
82
- var warnStyleValueIsNaN = function (name, value, owner) {
83
- if (warnedForNaNValue) {
84
- return;
85
- }
86
-
87
- warnedForNaNValue = true;
88
- process.env.NODE_ENV !== 'production' ? warning(false, '`NaN` is an invalid value for the `%s` css style property.%s', name, checkRenderMessage(owner)) : void 0;
89
- };
90
-
91
- var checkRenderMessage = function (owner) {
92
- if (owner) {
93
- var name = owner.getName();
94
- if (name) {
95
- return ' Check the render method of `' + name + '`.';
96
- }
97
- }
98
- return '';
99
- };
100
-
101
- /**
102
- * @param {string} name
103
- * @param {*} value
104
- * @param {ReactDOMComponent} component
105
- */
106
- var warnValidStyle = function (name, value, component) {
107
- var owner;
108
- if (component) {
109
- owner = component._currentElement._owner;
110
- }
111
- if (name.indexOf('-') > -1) {
112
- warnHyphenatedStyleName(name, owner);
113
- } else if (badVendoredStyleNamePattern.test(name)) {
114
- warnBadVendoredStyleName(name, owner);
115
- } else if (badStyleValueWithSemicolonPattern.test(value)) {
116
- warnStyleValueWithSemicolon(name, value, owner);
117
- }
118
-
119
- if (typeof value === 'number' && isNaN(value)) {
120
- warnStyleValueIsNaN(name, value, owner);
121
- }
122
- };
123
- }
124
-
125
- /**
126
- * Operations for dealing with CSS properties.
127
- */
128
- var CSSPropertyOperations = {
129
-
130
- /**
131
- * Serializes a mapping of style properties for use as inline styles:
132
- *
133
- * > createMarkupForStyles({width: '200px', height: 0})
134
- * "width:200px;height:0;"
135
- *
136
- * Undefined values are ignored so that declarative programming is easier.
137
- * The result should be HTML-escaped before insertion into the DOM.
138
- *
139
- * @param {object} styles
140
- * @param {ReactDOMComponent} component
141
- * @return {?string}
142
- */
143
- createMarkupForStyles: function (styles, component) {
144
- var serialized = '';
145
- for (var styleName in styles) {
146
- if (!styles.hasOwnProperty(styleName)) {
147
- continue;
148
- }
149
- var styleValue = styles[styleName];
150
- if (process.env.NODE_ENV !== 'production') {
151
- warnValidStyle(styleName, styleValue, component);
152
- }
153
- if (styleValue != null) {
154
- serialized += processStyleName(styleName) + ':';
155
- serialized += dangerousStyleValue(styleName, styleValue, component) + ';';
156
- }
157
- }
158
- return serialized || null;
159
- },
160
-
161
- /**
162
- * Sets the value for multiple styles on a node. If a value is specified as
163
- * '' (empty string), the corresponding style property will be unset.
164
- *
165
- * @param {DOMElement} node
166
- * @param {object} styles
167
- * @param {ReactDOMComponent} component
168
- */
169
- setValueForStyles: function (node, styles, component) {
170
- if (process.env.NODE_ENV !== 'production') {
171
- ReactInstrumentation.debugTool.onHostOperation(component._debugID, 'update styles', styles);
172
- }
173
-
174
- var style = node.style;
175
- for (var styleName in styles) {
176
- if (!styles.hasOwnProperty(styleName)) {
177
- continue;
178
- }
179
- if (process.env.NODE_ENV !== 'production') {
180
- warnValidStyle(styleName, styles[styleName], component);
181
- }
182
- var styleValue = dangerousStyleValue(styleName, styles[styleName], component);
183
- if (styleName === 'float' || styleName === 'cssFloat') {
184
- styleName = styleFloatAccessor;
185
- }
186
- if (styleValue) {
187
- style[styleName] = styleValue;
188
- } else {
189
- var expansion = hasShorthandPropertyBug && CSSProperty.shorthandPropertyExpansions[styleName];
190
- if (expansion) {
191
- // Shorthand property that IE8 won't like unsetting, so unset each
192
- // component to placate it
193
- for (var individualStyleName in expansion) {
194
- style[individualStyleName] = '';
195
- }
196
- } else {
197
- style[styleName] = '';
198
- }
199
- }
200
- }
201
- }
202
-
203
- };
204
-
205
- module.exports = CSSPropertyOperations;
@@ -1,106 +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 CallbackQueue
10
- */
11
-
12
- 'use strict';
13
-
14
- var _prodInvariant = require('./reactProdInvariant'),
15
- _assign = require('object-assign');
16
-
17
- var PooledClass = require('./PooledClass');
18
-
19
- var invariant = require('fbjs/lib/invariant');
20
-
21
- /**
22
- * A specialized pseudo-event module to help keep track of components waiting to
23
- * be notified when their DOM representations are available for use.
24
- *
25
- * This implements `PooledClass`, so you should never need to instantiate this.
26
- * Instead, use `CallbackQueue.getPooled()`.
27
- *
28
- * @class ReactMountReady
29
- * @implements PooledClass
30
- * @internal
31
- */
32
- function CallbackQueue() {
33
- this._callbacks = null;
34
- this._contexts = null;
35
- }
36
-
37
- _assign(CallbackQueue.prototype, {
38
-
39
- /**
40
- * Enqueues a callback to be invoked when `notifyAll` is invoked.
41
- *
42
- * @param {function} callback Invoked when `notifyAll` is invoked.
43
- * @param {?object} context Context to call `callback` with.
44
- * @internal
45
- */
46
- enqueue: function (callback, context) {
47
- this._callbacks = this._callbacks || [];
48
- this._contexts = this._contexts || [];
49
- this._callbacks.push(callback);
50
- this._contexts.push(context);
51
- },
52
-
53
- /**
54
- * Invokes all enqueued callbacks and clears the queue. This is invoked after
55
- * the DOM representation of a component has been created or updated.
56
- *
57
- * @internal
58
- */
59
- notifyAll: function () {
60
- var callbacks = this._callbacks;
61
- var contexts = this._contexts;
62
- if (callbacks) {
63
- !(callbacks.length === contexts.length) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'Mismatched list of contexts in callback queue') : _prodInvariant('24') : void 0;
64
- this._callbacks = null;
65
- this._contexts = null;
66
- for (var i = 0; i < callbacks.length; i++) {
67
- callbacks[i].call(contexts[i]);
68
- }
69
- callbacks.length = 0;
70
- contexts.length = 0;
71
- }
72
- },
73
-
74
- checkpoint: function () {
75
- return this._callbacks ? this._callbacks.length : 0;
76
- },
77
-
78
- rollback: function (len) {
79
- if (this._callbacks) {
80
- this._callbacks.length = len;
81
- this._contexts.length = len;
82
- }
83
- },
84
-
85
- /**
86
- * Resets the internal queue.
87
- *
88
- * @internal
89
- */
90
- reset: function () {
91
- this._callbacks = null;
92
- this._contexts = null;
93
- },
94
-
95
- /**
96
- * `PooledClass` looks for this.
97
- */
98
- destructor: function () {
99
- this.reset();
100
- }
101
-
102
- });
103
-
104
- PooledClass.addPoolingTo(CallbackQueue);
105
-
106
- module.exports = CallbackQueue;