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