react-dom 16.5.2 → 16.6.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-dom-server.browser.development.js +124 -82
- package/cjs/react-dom-server.browser.production.min.js +35 -33
- package/cjs/react-dom-server.node.development.js +126 -84
- package/cjs/react-dom-server.node.production.min.js +38 -36
- package/cjs/react-dom-test-utils.development.js +8 -10
- package/cjs/react-dom-test-utils.production.min.js +4 -4
- package/cjs/react-dom-unstable-native-dependencies.development.js +3 -3
- package/cjs/react-dom-unstable-native-dependencies.production.min.js +2 -2
- package/cjs/react-dom.development.js +1468 -837
- package/cjs/react-dom.production.min.js +236 -221
- package/cjs/react-dom.profiling.min.js +240 -229
- package/package.json +2 -2
- package/umd/react-dom-server.browser.development.js +124 -82
- package/umd/react-dom-server.browser.production.min.js +31 -29
- package/umd/react-dom-test-utils.development.js +8 -10
- package/umd/react-dom-test-utils.production.min.js +8 -8
- package/umd/react-dom-unstable-native-dependencies.development.js +3 -3
- package/umd/react-dom-unstable-native-dependencies.production.min.js +2 -2
- package/umd/react-dom.development.js +1463 -832
- package/umd/react-dom.production.min.js +193 -182
- package/umd/react-dom.profiling.min.js +197 -187
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "react-dom",
|
|
3
|
-
"version": "16.
|
|
3
|
+
"version": "16.6.0",
|
|
4
4
|
"description": "React package for working with the DOM.",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"repository": "facebook/react",
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
"loose-envify": "^1.1.0",
|
|
17
17
|
"object-assign": "^4.1.1",
|
|
18
18
|
"prop-types": "^15.6.2",
|
|
19
|
-
"
|
|
19
|
+
"scheduler": "^0.10.0"
|
|
20
20
|
},
|
|
21
21
|
"peerDependencies": {
|
|
22
22
|
"react": "^16.0.0"
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/** @license React v16.
|
|
1
|
+
/** @license React v16.6.0
|
|
2
2
|
* react-dom-server.browser.development.js
|
|
3
3
|
*
|
|
4
4
|
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
@@ -62,7 +62,7 @@ function invariant(condition, format, a, b, c, d, e, f) {
|
|
|
62
62
|
|
|
63
63
|
// TODO: this is special because it gets imported during build.
|
|
64
64
|
|
|
65
|
-
var ReactVersion = '16.
|
|
65
|
+
var ReactVersion = '16.6.0';
|
|
66
66
|
|
|
67
67
|
var ReactInternals = React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
|
|
68
68
|
|
|
@@ -168,17 +168,22 @@ var REACT_STRICT_MODE_TYPE = hasSymbol ? Symbol.for('react.strict_mode') : 0xeac
|
|
|
168
168
|
var REACT_PROFILER_TYPE = hasSymbol ? Symbol.for('react.profiler') : 0xead2;
|
|
169
169
|
var REACT_PROVIDER_TYPE = hasSymbol ? Symbol.for('react.provider') : 0xeacd;
|
|
170
170
|
var REACT_CONTEXT_TYPE = hasSymbol ? Symbol.for('react.context') : 0xeace;
|
|
171
|
-
var
|
|
171
|
+
var REACT_CONCURRENT_MODE_TYPE = hasSymbol ? Symbol.for('react.concurrent_mode') : 0xeacf;
|
|
172
172
|
var REACT_FORWARD_REF_TYPE = hasSymbol ? Symbol.for('react.forward_ref') : 0xead0;
|
|
173
|
-
var
|
|
173
|
+
var REACT_SUSPENSE_TYPE = hasSymbol ? Symbol.for('react.suspense') : 0xead1;
|
|
174
|
+
var REACT_MEMO_TYPE = hasSymbol ? Symbol.for('react.memo') : 0xead3;
|
|
175
|
+
var REACT_LAZY_TYPE = hasSymbol ? Symbol.for('react.lazy') : 0xead4;
|
|
174
176
|
|
|
175
177
|
var Resolved = 1;
|
|
176
178
|
|
|
177
179
|
|
|
180
|
+
function refineResolvedLazyComponent(lazyComponent) {
|
|
181
|
+
return lazyComponent._status === Resolved ? lazyComponent._result : null;
|
|
182
|
+
}
|
|
178
183
|
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
return
|
|
184
|
+
function getWrappedName(outerType, innerType, wrapperName) {
|
|
185
|
+
var functionName = innerType.displayName || innerType.name || '';
|
|
186
|
+
return outerType.displayName || (functionName !== '' ? wrapperName + '(' + functionName + ')' : wrapperName);
|
|
182
187
|
}
|
|
183
188
|
|
|
184
189
|
function getComponentName(type) {
|
|
@@ -198,8 +203,8 @@ function getComponentName(type) {
|
|
|
198
203
|
return type;
|
|
199
204
|
}
|
|
200
205
|
switch (type) {
|
|
201
|
-
case
|
|
202
|
-
return '
|
|
206
|
+
case REACT_CONCURRENT_MODE_TYPE:
|
|
207
|
+
return 'ConcurrentMode';
|
|
203
208
|
case REACT_FRAGMENT_TYPE:
|
|
204
209
|
return 'Fragment';
|
|
205
210
|
case REACT_PORTAL_TYPE:
|
|
@@ -208,8 +213,8 @@ function getComponentName(type) {
|
|
|
208
213
|
return 'Profiler';
|
|
209
214
|
case REACT_STRICT_MODE_TYPE:
|
|
210
215
|
return 'StrictMode';
|
|
211
|
-
case
|
|
212
|
-
return '
|
|
216
|
+
case REACT_SUSPENSE_TYPE:
|
|
217
|
+
return 'Suspense';
|
|
213
218
|
}
|
|
214
219
|
if (typeof type === 'object') {
|
|
215
220
|
switch (type.$$typeof) {
|
|
@@ -218,16 +223,17 @@ function getComponentName(type) {
|
|
|
218
223
|
case REACT_PROVIDER_TYPE:
|
|
219
224
|
return 'Context.Provider';
|
|
220
225
|
case REACT_FORWARD_REF_TYPE:
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
return type.
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
226
|
+
return getWrappedName(type, type.render, 'ForwardRef');
|
|
227
|
+
case REACT_MEMO_TYPE:
|
|
228
|
+
return getComponentName(type.type);
|
|
229
|
+
case REACT_LAZY_TYPE:
|
|
230
|
+
{
|
|
231
|
+
var thenable = type;
|
|
232
|
+
var resolvedThenable = refineResolvedLazyComponent(thenable);
|
|
233
|
+
if (resolvedThenable) {
|
|
234
|
+
return getComponentName(resolvedThenable);
|
|
235
|
+
}
|
|
236
|
+
}
|
|
231
237
|
}
|
|
232
238
|
}
|
|
233
239
|
return null;
|
|
@@ -449,14 +455,6 @@ var describeComponentFrame = function (name, source, ownerName) {
|
|
|
449
455
|
return '\n in ' + (name || 'Unknown') + sourceInfo;
|
|
450
456
|
};
|
|
451
457
|
|
|
452
|
-
// Exports ReactDOM.createRoot
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
// Experimental error-boundary API that can recover from errors within a single
|
|
456
|
-
// render phase
|
|
457
|
-
|
|
458
|
-
// Suspense
|
|
459
|
-
|
|
460
458
|
// Helps identify side effects in begin-phase lifecycle hooks and setState reducers:
|
|
461
459
|
|
|
462
460
|
|
|
@@ -473,9 +471,6 @@ var describeComponentFrame = function (name, source, ownerName) {
|
|
|
473
471
|
// Warn about deprecated, async-unsafe lifecycles; relates to RFC #6:
|
|
474
472
|
var warnAboutDeprecatedLifecycles = false;
|
|
475
473
|
|
|
476
|
-
// Warn about legacy context API
|
|
477
|
-
|
|
478
|
-
|
|
479
474
|
// Gather advanced timing metrics for Profiler subtrees.
|
|
480
475
|
|
|
481
476
|
|
|
@@ -2164,6 +2159,7 @@ var toArray = React.Children.toArray;
|
|
|
2164
2159
|
// Each stack is an array of frames which may contain nested stacks of elements.
|
|
2165
2160
|
var currentDebugStacks = [];
|
|
2166
2161
|
|
|
2162
|
+
var ReactCurrentOwner = ReactSharedInternals.ReactCurrentOwner;
|
|
2167
2163
|
var ReactDebugCurrentFrame = void 0;
|
|
2168
2164
|
var prevGetCurrentStackImpl = null;
|
|
2169
2165
|
var getCurrentServerStackImpl = function () {
|
|
@@ -2178,6 +2174,12 @@ var pushCurrentDebugStack = function (stack) {};
|
|
|
2178
2174
|
var pushElementToDebugStack = function (element) {};
|
|
2179
2175
|
var popCurrentDebugStack = function () {};
|
|
2180
2176
|
|
|
2177
|
+
var Dispatcher = {
|
|
2178
|
+
readContext: function (context, observedBits) {
|
|
2179
|
+
return context._currentValue;
|
|
2180
|
+
}
|
|
2181
|
+
};
|
|
2182
|
+
|
|
2181
2183
|
{
|
|
2182
2184
|
ReactDebugCurrentFrame = ReactSharedInternals.ReactDebugCurrentFrame;
|
|
2183
2185
|
|
|
@@ -2263,6 +2265,7 @@ var didWarnAboutBadClass = {};
|
|
|
2263
2265
|
var didWarnAboutDeprecatedWillMount = {};
|
|
2264
2266
|
var didWarnAboutUndefinedDerivedState = {};
|
|
2265
2267
|
var didWarnAboutUninitializedState = {};
|
|
2268
|
+
var didWarnAboutInvalidateContextType = {};
|
|
2266
2269
|
var valuePropNames = ['value', 'defaultValue'];
|
|
2267
2270
|
var newlineEatingTags = {
|
|
2268
2271
|
listing: true,
|
|
@@ -2411,13 +2414,27 @@ function checkContextTypes(typeSpecs, values, location) {
|
|
|
2411
2414
|
}
|
|
2412
2415
|
|
|
2413
2416
|
function processContext(type, context) {
|
|
2414
|
-
var
|
|
2415
|
-
{
|
|
2416
|
-
|
|
2417
|
-
|
|
2417
|
+
var contextType = type.contextType;
|
|
2418
|
+
if (typeof contextType === 'object' && contextType !== null) {
|
|
2419
|
+
{
|
|
2420
|
+
if (contextType.$$typeof !== REACT_CONTEXT_TYPE) {
|
|
2421
|
+
var name = getComponentName(type) || 'Component';
|
|
2422
|
+
if (!didWarnAboutInvalidateContextType[name]) {
|
|
2423
|
+
didWarnAboutInvalidateContextType[type] = true;
|
|
2424
|
+
warningWithoutStack$1(false, '%s defines an invalid contextType. ' + 'contextType should point to the Context object returned by React.createContext(). ' + 'Did you accidentally pass the Context.Provider instead?', name);
|
|
2425
|
+
}
|
|
2426
|
+
}
|
|
2427
|
+
}
|
|
2428
|
+
return contextType._currentValue;
|
|
2429
|
+
} else {
|
|
2430
|
+
var maskedContext = maskContext(type, context);
|
|
2431
|
+
{
|
|
2432
|
+
if (type.contextTypes) {
|
|
2433
|
+
checkContextTypes(type.contextTypes, maskedContext, 'context');
|
|
2434
|
+
}
|
|
2418
2435
|
}
|
|
2436
|
+
return maskedContext;
|
|
2419
2437
|
}
|
|
2420
|
-
return maskedContext;
|
|
2421
2438
|
}
|
|
2422
2439
|
|
|
2423
2440
|
var hasOwnProperty = Object.prototype.hasOwnProperty;
|
|
@@ -2752,42 +2769,47 @@ var ReactDOMServerRenderer = function () {
|
|
|
2752
2769
|
return null;
|
|
2753
2770
|
}
|
|
2754
2771
|
|
|
2755
|
-
|
|
2756
|
-
|
|
2757
|
-
|
|
2758
|
-
|
|
2759
|
-
|
|
2760
|
-
|
|
2761
|
-
|
|
2762
|
-
if (frame.childIndex >= frame.children.length) {
|
|
2763
|
-
var _footer = frame.footer;
|
|
2764
|
-
out += _footer;
|
|
2765
|
-
if (_footer !== '') {
|
|
2766
|
-
this.previousWasTextNode = false;
|
|
2772
|
+
ReactCurrentOwner.currentDispatcher = Dispatcher;
|
|
2773
|
+
try {
|
|
2774
|
+
var out = '';
|
|
2775
|
+
while (out.length < bytes) {
|
|
2776
|
+
if (this.stack.length === 0) {
|
|
2777
|
+
this.exhausted = true;
|
|
2778
|
+
break;
|
|
2767
2779
|
}
|
|
2768
|
-
this.stack.
|
|
2769
|
-
if (frame.
|
|
2770
|
-
|
|
2771
|
-
|
|
2772
|
-
|
|
2773
|
-
|
|
2780
|
+
var frame = this.stack[this.stack.length - 1];
|
|
2781
|
+
if (frame.childIndex >= frame.children.length) {
|
|
2782
|
+
var _footer = frame.footer;
|
|
2783
|
+
out += _footer;
|
|
2784
|
+
if (_footer !== '') {
|
|
2785
|
+
this.previousWasTextNode = false;
|
|
2786
|
+
}
|
|
2787
|
+
this.stack.pop();
|
|
2788
|
+
if (frame.type === 'select') {
|
|
2789
|
+
this.currentSelectValue = null;
|
|
2790
|
+
} else if (frame.type != null && frame.type.type != null && frame.type.type.$$typeof === REACT_PROVIDER_TYPE) {
|
|
2791
|
+
var provider = frame.type;
|
|
2792
|
+
this.popProvider(provider);
|
|
2793
|
+
}
|
|
2794
|
+
continue;
|
|
2774
2795
|
}
|
|
2775
|
-
|
|
2776
|
-
|
|
2777
|
-
|
|
2778
|
-
|
|
2779
|
-
|
|
2780
|
-
|
|
2781
|
-
|
|
2782
|
-
|
|
2783
|
-
|
|
2784
|
-
|
|
2785
|
-
|
|
2786
|
-
popCurrentDebugStack();
|
|
2796
|
+
var child = frame.children[frame.childIndex++];
|
|
2797
|
+
{
|
|
2798
|
+
pushCurrentDebugStack(this.stack);
|
|
2799
|
+
// We're starting work on this frame, so reset its inner stack.
|
|
2800
|
+
frame.debugElementStack.length = 0;
|
|
2801
|
+
try {
|
|
2802
|
+
// Be careful! Make sure this matches the PROD path below.
|
|
2803
|
+
out += this.render(child, frame.context, frame.domNamespace);
|
|
2804
|
+
} finally {
|
|
2805
|
+
popCurrentDebugStack();
|
|
2806
|
+
}
|
|
2787
2807
|
}
|
|
2788
2808
|
}
|
|
2809
|
+
return out;
|
|
2810
|
+
} finally {
|
|
2811
|
+
ReactCurrentOwner.currentDispatcher = null;
|
|
2789
2812
|
}
|
|
2790
|
-
return out;
|
|
2791
2813
|
};
|
|
2792
2814
|
|
|
2793
2815
|
ReactDOMServerRenderer.prototype.render = function render(child, context, parentNamespace) {
|
|
@@ -2847,7 +2869,7 @@ var ReactDOMServerRenderer = function () {
|
|
|
2847
2869
|
|
|
2848
2870
|
switch (elementType) {
|
|
2849
2871
|
case REACT_STRICT_MODE_TYPE:
|
|
2850
|
-
case
|
|
2872
|
+
case REACT_CONCURRENT_MODE_TYPE:
|
|
2851
2873
|
case REACT_PROFILER_TYPE:
|
|
2852
2874
|
case REACT_FRAGMENT_TYPE:
|
|
2853
2875
|
{
|
|
@@ -2866,7 +2888,7 @@ var ReactDOMServerRenderer = function () {
|
|
|
2866
2888
|
this.stack.push(_frame);
|
|
2867
2889
|
return '';
|
|
2868
2890
|
}
|
|
2869
|
-
case
|
|
2891
|
+
case REACT_SUSPENSE_TYPE:
|
|
2870
2892
|
{
|
|
2871
2893
|
if (enableSuspenseServerRenderer) {
|
|
2872
2894
|
var _nextChildren2 = toArray(
|
|
@@ -2885,6 +2907,8 @@ var ReactDOMServerRenderer = function () {
|
|
|
2885
2907
|
}
|
|
2886
2908
|
this.stack.push(_frame2);
|
|
2887
2909
|
return '';
|
|
2910
|
+
} else {
|
|
2911
|
+
invariant(false, 'ReactDOMServer does not yet support Suspense.');
|
|
2888
2912
|
}
|
|
2889
2913
|
}
|
|
2890
2914
|
// eslint-disable-next-line-no-fallthrough
|
|
@@ -2911,26 +2935,44 @@ var ReactDOMServerRenderer = function () {
|
|
|
2911
2935
|
this.stack.push(_frame3);
|
|
2912
2936
|
return '';
|
|
2913
2937
|
}
|
|
2938
|
+
case REACT_MEMO_TYPE:
|
|
2939
|
+
{
|
|
2940
|
+
var _element = nextChild;
|
|
2941
|
+
var _nextChildren4 = [React.createElement(elementType.type, _assign({ ref: _element.ref }, _element.props))];
|
|
2942
|
+
var _frame4 = {
|
|
2943
|
+
type: null,
|
|
2944
|
+
domNamespace: parentNamespace,
|
|
2945
|
+
children: _nextChildren4,
|
|
2946
|
+
childIndex: 0,
|
|
2947
|
+
context: context,
|
|
2948
|
+
footer: ''
|
|
2949
|
+
};
|
|
2950
|
+
{
|
|
2951
|
+
_frame4.debugElementStack = [];
|
|
2952
|
+
}
|
|
2953
|
+
this.stack.push(_frame4);
|
|
2954
|
+
return '';
|
|
2955
|
+
}
|
|
2914
2956
|
case REACT_PROVIDER_TYPE:
|
|
2915
2957
|
{
|
|
2916
2958
|
var provider = nextChild;
|
|
2917
2959
|
var nextProps = provider.props;
|
|
2918
|
-
var
|
|
2919
|
-
var
|
|
2960
|
+
var _nextChildren5 = toArray(nextProps.children);
|
|
2961
|
+
var _frame5 = {
|
|
2920
2962
|
type: provider,
|
|
2921
2963
|
domNamespace: parentNamespace,
|
|
2922
|
-
children:
|
|
2964
|
+
children: _nextChildren5,
|
|
2923
2965
|
childIndex: 0,
|
|
2924
2966
|
context: context,
|
|
2925
2967
|
footer: ''
|
|
2926
2968
|
};
|
|
2927
2969
|
{
|
|
2928
|
-
|
|
2970
|
+
_frame5.debugElementStack = [];
|
|
2929
2971
|
}
|
|
2930
2972
|
|
|
2931
2973
|
this.pushProvider(provider);
|
|
2932
2974
|
|
|
2933
|
-
this.stack.push(
|
|
2975
|
+
this.stack.push(_frame5);
|
|
2934
2976
|
return '';
|
|
2935
2977
|
}
|
|
2936
2978
|
case REACT_CONTEXT_TYPE:
|
|
@@ -2939,23 +2981,23 @@ var ReactDOMServerRenderer = function () {
|
|
|
2939
2981
|
var _nextProps = consumer.props;
|
|
2940
2982
|
var nextValue = consumer.type._currentValue;
|
|
2941
2983
|
|
|
2942
|
-
var
|
|
2943
|
-
var
|
|
2984
|
+
var _nextChildren6 = toArray(_nextProps.children(nextValue));
|
|
2985
|
+
var _frame6 = {
|
|
2944
2986
|
type: nextChild,
|
|
2945
2987
|
domNamespace: parentNamespace,
|
|
2946
|
-
children:
|
|
2988
|
+
children: _nextChildren6,
|
|
2947
2989
|
childIndex: 0,
|
|
2948
2990
|
context: context,
|
|
2949
2991
|
footer: ''
|
|
2950
2992
|
};
|
|
2951
2993
|
{
|
|
2952
|
-
|
|
2994
|
+
_frame6.debugElementStack = [];
|
|
2953
2995
|
}
|
|
2954
|
-
this.stack.push(
|
|
2996
|
+
this.stack.push(_frame6);
|
|
2955
2997
|
return '';
|
|
2956
2998
|
}
|
|
2957
|
-
|
|
2958
|
-
|
|
2999
|
+
case REACT_LAZY_TYPE:
|
|
3000
|
+
invariant(false, 'ReactDOMServer does not yet support lazy-loaded components.');
|
|
2959
3001
|
}
|
|
2960
3002
|
}
|
|
2961
3003
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/** @license React v16.
|
|
1
|
+
/** @license React v16.6.0
|
|
2
2
|
* react-dom-server.browser.production.min.js
|
|
3
3
|
*
|
|
4
4
|
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
@@ -6,31 +6,33 @@
|
|
|
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
|
-
"Invariant Violation"}a.framesToPop=1;throw a;}}function
|
|
11
|
-
switch(a){case I:return"
|
|
12
|
-
|
|
13
|
-
case 6:return isNaN(b)||1>b}return!1}function
|
|
14
|
-
c&&(d+=a.substring(
|
|
15
|
-
function
|
|
16
|
-
d,
|
|
17
|
-
1===
|
|
18
|
-
context:b}}var
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
!1;
|
|
9
|
+
'use strict';(function(r,w){"object"===typeof exports&&"undefined"!==typeof module?module.exports=w(require("react")):"function"===typeof define&&define.amd?define(["react"],w):r.ReactDOMServer=w(r.React)})(this,function(r){function w(a,b,d,c,m,g,k,da){if(!a){a=void 0;if(void 0===b)a=Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var e=[d,c,m,g,k,da],t=0;a=Error(b.replace(/%s/g,function(){return e[t++]}));
|
|
10
|
+
a.name="Invariant Violation"}a.framesToPop=1;throw a;}}function t(a){for(var b=arguments.length-1,d="https://reactjs.org/docs/error-decoder.html?invariant="+a,c=0;c<b;c++)d+="&args[]="+encodeURIComponent(arguments[c+1]);w(!1,"Minified React error #"+a+"; visit %s for the full message or use the non-minified dev environment for full errors and additional helpful warnings. ",d)}function A(a){if(null==a)return null;if("function"===typeof a)return a.displayName||a.name||null;if("string"===typeof a)return a;
|
|
11
|
+
switch(a){case I:return"ConcurrentMode";case D:return"Fragment";case J:return"Portal";case K:return"Profiler";case L:return"StrictMode";case M:return"Suspense"}if("object"===typeof a)switch(a.$$typeof){case N:return"Context.Consumer";case E:return"Context.Provider";case O:var b=a.render;b=b.displayName||b.name||"";return a.displayName||(""!==b?"ForwardRef("+b+")":"ForwardRef");case P:return A(a.type);case Q:if(a=1===a._status?a._result:null)return A(a)}return null}function R(a){if(S.call(T,a))return!0;
|
|
12
|
+
if(S.call(U,a))return!1;if(ea.test(a))return T[a]=!0;U[a]=!0;return!1}function fa(a,b,d,c){if(null!==d&&0===d.type)return!1;switch(typeof b){case "function":case "symbol":return!0;case "boolean":if(c)return!1;if(null!==d)return!d.acceptsBooleans;a=a.toLowerCase().slice(0,5);return"data-"!==a&&"aria-"!==a;default:return!1}}function ha(a,b,d,c){if(null===b||"undefined"===typeof b||fa(a,b,d,c))return!0;if(c)return!1;if(null!==d)switch(d.type){case 3:return!b;case 4:return!1===b;case 5:return isNaN(b);
|
|
13
|
+
case 6:return isNaN(b)||1>b}return!1}function p(a,b,d,c,m){this.acceptsBooleans=2===b||3===b||4===b;this.attributeName=c;this.attributeNamespace=m;this.mustUseProperty=d;this.propertyName=a;this.type=b}function y(a){if("boolean"===typeof a||"number"===typeof a)return""+a;a=""+a;var b=ia.exec(a);if(b){var d="",c,m=0;for(c=b.index;c<a.length;c++){switch(a.charCodeAt(c)){case 34:b=""";break;case 38:b="&";break;case 39:b="'";break;case 60:b="<";break;case 62:b=">";break;default:continue}m!==
|
|
14
|
+
c&&(d+=a.substring(m,c));m=c+1;d+=b}a=m!==c?d+a.substring(m,c):d}return a}function V(a){switch(a){case "svg":return"http://www.w3.org/2000/svg";case "math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function ja(a){if(void 0===a||null===a)return a;var b="";r.Children.forEach(a,function(a){null!=a&&(b+=a)});return b}function ka(a,b){var d=a.contextType;if("object"===typeof d&&null!==d)return d._currentValue;if(a=a.contextTypes){d={};for(var c in a)d[c]=
|
|
15
|
+
b[c];b=d}else b=W;return b}function X(a,b){void 0===a&&t("152",A(b)||"Component")}function la(a,b){function d(c,d){var m=ka(d,b),g=[],k=!1,h={isMounted:function(a){return!1},enqueueForceUpdate:function(a){if(null===g)return null},enqueueReplaceState:function(a,b){k=!0;g=[b]},enqueueSetState:function(a,b){if(null===g)return null;g.push(b)}},f=void 0;if(d.prototype&&d.prototype.isReactComponent){if(f=new d(c.props,m,h),"function"===typeof d.getDerivedStateFromProps){var e=d.getDerivedStateFromProps.call(null,
|
|
16
|
+
c.props,f.state);null!=e&&(f.state=v({},f.state,e))}}else if(f=d(c.props,m,h),null==f||null==f.render){a=f;X(a,d);return}f.props=c.props;f.context=m;f.updater=h;h=f.state;void 0===h&&(f.state=h=null);if("function"===typeof f.UNSAFE_componentWillMount||"function"===typeof f.componentWillMount)if("function"===typeof f.componentWillMount&&"function"!==typeof d.getDerivedStateFromProps&&f.componentWillMount(),"function"===typeof f.UNSAFE_componentWillMount&&"function"!==typeof d.getDerivedStateFromProps&&
|
|
17
|
+
f.UNSAFE_componentWillMount(),g.length){h=g;var n=k;g=null;k=!1;if(n&&1===h.length)f.state=h[0];else{e=n?h[0]:f.state;var l=!0;for(n=n?1:0;n<h.length;n++){var q=h[n];q="function"===typeof q?q.call(f,e,c.props,m):q;null!=q&&(l?(l=!1,e=v({},e,q)):v(e,q))}f.state=e}}else g=null;a=f.render();X(a,d);c=void 0;if("function"===typeof f.getChildContext&&(m=d.childContextTypes,"object"===typeof m)){c=f.getChildContext();for(var p in c)p in m?void 0:t("108",A(d)||"Unknown",p)}c&&(b=v({},b,c))}for(;r.isValidElement(a);){var c=
|
|
18
|
+
a,m=c.type;if("function"!==typeof m)break;d(c,m)}return{child:a,context:b}}var v=r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.assign,e="function"===typeof Symbol&&Symbol.for,J=e?Symbol.for("react.portal"):60106,D=e?Symbol.for("react.fragment"):60107,L=e?Symbol.for("react.strict_mode"):60108,K=e?Symbol.for("react.profiler"):60114,E=e?Symbol.for("react.provider"):60109,N=e?Symbol.for("react.context"):60110,I=e?Symbol.for("react.concurrent_mode"):60111,O=e?Symbol.for("react.forward_ref"):60112,
|
|
19
|
+
M=e?Symbol.for("react.suspense"):60113,P=e?Symbol.for("react.memo"):60115,Q=e?Symbol.for("react.lazy"):60116;e=r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;var ea=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,
|
|
20
|
+
S=Object.prototype.hasOwnProperty,U={},T={},n={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(a){n[a]=new p(a,0,!1,a,null)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(a){var b=a[0];n[b]=new p(b,1,!1,a[1],null)});["contentEditable","draggable","spellCheck","value"].forEach(function(a){n[a]=new p(a,2,!1,a.toLowerCase(),
|
|
21
|
+
null)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(a){n[a]=new p(a,2,!1,a,null)});"allowFullScreen async autoFocus autoPlay controls default defer disabled formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(a){n[a]=new p(a,3,!1,a.toLowerCase(),null)});["checked","multiple","muted","selected"].forEach(function(a){n[a]=new p(a,3,!0,a,null)});["capture","download"].forEach(function(a){n[a]=
|
|
22
|
+
new p(a,4,!1,a,null)});["cols","rows","size","span"].forEach(function(a){n[a]=new p(a,6,!1,a,null)});["rowSpan","start"].forEach(function(a){n[a]=new p(a,5,!1,a.toLowerCase(),null)});var F=/[\-:]([a-z])/g,G=function(a){return a[1].toUpperCase()};"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(a){var b=
|
|
23
|
+
a.replace(F,G);n[b]=new p(b,1,!1,a,null)});"xlink:actuate xlink:arcrole xlink:href xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(a){var b=a.replace(F,G);n[b]=new p(b,1,!1,a,"http://www.w3.org/1999/xlink")});["xml:base","xml:lang","xml:space"].forEach(function(a){var b=a.replace(F,G);n[b]=new p(b,1,!1,a,"http://www.w3.org/XML/1998/namespace")});n.tabIndex=new p("tabIndex",1,!1,"tabindex",null);var ia=/["'&<>]/,Y={area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,
|
|
24
|
+
keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0},ma=v({menuitem:!0},Y),C={animationIterationCount:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,
|
|
25
|
+
opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},na=["Webkit","ms","Moz","O"];Object.keys(C).forEach(function(a){na.forEach(function(b){b=b+a.charAt(0).toUpperCase()+a.substring(1);C[b]=C[a]})});var oa=/([A-Z])/g,pa=/^ms-/,x=r.Children.toArray,Z=e.ReactCurrentOwner,qa={readContext:function(a,b){return a._currentValue}},ra={listing:!0,pre:!0,
|
|
26
|
+
textarea:!0},sa=/^[a-zA-Z][a-zA-Z:_\.\-\d]*$/,aa={},H={},W={},ta=Object.prototype.hasOwnProperty,ua={children:null,dangerouslySetInnerHTML:null,suppressContentEditableWarning:null,suppressHydrationWarning:null},ba=function(){function a(b,d){if(!(this instanceof a))throw new TypeError("Cannot call a class as a function");r.isValidElement(b)?b.type!==D?b=[b]:(b=b.props.children,b=r.isValidElement(b)?[b]:x(b)):b=x(b);this.stack=[{type:null,domNamespace:"http://www.w3.org/1999/xhtml",children:b,childIndex:0,
|
|
27
|
+
context:W,footer:""}];this.exhausted=!1;this.currentSelectValue=null;this.previousWasTextNode=!1;this.makeStaticMarkup=d;this.contextIndex=-1;this.contextStack=[];this.contextValueStack=[]}a.prototype.pushProvider=function(a){var b=++this.contextIndex,c=a.type._context,m=c._currentValue;this.contextStack[b]=c;this.contextValueStack[b]=m;c._currentValue=a.props.value};a.prototype.popProvider=function(a){a=this.contextIndex;var b=this.contextStack[a],c=this.contextValueStack[a];this.contextStack[a]=
|
|
28
|
+
null;this.contextValueStack[a]=null;this.contextIndex--;b._currentValue=c};a.prototype.read=function(a){if(this.exhausted)return null;Z.currentDispatcher=qa;try{for(var b="";b.length<a;){if(0===this.stack.length){this.exhausted=!0;break}var c=this.stack[this.stack.length-1];if(c.childIndex>=c.children.length){var m=c.footer;b+=m;""!==m&&(this.previousWasTextNode=!1);this.stack.pop();"select"===c.type?this.currentSelectValue=null:null!=c.type&&null!=c.type.type&&c.type.type.$$typeof===E&&this.popProvider(c.type)}else{var g=
|
|
29
|
+
c.children[c.childIndex++];b+=this.render(g,c.context,c.domNamespace)}}return b}finally{Z.currentDispatcher=null}};a.prototype.render=function(a,d,c){if("string"===typeof a||"number"===typeof a){c=""+a;if(""===c)return"";if(this.makeStaticMarkup)return y(c);if(this.previousWasTextNode)return"\x3c!-- --\x3e"+y(c);this.previousWasTextNode=!0;return y(c)}d=la(a,d);a=d.child;d=d.context;if(null===a||!1===a)return"";if(!r.isValidElement(a)){if(null!=a&&null!=a.$$typeof){var b=a.$$typeof;b===J?t("257"):
|
|
30
|
+
void 0;t("258",b.toString())}a=x(a);this.stack.push({type:null,domNamespace:c,children:a,childIndex:0,context:d,footer:""});return""}b=a.type;if("string"===typeof b)return this.renderDOM(a,d,c);switch(b){case L:case I:case K:case D:return a=x(a.props.children),this.stack.push({type:null,domNamespace:c,children:a,childIndex:0,context:d,footer:""}),"";case M:t("294")}if("object"===typeof b&&null!==b)switch(b.$$typeof){case O:return a=x(b.render(a.props,a.ref)),this.stack.push({type:null,domNamespace:c,
|
|
31
|
+
children:a,childIndex:0,context:d,footer:""}),"";case P:return a=[r.createElement(b.type,v({ref:a.ref},a.props))],this.stack.push({type:null,domNamespace:c,children:a,childIndex:0,context:d,footer:""}),"";case E:return b=x(a.props.children),c={type:a,domNamespace:c,children:b,childIndex:0,context:d,footer:""},this.pushProvider(a),this.stack.push(c),"";case N:return b=x(a.props.children(a.type._currentValue)),this.stack.push({type:a,domNamespace:c,children:b,childIndex:0,context:d,footer:""}),"";case Q:t("295")}t("130",
|
|
32
|
+
null==b?b:typeof b,"")};a.prototype.renderDOM=function(a,d,c){var b=a.type.toLowerCase();"http://www.w3.org/1999/xhtml"===c&&V(b);aa.hasOwnProperty(b)||(sa.test(b)?void 0:t("65",b),aa[b]=!0);var g=a.props;if("input"===b)g=v({type:void 0},g,{defaultChecked:void 0,defaultValue:void 0,value:null!=g.value?g.value:g.defaultValue,checked:null!=g.checked?g.checked:g.defaultChecked});else if("textarea"===b){var k=g.value;if(null==k){k=g.defaultValue;var e=g.children;null!=e&&(null!=k?t("92"):void 0,Array.isArray(e)&&
|
|
33
|
+
(1>=e.length?void 0:t("93"),e=e[0]),k=""+e);null==k&&(k="")}g=v({},g,{value:void 0,children:""+k})}else if("select"===b)this.currentSelectValue=null!=g.value?g.value:g.defaultValue,g=v({},g,{value:void 0});else if("option"===b){e=this.currentSelectValue;var p=ja(g.children);if(null!=e){var r=null!=g.value?g.value+"":p;k=!1;if(Array.isArray(e))for(var h=0;h<e.length;h++){if(""+e[h]===r){k=!0;break}}else k=""+e===r;g=v({selected:void 0,children:void 0},g,{selected:k,children:p})}}if(k=g)ma[b]&&(null!=
|
|
34
|
+
k.children||null!=k.dangerouslySetInnerHTML?t("137",b,""):void 0),null!=k.dangerouslySetInnerHTML&&(null!=k.children?t("60"):void 0,"object"===typeof k.dangerouslySetInnerHTML&&"__html"in k.dangerouslySetInnerHTML?void 0:t("61")),null!=k.style&&"object"!==typeof k.style?t("62",""):void 0;k=g;e=this.makeStaticMarkup;p=1===this.stack.length;r="<"+a.type;for(u in k)if(ta.call(k,u)){var f=k[u];if(null!=f){if("style"===u){h=void 0;var w="",B="";for(h in f)if(f.hasOwnProperty(h)){var l=0===h.indexOf("--"),
|
|
35
|
+
q=f[h];if(null!=q){var z=h;if(H.hasOwnProperty(z))z=H[z];else{var A=z.replace(oa,"-$1").toLowerCase().replace(pa,"-ms-");z=H[z]=A}w+=B+z+":";B=h;l=null==q||"boolean"===typeof q||""===q?"":l||"number"!==typeof q||0===q||C.hasOwnProperty(B)&&C[B]?(""+q).trim():q+"px";w+=l;B=";"}}f=w||null}h=null;b:if(l=b,q=k,-1===l.indexOf("-"))l="string"===typeof q.is;else switch(l){case "annotation-xml":case "color-profile":case "font-face":case "font-face-src":case "font-face-uri":case "font-face-format":case "font-face-name":case "missing-glyph":l=
|
|
36
|
+
!1;break b;default:l=!0}if(l)ua.hasOwnProperty(u)||(h=u,h=R(h)&&null!=f?h+"="+('"'+y(f)+'"'):"");else{l=u;h=f;f=n.hasOwnProperty(l)?n[l]:null;if(q="style"!==l)q=null!==f?0===f.type:!(2<l.length)||"o"!==l[0]&&"O"!==l[0]||"n"!==l[1]&&"N"!==l[1]?!1:!0;q||ha(l,h,f,!1)?h="":null!==f?(l=f.attributeName,f=f.type,h=3===f||4===f&&!0===h?l+'=""':l+"="+('"'+y(h)+'"')):h=R(l)?l+"="+('"'+y(h)+'"'):""}h&&(r+=" "+h)}}e||p&&(r+=' data-reactroot=""');var u=r;k="";Y.hasOwnProperty(b)?u+="/>":(u+=">",k="</"+a.type+
|
|
37
|
+
">");a:{e=g.dangerouslySetInnerHTML;if(null!=e){if(null!=e.__html){e=e.__html;break a}}else if(e=g.children,"string"===typeof e||"number"===typeof e){e=y(e);break a}e=null}null!=e?(g=[],ra[b]&&"\n"===e.charAt(0)&&(u+="\n"),u+=e):g=x(g.children);a=a.type;c=null==c||"http://www.w3.org/1999/xhtml"===c?V(a):"http://www.w3.org/2000/svg"===c&&"foreignObject"===a?"http://www.w3.org/1999/xhtml":c;this.stack.push({domNamespace:c,type:b,children:g,childIndex:0,context:d,footer:k});this.previousWasTextNode=
|
|
38
|
+
!1;return u};return a}();e={renderToString:function(a){return(new ba(a,!1)).read(Infinity)},renderToStaticMarkup:function(a){return(new ba(a,!0)).read(Infinity)},renderToNodeStream:function(){t("207")},renderToStaticNodeStream:function(){t("208")},version:"16.6.0"};var ca={default:e};e=ca&&e||ca;return e.default||e});
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/** @license React v16.
|
|
1
|
+
/** @license React v16.6.0
|
|
2
2
|
* react-dom-test-utils.development.js
|
|
3
3
|
*
|
|
4
4
|
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
@@ -179,15 +179,13 @@ var ReactSharedInternals = React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FI
|
|
|
179
179
|
// The Symbol used to tag the ReactElement-like types. If there is no native Symbol
|
|
180
180
|
// nor polyfill, then a plain number is used for performance.
|
|
181
181
|
|
|
182
|
-
var
|
|
183
|
-
var
|
|
184
|
-
|
|
185
|
-
var
|
|
186
|
-
// Before we know whether it is functional or class
|
|
187
|
-
var HostRoot = 5; // Root of a host tree. Could be nested inside another node.
|
|
182
|
+
var FunctionComponent = 0;
|
|
183
|
+
var ClassComponent = 1;
|
|
184
|
+
// Before we know whether it is function or class
|
|
185
|
+
var HostRoot = 3; // Root of a host tree. Could be nested inside another node.
|
|
188
186
|
// A subtree. Could be an entry point to a different renderer.
|
|
189
|
-
var HostComponent =
|
|
190
|
-
var HostText =
|
|
187
|
+
var HostComponent = 5;
|
|
188
|
+
var HostText = 6;
|
|
191
189
|
|
|
192
190
|
// Don't change these two values. They're used by React Dev Tools.
|
|
193
191
|
var NoEffect = /* */0;
|
|
@@ -931,7 +929,7 @@ function findAllInRenderedFiberTreeInternal(fiber, test) {
|
|
|
931
929
|
var node = currentParent;
|
|
932
930
|
var ret = [];
|
|
933
931
|
while (true) {
|
|
934
|
-
if (node.tag === HostComponent || node.tag === HostText || node.tag === ClassComponent || node.tag ===
|
|
932
|
+
if (node.tag === HostComponent || node.tag === HostText || node.tag === ClassComponent || node.tag === FunctionComponent) {
|
|
935
933
|
var publicInst = node.stateNode;
|
|
936
934
|
if (test(publicInst)) {
|
|
937
935
|
ret.push(publicInst);
|