react 16.1.0 → 16.3.0-alpha.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 +175 -122
- package/cjs/react.production.min.js +14 -15
- package/package.json +1 -1
- package/umd/react.development.js +211 -160
- package/umd/react.production.min.js +14 -14
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/** @license React v16.
|
|
1
|
+
/** @license React v16.3.0-alpha.1
|
|
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
|
|
14
|
-
function
|
|
15
|
-
|
|
16
|
-
function
|
|
17
|
-
|
|
18
|
-
e
|
|
19
|
-
function
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
version:"16.1.0",__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.portal"):60106,u=q?Symbol["for"]("react.fragment"):60107,v=q?Symbol["for"]("react.strict_mode"):60108,w=q?Symbol["for"]("react.provider"):60109,x=q?Symbol["for"]("react.context"):60110,y=q?Symbol["for"]("react.async_mode"):60111,z="function"===typeof Symbol&&Symbol.iterator;
|
|
11
|
+
function A(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 B={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}};function C(a,b,e){this.props=a;this.context=b;this.refs=n;this.updater=e||B}C.prototype.isReactComponent={};C.prototype.setState=function(a,b){"object"!==typeof a&&"function"!==typeof a&&null!=a?A("85"):void 0;this.updater.enqueueSetState(this,a,b,"setState")};C.prototype.forceUpdate=function(a){this.updater.enqueueForceUpdate(this,a,"forceUpdate")};function D(){}
|
|
13
|
+
D.prototype=C.prototype;function E(a,b,e){this.props=a;this.context=b;this.refs=n;this.updater=e||B}var F=E.prototype=new D;F.constructor=E;m(F,C.prototype);F.isPureReactComponent=!0;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=void 0,d={},g=null,h=null;if(null!=b)for(c in void 0!==b.ref&&(h=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 k=Array(f),l=0;l<f;l++)k[l]=arguments[l+2];d.children=k}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:h,props:d,_owner:G.current}}
|
|
15
|
+
function K(a){return"object"===typeof a&&null!==a&&a.$$typeof===r}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: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 h=0;h<a.length;h++){d=a[h];var f=b+Q(d,h);g+=P(d,f,e,c)}else if(null===a||"undefined"===typeof a?f=null:(f=z&&a[z]||a["@@iterator"],f="function"===typeof f?f:null),"function"===typeof f)for(a=f.call(a),
|
|
17
|
+
h=0;!(d=a.next()).done;)d=d.value,f=b+Q(d,h++),g+=P(d,f,e,c);else"object"===d&&(e=""+a,A("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:A("143");return a}},createRef:function(){return{value:null}},Component:C,PureComponent:E,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,context:a};return a.Consumer=a},Fragment:u,StrictMode:v,unstable_AsyncMode:y,createElement:J,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=G.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)H.call(b,c)&&!I.hasOwnProperty(c)&&(d[c]=void 0===
|
|
21
|
+
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=J.bind(null,a);b.type=a;return b},isValidElement:K,version:"16.3.0-alpha.1",__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.3.0-alpha.1
|
|
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,35 @@ 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.3.0-alpha.1';
|
|
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
|
+
var REACT_STRICT_MODE_TYPE = hasSymbol ? Symbol['for']('react.strict_mode') : 0xeacc;
|
|
123
|
+
var REACT_PROVIDER_TYPE = hasSymbol ? Symbol['for']('react.provider') : 0xeacd;
|
|
124
|
+
var REACT_CONTEXT_TYPE = hasSymbol ? Symbol['for']('react.context') : 0xeace;
|
|
125
|
+
var REACT_ASYNC_MODE_TYPE = hasSymbol ? Symbol['for']('react.async_mode') : 0xeacf;
|
|
126
|
+
|
|
127
|
+
var MAYBE_ITERATOR_SYMBOL = typeof Symbol === 'function' && Symbol.iterator;
|
|
128
|
+
var FAUX_ITERATOR_SYMBOL = '@@iterator';
|
|
129
|
+
|
|
130
|
+
function getIteratorFn(maybeIterable) {
|
|
131
|
+
if (maybeIterable === null || typeof maybeIterable === 'undefined') {
|
|
132
|
+
return null;
|
|
133
|
+
}
|
|
134
|
+
var maybeIterator = MAYBE_ITERATOR_SYMBOL && maybeIterable[MAYBE_ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL];
|
|
135
|
+
if (typeof maybeIterator === 'function') {
|
|
136
|
+
return maybeIterator;
|
|
137
|
+
}
|
|
138
|
+
return null;
|
|
139
|
+
}
|
|
112
140
|
|
|
113
141
|
/**
|
|
114
142
|
* WARNING: DO NOT manually require this module.
|
|
@@ -127,6 +155,24 @@ var ReactVersion = '16.1.0';
|
|
|
127
155
|
|
|
128
156
|
|
|
129
157
|
|
|
158
|
+
var emptyObject = {};
|
|
159
|
+
|
|
160
|
+
{
|
|
161
|
+
Object.freeze(emptyObject);
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
var emptyObject_1 = emptyObject;
|
|
165
|
+
|
|
166
|
+
/**
|
|
167
|
+
* Copyright (c) 2013-present, Facebook, Inc.
|
|
168
|
+
*
|
|
169
|
+
* This source code is licensed under the MIT license found in the
|
|
170
|
+
* LICENSE file in the root directory of this source tree.
|
|
171
|
+
*
|
|
172
|
+
*/
|
|
173
|
+
|
|
174
|
+
|
|
175
|
+
|
|
130
176
|
/**
|
|
131
177
|
* Use invariant() to assert state which your program assumes to be true.
|
|
132
178
|
*
|
|
@@ -169,40 +215,7 @@ function invariant(condition, format, a, b, c, d, e, f) {
|
|
|
169
215
|
}
|
|
170
216
|
}
|
|
171
217
|
|
|
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;
|
|
218
|
+
var invariant_1 = invariant;
|
|
206
219
|
|
|
207
220
|
/**
|
|
208
221
|
* Forked from fbjs/warning:
|
|
@@ -353,19 +366,19 @@ var warning = emptyFunction_1;
|
|
|
353
366
|
};
|
|
354
367
|
}
|
|
355
368
|
|
|
356
|
-
var warning_1
|
|
369
|
+
var warning_1 = warning;
|
|
357
370
|
|
|
358
371
|
var didWarnStateUpdateForUnmountedComponent = {};
|
|
359
372
|
|
|
360
373
|
function warnNoop(publicInstance, callerName) {
|
|
361
374
|
{
|
|
362
|
-
var
|
|
363
|
-
var componentName =
|
|
375
|
+
var _constructor = publicInstance.constructor;
|
|
376
|
+
var componentName = _constructor && (_constructor.displayName || _constructor.name) || 'ReactClass';
|
|
364
377
|
var warningKey = componentName + '.' + callerName;
|
|
365
378
|
if (didWarnStateUpdateForUnmountedComponent[warningKey]) {
|
|
366
379
|
return;
|
|
367
380
|
}
|
|
368
|
-
warning_1
|
|
381
|
+
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
382
|
didWarnStateUpdateForUnmountedComponent[warningKey] = true;
|
|
370
383
|
}
|
|
371
384
|
}
|
|
@@ -478,7 +491,7 @@ Component.prototype.isReactComponent = {};
|
|
|
478
491
|
* @protected
|
|
479
492
|
*/
|
|
480
493
|
Component.prototype.setState = function (partialState, callback) {
|
|
481
|
-
!(typeof partialState === 'object' || typeof partialState === 'function' || partialState == null) ? invariant_1
|
|
494
|
+
!(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
495
|
this.updater.enqueueSetState(this, partialState, callback, 'setState');
|
|
483
496
|
};
|
|
484
497
|
|
|
@@ -525,46 +538,36 @@ Component.prototype.forceUpdate = function (callback) {
|
|
|
525
538
|
}
|
|
526
539
|
}
|
|
527
540
|
|
|
541
|
+
function ComponentDummy() {}
|
|
542
|
+
ComponentDummy.prototype = Component.prototype;
|
|
543
|
+
|
|
528
544
|
/**
|
|
529
|
-
*
|
|
545
|
+
* Convenience component with default shallow equality check for sCU.
|
|
530
546
|
*/
|
|
531
547
|
function PureComponent(props, context, updater) {
|
|
532
|
-
// Duplicated from Component.
|
|
533
548
|
this.props = props;
|
|
534
549
|
this.context = context;
|
|
535
550
|
this.refs = emptyObject_1;
|
|
536
|
-
// We initialize the default updater but the real one gets injected by the
|
|
537
|
-
// renderer.
|
|
538
551
|
this.updater = updater || ReactNoopUpdateQueue;
|
|
539
552
|
}
|
|
540
553
|
|
|
541
|
-
function ComponentDummy() {}
|
|
542
|
-
ComponentDummy.prototype = Component.prototype;
|
|
543
554
|
var pureComponentPrototype = PureComponent.prototype = new ComponentDummy();
|
|
544
555
|
pureComponentPrototype.constructor = PureComponent;
|
|
545
556
|
// Avoid an extra prototype jump for these methods.
|
|
546
|
-
objectAssign
|
|
557
|
+
objectAssign(pureComponentPrototype, Component.prototype);
|
|
547
558
|
pureComponentPrototype.isPureReactComponent = true;
|
|
548
559
|
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
560
|
+
// an immutable object with a single mutable value
|
|
561
|
+
function createRef() {
|
|
562
|
+
var refObject = {
|
|
563
|
+
value: null
|
|
564
|
+
};
|
|
565
|
+
{
|
|
566
|
+
Object.seal(refObject);
|
|
567
|
+
}
|
|
568
|
+
return refObject;
|
|
557
569
|
}
|
|
558
570
|
|
|
559
|
-
var asyncComponentPrototype = AsyncComponent.prototype = new ComponentDummy();
|
|
560
|
-
asyncComponentPrototype.constructor = AsyncComponent;
|
|
561
|
-
// Avoid an extra prototype jump for these methods.
|
|
562
|
-
objectAssign$1(asyncComponentPrototype, Component.prototype);
|
|
563
|
-
asyncComponentPrototype.unstable_isAsyncReactComponent = true;
|
|
564
|
-
asyncComponentPrototype.render = function () {
|
|
565
|
-
return this.props.children;
|
|
566
|
-
};
|
|
567
|
-
|
|
568
571
|
/**
|
|
569
572
|
* Keeps track of the current owner.
|
|
570
573
|
*
|
|
@@ -581,10 +584,6 @@ var ReactCurrentOwner = {
|
|
|
581
584
|
|
|
582
585
|
var hasOwnProperty$1 = Object.prototype.hasOwnProperty;
|
|
583
586
|
|
|
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
587
|
var RESERVED_PROPS = {
|
|
589
588
|
key: true,
|
|
590
589
|
ref: true,
|
|
@@ -592,8 +591,8 @@ var RESERVED_PROPS = {
|
|
|
592
591
|
__source: true
|
|
593
592
|
};
|
|
594
593
|
|
|
595
|
-
var specialPropKeyWarningShown;
|
|
596
|
-
var specialPropRefWarningShown;
|
|
594
|
+
var specialPropKeyWarningShown = void 0;
|
|
595
|
+
var specialPropRefWarningShown = void 0;
|
|
597
596
|
|
|
598
597
|
function hasValidRef(config) {
|
|
599
598
|
{
|
|
@@ -623,7 +622,7 @@ function defineKeyPropWarningGetter(props, displayName) {
|
|
|
623
622
|
var warnAboutAccessingKey = function () {
|
|
624
623
|
if (!specialPropKeyWarningShown) {
|
|
625
624
|
specialPropKeyWarningShown = true;
|
|
626
|
-
warning_1
|
|
625
|
+
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
626
|
}
|
|
628
627
|
};
|
|
629
628
|
warnAboutAccessingKey.isReactWarning = true;
|
|
@@ -637,7 +636,7 @@ function defineRefPropWarningGetter(props, displayName) {
|
|
|
637
636
|
var warnAboutAccessingRef = function () {
|
|
638
637
|
if (!specialPropRefWarningShown) {
|
|
639
638
|
specialPropRefWarningShown = true;
|
|
640
|
-
warning_1
|
|
639
|
+
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
640
|
}
|
|
642
641
|
};
|
|
643
642
|
warnAboutAccessingRef.isReactWarning = true;
|
|
@@ -670,7 +669,7 @@ function defineRefPropWarningGetter(props, displayName) {
|
|
|
670
669
|
var ReactElement = function (type, key, ref, self, source, owner, props) {
|
|
671
670
|
var element = {
|
|
672
671
|
// This tag allow us to uniquely identify this as a React Element
|
|
673
|
-
$$typeof: REACT_ELEMENT_TYPE
|
|
672
|
+
$$typeof: REACT_ELEMENT_TYPE,
|
|
674
673
|
|
|
675
674
|
// Built-in properties that belong on the element
|
|
676
675
|
type: type,
|
|
@@ -728,7 +727,7 @@ var ReactElement = function (type, key, ref, self, source, owner, props) {
|
|
|
728
727
|
* See https://reactjs.org/docs/react-api.html#createelement
|
|
729
728
|
*/
|
|
730
729
|
function createElement(type, config, children) {
|
|
731
|
-
var propName;
|
|
730
|
+
var propName = void 0;
|
|
732
731
|
|
|
733
732
|
// Reserved names are extracted
|
|
734
733
|
var props = {};
|
|
@@ -785,7 +784,7 @@ function createElement(type, config, children) {
|
|
|
785
784
|
}
|
|
786
785
|
{
|
|
787
786
|
if (key || ref) {
|
|
788
|
-
if (typeof props.$$typeof === 'undefined' || props.$$typeof !== REACT_ELEMENT_TYPE
|
|
787
|
+
if (typeof props.$$typeof === 'undefined' || props.$$typeof !== REACT_ELEMENT_TYPE) {
|
|
789
788
|
var displayName = typeof type === 'function' ? type.displayName || type.name || 'Unknown' : type;
|
|
790
789
|
if (key) {
|
|
791
790
|
defineKeyPropWarningGetter(props, displayName);
|
|
@@ -816,10 +815,10 @@ function cloneAndReplaceKey(oldElement, newKey) {
|
|
|
816
815
|
* See https://reactjs.org/docs/react-api.html#cloneelement
|
|
817
816
|
*/
|
|
818
817
|
function cloneElement(element, config, children) {
|
|
819
|
-
var propName;
|
|
818
|
+
var propName = void 0;
|
|
820
819
|
|
|
821
820
|
// Original props are copied
|
|
822
|
-
var props = objectAssign
|
|
821
|
+
var props = objectAssign({}, element.props);
|
|
823
822
|
|
|
824
823
|
// Reserved names are extracted
|
|
825
824
|
var key = element.key;
|
|
@@ -845,7 +844,7 @@ function cloneElement(element, config, children) {
|
|
|
845
844
|
}
|
|
846
845
|
|
|
847
846
|
// Remaining properties override existing props
|
|
848
|
-
var defaultProps;
|
|
847
|
+
var defaultProps = void 0;
|
|
849
848
|
if (element.type && element.type.defaultProps) {
|
|
850
849
|
defaultProps = element.type.defaultProps;
|
|
851
850
|
}
|
|
@@ -885,7 +884,7 @@ function cloneElement(element, config, children) {
|
|
|
885
884
|
* @final
|
|
886
885
|
*/
|
|
887
886
|
function isValidElement(object) {
|
|
888
|
-
return typeof object === 'object' && object !== null && object.$$typeof === REACT_ELEMENT_TYPE
|
|
887
|
+
return typeof object === 'object' && object !== null && object.$$typeof === REACT_ELEMENT_TYPE;
|
|
889
888
|
}
|
|
890
889
|
|
|
891
890
|
var ReactDebugCurrentFrame = {};
|
|
@@ -903,12 +902,6 @@ var ReactDebugCurrentFrame = {};
|
|
|
903
902
|
};
|
|
904
903
|
}
|
|
905
904
|
|
|
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
905
|
var SEPARATOR = '.';
|
|
913
906
|
var SUBSEPARATOR = ':';
|
|
914
907
|
|
|
@@ -992,10 +985,26 @@ function traverseAllChildrenImpl(children, nameSoFar, callback, traverseContext)
|
|
|
992
985
|
children = null;
|
|
993
986
|
}
|
|
994
987
|
|
|
995
|
-
|
|
996
|
-
|
|
997
|
-
|
|
998
|
-
|
|
988
|
+
var invokeCallback = false;
|
|
989
|
+
|
|
990
|
+
if (children === null) {
|
|
991
|
+
invokeCallback = true;
|
|
992
|
+
} else {
|
|
993
|
+
switch (type) {
|
|
994
|
+
case 'string':
|
|
995
|
+
case 'number':
|
|
996
|
+
invokeCallback = true;
|
|
997
|
+
break;
|
|
998
|
+
case 'object':
|
|
999
|
+
switch (children.$$typeof) {
|
|
1000
|
+
case REACT_ELEMENT_TYPE:
|
|
1001
|
+
case REACT_PORTAL_TYPE:
|
|
1002
|
+
invokeCallback = true;
|
|
1003
|
+
}
|
|
1004
|
+
}
|
|
1005
|
+
}
|
|
1006
|
+
|
|
1007
|
+
if (invokeCallback) {
|
|
999
1008
|
callback(traverseContext, children,
|
|
1000
1009
|
// If it's the only child, treat the name as if it was wrapped in an array
|
|
1001
1010
|
// so that it's consistent if the number of children grows.
|
|
@@ -1003,8 +1012,8 @@ function traverseAllChildrenImpl(children, nameSoFar, callback, traverseContext)
|
|
|
1003
1012
|
return 1;
|
|
1004
1013
|
}
|
|
1005
1014
|
|
|
1006
|
-
var child;
|
|
1007
|
-
var nextName;
|
|
1015
|
+
var child = void 0;
|
|
1016
|
+
var nextName = void 0;
|
|
1008
1017
|
var subtreeCount = 0; // Count of children found in the current subtree.
|
|
1009
1018
|
var nextNamePrefix = nameSoFar === '' ? SEPARATOR : nameSoFar + SUBSEPARATOR;
|
|
1010
1019
|
|
|
@@ -1015,18 +1024,18 @@ function traverseAllChildrenImpl(children, nameSoFar, callback, traverseContext)
|
|
|
1015
1024
|
subtreeCount += traverseAllChildrenImpl(child, nextName, callback, traverseContext);
|
|
1016
1025
|
}
|
|
1017
1026
|
} else {
|
|
1018
|
-
var iteratorFn =
|
|
1027
|
+
var iteratorFn = getIteratorFn(children);
|
|
1019
1028
|
if (typeof iteratorFn === 'function') {
|
|
1020
1029
|
{
|
|
1021
1030
|
// Warn about using Maps as children
|
|
1022
1031
|
if (iteratorFn === children.entries) {
|
|
1023
|
-
warning_1
|
|
1032
|
+
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
1033
|
didWarnAboutMaps = true;
|
|
1025
1034
|
}
|
|
1026
1035
|
}
|
|
1027
1036
|
|
|
1028
1037
|
var iterator = iteratorFn.call(children);
|
|
1029
|
-
var step;
|
|
1038
|
+
var step = void 0;
|
|
1030
1039
|
var ii = 0;
|
|
1031
1040
|
while (!(step = iterator.next()).done) {
|
|
1032
1041
|
child = step.value;
|
|
@@ -1039,7 +1048,7 @@ function traverseAllChildrenImpl(children, nameSoFar, callback, traverseContext)
|
|
|
1039
1048
|
addendum = ' If you meant to render a collection of children, use an array ' + 'instead.' + ReactDebugCurrentFrame.getStackAddendum();
|
|
1040
1049
|
}
|
|
1041
1050
|
var childrenString = '' + children;
|
|
1042
|
-
invariant_1
|
|
1051
|
+
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
1052
|
}
|
|
1044
1053
|
}
|
|
1045
1054
|
|
|
@@ -1209,10 +1218,43 @@ function toArray(children) {
|
|
|
1209
1218
|
* structure.
|
|
1210
1219
|
*/
|
|
1211
1220
|
function onlyChild(children) {
|
|
1212
|
-
!isValidElement(children) ? invariant_1
|
|
1221
|
+
!isValidElement(children) ? invariant_1(false, 'React.Children.only expected to receive a single React element child.') : void 0;
|
|
1213
1222
|
return children;
|
|
1214
1223
|
}
|
|
1215
1224
|
|
|
1225
|
+
function createContext(defaultValue, calculateChangedBits) {
|
|
1226
|
+
if (calculateChangedBits === undefined) {
|
|
1227
|
+
calculateChangedBits = null;
|
|
1228
|
+
} else {
|
|
1229
|
+
{
|
|
1230
|
+
warning_1(calculateChangedBits === null || typeof calculateChangedBits === 'function', 'createContext: Expected the optional second argument to be a ' + 'function. Instead received: %s', calculateChangedBits);
|
|
1231
|
+
}
|
|
1232
|
+
}
|
|
1233
|
+
|
|
1234
|
+
var context = {
|
|
1235
|
+
$$typeof: REACT_CONTEXT_TYPE,
|
|
1236
|
+
calculateChangedBits: calculateChangedBits,
|
|
1237
|
+
defaultValue: defaultValue,
|
|
1238
|
+
currentValue: defaultValue,
|
|
1239
|
+
changedBits: 0,
|
|
1240
|
+
// These are circular
|
|
1241
|
+
Provider: null,
|
|
1242
|
+
Consumer: null
|
|
1243
|
+
};
|
|
1244
|
+
|
|
1245
|
+
context.Provider = {
|
|
1246
|
+
$$typeof: REACT_PROVIDER_TYPE,
|
|
1247
|
+
context: context
|
|
1248
|
+
};
|
|
1249
|
+
context.Consumer = context;
|
|
1250
|
+
|
|
1251
|
+
{
|
|
1252
|
+
context._currentRenderer = null;
|
|
1253
|
+
}
|
|
1254
|
+
|
|
1255
|
+
return context;
|
|
1256
|
+
}
|
|
1257
|
+
|
|
1216
1258
|
var describeComponentFrame = function (name, source, ownerName) {
|
|
1217
1259
|
return '\n in ' + (name || 'Unknown') + (source ? ' (at ' + source.fileName.replace(/^.*[\\\/]/, '') + ':' + source.lineNumber + ')' : ownerName ? ' (created by ' + ownerName + ')' : '');
|
|
1218
1260
|
};
|
|
@@ -1220,11 +1262,21 @@ var describeComponentFrame = function (name, source, ownerName) {
|
|
|
1220
1262
|
function getComponentName(fiber) {
|
|
1221
1263
|
var type = fiber.type;
|
|
1222
1264
|
|
|
1265
|
+
if (typeof type === 'function') {
|
|
1266
|
+
return type.displayName || type.name;
|
|
1267
|
+
}
|
|
1223
1268
|
if (typeof type === 'string') {
|
|
1224
1269
|
return type;
|
|
1225
1270
|
}
|
|
1226
|
-
|
|
1227
|
-
|
|
1271
|
+
switch (type) {
|
|
1272
|
+
case REACT_FRAGMENT_TYPE:
|
|
1273
|
+
return 'ReactFragment';
|
|
1274
|
+
case REACT_PORTAL_TYPE:
|
|
1275
|
+
return 'ReactPortal';
|
|
1276
|
+
case REACT_CALL_TYPE:
|
|
1277
|
+
return 'ReactCall';
|
|
1278
|
+
case REACT_RETURN_TYPE:
|
|
1279
|
+
return 'ReactReturn';
|
|
1228
1280
|
}
|
|
1229
1281
|
return null;
|
|
1230
1282
|
}
|
|
@@ -1252,8 +1304,8 @@ var ReactPropTypesSecret_1 = ReactPropTypesSecret$1;
|
|
|
1252
1304
|
|
|
1253
1305
|
|
|
1254
1306
|
{
|
|
1255
|
-
var invariant$2 = invariant_1
|
|
1256
|
-
var warning$2 = warning_1
|
|
1307
|
+
var invariant$2 = invariant_1;
|
|
1308
|
+
var warning$2 = warning_1;
|
|
1257
1309
|
var ReactPropTypesSecret = ReactPropTypesSecret_1;
|
|
1258
1310
|
var loggedTypeFailures = {};
|
|
1259
1311
|
}
|
|
@@ -1300,7 +1352,7 @@ function checkPropTypes(typeSpecs, values, location, componentName, getStack) {
|
|
|
1300
1352
|
}
|
|
1301
1353
|
}
|
|
1302
1354
|
|
|
1303
|
-
var checkPropTypes_1
|
|
1355
|
+
var checkPropTypes_1 = checkPropTypes;
|
|
1304
1356
|
|
|
1305
1357
|
/**
|
|
1306
1358
|
* ReactElementValidator provides a wrapper around a element factory
|
|
@@ -1309,24 +1361,34 @@ var checkPropTypes_1$1 = checkPropTypes;
|
|
|
1309
1361
|
* that support it.
|
|
1310
1362
|
*/
|
|
1311
1363
|
|
|
1364
|
+
var currentlyValidatingElement = void 0;
|
|
1365
|
+
var propTypesMisspellWarningShown = void 0;
|
|
1366
|
+
|
|
1367
|
+
var getDisplayName = function () {};
|
|
1368
|
+
var getStackAddendum = function () {};
|
|
1369
|
+
|
|
1370
|
+
var VALID_FRAGMENT_PROPS = void 0;
|
|
1371
|
+
|
|
1312
1372
|
{
|
|
1313
|
-
|
|
1373
|
+
currentlyValidatingElement = null;
|
|
1374
|
+
|
|
1375
|
+
propTypesMisspellWarningShown = false;
|
|
1314
1376
|
|
|
1315
|
-
|
|
1377
|
+
getDisplayName = function (element) {
|
|
1316
1378
|
if (element == null) {
|
|
1317
1379
|
return '#empty';
|
|
1318
1380
|
} else if (typeof element === 'string' || typeof element === 'number') {
|
|
1319
1381
|
return '#text';
|
|
1320
1382
|
} else if (typeof element.type === 'string') {
|
|
1321
1383
|
return element.type;
|
|
1322
|
-
} else if (element.type === REACT_FRAGMENT_TYPE
|
|
1384
|
+
} else if (element.type === REACT_FRAGMENT_TYPE) {
|
|
1323
1385
|
return 'React.Fragment';
|
|
1324
1386
|
} else {
|
|
1325
1387
|
return element.type.displayName || element.type.name || 'Unknown';
|
|
1326
1388
|
}
|
|
1327
1389
|
};
|
|
1328
1390
|
|
|
1329
|
-
|
|
1391
|
+
getStackAddendum = function () {
|
|
1330
1392
|
var stack = '';
|
|
1331
1393
|
if (currentlyValidatingElement) {
|
|
1332
1394
|
var name = getDisplayName(currentlyValidatingElement);
|
|
@@ -1337,14 +1399,9 @@ var checkPropTypes_1$1 = checkPropTypes;
|
|
|
1337
1399
|
return stack;
|
|
1338
1400
|
};
|
|
1339
1401
|
|
|
1340
|
-
|
|
1341
|
-
|
|
1342
|
-
var VALID_FRAGMENT_PROPS = new Map([['children', true], ['key', true]]);
|
|
1402
|
+
VALID_FRAGMENT_PROPS = new Map([['children', true], ['key', true]]);
|
|
1343
1403
|
}
|
|
1344
1404
|
|
|
1345
|
-
var ITERATOR_SYMBOL$1 = typeof Symbol === 'function' && Symbol.iterator;
|
|
1346
|
-
var FAUX_ITERATOR_SYMBOL$1 = '@@iterator'; // Before Symbol spec.
|
|
1347
|
-
|
|
1348
1405
|
function getDeclarationErrorAddendum() {
|
|
1349
1406
|
if (ReactCurrentOwner.current) {
|
|
1350
1407
|
var name = getComponentName(ReactCurrentOwner.current);
|
|
@@ -1418,7 +1475,7 @@ function validateExplicitKey(element, parentType) {
|
|
|
1418
1475
|
|
|
1419
1476
|
currentlyValidatingElement = element;
|
|
1420
1477
|
{
|
|
1421
|
-
warning_1
|
|
1478
|
+
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
1479
|
}
|
|
1423
1480
|
currentlyValidatingElement = null;
|
|
1424
1481
|
}
|
|
@@ -1449,13 +1506,13 @@ function validateChildKeys(node, parentType) {
|
|
|
1449
1506
|
node._store.validated = true;
|
|
1450
1507
|
}
|
|
1451
1508
|
} else if (node) {
|
|
1452
|
-
var iteratorFn =
|
|
1509
|
+
var iteratorFn = getIteratorFn(node);
|
|
1453
1510
|
if (typeof iteratorFn === 'function') {
|
|
1454
1511
|
// Entry iterators used to provide implicit keys,
|
|
1455
1512
|
// but now we print a separate warning for them later.
|
|
1456
1513
|
if (iteratorFn !== node.entries) {
|
|
1457
1514
|
var iterator = iteratorFn.call(node);
|
|
1458
|
-
var step;
|
|
1515
|
+
var step = void 0;
|
|
1459
1516
|
while (!(step = iterator.next()).done) {
|
|
1460
1517
|
if (isValidElement(step.value)) {
|
|
1461
1518
|
validateExplicitKey(step.value, parentType);
|
|
@@ -1479,14 +1536,16 @@ function validatePropTypes(element) {
|
|
|
1479
1536
|
}
|
|
1480
1537
|
var name = componentClass.displayName || componentClass.name;
|
|
1481
1538
|
var propTypes = componentClass.propTypes;
|
|
1482
|
-
|
|
1483
1539
|
if (propTypes) {
|
|
1484
1540
|
currentlyValidatingElement = element;
|
|
1485
|
-
checkPropTypes_1
|
|
1541
|
+
checkPropTypes_1(propTypes, element.props, 'prop', name, getStackAddendum);
|
|
1486
1542
|
currentlyValidatingElement = null;
|
|
1543
|
+
} else if (componentClass.PropTypes !== undefined && !propTypesMisspellWarningShown) {
|
|
1544
|
+
propTypesMisspellWarningShown = true;
|
|
1545
|
+
warning_1(false, 'Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?', name || 'Unknown');
|
|
1487
1546
|
}
|
|
1488
1547
|
if (typeof componentClass.getDefaultProps === 'function') {
|
|
1489
|
-
warning_1
|
|
1548
|
+
warning_1(componentClass.getDefaultProps.isReactClassApproved, 'getDefaultProps is only used on classic React.createClass ' + 'definitions. Use a static property named `defaultProps` instead.');
|
|
1490
1549
|
}
|
|
1491
1550
|
}
|
|
1492
1551
|
|
|
@@ -1497,49 +1556,33 @@ function validatePropTypes(element) {
|
|
|
1497
1556
|
function validateFragmentProps(fragment) {
|
|
1498
1557
|
currentlyValidatingElement = fragment;
|
|
1499
1558
|
|
|
1500
|
-
var
|
|
1501
|
-
var
|
|
1502
|
-
|
|
1503
|
-
|
|
1504
|
-
|
|
1505
|
-
|
|
1506
|
-
var key = _step.value;
|
|
1507
|
-
|
|
1508
|
-
if (!VALID_FRAGMENT_PROPS.has(key)) {
|
|
1509
|
-
warning_1$1(false, 'Invalid prop `%s` supplied to `React.Fragment`. ' + 'React.Fragment can only have `key` and `children` props.%s', key, getStackAddendum());
|
|
1510
|
-
break;
|
|
1511
|
-
}
|
|
1512
|
-
}
|
|
1513
|
-
} catch (err) {
|
|
1514
|
-
_didIteratorError = true;
|
|
1515
|
-
_iteratorError = err;
|
|
1516
|
-
} finally {
|
|
1517
|
-
try {
|
|
1518
|
-
if (!_iteratorNormalCompletion && _iterator['return']) {
|
|
1519
|
-
_iterator['return']();
|
|
1520
|
-
}
|
|
1521
|
-
} finally {
|
|
1522
|
-
if (_didIteratorError) {
|
|
1523
|
-
throw _iteratorError;
|
|
1524
|
-
}
|
|
1559
|
+
var keys = Object.keys(fragment.props);
|
|
1560
|
+
for (var i = 0; i < keys.length; i++) {
|
|
1561
|
+
var key = keys[i];
|
|
1562
|
+
if (!VALID_FRAGMENT_PROPS.has(key)) {
|
|
1563
|
+
warning_1(false, 'Invalid prop `%s` supplied to `React.Fragment`. ' + 'React.Fragment can only have `key` and `children` props.%s', key, getStackAddendum());
|
|
1564
|
+
break;
|
|
1525
1565
|
}
|
|
1526
1566
|
}
|
|
1527
1567
|
|
|
1528
1568
|
if (fragment.ref !== null) {
|
|
1529
|
-
warning_1
|
|
1569
|
+
warning_1(false, 'Invalid attribute `ref` supplied to `React.Fragment`.%s', getStackAddendum());
|
|
1530
1570
|
}
|
|
1531
1571
|
|
|
1532
1572
|
currentlyValidatingElement = null;
|
|
1533
1573
|
}
|
|
1534
1574
|
|
|
1535
1575
|
function createElementWithValidation(type, props, children) {
|
|
1536
|
-
var validType = typeof type === 'string' || typeof type === 'function' ||
|
|
1576
|
+
var validType = typeof type === 'string' || typeof type === 'function' ||
|
|
1577
|
+
// Note: its typeof might be other than 'symbol' or 'number' if it's a polyfill.
|
|
1578
|
+
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);
|
|
1579
|
+
|
|
1537
1580
|
// We warn in this case but don't throw. We expect the element creation to
|
|
1538
1581
|
// succeed and there will likely be errors in render.
|
|
1539
1582
|
if (!validType) {
|
|
1540
1583
|
var info = '';
|
|
1541
1584
|
if (type === undefined || typeof type === 'object' && type !== null && Object.keys(type).length === 0) {
|
|
1542
|
-
info += ' You likely forgot to export your component from the file ' + "it's defined in.";
|
|
1585
|
+
info += ' You likely forgot to export your component from the file ' + "it's defined in, or you might have mixed up default and named imports.";
|
|
1543
1586
|
}
|
|
1544
1587
|
|
|
1545
1588
|
var sourceInfo = getSourceInfoErrorAddendum(props);
|
|
@@ -1551,7 +1594,16 @@ function createElementWithValidation(type, props, children) {
|
|
|
1551
1594
|
|
|
1552
1595
|
info += getStackAddendum() || '';
|
|
1553
1596
|
|
|
1554
|
-
|
|
1597
|
+
var typeString = void 0;
|
|
1598
|
+
if (type === null) {
|
|
1599
|
+
typeString = 'null';
|
|
1600
|
+
} else if (Array.isArray(type)) {
|
|
1601
|
+
typeString = 'array';
|
|
1602
|
+
} else {
|
|
1603
|
+
typeString = typeof type;
|
|
1604
|
+
}
|
|
1605
|
+
|
|
1606
|
+
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', typeString, info);
|
|
1555
1607
|
}
|
|
1556
1608
|
|
|
1557
1609
|
var element = createElement.apply(this, arguments);
|
|
@@ -1573,7 +1625,7 @@ function createElementWithValidation(type, props, children) {
|
|
|
1573
1625
|
}
|
|
1574
1626
|
}
|
|
1575
1627
|
|
|
1576
|
-
if (
|
|
1628
|
+
if (type === REACT_FRAGMENT_TYPE) {
|
|
1577
1629
|
validateFragmentProps(element);
|
|
1578
1630
|
} else {
|
|
1579
1631
|
validatePropTypes(element);
|
|
@@ -1584,9 +1636,8 @@ function createElementWithValidation(type, props, children) {
|
|
|
1584
1636
|
|
|
1585
1637
|
function createFactoryWithValidation(type) {
|
|
1586
1638
|
var validatedFactory = createElementWithValidation.bind(null, type);
|
|
1587
|
-
// Legacy hook TODO: Warn if this is accessed
|
|
1588
1639
|
validatedFactory.type = type;
|
|
1589
|
-
|
|
1640
|
+
// Legacy hook: remove it
|
|
1590
1641
|
{
|
|
1591
1642
|
Object.defineProperty(validatedFactory, 'type', {
|
|
1592
1643
|
enumerable: false,
|
|
@@ -1612,8 +1663,6 @@ function cloneElementWithValidation(element, props, children) {
|
|
|
1612
1663
|
return newElement;
|
|
1613
1664
|
}
|
|
1614
1665
|
|
|
1615
|
-
var REACT_FRAGMENT_TYPE = typeof Symbol === 'function' && Symbol['for'] && Symbol['for']('react.fragment') || 0xeacb;
|
|
1616
|
-
|
|
1617
1666
|
var React = {
|
|
1618
1667
|
Children: {
|
|
1619
1668
|
map: mapChildren,
|
|
@@ -1623,9 +1672,15 @@ var React = {
|
|
|
1623
1672
|
only: onlyChild
|
|
1624
1673
|
},
|
|
1625
1674
|
|
|
1675
|
+
createRef: createRef,
|
|
1626
1676
|
Component: Component,
|
|
1627
1677
|
PureComponent: PureComponent,
|
|
1628
|
-
|
|
1678
|
+
|
|
1679
|
+
createContext: createContext,
|
|
1680
|
+
|
|
1681
|
+
Fragment: REACT_FRAGMENT_TYPE,
|
|
1682
|
+
StrictMode: REACT_STRICT_MODE_TYPE,
|
|
1683
|
+
unstable_AsyncMode: REACT_ASYNC_MODE_TYPE,
|
|
1629
1684
|
|
|
1630
1685
|
createElement: createElementWithValidation,
|
|
1631
1686
|
cloneElement: cloneElementWithValidation,
|
|
@@ -1637,16 +1692,12 @@ var React = {
|
|
|
1637
1692
|
__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED: {
|
|
1638
1693
|
ReactCurrentOwner: ReactCurrentOwner,
|
|
1639
1694
|
// Used by renderers to avoid bundling object-assign twice in UMD bundles:
|
|
1640
|
-
assign: objectAssign
|
|
1695
|
+
assign: objectAssign
|
|
1641
1696
|
}
|
|
1642
1697
|
};
|
|
1643
1698
|
|
|
1644
|
-
if (enableReactFragment) {
|
|
1645
|
-
React.Fragment = REACT_FRAGMENT_TYPE;
|
|
1646
|
-
}
|
|
1647
|
-
|
|
1648
1699
|
{
|
|
1649
|
-
objectAssign
|
|
1700
|
+
objectAssign(React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED, {
|
|
1650
1701
|
// These should not be included in production.
|
|
1651
1702
|
ReactDebugCurrentFrame: ReactDebugCurrentFrame,
|
|
1652
1703
|
// Shim for React DOM 16.0.0 which still destructured (but not used) this.
|