react 16.3.0-alpha.2 → 16.3.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.
package/cjs/react.development.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/** @license React v16.3.
|
|
1
|
+
/** @license React v16.3.1
|
|
2
2
|
* react.development.js
|
|
3
3
|
*
|
|
4
4
|
* Copyright (c) 2013-present, Facebook, Inc.
|
|
@@ -24,7 +24,7 @@ var checkPropTypes = require('prop-types/checkPropTypes');
|
|
|
24
24
|
|
|
25
25
|
// TODO: this is special because it gets imported during build.
|
|
26
26
|
|
|
27
|
-
var ReactVersion = '16.3.
|
|
27
|
+
var ReactVersion = '16.3.1';
|
|
28
28
|
|
|
29
29
|
// The Symbol used to tag the ReactElement-like types. If there is no native Symbol
|
|
30
30
|
// nor polyfill, then a plain number is used for performance.
|
|
@@ -125,7 +125,7 @@ function warnNoop(publicInstance, callerName) {
|
|
|
125
125
|
if (didWarnStateUpdateForUnmountedComponent[warningKey]) {
|
|
126
126
|
return;
|
|
127
127
|
}
|
|
128
|
-
warning(false, '%s
|
|
128
|
+
warning(false, "Can't call %s on a component that is not yet mounted. " + 'This is a no-op, but it might indicate a bug in your application. ' + 'Instead, assign to `this.state` directly or define a `state = {};` ' + 'class property with the desired state in the %s component.', callerName, componentName);
|
|
129
129
|
didWarnStateUpdateForUnmountedComponent[warningKey] = true;
|
|
130
130
|
}
|
|
131
131
|
}
|
|
@@ -991,7 +991,7 @@ function createContext(defaultValue, calculateChangedBits) {
|
|
|
991
991
|
|
|
992
992
|
context.Provider = {
|
|
993
993
|
$$typeof: REACT_PROVIDER_TYPE,
|
|
994
|
-
|
|
994
|
+
_context: context
|
|
995
995
|
};
|
|
996
996
|
context.Consumer = context;
|
|
997
997
|
|
|
@@ -1017,6 +1017,12 @@ var describeComponentFrame = function (name, source, ownerName) {
|
|
|
1017
1017
|
return '\n in ' + (name || 'Unknown') + (source ? ' (at ' + source.fileName.replace(/^.*[\\\/]/, '') + ':' + source.lineNumber + ')' : ownerName ? ' (created by ' + ownerName + ')' : '');
|
|
1018
1018
|
};
|
|
1019
1019
|
|
|
1020
|
+
function isValidElementType(type) {
|
|
1021
|
+
return typeof type === 'string' || typeof type === 'function' ||
|
|
1022
|
+
// Note: its typeof might be other than 'symbol' or 'number' if it's a polyfill.
|
|
1023
|
+
type === REACT_FRAGMENT_TYPE || type === REACT_ASYNC_MODE_TYPE || type === REACT_STRICT_MODE_TYPE || typeof type === 'object' && type !== null && (type.$$typeof === REACT_PROVIDER_TYPE || type.$$typeof === REACT_CONTEXT_TYPE || type.$$typeof === REACT_FORWARD_REF_TYPE);
|
|
1024
|
+
}
|
|
1025
|
+
|
|
1020
1026
|
function getComponentName(fiber) {
|
|
1021
1027
|
var type = fiber.type;
|
|
1022
1028
|
|
|
@@ -1052,8 +1058,6 @@ var propTypesMisspellWarningShown = void 0;
|
|
|
1052
1058
|
var getDisplayName = function () {};
|
|
1053
1059
|
var getStackAddendum = function () {};
|
|
1054
1060
|
|
|
1055
|
-
var VALID_FRAGMENT_PROPS = void 0;
|
|
1056
|
-
|
|
1057
1061
|
{
|
|
1058
1062
|
currentlyValidatingElement = null;
|
|
1059
1063
|
|
|
@@ -1083,8 +1087,6 @@ var VALID_FRAGMENT_PROPS = void 0;
|
|
|
1083
1087
|
stack += ReactDebugCurrentFrame.getStackAddendum() || '';
|
|
1084
1088
|
return stack;
|
|
1085
1089
|
};
|
|
1086
|
-
|
|
1087
|
-
VALID_FRAGMENT_PROPS = new Map([['children', true], ['key', true]]);
|
|
1088
1090
|
}
|
|
1089
1091
|
|
|
1090
1092
|
function getDeclarationErrorAddendum() {
|
|
@@ -1244,7 +1246,7 @@ function validateFragmentProps(fragment) {
|
|
|
1244
1246
|
var keys = Object.keys(fragment.props);
|
|
1245
1247
|
for (var i = 0; i < keys.length; i++) {
|
|
1246
1248
|
var key = keys[i];
|
|
1247
|
-
if (
|
|
1249
|
+
if (key !== 'children' && key !== 'key') {
|
|
1248
1250
|
warning(false, 'Invalid prop `%s` supplied to `React.Fragment`. ' + 'React.Fragment can only have `key` and `children` props.%s', key, getStackAddendum());
|
|
1249
1251
|
break;
|
|
1250
1252
|
}
|
|
@@ -1258,9 +1260,7 @@ function validateFragmentProps(fragment) {
|
|
|
1258
1260
|
}
|
|
1259
1261
|
|
|
1260
1262
|
function createElementWithValidation(type, props, children) {
|
|
1261
|
-
var validType =
|
|
1262
|
-
// Note: its typeof might be other than 'symbol' or 'number' if it's a polyfill.
|
|
1263
|
-
type === REACT_FRAGMENT_TYPE || type === REACT_ASYNC_MODE_TYPE || type === REACT_STRICT_MODE_TYPE || typeof type === 'object' && type !== null && (type.$$typeof === REACT_PROVIDER_TYPE || type.$$typeof === REACT_CONTEXT_TYPE || type.$$typeof === REACT_FORWARD_REF_TYPE);
|
|
1263
|
+
var validType = isValidElementType(type);
|
|
1264
1264
|
|
|
1265
1265
|
// We warn in this case but don't throw. We expect the element creation to
|
|
1266
1266
|
// succeed and there will likely be errors in render.
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/** @license React v16.3.
|
|
1
|
+
/** @license React v16.3.1
|
|
2
2
|
* react.production.min.js
|
|
3
3
|
*
|
|
4
4
|
* Copyright (c) 2013-present, Facebook, Inc.
|
|
@@ -17,6 +17,6 @@ function Q(a,b,e,c){var d=typeof a;if("undefined"===d||"boolean"===d)a=null;var
|
|
|
17
17
|
h=0;!(d=a.next()).done;)d=d.value,f=b+R(d,h++),g+=Q(d,f,e,c);else"object"===d&&(e=""+a,B("31","[object Object]"===e?"object with keys {"+Object.keys(a).join(", ")+"}":e,""));return g}function R(a,b){return"object"===typeof a&&null!==a&&null!=a.key?escape(a.key):b.toString(36)}function S(a,b){a.func.call(a.context,b,a.count++)}
|
|
18
18
|
function T(a,b,e){var c=a.result,d=a.keyPrefix;a=a.func.call(a.context,b,a.count++);Array.isArray(a)?U(a,c,e,p.thatReturnsArgument):null!=a&&(L(a)&&(b=d+(!a.key||b&&b.key===a.key?"":(""+a.key).replace(M,"$\x26/")+"/")+e,a={$$typeof:r,type:a.type,key:b,ref:a.ref,props:a.props,_owner:a._owner}),c.push(a))}function U(a,b,e,c,d){var g="";null!=e&&(g=(""+e).replace(M,"$\x26/")+"/");b=O(b,g,c,d);null==a||Q(a,"",T,b);P(b)}
|
|
19
19
|
var V={Children:{map:function(a,b,e){if(null==a)return a;var c=[];U(a,c,null,b,e);return c},forEach:function(a,b,e){if(null==a)return a;b=O(null,null,b,e);null==a||Q(a,"",S,b);P(b)},count:function(a){return null==a?0:Q(a,"",p.thatReturnsNull,null)},toArray:function(a){var b=[];U(a,b,null,p.thatReturnsArgument);return b},only:function(a){L(a)?void 0:B("143");return a}},createRef:function(){return{current:null}},Component:D,PureComponent:F,createContext:function(a,b){void 0===b&&(b=null);a={$$typeof:x,
|
|
20
|
-
_calculateChangedBits:b,_defaultValue:a,_currentValue:a,_changedBits:0,Provider:null,Consumer:null};a.Provider={$$typeof:w,
|
|
21
|
-
c)&&!J.hasOwnProperty(c)&&(d[c]=void 0===b[c]&&void 0!==k?k[c]:b[c])}c=arguments.length-2;if(1===c)d.children=e;else if(1<c){k=Array(c);for(var l=0;l<c;l++)k[l]=arguments[l+2];d.children=k}return{$$typeof:r,type:a.type,key:g,ref:h,props:d,_owner:f}},createFactory:function(a){var b=K.bind(null,a);b.type=a;return b},isValidElement:L,version:"16.3.
|
|
20
|
+
_calculateChangedBits:b,_defaultValue:a,_currentValue:a,_changedBits:0,Provider:null,Consumer:null};a.Provider={$$typeof:w,_context:a};return a.Consumer=a},forwardRef:function(a){return{$$typeof:z,render:a}},Fragment:u,StrictMode:v,unstable_AsyncMode:y,createElement:K,cloneElement:function(a,b,e){var c=void 0,d=m({},a.props),g=a.key,h=a.ref,f=a._owner;if(null!=b){void 0!==b.ref&&(h=b.ref,f=H.current);void 0!==b.key&&(g=""+b.key);var k=void 0;a.type&&a.type.defaultProps&&(k=a.type.defaultProps);for(c in b)I.call(b,
|
|
21
|
+
c)&&!J.hasOwnProperty(c)&&(d[c]=void 0===b[c]&&void 0!==k?k[c]:b[c])}c=arguments.length-2;if(1===c)d.children=e;else if(1<c){k=Array(c);for(var l=0;l<c;l++)k[l]=arguments[l+2];d.children=k}return{$$typeof:r,type:a.type,key:g,ref:h,props:d,_owner:f}},createFactory:function(a){var b=K.bind(null,a);b.type=a;return b},isValidElement:L,version:"16.3.1",__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:{ReactCurrentOwner:H,assign:m}},W=Object.freeze({default:V}),X=W&&V||W;
|
|
22
22
|
module.exports=X["default"]?X["default"]:X;
|
package/package.json
CHANGED
package/umd/react.development.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/** @license React v16.3.
|
|
1
|
+
/** @license React v16.3.1
|
|
2
2
|
* react.development.js
|
|
3
3
|
*
|
|
4
4
|
* Copyright (c) 2013-present, Facebook, Inc.
|
|
@@ -108,7 +108,7 @@ var objectAssign = shouldUseNative() ? Object.assign : function (target, source)
|
|
|
108
108
|
|
|
109
109
|
// TODO: this is special because it gets imported during build.
|
|
110
110
|
|
|
111
|
-
var ReactVersion = '16.3.
|
|
111
|
+
var ReactVersion = '16.3.1';
|
|
112
112
|
|
|
113
113
|
// The Symbol used to tag the ReactElement-like types. If there is no native Symbol
|
|
114
114
|
// nor polyfill, then a plain number is used for performance.
|
|
@@ -379,7 +379,7 @@ function warnNoop(publicInstance, callerName) {
|
|
|
379
379
|
if (didWarnStateUpdateForUnmountedComponent[warningKey]) {
|
|
380
380
|
return;
|
|
381
381
|
}
|
|
382
|
-
warning_1(false, '%s
|
|
382
|
+
warning_1(false, "Can't call %s on a component that is not yet mounted. " + 'This is a no-op, but it might indicate a bug in your application. ' + 'Instead, assign to `this.state` directly or define a `state = {};` ' + 'class property with the desired state in the %s component.', callerName, componentName);
|
|
383
383
|
didWarnStateUpdateForUnmountedComponent[warningKey] = true;
|
|
384
384
|
}
|
|
385
385
|
}
|
|
@@ -1245,7 +1245,7 @@ function createContext(defaultValue, calculateChangedBits) {
|
|
|
1245
1245
|
|
|
1246
1246
|
context.Provider = {
|
|
1247
1247
|
$$typeof: REACT_PROVIDER_TYPE,
|
|
1248
|
-
|
|
1248
|
+
_context: context
|
|
1249
1249
|
};
|
|
1250
1250
|
context.Consumer = context;
|
|
1251
1251
|
|
|
@@ -1271,6 +1271,12 @@ var describeComponentFrame = function (name, source, ownerName) {
|
|
|
1271
1271
|
return '\n in ' + (name || 'Unknown') + (source ? ' (at ' + source.fileName.replace(/^.*[\\\/]/, '') + ':' + source.lineNumber + ')' : ownerName ? ' (created by ' + ownerName + ')' : '');
|
|
1272
1272
|
};
|
|
1273
1273
|
|
|
1274
|
+
function isValidElementType(type) {
|
|
1275
|
+
return typeof type === 'string' || typeof type === 'function' ||
|
|
1276
|
+
// Note: its typeof might be other than 'symbol' or 'number' if it's a polyfill.
|
|
1277
|
+
type === REACT_FRAGMENT_TYPE || type === REACT_ASYNC_MODE_TYPE || type === REACT_STRICT_MODE_TYPE || typeof type === 'object' && type !== null && (type.$$typeof === REACT_PROVIDER_TYPE || type.$$typeof === REACT_CONTEXT_TYPE || type.$$typeof === REACT_FORWARD_REF_TYPE);
|
|
1278
|
+
}
|
|
1279
|
+
|
|
1274
1280
|
function getComponentName(fiber) {
|
|
1275
1281
|
var type = fiber.type;
|
|
1276
1282
|
|
|
@@ -1379,8 +1385,6 @@ var propTypesMisspellWarningShown = void 0;
|
|
|
1379
1385
|
var getDisplayName = function () {};
|
|
1380
1386
|
var getStackAddendum = function () {};
|
|
1381
1387
|
|
|
1382
|
-
var VALID_FRAGMENT_PROPS = void 0;
|
|
1383
|
-
|
|
1384
1388
|
{
|
|
1385
1389
|
currentlyValidatingElement = null;
|
|
1386
1390
|
|
|
@@ -1410,8 +1414,6 @@ var VALID_FRAGMENT_PROPS = void 0;
|
|
|
1410
1414
|
stack += ReactDebugCurrentFrame.getStackAddendum() || '';
|
|
1411
1415
|
return stack;
|
|
1412
1416
|
};
|
|
1413
|
-
|
|
1414
|
-
VALID_FRAGMENT_PROPS = new Map([['children', true], ['key', true]]);
|
|
1415
1417
|
}
|
|
1416
1418
|
|
|
1417
1419
|
function getDeclarationErrorAddendum() {
|
|
@@ -1571,7 +1573,7 @@ function validateFragmentProps(fragment) {
|
|
|
1571
1573
|
var keys = Object.keys(fragment.props);
|
|
1572
1574
|
for (var i = 0; i < keys.length; i++) {
|
|
1573
1575
|
var key = keys[i];
|
|
1574
|
-
if (
|
|
1576
|
+
if (key !== 'children' && key !== 'key') {
|
|
1575
1577
|
warning_1(false, 'Invalid prop `%s` supplied to `React.Fragment`. ' + 'React.Fragment can only have `key` and `children` props.%s', key, getStackAddendum());
|
|
1576
1578
|
break;
|
|
1577
1579
|
}
|
|
@@ -1585,9 +1587,7 @@ function validateFragmentProps(fragment) {
|
|
|
1585
1587
|
}
|
|
1586
1588
|
|
|
1587
1589
|
function createElementWithValidation(type, props, children) {
|
|
1588
|
-
var validType =
|
|
1589
|
-
// Note: its typeof might be other than 'symbol' or 'number' if it's a polyfill.
|
|
1590
|
-
type === REACT_FRAGMENT_TYPE || type === REACT_ASYNC_MODE_TYPE || type === REACT_STRICT_MODE_TYPE || typeof type === 'object' && type !== null && (type.$$typeof === REACT_PROVIDER_TYPE || type.$$typeof === REACT_CONTEXT_TYPE || type.$$typeof === REACT_FORWARD_REF_TYPE);
|
|
1590
|
+
var validType = isValidElementType(type);
|
|
1591
1591
|
|
|
1592
1592
|
// We warn in this case but don't throw. We expect the element creation to
|
|
1593
1593
|
// succeed and there will likely be errors in render.
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/** @license React v16.3.
|
|
1
|
+
/** @license React v16.3.1
|
|
2
2
|
* react.production.min.js
|
|
3
3
|
*
|
|
4
4
|
* Copyright (c) 2013-present, Facebook, Inc.
|
|
@@ -17,5 +17,5 @@ var e=Object(a);for(var c,f=1;f<arguments.length;f++){var d=Object(arguments[f])
|
|
|
17
17
|
W=d?Symbol["for"]("react.async_mode"):60111,X=d?Symbol["for"]("react.forward_ref"):60112,L="function"===typeof Symbol&&Symbol.iterator,D={};d=function(){};d.thatReturns=h;d.thatReturnsFalse=h(!1);d.thatReturnsTrue=h(!0);d.thatReturnsNull=h(null);d.thatReturnsThis=function(){return this};d.thatReturnsArgument=function(a){return a};var A=d,E={isMounted:function(a){return!1},enqueueForceUpdate:function(a,b,e){},enqueueReplaceState:function(a,b,e,c){},enqueueSetState:function(a,b,e,c){}};p.prototype.isReactComponent=
|
|
18
18
|
{};p.prototype.setState=function(a,b){"object"!==typeof a&&"function"!==typeof a&&null!=a?q("85"):void 0;this.updater.enqueueSetState(this,a,b,"setState")};p.prototype.forceUpdate=function(a){this.updater.enqueueForceUpdate(this,a,"forceUpdate")};F.prototype=p.prototype;d=v.prototype=new F;d.constructor=v;B(d,p.prototype);d.isPureReactComponent=!0;var w={current:null},H=Object.prototype.hasOwnProperty,I={key:!0,ref:!0,__self:!0,__source:!0},M=/\/+/g,u=[];n={Children:{map:function(a,b,e){if(null==
|
|
19
19
|
a)return a;var c=[];z(a,c,null,b,e);return c},forEach:function(a,b,e){if(null==a)return a;b=J(null,null,b,e);null==a||t(a,"",Q,b);K(b)},count:function(a,b){return null==a?0:t(a,"",A.thatReturnsNull,null)},toArray:function(a){var b=[];z(a,b,null,A.thatReturnsArgument);return b},only:function(a){x(a)?void 0:q("143");return a}},createRef:function(){return{current:null}},Component:p,PureComponent:v,createContext:function(a,b){void 0===b&&(b=null);a={$$typeof:V,_calculateChangedBits:b,_defaultValue:a,
|
|
20
|
-
_currentValue:a,_changedBits:0,Provider:null,Consumer:null};a.Provider={$$typeof:U,
|
|
21
|
-
(d[c]=void 0===b[c]&&void 0!==l?l[c]:b[c])}c=arguments.length-2;if(1===c)d.children=e;else if(1<c){l=Array(c);for(var m=0;m<c;m++)l[m]=arguments[m+2];d.children=l}return{$$typeof:r,type:a.type,key:k,ref:h,props:d,_owner:g}},createFactory:function(a){var b=G.bind(null,a);b.type=a;return b},isValidElement:x,version:"16.3.
|
|
20
|
+
_currentValue:a,_changedBits:0,Provider:null,Consumer:null};a.Provider={$$typeof:U,_context:a};return a.Consumer=a},forwardRef:function(a){return{$$typeof:X,render:a}},Fragment:n,StrictMode:C,unstable_AsyncMode:W,createElement:G,cloneElement:function(a,b,e){var c=void 0,d=B({},a.props),k=a.key,h=a.ref,g=a._owner;if(null!=b){void 0!==b.ref&&(h=b.ref,g=w.current);void 0!==b.key&&(k=""+b.key);var l=void 0;a.type&&a.type.defaultProps&&(l=a.type.defaultProps);for(c in b)H.call(b,c)&&!I.hasOwnProperty(c)&&
|
|
21
|
+
(d[c]=void 0===b[c]&&void 0!==l?l[c]:b[c])}c=arguments.length-2;if(1===c)d.children=e;else if(1<c){l=Array(c);for(var m=0;m<c;m++)l[m]=arguments[m+2];d.children=l}return{$$typeof:r,type:a.type,key:k,ref:h,props:d,_owner:g}},createFactory:function(a){var b=G.bind(null,a);b.type=a;return b},isValidElement:x,version:"16.3.1",__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:{ReactCurrentOwner:w,assign:B}};n=(C=Object.freeze({default:n}))&&n||C;return n["default"]?n["default"]:n});
|