react 16.1.1 → 16.2.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/cjs/react.development.js +65 -51
- package/cjs/react.production.min.js +14 -15
- package/package.json +1 -1
- package/umd/react.development.js +104 -92
- package/umd/react.production.min.js +14 -14
package/cjs/react.development.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/** @license React v16.
|
|
1
|
+
/** @license React v16.2.0
|
|
2
2
|
* react.development.js
|
|
3
3
|
*
|
|
4
4
|
* Copyright (c) 2013-present, Facebook, Inc.
|
|
@@ -9,20 +9,46 @@
|
|
|
9
9
|
|
|
10
10
|
'use strict';
|
|
11
11
|
|
|
12
|
+
|
|
13
|
+
|
|
12
14
|
if (process.env.NODE_ENV !== "production") {
|
|
13
15
|
(function() {
|
|
14
16
|
'use strict';
|
|
15
17
|
|
|
16
18
|
var _assign = require('object-assign');
|
|
17
|
-
var invariant = require('fbjs/lib/invariant');
|
|
18
19
|
var emptyObject = require('fbjs/lib/emptyObject');
|
|
20
|
+
var invariant = require('fbjs/lib/invariant');
|
|
19
21
|
var warning = require('fbjs/lib/warning');
|
|
20
22
|
var emptyFunction = require('fbjs/lib/emptyFunction');
|
|
21
23
|
var checkPropTypes = require('prop-types/checkPropTypes');
|
|
22
24
|
|
|
23
25
|
// TODO: this is special because it gets imported during build.
|
|
24
26
|
|
|
25
|
-
var ReactVersion = '16.
|
|
27
|
+
var ReactVersion = '16.2.0';
|
|
28
|
+
|
|
29
|
+
// The Symbol used to tag the ReactElement-like types. If there is no native Symbol
|
|
30
|
+
// nor polyfill, then a plain number is used for performance.
|
|
31
|
+
var hasSymbol = typeof Symbol === 'function' && Symbol['for'];
|
|
32
|
+
|
|
33
|
+
var REACT_ELEMENT_TYPE = hasSymbol ? Symbol['for']('react.element') : 0xeac7;
|
|
34
|
+
var REACT_CALL_TYPE = hasSymbol ? Symbol['for']('react.call') : 0xeac8;
|
|
35
|
+
var REACT_RETURN_TYPE = hasSymbol ? Symbol['for']('react.return') : 0xeac9;
|
|
36
|
+
var REACT_PORTAL_TYPE = hasSymbol ? Symbol['for']('react.portal') : 0xeaca;
|
|
37
|
+
var REACT_FRAGMENT_TYPE = hasSymbol ? Symbol['for']('react.fragment') : 0xeacb;
|
|
38
|
+
|
|
39
|
+
var MAYBE_ITERATOR_SYMBOL = typeof Symbol === 'function' && Symbol.iterator;
|
|
40
|
+
var FAUX_ITERATOR_SYMBOL = '@@iterator';
|
|
41
|
+
|
|
42
|
+
function getIteratorFn(maybeIterable) {
|
|
43
|
+
if (maybeIterable === null || typeof maybeIterable === 'undefined') {
|
|
44
|
+
return null;
|
|
45
|
+
}
|
|
46
|
+
var maybeIterator = MAYBE_ITERATOR_SYMBOL && maybeIterable[MAYBE_ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL];
|
|
47
|
+
if (typeof maybeIterator === 'function') {
|
|
48
|
+
return maybeIterator;
|
|
49
|
+
}
|
|
50
|
+
return null;
|
|
51
|
+
}
|
|
26
52
|
|
|
27
53
|
/**
|
|
28
54
|
* WARNING: DO NOT manually require this module.
|
|
@@ -31,21 +57,6 @@ var ReactVersion = '16.1.1';
|
|
|
31
57
|
* It always throws.
|
|
32
58
|
*/
|
|
33
59
|
|
|
34
|
-
// Exports React.Fragment
|
|
35
|
-
var enableReactFragment = false;
|
|
36
|
-
// Exports ReactDOM.createRoot
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
// Mutating mode (React DOM, React ART, React Native):
|
|
41
|
-
|
|
42
|
-
// Experimental noop mode (currently unused):
|
|
43
|
-
|
|
44
|
-
// Experimental persistent mode (CS):
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
// Only used in www builds.
|
|
48
|
-
|
|
49
60
|
/**
|
|
50
61
|
* Forked from fbjs/warning:
|
|
51
62
|
* https://github.com/facebook/fbjs/blob/e66ba20ad5be433eb54423f2b097d829324d9de6/packages/fbjs/src/__forks__/warning.js
|
|
@@ -325,10 +336,6 @@ var ReactCurrentOwner = {
|
|
|
325
336
|
|
|
326
337
|
var hasOwnProperty = Object.prototype.hasOwnProperty;
|
|
327
338
|
|
|
328
|
-
// The Symbol used to tag the ReactElement type. If there is no native Symbol
|
|
329
|
-
// nor polyfill, then a plain number is used for performance.
|
|
330
|
-
var REACT_ELEMENT_TYPE$1 = typeof Symbol === 'function' && Symbol['for'] && Symbol['for']('react.element') || 0xeac7;
|
|
331
|
-
|
|
332
339
|
var RESERVED_PROPS = {
|
|
333
340
|
key: true,
|
|
334
341
|
ref: true,
|
|
@@ -414,7 +421,7 @@ function defineRefPropWarningGetter(props, displayName) {
|
|
|
414
421
|
var ReactElement = function (type, key, ref, self, source, owner, props) {
|
|
415
422
|
var element = {
|
|
416
423
|
// This tag allow us to uniquely identify this as a React Element
|
|
417
|
-
$$typeof: REACT_ELEMENT_TYPE
|
|
424
|
+
$$typeof: REACT_ELEMENT_TYPE,
|
|
418
425
|
|
|
419
426
|
// Built-in properties that belong on the element
|
|
420
427
|
type: type,
|
|
@@ -529,7 +536,7 @@ function createElement(type, config, children) {
|
|
|
529
536
|
}
|
|
530
537
|
{
|
|
531
538
|
if (key || ref) {
|
|
532
|
-
if (typeof props.$$typeof === 'undefined' || props.$$typeof !== REACT_ELEMENT_TYPE
|
|
539
|
+
if (typeof props.$$typeof === 'undefined' || props.$$typeof !== REACT_ELEMENT_TYPE) {
|
|
533
540
|
var displayName = typeof type === 'function' ? type.displayName || type.name || 'Unknown' : type;
|
|
534
541
|
if (key) {
|
|
535
542
|
defineKeyPropWarningGetter(props, displayName);
|
|
@@ -629,7 +636,7 @@ function cloneElement(element, config, children) {
|
|
|
629
636
|
* @final
|
|
630
637
|
*/
|
|
631
638
|
function isValidElement(object) {
|
|
632
|
-
return typeof object === 'object' && object !== null && object.$$typeof === REACT_ELEMENT_TYPE
|
|
639
|
+
return typeof object === 'object' && object !== null && object.$$typeof === REACT_ELEMENT_TYPE;
|
|
633
640
|
}
|
|
634
641
|
|
|
635
642
|
var ReactDebugCurrentFrame = {};
|
|
@@ -647,12 +654,6 @@ var ReactDebugCurrentFrame = {};
|
|
|
647
654
|
};
|
|
648
655
|
}
|
|
649
656
|
|
|
650
|
-
var ITERATOR_SYMBOL = typeof Symbol === 'function' && Symbol.iterator;
|
|
651
|
-
var FAUX_ITERATOR_SYMBOL = '@@iterator'; // Before Symbol spec.
|
|
652
|
-
// The Symbol used to tag the ReactElement type. If there is no native Symbol
|
|
653
|
-
// nor polyfill, then a plain number is used for performance.
|
|
654
|
-
var REACT_ELEMENT_TYPE = typeof Symbol === 'function' && Symbol['for'] && Symbol['for']('react.element') || 0xeac7;
|
|
655
|
-
var REACT_PORTAL_TYPE = typeof Symbol === 'function' && Symbol['for'] && Symbol['for']('react.portal') || 0xeaca;
|
|
656
657
|
var SEPARATOR = '.';
|
|
657
658
|
var SUBSEPARATOR = ':';
|
|
658
659
|
|
|
@@ -736,10 +737,28 @@ function traverseAllChildrenImpl(children, nameSoFar, callback, traverseContext)
|
|
|
736
737
|
children = null;
|
|
737
738
|
}
|
|
738
739
|
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
|
|
740
|
+
var invokeCallback = false;
|
|
741
|
+
|
|
742
|
+
if (children === null) {
|
|
743
|
+
invokeCallback = true;
|
|
744
|
+
} else {
|
|
745
|
+
switch (type) {
|
|
746
|
+
case 'string':
|
|
747
|
+
case 'number':
|
|
748
|
+
invokeCallback = true;
|
|
749
|
+
break;
|
|
750
|
+
case 'object':
|
|
751
|
+
switch (children.$$typeof) {
|
|
752
|
+
case REACT_ELEMENT_TYPE:
|
|
753
|
+
case REACT_CALL_TYPE:
|
|
754
|
+
case REACT_RETURN_TYPE:
|
|
755
|
+
case REACT_PORTAL_TYPE:
|
|
756
|
+
invokeCallback = true;
|
|
757
|
+
}
|
|
758
|
+
}
|
|
759
|
+
}
|
|
760
|
+
|
|
761
|
+
if (invokeCallback) {
|
|
743
762
|
callback(traverseContext, children,
|
|
744
763
|
// If it's the only child, treat the name as if it was wrapped in an array
|
|
745
764
|
// so that it's consistent if the number of children grows.
|
|
@@ -759,7 +778,7 @@ function traverseAllChildrenImpl(children, nameSoFar, callback, traverseContext)
|
|
|
759
778
|
subtreeCount += traverseAllChildrenImpl(child, nextName, callback, traverseContext);
|
|
760
779
|
}
|
|
761
780
|
} else {
|
|
762
|
-
var iteratorFn =
|
|
781
|
+
var iteratorFn = getIteratorFn(children);
|
|
763
782
|
if (typeof iteratorFn === 'function') {
|
|
764
783
|
{
|
|
765
784
|
// Warn about using Maps as children
|
|
@@ -983,6 +1002,8 @@ function getComponentName(fiber) {
|
|
|
983
1002
|
{
|
|
984
1003
|
var currentlyValidatingElement = null;
|
|
985
1004
|
|
|
1005
|
+
var propTypesMisspellWarningShown = false;
|
|
1006
|
+
|
|
986
1007
|
var getDisplayName = function (element) {
|
|
987
1008
|
if (element == null) {
|
|
988
1009
|
return '#empty';
|
|
@@ -990,7 +1011,7 @@ function getComponentName(fiber) {
|
|
|
990
1011
|
return '#text';
|
|
991
1012
|
} else if (typeof element.type === 'string') {
|
|
992
1013
|
return element.type;
|
|
993
|
-
} else if (element.type === REACT_FRAGMENT_TYPE
|
|
1014
|
+
} else if (element.type === REACT_FRAGMENT_TYPE) {
|
|
994
1015
|
return 'React.Fragment';
|
|
995
1016
|
} else {
|
|
996
1017
|
return element.type.displayName || element.type.name || 'Unknown';
|
|
@@ -1008,14 +1029,9 @@ function getComponentName(fiber) {
|
|
|
1008
1029
|
return stack;
|
|
1009
1030
|
};
|
|
1010
1031
|
|
|
1011
|
-
var REACT_FRAGMENT_TYPE$1 = typeof Symbol === 'function' && Symbol['for'] && Symbol['for']('react.fragment') || 0xeacb;
|
|
1012
|
-
|
|
1013
1032
|
var VALID_FRAGMENT_PROPS = new Map([['children', true], ['key', true]]);
|
|
1014
1033
|
}
|
|
1015
1034
|
|
|
1016
|
-
var ITERATOR_SYMBOL$1 = typeof Symbol === 'function' && Symbol.iterator;
|
|
1017
|
-
var FAUX_ITERATOR_SYMBOL$1 = '@@iterator'; // Before Symbol spec.
|
|
1018
|
-
|
|
1019
1035
|
function getDeclarationErrorAddendum() {
|
|
1020
1036
|
if (ReactCurrentOwner.current) {
|
|
1021
1037
|
var name = getComponentName(ReactCurrentOwner.current);
|
|
@@ -1120,7 +1136,7 @@ function validateChildKeys(node, parentType) {
|
|
|
1120
1136
|
node._store.validated = true;
|
|
1121
1137
|
}
|
|
1122
1138
|
} else if (node) {
|
|
1123
|
-
var iteratorFn =
|
|
1139
|
+
var iteratorFn = getIteratorFn(node);
|
|
1124
1140
|
if (typeof iteratorFn === 'function') {
|
|
1125
1141
|
// Entry iterators used to provide implicit keys,
|
|
1126
1142
|
// but now we print a separate warning for them later.
|
|
@@ -1150,11 +1166,13 @@ function validatePropTypes(element) {
|
|
|
1150
1166
|
}
|
|
1151
1167
|
var name = componentClass.displayName || componentClass.name;
|
|
1152
1168
|
var propTypes = componentClass.propTypes;
|
|
1153
|
-
|
|
1154
1169
|
if (propTypes) {
|
|
1155
1170
|
currentlyValidatingElement = element;
|
|
1156
1171
|
checkPropTypes(propTypes, element.props, 'prop', name, getStackAddendum);
|
|
1157
1172
|
currentlyValidatingElement = null;
|
|
1173
|
+
} else if (componentClass.PropTypes !== undefined && !propTypesMisspellWarningShown) {
|
|
1174
|
+
propTypesMisspellWarningShown = true;
|
|
1175
|
+
warning(false, 'Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?', name || 'Unknown');
|
|
1158
1176
|
}
|
|
1159
1177
|
if (typeof componentClass.getDefaultProps === 'function') {
|
|
1160
1178
|
warning(componentClass.getDefaultProps.isReactClassApproved, 'getDefaultProps is only used on classic React.createClass ' + 'definitions. Use a static property named `defaultProps` instead.');
|
|
@@ -1244,7 +1262,7 @@ function createElementWithValidation(type, props, children) {
|
|
|
1244
1262
|
}
|
|
1245
1263
|
}
|
|
1246
1264
|
|
|
1247
|
-
if (typeof type === 'symbol' && type === REACT_FRAGMENT_TYPE
|
|
1265
|
+
if (typeof type === 'symbol' && type === REACT_FRAGMENT_TYPE) {
|
|
1248
1266
|
validateFragmentProps(element);
|
|
1249
1267
|
} else {
|
|
1250
1268
|
validatePropTypes(element);
|
|
@@ -1283,8 +1301,6 @@ function cloneElementWithValidation(element, props, children) {
|
|
|
1283
1301
|
return newElement;
|
|
1284
1302
|
}
|
|
1285
1303
|
|
|
1286
|
-
var REACT_FRAGMENT_TYPE = typeof Symbol === 'function' && Symbol['for'] && Symbol['for']('react.fragment') || 0xeacb;
|
|
1287
|
-
|
|
1288
1304
|
var React = {
|
|
1289
1305
|
Children: {
|
|
1290
1306
|
map: mapChildren,
|
|
@@ -1298,6 +1314,8 @@ var React = {
|
|
|
1298
1314
|
PureComponent: PureComponent,
|
|
1299
1315
|
unstable_AsyncComponent: AsyncComponent,
|
|
1300
1316
|
|
|
1317
|
+
Fragment: REACT_FRAGMENT_TYPE,
|
|
1318
|
+
|
|
1301
1319
|
createElement: createElementWithValidation,
|
|
1302
1320
|
cloneElement: cloneElementWithValidation,
|
|
1303
1321
|
createFactory: createFactoryWithValidation,
|
|
@@ -1312,10 +1330,6 @@ var React = {
|
|
|
1312
1330
|
}
|
|
1313
1331
|
};
|
|
1314
1332
|
|
|
1315
|
-
if (enableReactFragment) {
|
|
1316
|
-
React.Fragment = REACT_FRAGMENT_TYPE;
|
|
1317
|
-
}
|
|
1318
|
-
|
|
1319
1333
|
{
|
|
1320
1334
|
_assign(React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED, {
|
|
1321
1335
|
// These should not be included in production.
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/** @license React v16.
|
|
1
|
+
/** @license React v16.2.0
|
|
2
2
|
* react.production.min.js
|
|
3
3
|
*
|
|
4
4
|
* Copyright (c) 2013-present, Facebook, Inc.
|
|
@@ -6,17 +6,16 @@
|
|
|
6
6
|
* This source code is licensed under the MIT license found in the
|
|
7
7
|
* LICENSE file in the root directory of this source tree.
|
|
8
8
|
*/
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
function
|
|
13
|
-
var z={current:null},
|
|
14
|
-
function
|
|
15
|
-
|
|
16
|
-
function
|
|
17
|
-
|
|
18
|
-
e
|
|
19
|
-
function
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
version:"16.1.1",__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:{ReactCurrentOwner:z,assign:m}},S=Object.freeze({default:R}),T=S&&R||S;module.exports=T["default"]?T["default"]:T;
|
|
9
|
+
|
|
10
|
+
'use strict';var m=require("object-assign"),n=require("fbjs/lib/emptyObject"),p=require("fbjs/lib/emptyFunction"),q="function"===typeof Symbol&&Symbol["for"],r=q?Symbol["for"]("react.element"):60103,t=q?Symbol["for"]("react.call"):60104,u=q?Symbol["for"]("react.return"):60105,v=q?Symbol["for"]("react.portal"):60106,w=q?Symbol["for"]("react.fragment"):60107,x="function"===typeof Symbol&&Symbol.iterator;
|
|
11
|
+
function y(a){for(var b=arguments.length-1,e="Minified React error #"+a+"; visit http://facebook.github.io/react/docs/error-decoder.html?invariant\x3d"+a,c=0;c<b;c++)e+="\x26args[]\x3d"+encodeURIComponent(arguments[c+1]);b=Error(e+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings.");b.name="Invariant Violation";b.framesToPop=1;throw b;}
|
|
12
|
+
var z={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}};function A(a,b,e){this.props=a;this.context=b;this.refs=n;this.updater=e||z}A.prototype.isReactComponent={};A.prototype.setState=function(a,b){"object"!==typeof a&&"function"!==typeof a&&null!=a?y("85"):void 0;this.updater.enqueueSetState(this,a,b,"setState")};A.prototype.forceUpdate=function(a){this.updater.enqueueForceUpdate(this,a,"forceUpdate")};
|
|
13
|
+
function B(a,b,e){this.props=a;this.context=b;this.refs=n;this.updater=e||z}function C(){}C.prototype=A.prototype;var D=B.prototype=new C;D.constructor=B;m(D,A.prototype);D.isPureReactComponent=!0;function E(a,b,e){this.props=a;this.context=b;this.refs=n;this.updater=e||z}var F=E.prototype=new C;F.constructor=E;m(F,A.prototype);F.unstable_isAsyncReactComponent=!0;F.render=function(){return this.props.children};var G={current:null},H=Object.prototype.hasOwnProperty,I={key:!0,ref:!0,__self:!0,__source:!0};
|
|
14
|
+
function J(a,b,e){var c,d={},g=null,k=null;if(null!=b)for(c in void 0!==b.ref&&(k=b.ref),void 0!==b.key&&(g=""+b.key),b)H.call(b,c)&&!I.hasOwnProperty(c)&&(d[c]=b[c]);var f=arguments.length-2;if(1===f)d.children=e;else if(1<f){for(var h=Array(f),l=0;l<f;l++)h[l]=arguments[l+2];d.children=h}if(a&&a.defaultProps)for(c in f=a.defaultProps,f)void 0===d[c]&&(d[c]=f[c]);return{$$typeof:r,type:a,key:g,ref:k,props:d,_owner:G.current}}function K(a){return"object"===typeof a&&null!==a&&a.$$typeof===r}
|
|
15
|
+
function escape(a){var b={"\x3d":"\x3d0",":":"\x3d2"};return"$"+(""+a).replace(/[=:]/g,function(a){return b[a]})}var L=/\/+/g,M=[];function N(a,b,e,c){if(M.length){var d=M.pop();d.result=a;d.keyPrefix=b;d.func=e;d.context=c;d.count=0;return d}return{result:a,keyPrefix:b,func:e,context:c,count:0}}function O(a){a.result=null;a.keyPrefix=null;a.func=null;a.context=null;a.count=0;10>M.length&&M.push(a)}
|
|
16
|
+
function P(a,b,e,c){var d=typeof a;if("undefined"===d||"boolean"===d)a=null;var g=!1;if(null===a)g=!0;else switch(d){case "string":case "number":g=!0;break;case "object":switch(a.$$typeof){case r:case t:case u:case v:g=!0}}if(g)return e(c,a,""===b?"."+Q(a,0):b),1;g=0;b=""===b?".":b+":";if(Array.isArray(a))for(var k=0;k<a.length;k++){d=a[k];var f=b+Q(d,k);g+=P(d,f,e,c)}else if(null===a||"undefined"===typeof a?f=null:(f=x&&a[x]||a["@@iterator"],f="function"===typeof f?f:null),"function"===typeof f)for(a=
|
|
17
|
+
f.call(a),k=0;!(d=a.next()).done;)d=d.value,f=b+Q(d,k++),g+=P(d,f,e,c);else"object"===d&&(e=""+a,y("31","[object Object]"===e?"object with keys {"+Object.keys(a).join(", ")+"}":e,""));return g}function Q(a,b){return"object"===typeof a&&null!==a&&null!=a.key?escape(a.key):b.toString(36)}function R(a,b){a.func.call(a.context,b,a.count++)}
|
|
18
|
+
function S(a,b,e){var c=a.result,d=a.keyPrefix;a=a.func.call(a.context,b,a.count++);Array.isArray(a)?T(a,c,e,p.thatReturnsArgument):null!=a&&(K(a)&&(b=d+(!a.key||b&&b.key===a.key?"":(""+a.key).replace(L,"$\x26/")+"/")+e,a={$$typeof:r,type:a.type,key:b,ref:a.ref,props:a.props,_owner:a._owner}),c.push(a))}function T(a,b,e,c,d){var g="";null!=e&&(g=(""+e).replace(L,"$\x26/")+"/");b=N(b,g,c,d);null==a||P(a,"",S,b);O(b)}
|
|
19
|
+
var U={Children:{map:function(a,b,e){if(null==a)return a;var c=[];T(a,c,null,b,e);return c},forEach:function(a,b,e){if(null==a)return a;b=N(null,null,b,e);null==a||P(a,"",R,b);O(b)},count:function(a){return null==a?0:P(a,"",p.thatReturnsNull,null)},toArray:function(a){var b=[];T(a,b,null,p.thatReturnsArgument);return b},only:function(a){K(a)?void 0:y("143");return a}},Component:A,PureComponent:B,unstable_AsyncComponent:E,Fragment:w,createElement:J,cloneElement:function(a,b,e){var c=m({},a.props),
|
|
20
|
+
d=a.key,g=a.ref,k=a._owner;if(null!=b){void 0!==b.ref&&(g=b.ref,k=G.current);void 0!==b.key&&(d=""+b.key);if(a.type&&a.type.defaultProps)var f=a.type.defaultProps;for(h in b)H.call(b,h)&&!I.hasOwnProperty(h)&&(c[h]=void 0===b[h]&&void 0!==f?f[h]:b[h])}var h=arguments.length-2;if(1===h)c.children=e;else if(1<h){f=Array(h);for(var l=0;l<h;l++)f[l]=arguments[l+2];c.children=f}return{$$typeof:r,type:a.type,key:d,ref:g,props:c,_owner:k}},createFactory:function(a){var b=J.bind(null,a);b.type=a;return b},
|
|
21
|
+
isValidElement:K,version:"16.2.0",__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:{ReactCurrentOwner:G,assign:m}},V=Object.freeze({default:U}),W=V&&U||V;module.exports=W["default"]?W["default"]:W;
|
package/package.json
CHANGED
package/umd/react.development.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/** @license React v16.
|
|
1
|
+
/** @license React v16.2.0
|
|
2
2
|
* react.development.js
|
|
3
3
|
*
|
|
4
4
|
* Copyright (c) 2013-present, Facebook, Inc.
|
|
@@ -79,7 +79,7 @@ function shouldUseNative() {
|
|
|
79
79
|
}
|
|
80
80
|
}
|
|
81
81
|
|
|
82
|
-
var objectAssign
|
|
82
|
+
var objectAssign = shouldUseNative() ? Object.assign : function (target, source) {
|
|
83
83
|
var from;
|
|
84
84
|
var to = toObject(target);
|
|
85
85
|
var symbols;
|
|
@@ -108,7 +108,31 @@ var objectAssign$1 = shouldUseNative() ? Object.assign : function (target, sourc
|
|
|
108
108
|
|
|
109
109
|
// TODO: this is special because it gets imported during build.
|
|
110
110
|
|
|
111
|
-
var ReactVersion = '16.
|
|
111
|
+
var ReactVersion = '16.2.0';
|
|
112
|
+
|
|
113
|
+
// The Symbol used to tag the ReactElement-like types. If there is no native Symbol
|
|
114
|
+
// nor polyfill, then a plain number is used for performance.
|
|
115
|
+
var hasSymbol = typeof Symbol === 'function' && Symbol['for'];
|
|
116
|
+
|
|
117
|
+
var REACT_ELEMENT_TYPE = hasSymbol ? Symbol['for']('react.element') : 0xeac7;
|
|
118
|
+
var REACT_CALL_TYPE = hasSymbol ? Symbol['for']('react.call') : 0xeac8;
|
|
119
|
+
var REACT_RETURN_TYPE = hasSymbol ? Symbol['for']('react.return') : 0xeac9;
|
|
120
|
+
var REACT_PORTAL_TYPE = hasSymbol ? Symbol['for']('react.portal') : 0xeaca;
|
|
121
|
+
var REACT_FRAGMENT_TYPE = hasSymbol ? Symbol['for']('react.fragment') : 0xeacb;
|
|
122
|
+
|
|
123
|
+
var MAYBE_ITERATOR_SYMBOL = typeof Symbol === 'function' && Symbol.iterator;
|
|
124
|
+
var FAUX_ITERATOR_SYMBOL = '@@iterator';
|
|
125
|
+
|
|
126
|
+
function getIteratorFn(maybeIterable) {
|
|
127
|
+
if (maybeIterable === null || typeof maybeIterable === 'undefined') {
|
|
128
|
+
return null;
|
|
129
|
+
}
|
|
130
|
+
var maybeIterator = MAYBE_ITERATOR_SYMBOL && maybeIterable[MAYBE_ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL];
|
|
131
|
+
if (typeof maybeIterator === 'function') {
|
|
132
|
+
return maybeIterator;
|
|
133
|
+
}
|
|
134
|
+
return null;
|
|
135
|
+
}
|
|
112
136
|
|
|
113
137
|
/**
|
|
114
138
|
* WARNING: DO NOT manually require this module.
|
|
@@ -127,6 +151,24 @@ var ReactVersion = '16.1.1';
|
|
|
127
151
|
|
|
128
152
|
|
|
129
153
|
|
|
154
|
+
var emptyObject = {};
|
|
155
|
+
|
|
156
|
+
{
|
|
157
|
+
Object.freeze(emptyObject);
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
var emptyObject_1 = emptyObject;
|
|
161
|
+
|
|
162
|
+
/**
|
|
163
|
+
* Copyright (c) 2013-present, Facebook, Inc.
|
|
164
|
+
*
|
|
165
|
+
* This source code is licensed under the MIT license found in the
|
|
166
|
+
* LICENSE file in the root directory of this source tree.
|
|
167
|
+
*
|
|
168
|
+
*/
|
|
169
|
+
|
|
170
|
+
|
|
171
|
+
|
|
130
172
|
/**
|
|
131
173
|
* Use invariant() to assert state which your program assumes to be true.
|
|
132
174
|
*
|
|
@@ -169,40 +211,7 @@ function invariant(condition, format, a, b, c, d, e, f) {
|
|
|
169
211
|
}
|
|
170
212
|
}
|
|
171
213
|
|
|
172
|
-
var invariant_1
|
|
173
|
-
|
|
174
|
-
// Exports React.Fragment
|
|
175
|
-
var enableReactFragment = false;
|
|
176
|
-
// Exports ReactDOM.createRoot
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
// Mutating mode (React DOM, React ART, React Native):
|
|
181
|
-
|
|
182
|
-
// Experimental noop mode (currently unused):
|
|
183
|
-
|
|
184
|
-
// Experimental persistent mode (CS):
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
// Only used in www builds.
|
|
188
|
-
|
|
189
|
-
/**
|
|
190
|
-
* Copyright (c) 2013-present, Facebook, Inc.
|
|
191
|
-
*
|
|
192
|
-
* This source code is licensed under the MIT license found in the
|
|
193
|
-
* LICENSE file in the root directory of this source tree.
|
|
194
|
-
*
|
|
195
|
-
*/
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
var emptyObject = {};
|
|
200
|
-
|
|
201
|
-
{
|
|
202
|
-
Object.freeze(emptyObject);
|
|
203
|
-
}
|
|
204
|
-
|
|
205
|
-
var emptyObject_1 = emptyObject;
|
|
214
|
+
var invariant_1 = invariant;
|
|
206
215
|
|
|
207
216
|
/**
|
|
208
217
|
* Forked from fbjs/warning:
|
|
@@ -353,7 +362,7 @@ var warning = emptyFunction_1;
|
|
|
353
362
|
};
|
|
354
363
|
}
|
|
355
364
|
|
|
356
|
-
var warning_1
|
|
365
|
+
var warning_1 = warning;
|
|
357
366
|
|
|
358
367
|
var didWarnStateUpdateForUnmountedComponent = {};
|
|
359
368
|
|
|
@@ -365,7 +374,7 @@ function warnNoop(publicInstance, callerName) {
|
|
|
365
374
|
if (didWarnStateUpdateForUnmountedComponent[warningKey]) {
|
|
366
375
|
return;
|
|
367
376
|
}
|
|
368
|
-
warning_1
|
|
377
|
+
warning_1(false, '%s(...): Can only update a mounted or mounting component. ' + 'This usually means you called %s() on an unmounted component. ' + 'This is a no-op.\n\nPlease check the code for the %s component.', callerName, callerName, componentName);
|
|
369
378
|
didWarnStateUpdateForUnmountedComponent[warningKey] = true;
|
|
370
379
|
}
|
|
371
380
|
}
|
|
@@ -478,7 +487,7 @@ Component.prototype.isReactComponent = {};
|
|
|
478
487
|
* @protected
|
|
479
488
|
*/
|
|
480
489
|
Component.prototype.setState = function (partialState, callback) {
|
|
481
|
-
!(typeof partialState === 'object' || typeof partialState === 'function' || partialState == null) ? invariant_1
|
|
490
|
+
!(typeof partialState === 'object' || typeof partialState === 'function' || partialState == null) ? invariant_1(false, 'setState(...): takes an object of state variables to update or a function which returns an object of state variables.') : void 0;
|
|
482
491
|
this.updater.enqueueSetState(this, partialState, callback, 'setState');
|
|
483
492
|
};
|
|
484
493
|
|
|
@@ -543,7 +552,7 @@ ComponentDummy.prototype = Component.prototype;
|
|
|
543
552
|
var pureComponentPrototype = PureComponent.prototype = new ComponentDummy();
|
|
544
553
|
pureComponentPrototype.constructor = PureComponent;
|
|
545
554
|
// Avoid an extra prototype jump for these methods.
|
|
546
|
-
objectAssign
|
|
555
|
+
objectAssign(pureComponentPrototype, Component.prototype);
|
|
547
556
|
pureComponentPrototype.isPureReactComponent = true;
|
|
548
557
|
|
|
549
558
|
function AsyncComponent(props, context, updater) {
|
|
@@ -559,7 +568,7 @@ function AsyncComponent(props, context, updater) {
|
|
|
559
568
|
var asyncComponentPrototype = AsyncComponent.prototype = new ComponentDummy();
|
|
560
569
|
asyncComponentPrototype.constructor = AsyncComponent;
|
|
561
570
|
// Avoid an extra prototype jump for these methods.
|
|
562
|
-
objectAssign
|
|
571
|
+
objectAssign(asyncComponentPrototype, Component.prototype);
|
|
563
572
|
asyncComponentPrototype.unstable_isAsyncReactComponent = true;
|
|
564
573
|
asyncComponentPrototype.render = function () {
|
|
565
574
|
return this.props.children;
|
|
@@ -581,10 +590,6 @@ var ReactCurrentOwner = {
|
|
|
581
590
|
|
|
582
591
|
var hasOwnProperty$1 = Object.prototype.hasOwnProperty;
|
|
583
592
|
|
|
584
|
-
// The Symbol used to tag the ReactElement type. If there is no native Symbol
|
|
585
|
-
// nor polyfill, then a plain number is used for performance.
|
|
586
|
-
var REACT_ELEMENT_TYPE$1 = typeof Symbol === 'function' && Symbol['for'] && Symbol['for']('react.element') || 0xeac7;
|
|
587
|
-
|
|
588
593
|
var RESERVED_PROPS = {
|
|
589
594
|
key: true,
|
|
590
595
|
ref: true,
|
|
@@ -623,7 +628,7 @@ function defineKeyPropWarningGetter(props, displayName) {
|
|
|
623
628
|
var warnAboutAccessingKey = function () {
|
|
624
629
|
if (!specialPropKeyWarningShown) {
|
|
625
630
|
specialPropKeyWarningShown = true;
|
|
626
|
-
warning_1
|
|
631
|
+
warning_1(false, '%s: `key` is not a prop. Trying to access it will result ' + 'in `undefined` being returned. If you need to access the same ' + 'value within the child component, you should pass it as a different ' + 'prop. (https://fb.me/react-special-props)', displayName);
|
|
627
632
|
}
|
|
628
633
|
};
|
|
629
634
|
warnAboutAccessingKey.isReactWarning = true;
|
|
@@ -637,7 +642,7 @@ function defineRefPropWarningGetter(props, displayName) {
|
|
|
637
642
|
var warnAboutAccessingRef = function () {
|
|
638
643
|
if (!specialPropRefWarningShown) {
|
|
639
644
|
specialPropRefWarningShown = true;
|
|
640
|
-
warning_1
|
|
645
|
+
warning_1(false, '%s: `ref` is not a prop. Trying to access it will result ' + 'in `undefined` being returned. If you need to access the same ' + 'value within the child component, you should pass it as a different ' + 'prop. (https://fb.me/react-special-props)', displayName);
|
|
641
646
|
}
|
|
642
647
|
};
|
|
643
648
|
warnAboutAccessingRef.isReactWarning = true;
|
|
@@ -670,7 +675,7 @@ function defineRefPropWarningGetter(props, displayName) {
|
|
|
670
675
|
var ReactElement = function (type, key, ref, self, source, owner, props) {
|
|
671
676
|
var element = {
|
|
672
677
|
// This tag allow us to uniquely identify this as a React Element
|
|
673
|
-
$$typeof: REACT_ELEMENT_TYPE
|
|
678
|
+
$$typeof: REACT_ELEMENT_TYPE,
|
|
674
679
|
|
|
675
680
|
// Built-in properties that belong on the element
|
|
676
681
|
type: type,
|
|
@@ -785,7 +790,7 @@ function createElement(type, config, children) {
|
|
|
785
790
|
}
|
|
786
791
|
{
|
|
787
792
|
if (key || ref) {
|
|
788
|
-
if (typeof props.$$typeof === 'undefined' || props.$$typeof !== REACT_ELEMENT_TYPE
|
|
793
|
+
if (typeof props.$$typeof === 'undefined' || props.$$typeof !== REACT_ELEMENT_TYPE) {
|
|
789
794
|
var displayName = typeof type === 'function' ? type.displayName || type.name || 'Unknown' : type;
|
|
790
795
|
if (key) {
|
|
791
796
|
defineKeyPropWarningGetter(props, displayName);
|
|
@@ -819,7 +824,7 @@ function cloneElement(element, config, children) {
|
|
|
819
824
|
var propName;
|
|
820
825
|
|
|
821
826
|
// Original props are copied
|
|
822
|
-
var props = objectAssign
|
|
827
|
+
var props = objectAssign({}, element.props);
|
|
823
828
|
|
|
824
829
|
// Reserved names are extracted
|
|
825
830
|
var key = element.key;
|
|
@@ -885,7 +890,7 @@ function cloneElement(element, config, children) {
|
|
|
885
890
|
* @final
|
|
886
891
|
*/
|
|
887
892
|
function isValidElement(object) {
|
|
888
|
-
return typeof object === 'object' && object !== null && object.$$typeof === REACT_ELEMENT_TYPE
|
|
893
|
+
return typeof object === 'object' && object !== null && object.$$typeof === REACT_ELEMENT_TYPE;
|
|
889
894
|
}
|
|
890
895
|
|
|
891
896
|
var ReactDebugCurrentFrame = {};
|
|
@@ -903,12 +908,6 @@ var ReactDebugCurrentFrame = {};
|
|
|
903
908
|
};
|
|
904
909
|
}
|
|
905
910
|
|
|
906
|
-
var ITERATOR_SYMBOL = typeof Symbol === 'function' && Symbol.iterator;
|
|
907
|
-
var FAUX_ITERATOR_SYMBOL = '@@iterator'; // Before Symbol spec.
|
|
908
|
-
// The Symbol used to tag the ReactElement type. If there is no native Symbol
|
|
909
|
-
// nor polyfill, then a plain number is used for performance.
|
|
910
|
-
var REACT_ELEMENT_TYPE = typeof Symbol === 'function' && Symbol['for'] && Symbol['for']('react.element') || 0xeac7;
|
|
911
|
-
var REACT_PORTAL_TYPE = typeof Symbol === 'function' && Symbol['for'] && Symbol['for']('react.portal') || 0xeaca;
|
|
912
911
|
var SEPARATOR = '.';
|
|
913
912
|
var SUBSEPARATOR = ':';
|
|
914
913
|
|
|
@@ -992,10 +991,28 @@ function traverseAllChildrenImpl(children, nameSoFar, callback, traverseContext)
|
|
|
992
991
|
children = null;
|
|
993
992
|
}
|
|
994
993
|
|
|
995
|
-
|
|
996
|
-
|
|
997
|
-
|
|
998
|
-
|
|
994
|
+
var invokeCallback = false;
|
|
995
|
+
|
|
996
|
+
if (children === null) {
|
|
997
|
+
invokeCallback = true;
|
|
998
|
+
} else {
|
|
999
|
+
switch (type) {
|
|
1000
|
+
case 'string':
|
|
1001
|
+
case 'number':
|
|
1002
|
+
invokeCallback = true;
|
|
1003
|
+
break;
|
|
1004
|
+
case 'object':
|
|
1005
|
+
switch (children.$$typeof) {
|
|
1006
|
+
case REACT_ELEMENT_TYPE:
|
|
1007
|
+
case REACT_CALL_TYPE:
|
|
1008
|
+
case REACT_RETURN_TYPE:
|
|
1009
|
+
case REACT_PORTAL_TYPE:
|
|
1010
|
+
invokeCallback = true;
|
|
1011
|
+
}
|
|
1012
|
+
}
|
|
1013
|
+
}
|
|
1014
|
+
|
|
1015
|
+
if (invokeCallback) {
|
|
999
1016
|
callback(traverseContext, children,
|
|
1000
1017
|
// If it's the only child, treat the name as if it was wrapped in an array
|
|
1001
1018
|
// so that it's consistent if the number of children grows.
|
|
@@ -1015,12 +1032,12 @@ function traverseAllChildrenImpl(children, nameSoFar, callback, traverseContext)
|
|
|
1015
1032
|
subtreeCount += traverseAllChildrenImpl(child, nextName, callback, traverseContext);
|
|
1016
1033
|
}
|
|
1017
1034
|
} else {
|
|
1018
|
-
var iteratorFn =
|
|
1035
|
+
var iteratorFn = getIteratorFn(children);
|
|
1019
1036
|
if (typeof iteratorFn === 'function') {
|
|
1020
1037
|
{
|
|
1021
1038
|
// Warn about using Maps as children
|
|
1022
1039
|
if (iteratorFn === children.entries) {
|
|
1023
|
-
warning_1
|
|
1040
|
+
warning_1(didWarnAboutMaps, 'Using Maps as children is unsupported and will likely yield ' + 'unexpected results. Convert it to a sequence/iterable of keyed ' + 'ReactElements instead.%s', ReactDebugCurrentFrame.getStackAddendum());
|
|
1024
1041
|
didWarnAboutMaps = true;
|
|
1025
1042
|
}
|
|
1026
1043
|
}
|
|
@@ -1039,7 +1056,7 @@ function traverseAllChildrenImpl(children, nameSoFar, callback, traverseContext)
|
|
|
1039
1056
|
addendum = ' If you meant to render a collection of children, use an array ' + 'instead.' + ReactDebugCurrentFrame.getStackAddendum();
|
|
1040
1057
|
}
|
|
1041
1058
|
var childrenString = '' + children;
|
|
1042
|
-
invariant_1
|
|
1059
|
+
invariant_1(false, 'Objects are not valid as a React child (found: %s).%s', childrenString === '[object Object]' ? 'object with keys {' + Object.keys(children).join(', ') + '}' : childrenString, addendum);
|
|
1043
1060
|
}
|
|
1044
1061
|
}
|
|
1045
1062
|
|
|
@@ -1209,7 +1226,7 @@ function toArray(children) {
|
|
|
1209
1226
|
* structure.
|
|
1210
1227
|
*/
|
|
1211
1228
|
function onlyChild(children) {
|
|
1212
|
-
!isValidElement(children) ? invariant_1
|
|
1229
|
+
!isValidElement(children) ? invariant_1(false, 'React.Children.only expected to receive a single React element child.') : void 0;
|
|
1213
1230
|
return children;
|
|
1214
1231
|
}
|
|
1215
1232
|
|
|
@@ -1252,8 +1269,8 @@ var ReactPropTypesSecret_1 = ReactPropTypesSecret$1;
|
|
|
1252
1269
|
|
|
1253
1270
|
|
|
1254
1271
|
{
|
|
1255
|
-
var invariant$2 = invariant_1
|
|
1256
|
-
var warning$2 = warning_1
|
|
1272
|
+
var invariant$2 = invariant_1;
|
|
1273
|
+
var warning$2 = warning_1;
|
|
1257
1274
|
var ReactPropTypesSecret = ReactPropTypesSecret_1;
|
|
1258
1275
|
var loggedTypeFailures = {};
|
|
1259
1276
|
}
|
|
@@ -1300,7 +1317,7 @@ function checkPropTypes(typeSpecs, values, location, componentName, getStack) {
|
|
|
1300
1317
|
}
|
|
1301
1318
|
}
|
|
1302
1319
|
|
|
1303
|
-
var checkPropTypes_1
|
|
1320
|
+
var checkPropTypes_1 = checkPropTypes;
|
|
1304
1321
|
|
|
1305
1322
|
/**
|
|
1306
1323
|
* ReactElementValidator provides a wrapper around a element factory
|
|
@@ -1312,6 +1329,8 @@ var checkPropTypes_1$1 = checkPropTypes;
|
|
|
1312
1329
|
{
|
|
1313
1330
|
var currentlyValidatingElement = null;
|
|
1314
1331
|
|
|
1332
|
+
var propTypesMisspellWarningShown = false;
|
|
1333
|
+
|
|
1315
1334
|
var getDisplayName = function (element) {
|
|
1316
1335
|
if (element == null) {
|
|
1317
1336
|
return '#empty';
|
|
@@ -1319,7 +1338,7 @@ var checkPropTypes_1$1 = checkPropTypes;
|
|
|
1319
1338
|
return '#text';
|
|
1320
1339
|
} else if (typeof element.type === 'string') {
|
|
1321
1340
|
return element.type;
|
|
1322
|
-
} else if (element.type === REACT_FRAGMENT_TYPE
|
|
1341
|
+
} else if (element.type === REACT_FRAGMENT_TYPE) {
|
|
1323
1342
|
return 'React.Fragment';
|
|
1324
1343
|
} else {
|
|
1325
1344
|
return element.type.displayName || element.type.name || 'Unknown';
|
|
@@ -1337,14 +1356,9 @@ var checkPropTypes_1$1 = checkPropTypes;
|
|
|
1337
1356
|
return stack;
|
|
1338
1357
|
};
|
|
1339
1358
|
|
|
1340
|
-
var REACT_FRAGMENT_TYPE$1 = typeof Symbol === 'function' && Symbol['for'] && Symbol['for']('react.fragment') || 0xeacb;
|
|
1341
|
-
|
|
1342
1359
|
var VALID_FRAGMENT_PROPS = new Map([['children', true], ['key', true]]);
|
|
1343
1360
|
}
|
|
1344
1361
|
|
|
1345
|
-
var ITERATOR_SYMBOL$1 = typeof Symbol === 'function' && Symbol.iterator;
|
|
1346
|
-
var FAUX_ITERATOR_SYMBOL$1 = '@@iterator'; // Before Symbol spec.
|
|
1347
|
-
|
|
1348
1362
|
function getDeclarationErrorAddendum() {
|
|
1349
1363
|
if (ReactCurrentOwner.current) {
|
|
1350
1364
|
var name = getComponentName(ReactCurrentOwner.current);
|
|
@@ -1418,7 +1432,7 @@ function validateExplicitKey(element, parentType) {
|
|
|
1418
1432
|
|
|
1419
1433
|
currentlyValidatingElement = element;
|
|
1420
1434
|
{
|
|
1421
|
-
warning_1
|
|
1435
|
+
warning_1(false, 'Each child in an array or iterator should have a unique "key" prop.' + '%s%s See https://fb.me/react-warning-keys for more information.%s', currentComponentErrorInfo, childOwner, getStackAddendum());
|
|
1422
1436
|
}
|
|
1423
1437
|
currentlyValidatingElement = null;
|
|
1424
1438
|
}
|
|
@@ -1449,7 +1463,7 @@ function validateChildKeys(node, parentType) {
|
|
|
1449
1463
|
node._store.validated = true;
|
|
1450
1464
|
}
|
|
1451
1465
|
} else if (node) {
|
|
1452
|
-
var iteratorFn =
|
|
1466
|
+
var iteratorFn = getIteratorFn(node);
|
|
1453
1467
|
if (typeof iteratorFn === 'function') {
|
|
1454
1468
|
// Entry iterators used to provide implicit keys,
|
|
1455
1469
|
// but now we print a separate warning for them later.
|
|
@@ -1479,14 +1493,16 @@ function validatePropTypes(element) {
|
|
|
1479
1493
|
}
|
|
1480
1494
|
var name = componentClass.displayName || componentClass.name;
|
|
1481
1495
|
var propTypes = componentClass.propTypes;
|
|
1482
|
-
|
|
1483
1496
|
if (propTypes) {
|
|
1484
1497
|
currentlyValidatingElement = element;
|
|
1485
|
-
checkPropTypes_1
|
|
1498
|
+
checkPropTypes_1(propTypes, element.props, 'prop', name, getStackAddendum);
|
|
1486
1499
|
currentlyValidatingElement = null;
|
|
1500
|
+
} else if (componentClass.PropTypes !== undefined && !propTypesMisspellWarningShown) {
|
|
1501
|
+
propTypesMisspellWarningShown = true;
|
|
1502
|
+
warning_1(false, 'Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?', name || 'Unknown');
|
|
1487
1503
|
}
|
|
1488
1504
|
if (typeof componentClass.getDefaultProps === 'function') {
|
|
1489
|
-
warning_1
|
|
1505
|
+
warning_1(componentClass.getDefaultProps.isReactClassApproved, 'getDefaultProps is only used on classic React.createClass ' + 'definitions. Use a static property named `defaultProps` instead.');
|
|
1490
1506
|
}
|
|
1491
1507
|
}
|
|
1492
1508
|
|
|
@@ -1506,7 +1522,7 @@ function validateFragmentProps(fragment) {
|
|
|
1506
1522
|
var key = _step.value;
|
|
1507
1523
|
|
|
1508
1524
|
if (!VALID_FRAGMENT_PROPS.has(key)) {
|
|
1509
|
-
warning_1
|
|
1525
|
+
warning_1(false, 'Invalid prop `%s` supplied to `React.Fragment`. ' + 'React.Fragment can only have `key` and `children` props.%s', key, getStackAddendum());
|
|
1510
1526
|
break;
|
|
1511
1527
|
}
|
|
1512
1528
|
}
|
|
@@ -1526,7 +1542,7 @@ function validateFragmentProps(fragment) {
|
|
|
1526
1542
|
}
|
|
1527
1543
|
|
|
1528
1544
|
if (fragment.ref !== null) {
|
|
1529
|
-
warning_1
|
|
1545
|
+
warning_1(false, 'Invalid attribute `ref` supplied to `React.Fragment`.%s', getStackAddendum());
|
|
1530
1546
|
}
|
|
1531
1547
|
|
|
1532
1548
|
currentlyValidatingElement = null;
|
|
@@ -1551,7 +1567,7 @@ function createElementWithValidation(type, props, children) {
|
|
|
1551
1567
|
|
|
1552
1568
|
info += getStackAddendum() || '';
|
|
1553
1569
|
|
|
1554
|
-
warning_1
|
|
1570
|
+
warning_1(false, 'React.createElement: type is invalid -- expected a string (for ' + 'built-in components) or a class/function (for composite ' + 'components) but got: %s.%s', type == null ? type : typeof type, info);
|
|
1555
1571
|
}
|
|
1556
1572
|
|
|
1557
1573
|
var element = createElement.apply(this, arguments);
|
|
@@ -1573,7 +1589,7 @@ function createElementWithValidation(type, props, children) {
|
|
|
1573
1589
|
}
|
|
1574
1590
|
}
|
|
1575
1591
|
|
|
1576
|
-
if (typeof type === 'symbol' && type === REACT_FRAGMENT_TYPE
|
|
1592
|
+
if (typeof type === 'symbol' && type === REACT_FRAGMENT_TYPE) {
|
|
1577
1593
|
validateFragmentProps(element);
|
|
1578
1594
|
} else {
|
|
1579
1595
|
validatePropTypes(element);
|
|
@@ -1612,8 +1628,6 @@ function cloneElementWithValidation(element, props, children) {
|
|
|
1612
1628
|
return newElement;
|
|
1613
1629
|
}
|
|
1614
1630
|
|
|
1615
|
-
var REACT_FRAGMENT_TYPE = typeof Symbol === 'function' && Symbol['for'] && Symbol['for']('react.fragment') || 0xeacb;
|
|
1616
|
-
|
|
1617
1631
|
var React = {
|
|
1618
1632
|
Children: {
|
|
1619
1633
|
map: mapChildren,
|
|
@@ -1627,6 +1641,8 @@ var React = {
|
|
|
1627
1641
|
PureComponent: PureComponent,
|
|
1628
1642
|
unstable_AsyncComponent: AsyncComponent,
|
|
1629
1643
|
|
|
1644
|
+
Fragment: REACT_FRAGMENT_TYPE,
|
|
1645
|
+
|
|
1630
1646
|
createElement: createElementWithValidation,
|
|
1631
1647
|
cloneElement: cloneElementWithValidation,
|
|
1632
1648
|
createFactory: createFactoryWithValidation,
|
|
@@ -1637,16 +1653,12 @@ var React = {
|
|
|
1637
1653
|
__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED: {
|
|
1638
1654
|
ReactCurrentOwner: ReactCurrentOwner,
|
|
1639
1655
|
// Used by renderers to avoid bundling object-assign twice in UMD bundles:
|
|
1640
|
-
assign: objectAssign
|
|
1656
|
+
assign: objectAssign
|
|
1641
1657
|
}
|
|
1642
1658
|
};
|
|
1643
1659
|
|
|
1644
|
-
if (enableReactFragment) {
|
|
1645
|
-
React.Fragment = REACT_FRAGMENT_TYPE;
|
|
1646
|
-
}
|
|
1647
|
-
|
|
1648
1660
|
{
|
|
1649
|
-
objectAssign
|
|
1661
|
+
objectAssign(React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED, {
|
|
1650
1662
|
// These should not be included in production.
|
|
1651
1663
|
ReactDebugCurrentFrame: ReactDebugCurrentFrame,
|
|
1652
1664
|
// Shim for React DOM 16.0.0 which still destructured (but not used) this.
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/** @license React v16.
|
|
1
|
+
/** @license React v16.2.0
|
|
2
2
|
* react.production.min.js
|
|
3
3
|
*
|
|
4
4
|
* Copyright (c) 2013-present, Facebook, Inc.
|
|
@@ -6,16 +6,16 @@
|
|
|
6
6
|
* This source code is licensed under the MIT license found in the
|
|
7
7
|
* LICENSE file in the root directory of this source tree.
|
|
8
8
|
*/
|
|
9
|
-
'use strict';(function(
|
|
10
|
-
b.name="Invariant Violation";b.framesToPop=1;throw b;}function
|
|
11
|
-
var g=arguments.length-2;if(1===g)f.children=c;else if(1<g){for(var
|
|
12
|
-
b;f.func=c;f.context=
|
|
13
|
-
b+
|
|
14
|
-
Array.isArray(a)?
|
|
15
|
-
a[5]="de";if("5"===Object.getOwnPropertyNames(a)[0])return!1;var b={};for(a=0;10>a;a++)b["_"+String.fromCharCode(a)]=a;if("0123456789"!==Object.getOwnPropertyNames(b).map(function(a){return b[a]}).join(""))return!1;var c={};"abcdefghijklmnopqrst".split("").forEach(function(a){c[a]=a});return"abcdefghijklmnopqrst"!==Object.keys(Object.assign({},c)).join("")?!1:!0}catch(
|
|
16
|
-
var c=Object(a);for(var
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
h=a._owner;if(null!=b){void 0!==b.ref&&(
|
|
21
|
-
version:"16.
|
|
9
|
+
'use strict';(function(q,k){"object"===typeof exports&&"undefined"!==typeof module?module.exports=k():"function"===typeof define&&define.amd?define(k):q.React=k()})(this,function(){function q(a){for(var b=arguments.length-1,c="Minified React error #"+a+"; visit http://facebook.github.io/react/docs/error-decoder.html?invariant\x3d"+a,d=0;d<b;d++)c+="\x26args[]\x3d"+encodeURIComponent(arguments[d+1]);b=Error(c+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings.");
|
|
10
|
+
b.name="Invariant Violation";b.framesToPop=1;throw b;}function k(a){return function(){return a}}function p(a,b,c){this.props=a;this.context=b;this.refs=w;this.updater=c||x}function y(a,b,c){this.props=a;this.context=b;this.refs=w;this.updater=c||x}function z(){}function A(a,b,c){this.props=a;this.context=b;this.refs=w;this.updater=c||x}function G(a,b,c){var d,f={},l=null,e=null;if(null!=b)for(d in void 0!==b.ref&&(e=b.ref),void 0!==b.key&&(l=""+b.key),b)H.call(b,d)&&!I.hasOwnProperty(d)&&(f[d]=b[d]);
|
|
11
|
+
var g=arguments.length-2;if(1===g)f.children=c;else if(1<g){for(var h=Array(g),n=0;n<g;n++)h[n]=arguments[n+2];f.children=h}if(a&&a.defaultProps)for(d in g=a.defaultProps,g)void 0===f[d]&&(f[d]=g[d]);return{$$typeof:r,type:a,key:l,ref:e,props:f,_owner:B.current}}function C(a){return"object"===typeof a&&null!==a&&a.$$typeof===r}function O(a){var b={"\x3d":"\x3d0",":":"\x3d2"};return"$"+(""+a).replace(/[=:]/g,function(a){return b[a]})}function J(a,b,c,d){if(u.length){var f=u.pop();f.result=a;f.keyPrefix=
|
|
12
|
+
b;f.func=c;f.context=d;f.count=0;return f}return{result:a,keyPrefix:b,func:c,context:d,count:0}}function K(a){a.result=null;a.keyPrefix=null;a.func=null;a.context=null;a.count=0;10>u.length&&u.push(a)}function t(a,b,c,d){var f=typeof a;if("undefined"===f||"boolean"===f)a=null;var l=!1;if(null===a)l=!0;else switch(f){case "string":case "number":l=!0;break;case "object":switch(a.$$typeof){case r:case P:case Q:case R:l=!0}}if(l)return c(d,a,""===b?"."+D(a,0):b),1;l=0;b=""===b?".":b+":";if(Array.isArray(a))for(var e=
|
|
13
|
+
0;e<a.length;e++){f=a[e];var g=b+D(f,e);l+=t(f,g,c,d)}else if(null===a||"undefined"===typeof a?g=null:(g=L&&a[L]||a["@@iterator"],g="function"===typeof g?g:null),"function"===typeof g)for(a=g.call(a),e=0;!(f=a.next()).done;)f=f.value,g=b+D(f,e++),l+=t(f,g,c,d);else"object"===f&&(c=""+a,q("31","[object Object]"===c?"object with keys {"+Object.keys(a).join(", ")+"}":c,""));return l}function D(a,b){return"object"===typeof a&&null!==a&&null!=a.key?O(a.key):b.toString(36)}function S(a,b,c){a.func.call(a.context,
|
|
14
|
+
b,a.count++)}function T(a,b,c){var d=a.result,f=a.keyPrefix;a=a.func.call(a.context,b,a.count++);Array.isArray(a)?E(a,d,c,F.thatReturnsArgument):null!=a&&(C(a)&&(b=f+(!a.key||b&&b.key===a.key?"":(""+a.key).replace(M,"$\x26/")+"/")+c,a={$$typeof:r,type:a.type,key:b,ref:a.ref,props:a.props,_owner:a._owner}),d.push(a))}function E(a,b,c,d,f){var e="";null!=c&&(e=(""+c).replace(M,"$\x26/")+"/");b=J(b,e,d,f);null==a||t(a,"",T,b);K(b)}var N=Object.getOwnPropertySymbols,U=Object.prototype.hasOwnProperty,
|
|
15
|
+
V=Object.prototype.propertyIsEnumerable,v=function(){try{if(!Object.assign)return!1;var a=new String("abc");a[5]="de";if("5"===Object.getOwnPropertyNames(a)[0])return!1;var b={};for(a=0;10>a;a++)b["_"+String.fromCharCode(a)]=a;if("0123456789"!==Object.getOwnPropertyNames(b).map(function(a){return b[a]}).join(""))return!1;var c={};"abcdefghijklmnopqrst".split("").forEach(function(a){c[a]=a});return"abcdefghijklmnopqrst"!==Object.keys(Object.assign({},c)).join("")?!1:!0}catch(d){return!1}}()?Object.assign:
|
|
16
|
+
function(a,b){if(null===a||void 0===a)throw new TypeError("Object.assign cannot be called with null or undefined");var c=Object(a);for(var d,f=1;f<arguments.length;f++){var e=Object(arguments[f]);for(var h in e)U.call(e,h)&&(c[h]=e[h]);if(N){d=N(e);for(var g=0;g<d.length;g++)V.call(e,d[g])&&(c[d[g]]=e[d[g]])}}return c},h="function"===typeof Symbol&&Symbol["for"],r=h?Symbol["for"]("react.element"):60103,P=h?Symbol["for"]("react.call"):60104,Q=h?Symbol["for"]("react.return"):60105,R=h?Symbol["for"]("react.portal"):
|
|
17
|
+
60106;h=h?Symbol["for"]("react.fragment"):60107;var L="function"===typeof Symbol&&Symbol.iterator,w={},e=function(){};e.thatReturns=k;e.thatReturnsFalse=k(!1);e.thatReturnsTrue=k(!0);e.thatReturnsNull=k(null);e.thatReturnsThis=function(){return this};e.thatReturnsArgument=function(a){return a};var F=e,x={isMounted:function(a){return!1},enqueueForceUpdate:function(a,b,c){},enqueueReplaceState:function(a,b,c,d){},enqueueSetState:function(a,b,c,d){}};p.prototype.isReactComponent={};p.prototype.setState=
|
|
18
|
+
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")};z.prototype=p.prototype;e=y.prototype=new z;e.constructor=y;v(e,p.prototype);e.isPureReactComponent=!0;e=A.prototype=new z;e.constructor=A;v(e,p.prototype);e.unstable_isAsyncReactComponent=!0;e.render=function(){return this.props.children};var B={current:null},H=Object.prototype.hasOwnProperty,
|
|
19
|
+
I={key:!0,ref:!0,__self:!0,__source:!0},M=/\/+/g,u=[];h={Children:{map:function(a,b,c){if(null==a)return a;var d=[];E(a,d,null,b,c);return d},forEach:function(a,b,c){if(null==a)return a;b=J(null,null,b,c);null==a||t(a,"",S,b);K(b)},count:function(a,b){return null==a?0:t(a,"",F.thatReturnsNull,null)},toArray:function(a){var b=[];E(a,b,null,F.thatReturnsArgument);return b},only:function(a){C(a)?void 0:q("143");return a}},Component:p,PureComponent:y,unstable_AsyncComponent:A,Fragment:h,createElement:G,
|
|
20
|
+
cloneElement:function(a,b,c){var d=v({},a.props),e=a.key,h=a.ref,k=a._owner;if(null!=b){void 0!==b.ref&&(h=b.ref,k=B.current);void 0!==b.key&&(e=""+b.key);if(a.type&&a.type.defaultProps)var g=a.type.defaultProps;for(m in b)H.call(b,m)&&!I.hasOwnProperty(m)&&(d[m]=void 0===b[m]&&void 0!==g?g[m]:b[m])}var m=arguments.length-2;if(1===m)d.children=c;else if(1<m){g=Array(m);for(var n=0;n<m;n++)g[n]=arguments[n+2];d.children=g}return{$$typeof:r,type:a.type,key:e,ref:h,props:d,_owner:k}},createFactory:function(a){var b=
|
|
21
|
+
G.bind(null,a);b.type=a;return b},isValidElement:C,version:"16.2.0",__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:{ReactCurrentOwner:B,assign:v}};h=(e=Object.freeze({default:h}))&&h||e;return h["default"]?h["default"]:h});
|