react 0.13.0-beta.1 → 0.13.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/JSXTransformer.js +1919 -1295
- package/dist/react-with-addons.js +1690 -1090
- package/dist/react-with-addons.min.js +7 -6
- package/dist/react.js +1574 -1010
- package/dist/react.min.js +6 -6
- package/lib/AutoFocusMixin.js +1 -1
- package/lib/BeforeInputEventPlugin.js +1 -5
- package/lib/CSSCore.js +1 -1
- package/lib/CSSProperty.js +3 -1
- package/lib/CSSPropertyOperations.js +1 -1
- package/lib/CallbackQueue.js +1 -1
- package/lib/ChangeEventPlugin.js +1 -1
- package/lib/ClientReactRootIndex.js +1 -1
- package/lib/DOMChildrenOperations.js +4 -43
- package/lib/DOMProperty.js +1 -1
- package/lib/DOMPropertyOperations.js +7 -14
- package/lib/Danger.js +1 -1
- package/lib/DefaultEventPluginOrder.js +2 -2
- package/lib/EnterLeaveEventPlugin.js +1 -1
- package/lib/EventConstants.js +1 -1
- package/lib/EventListener.js +1 -1
- package/lib/EventPluginHub.js +1 -1
- package/lib/EventPluginRegistry.js +1 -1
- package/lib/EventPluginUtils.js +3 -3
- package/lib/EventPropagators.js +1 -1
- package/lib/ExecutionEnvironment.js +1 -1
- package/lib/FallbackCompositionState.js +1 -1
- package/lib/HTMLDOMPropertyConfig.js +12 -5
- package/lib/LinkedStateMixin.js +1 -1
- package/lib/LinkedValueUtils.js +1 -1
- package/lib/LocalEventTrapMixin.js +1 -1
- package/lib/MobileSafariClickEventPlugin.js +1 -1
- package/lib/Object.assign.js +1 -1
- package/lib/PooledClass.js +1 -1
- package/lib/React.js +7 -9
- package/lib/ReactBrowserComponentMixin.js +1 -1
- package/lib/ReactBrowserEventEmitter.js +2 -2
- package/lib/ReactCSSTransitionGroup.js +1 -1
- package/lib/ReactCSSTransitionGroupChild.js +8 -5
- package/lib/ReactChildReconciler.js +1 -1
- package/lib/ReactChildren.js +3 -2
- package/lib/ReactClass.js +49 -23
- package/lib/ReactComponent.js +35 -19
- package/lib/ReactComponentBrowserEnvironment.js +1 -1
- package/lib/ReactComponentEnvironment.js +1 -1
- package/lib/ReactComponentWithPureRenderMixin.js +1 -1
- package/lib/ReactCompositeComponent.js +89 -40
- package/lib/ReactContext.js +13 -3
- package/lib/ReactCurrentOwner.js +1 -1
- package/lib/ReactDOM.js +1 -1
- package/lib/ReactDOMButton.js +1 -1
- package/lib/ReactDOMComponent.js +19 -19
- package/lib/ReactDOMForm.js +1 -1
- package/lib/ReactDOMIDOperations.js +3 -3
- package/lib/ReactDOMIframe.js +43 -0
- package/lib/ReactDOMImg.js +1 -1
- package/lib/ReactDOMInput.js +1 -1
- package/lib/ReactDOMOption.js +1 -1
- package/lib/ReactDOMSelect.js +1 -1
- package/lib/ReactDOMSelection.js +1 -1
- package/lib/ReactDOMTextComponent.js +3 -5
- package/lib/ReactDOMTextarea.js +1 -1
- package/lib/ReactDefaultBatchingStrategy.js +1 -1
- package/lib/ReactDefaultInjection.js +25 -1
- package/lib/ReactDefaultPerf.js +5 -10
- package/lib/ReactDefaultPerfAnalysis.js +1 -1
- package/lib/ReactElement.js +56 -2
- package/lib/ReactElementValidator.js +122 -79
- package/lib/ReactEmptyComponent.js +5 -5
- package/lib/ReactErrorUtils.js +1 -1
- package/lib/ReactEventEmitterMixin.js +1 -1
- package/lib/ReactEventListener.js +1 -1
- package/lib/ReactFragment.js +181 -0
- package/lib/ReactInjection.js +1 -1
- package/lib/ReactInputSelection.js +1 -1
- package/lib/ReactInstanceHandles.js +1 -1
- package/lib/ReactInstanceMap.js +1 -1
- package/lib/ReactLifeCycle.js +1 -1
- package/lib/ReactLink.js +1 -1
- package/lib/ReactMarkupChecksum.js +1 -1
- package/lib/ReactMount.js +32 -10
- package/lib/ReactMultiChild.js +1 -1
- package/lib/ReactMultiChildUpdateTypes.js +1 -1
- package/lib/ReactNativeComponent.js +7 -20
- package/lib/ReactOwner.js +1 -1
- package/lib/ReactPerf.js +1 -1
- package/lib/ReactPropTransferer.js +1 -1
- package/lib/ReactPropTypeLocationNames.js +1 -1
- package/lib/ReactPropTypeLocations.js +1 -1
- package/lib/ReactPropTypes.js +7 -4
- package/lib/ReactPutListenerQueue.js +1 -1
- package/lib/ReactReconcileTransaction.js +1 -1
- package/lib/ReactReconciler.js +15 -2
- package/lib/ReactRef.js +2 -3
- package/lib/ReactRootIndex.js +1 -1
- package/lib/ReactServerRendering.js +1 -1
- package/lib/ReactServerRenderingTransaction.js +1 -1
- package/lib/ReactStateSetters.js +1 -1
- package/lib/ReactTestUtils.js +19 -7
- package/lib/ReactTransitionChildMapping.js +7 -3
- package/lib/ReactTransitionEvents.js +1 -1
- package/lib/ReactTransitionGroup.js +5 -5
- package/lib/ReactUpdateQueue.js +63 -32
- package/lib/ReactUpdates.js +7 -2
- package/lib/ReactWithAddons.js +3 -1
- package/lib/SVGDOMPropertyConfig.js +1 -1
- package/lib/SelectEventPlugin.js +1 -1
- package/lib/ServerReactRootIndex.js +1 -1
- package/lib/SimpleEventPlugin.js +3 -3
- package/lib/SyntheticClipboardEvent.js +1 -1
- package/lib/SyntheticCompositionEvent.js +1 -1
- package/lib/SyntheticDragEvent.js +1 -1
- package/lib/SyntheticEvent.js +1 -1
- package/lib/SyntheticFocusEvent.js +1 -1
- package/lib/SyntheticInputEvent.js +1 -1
- package/lib/SyntheticKeyboardEvent.js +1 -1
- package/lib/SyntheticMouseEvent.js +1 -1
- package/lib/SyntheticTouchEvent.js +1 -1
- package/lib/SyntheticUIEvent.js +1 -1
- package/lib/SyntheticWheelEvent.js +1 -1
- package/lib/Transaction.js +2 -2
- package/lib/ViewportMetrics.js +1 -1
- package/lib/accumulateInto.js +1 -1
- package/lib/adler32.js +1 -1
- package/lib/camelize.js +1 -1
- package/lib/camelizeStyleName.js +1 -1
- package/lib/cloneWithProps.js +4 -4
- package/lib/containsNode.js +1 -1
- package/lib/{createArrayFrom.js → createArrayFromMixed.js} +6 -6
- package/lib/createFullPageComponent.js +1 -1
- package/lib/createNodesFromMarkup.js +4 -4
- package/lib/cx.js +16 -1
- package/lib/dangerousStyleValue.js +1 -1
- package/lib/emptyFunction.js +1 -1
- package/lib/emptyObject.js +1 -1
- package/lib/{escapeTextForBrowser.js → escapeTextContentForBrowser.js} +4 -5
- package/lib/findDOMNode.js +19 -1
- package/lib/flattenChildren.js +1 -1
- package/lib/focusNode.js +1 -1
- package/lib/forEachAccumulated.js +1 -1
- package/lib/getActiveElement.js +1 -1
- package/lib/getEventCharCode.js +1 -1
- package/lib/getEventKey.js +1 -1
- package/lib/getEventModifierState.js +1 -1
- package/lib/getEventTarget.js +1 -1
- package/lib/getIteratorFn.js +1 -1
- package/lib/getMarkupWrap.js +1 -1
- package/lib/getNodeForCharacterOffset.js +1 -1
- package/lib/getReactRootElementInContainer.js +1 -1
- package/lib/getTextContentAccessor.js +1 -1
- package/lib/getUnboundedScrollPosition.js +1 -1
- package/lib/hyphenate.js +1 -1
- package/lib/hyphenateStyleName.js +1 -1
- package/lib/instantiateReactComponent.js +6 -1
- package/lib/invariant.js +1 -1
- package/lib/isEventSupported.js +1 -1
- package/lib/isNode.js +1 -1
- package/lib/isTextInputElement.js +1 -1
- package/lib/isTextNode.js +1 -1
- package/lib/joinClasses.js +1 -1
- package/lib/keyMirror.js +1 -1
- package/lib/keyOf.js +1 -1
- package/lib/mapObject.js +1 -1
- package/lib/memoizeStringOnly.js +1 -1
- package/lib/onlyChild.js +1 -1
- package/lib/performance.js +1 -1
- package/lib/performanceNow.js +1 -1
- package/lib/quoteAttributeValueForBrowser.js +26 -0
- package/lib/setInnerHTML.js +1 -1
- package/lib/setTextContent.js +40 -0
- package/lib/shallowEqual.js +1 -1
- package/lib/shouldUpdateReactComponent.js +32 -10
- package/lib/toArray.js +2 -2
- package/lib/traverseAllChildren.js +18 -4
- package/lib/update.js +1 -1
- package/lib/warning.js +9 -2
- package/package.json +1 -1
- package/lib/copyProperties.js +0 -56
- package/lib/merge.js +0 -34
- package/lib/mergeInto.js +0 -24
- package/lib/monitorCodeUse.js +0 -30
package/lib/isTextNode.js
CHANGED
package/lib/joinClasses.js
CHANGED
package/lib/keyMirror.js
CHANGED
package/lib/keyOf.js
CHANGED
package/lib/mapObject.js
CHANGED
package/lib/memoizeStringOnly.js
CHANGED
package/lib/onlyChild.js
CHANGED
package/lib/performance.js
CHANGED
package/lib/performanceNow.js
CHANGED
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright 2013-2015, Facebook, Inc.
|
|
3
|
+
* All rights reserved.
|
|
4
|
+
*
|
|
5
|
+
* This source code is licensed under the BSD-style license found in the
|
|
6
|
+
* LICENSE file in the root directory of this source tree. An additional grant
|
|
7
|
+
* of patent rights can be found in the PATENTS file in the same directory.
|
|
8
|
+
*
|
|
9
|
+
* @providesModule quoteAttributeValueForBrowser
|
|
10
|
+
*/
|
|
11
|
+
|
|
12
|
+
'use strict';
|
|
13
|
+
|
|
14
|
+
var escapeTextContentForBrowser = require("./escapeTextContentForBrowser");
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* Escapes attribute value to prevent scripting attacks.
|
|
18
|
+
*
|
|
19
|
+
* @param {*} value Value to escape.
|
|
20
|
+
* @return {string} An escaped string.
|
|
21
|
+
*/
|
|
22
|
+
function quoteAttributeValueForBrowser(value) {
|
|
23
|
+
return '"' + escapeTextContentForBrowser(value) + '"';
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
module.exports = quoteAttributeValueForBrowser;
|
package/lib/setInnerHTML.js
CHANGED
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright 2013-2015, Facebook, Inc.
|
|
3
|
+
* All rights reserved.
|
|
4
|
+
*
|
|
5
|
+
* This source code is licensed under the BSD-style license found in the
|
|
6
|
+
* LICENSE file in the root directory of this source tree. An additional grant
|
|
7
|
+
* of patent rights can be found in the PATENTS file in the same directory.
|
|
8
|
+
*
|
|
9
|
+
* @providesModule setTextContent
|
|
10
|
+
*/
|
|
11
|
+
|
|
12
|
+
'use strict';
|
|
13
|
+
|
|
14
|
+
var ExecutionEnvironment = require("./ExecutionEnvironment");
|
|
15
|
+
var escapeTextContentForBrowser = require("./escapeTextContentForBrowser");
|
|
16
|
+
var setInnerHTML = require("./setInnerHTML");
|
|
17
|
+
|
|
18
|
+
/**
|
|
19
|
+
* Set the textContent property of a node, ensuring that whitespace is preserved
|
|
20
|
+
* even in IE8. innerText is a poor substitute for textContent and, among many
|
|
21
|
+
* issues, inserts <br> instead of the literal newline chars. innerHTML behaves
|
|
22
|
+
* as it should.
|
|
23
|
+
*
|
|
24
|
+
* @param {DOMElement} node
|
|
25
|
+
* @param {string} text
|
|
26
|
+
* @internal
|
|
27
|
+
*/
|
|
28
|
+
var setTextContent = function(node, text) {
|
|
29
|
+
node.textContent = text;
|
|
30
|
+
};
|
|
31
|
+
|
|
32
|
+
if (ExecutionEnvironment.canUseDOM) {
|
|
33
|
+
if (!('textContent' in document.documentElement)) {
|
|
34
|
+
setTextContent = function(node, text) {
|
|
35
|
+
setInnerHTML(node, escapeTextContentForBrowser(text));
|
|
36
|
+
};
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
module.exports = setTextContent;
|
package/lib/shallowEqual.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Copyright 2013-
|
|
2
|
+
* Copyright 2013-2015, Facebook, Inc.
|
|
3
3
|
* All rights reserved.
|
|
4
4
|
*
|
|
5
5
|
* This source code is licensed under the BSD-style license found in the
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
|
|
13
13
|
'use strict';
|
|
14
14
|
|
|
15
|
-
var
|
|
15
|
+
var warning = require("./warning");
|
|
16
16
|
|
|
17
17
|
/**
|
|
18
18
|
* Given a `prevElement` and `nextElement`, determines if the existing
|
|
@@ -57,15 +57,37 @@ function shouldUpdateReactComponent(prevElement, nextElement) {
|
|
|
57
57
|
nextElement.type.displayName != null) {
|
|
58
58
|
nextDisplayName = nextElement.type.displayName;
|
|
59
59
|
}
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
60
|
+
if (nextElement.type != null && typeof nextElement.type === 'string') {
|
|
61
|
+
nextDisplayName = nextElement.type;
|
|
62
|
+
}
|
|
63
|
+
if (typeof nextElement.type !== 'string' ||
|
|
64
|
+
nextElement.type === 'input' ||
|
|
65
|
+
nextElement.type === 'textarea') {
|
|
66
|
+
if ((prevElement._owner != null &&
|
|
67
|
+
prevElement._owner._isOwnerNecessary === false) ||
|
|
68
|
+
(nextElement._owner != null &&
|
|
69
|
+
nextElement._owner._isOwnerNecessary === false)) {
|
|
70
|
+
if (prevElement._owner != null) {
|
|
71
|
+
prevElement._owner._isOwnerNecessary = true;
|
|
72
|
+
}
|
|
73
|
+
if (nextElement._owner != null) {
|
|
74
|
+
nextElement._owner._isOwnerNecessary = true;
|
|
75
|
+
}
|
|
76
|
+
("production" !== process.env.NODE_ENV ? warning(
|
|
77
|
+
false,
|
|
78
|
+
'<%s /> is being rendered by both %s and %s using the same ' +
|
|
79
|
+
'key (%s) in the same place. Currently, this means that ' +
|
|
80
|
+
'they don\'t preserve state. This behavior should be very ' +
|
|
81
|
+
'rare so we\'re considering deprecating it. Please contact ' +
|
|
82
|
+
'the React team and explain your use case so that we can ' +
|
|
83
|
+
'take that into consideration.',
|
|
84
|
+
nextDisplayName || 'Unknown Component',
|
|
85
|
+
prevName || '[Unknown]',
|
|
86
|
+
nextName || '[Unknown]',
|
|
87
|
+
prevElement.key
|
|
88
|
+
) : null);
|
|
67
89
|
}
|
|
68
|
-
|
|
90
|
+
}
|
|
69
91
|
}
|
|
70
92
|
}
|
|
71
93
|
return ownersMatch;
|
package/lib/toArray.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Copyright 2014, Facebook, Inc.
|
|
2
|
+
* Copyright 2014-2015, Facebook, Inc.
|
|
3
3
|
* All rights reserved.
|
|
4
4
|
*
|
|
5
5
|
* This source code is licensed under the BSD-style license found in the
|
|
@@ -16,7 +16,7 @@ var invariant = require("./invariant");
|
|
|
16
16
|
* Convert array-like objects to arrays.
|
|
17
17
|
*
|
|
18
18
|
* This API assumes the caller knows the contents of the data type. For less
|
|
19
|
-
* well defined inputs use
|
|
19
|
+
* well defined inputs use createArrayFromMixed.
|
|
20
20
|
*
|
|
21
21
|
* @param {object|function|filelist} obj
|
|
22
22
|
* @return {array}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Copyright 2013-
|
|
2
|
+
* Copyright 2013-2015, Facebook, Inc.
|
|
3
3
|
* All rights reserved.
|
|
4
4
|
*
|
|
5
5
|
* This source code is licensed under the BSD-style license found in the
|
|
@@ -12,10 +12,12 @@
|
|
|
12
12
|
'use strict';
|
|
13
13
|
|
|
14
14
|
var ReactElement = require("./ReactElement");
|
|
15
|
+
var ReactFragment = require("./ReactFragment");
|
|
15
16
|
var ReactInstanceHandles = require("./ReactInstanceHandles");
|
|
16
17
|
|
|
17
18
|
var getIteratorFn = require("./getIteratorFn");
|
|
18
19
|
var invariant = require("./invariant");
|
|
20
|
+
var warning = require("./warning");
|
|
19
21
|
|
|
20
22
|
var SEPARATOR = ReactInstanceHandles.SEPARATOR;
|
|
21
23
|
var SUBSEPARATOR = ':';
|
|
@@ -33,6 +35,8 @@ var userProvidedKeyEscaperLookup = {
|
|
|
33
35
|
|
|
34
36
|
var userProvidedKeyEscapeRegex = /[=.:]/g;
|
|
35
37
|
|
|
38
|
+
var didWarnAboutMaps = false;
|
|
39
|
+
|
|
36
40
|
function userProvidedKeyEscaper(match) {
|
|
37
41
|
return userProvidedKeyEscaperLookup[match];
|
|
38
42
|
}
|
|
@@ -157,6 +161,15 @@ function traverseAllChildrenImpl(
|
|
|
157
161
|
);
|
|
158
162
|
}
|
|
159
163
|
} else {
|
|
164
|
+
if ("production" !== process.env.NODE_ENV) {
|
|
165
|
+
("production" !== process.env.NODE_ENV ? warning(
|
|
166
|
+
didWarnAboutMaps,
|
|
167
|
+
'Using Maps as children is not yet fully supported. It is an ' +
|
|
168
|
+
'experimental feature that might be removed. Convert it to a ' +
|
|
169
|
+
'sequence / iterable of keyed ReactElements instead.'
|
|
170
|
+
) : null);
|
|
171
|
+
didWarnAboutMaps = true;
|
|
172
|
+
}
|
|
160
173
|
// Iterator will provide entry [k,v] tuples rather than values.
|
|
161
174
|
while (!(step = iterator.next()).done) {
|
|
162
175
|
var entry = step.value;
|
|
@@ -184,9 +197,10 @@ function traverseAllChildrenImpl(
|
|
|
184
197
|
'traverseAllChildren(...): Encountered an invalid child; DOM ' +
|
|
185
198
|
'elements are not valid children of React components.'
|
|
186
199
|
) : invariant(children.nodeType !== 1));
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
200
|
+
var fragment = ReactFragment.extract(children);
|
|
201
|
+
for (var key in fragment) {
|
|
202
|
+
if (fragment.hasOwnProperty(key)) {
|
|
203
|
+
child = fragment[key];
|
|
190
204
|
nextName = (
|
|
191
205
|
(nameSoFar !== '' ? nameSoFar + SUBSEPARATOR : SEPARATOR) +
|
|
192
206
|
wrapUserProvidedKey(key) + SUBSEPARATOR +
|
package/lib/update.js
CHANGED
package/lib/warning.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Copyright 2014, Facebook, Inc.
|
|
2
|
+
* Copyright 2014-2015, Facebook, Inc.
|
|
3
3
|
* All rights reserved.
|
|
4
4
|
*
|
|
5
5
|
* This source code is licensed under the BSD-style license found in the
|
|
@@ -31,7 +31,14 @@ if ("production" !== process.env.NODE_ENV) {
|
|
|
31
31
|
);
|
|
32
32
|
}
|
|
33
33
|
|
|
34
|
-
if (format.
|
|
34
|
+
if (format.length < 10 || /^[s\W]*$/.test(format)) {
|
|
35
|
+
throw new Error(
|
|
36
|
+
'The warning format should be able to uniquely identify this ' +
|
|
37
|
+
'warning. Please, use a more descriptive format than: ' + format
|
|
38
|
+
);
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
if (format.indexOf('Failed Composite propType: ') === 0) {
|
|
35
42
|
return; // Ignore CompositeComponent proptype check.
|
|
36
43
|
}
|
|
37
44
|
|
package/package.json
CHANGED
package/lib/copyProperties.js
DELETED
|
@@ -1,56 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Copyright 2013-2014, 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 copyProperties
|
|
10
|
-
*/
|
|
11
|
-
|
|
12
|
-
"use strict";
|
|
13
|
-
|
|
14
|
-
/**
|
|
15
|
-
* Copy properties from one or more objects (up to 5) into the first object.
|
|
16
|
-
* This is a shallow copy. It mutates the first object and also returns it.
|
|
17
|
-
*
|
|
18
|
-
* NOTE: `arguments` has a very significant performance penalty, which is why
|
|
19
|
-
* we don't support unlimited arguments.
|
|
20
|
-
*/
|
|
21
|
-
function copyProperties(obj, a, b, c, d, e, f) {
|
|
22
|
-
obj = obj || {};
|
|
23
|
-
|
|
24
|
-
if ("production" !== process.env.NODE_ENV) {
|
|
25
|
-
if (f) {
|
|
26
|
-
throw new Error('Too many arguments passed to copyProperties');
|
|
27
|
-
}
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
var args = [a, b, c, d, e];
|
|
31
|
-
var ii = 0, v;
|
|
32
|
-
while (args[ii]) {
|
|
33
|
-
v = args[ii++];
|
|
34
|
-
for (var k in v) {
|
|
35
|
-
obj[k] = v[k];
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
// IE ignores toString in object iteration.. See:
|
|
39
|
-
// webreflection.blogspot.com/2007/07/quick-fix-internet-explorer-and.html
|
|
40
|
-
if (v.hasOwnProperty && v.hasOwnProperty('toString') &&
|
|
41
|
-
(typeof v.toString != 'undefined') && (obj.toString !== v.toString)) {
|
|
42
|
-
obj.toString = v.toString;
|
|
43
|
-
}
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
return obj;
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
module.exports = copyProperties;
|
|
50
|
-
|
|
51
|
-
// deprecation notice
|
|
52
|
-
console.warn(
|
|
53
|
-
'react/lib/copyProperties has been deprecated and will be removed in the ' +
|
|
54
|
-
'next version of React. All uses can be replaced with ' +
|
|
55
|
-
'Object.assign(obj, a, b, ...) or _.extend(obj, a, b, ...).'
|
|
56
|
-
);
|
package/lib/merge.js
DELETED
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Copyright 2013-2014, 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 merge
|
|
10
|
-
*/
|
|
11
|
-
|
|
12
|
-
"use strict";
|
|
13
|
-
|
|
14
|
-
var assign = require("./Object.assign");
|
|
15
|
-
|
|
16
|
-
/**
|
|
17
|
-
* Shallow merges two structures into a return value, without mutating either.
|
|
18
|
-
*
|
|
19
|
-
* @param {?object} one Optional object with properties to merge from.
|
|
20
|
-
* @param {?object} two Optional object with properties to merge from.
|
|
21
|
-
* @return {object} The shallow extension of one by two.
|
|
22
|
-
*/
|
|
23
|
-
var merge = function(one, two) {
|
|
24
|
-
return assign({}, one, two);
|
|
25
|
-
};
|
|
26
|
-
|
|
27
|
-
module.exports = merge;
|
|
28
|
-
|
|
29
|
-
// deprecation notice
|
|
30
|
-
console.warn(
|
|
31
|
-
'react/lib/merge has been deprecated and will be removed in the ' +
|
|
32
|
-
'next version of React. All uses can be replaced with ' +
|
|
33
|
-
'Object.assign({}, a, b) or _.extend({}, a, b).'
|
|
34
|
-
);
|
package/lib/mergeInto.js
DELETED
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Copyright 2013-2014, 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 mergeInto
|
|
10
|
-
* @typechecks static-only
|
|
11
|
-
*/
|
|
12
|
-
|
|
13
|
-
"use strict";
|
|
14
|
-
|
|
15
|
-
var assign = require("./Object.assign");
|
|
16
|
-
|
|
17
|
-
module.exports = assign;
|
|
18
|
-
|
|
19
|
-
// deprecation notice
|
|
20
|
-
console.warn(
|
|
21
|
-
'react/lib/mergeInto has been deprecated and will be removed in the ' +
|
|
22
|
-
'next version of React. All uses can be replaced with ' +
|
|
23
|
-
'Object.assign(a, b, c, ...) or _.extend(a, b, c, ...).'
|
|
24
|
-
);
|