react 0.13.0-beta.1 → 0.13.0-beta.2
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 +637 -263
- package/dist/react-with-addons.js +1397 -1027
- package/dist/react-with-addons.min.js +6 -6
- package/dist/react.js +1322 -961
- 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 +1 -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 +4 -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 +25 -23
- package/lib/ReactComponent.js +33 -18
- package/lib/ReactComponentBrowserEnvironment.js +1 -1
- package/lib/ReactComponentEnvironment.js +1 -1
- package/lib/ReactComponentWithPureRenderMixin.js +1 -1
- package/lib/ReactCompositeComponent.js +73 -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 +1 -1
- package/lib/ReactDefaultPerfAnalysis.js +1 -1
- package/lib/ReactElement.js +1 -1
- package/lib/ReactElementValidator.js +22 -45
- 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 +172 -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 +28 -6
- 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 +3 -3
- package/lib/ReactPutListenerQueue.js +1 -1
- package/lib/ReactReconcileTransaction.js +1 -1
- package/lib/ReactReconciler.js +15 -1
- package/lib/ReactRef.js +1 -2
- 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 +1 -1
- 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 +1 -1
- 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 +1 -1
- 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 +1 -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 +1 -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 +5 -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 +6 -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
|
@@ -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
|
|
@@ -19,7 +19,7 @@ var invariant = require("./invariant");
|
|
|
19
19
|
var component;
|
|
20
20
|
// This registry keeps track of the React IDs of the components that rendered to
|
|
21
21
|
// `null` (in reality a placeholder such as `noscript`)
|
|
22
|
-
var
|
|
22
|
+
var nullComponentIDsRegistry = {};
|
|
23
23
|
|
|
24
24
|
var ReactEmptyComponentInjection = {
|
|
25
25
|
injectEmptyComponent: function(emptyComponent) {
|
|
@@ -63,7 +63,7 @@ var emptyElement = ReactElement.createElement(ReactEmptyComponentType);
|
|
|
63
63
|
* @param {string} id Component's `_rootNodeID`.
|
|
64
64
|
*/
|
|
65
65
|
function registerNullComponentID(id) {
|
|
66
|
-
|
|
66
|
+
nullComponentIDsRegistry[id] = true;
|
|
67
67
|
}
|
|
68
68
|
|
|
69
69
|
/**
|
|
@@ -71,7 +71,7 @@ function registerNullComponentID(id) {
|
|
|
71
71
|
* @param {string} id Component's `_rootNodeID`.
|
|
72
72
|
*/
|
|
73
73
|
function deregisterNullComponentID(id) {
|
|
74
|
-
delete
|
|
74
|
+
delete nullComponentIDsRegistry[id];
|
|
75
75
|
}
|
|
76
76
|
|
|
77
77
|
/**
|
|
@@ -79,7 +79,7 @@ function deregisterNullComponentID(id) {
|
|
|
79
79
|
* @return {boolean} True if the component is rendered to null.
|
|
80
80
|
*/
|
|
81
81
|
function isNullComponentID(id) {
|
|
82
|
-
return !!
|
|
82
|
+
return !!nullComponentIDsRegistry[id];
|
|
83
83
|
}
|
|
84
84
|
|
|
85
85
|
var ReactEmptyComponent = {
|
package/lib/ReactErrorUtils.js
CHANGED
|
@@ -0,0 +1,172 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright 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 ReactFragment
|
|
10
|
+
*/
|
|
11
|
+
|
|
12
|
+
'use strict';
|
|
13
|
+
|
|
14
|
+
var ReactElement = require("./ReactElement");
|
|
15
|
+
|
|
16
|
+
var warning = require("./warning");
|
|
17
|
+
|
|
18
|
+
/**
|
|
19
|
+
* We used to allow keyed objects to serve as a collection of ReactElements,
|
|
20
|
+
* or nested sets. This allowed us a way to explicitly key a set a fragment of
|
|
21
|
+
* components. This is now being replaced with an opaque data structure.
|
|
22
|
+
* The upgrade path is to call React.addons.createFragment({ key: value }) to
|
|
23
|
+
* create a keyed fragment. The resulting data structure is opaque, for now.
|
|
24
|
+
*/
|
|
25
|
+
|
|
26
|
+
if ("production" !== process.env.NODE_ENV) {
|
|
27
|
+
var fragmentKey = '_reactFragment';
|
|
28
|
+
var didWarnKey = '_reactDidWarn';
|
|
29
|
+
var canWarnForReactFragment = false;
|
|
30
|
+
|
|
31
|
+
try {
|
|
32
|
+
// Feature test. Don't even try to issue this warning if we can't use
|
|
33
|
+
// enumerable: false.
|
|
34
|
+
|
|
35
|
+
var dummy = function() {
|
|
36
|
+
return 1;
|
|
37
|
+
};
|
|
38
|
+
|
|
39
|
+
Object.defineProperty(
|
|
40
|
+
{},
|
|
41
|
+
fragmentKey,
|
|
42
|
+
{ enumerable: false, value: true }
|
|
43
|
+
);
|
|
44
|
+
|
|
45
|
+
Object.defineProperty(
|
|
46
|
+
{},
|
|
47
|
+
'key',
|
|
48
|
+
{ enumerable: true, get: dummy }
|
|
49
|
+
);
|
|
50
|
+
|
|
51
|
+
canWarnForReactFragment = true;
|
|
52
|
+
} catch (x) { }
|
|
53
|
+
|
|
54
|
+
var proxyPropertyAccessWithWarning = function(obj, key) {
|
|
55
|
+
Object.defineProperty(obj, key, {
|
|
56
|
+
enumerable: true,
|
|
57
|
+
get: function() {
|
|
58
|
+
("production" !== process.env.NODE_ENV ? warning(
|
|
59
|
+
this[didWarnKey],
|
|
60
|
+
'A ReactFragment is an opaque type. Accessing any of its ' +
|
|
61
|
+
'properties is deprecated. Pass it to one of the React.Children ' +
|
|
62
|
+
'helpers.'
|
|
63
|
+
) : null);
|
|
64
|
+
this[didWarnKey] = true;
|
|
65
|
+
return this[fragmentKey][key];
|
|
66
|
+
},
|
|
67
|
+
set: function(value) {
|
|
68
|
+
("production" !== process.env.NODE_ENV ? warning(
|
|
69
|
+
this[didWarnKey],
|
|
70
|
+
'A ReactFragment is an immutable opaque type. Mutating its ' +
|
|
71
|
+
'properties is deprecated.'
|
|
72
|
+
) : null);
|
|
73
|
+
this[didWarnKey] = true;
|
|
74
|
+
this[fragmentKey][key] = value;
|
|
75
|
+
}
|
|
76
|
+
});
|
|
77
|
+
};
|
|
78
|
+
|
|
79
|
+
var issuedWarnings = {};
|
|
80
|
+
|
|
81
|
+
var didWarnForFragment = function(fragment) {
|
|
82
|
+
// We use the keys and the type of the value as a heuristic to dedupe the
|
|
83
|
+
// warning to avoid spamming too much.
|
|
84
|
+
var fragmentCacheKey = '';
|
|
85
|
+
for (var key in fragment) {
|
|
86
|
+
fragmentCacheKey += key + ':' + (typeof fragment[key]) + ',';
|
|
87
|
+
}
|
|
88
|
+
var alreadyWarnedOnce = !!issuedWarnings[fragmentCacheKey];
|
|
89
|
+
issuedWarnings[fragmentCacheKey] = true;
|
|
90
|
+
return alreadyWarnedOnce;
|
|
91
|
+
};
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
var ReactFragment = {
|
|
95
|
+
// Wrap a keyed object in an opaque proxy that warns you if you access any
|
|
96
|
+
// of its properties.
|
|
97
|
+
create: function(object) {
|
|
98
|
+
if ("production" !== process.env.NODE_ENV) {
|
|
99
|
+
if (typeof object !== 'object' || !object) {
|
|
100
|
+
("production" !== process.env.NODE_ENV ? warning(
|
|
101
|
+
false,
|
|
102
|
+
'React.addons.createFragment only accepts a single object. Not %s',
|
|
103
|
+
object
|
|
104
|
+
) : null);
|
|
105
|
+
return object;
|
|
106
|
+
}
|
|
107
|
+
if (canWarnForReactFragment) {
|
|
108
|
+
var proxy = {};
|
|
109
|
+
Object.defineProperty(proxy, fragmentKey, {
|
|
110
|
+
enumerable: false,
|
|
111
|
+
value: object
|
|
112
|
+
});
|
|
113
|
+
Object.defineProperty(proxy, didWarnKey, {
|
|
114
|
+
writable: true,
|
|
115
|
+
enumerable: false,
|
|
116
|
+
value: false
|
|
117
|
+
});
|
|
118
|
+
for (var key in object) {
|
|
119
|
+
proxyPropertyAccessWithWarning(proxy, key);
|
|
120
|
+
}
|
|
121
|
+
Object.preventExtensions(proxy);
|
|
122
|
+
return proxy;
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
return object;
|
|
126
|
+
},
|
|
127
|
+
// Extract the original keyed object from the fragment opaque type. Warn if
|
|
128
|
+
// a plain object is passed here.
|
|
129
|
+
extract: function(fragment) {
|
|
130
|
+
if ("production" !== process.env.NODE_ENV) {
|
|
131
|
+
if (canWarnForReactFragment) {
|
|
132
|
+
if (!fragment[fragmentKey]) {
|
|
133
|
+
("production" !== process.env.NODE_ENV ? warning(
|
|
134
|
+
didWarnForFragment(fragment),
|
|
135
|
+
'Any use of a keyed object should be wrapped in ' +
|
|
136
|
+
'React.addons.createFragment(object) before passed as a child.'
|
|
137
|
+
) : null);
|
|
138
|
+
return fragment;
|
|
139
|
+
}
|
|
140
|
+
return fragment[fragmentKey];
|
|
141
|
+
}
|
|
142
|
+
}
|
|
143
|
+
return fragment;
|
|
144
|
+
},
|
|
145
|
+
// Check if this is a fragment and if so, extract the keyed object. If it
|
|
146
|
+
// is a fragment-like object, warn that it should be wrapped. Ignore if we
|
|
147
|
+
// can't determine what kind of object this is.
|
|
148
|
+
extractIfFragment: function(fragment) {
|
|
149
|
+
if ("production" !== process.env.NODE_ENV) {
|
|
150
|
+
if (canWarnForReactFragment) {
|
|
151
|
+
// If it is the opaque type, return the keyed object.
|
|
152
|
+
if (fragment[fragmentKey]) {
|
|
153
|
+
return fragment[fragmentKey];
|
|
154
|
+
}
|
|
155
|
+
// Otherwise, check each property if it has an element, if it does
|
|
156
|
+
// it is probably meant as a fragment, so we can warn early. Defer,
|
|
157
|
+
// the warning to extract.
|
|
158
|
+
for (var key in fragment) {
|
|
159
|
+
if (fragment.hasOwnProperty(key) &&
|
|
160
|
+
ReactElement.isValidElement(fragment[key])) {
|
|
161
|
+
// This looks like a fragment object, we should provide an
|
|
162
|
+
// early warning.
|
|
163
|
+
return ReactFragment.extract(fragment);
|
|
164
|
+
}
|
|
165
|
+
}
|
|
166
|
+
}
|
|
167
|
+
}
|
|
168
|
+
return fragment;
|
|
169
|
+
}
|
|
170
|
+
};
|
|
171
|
+
|
|
172
|
+
module.exports = ReactFragment;
|
package/lib/ReactInjection.js
CHANGED
package/lib/ReactInstanceMap.js
CHANGED
package/lib/ReactLifeCycle.js
CHANGED
package/lib/ReactLink.js
CHANGED
package/lib/ReactMount.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
|
|
@@ -469,6 +469,25 @@ var ReactMount = {
|
|
|
469
469
|
var containerHasReactMarkup =
|
|
470
470
|
reactRootElement && ReactMount.isRenderedByReact(reactRootElement);
|
|
471
471
|
|
|
472
|
+
if ("production" !== process.env.NODE_ENV) {
|
|
473
|
+
if (!containerHasReactMarkup || reactRootElement.nextSibling) {
|
|
474
|
+
var rootElementSibling = reactRootElement;
|
|
475
|
+
while (rootElementSibling) {
|
|
476
|
+
if (ReactMount.isRenderedByReact(rootElementSibling)) {
|
|
477
|
+
("production" !== process.env.NODE_ENV ? warning(
|
|
478
|
+
false,
|
|
479
|
+
'render(): Target node has markup rendered by React, but there ' +
|
|
480
|
+
'are unrelated nodes as well. This is most commonly caused by ' +
|
|
481
|
+
'white-space inserted around server-rendered markup.'
|
|
482
|
+
) : null);
|
|
483
|
+
break;
|
|
484
|
+
}
|
|
485
|
+
|
|
486
|
+
rootElementSibling = rootElementSibling.nextSibling;
|
|
487
|
+
}
|
|
488
|
+
}
|
|
489
|
+
}
|
|
490
|
+
|
|
472
491
|
var shouldReuseMarkup = containerHasReactMarkup && !prevComponent;
|
|
473
492
|
|
|
474
493
|
var component = ReactMount._renderNewRootComponent(
|
|
@@ -634,10 +653,11 @@ var ReactMount = {
|
|
|
634
653
|
// warning is when the container is empty.
|
|
635
654
|
rootElementsByReactRootID[reactRootID] = containerChild;
|
|
636
655
|
} else {
|
|
637
|
-
|
|
656
|
+
("production" !== process.env.NODE_ENV ? warning(
|
|
657
|
+
false,
|
|
638
658
|
'ReactMount: Root element has been removed from its original ' +
|
|
639
659
|
'container. New container:', rootElement.parentNode
|
|
640
|
-
);
|
|
660
|
+
) : null);
|
|
641
661
|
}
|
|
642
662
|
}
|
|
643
663
|
}
|
|
@@ -815,7 +835,8 @@ var ReactMount = {
|
|
|
815
835
|
) : invariant(container.nodeType !== DOC_NODE_TYPE));
|
|
816
836
|
|
|
817
837
|
if ("production" !== process.env.NODE_ENV) {
|
|
818
|
-
|
|
838
|
+
("production" !== process.env.NODE_ENV ? warning(
|
|
839
|
+
false,
|
|
819
840
|
'React attempted to reuse markup in a container but the ' +
|
|
820
841
|
'checksum was invalid. This generally means that you are ' +
|
|
821
842
|
'using server rendering and the markup generated on the ' +
|
|
@@ -823,8 +844,9 @@ var ReactMount = {
|
|
|
823
844
|
'new markup to compensate which works but you have lost many ' +
|
|
824
845
|
'of the benefits of server rendering. Instead, figure out ' +
|
|
825
846
|
'why the markup being generated is different on the client ' +
|
|
826
|
-
'or server:\n'
|
|
827
|
-
|
|
847
|
+
'or server:\n%s',
|
|
848
|
+
difference
|
|
849
|
+
) : null);
|
|
828
850
|
}
|
|
829
851
|
}
|
|
830
852
|
}
|
package/lib/ReactMultiChild.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
|
|
@@ -11,12 +11,10 @@
|
|
|
11
11
|
|
|
12
12
|
'use strict';
|
|
13
13
|
|
|
14
|
-
var ReactClass = require("./ReactClass");
|
|
15
|
-
var ReactElement = require("./ReactElement");
|
|
16
|
-
|
|
17
14
|
var assign = require("./Object.assign");
|
|
18
15
|
var invariant = require("./invariant");
|
|
19
16
|
|
|
17
|
+
var autoGenerateWrapperClass = null;
|
|
20
18
|
var genericComponentClass = null;
|
|
21
19
|
// This registry keeps track of wrapper classes around native tags
|
|
22
20
|
var tagToComponentClass = {};
|
|
@@ -37,25 +35,14 @@ var ReactNativeComponentInjection = {
|
|
|
37
35
|
// tag. That particular tag will use this class instead of the generic one.
|
|
38
36
|
injectComponentClasses: function(componentClasses) {
|
|
39
37
|
assign(tagToComponentClass, componentClasses);
|
|
38
|
+
},
|
|
39
|
+
// Temporary hack since we expect DOM refs to behave like composites,
|
|
40
|
+
// for this release.
|
|
41
|
+
injectAutoWrapper: function(wrapperFactory) {
|
|
42
|
+
autoGenerateWrapperClass = wrapperFactory;
|
|
40
43
|
}
|
|
41
44
|
};
|
|
42
45
|
|
|
43
|
-
function autoGenerateWrapperClass(type) {
|
|
44
|
-
return ReactClass.createClass({
|
|
45
|
-
tagName: type.toUpperCase(),
|
|
46
|
-
render: function() {
|
|
47
|
-
return new ReactElement(
|
|
48
|
-
type,
|
|
49
|
-
null,
|
|
50
|
-
null,
|
|
51
|
-
null,
|
|
52
|
-
null,
|
|
53
|
-
this.props
|
|
54
|
-
);
|
|
55
|
-
}
|
|
56
|
-
});
|
|
57
|
-
}
|
|
58
|
-
|
|
59
46
|
/**
|
|
60
47
|
* Get a composite component wrapper class for a specific tag.
|
|
61
48
|
*
|
package/lib/ReactOwner.js
CHANGED
package/lib/ReactPerf.js
CHANGED