1
1
/**
2
- * React v0.13.1
2
+ * React v0.13.3
3
3
*/
4
4
(function(f){if(typeof exports==="object"&&typeof module!=="undefined"){module.exports=f()}else if(typeof define==="function"&&define.amd){define([],f)}else{var g;if(typeof window!=="undefined"){g=window}else if(typeof global!=="undefined"){g=global}else if(typeof self!=="undefined"){g=self}else{g=this}g.React = f()}})(function(){var define,module,exports;return (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(_dereq_,module,exports){
5
5
/**
@@ -112,7 +112,7 @@ if ("production" !== "development") {
112
112
if (typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ === 'undefined') {
113
113
console.debug(
114
114
'Download the React DevTools for a better development experience: ' +
115
- 'http ://fb.me/react-devtools'
115
+ 'https ://fb.me/react-devtools'
116
116
);
117
117
}
118
118
}
@@ -139,15 +139,15 @@ if ("production" !== "development") {
139
139
if (!expectedFeatures[i]) {
140
140
console.error(
141
141
'One or more ES5 shim/shams expected by React are not available: ' +
142
- 'http ://fb.me/react-warning-polyfills'
142
+ 'https ://fb.me/react-warning-polyfills'
143
143
);
144
144
break;
145
145
}
146
146
}
147
147
}
148
148
}
149
149
150
- React.version = '0.13.1 ';
150
+ React.version = '0.13.3 ';
151
151
152
152
module.exports = React;
153
153
@@ -696,7 +696,9 @@ var isUnitlessNumber = {
696
696
columnCount: true,
697
697
flex: true,
698
698
flexGrow: true,
699
+ flexPositive: true,
699
700
flexShrink: true,
701
+ flexNegative: true,
700
702
fontWeight: true,
701
703
lineClamp: true,
702
704
lineHeight: true,
@@ -709,7 +711,9 @@ var isUnitlessNumber = {
709
711
710
712
// SVG-related properties
711
713
fillOpacity: true,
712
- strokeOpacity: true
714
+ strokeDashoffset: true,
715
+ strokeOpacity: true,
716
+ strokeWidth: true
713
717
};
714
718
715
719
/**
@@ -3774,6 +3778,7 @@ var HTMLDOMPropertyConfig = {
3774
3778
headers: null,
3775
3779
height: MUST_USE_ATTRIBUTE,
3776
3780
hidden: MUST_USE_ATTRIBUTE | HAS_BOOLEAN_VALUE,
3781
+ high: null,
3777
3782
href: null,
3778
3783
hrefLang: null,
3779
3784
htmlFor: null,
@@ -3784,6 +3789,7 @@ var HTMLDOMPropertyConfig = {
3784
3789
lang: null,
3785
3790
list: MUST_USE_ATTRIBUTE,
3786
3791
loop: MUST_USE_PROPERTY | HAS_BOOLEAN_VALUE,
3792
+ low: null,
3787
3793
manifest: MUST_USE_ATTRIBUTE,
3788
3794
marginHeight: null,
3789
3795
marginWidth: null,
@@ -3798,6 +3804,7 @@ var HTMLDOMPropertyConfig = {
3798
3804
name: null,
3799
3805
noValidate: HAS_BOOLEAN_VALUE,
3800
3806
open: HAS_BOOLEAN_VALUE,
3807
+ optimum: null,
3801
3808
pattern: null,
3802
3809
placeholder: null,
3803
3810
poster: null,
@@ -3811,6 +3818,7 @@ var HTMLDOMPropertyConfig = {
3811
3818
rowSpan: null,
3812
3819
sandbox: null,
3813
3820
scope: null,
3821
+ scoped: HAS_BOOLEAN_VALUE,
3814
3822
scrolling: null,
3815
3823
seamless: MUST_USE_ATTRIBUTE | HAS_BOOLEAN_VALUE,
3816
3824
selected: MUST_USE_PROPERTY | HAS_BOOLEAN_VALUE,
@@ -3852,7 +3860,9 @@ var HTMLDOMPropertyConfig = {
3852
3860
itemID: MUST_USE_ATTRIBUTE,
3853
3861
itemRef: MUST_USE_ATTRIBUTE,
3854
3862
// property is supported for OpenGraph in meta tags.
3855
- property: null
3863
+ property: null,
3864
+ // IE-only attribute that controls focus behavior
3865
+ unselectable: MUST_USE_ATTRIBUTE
3856
3866
},
3857
3867
DOMAttributeNames: {
3858
3868
acceptCharset: 'accept-charset',
@@ -5808,7 +5818,7 @@ var ReactClass = {
5808
5818
("production" !== "development" ? warning(
5809
5819
this instanceof Constructor,
5810
5820
'Something is calling a React component directly. Use a factory or ' +
5811
- 'JSX instead. See: http ://fb.me/react-legacyfactory'
5821
+ 'JSX instead. See: https ://fb.me/react-legacyfactory'
5812
5822
) : null);
5813
5823
}
5814
5824
@@ -6018,20 +6028,38 @@ ReactComponent.prototype.forceUpdate = function(callback) {
6018
6028
*/
6019
6029
if ("production" !== "development") {
6020
6030
var deprecatedAPIs = {
6021
- getDOMNode: 'getDOMNode',
6022
- isMounted: 'isMounted',
6023
- replaceProps: 'replaceProps',
6024
- replaceState: 'replaceState',
6025
- setProps: 'setProps'
6031
+ getDOMNode: [
6032
+ 'getDOMNode',
6033
+ 'Use React.findDOMNode(component) instead.'
6034
+ ],
6035
+ isMounted: [
6036
+ 'isMounted',
6037
+ 'Instead, make sure to clean up subscriptions and pending requests in ' +
6038
+ 'componentWillUnmount to prevent memory leaks.'
6039
+ ],
6040
+ replaceProps: [
6041
+ 'replaceProps',
6042
+ 'Instead call React.render again at the top level.'
6043
+ ],
6044
+ replaceState: [
6045
+ 'replaceState',
6046
+ 'Refactor your code to use setState instead (see ' +
6047
+ 'https://github.com/facebook/react/issues/3236).'
6048
+ ],
6049
+ setProps: [
6050
+ 'setProps',
6051
+ 'Instead call React.render again at the top level.'
6052
+ ]
6026
6053
};
6027
- var defineDeprecationWarning = function(methodName, displayName ) {
6054
+ var defineDeprecationWarning = function(methodName, info ) {
6028
6055
try {
6029
6056
Object.defineProperty(ReactComponent.prototype, methodName, {
6030
6057
get: function() {
6031
6058
("production" !== "development" ? warning(
6032
6059
false,
6033
- '%s(...) is deprecated in plain JavaScript React classes.',
6034
- displayName
6060
+ '%s(...) is deprecated in plain JavaScript React classes. %s',
6061
+ info[0],
6062
+ info[1]
6035
6063
) : null);
6036
6064
return undefined;
6037
6065
}
@@ -6332,6 +6360,14 @@ var ReactCompositeComponentMixin = {
6332
6360
'Did you mean to define a state property instead?',
6333
6361
this.getName() || 'a component'
6334
6362
) : null);
6363
+ ("production" !== "development" ? warning(
6364
+ !inst.getDefaultProps ||
6365
+ inst.getDefaultProps.isReactClassApproved,
6366
+ 'getDefaultProps was defined on %s, a plain JavaScript class. ' +
6367
+ 'This is only supported for classes created using React.createClass. ' +
6368
+ 'Use a static property to define defaultProps instead.',
6369
+ this.getName() || 'a component'
6370
+ ) : null);
6335
6371
("production" !== "development" ? warning(
6336
6372
!inst.propTypes,
6337
6373
'propTypes was defined as an instance property on %s. Use a static ' +
@@ -6368,6 +6404,7 @@ var ReactCompositeComponentMixin = {
6368
6404
this._pendingReplaceState = false;
6369
6405
this._pendingForceUpdate = false;
6370
6406
6407
+ var childContext;
6371
6408
var renderedElement;
6372
6409
6373
6410
var previouslyMounting = ReactLifeCycle.currentlyMountingInstance;
@@ -6382,7 +6419,8 @@ var ReactCompositeComponentMixin = {
6382
6419
}
6383
6420
}
6384
6421
6385
- renderedElement = this._renderValidatedComponent();
6422
+ childContext = this._getValidatedChildContext(context);
6423
+ renderedElement = this._renderValidatedComponent(childContext);
6386
6424
} finally {
6387
6425
ReactLifeCycle.currentlyMountingInstance = previouslyMounting;
6388
6426
}
@@ -6396,7 +6434,7 @@ var ReactCompositeComponentMixin = {
6396
6434
this._renderedComponent,
6397
6435
rootID,
6398
6436
transaction,
6399
- this._processChildContext (context)
6437
+ this._mergeChildContext (context, childContext )
6400
6438
);
6401
6439
if (inst.componentDidMount) {
6402
6440
transaction.getReactMountReady().enqueue(inst.componentDidMount, inst);
@@ -6526,7 +6564,7 @@ var ReactCompositeComponentMixin = {
6526
6564
* @return {object}
6527
6565
* @private
6528
6566
*/
6529
- _processChildContext : function(currentContext) {
6567
+ _getValidatedChildContext : function(currentContext) {
6530
6568
var inst = this._instance;
6531
6569
var childContext = inst.getChildContext && inst.getChildContext();
6532
6570
if (childContext) {
@@ -6551,6 +6589,13 @@ var ReactCompositeComponentMixin = {
6551
6589
name
6552
6590
) : invariant(name in inst.constructor.childContextTypes));
6553
6591
}
6592
+ return childContext;
6593
+ }
6594
+ return null;
6595
+ },
6596
+
6597
+ _mergeChildContext: function(currentContext, childContext) {
6598
+ if (childContext) {
6554
6599
return assign({}, currentContext, childContext);
6555
6600
}
6556
6601
return currentContext;
@@ -6810,6 +6855,10 @@ var ReactCompositeComponentMixin = {
6810
6855
return inst.state;
6811
6856
}
6812
6857
6858
+ if (replace && queue.length === 1) {
6859
+ return queue[0];
6860
+ }
6861
+
6813
6862
var nextState = assign({}, replace ? queue[0] : inst.state);
6814
6863
for (var i = replace ? 1 : 0; i < queue.length; i++) {
6815
6864
var partial = queue[i];
@@ -6879,13 +6928,14 @@ var ReactCompositeComponentMixin = {
6879
6928
_updateRenderedComponent: function(transaction, context) {
6880
6929
var prevComponentInstance = this._renderedComponent;
6881
6930
var prevRenderedElement = prevComponentInstance._currentElement;
6882
- var nextRenderedElement = this._renderValidatedComponent();
6931
+ var childContext = this._getValidatedChildContext();
6932
+ var nextRenderedElement = this._renderValidatedComponent(childContext);
6883
6933
if (shouldUpdateReactComponent(prevRenderedElement, nextRenderedElement)) {
6884
6934
ReactReconciler.receiveComponent(
6885
6935
prevComponentInstance,
6886
6936
nextRenderedElement,
6887
6937
transaction,
6888
- this._processChildContext (context)
6938
+ this._mergeChildContext (context, childContext )
6889
6939
);
6890
6940
} else {
6891
6941
// These two IDs are actually the same! But nothing should rely on that.
@@ -6901,7 +6951,7 @@ var ReactCompositeComponentMixin = {
6901
6951
this._renderedComponent,
6902
6952
thisID,
6903
6953
transaction,
6904
- context
6954
+ this._mergeChildContext( context, childContext)
6905
6955
);
6906
6956
this._replaceNodeWithMarkupByID(prevComponentID, nextMarkup);
6907
6957
}
@@ -6939,11 +6989,12 @@ var ReactCompositeComponentMixin = {
6939
6989
/**
6940
6990
* @private
6941
6991
*/
6942
- _renderValidatedComponent: function() {
6992
+ _renderValidatedComponent: function(childContext ) {
6943
6993
var renderedComponent;
6944
6994
var previousContext = ReactContext.current;
6945
- ReactContext.current = this._processChildContext(
6946
- this._currentElement._context
6995
+ ReactContext.current = this._mergeChildContext(
6996
+ this._currentElement._context,
6997
+ childContext
6947
6998
);
6948
6999
ReactCurrentOwner.current = this;
6949
7000
try {
@@ -7308,6 +7359,7 @@ var ReactDOM = mapObject({
7308
7359
7309
7360
// SVG
7310
7361
circle: 'circle',
7362
+ clipPath: 'clipPath',
7311
7363
defs: 'defs',
7312
7364
ellipse: 'ellipse',
7313
7365
g: 'g',
@@ -7457,11 +7509,13 @@ function assertValidProps(props) {
7457
7509
'Can only set one of `children` or `props.dangerouslySetInnerHTML`.'
7458
7510
) : invariant(props.children == null));
7459
7511
("production" !== "development" ? invariant(
7460
- props.dangerouslySetInnerHTML.__html != null,
7512
+ typeof props.dangerouslySetInnerHTML === 'object' &&
7513
+ '__html' in props.dangerouslySetInnerHTML,
7461
7514
'`props.dangerouslySetInnerHTML` must be in the form `{__html: ...}`. ' +
7462
- 'Please visit http ://fb.me/react-invariant-dangerously-set-inner-html ' +
7515
+ 'Please visit https ://fb.me/react-invariant-dangerously-set-inner-html ' +
7463
7516
'for more information.'
7464
- ) : invariant(props.dangerouslySetInnerHTML.__html != null));
7517
+ ) : invariant(typeof props.dangerouslySetInnerHTML === 'object' &&
7518
+ '__html' in props.dangerouslySetInnerHTML));
7465
7519
}
7466
7520
if ("production" !== "development") {
7467
7521
("production" !== "development" ? warning(
@@ -7769,6 +7823,8 @@ ReactDOMComponent.Mixin = {
7769
7823
if (propKey === STYLE) {
7770
7824
if (nextProp) {
7771
7825
nextProp = this._previousStyleCopy = assign({}, nextProp);
7826
+ } else {
7827
+ this._previousStyleCopy = null;
7772
7828
}
7773
7829
if (lastProp) {
7774
7830
// Unset styles on `lastProp` but not on `nextProp`.
@@ -10251,7 +10307,7 @@ function warnAndMonitorForKeyUse(message, element, parentType) {
10251
10307
10252
10308
("production" !== "development" ? warning(
10253
10309
false,
10254
- message + '%s%s See http ://fb.me/react-warning-keys for more information.',
10310
+ message + '%s%s See https ://fb.me/react-warning-keys for more information.',
10255
10311
parentOrOwnerAddendum,
10256
10312
childOwnerAddendum
10257
10313
) : null);
@@ -10375,9 +10431,9 @@ function warnForPropsMutation(propName, element) {
10375
10431
10376
10432
("production" !== "development" ? warning(
10377
10433
false,
10378
- 'Don\'t set .props.%s of the React component%s. ' +
10379
- 'Instead, specify the correct value when ' +
10380
- 'initially creating the element.%s',
10434
+ 'Don\'t set .props.%s of the React component%s. Instead, specify the ' +
10435
+ 'correct value when initially creating the element or use ' +
10436
+ 'React.cloneElement to make a new element with updated props .%s',
10381
10437
propName,
10382
10438
elementInfo,
10383
10439
ownerInfo
@@ -15047,6 +15103,7 @@ var MUST_USE_ATTRIBUTE = DOMProperty.injection.MUST_USE_ATTRIBUTE;
15047
15103
15048
15104
var SVGDOMPropertyConfig = {
15049
15105
Properties: {
15106
+ clipPath: MUST_USE_ATTRIBUTE,
15050
15107
cx: MUST_USE_ATTRIBUTE,
15051
15108
cy: MUST_USE_ATTRIBUTE,
15052
15109
d: MUST_USE_ATTRIBUTE,
@@ -15092,6 +15149,7 @@ var SVGDOMPropertyConfig = {
15092
15149
y: MUST_USE_ATTRIBUTE
15093
15150
},
15094
15151
DOMAttributeNames: {
15152
+ clipPath: 'clip-path',
15095
15153
fillOpacity: 'fill-opacity',
15096
15154
fontFamily: 'font-family',
15097
15155
fontSize: 'font-size',
@@ -17887,6 +17945,7 @@ var shouldWrap = {
17887
17945
// Force wrapping for SVG elements because if they get created inside a <div>,
17888
17946
// they will be initialized in the wrong namespace (and will not display).
17889
17947
'circle': true,
17948
+ 'clipPath': true,
17890
17949
'defs': true,
17891
17950
'ellipse': true,
17892
17951
'g': true,
@@ -17929,6 +17988,7 @@ var markupWrap = {
17929
17988
'th': trWrap,
17930
17989
17931
17990
'circle': svgWrap,
17991
+ 'clipPath': svgWrap,
17932
17992
'defs': svgWrap,
17933
17993
'ellipse': svgWrap,
17934
17994
'g': svgWrap,
@@ -18274,6 +18334,7 @@ assign(
18274
18334
function isInternalComponentType(type) {
18275
18335
return (
18276
18336
typeof type === 'function' &&
18337
+ typeof type.prototype !== 'undefined' &&
18277
18338
typeof type.prototype.mountComponent === 'function' &&
18278
18339
typeof type.prototype.receiveComponent === 'function'
18279
18340
);
@@ -19538,4 +19599,4 @@ if ("production" !== "development") {
19538
19599
module.exports = warning;
19539
19600
19540
19601
},{"114":114}]},{},[1])(1)
19541
- });
19602
+ });
0 commit comments