@pie-element/graphing-solution-set 4.0.1-esmbeta.0 → 4.0.1-esmbeta.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/configure/package.json +1 -1
- package/controller/package.json +1 -1
- package/esm/configure.js +2229 -282
- package/esm/configure.js.map +1 -1
- package/package.json +2 -2
package/esm/configure.js
CHANGED
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
import * as require$$4 from 'react';
|
|
2
|
-
import require$$4__default from 'react';
|
|
3
1
|
import { AlertDialog, layout, InputContainer, settings } from '@pie-lib/config-ui';
|
|
4
2
|
import EditableHtml from '@pie-lib/editable-html';
|
|
5
3
|
import { GridSetup, GraphContainer } from '@pie-lib/graphing-solution-set';
|
|
@@ -60,99 +58,2163 @@ function getAugmentedNamespace(n) {
|
|
|
60
58
|
return a;
|
|
61
59
|
}
|
|
62
60
|
|
|
63
|
-
var
|
|
61
|
+
var react = {exports: {}};
|
|
62
|
+
|
|
63
|
+
var react_production_min = {};
|
|
64
|
+
|
|
65
|
+
/*
|
|
66
|
+
object-assign
|
|
67
|
+
(c) Sindre Sorhus
|
|
68
|
+
@license MIT
|
|
69
|
+
*/
|
|
70
|
+
/* eslint-disable no-unused-vars */
|
|
71
|
+
var getOwnPropertySymbols$1 = Object.getOwnPropertySymbols;
|
|
72
|
+
var hasOwnProperty$a = Object.prototype.hasOwnProperty;
|
|
73
|
+
var propIsEnumerable = Object.prototype.propertyIsEnumerable;
|
|
74
|
+
|
|
75
|
+
function toObject(val) {
|
|
76
|
+
if (val === null || val === undefined) {
|
|
77
|
+
throw new TypeError('Object.assign cannot be called with null or undefined');
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
return Object(val);
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
function shouldUseNative() {
|
|
84
|
+
try {
|
|
85
|
+
if (!Object.assign) {
|
|
86
|
+
return false;
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
// Detect buggy property enumeration order in older V8 versions.
|
|
90
|
+
|
|
91
|
+
// https://bugs.chromium.org/p/v8/issues/detail?id=4118
|
|
92
|
+
var test1 = new String('abc'); // eslint-disable-line no-new-wrappers
|
|
93
|
+
test1[5] = 'de';
|
|
94
|
+
if (Object.getOwnPropertyNames(test1)[0] === '5') {
|
|
95
|
+
return false;
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
// https://bugs.chromium.org/p/v8/issues/detail?id=3056
|
|
99
|
+
var test2 = {};
|
|
100
|
+
for (var i = 0; i < 10; i++) {
|
|
101
|
+
test2['_' + String.fromCharCode(i)] = i;
|
|
102
|
+
}
|
|
103
|
+
var order2 = Object.getOwnPropertyNames(test2).map(function (n) {
|
|
104
|
+
return test2[n];
|
|
105
|
+
});
|
|
106
|
+
if (order2.join('') !== '0123456789') {
|
|
107
|
+
return false;
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
// https://bugs.chromium.org/p/v8/issues/detail?id=3056
|
|
111
|
+
var test3 = {};
|
|
112
|
+
'abcdefghijklmnopqrst'.split('').forEach(function (letter) {
|
|
113
|
+
test3[letter] = letter;
|
|
114
|
+
});
|
|
115
|
+
if (Object.keys(Object.assign({}, test3)).join('') !==
|
|
116
|
+
'abcdefghijklmnopqrst') {
|
|
117
|
+
return false;
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
return true;
|
|
121
|
+
} catch (err) {
|
|
122
|
+
// We don't expect any of the above to throw, but better to be safe.
|
|
123
|
+
return false;
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
var objectAssign = shouldUseNative() ? Object.assign : function (target, source) {
|
|
128
|
+
var from;
|
|
129
|
+
var to = toObject(target);
|
|
130
|
+
var symbols;
|
|
131
|
+
|
|
132
|
+
for (var s = 1; s < arguments.length; s++) {
|
|
133
|
+
from = Object(arguments[s]);
|
|
134
|
+
|
|
135
|
+
for (var key in from) {
|
|
136
|
+
if (hasOwnProperty$a.call(from, key)) {
|
|
137
|
+
to[key] = from[key];
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
if (getOwnPropertySymbols$1) {
|
|
142
|
+
symbols = getOwnPropertySymbols$1(from);
|
|
143
|
+
for (var i = 0; i < symbols.length; i++) {
|
|
144
|
+
if (propIsEnumerable.call(from, symbols[i])) {
|
|
145
|
+
to[symbols[i]] = from[symbols[i]];
|
|
146
|
+
}
|
|
147
|
+
}
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
return to;
|
|
152
|
+
};
|
|
153
|
+
|
|
154
|
+
/** @license React v16.14.0
|
|
155
|
+
* react.production.min.js
|
|
156
|
+
*
|
|
157
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
158
|
+
*
|
|
159
|
+
* This source code is licensed under the MIT license found in the
|
|
160
|
+
* LICENSE file in the root directory of this source tree.
|
|
161
|
+
*/
|
|
162
|
+
var l$1=objectAssign,n$2="function"===typeof Symbol&&Symbol.for,p$1=n$2?Symbol.for("react.element"):60103,q$1=n$2?Symbol.for("react.portal"):60106,r$2=n$2?Symbol.for("react.fragment"):60107,t$1=n$2?Symbol.for("react.strict_mode"):60108,u$1=n$2?Symbol.for("react.profiler"):60114,v$2=n$2?Symbol.for("react.provider"):60109,w$2=n$2?Symbol.for("react.context"):60110,x$1=n$2?Symbol.for("react.forward_ref"):60112,y$2=n$2?Symbol.for("react.suspense"):60113,z$1=n$2?Symbol.for("react.memo"):60115,A$1=n$2?Symbol.for("react.lazy"):
|
|
163
|
+
60116,B="function"===typeof Symbol&&Symbol.iterator;function C$1(a){for(var b="https://reactjs.org/docs/error-decoder.html?invariant="+a,c=1;c<arguments.length;c++)b+="&args[]="+encodeURIComponent(arguments[c]);return "Minified React error #"+a+"; visit "+b+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}
|
|
164
|
+
var D={isMounted:function(){return !1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},E$1={};function F$1(a,b,c){this.props=a;this.context=b;this.refs=E$1;this.updater=c||D;}F$1.prototype.isReactComponent={};F$1.prototype.setState=function(a,b){if("object"!==typeof a&&"function"!==typeof a&&null!=a)throw Error(C$1(85));this.updater.enqueueSetState(this,a,b,"setState");};F$1.prototype.forceUpdate=function(a){this.updater.enqueueForceUpdate(this,a,"forceUpdate");};
|
|
165
|
+
function G$1(){}G$1.prototype=F$1.prototype;function H$1(a,b,c){this.props=a;this.context=b;this.refs=E$1;this.updater=c||D;}var I$1=H$1.prototype=new G$1;I$1.constructor=H$1;l$1(I$1,F$1.prototype);I$1.isPureReactComponent=!0;var J$1={current:null},K$1=Object.prototype.hasOwnProperty,L$1={key:!0,ref:!0,__self:!0,__source:!0};
|
|
166
|
+
function M$1(a,b,c){var e,d={},g=null,k=null;if(null!=b)for(e in void 0!==b.ref&&(k=b.ref),void 0!==b.key&&(g=""+b.key),b)K$1.call(b,e)&&!L$1.hasOwnProperty(e)&&(d[e]=b[e]);var f=arguments.length-2;if(1===f)d.children=c;else if(1<f){for(var h=Array(f),m=0;m<f;m++)h[m]=arguments[m+2];d.children=h;}if(a&&a.defaultProps)for(e in f=a.defaultProps,f)void 0===d[e]&&(d[e]=f[e]);return {$$typeof:p$1,type:a,key:g,ref:k,props:d,_owner:J$1.current}}
|
|
167
|
+
function N$1(a,b){return {$$typeof:p$1,type:a.type,key:b,ref:a.ref,props:a.props,_owner:a._owner}}function O$1(a){return "object"===typeof a&&null!==a&&a.$$typeof===p$1}function escape(a){var b={"=":"=0",":":"=2"};return "$"+(""+a).replace(/[=:]/g,function(a){return b[a]})}var P$1=/\/+/g,Q$1=[];function R$1(a,b,c,e){if(Q$1.length){var d=Q$1.pop();d.result=a;d.keyPrefix=b;d.func=c;d.context=e;d.count=0;return d}return {result:a,keyPrefix:b,func:c,context:e,count:0}}
|
|
168
|
+
function S$1(a){a.result=null;a.keyPrefix=null;a.func=null;a.context=null;a.count=0;10>Q$1.length&&Q$1.push(a);}
|
|
169
|
+
function T$1(a,b,c,e){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 p$1:case q$1:g=!0;}}if(g)return c(e,a,""===b?"."+U$1(a,0):b),1;g=0;b=""===b?".":b+":";if(Array.isArray(a))for(var k=0;k<a.length;k++){d=a[k];var f=b+U$1(d,k);g+=T$1(d,f,c,e);}else if(null===a||"object"!==typeof a?f=null:(f=B&&a[B]||a["@@iterator"],f="function"===typeof f?f:null),"function"===typeof f)for(a=f.call(a),k=
|
|
170
|
+
0;!(d=a.next()).done;)d=d.value,f=b+U$1(d,k++),g+=T$1(d,f,c,e);else if("object"===d)throw c=""+a,Error(C$1(31,"[object Object]"===c?"object with keys {"+Object.keys(a).join(", ")+"}":c,""));return g}function V$1(a,b,c){return null==a?0:T$1(a,"",b,c)}function U$1(a,b){return "object"===typeof a&&null!==a&&null!=a.key?escape(a.key):b.toString(36)}function W$1(a,b){a.func.call(a.context,b,a.count++);}
|
|
171
|
+
function aa$1(a,b,c){var e=a.result,d=a.keyPrefix;a=a.func.call(a.context,b,a.count++);Array.isArray(a)?X$1(a,e,c,function(a){return a}):null!=a&&(O$1(a)&&(a=N$1(a,d+(!a.key||b&&b.key===a.key?"":(""+a.key).replace(P$1,"$&/")+"/")+c)),e.push(a));}function X$1(a,b,c,e,d){var g="";null!=c&&(g=(""+c).replace(P$1,"$&/")+"/");b=R$1(b,g,e,d);V$1(a,aa$1,b);S$1(b);}var Y$1={current:null};function Z$1(){var a=Y$1.current;if(null===a)throw Error(C$1(321));return a}
|
|
172
|
+
var ba$1={ReactCurrentDispatcher:Y$1,ReactCurrentBatchConfig:{suspense:null},ReactCurrentOwner:J$1,IsSomeRendererActing:{current:!1},assign:l$1};react_production_min.Children={map:function(a,b,c){if(null==a)return a;var e=[];X$1(a,e,null,b,c);return e},forEach:function(a,b,c){if(null==a)return a;b=R$1(null,null,b,c);V$1(a,W$1,b);S$1(b);},count:function(a){return V$1(a,function(){return null},null)},toArray:function(a){var b=[];X$1(a,b,null,function(a){return a});return b},only:function(a){if(!O$1(a))throw Error(C$1(143));return a}};
|
|
173
|
+
react_production_min.Component=F$1;react_production_min.Fragment=r$2;react_production_min.Profiler=u$1;react_production_min.PureComponent=H$1;react_production_min.StrictMode=t$1;react_production_min.Suspense=y$2;react_production_min.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=ba$1;
|
|
174
|
+
react_production_min.cloneElement=function(a,b,c){if(null===a||void 0===a)throw Error(C$1(267,a));var e=l$1({},a.props),d=a.key,g=a.ref,k=a._owner;if(null!=b){void 0!==b.ref&&(g=b.ref,k=J$1.current);void 0!==b.key&&(d=""+b.key);if(a.type&&a.type.defaultProps)var f=a.type.defaultProps;for(h in b)K$1.call(b,h)&&!L$1.hasOwnProperty(h)&&(e[h]=void 0===b[h]&&void 0!==f?f[h]:b[h]);}var h=arguments.length-2;if(1===h)e.children=c;else if(1<h){f=Array(h);for(var m=0;m<h;m++)f[m]=arguments[m+2];e.children=f;}return {$$typeof:p$1,type:a.type,
|
|
175
|
+
key:d,ref:g,props:e,_owner:k}};react_production_min.createContext=function(a,b){void 0===b&&(b=null);a={$$typeof:w$2,_calculateChangedBits:b,_currentValue:a,_currentValue2:a,_threadCount:0,Provider:null,Consumer:null};a.Provider={$$typeof:v$2,_context:a};return a.Consumer=a};react_production_min.createElement=M$1;react_production_min.createFactory=function(a){var b=M$1.bind(null,a);b.type=a;return b};react_production_min.createRef=function(){return {current:null}};react_production_min.forwardRef=function(a){return {$$typeof:x$1,render:a}};react_production_min.isValidElement=O$1;
|
|
176
|
+
react_production_min.lazy=function(a){return {$$typeof:A$1,_ctor:a,_status:-1,_result:null}};react_production_min.memo=function(a,b){return {$$typeof:z$1,type:a,compare:void 0===b?null:b}};react_production_min.useCallback=function(a,b){return Z$1().useCallback(a,b)};react_production_min.useContext=function(a,b){return Z$1().useContext(a,b)};react_production_min.useDebugValue=function(){};react_production_min.useEffect=function(a,b){return Z$1().useEffect(a,b)};react_production_min.useImperativeHandle=function(a,b,c){return Z$1().useImperativeHandle(a,b,c)};
|
|
177
|
+
react_production_min.useLayoutEffect=function(a,b){return Z$1().useLayoutEffect(a,b)};react_production_min.useMemo=function(a,b){return Z$1().useMemo(a,b)};react_production_min.useReducer=function(a,b,c){return Z$1().useReducer(a,b,c)};react_production_min.useRef=function(a){return Z$1().useRef(a)};react_production_min.useState=function(a){return Z$1().useState(a)};react_production_min.version="16.14.0";
|
|
178
|
+
|
|
179
|
+
var react_development = {};
|
|
180
|
+
|
|
181
|
+
/**
|
|
182
|
+
* Copyright (c) 2013-present, Facebook, Inc.
|
|
183
|
+
*
|
|
184
|
+
* This source code is licensed under the MIT license found in the
|
|
185
|
+
* LICENSE file in the root directory of this source tree.
|
|
186
|
+
*/
|
|
187
|
+
|
|
188
|
+
var ReactPropTypesSecret$3 = 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED';
|
|
189
|
+
|
|
190
|
+
var ReactPropTypesSecret_1 = ReactPropTypesSecret$3;
|
|
191
|
+
|
|
192
|
+
var has$2 = Function.call.bind(Object.prototype.hasOwnProperty);
|
|
193
|
+
|
|
194
|
+
/**
|
|
195
|
+
* Copyright (c) 2013-present, Facebook, Inc.
|
|
196
|
+
*
|
|
197
|
+
* This source code is licensed under the MIT license found in the
|
|
198
|
+
* LICENSE file in the root directory of this source tree.
|
|
199
|
+
*/
|
|
200
|
+
|
|
201
|
+
var printWarning$2 = function() {};
|
|
202
|
+
|
|
203
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
204
|
+
var ReactPropTypesSecret$2 = ReactPropTypesSecret_1;
|
|
205
|
+
var loggedTypeFailures = {};
|
|
206
|
+
var has$1 = has$2;
|
|
207
|
+
|
|
208
|
+
printWarning$2 = function(text) {
|
|
209
|
+
var message = 'Warning: ' + text;
|
|
210
|
+
if (typeof console !== 'undefined') {
|
|
211
|
+
console.error(message);
|
|
212
|
+
}
|
|
213
|
+
try {
|
|
214
|
+
// --- Welcome to debugging React ---
|
|
215
|
+
// This error was thrown as a convenience so that you can use this stack
|
|
216
|
+
// to find the callsite that caused this warning to fire.
|
|
217
|
+
throw new Error(message);
|
|
218
|
+
} catch (x) { /**/ }
|
|
219
|
+
};
|
|
220
|
+
}
|
|
221
|
+
|
|
222
|
+
/**
|
|
223
|
+
* Assert that the values match with the type specs.
|
|
224
|
+
* Error messages are memorized and will only be shown once.
|
|
225
|
+
*
|
|
226
|
+
* @param {object} typeSpecs Map of name to a ReactPropType
|
|
227
|
+
* @param {object} values Runtime values that need to be type-checked
|
|
228
|
+
* @param {string} location e.g. "prop", "context", "child context"
|
|
229
|
+
* @param {string} componentName Name of the component for error messages.
|
|
230
|
+
* @param {?Function} getStack Returns the component stack.
|
|
231
|
+
* @private
|
|
232
|
+
*/
|
|
233
|
+
function checkPropTypes$1(typeSpecs, values, location, componentName, getStack) {
|
|
234
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
235
|
+
for (var typeSpecName in typeSpecs) {
|
|
236
|
+
if (has$1(typeSpecs, typeSpecName)) {
|
|
237
|
+
var error;
|
|
238
|
+
// Prop type validation may throw. In case they do, we don't want to
|
|
239
|
+
// fail the render phase where it didn't fail before. So we log it.
|
|
240
|
+
// After these have been cleaned up, we'll let them throw.
|
|
241
|
+
try {
|
|
242
|
+
// This is intentionally an invariant that gets caught. It's the same
|
|
243
|
+
// behavior as without this statement except with a better message.
|
|
244
|
+
if (typeof typeSpecs[typeSpecName] !== 'function') {
|
|
245
|
+
var err = Error(
|
|
246
|
+
(componentName || 'React class') + ': ' + location + ' type `' + typeSpecName + '` is invalid; ' +
|
|
247
|
+
'it must be a function, usually from the `prop-types` package, but received `' + typeof typeSpecs[typeSpecName] + '`.' +
|
|
248
|
+
'This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.'
|
|
249
|
+
);
|
|
250
|
+
err.name = 'Invariant Violation';
|
|
251
|
+
throw err;
|
|
252
|
+
}
|
|
253
|
+
error = typeSpecs[typeSpecName](values, typeSpecName, componentName, location, null, ReactPropTypesSecret$2);
|
|
254
|
+
} catch (ex) {
|
|
255
|
+
error = ex;
|
|
256
|
+
}
|
|
257
|
+
if (error && !(error instanceof Error)) {
|
|
258
|
+
printWarning$2(
|
|
259
|
+
(componentName || 'React class') + ': type specification of ' +
|
|
260
|
+
location + ' `' + typeSpecName + '` is invalid; the type checker ' +
|
|
261
|
+
'function must return `null` or an `Error` but returned a ' + typeof error + '. ' +
|
|
262
|
+
'You may have forgotten to pass an argument to the type checker ' +
|
|
263
|
+
'creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and ' +
|
|
264
|
+
'shape all require an argument).'
|
|
265
|
+
);
|
|
266
|
+
}
|
|
267
|
+
if (error instanceof Error && !(error.message in loggedTypeFailures)) {
|
|
268
|
+
// Only monitor this failure once because there tends to be a lot of the
|
|
269
|
+
// same error.
|
|
270
|
+
loggedTypeFailures[error.message] = true;
|
|
271
|
+
|
|
272
|
+
var stack = getStack ? getStack() : '';
|
|
273
|
+
|
|
274
|
+
printWarning$2(
|
|
275
|
+
'Failed ' + location + ' type: ' + error.message + (stack != null ? stack : '')
|
|
276
|
+
);
|
|
277
|
+
}
|
|
278
|
+
}
|
|
279
|
+
}
|
|
280
|
+
}
|
|
281
|
+
}
|
|
282
|
+
|
|
283
|
+
/**
|
|
284
|
+
* Resets warning cache when testing.
|
|
285
|
+
*
|
|
286
|
+
* @private
|
|
287
|
+
*/
|
|
288
|
+
checkPropTypes$1.resetWarningCache = function() {
|
|
289
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
290
|
+
loggedTypeFailures = {};
|
|
291
|
+
}
|
|
292
|
+
};
|
|
293
|
+
|
|
294
|
+
var checkPropTypes_1 = checkPropTypes$1;
|
|
295
|
+
|
|
296
|
+
/** @license React v16.14.0
|
|
297
|
+
* react.development.js
|
|
298
|
+
*
|
|
299
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
300
|
+
*
|
|
301
|
+
* This source code is licensed under the MIT license found in the
|
|
302
|
+
* LICENSE file in the root directory of this source tree.
|
|
303
|
+
*/
|
|
304
|
+
|
|
305
|
+
|
|
306
|
+
|
|
307
|
+
if (process.env.NODE_ENV !== "production") {
|
|
308
|
+
(function() {
|
|
309
|
+
|
|
310
|
+
var _assign = objectAssign;
|
|
311
|
+
var checkPropTypes = checkPropTypes_1;
|
|
312
|
+
|
|
313
|
+
var ReactVersion = '16.14.0';
|
|
314
|
+
|
|
315
|
+
// The Symbol used to tag the ReactElement-like types. If there is no native Symbol
|
|
316
|
+
// nor polyfill, then a plain number is used for performance.
|
|
317
|
+
var hasSymbol = typeof Symbol === 'function' && Symbol.for;
|
|
318
|
+
var REACT_ELEMENT_TYPE = hasSymbol ? Symbol.for('react.element') : 0xeac7;
|
|
319
|
+
var REACT_PORTAL_TYPE = hasSymbol ? Symbol.for('react.portal') : 0xeaca;
|
|
320
|
+
var REACT_FRAGMENT_TYPE = hasSymbol ? Symbol.for('react.fragment') : 0xeacb;
|
|
321
|
+
var REACT_STRICT_MODE_TYPE = hasSymbol ? Symbol.for('react.strict_mode') : 0xeacc;
|
|
322
|
+
var REACT_PROFILER_TYPE = hasSymbol ? Symbol.for('react.profiler') : 0xead2;
|
|
323
|
+
var REACT_PROVIDER_TYPE = hasSymbol ? Symbol.for('react.provider') : 0xeacd;
|
|
324
|
+
var REACT_CONTEXT_TYPE = hasSymbol ? Symbol.for('react.context') : 0xeace; // TODO: We don't use AsyncMode or ConcurrentMode anymore. They were temporary
|
|
325
|
+
var REACT_CONCURRENT_MODE_TYPE = hasSymbol ? Symbol.for('react.concurrent_mode') : 0xeacf;
|
|
326
|
+
var REACT_FORWARD_REF_TYPE = hasSymbol ? Symbol.for('react.forward_ref') : 0xead0;
|
|
327
|
+
var REACT_SUSPENSE_TYPE = hasSymbol ? Symbol.for('react.suspense') : 0xead1;
|
|
328
|
+
var REACT_SUSPENSE_LIST_TYPE = hasSymbol ? Symbol.for('react.suspense_list') : 0xead8;
|
|
329
|
+
var REACT_MEMO_TYPE = hasSymbol ? Symbol.for('react.memo') : 0xead3;
|
|
330
|
+
var REACT_LAZY_TYPE = hasSymbol ? Symbol.for('react.lazy') : 0xead4;
|
|
331
|
+
var REACT_BLOCK_TYPE = hasSymbol ? Symbol.for('react.block') : 0xead9;
|
|
332
|
+
var REACT_FUNDAMENTAL_TYPE = hasSymbol ? Symbol.for('react.fundamental') : 0xead5;
|
|
333
|
+
var REACT_RESPONDER_TYPE = hasSymbol ? Symbol.for('react.responder') : 0xead6;
|
|
334
|
+
var REACT_SCOPE_TYPE = hasSymbol ? Symbol.for('react.scope') : 0xead7;
|
|
335
|
+
var MAYBE_ITERATOR_SYMBOL = typeof Symbol === 'function' && Symbol.iterator;
|
|
336
|
+
var FAUX_ITERATOR_SYMBOL = '@@iterator';
|
|
337
|
+
function getIteratorFn(maybeIterable) {
|
|
338
|
+
if (maybeIterable === null || typeof maybeIterable !== 'object') {
|
|
339
|
+
return null;
|
|
340
|
+
}
|
|
341
|
+
|
|
342
|
+
var maybeIterator = MAYBE_ITERATOR_SYMBOL && maybeIterable[MAYBE_ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL];
|
|
343
|
+
|
|
344
|
+
if (typeof maybeIterator === 'function') {
|
|
345
|
+
return maybeIterator;
|
|
346
|
+
}
|
|
347
|
+
|
|
348
|
+
return null;
|
|
349
|
+
}
|
|
350
|
+
|
|
351
|
+
/**
|
|
352
|
+
* Keeps track of the current dispatcher.
|
|
353
|
+
*/
|
|
354
|
+
var ReactCurrentDispatcher = {
|
|
355
|
+
/**
|
|
356
|
+
* @internal
|
|
357
|
+
* @type {ReactComponent}
|
|
358
|
+
*/
|
|
359
|
+
current: null
|
|
360
|
+
};
|
|
361
|
+
|
|
362
|
+
/**
|
|
363
|
+
* Keeps track of the current batch's configuration such as how long an update
|
|
364
|
+
* should suspend for if it needs to.
|
|
365
|
+
*/
|
|
366
|
+
var ReactCurrentBatchConfig = {
|
|
367
|
+
suspense: null
|
|
368
|
+
};
|
|
369
|
+
|
|
370
|
+
/**
|
|
371
|
+
* Keeps track of the current owner.
|
|
372
|
+
*
|
|
373
|
+
* The current owner is the component who should own any components that are
|
|
374
|
+
* currently being constructed.
|
|
375
|
+
*/
|
|
376
|
+
var ReactCurrentOwner = {
|
|
377
|
+
/**
|
|
378
|
+
* @internal
|
|
379
|
+
* @type {ReactComponent}
|
|
380
|
+
*/
|
|
381
|
+
current: null
|
|
382
|
+
};
|
|
383
|
+
|
|
384
|
+
var BEFORE_SLASH_RE = /^(.*)[\\\/]/;
|
|
385
|
+
function describeComponentFrame (name, source, ownerName) {
|
|
386
|
+
var sourceInfo = '';
|
|
387
|
+
|
|
388
|
+
if (source) {
|
|
389
|
+
var path = source.fileName;
|
|
390
|
+
var fileName = path.replace(BEFORE_SLASH_RE, '');
|
|
391
|
+
|
|
392
|
+
{
|
|
393
|
+
// In DEV, include code for a common special case:
|
|
394
|
+
// prefer "folder/index.js" instead of just "index.js".
|
|
395
|
+
if (/^index\./.test(fileName)) {
|
|
396
|
+
var match = path.match(BEFORE_SLASH_RE);
|
|
397
|
+
|
|
398
|
+
if (match) {
|
|
399
|
+
var pathBeforeSlash = match[1];
|
|
400
|
+
|
|
401
|
+
if (pathBeforeSlash) {
|
|
402
|
+
var folderName = pathBeforeSlash.replace(BEFORE_SLASH_RE, '');
|
|
403
|
+
fileName = folderName + '/' + fileName;
|
|
404
|
+
}
|
|
405
|
+
}
|
|
406
|
+
}
|
|
407
|
+
}
|
|
408
|
+
|
|
409
|
+
sourceInfo = ' (at ' + fileName + ':' + source.lineNumber + ')';
|
|
410
|
+
} else if (ownerName) {
|
|
411
|
+
sourceInfo = ' (created by ' + ownerName + ')';
|
|
412
|
+
}
|
|
413
|
+
|
|
414
|
+
return '\n in ' + (name || 'Unknown') + sourceInfo;
|
|
415
|
+
}
|
|
416
|
+
|
|
417
|
+
var Resolved = 1;
|
|
418
|
+
function refineResolvedLazyComponent(lazyComponent) {
|
|
419
|
+
return lazyComponent._status === Resolved ? lazyComponent._result : null;
|
|
420
|
+
}
|
|
421
|
+
|
|
422
|
+
function getWrappedName(outerType, innerType, wrapperName) {
|
|
423
|
+
var functionName = innerType.displayName || innerType.name || '';
|
|
424
|
+
return outerType.displayName || (functionName !== '' ? wrapperName + "(" + functionName + ")" : wrapperName);
|
|
425
|
+
}
|
|
426
|
+
|
|
427
|
+
function getComponentName(type) {
|
|
428
|
+
if (type == null) {
|
|
429
|
+
// Host root, text node or just invalid type.
|
|
430
|
+
return null;
|
|
431
|
+
}
|
|
432
|
+
|
|
433
|
+
{
|
|
434
|
+
if (typeof type.tag === 'number') {
|
|
435
|
+
error('Received an unexpected object in getComponentName(). ' + 'This is likely a bug in React. Please file an issue.');
|
|
436
|
+
}
|
|
437
|
+
}
|
|
438
|
+
|
|
439
|
+
if (typeof type === 'function') {
|
|
440
|
+
return type.displayName || type.name || null;
|
|
441
|
+
}
|
|
442
|
+
|
|
443
|
+
if (typeof type === 'string') {
|
|
444
|
+
return type;
|
|
445
|
+
}
|
|
446
|
+
|
|
447
|
+
switch (type) {
|
|
448
|
+
case REACT_FRAGMENT_TYPE:
|
|
449
|
+
return 'Fragment';
|
|
450
|
+
|
|
451
|
+
case REACT_PORTAL_TYPE:
|
|
452
|
+
return 'Portal';
|
|
453
|
+
|
|
454
|
+
case REACT_PROFILER_TYPE:
|
|
455
|
+
return "Profiler";
|
|
456
|
+
|
|
457
|
+
case REACT_STRICT_MODE_TYPE:
|
|
458
|
+
return 'StrictMode';
|
|
459
|
+
|
|
460
|
+
case REACT_SUSPENSE_TYPE:
|
|
461
|
+
return 'Suspense';
|
|
462
|
+
|
|
463
|
+
case REACT_SUSPENSE_LIST_TYPE:
|
|
464
|
+
return 'SuspenseList';
|
|
465
|
+
}
|
|
466
|
+
|
|
467
|
+
if (typeof type === 'object') {
|
|
468
|
+
switch (type.$$typeof) {
|
|
469
|
+
case REACT_CONTEXT_TYPE:
|
|
470
|
+
return 'Context.Consumer';
|
|
471
|
+
|
|
472
|
+
case REACT_PROVIDER_TYPE:
|
|
473
|
+
return 'Context.Provider';
|
|
474
|
+
|
|
475
|
+
case REACT_FORWARD_REF_TYPE:
|
|
476
|
+
return getWrappedName(type, type.render, 'ForwardRef');
|
|
477
|
+
|
|
478
|
+
case REACT_MEMO_TYPE:
|
|
479
|
+
return getComponentName(type.type);
|
|
480
|
+
|
|
481
|
+
case REACT_BLOCK_TYPE:
|
|
482
|
+
return getComponentName(type.render);
|
|
483
|
+
|
|
484
|
+
case REACT_LAZY_TYPE:
|
|
485
|
+
{
|
|
486
|
+
var thenable = type;
|
|
487
|
+
var resolvedThenable = refineResolvedLazyComponent(thenable);
|
|
488
|
+
|
|
489
|
+
if (resolvedThenable) {
|
|
490
|
+
return getComponentName(resolvedThenable);
|
|
491
|
+
}
|
|
492
|
+
|
|
493
|
+
break;
|
|
494
|
+
}
|
|
495
|
+
}
|
|
496
|
+
}
|
|
497
|
+
|
|
498
|
+
return null;
|
|
499
|
+
}
|
|
500
|
+
|
|
501
|
+
var ReactDebugCurrentFrame = {};
|
|
502
|
+
var currentlyValidatingElement = null;
|
|
503
|
+
function setCurrentlyValidatingElement(element) {
|
|
504
|
+
{
|
|
505
|
+
currentlyValidatingElement = element;
|
|
506
|
+
}
|
|
507
|
+
}
|
|
508
|
+
|
|
509
|
+
{
|
|
510
|
+
// Stack implementation injected by the current renderer.
|
|
511
|
+
ReactDebugCurrentFrame.getCurrentStack = null;
|
|
512
|
+
|
|
513
|
+
ReactDebugCurrentFrame.getStackAddendum = function () {
|
|
514
|
+
var stack = ''; // Add an extra top frame while an element is being validated
|
|
515
|
+
|
|
516
|
+
if (currentlyValidatingElement) {
|
|
517
|
+
var name = getComponentName(currentlyValidatingElement.type);
|
|
518
|
+
var owner = currentlyValidatingElement._owner;
|
|
519
|
+
stack += describeComponentFrame(name, currentlyValidatingElement._source, owner && getComponentName(owner.type));
|
|
520
|
+
} // Delegate to the injected renderer-specific implementation
|
|
521
|
+
|
|
522
|
+
|
|
523
|
+
var impl = ReactDebugCurrentFrame.getCurrentStack;
|
|
524
|
+
|
|
525
|
+
if (impl) {
|
|
526
|
+
stack += impl() || '';
|
|
527
|
+
}
|
|
528
|
+
|
|
529
|
+
return stack;
|
|
530
|
+
};
|
|
531
|
+
}
|
|
532
|
+
|
|
533
|
+
/**
|
|
534
|
+
* Used by act() to track whether you're inside an act() scope.
|
|
535
|
+
*/
|
|
536
|
+
var IsSomeRendererActing = {
|
|
537
|
+
current: false
|
|
538
|
+
};
|
|
539
|
+
|
|
540
|
+
var ReactSharedInternals = {
|
|
541
|
+
ReactCurrentDispatcher: ReactCurrentDispatcher,
|
|
542
|
+
ReactCurrentBatchConfig: ReactCurrentBatchConfig,
|
|
543
|
+
ReactCurrentOwner: ReactCurrentOwner,
|
|
544
|
+
IsSomeRendererActing: IsSomeRendererActing,
|
|
545
|
+
// Used by renderers to avoid bundling object-assign twice in UMD bundles:
|
|
546
|
+
assign: _assign
|
|
547
|
+
};
|
|
548
|
+
|
|
549
|
+
{
|
|
550
|
+
_assign(ReactSharedInternals, {
|
|
551
|
+
// These should not be included in production.
|
|
552
|
+
ReactDebugCurrentFrame: ReactDebugCurrentFrame,
|
|
553
|
+
// Shim for React DOM 16.0.0 which still destructured (but not used) this.
|
|
554
|
+
// TODO: remove in React 17.0.
|
|
555
|
+
ReactComponentTreeHook: {}
|
|
556
|
+
});
|
|
557
|
+
}
|
|
558
|
+
|
|
559
|
+
// by calls to these methods by a Babel plugin.
|
|
560
|
+
//
|
|
561
|
+
// In PROD (or in packages without access to React internals),
|
|
562
|
+
// they are left as they are instead.
|
|
563
|
+
|
|
564
|
+
function warn(format) {
|
|
565
|
+
{
|
|
566
|
+
for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
|
|
567
|
+
args[_key - 1] = arguments[_key];
|
|
568
|
+
}
|
|
569
|
+
|
|
570
|
+
printWarning('warn', format, args);
|
|
571
|
+
}
|
|
572
|
+
}
|
|
573
|
+
function error(format) {
|
|
574
|
+
{
|
|
575
|
+
for (var _len2 = arguments.length, args = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {
|
|
576
|
+
args[_key2 - 1] = arguments[_key2];
|
|
577
|
+
}
|
|
578
|
+
|
|
579
|
+
printWarning('error', format, args);
|
|
580
|
+
}
|
|
581
|
+
}
|
|
582
|
+
|
|
583
|
+
function printWarning(level, format, args) {
|
|
584
|
+
// When changing this logic, you might want to also
|
|
585
|
+
// update consoleWithStackDev.www.js as well.
|
|
586
|
+
{
|
|
587
|
+
var hasExistingStack = args.length > 0 && typeof args[args.length - 1] === 'string' && args[args.length - 1].indexOf('\n in') === 0;
|
|
588
|
+
|
|
589
|
+
if (!hasExistingStack) {
|
|
590
|
+
var ReactDebugCurrentFrame = ReactSharedInternals.ReactDebugCurrentFrame;
|
|
591
|
+
var stack = ReactDebugCurrentFrame.getStackAddendum();
|
|
592
|
+
|
|
593
|
+
if (stack !== '') {
|
|
594
|
+
format += '%s';
|
|
595
|
+
args = args.concat([stack]);
|
|
596
|
+
}
|
|
597
|
+
}
|
|
598
|
+
|
|
599
|
+
var argsWithFormat = args.map(function (item) {
|
|
600
|
+
return '' + item;
|
|
601
|
+
}); // Careful: RN currently depends on this prefix
|
|
602
|
+
|
|
603
|
+
argsWithFormat.unshift('Warning: ' + format); // We intentionally don't use spread (or .apply) directly because it
|
|
604
|
+
// breaks IE9: https://github.com/facebook/react/issues/13610
|
|
605
|
+
// eslint-disable-next-line react-internal/no-production-logging
|
|
606
|
+
|
|
607
|
+
Function.prototype.apply.call(console[level], console, argsWithFormat);
|
|
608
|
+
|
|
609
|
+
try {
|
|
610
|
+
// --- Welcome to debugging React ---
|
|
611
|
+
// This error was thrown as a convenience so that you can use this stack
|
|
612
|
+
// to find the callsite that caused this warning to fire.
|
|
613
|
+
var argIndex = 0;
|
|
614
|
+
var message = 'Warning: ' + format.replace(/%s/g, function () {
|
|
615
|
+
return args[argIndex++];
|
|
616
|
+
});
|
|
617
|
+
throw new Error(message);
|
|
618
|
+
} catch (x) {}
|
|
619
|
+
}
|
|
620
|
+
}
|
|
621
|
+
|
|
622
|
+
var didWarnStateUpdateForUnmountedComponent = {};
|
|
623
|
+
|
|
624
|
+
function warnNoop(publicInstance, callerName) {
|
|
625
|
+
{
|
|
626
|
+
var _constructor = publicInstance.constructor;
|
|
627
|
+
var componentName = _constructor && (_constructor.displayName || _constructor.name) || 'ReactClass';
|
|
628
|
+
var warningKey = componentName + "." + callerName;
|
|
629
|
+
|
|
630
|
+
if (didWarnStateUpdateForUnmountedComponent[warningKey]) {
|
|
631
|
+
return;
|
|
632
|
+
}
|
|
633
|
+
|
|
634
|
+
error("Can't call %s on a component that is not yet mounted. " + 'This is a no-op, but it might indicate a bug in your application. ' + 'Instead, assign to `this.state` directly or define a `state = {};` ' + 'class property with the desired state in the %s component.', callerName, componentName);
|
|
635
|
+
|
|
636
|
+
didWarnStateUpdateForUnmountedComponent[warningKey] = true;
|
|
637
|
+
}
|
|
638
|
+
}
|
|
639
|
+
/**
|
|
640
|
+
* This is the abstract API for an update queue.
|
|
641
|
+
*/
|
|
642
|
+
|
|
643
|
+
|
|
644
|
+
var ReactNoopUpdateQueue = {
|
|
645
|
+
/**
|
|
646
|
+
* Checks whether or not this composite component is mounted.
|
|
647
|
+
* @param {ReactClass} publicInstance The instance we want to test.
|
|
648
|
+
* @return {boolean} True if mounted, false otherwise.
|
|
649
|
+
* @protected
|
|
650
|
+
* @final
|
|
651
|
+
*/
|
|
652
|
+
isMounted: function (publicInstance) {
|
|
653
|
+
return false;
|
|
654
|
+
},
|
|
655
|
+
|
|
656
|
+
/**
|
|
657
|
+
* Forces an update. This should only be invoked when it is known with
|
|
658
|
+
* certainty that we are **not** in a DOM transaction.
|
|
659
|
+
*
|
|
660
|
+
* You may want to call this when you know that some deeper aspect of the
|
|
661
|
+
* component's state has changed but `setState` was not called.
|
|
662
|
+
*
|
|
663
|
+
* This will not invoke `shouldComponentUpdate`, but it will invoke
|
|
664
|
+
* `componentWillUpdate` and `componentDidUpdate`.
|
|
665
|
+
*
|
|
666
|
+
* @param {ReactClass} publicInstance The instance that should rerender.
|
|
667
|
+
* @param {?function} callback Called after component is updated.
|
|
668
|
+
* @param {?string} callerName name of the calling function in the public API.
|
|
669
|
+
* @internal
|
|
670
|
+
*/
|
|
671
|
+
enqueueForceUpdate: function (publicInstance, callback, callerName) {
|
|
672
|
+
warnNoop(publicInstance, 'forceUpdate');
|
|
673
|
+
},
|
|
674
|
+
|
|
675
|
+
/**
|
|
676
|
+
* Replaces all of the state. Always use this or `setState` to mutate state.
|
|
677
|
+
* You should treat `this.state` as immutable.
|
|
678
|
+
*
|
|
679
|
+
* There is no guarantee that `this.state` will be immediately updated, so
|
|
680
|
+
* accessing `this.state` after calling this method may return the old value.
|
|
681
|
+
*
|
|
682
|
+
* @param {ReactClass} publicInstance The instance that should rerender.
|
|
683
|
+
* @param {object} completeState Next state.
|
|
684
|
+
* @param {?function} callback Called after component is updated.
|
|
685
|
+
* @param {?string} callerName name of the calling function in the public API.
|
|
686
|
+
* @internal
|
|
687
|
+
*/
|
|
688
|
+
enqueueReplaceState: function (publicInstance, completeState, callback, callerName) {
|
|
689
|
+
warnNoop(publicInstance, 'replaceState');
|
|
690
|
+
},
|
|
691
|
+
|
|
692
|
+
/**
|
|
693
|
+
* Sets a subset of the state. This only exists because _pendingState is
|
|
694
|
+
* internal. This provides a merging strategy that is not available to deep
|
|
695
|
+
* properties which is confusing. TODO: Expose pendingState or don't use it
|
|
696
|
+
* during the merge.
|
|
697
|
+
*
|
|
698
|
+
* @param {ReactClass} publicInstance The instance that should rerender.
|
|
699
|
+
* @param {object} partialState Next partial state to be merged with state.
|
|
700
|
+
* @param {?function} callback Called after component is updated.
|
|
701
|
+
* @param {?string} Name of the calling function in the public API.
|
|
702
|
+
* @internal
|
|
703
|
+
*/
|
|
704
|
+
enqueueSetState: function (publicInstance, partialState, callback, callerName) {
|
|
705
|
+
warnNoop(publicInstance, 'setState');
|
|
706
|
+
}
|
|
707
|
+
};
|
|
708
|
+
|
|
709
|
+
var emptyObject = {};
|
|
710
|
+
|
|
711
|
+
{
|
|
712
|
+
Object.freeze(emptyObject);
|
|
713
|
+
}
|
|
714
|
+
/**
|
|
715
|
+
* Base class helpers for the updating state of a component.
|
|
716
|
+
*/
|
|
717
|
+
|
|
718
|
+
|
|
719
|
+
function Component(props, context, updater) {
|
|
720
|
+
this.props = props;
|
|
721
|
+
this.context = context; // If a component has string refs, we will assign a different object later.
|
|
722
|
+
|
|
723
|
+
this.refs = emptyObject; // We initialize the default updater but the real one gets injected by the
|
|
724
|
+
// renderer.
|
|
725
|
+
|
|
726
|
+
this.updater = updater || ReactNoopUpdateQueue;
|
|
727
|
+
}
|
|
728
|
+
|
|
729
|
+
Component.prototype.isReactComponent = {};
|
|
730
|
+
/**
|
|
731
|
+
* Sets a subset of the state. Always use this to mutate
|
|
732
|
+
* state. You should treat `this.state` as immutable.
|
|
733
|
+
*
|
|
734
|
+
* There is no guarantee that `this.state` will be immediately updated, so
|
|
735
|
+
* accessing `this.state` after calling this method may return the old value.
|
|
736
|
+
*
|
|
737
|
+
* There is no guarantee that calls to `setState` will run synchronously,
|
|
738
|
+
* as they may eventually be batched together. You can provide an optional
|
|
739
|
+
* callback that will be executed when the call to setState is actually
|
|
740
|
+
* completed.
|
|
741
|
+
*
|
|
742
|
+
* When a function is provided to setState, it will be called at some point in
|
|
743
|
+
* the future (not synchronously). It will be called with the up to date
|
|
744
|
+
* component arguments (state, props, context). These values can be different
|
|
745
|
+
* from this.* because your function may be called after receiveProps but before
|
|
746
|
+
* shouldComponentUpdate, and this new state, props, and context will not yet be
|
|
747
|
+
* assigned to this.
|
|
748
|
+
*
|
|
749
|
+
* @param {object|function} partialState Next partial state or function to
|
|
750
|
+
* produce next partial state to be merged with current state.
|
|
751
|
+
* @param {?function} callback Called after state is updated.
|
|
752
|
+
* @final
|
|
753
|
+
* @protected
|
|
754
|
+
*/
|
|
755
|
+
|
|
756
|
+
Component.prototype.setState = function (partialState, callback) {
|
|
757
|
+
if (!(typeof partialState === 'object' || typeof partialState === 'function' || partialState == null)) {
|
|
758
|
+
{
|
|
759
|
+
throw Error( "setState(...): takes an object of state variables to update or a function which returns an object of state variables." );
|
|
760
|
+
}
|
|
761
|
+
}
|
|
762
|
+
|
|
763
|
+
this.updater.enqueueSetState(this, partialState, callback, 'setState');
|
|
764
|
+
};
|
|
765
|
+
/**
|
|
766
|
+
* Forces an update. This should only be invoked when it is known with
|
|
767
|
+
* certainty that we are **not** in a DOM transaction.
|
|
768
|
+
*
|
|
769
|
+
* You may want to call this when you know that some deeper aspect of the
|
|
770
|
+
* component's state has changed but `setState` was not called.
|
|
771
|
+
*
|
|
772
|
+
* This will not invoke `shouldComponentUpdate`, but it will invoke
|
|
773
|
+
* `componentWillUpdate` and `componentDidUpdate`.
|
|
774
|
+
*
|
|
775
|
+
* @param {?function} callback Called after update is complete.
|
|
776
|
+
* @final
|
|
777
|
+
* @protected
|
|
778
|
+
*/
|
|
779
|
+
|
|
780
|
+
|
|
781
|
+
Component.prototype.forceUpdate = function (callback) {
|
|
782
|
+
this.updater.enqueueForceUpdate(this, callback, 'forceUpdate');
|
|
783
|
+
};
|
|
784
|
+
/**
|
|
785
|
+
* Deprecated APIs. These APIs used to exist on classic React classes but since
|
|
786
|
+
* we would like to deprecate them, we're not going to move them over to this
|
|
787
|
+
* modern base class. Instead, we define a getter that warns if it's accessed.
|
|
788
|
+
*/
|
|
789
|
+
|
|
790
|
+
|
|
791
|
+
{
|
|
792
|
+
var deprecatedAPIs = {
|
|
793
|
+
isMounted: ['isMounted', 'Instead, make sure to clean up subscriptions and pending requests in ' + 'componentWillUnmount to prevent memory leaks.'],
|
|
794
|
+
replaceState: ['replaceState', 'Refactor your code to use setState instead (see ' + 'https://github.com/facebook/react/issues/3236).']
|
|
795
|
+
};
|
|
796
|
+
|
|
797
|
+
var defineDeprecationWarning = function (methodName, info) {
|
|
798
|
+
Object.defineProperty(Component.prototype, methodName, {
|
|
799
|
+
get: function () {
|
|
800
|
+
warn('%s(...) is deprecated in plain JavaScript React classes. %s', info[0], info[1]);
|
|
801
|
+
|
|
802
|
+
return undefined;
|
|
803
|
+
}
|
|
804
|
+
});
|
|
805
|
+
};
|
|
806
|
+
|
|
807
|
+
for (var fnName in deprecatedAPIs) {
|
|
808
|
+
if (deprecatedAPIs.hasOwnProperty(fnName)) {
|
|
809
|
+
defineDeprecationWarning(fnName, deprecatedAPIs[fnName]);
|
|
810
|
+
}
|
|
811
|
+
}
|
|
812
|
+
}
|
|
813
|
+
|
|
814
|
+
function ComponentDummy() {}
|
|
815
|
+
|
|
816
|
+
ComponentDummy.prototype = Component.prototype;
|
|
817
|
+
/**
|
|
818
|
+
* Convenience component with default shallow equality check for sCU.
|
|
819
|
+
*/
|
|
820
|
+
|
|
821
|
+
function PureComponent(props, context, updater) {
|
|
822
|
+
this.props = props;
|
|
823
|
+
this.context = context; // If a component has string refs, we will assign a different object later.
|
|
824
|
+
|
|
825
|
+
this.refs = emptyObject;
|
|
826
|
+
this.updater = updater || ReactNoopUpdateQueue;
|
|
827
|
+
}
|
|
828
|
+
|
|
829
|
+
var pureComponentPrototype = PureComponent.prototype = new ComponentDummy();
|
|
830
|
+
pureComponentPrototype.constructor = PureComponent; // Avoid an extra prototype jump for these methods.
|
|
831
|
+
|
|
832
|
+
_assign(pureComponentPrototype, Component.prototype);
|
|
833
|
+
|
|
834
|
+
pureComponentPrototype.isPureReactComponent = true;
|
|
835
|
+
|
|
836
|
+
// an immutable object with a single mutable value
|
|
837
|
+
function createRef() {
|
|
838
|
+
var refObject = {
|
|
839
|
+
current: null
|
|
840
|
+
};
|
|
841
|
+
|
|
842
|
+
{
|
|
843
|
+
Object.seal(refObject);
|
|
844
|
+
}
|
|
845
|
+
|
|
846
|
+
return refObject;
|
|
847
|
+
}
|
|
848
|
+
|
|
849
|
+
var hasOwnProperty = Object.prototype.hasOwnProperty;
|
|
850
|
+
var RESERVED_PROPS = {
|
|
851
|
+
key: true,
|
|
852
|
+
ref: true,
|
|
853
|
+
__self: true,
|
|
854
|
+
__source: true
|
|
855
|
+
};
|
|
856
|
+
var specialPropKeyWarningShown, specialPropRefWarningShown, didWarnAboutStringRefs;
|
|
857
|
+
|
|
858
|
+
{
|
|
859
|
+
didWarnAboutStringRefs = {};
|
|
860
|
+
}
|
|
861
|
+
|
|
862
|
+
function hasValidRef(config) {
|
|
863
|
+
{
|
|
864
|
+
if (hasOwnProperty.call(config, 'ref')) {
|
|
865
|
+
var getter = Object.getOwnPropertyDescriptor(config, 'ref').get;
|
|
866
|
+
|
|
867
|
+
if (getter && getter.isReactWarning) {
|
|
868
|
+
return false;
|
|
869
|
+
}
|
|
870
|
+
}
|
|
871
|
+
}
|
|
872
|
+
|
|
873
|
+
return config.ref !== undefined;
|
|
874
|
+
}
|
|
875
|
+
|
|
876
|
+
function hasValidKey(config) {
|
|
877
|
+
{
|
|
878
|
+
if (hasOwnProperty.call(config, 'key')) {
|
|
879
|
+
var getter = Object.getOwnPropertyDescriptor(config, 'key').get;
|
|
880
|
+
|
|
881
|
+
if (getter && getter.isReactWarning) {
|
|
882
|
+
return false;
|
|
883
|
+
}
|
|
884
|
+
}
|
|
885
|
+
}
|
|
886
|
+
|
|
887
|
+
return config.key !== undefined;
|
|
888
|
+
}
|
|
889
|
+
|
|
890
|
+
function defineKeyPropWarningGetter(props, displayName) {
|
|
891
|
+
var warnAboutAccessingKey = function () {
|
|
892
|
+
{
|
|
893
|
+
if (!specialPropKeyWarningShown) {
|
|
894
|
+
specialPropKeyWarningShown = true;
|
|
895
|
+
|
|
896
|
+
error('%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);
|
|
897
|
+
}
|
|
898
|
+
}
|
|
899
|
+
};
|
|
900
|
+
|
|
901
|
+
warnAboutAccessingKey.isReactWarning = true;
|
|
902
|
+
Object.defineProperty(props, 'key', {
|
|
903
|
+
get: warnAboutAccessingKey,
|
|
904
|
+
configurable: true
|
|
905
|
+
});
|
|
906
|
+
}
|
|
907
|
+
|
|
908
|
+
function defineRefPropWarningGetter(props, displayName) {
|
|
909
|
+
var warnAboutAccessingRef = function () {
|
|
910
|
+
{
|
|
911
|
+
if (!specialPropRefWarningShown) {
|
|
912
|
+
specialPropRefWarningShown = true;
|
|
913
|
+
|
|
914
|
+
error('%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);
|
|
915
|
+
}
|
|
916
|
+
}
|
|
917
|
+
};
|
|
918
|
+
|
|
919
|
+
warnAboutAccessingRef.isReactWarning = true;
|
|
920
|
+
Object.defineProperty(props, 'ref', {
|
|
921
|
+
get: warnAboutAccessingRef,
|
|
922
|
+
configurable: true
|
|
923
|
+
});
|
|
924
|
+
}
|
|
925
|
+
|
|
926
|
+
function warnIfStringRefCannotBeAutoConverted(config) {
|
|
927
|
+
{
|
|
928
|
+
if (typeof config.ref === 'string' && ReactCurrentOwner.current && config.__self && ReactCurrentOwner.current.stateNode !== config.__self) {
|
|
929
|
+
var componentName = getComponentName(ReactCurrentOwner.current.type);
|
|
930
|
+
|
|
931
|
+
if (!didWarnAboutStringRefs[componentName]) {
|
|
932
|
+
error('Component "%s" contains the string ref "%s". ' + 'Support for string refs will be removed in a future major release. ' + 'This case cannot be automatically converted to an arrow function. ' + 'We ask you to manually fix this case by using useRef() or createRef() instead. ' + 'Learn more about using refs safely here: ' + 'https://fb.me/react-strict-mode-string-ref', getComponentName(ReactCurrentOwner.current.type), config.ref);
|
|
933
|
+
|
|
934
|
+
didWarnAboutStringRefs[componentName] = true;
|
|
935
|
+
}
|
|
936
|
+
}
|
|
937
|
+
}
|
|
938
|
+
}
|
|
939
|
+
/**
|
|
940
|
+
* Factory method to create a new React element. This no longer adheres to
|
|
941
|
+
* the class pattern, so do not use new to call it. Also, instanceof check
|
|
942
|
+
* will not work. Instead test $$typeof field against Symbol.for('react.element') to check
|
|
943
|
+
* if something is a React Element.
|
|
944
|
+
*
|
|
945
|
+
* @param {*} type
|
|
946
|
+
* @param {*} props
|
|
947
|
+
* @param {*} key
|
|
948
|
+
* @param {string|object} ref
|
|
949
|
+
* @param {*} owner
|
|
950
|
+
* @param {*} self A *temporary* helper to detect places where `this` is
|
|
951
|
+
* different from the `owner` when React.createElement is called, so that we
|
|
952
|
+
* can warn. We want to get rid of owner and replace string `ref`s with arrow
|
|
953
|
+
* functions, and as long as `this` and owner are the same, there will be no
|
|
954
|
+
* change in behavior.
|
|
955
|
+
* @param {*} source An annotation object (added by a transpiler or otherwise)
|
|
956
|
+
* indicating filename, line number, and/or other information.
|
|
957
|
+
* @internal
|
|
958
|
+
*/
|
|
959
|
+
|
|
960
|
+
|
|
961
|
+
var ReactElement = function (type, key, ref, self, source, owner, props) {
|
|
962
|
+
var element = {
|
|
963
|
+
// This tag allows us to uniquely identify this as a React Element
|
|
964
|
+
$$typeof: REACT_ELEMENT_TYPE,
|
|
965
|
+
// Built-in properties that belong on the element
|
|
966
|
+
type: type,
|
|
967
|
+
key: key,
|
|
968
|
+
ref: ref,
|
|
969
|
+
props: props,
|
|
970
|
+
// Record the component responsible for creating this element.
|
|
971
|
+
_owner: owner
|
|
972
|
+
};
|
|
973
|
+
|
|
974
|
+
{
|
|
975
|
+
// The validation flag is currently mutative. We put it on
|
|
976
|
+
// an external backing store so that we can freeze the whole object.
|
|
977
|
+
// This can be replaced with a WeakMap once they are implemented in
|
|
978
|
+
// commonly used development environments.
|
|
979
|
+
element._store = {}; // To make comparing ReactElements easier for testing purposes, we make
|
|
980
|
+
// the validation flag non-enumerable (where possible, which should
|
|
981
|
+
// include every environment we run tests in), so the test framework
|
|
982
|
+
// ignores it.
|
|
983
|
+
|
|
984
|
+
Object.defineProperty(element._store, 'validated', {
|
|
985
|
+
configurable: false,
|
|
986
|
+
enumerable: false,
|
|
987
|
+
writable: true,
|
|
988
|
+
value: false
|
|
989
|
+
}); // self and source are DEV only properties.
|
|
990
|
+
|
|
991
|
+
Object.defineProperty(element, '_self', {
|
|
992
|
+
configurable: false,
|
|
993
|
+
enumerable: false,
|
|
994
|
+
writable: false,
|
|
995
|
+
value: self
|
|
996
|
+
}); // Two elements created in two different places should be considered
|
|
997
|
+
// equal for testing purposes and therefore we hide it from enumeration.
|
|
998
|
+
|
|
999
|
+
Object.defineProperty(element, '_source', {
|
|
1000
|
+
configurable: false,
|
|
1001
|
+
enumerable: false,
|
|
1002
|
+
writable: false,
|
|
1003
|
+
value: source
|
|
1004
|
+
});
|
|
1005
|
+
|
|
1006
|
+
if (Object.freeze) {
|
|
1007
|
+
Object.freeze(element.props);
|
|
1008
|
+
Object.freeze(element);
|
|
1009
|
+
}
|
|
1010
|
+
}
|
|
1011
|
+
|
|
1012
|
+
return element;
|
|
1013
|
+
};
|
|
1014
|
+
/**
|
|
1015
|
+
* Create and return a new ReactElement of the given type.
|
|
1016
|
+
* See https://reactjs.org/docs/react-api.html#createelement
|
|
1017
|
+
*/
|
|
1018
|
+
|
|
1019
|
+
function createElement(type, config, children) {
|
|
1020
|
+
var propName; // Reserved names are extracted
|
|
1021
|
+
|
|
1022
|
+
var props = {};
|
|
1023
|
+
var key = null;
|
|
1024
|
+
var ref = null;
|
|
1025
|
+
var self = null;
|
|
1026
|
+
var source = null;
|
|
1027
|
+
|
|
1028
|
+
if (config != null) {
|
|
1029
|
+
if (hasValidRef(config)) {
|
|
1030
|
+
ref = config.ref;
|
|
1031
|
+
|
|
1032
|
+
{
|
|
1033
|
+
warnIfStringRefCannotBeAutoConverted(config);
|
|
1034
|
+
}
|
|
1035
|
+
}
|
|
1036
|
+
|
|
1037
|
+
if (hasValidKey(config)) {
|
|
1038
|
+
key = '' + config.key;
|
|
1039
|
+
}
|
|
1040
|
+
|
|
1041
|
+
self = config.__self === undefined ? null : config.__self;
|
|
1042
|
+
source = config.__source === undefined ? null : config.__source; // Remaining properties are added to a new props object
|
|
1043
|
+
|
|
1044
|
+
for (propName in config) {
|
|
1045
|
+
if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {
|
|
1046
|
+
props[propName] = config[propName];
|
|
1047
|
+
}
|
|
1048
|
+
}
|
|
1049
|
+
} // Children can be more than one argument, and those are transferred onto
|
|
1050
|
+
// the newly allocated props object.
|
|
1051
|
+
|
|
1052
|
+
|
|
1053
|
+
var childrenLength = arguments.length - 2;
|
|
1054
|
+
|
|
1055
|
+
if (childrenLength === 1) {
|
|
1056
|
+
props.children = children;
|
|
1057
|
+
} else if (childrenLength > 1) {
|
|
1058
|
+
var childArray = Array(childrenLength);
|
|
1059
|
+
|
|
1060
|
+
for (var i = 0; i < childrenLength; i++) {
|
|
1061
|
+
childArray[i] = arguments[i + 2];
|
|
1062
|
+
}
|
|
1063
|
+
|
|
1064
|
+
{
|
|
1065
|
+
if (Object.freeze) {
|
|
1066
|
+
Object.freeze(childArray);
|
|
1067
|
+
}
|
|
1068
|
+
}
|
|
1069
|
+
|
|
1070
|
+
props.children = childArray;
|
|
1071
|
+
} // Resolve default props
|
|
1072
|
+
|
|
1073
|
+
|
|
1074
|
+
if (type && type.defaultProps) {
|
|
1075
|
+
var defaultProps = type.defaultProps;
|
|
1076
|
+
|
|
1077
|
+
for (propName in defaultProps) {
|
|
1078
|
+
if (props[propName] === undefined) {
|
|
1079
|
+
props[propName] = defaultProps[propName];
|
|
1080
|
+
}
|
|
1081
|
+
}
|
|
1082
|
+
}
|
|
1083
|
+
|
|
1084
|
+
{
|
|
1085
|
+
if (key || ref) {
|
|
1086
|
+
var displayName = typeof type === 'function' ? type.displayName || type.name || 'Unknown' : type;
|
|
1087
|
+
|
|
1088
|
+
if (key) {
|
|
1089
|
+
defineKeyPropWarningGetter(props, displayName);
|
|
1090
|
+
}
|
|
1091
|
+
|
|
1092
|
+
if (ref) {
|
|
1093
|
+
defineRefPropWarningGetter(props, displayName);
|
|
1094
|
+
}
|
|
1095
|
+
}
|
|
1096
|
+
}
|
|
1097
|
+
|
|
1098
|
+
return ReactElement(type, key, ref, self, source, ReactCurrentOwner.current, props);
|
|
1099
|
+
}
|
|
1100
|
+
function cloneAndReplaceKey(oldElement, newKey) {
|
|
1101
|
+
var newElement = ReactElement(oldElement.type, newKey, oldElement.ref, oldElement._self, oldElement._source, oldElement._owner, oldElement.props);
|
|
1102
|
+
return newElement;
|
|
1103
|
+
}
|
|
1104
|
+
/**
|
|
1105
|
+
* Clone and return a new ReactElement using element as the starting point.
|
|
1106
|
+
* See https://reactjs.org/docs/react-api.html#cloneelement
|
|
1107
|
+
*/
|
|
1108
|
+
|
|
1109
|
+
function cloneElement(element, config, children) {
|
|
1110
|
+
if (!!(element === null || element === undefined)) {
|
|
1111
|
+
{
|
|
1112
|
+
throw Error( "React.cloneElement(...): The argument must be a React element, but you passed " + element + "." );
|
|
1113
|
+
}
|
|
1114
|
+
}
|
|
1115
|
+
|
|
1116
|
+
var propName; // Original props are copied
|
|
1117
|
+
|
|
1118
|
+
var props = _assign({}, element.props); // Reserved names are extracted
|
|
1119
|
+
|
|
1120
|
+
|
|
1121
|
+
var key = element.key;
|
|
1122
|
+
var ref = element.ref; // Self is preserved since the owner is preserved.
|
|
1123
|
+
|
|
1124
|
+
var self = element._self; // Source is preserved since cloneElement is unlikely to be targeted by a
|
|
1125
|
+
// transpiler, and the original source is probably a better indicator of the
|
|
1126
|
+
// true owner.
|
|
1127
|
+
|
|
1128
|
+
var source = element._source; // Owner will be preserved, unless ref is overridden
|
|
1129
|
+
|
|
1130
|
+
var owner = element._owner;
|
|
1131
|
+
|
|
1132
|
+
if (config != null) {
|
|
1133
|
+
if (hasValidRef(config)) {
|
|
1134
|
+
// Silently steal the ref from the parent.
|
|
1135
|
+
ref = config.ref;
|
|
1136
|
+
owner = ReactCurrentOwner.current;
|
|
1137
|
+
}
|
|
1138
|
+
|
|
1139
|
+
if (hasValidKey(config)) {
|
|
1140
|
+
key = '' + config.key;
|
|
1141
|
+
} // Remaining properties override existing props
|
|
1142
|
+
|
|
1143
|
+
|
|
1144
|
+
var defaultProps;
|
|
1145
|
+
|
|
1146
|
+
if (element.type && element.type.defaultProps) {
|
|
1147
|
+
defaultProps = element.type.defaultProps;
|
|
1148
|
+
}
|
|
1149
|
+
|
|
1150
|
+
for (propName in config) {
|
|
1151
|
+
if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {
|
|
1152
|
+
if (config[propName] === undefined && defaultProps !== undefined) {
|
|
1153
|
+
// Resolve default props
|
|
1154
|
+
props[propName] = defaultProps[propName];
|
|
1155
|
+
} else {
|
|
1156
|
+
props[propName] = config[propName];
|
|
1157
|
+
}
|
|
1158
|
+
}
|
|
1159
|
+
}
|
|
1160
|
+
} // Children can be more than one argument, and those are transferred onto
|
|
1161
|
+
// the newly allocated props object.
|
|
1162
|
+
|
|
1163
|
+
|
|
1164
|
+
var childrenLength = arguments.length - 2;
|
|
1165
|
+
|
|
1166
|
+
if (childrenLength === 1) {
|
|
1167
|
+
props.children = children;
|
|
1168
|
+
} else if (childrenLength > 1) {
|
|
1169
|
+
var childArray = Array(childrenLength);
|
|
1170
|
+
|
|
1171
|
+
for (var i = 0; i < childrenLength; i++) {
|
|
1172
|
+
childArray[i] = arguments[i + 2];
|
|
1173
|
+
}
|
|
1174
|
+
|
|
1175
|
+
props.children = childArray;
|
|
1176
|
+
}
|
|
1177
|
+
|
|
1178
|
+
return ReactElement(element.type, key, ref, self, source, owner, props);
|
|
1179
|
+
}
|
|
1180
|
+
/**
|
|
1181
|
+
* Verifies the object is a ReactElement.
|
|
1182
|
+
* See https://reactjs.org/docs/react-api.html#isvalidelement
|
|
1183
|
+
* @param {?object} object
|
|
1184
|
+
* @return {boolean} True if `object` is a ReactElement.
|
|
1185
|
+
* @final
|
|
1186
|
+
*/
|
|
1187
|
+
|
|
1188
|
+
function isValidElement(object) {
|
|
1189
|
+
return typeof object === 'object' && object !== null && object.$$typeof === REACT_ELEMENT_TYPE;
|
|
1190
|
+
}
|
|
1191
|
+
|
|
1192
|
+
var SEPARATOR = '.';
|
|
1193
|
+
var SUBSEPARATOR = ':';
|
|
1194
|
+
/**
|
|
1195
|
+
* Escape and wrap key so it is safe to use as a reactid
|
|
1196
|
+
*
|
|
1197
|
+
* @param {string} key to be escaped.
|
|
1198
|
+
* @return {string} the escaped key.
|
|
1199
|
+
*/
|
|
1200
|
+
|
|
1201
|
+
function escape(key) {
|
|
1202
|
+
var escapeRegex = /[=:]/g;
|
|
1203
|
+
var escaperLookup = {
|
|
1204
|
+
'=': '=0',
|
|
1205
|
+
':': '=2'
|
|
1206
|
+
};
|
|
1207
|
+
var escapedString = ('' + key).replace(escapeRegex, function (match) {
|
|
1208
|
+
return escaperLookup[match];
|
|
1209
|
+
});
|
|
1210
|
+
return '$' + escapedString;
|
|
1211
|
+
}
|
|
1212
|
+
/**
|
|
1213
|
+
* TODO: Test that a single child and an array with one item have the same key
|
|
1214
|
+
* pattern.
|
|
1215
|
+
*/
|
|
1216
|
+
|
|
1217
|
+
|
|
1218
|
+
var didWarnAboutMaps = false;
|
|
1219
|
+
var userProvidedKeyEscapeRegex = /\/+/g;
|
|
1220
|
+
|
|
1221
|
+
function escapeUserProvidedKey(text) {
|
|
1222
|
+
return ('' + text).replace(userProvidedKeyEscapeRegex, '$&/');
|
|
1223
|
+
}
|
|
1224
|
+
|
|
1225
|
+
var POOL_SIZE = 10;
|
|
1226
|
+
var traverseContextPool = [];
|
|
1227
|
+
|
|
1228
|
+
function getPooledTraverseContext(mapResult, keyPrefix, mapFunction, mapContext) {
|
|
1229
|
+
if (traverseContextPool.length) {
|
|
1230
|
+
var traverseContext = traverseContextPool.pop();
|
|
1231
|
+
traverseContext.result = mapResult;
|
|
1232
|
+
traverseContext.keyPrefix = keyPrefix;
|
|
1233
|
+
traverseContext.func = mapFunction;
|
|
1234
|
+
traverseContext.context = mapContext;
|
|
1235
|
+
traverseContext.count = 0;
|
|
1236
|
+
return traverseContext;
|
|
1237
|
+
} else {
|
|
1238
|
+
return {
|
|
1239
|
+
result: mapResult,
|
|
1240
|
+
keyPrefix: keyPrefix,
|
|
1241
|
+
func: mapFunction,
|
|
1242
|
+
context: mapContext,
|
|
1243
|
+
count: 0
|
|
1244
|
+
};
|
|
1245
|
+
}
|
|
1246
|
+
}
|
|
1247
|
+
|
|
1248
|
+
function releaseTraverseContext(traverseContext) {
|
|
1249
|
+
traverseContext.result = null;
|
|
1250
|
+
traverseContext.keyPrefix = null;
|
|
1251
|
+
traverseContext.func = null;
|
|
1252
|
+
traverseContext.context = null;
|
|
1253
|
+
traverseContext.count = 0;
|
|
1254
|
+
|
|
1255
|
+
if (traverseContextPool.length < POOL_SIZE) {
|
|
1256
|
+
traverseContextPool.push(traverseContext);
|
|
1257
|
+
}
|
|
1258
|
+
}
|
|
1259
|
+
/**
|
|
1260
|
+
* @param {?*} children Children tree container.
|
|
1261
|
+
* @param {!string} nameSoFar Name of the key path so far.
|
|
1262
|
+
* @param {!function} callback Callback to invoke with each child found.
|
|
1263
|
+
* @param {?*} traverseContext Used to pass information throughout the traversal
|
|
1264
|
+
* process.
|
|
1265
|
+
* @return {!number} The number of children in this subtree.
|
|
1266
|
+
*/
|
|
1267
|
+
|
|
1268
|
+
|
|
1269
|
+
function traverseAllChildrenImpl(children, nameSoFar, callback, traverseContext) {
|
|
1270
|
+
var type = typeof children;
|
|
1271
|
+
|
|
1272
|
+
if (type === 'undefined' || type === 'boolean') {
|
|
1273
|
+
// All of the above are perceived as null.
|
|
1274
|
+
children = null;
|
|
1275
|
+
}
|
|
1276
|
+
|
|
1277
|
+
var invokeCallback = false;
|
|
1278
|
+
|
|
1279
|
+
if (children === null) {
|
|
1280
|
+
invokeCallback = true;
|
|
1281
|
+
} else {
|
|
1282
|
+
switch (type) {
|
|
1283
|
+
case 'string':
|
|
1284
|
+
case 'number':
|
|
1285
|
+
invokeCallback = true;
|
|
1286
|
+
break;
|
|
1287
|
+
|
|
1288
|
+
case 'object':
|
|
1289
|
+
switch (children.$$typeof) {
|
|
1290
|
+
case REACT_ELEMENT_TYPE:
|
|
1291
|
+
case REACT_PORTAL_TYPE:
|
|
1292
|
+
invokeCallback = true;
|
|
1293
|
+
}
|
|
1294
|
+
|
|
1295
|
+
}
|
|
1296
|
+
}
|
|
1297
|
+
|
|
1298
|
+
if (invokeCallback) {
|
|
1299
|
+
callback(traverseContext, children, // If it's the only child, treat the name as if it was wrapped in an array
|
|
1300
|
+
// so that it's consistent if the number of children grows.
|
|
1301
|
+
nameSoFar === '' ? SEPARATOR + getComponentKey(children, 0) : nameSoFar);
|
|
1302
|
+
return 1;
|
|
1303
|
+
}
|
|
1304
|
+
|
|
1305
|
+
var child;
|
|
1306
|
+
var nextName;
|
|
1307
|
+
var subtreeCount = 0; // Count of children found in the current subtree.
|
|
1308
|
+
|
|
1309
|
+
var nextNamePrefix = nameSoFar === '' ? SEPARATOR : nameSoFar + SUBSEPARATOR;
|
|
1310
|
+
|
|
1311
|
+
if (Array.isArray(children)) {
|
|
1312
|
+
for (var i = 0; i < children.length; i++) {
|
|
1313
|
+
child = children[i];
|
|
1314
|
+
nextName = nextNamePrefix + getComponentKey(child, i);
|
|
1315
|
+
subtreeCount += traverseAllChildrenImpl(child, nextName, callback, traverseContext);
|
|
1316
|
+
}
|
|
1317
|
+
} else {
|
|
1318
|
+
var iteratorFn = getIteratorFn(children);
|
|
1319
|
+
|
|
1320
|
+
if (typeof iteratorFn === 'function') {
|
|
1321
|
+
|
|
1322
|
+
{
|
|
1323
|
+
// Warn about using Maps as children
|
|
1324
|
+
if (iteratorFn === children.entries) {
|
|
1325
|
+
if (!didWarnAboutMaps) {
|
|
1326
|
+
warn('Using Maps as children is deprecated and will be removed in ' + 'a future major release. Consider converting children to ' + 'an array of keyed ReactElements instead.');
|
|
1327
|
+
}
|
|
1328
|
+
|
|
1329
|
+
didWarnAboutMaps = true;
|
|
1330
|
+
}
|
|
1331
|
+
}
|
|
1332
|
+
|
|
1333
|
+
var iterator = iteratorFn.call(children);
|
|
1334
|
+
var step;
|
|
1335
|
+
var ii = 0;
|
|
1336
|
+
|
|
1337
|
+
while (!(step = iterator.next()).done) {
|
|
1338
|
+
child = step.value;
|
|
1339
|
+
nextName = nextNamePrefix + getComponentKey(child, ii++);
|
|
1340
|
+
subtreeCount += traverseAllChildrenImpl(child, nextName, callback, traverseContext);
|
|
1341
|
+
}
|
|
1342
|
+
} else if (type === 'object') {
|
|
1343
|
+
var addendum = '';
|
|
1344
|
+
|
|
1345
|
+
{
|
|
1346
|
+
addendum = ' If you meant to render a collection of children, use an array ' + 'instead.' + ReactDebugCurrentFrame.getStackAddendum();
|
|
1347
|
+
}
|
|
1348
|
+
|
|
1349
|
+
var childrenString = '' + children;
|
|
1350
|
+
|
|
1351
|
+
{
|
|
1352
|
+
{
|
|
1353
|
+
throw Error( "Objects are not valid as a React child (found: " + (childrenString === '[object Object]' ? 'object with keys {' + Object.keys(children).join(', ') + '}' : childrenString) + ")." + addendum );
|
|
1354
|
+
}
|
|
1355
|
+
}
|
|
1356
|
+
}
|
|
1357
|
+
}
|
|
1358
|
+
|
|
1359
|
+
return subtreeCount;
|
|
1360
|
+
}
|
|
1361
|
+
/**
|
|
1362
|
+
* Traverses children that are typically specified as `props.children`, but
|
|
1363
|
+
* might also be specified through attributes:
|
|
1364
|
+
*
|
|
1365
|
+
* - `traverseAllChildren(this.props.children, ...)`
|
|
1366
|
+
* - `traverseAllChildren(this.props.leftPanelChildren, ...)`
|
|
1367
|
+
*
|
|
1368
|
+
* The `traverseContext` is an optional argument that is passed through the
|
|
1369
|
+
* entire traversal. It can be used to store accumulations or anything else that
|
|
1370
|
+
* the callback might find relevant.
|
|
1371
|
+
*
|
|
1372
|
+
* @param {?*} children Children tree object.
|
|
1373
|
+
* @param {!function} callback To invoke upon traversing each child.
|
|
1374
|
+
* @param {?*} traverseContext Context for traversal.
|
|
1375
|
+
* @return {!number} The number of children in this subtree.
|
|
1376
|
+
*/
|
|
1377
|
+
|
|
1378
|
+
|
|
1379
|
+
function traverseAllChildren(children, callback, traverseContext) {
|
|
1380
|
+
if (children == null) {
|
|
1381
|
+
return 0;
|
|
1382
|
+
}
|
|
1383
|
+
|
|
1384
|
+
return traverseAllChildrenImpl(children, '', callback, traverseContext);
|
|
1385
|
+
}
|
|
1386
|
+
/**
|
|
1387
|
+
* Generate a key string that identifies a component within a set.
|
|
1388
|
+
*
|
|
1389
|
+
* @param {*} component A component that could contain a manual key.
|
|
1390
|
+
* @param {number} index Index that is used if a manual key is not provided.
|
|
1391
|
+
* @return {string}
|
|
1392
|
+
*/
|
|
1393
|
+
|
|
1394
|
+
|
|
1395
|
+
function getComponentKey(component, index) {
|
|
1396
|
+
// Do some typechecking here since we call this blindly. We want to ensure
|
|
1397
|
+
// that we don't block potential future ES APIs.
|
|
1398
|
+
if (typeof component === 'object' && component !== null && component.key != null) {
|
|
1399
|
+
// Explicit key
|
|
1400
|
+
return escape(component.key);
|
|
1401
|
+
} // Implicit key determined by the index in the set
|
|
1402
|
+
|
|
1403
|
+
|
|
1404
|
+
return index.toString(36);
|
|
1405
|
+
}
|
|
1406
|
+
|
|
1407
|
+
function forEachSingleChild(bookKeeping, child, name) {
|
|
1408
|
+
var func = bookKeeping.func,
|
|
1409
|
+
context = bookKeeping.context;
|
|
1410
|
+
func.call(context, child, bookKeeping.count++);
|
|
1411
|
+
}
|
|
1412
|
+
/**
|
|
1413
|
+
* Iterates through children that are typically specified as `props.children`.
|
|
1414
|
+
*
|
|
1415
|
+
* See https://reactjs.org/docs/react-api.html#reactchildrenforeach
|
|
1416
|
+
*
|
|
1417
|
+
* The provided forEachFunc(child, index) will be called for each
|
|
1418
|
+
* leaf child.
|
|
1419
|
+
*
|
|
1420
|
+
* @param {?*} children Children tree container.
|
|
1421
|
+
* @param {function(*, int)} forEachFunc
|
|
1422
|
+
* @param {*} forEachContext Context for forEachContext.
|
|
1423
|
+
*/
|
|
1424
|
+
|
|
1425
|
+
|
|
1426
|
+
function forEachChildren(children, forEachFunc, forEachContext) {
|
|
1427
|
+
if (children == null) {
|
|
1428
|
+
return children;
|
|
1429
|
+
}
|
|
1430
|
+
|
|
1431
|
+
var traverseContext = getPooledTraverseContext(null, null, forEachFunc, forEachContext);
|
|
1432
|
+
traverseAllChildren(children, forEachSingleChild, traverseContext);
|
|
1433
|
+
releaseTraverseContext(traverseContext);
|
|
1434
|
+
}
|
|
1435
|
+
|
|
1436
|
+
function mapSingleChildIntoContext(bookKeeping, child, childKey) {
|
|
1437
|
+
var result = bookKeeping.result,
|
|
1438
|
+
keyPrefix = bookKeeping.keyPrefix,
|
|
1439
|
+
func = bookKeeping.func,
|
|
1440
|
+
context = bookKeeping.context;
|
|
1441
|
+
var mappedChild = func.call(context, child, bookKeeping.count++);
|
|
1442
|
+
|
|
1443
|
+
if (Array.isArray(mappedChild)) {
|
|
1444
|
+
mapIntoWithKeyPrefixInternal(mappedChild, result, childKey, function (c) {
|
|
1445
|
+
return c;
|
|
1446
|
+
});
|
|
1447
|
+
} else if (mappedChild != null) {
|
|
1448
|
+
if (isValidElement(mappedChild)) {
|
|
1449
|
+
mappedChild = cloneAndReplaceKey(mappedChild, // Keep both the (mapped) and old keys if they differ, just as
|
|
1450
|
+
// traverseAllChildren used to do for objects as children
|
|
1451
|
+
keyPrefix + (mappedChild.key && (!child || child.key !== mappedChild.key) ? escapeUserProvidedKey(mappedChild.key) + '/' : '') + childKey);
|
|
1452
|
+
}
|
|
1453
|
+
|
|
1454
|
+
result.push(mappedChild);
|
|
1455
|
+
}
|
|
1456
|
+
}
|
|
1457
|
+
|
|
1458
|
+
function mapIntoWithKeyPrefixInternal(children, array, prefix, func, context) {
|
|
1459
|
+
var escapedPrefix = '';
|
|
1460
|
+
|
|
1461
|
+
if (prefix != null) {
|
|
1462
|
+
escapedPrefix = escapeUserProvidedKey(prefix) + '/';
|
|
1463
|
+
}
|
|
64
1464
|
|
|
65
|
-
var
|
|
1465
|
+
var traverseContext = getPooledTraverseContext(array, escapedPrefix, func, context);
|
|
1466
|
+
traverseAllChildren(children, mapSingleChildIntoContext, traverseContext);
|
|
1467
|
+
releaseTraverseContext(traverseContext);
|
|
1468
|
+
}
|
|
1469
|
+
/**
|
|
1470
|
+
* Maps children that are typically specified as `props.children`.
|
|
1471
|
+
*
|
|
1472
|
+
* See https://reactjs.org/docs/react-api.html#reactchildrenmap
|
|
1473
|
+
*
|
|
1474
|
+
* The provided mapFunction(child, key, index) will be called for each
|
|
1475
|
+
* leaf child.
|
|
1476
|
+
*
|
|
1477
|
+
* @param {?*} children Children tree container.
|
|
1478
|
+
* @param {function(*, int)} func The map function.
|
|
1479
|
+
* @param {*} context Context for mapFunction.
|
|
1480
|
+
* @return {object} Object containing the ordered map of results.
|
|
1481
|
+
*/
|
|
66
1482
|
|
|
67
|
-
/*
|
|
68
|
-
object-assign
|
|
69
|
-
(c) Sindre Sorhus
|
|
70
|
-
@license MIT
|
|
71
|
-
*/
|
|
72
|
-
/* eslint-disable no-unused-vars */
|
|
73
|
-
var getOwnPropertySymbols$1 = Object.getOwnPropertySymbols;
|
|
74
|
-
var hasOwnProperty$a = Object.prototype.hasOwnProperty;
|
|
75
|
-
var propIsEnumerable = Object.prototype.propertyIsEnumerable;
|
|
76
1483
|
|
|
77
|
-
function
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
1484
|
+
function mapChildren(children, func, context) {
|
|
1485
|
+
if (children == null) {
|
|
1486
|
+
return children;
|
|
1487
|
+
}
|
|
81
1488
|
|
|
82
|
-
|
|
1489
|
+
var result = [];
|
|
1490
|
+
mapIntoWithKeyPrefixInternal(children, result, null, func, context);
|
|
1491
|
+
return result;
|
|
83
1492
|
}
|
|
1493
|
+
/**
|
|
1494
|
+
* Count the number of children that are typically specified as
|
|
1495
|
+
* `props.children`.
|
|
1496
|
+
*
|
|
1497
|
+
* See https://reactjs.org/docs/react-api.html#reactchildrencount
|
|
1498
|
+
*
|
|
1499
|
+
* @param {?*} children Children tree container.
|
|
1500
|
+
* @return {number} The number of children.
|
|
1501
|
+
*/
|
|
84
1502
|
|
|
85
|
-
function shouldUseNative() {
|
|
86
|
-
try {
|
|
87
|
-
if (!Object.assign) {
|
|
88
|
-
return false;
|
|
89
|
-
}
|
|
90
1503
|
|
|
91
|
-
|
|
1504
|
+
function countChildren(children) {
|
|
1505
|
+
return traverseAllChildren(children, function () {
|
|
1506
|
+
return null;
|
|
1507
|
+
}, null);
|
|
1508
|
+
}
|
|
1509
|
+
/**
|
|
1510
|
+
* Flatten a children object (typically specified as `props.children`) and
|
|
1511
|
+
* return an array with appropriately re-keyed children.
|
|
1512
|
+
*
|
|
1513
|
+
* See https://reactjs.org/docs/react-api.html#reactchildrentoarray
|
|
1514
|
+
*/
|
|
92
1515
|
|
|
93
|
-
// https://bugs.chromium.org/p/v8/issues/detail?id=4118
|
|
94
|
-
var test1 = new String('abc'); // eslint-disable-line no-new-wrappers
|
|
95
|
-
test1[5] = 'de';
|
|
96
|
-
if (Object.getOwnPropertyNames(test1)[0] === '5') {
|
|
97
|
-
return false;
|
|
98
|
-
}
|
|
99
1516
|
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
1517
|
+
function toArray(children) {
|
|
1518
|
+
var result = [];
|
|
1519
|
+
mapIntoWithKeyPrefixInternal(children, result, null, function (child) {
|
|
1520
|
+
return child;
|
|
1521
|
+
});
|
|
1522
|
+
return result;
|
|
1523
|
+
}
|
|
1524
|
+
/**
|
|
1525
|
+
* Returns the first child in a collection of children and verifies that there
|
|
1526
|
+
* is only one child in the collection.
|
|
1527
|
+
*
|
|
1528
|
+
* See https://reactjs.org/docs/react-api.html#reactchildrenonly
|
|
1529
|
+
*
|
|
1530
|
+
* The current implementation of this function assumes that a single child gets
|
|
1531
|
+
* passed without a wrapper, but the purpose of this helper function is to
|
|
1532
|
+
* abstract away the particular structure of children.
|
|
1533
|
+
*
|
|
1534
|
+
* @param {?object} children Child collection structure.
|
|
1535
|
+
* @return {ReactElement} The first and only `ReactElement` contained in the
|
|
1536
|
+
* structure.
|
|
1537
|
+
*/
|
|
111
1538
|
|
|
112
|
-
// https://bugs.chromium.org/p/v8/issues/detail?id=3056
|
|
113
|
-
var test3 = {};
|
|
114
|
-
'abcdefghijklmnopqrst'.split('').forEach(function (letter) {
|
|
115
|
-
test3[letter] = letter;
|
|
116
|
-
});
|
|
117
|
-
if (Object.keys(Object.assign({}, test3)).join('') !==
|
|
118
|
-
'abcdefghijklmnopqrst') {
|
|
119
|
-
return false;
|
|
120
|
-
}
|
|
121
1539
|
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
1540
|
+
function onlyChild(children) {
|
|
1541
|
+
if (!isValidElement(children)) {
|
|
1542
|
+
{
|
|
1543
|
+
throw Error( "React.Children.only expected to receive a single React element child." );
|
|
1544
|
+
}
|
|
1545
|
+
}
|
|
1546
|
+
|
|
1547
|
+
return children;
|
|
127
1548
|
}
|
|
128
1549
|
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
1550
|
+
function createContext(defaultValue, calculateChangedBits) {
|
|
1551
|
+
if (calculateChangedBits === undefined) {
|
|
1552
|
+
calculateChangedBits = null;
|
|
1553
|
+
} else {
|
|
1554
|
+
{
|
|
1555
|
+
if (calculateChangedBits !== null && typeof calculateChangedBits !== 'function') {
|
|
1556
|
+
error('createContext: Expected the optional second argument to be a ' + 'function. Instead received: %s', calculateChangedBits);
|
|
1557
|
+
}
|
|
1558
|
+
}
|
|
1559
|
+
}
|
|
1560
|
+
|
|
1561
|
+
var context = {
|
|
1562
|
+
$$typeof: REACT_CONTEXT_TYPE,
|
|
1563
|
+
_calculateChangedBits: calculateChangedBits,
|
|
1564
|
+
// As a workaround to support multiple concurrent renderers, we categorize
|
|
1565
|
+
// some renderers as primary and others as secondary. We only expect
|
|
1566
|
+
// there to be two concurrent renderers at most: React Native (primary) and
|
|
1567
|
+
// Fabric (secondary); React DOM (primary) and React ART (secondary).
|
|
1568
|
+
// Secondary renderers store their context values on separate fields.
|
|
1569
|
+
_currentValue: defaultValue,
|
|
1570
|
+
_currentValue2: defaultValue,
|
|
1571
|
+
// Used to track how many concurrent renderers this context currently
|
|
1572
|
+
// supports within in a single renderer. Such as parallel server rendering.
|
|
1573
|
+
_threadCount: 0,
|
|
1574
|
+
// These are circular
|
|
1575
|
+
Provider: null,
|
|
1576
|
+
Consumer: null
|
|
1577
|
+
};
|
|
1578
|
+
context.Provider = {
|
|
1579
|
+
$$typeof: REACT_PROVIDER_TYPE,
|
|
1580
|
+
_context: context
|
|
1581
|
+
};
|
|
1582
|
+
var hasWarnedAboutUsingNestedContextConsumers = false;
|
|
1583
|
+
var hasWarnedAboutUsingConsumerProvider = false;
|
|
133
1584
|
|
|
134
|
-
|
|
135
|
-
|
|
1585
|
+
{
|
|
1586
|
+
// A separate object, but proxies back to the original context object for
|
|
1587
|
+
// backwards compatibility. It has a different $$typeof, so we can properly
|
|
1588
|
+
// warn for the incorrect usage of Context as a Consumer.
|
|
1589
|
+
var Consumer = {
|
|
1590
|
+
$$typeof: REACT_CONTEXT_TYPE,
|
|
1591
|
+
_context: context,
|
|
1592
|
+
_calculateChangedBits: context._calculateChangedBits
|
|
1593
|
+
}; // $FlowFixMe: Flow complains about not setting a value, which is intentional here
|
|
1594
|
+
|
|
1595
|
+
Object.defineProperties(Consumer, {
|
|
1596
|
+
Provider: {
|
|
1597
|
+
get: function () {
|
|
1598
|
+
if (!hasWarnedAboutUsingConsumerProvider) {
|
|
1599
|
+
hasWarnedAboutUsingConsumerProvider = true;
|
|
1600
|
+
|
|
1601
|
+
error('Rendering <Context.Consumer.Provider> is not supported and will be removed in ' + 'a future major release. Did you mean to render <Context.Provider> instead?');
|
|
1602
|
+
}
|
|
136
1603
|
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
1604
|
+
return context.Provider;
|
|
1605
|
+
},
|
|
1606
|
+
set: function (_Provider) {
|
|
1607
|
+
context.Provider = _Provider;
|
|
1608
|
+
}
|
|
1609
|
+
},
|
|
1610
|
+
_currentValue: {
|
|
1611
|
+
get: function () {
|
|
1612
|
+
return context._currentValue;
|
|
1613
|
+
},
|
|
1614
|
+
set: function (_currentValue) {
|
|
1615
|
+
context._currentValue = _currentValue;
|
|
1616
|
+
}
|
|
1617
|
+
},
|
|
1618
|
+
_currentValue2: {
|
|
1619
|
+
get: function () {
|
|
1620
|
+
return context._currentValue2;
|
|
1621
|
+
},
|
|
1622
|
+
set: function (_currentValue2) {
|
|
1623
|
+
context._currentValue2 = _currentValue2;
|
|
1624
|
+
}
|
|
1625
|
+
},
|
|
1626
|
+
_threadCount: {
|
|
1627
|
+
get: function () {
|
|
1628
|
+
return context._threadCount;
|
|
1629
|
+
},
|
|
1630
|
+
set: function (_threadCount) {
|
|
1631
|
+
context._threadCount = _threadCount;
|
|
1632
|
+
}
|
|
1633
|
+
},
|
|
1634
|
+
Consumer: {
|
|
1635
|
+
get: function () {
|
|
1636
|
+
if (!hasWarnedAboutUsingNestedContextConsumers) {
|
|
1637
|
+
hasWarnedAboutUsingNestedContextConsumers = true;
|
|
142
1638
|
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
for (var i = 0; i < symbols.length; i++) {
|
|
146
|
-
if (propIsEnumerable.call(from, symbols[i])) {
|
|
147
|
-
to[symbols[i]] = from[symbols[i]];
|
|
148
|
-
}
|
|
149
|
-
}
|
|
150
|
-
}
|
|
151
|
-
}
|
|
1639
|
+
error('Rendering <Context.Consumer.Consumer> is not supported and will be removed in ' + 'a future major release. Did you mean to render <Context.Consumer> instead?');
|
|
1640
|
+
}
|
|
152
1641
|
|
|
153
|
-
|
|
1642
|
+
return context.Consumer;
|
|
1643
|
+
}
|
|
1644
|
+
}
|
|
1645
|
+
}); // $FlowFixMe: Flow complains about missing properties because it doesn't understand defineProperty
|
|
1646
|
+
|
|
1647
|
+
context.Consumer = Consumer;
|
|
1648
|
+
}
|
|
1649
|
+
|
|
1650
|
+
{
|
|
1651
|
+
context._currentRenderer = null;
|
|
1652
|
+
context._currentRenderer2 = null;
|
|
1653
|
+
}
|
|
1654
|
+
|
|
1655
|
+
return context;
|
|
1656
|
+
}
|
|
1657
|
+
|
|
1658
|
+
function lazy(ctor) {
|
|
1659
|
+
var lazyType = {
|
|
1660
|
+
$$typeof: REACT_LAZY_TYPE,
|
|
1661
|
+
_ctor: ctor,
|
|
1662
|
+
// React uses these fields to store the result.
|
|
1663
|
+
_status: -1,
|
|
1664
|
+
_result: null
|
|
1665
|
+
};
|
|
1666
|
+
|
|
1667
|
+
{
|
|
1668
|
+
// In production, this would just set it on the object.
|
|
1669
|
+
var defaultProps;
|
|
1670
|
+
var propTypes;
|
|
1671
|
+
Object.defineProperties(lazyType, {
|
|
1672
|
+
defaultProps: {
|
|
1673
|
+
configurable: true,
|
|
1674
|
+
get: function () {
|
|
1675
|
+
return defaultProps;
|
|
1676
|
+
},
|
|
1677
|
+
set: function (newDefaultProps) {
|
|
1678
|
+
error('React.lazy(...): It is not supported to assign `defaultProps` to ' + 'a lazy component import. Either specify them where the component ' + 'is defined, or create a wrapping component around it.');
|
|
1679
|
+
|
|
1680
|
+
defaultProps = newDefaultProps; // Match production behavior more closely:
|
|
1681
|
+
|
|
1682
|
+
Object.defineProperty(lazyType, 'defaultProps', {
|
|
1683
|
+
enumerable: true
|
|
1684
|
+
});
|
|
1685
|
+
}
|
|
1686
|
+
},
|
|
1687
|
+
propTypes: {
|
|
1688
|
+
configurable: true,
|
|
1689
|
+
get: function () {
|
|
1690
|
+
return propTypes;
|
|
1691
|
+
},
|
|
1692
|
+
set: function (newPropTypes) {
|
|
1693
|
+
error('React.lazy(...): It is not supported to assign `propTypes` to ' + 'a lazy component import. Either specify them where the component ' + 'is defined, or create a wrapping component around it.');
|
|
1694
|
+
|
|
1695
|
+
propTypes = newPropTypes; // Match production behavior more closely:
|
|
1696
|
+
|
|
1697
|
+
Object.defineProperty(lazyType, 'propTypes', {
|
|
1698
|
+
enumerable: true
|
|
1699
|
+
});
|
|
1700
|
+
}
|
|
1701
|
+
}
|
|
1702
|
+
});
|
|
1703
|
+
}
|
|
1704
|
+
|
|
1705
|
+
return lazyType;
|
|
1706
|
+
}
|
|
1707
|
+
|
|
1708
|
+
function forwardRef(render) {
|
|
1709
|
+
{
|
|
1710
|
+
if (render != null && render.$$typeof === REACT_MEMO_TYPE) {
|
|
1711
|
+
error('forwardRef requires a render function but received a `memo` ' + 'component. Instead of forwardRef(memo(...)), use ' + 'memo(forwardRef(...)).');
|
|
1712
|
+
} else if (typeof render !== 'function') {
|
|
1713
|
+
error('forwardRef requires a render function but was given %s.', render === null ? 'null' : typeof render);
|
|
1714
|
+
} else {
|
|
1715
|
+
if (render.length !== 0 && render.length !== 2) {
|
|
1716
|
+
error('forwardRef render functions accept exactly two parameters: props and ref. %s', render.length === 1 ? 'Did you forget to use the ref parameter?' : 'Any additional parameter will be undefined.');
|
|
1717
|
+
}
|
|
1718
|
+
}
|
|
1719
|
+
|
|
1720
|
+
if (render != null) {
|
|
1721
|
+
if (render.defaultProps != null || render.propTypes != null) {
|
|
1722
|
+
error('forwardRef render functions do not support propTypes or defaultProps. ' + 'Did you accidentally pass a React component?');
|
|
1723
|
+
}
|
|
1724
|
+
}
|
|
1725
|
+
}
|
|
1726
|
+
|
|
1727
|
+
return {
|
|
1728
|
+
$$typeof: REACT_FORWARD_REF_TYPE,
|
|
1729
|
+
render: render
|
|
1730
|
+
};
|
|
1731
|
+
}
|
|
1732
|
+
|
|
1733
|
+
function isValidElementType(type) {
|
|
1734
|
+
return typeof type === 'string' || typeof type === 'function' || // Note: its typeof might be other than 'symbol' or 'number' if it's a polyfill.
|
|
1735
|
+
type === REACT_FRAGMENT_TYPE || type === REACT_CONCURRENT_MODE_TYPE || type === REACT_PROFILER_TYPE || type === REACT_STRICT_MODE_TYPE || type === REACT_SUSPENSE_TYPE || type === REACT_SUSPENSE_LIST_TYPE || typeof type === 'object' && type !== null && (type.$$typeof === REACT_LAZY_TYPE || type.$$typeof === REACT_MEMO_TYPE || type.$$typeof === REACT_PROVIDER_TYPE || type.$$typeof === REACT_CONTEXT_TYPE || type.$$typeof === REACT_FORWARD_REF_TYPE || type.$$typeof === REACT_FUNDAMENTAL_TYPE || type.$$typeof === REACT_RESPONDER_TYPE || type.$$typeof === REACT_SCOPE_TYPE || type.$$typeof === REACT_BLOCK_TYPE);
|
|
1736
|
+
}
|
|
1737
|
+
|
|
1738
|
+
function memo(type, compare) {
|
|
1739
|
+
{
|
|
1740
|
+
if (!isValidElementType(type)) {
|
|
1741
|
+
error('memo: The first argument must be a component. Instead ' + 'received: %s', type === null ? 'null' : typeof type);
|
|
1742
|
+
}
|
|
1743
|
+
}
|
|
1744
|
+
|
|
1745
|
+
return {
|
|
1746
|
+
$$typeof: REACT_MEMO_TYPE,
|
|
1747
|
+
type: type,
|
|
1748
|
+
compare: compare === undefined ? null : compare
|
|
1749
|
+
};
|
|
1750
|
+
}
|
|
1751
|
+
|
|
1752
|
+
function resolveDispatcher() {
|
|
1753
|
+
var dispatcher = ReactCurrentDispatcher.current;
|
|
1754
|
+
|
|
1755
|
+
if (!(dispatcher !== null)) {
|
|
1756
|
+
{
|
|
1757
|
+
throw Error( "Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for one of the following reasons:\n1. You might have mismatching versions of React and the renderer (such as React DOM)\n2. You might be breaking the Rules of Hooks\n3. You might have more than one copy of React in the same app\nSee https://fb.me/react-invalid-hook-call for tips about how to debug and fix this problem." );
|
|
1758
|
+
}
|
|
1759
|
+
}
|
|
1760
|
+
|
|
1761
|
+
return dispatcher;
|
|
1762
|
+
}
|
|
1763
|
+
|
|
1764
|
+
function useContext(Context, unstable_observedBits) {
|
|
1765
|
+
var dispatcher = resolveDispatcher();
|
|
1766
|
+
|
|
1767
|
+
{
|
|
1768
|
+
if (unstable_observedBits !== undefined) {
|
|
1769
|
+
error('useContext() second argument is reserved for future ' + 'use in React. Passing it is not supported. ' + 'You passed: %s.%s', unstable_observedBits, typeof unstable_observedBits === 'number' && Array.isArray(arguments[2]) ? '\n\nDid you call array.map(useContext)? ' + 'Calling Hooks inside a loop is not supported. ' + 'Learn more at https://fb.me/rules-of-hooks' : '');
|
|
1770
|
+
} // TODO: add a more generic warning for invalid values.
|
|
1771
|
+
|
|
1772
|
+
|
|
1773
|
+
if (Context._context !== undefined) {
|
|
1774
|
+
var realContext = Context._context; // Don't deduplicate because this legitimately causes bugs
|
|
1775
|
+
// and nobody should be using this in existing code.
|
|
1776
|
+
|
|
1777
|
+
if (realContext.Consumer === Context) {
|
|
1778
|
+
error('Calling useContext(Context.Consumer) is not supported, may cause bugs, and will be ' + 'removed in a future major release. Did you mean to call useContext(Context) instead?');
|
|
1779
|
+
} else if (realContext.Provider === Context) {
|
|
1780
|
+
error('Calling useContext(Context.Provider) is not supported. ' + 'Did you mean to call useContext(Context) instead?');
|
|
1781
|
+
}
|
|
1782
|
+
}
|
|
1783
|
+
}
|
|
1784
|
+
|
|
1785
|
+
return dispatcher.useContext(Context, unstable_observedBits);
|
|
1786
|
+
}
|
|
1787
|
+
function useState(initialState) {
|
|
1788
|
+
var dispatcher = resolveDispatcher();
|
|
1789
|
+
return dispatcher.useState(initialState);
|
|
1790
|
+
}
|
|
1791
|
+
function useReducer(reducer, initialArg, init) {
|
|
1792
|
+
var dispatcher = resolveDispatcher();
|
|
1793
|
+
return dispatcher.useReducer(reducer, initialArg, init);
|
|
1794
|
+
}
|
|
1795
|
+
function useRef(initialValue) {
|
|
1796
|
+
var dispatcher = resolveDispatcher();
|
|
1797
|
+
return dispatcher.useRef(initialValue);
|
|
1798
|
+
}
|
|
1799
|
+
function useEffect(create, deps) {
|
|
1800
|
+
var dispatcher = resolveDispatcher();
|
|
1801
|
+
return dispatcher.useEffect(create, deps);
|
|
1802
|
+
}
|
|
1803
|
+
function useLayoutEffect(create, deps) {
|
|
1804
|
+
var dispatcher = resolveDispatcher();
|
|
1805
|
+
return dispatcher.useLayoutEffect(create, deps);
|
|
1806
|
+
}
|
|
1807
|
+
function useCallback(callback, deps) {
|
|
1808
|
+
var dispatcher = resolveDispatcher();
|
|
1809
|
+
return dispatcher.useCallback(callback, deps);
|
|
1810
|
+
}
|
|
1811
|
+
function useMemo(create, deps) {
|
|
1812
|
+
var dispatcher = resolveDispatcher();
|
|
1813
|
+
return dispatcher.useMemo(create, deps);
|
|
1814
|
+
}
|
|
1815
|
+
function useImperativeHandle(ref, create, deps) {
|
|
1816
|
+
var dispatcher = resolveDispatcher();
|
|
1817
|
+
return dispatcher.useImperativeHandle(ref, create, deps);
|
|
1818
|
+
}
|
|
1819
|
+
function useDebugValue(value, formatterFn) {
|
|
1820
|
+
{
|
|
1821
|
+
var dispatcher = resolveDispatcher();
|
|
1822
|
+
return dispatcher.useDebugValue(value, formatterFn);
|
|
1823
|
+
}
|
|
1824
|
+
}
|
|
1825
|
+
|
|
1826
|
+
var propTypesMisspellWarningShown;
|
|
1827
|
+
|
|
1828
|
+
{
|
|
1829
|
+
propTypesMisspellWarningShown = false;
|
|
1830
|
+
}
|
|
1831
|
+
|
|
1832
|
+
function getDeclarationErrorAddendum() {
|
|
1833
|
+
if (ReactCurrentOwner.current) {
|
|
1834
|
+
var name = getComponentName(ReactCurrentOwner.current.type);
|
|
1835
|
+
|
|
1836
|
+
if (name) {
|
|
1837
|
+
return '\n\nCheck the render method of `' + name + '`.';
|
|
1838
|
+
}
|
|
1839
|
+
}
|
|
1840
|
+
|
|
1841
|
+
return '';
|
|
1842
|
+
}
|
|
1843
|
+
|
|
1844
|
+
function getSourceInfoErrorAddendum(source) {
|
|
1845
|
+
if (source !== undefined) {
|
|
1846
|
+
var fileName = source.fileName.replace(/^.*[\\\/]/, '');
|
|
1847
|
+
var lineNumber = source.lineNumber;
|
|
1848
|
+
return '\n\nCheck your code at ' + fileName + ':' + lineNumber + '.';
|
|
1849
|
+
}
|
|
1850
|
+
|
|
1851
|
+
return '';
|
|
1852
|
+
}
|
|
1853
|
+
|
|
1854
|
+
function getSourceInfoErrorAddendumForProps(elementProps) {
|
|
1855
|
+
if (elementProps !== null && elementProps !== undefined) {
|
|
1856
|
+
return getSourceInfoErrorAddendum(elementProps.__source);
|
|
1857
|
+
}
|
|
1858
|
+
|
|
1859
|
+
return '';
|
|
1860
|
+
}
|
|
1861
|
+
/**
|
|
1862
|
+
* Warn if there's no key explicitly set on dynamic arrays of children or
|
|
1863
|
+
* object keys are not valid. This allows us to keep track of children between
|
|
1864
|
+
* updates.
|
|
1865
|
+
*/
|
|
1866
|
+
|
|
1867
|
+
|
|
1868
|
+
var ownerHasKeyUseWarning = {};
|
|
1869
|
+
|
|
1870
|
+
function getCurrentComponentErrorInfo(parentType) {
|
|
1871
|
+
var info = getDeclarationErrorAddendum();
|
|
1872
|
+
|
|
1873
|
+
if (!info) {
|
|
1874
|
+
var parentName = typeof parentType === 'string' ? parentType : parentType.displayName || parentType.name;
|
|
1875
|
+
|
|
1876
|
+
if (parentName) {
|
|
1877
|
+
info = "\n\nCheck the top-level render call using <" + parentName + ">.";
|
|
1878
|
+
}
|
|
1879
|
+
}
|
|
1880
|
+
|
|
1881
|
+
return info;
|
|
1882
|
+
}
|
|
1883
|
+
/**
|
|
1884
|
+
* Warn if the element doesn't have an explicit key assigned to it.
|
|
1885
|
+
* This element is in an array. The array could grow and shrink or be
|
|
1886
|
+
* reordered. All children that haven't already been validated are required to
|
|
1887
|
+
* have a "key" property assigned to it. Error statuses are cached so a warning
|
|
1888
|
+
* will only be shown once.
|
|
1889
|
+
*
|
|
1890
|
+
* @internal
|
|
1891
|
+
* @param {ReactElement} element Element that requires a key.
|
|
1892
|
+
* @param {*} parentType element's parent's type.
|
|
1893
|
+
*/
|
|
1894
|
+
|
|
1895
|
+
|
|
1896
|
+
function validateExplicitKey(element, parentType) {
|
|
1897
|
+
if (!element._store || element._store.validated || element.key != null) {
|
|
1898
|
+
return;
|
|
1899
|
+
}
|
|
1900
|
+
|
|
1901
|
+
element._store.validated = true;
|
|
1902
|
+
var currentComponentErrorInfo = getCurrentComponentErrorInfo(parentType);
|
|
1903
|
+
|
|
1904
|
+
if (ownerHasKeyUseWarning[currentComponentErrorInfo]) {
|
|
1905
|
+
return;
|
|
1906
|
+
}
|
|
1907
|
+
|
|
1908
|
+
ownerHasKeyUseWarning[currentComponentErrorInfo] = true; // Usually the current owner is the offender, but if it accepts children as a
|
|
1909
|
+
// property, it may be the creator of the child that's responsible for
|
|
1910
|
+
// assigning it a key.
|
|
1911
|
+
|
|
1912
|
+
var childOwner = '';
|
|
1913
|
+
|
|
1914
|
+
if (element && element._owner && element._owner !== ReactCurrentOwner.current) {
|
|
1915
|
+
// Give the component that originally created this child.
|
|
1916
|
+
childOwner = " It was passed a child from " + getComponentName(element._owner.type) + ".";
|
|
1917
|
+
}
|
|
1918
|
+
|
|
1919
|
+
setCurrentlyValidatingElement(element);
|
|
1920
|
+
|
|
1921
|
+
{
|
|
1922
|
+
error('Each child in a list should have a unique "key" prop.' + '%s%s See https://fb.me/react-warning-keys for more information.', currentComponentErrorInfo, childOwner);
|
|
1923
|
+
}
|
|
1924
|
+
|
|
1925
|
+
setCurrentlyValidatingElement(null);
|
|
1926
|
+
}
|
|
1927
|
+
/**
|
|
1928
|
+
* Ensure that every element either is passed in a static location, in an
|
|
1929
|
+
* array with an explicit keys property defined, or in an object literal
|
|
1930
|
+
* with valid key property.
|
|
1931
|
+
*
|
|
1932
|
+
* @internal
|
|
1933
|
+
* @param {ReactNode} node Statically passed child of any type.
|
|
1934
|
+
* @param {*} parentType node's parent's type.
|
|
1935
|
+
*/
|
|
1936
|
+
|
|
1937
|
+
|
|
1938
|
+
function validateChildKeys(node, parentType) {
|
|
1939
|
+
if (typeof node !== 'object') {
|
|
1940
|
+
return;
|
|
1941
|
+
}
|
|
1942
|
+
|
|
1943
|
+
if (Array.isArray(node)) {
|
|
1944
|
+
for (var i = 0; i < node.length; i++) {
|
|
1945
|
+
var child = node[i];
|
|
1946
|
+
|
|
1947
|
+
if (isValidElement(child)) {
|
|
1948
|
+
validateExplicitKey(child, parentType);
|
|
1949
|
+
}
|
|
1950
|
+
}
|
|
1951
|
+
} else if (isValidElement(node)) {
|
|
1952
|
+
// This element was passed in a valid location.
|
|
1953
|
+
if (node._store) {
|
|
1954
|
+
node._store.validated = true;
|
|
1955
|
+
}
|
|
1956
|
+
} else if (node) {
|
|
1957
|
+
var iteratorFn = getIteratorFn(node);
|
|
1958
|
+
|
|
1959
|
+
if (typeof iteratorFn === 'function') {
|
|
1960
|
+
// Entry iterators used to provide implicit keys,
|
|
1961
|
+
// but now we print a separate warning for them later.
|
|
1962
|
+
if (iteratorFn !== node.entries) {
|
|
1963
|
+
var iterator = iteratorFn.call(node);
|
|
1964
|
+
var step;
|
|
1965
|
+
|
|
1966
|
+
while (!(step = iterator.next()).done) {
|
|
1967
|
+
if (isValidElement(step.value)) {
|
|
1968
|
+
validateExplicitKey(step.value, parentType);
|
|
1969
|
+
}
|
|
1970
|
+
}
|
|
1971
|
+
}
|
|
1972
|
+
}
|
|
1973
|
+
}
|
|
1974
|
+
}
|
|
1975
|
+
/**
|
|
1976
|
+
* Given an element, validate that its props follow the propTypes definition,
|
|
1977
|
+
* provided by the type.
|
|
1978
|
+
*
|
|
1979
|
+
* @param {ReactElement} element
|
|
1980
|
+
*/
|
|
1981
|
+
|
|
1982
|
+
|
|
1983
|
+
function validatePropTypes(element) {
|
|
1984
|
+
{
|
|
1985
|
+
var type = element.type;
|
|
1986
|
+
|
|
1987
|
+
if (type === null || type === undefined || typeof type === 'string') {
|
|
1988
|
+
return;
|
|
1989
|
+
}
|
|
1990
|
+
|
|
1991
|
+
var name = getComponentName(type);
|
|
1992
|
+
var propTypes;
|
|
1993
|
+
|
|
1994
|
+
if (typeof type === 'function') {
|
|
1995
|
+
propTypes = type.propTypes;
|
|
1996
|
+
} else if (typeof type === 'object' && (type.$$typeof === REACT_FORWARD_REF_TYPE || // Note: Memo only checks outer props here.
|
|
1997
|
+
// Inner props are checked in the reconciler.
|
|
1998
|
+
type.$$typeof === REACT_MEMO_TYPE)) {
|
|
1999
|
+
propTypes = type.propTypes;
|
|
2000
|
+
} else {
|
|
2001
|
+
return;
|
|
2002
|
+
}
|
|
2003
|
+
|
|
2004
|
+
if (propTypes) {
|
|
2005
|
+
setCurrentlyValidatingElement(element);
|
|
2006
|
+
checkPropTypes(propTypes, element.props, 'prop', name, ReactDebugCurrentFrame.getStackAddendum);
|
|
2007
|
+
setCurrentlyValidatingElement(null);
|
|
2008
|
+
} else if (type.PropTypes !== undefined && !propTypesMisspellWarningShown) {
|
|
2009
|
+
propTypesMisspellWarningShown = true;
|
|
2010
|
+
|
|
2011
|
+
error('Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?', name || 'Unknown');
|
|
2012
|
+
}
|
|
2013
|
+
|
|
2014
|
+
if (typeof type.getDefaultProps === 'function' && !type.getDefaultProps.isReactClassApproved) {
|
|
2015
|
+
error('getDefaultProps is only used on classic React.createClass ' + 'definitions. Use a static property named `defaultProps` instead.');
|
|
2016
|
+
}
|
|
2017
|
+
}
|
|
2018
|
+
}
|
|
2019
|
+
/**
|
|
2020
|
+
* Given a fragment, validate that it can only be provided with fragment props
|
|
2021
|
+
* @param {ReactElement} fragment
|
|
2022
|
+
*/
|
|
2023
|
+
|
|
2024
|
+
|
|
2025
|
+
function validateFragmentProps(fragment) {
|
|
2026
|
+
{
|
|
2027
|
+
setCurrentlyValidatingElement(fragment);
|
|
2028
|
+
var keys = Object.keys(fragment.props);
|
|
2029
|
+
|
|
2030
|
+
for (var i = 0; i < keys.length; i++) {
|
|
2031
|
+
var key = keys[i];
|
|
2032
|
+
|
|
2033
|
+
if (key !== 'children' && key !== 'key') {
|
|
2034
|
+
error('Invalid prop `%s` supplied to `React.Fragment`. ' + 'React.Fragment can only have `key` and `children` props.', key);
|
|
2035
|
+
|
|
2036
|
+
break;
|
|
2037
|
+
}
|
|
2038
|
+
}
|
|
2039
|
+
|
|
2040
|
+
if (fragment.ref !== null) {
|
|
2041
|
+
error('Invalid attribute `ref` supplied to `React.Fragment`.');
|
|
2042
|
+
}
|
|
2043
|
+
|
|
2044
|
+
setCurrentlyValidatingElement(null);
|
|
2045
|
+
}
|
|
2046
|
+
}
|
|
2047
|
+
function createElementWithValidation(type, props, children) {
|
|
2048
|
+
var validType = isValidElementType(type); // We warn in this case but don't throw. We expect the element creation to
|
|
2049
|
+
// succeed and there will likely be errors in render.
|
|
2050
|
+
|
|
2051
|
+
if (!validType) {
|
|
2052
|
+
var info = '';
|
|
2053
|
+
|
|
2054
|
+
if (type === undefined || typeof type === 'object' && type !== null && Object.keys(type).length === 0) {
|
|
2055
|
+
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.";
|
|
2056
|
+
}
|
|
2057
|
+
|
|
2058
|
+
var sourceInfo = getSourceInfoErrorAddendumForProps(props);
|
|
2059
|
+
|
|
2060
|
+
if (sourceInfo) {
|
|
2061
|
+
info += sourceInfo;
|
|
2062
|
+
} else {
|
|
2063
|
+
info += getDeclarationErrorAddendum();
|
|
2064
|
+
}
|
|
2065
|
+
|
|
2066
|
+
var typeString;
|
|
2067
|
+
|
|
2068
|
+
if (type === null) {
|
|
2069
|
+
typeString = 'null';
|
|
2070
|
+
} else if (Array.isArray(type)) {
|
|
2071
|
+
typeString = 'array';
|
|
2072
|
+
} else if (type !== undefined && type.$$typeof === REACT_ELEMENT_TYPE) {
|
|
2073
|
+
typeString = "<" + (getComponentName(type.type) || 'Unknown') + " />";
|
|
2074
|
+
info = ' Did you accidentally export a JSX literal instead of a component?';
|
|
2075
|
+
} else {
|
|
2076
|
+
typeString = typeof type;
|
|
2077
|
+
}
|
|
2078
|
+
|
|
2079
|
+
{
|
|
2080
|
+
error('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);
|
|
2081
|
+
}
|
|
2082
|
+
}
|
|
2083
|
+
|
|
2084
|
+
var element = createElement.apply(this, arguments); // The result can be nullish if a mock or a custom function is used.
|
|
2085
|
+
// TODO: Drop this when these are no longer allowed as the type argument.
|
|
2086
|
+
|
|
2087
|
+
if (element == null) {
|
|
2088
|
+
return element;
|
|
2089
|
+
} // Skip key warning if the type isn't valid since our key validation logic
|
|
2090
|
+
// doesn't expect a non-string/function type and can throw confusing errors.
|
|
2091
|
+
// We don't want exception behavior to differ between dev and prod.
|
|
2092
|
+
// (Rendering will throw with a helpful message and as soon as the type is
|
|
2093
|
+
// fixed, the key warnings will appear.)
|
|
2094
|
+
|
|
2095
|
+
|
|
2096
|
+
if (validType) {
|
|
2097
|
+
for (var i = 2; i < arguments.length; i++) {
|
|
2098
|
+
validateChildKeys(arguments[i], type);
|
|
2099
|
+
}
|
|
2100
|
+
}
|
|
2101
|
+
|
|
2102
|
+
if (type === REACT_FRAGMENT_TYPE) {
|
|
2103
|
+
validateFragmentProps(element);
|
|
2104
|
+
} else {
|
|
2105
|
+
validatePropTypes(element);
|
|
2106
|
+
}
|
|
2107
|
+
|
|
2108
|
+
return element;
|
|
2109
|
+
}
|
|
2110
|
+
var didWarnAboutDeprecatedCreateFactory = false;
|
|
2111
|
+
function createFactoryWithValidation(type) {
|
|
2112
|
+
var validatedFactory = createElementWithValidation.bind(null, type);
|
|
2113
|
+
validatedFactory.type = type;
|
|
2114
|
+
|
|
2115
|
+
{
|
|
2116
|
+
if (!didWarnAboutDeprecatedCreateFactory) {
|
|
2117
|
+
didWarnAboutDeprecatedCreateFactory = true;
|
|
2118
|
+
|
|
2119
|
+
warn('React.createFactory() is deprecated and will be removed in ' + 'a future major release. Consider using JSX ' + 'or use React.createElement() directly instead.');
|
|
2120
|
+
} // Legacy hook: remove it
|
|
2121
|
+
|
|
2122
|
+
|
|
2123
|
+
Object.defineProperty(validatedFactory, 'type', {
|
|
2124
|
+
enumerable: false,
|
|
2125
|
+
get: function () {
|
|
2126
|
+
warn('Factory.type is deprecated. Access the class directly ' + 'before passing it to createFactory.');
|
|
2127
|
+
|
|
2128
|
+
Object.defineProperty(this, 'type', {
|
|
2129
|
+
value: type
|
|
2130
|
+
});
|
|
2131
|
+
return type;
|
|
2132
|
+
}
|
|
2133
|
+
});
|
|
2134
|
+
}
|
|
2135
|
+
|
|
2136
|
+
return validatedFactory;
|
|
2137
|
+
}
|
|
2138
|
+
function cloneElementWithValidation(element, props, children) {
|
|
2139
|
+
var newElement = cloneElement.apply(this, arguments);
|
|
2140
|
+
|
|
2141
|
+
for (var i = 2; i < arguments.length; i++) {
|
|
2142
|
+
validateChildKeys(arguments[i], newElement.type);
|
|
2143
|
+
}
|
|
2144
|
+
|
|
2145
|
+
validatePropTypes(newElement);
|
|
2146
|
+
return newElement;
|
|
2147
|
+
}
|
|
2148
|
+
|
|
2149
|
+
{
|
|
2150
|
+
|
|
2151
|
+
try {
|
|
2152
|
+
var frozenObject = Object.freeze({});
|
|
2153
|
+
var testMap = new Map([[frozenObject, null]]);
|
|
2154
|
+
var testSet = new Set([frozenObject]); // This is necessary for Rollup to not consider these unused.
|
|
2155
|
+
// https://github.com/rollup/rollup/issues/1771
|
|
2156
|
+
// TODO: we can remove these if Rollup fixes the bug.
|
|
2157
|
+
|
|
2158
|
+
testMap.set(0, 0);
|
|
2159
|
+
testSet.add(0);
|
|
2160
|
+
} catch (e) {
|
|
2161
|
+
}
|
|
2162
|
+
}
|
|
2163
|
+
|
|
2164
|
+
var createElement$1 = createElementWithValidation ;
|
|
2165
|
+
var cloneElement$1 = cloneElementWithValidation ;
|
|
2166
|
+
var createFactory = createFactoryWithValidation ;
|
|
2167
|
+
var Children = {
|
|
2168
|
+
map: mapChildren,
|
|
2169
|
+
forEach: forEachChildren,
|
|
2170
|
+
count: countChildren,
|
|
2171
|
+
toArray: toArray,
|
|
2172
|
+
only: onlyChild
|
|
154
2173
|
};
|
|
155
2174
|
|
|
2175
|
+
react_development.Children = Children;
|
|
2176
|
+
react_development.Component = Component;
|
|
2177
|
+
react_development.Fragment = REACT_FRAGMENT_TYPE;
|
|
2178
|
+
react_development.Profiler = REACT_PROFILER_TYPE;
|
|
2179
|
+
react_development.PureComponent = PureComponent;
|
|
2180
|
+
react_development.StrictMode = REACT_STRICT_MODE_TYPE;
|
|
2181
|
+
react_development.Suspense = REACT_SUSPENSE_TYPE;
|
|
2182
|
+
react_development.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED = ReactSharedInternals;
|
|
2183
|
+
react_development.cloneElement = cloneElement$1;
|
|
2184
|
+
react_development.createContext = createContext;
|
|
2185
|
+
react_development.createElement = createElement$1;
|
|
2186
|
+
react_development.createFactory = createFactory;
|
|
2187
|
+
react_development.createRef = createRef;
|
|
2188
|
+
react_development.forwardRef = forwardRef;
|
|
2189
|
+
react_development.isValidElement = isValidElement;
|
|
2190
|
+
react_development.lazy = lazy;
|
|
2191
|
+
react_development.memo = memo;
|
|
2192
|
+
react_development.useCallback = useCallback;
|
|
2193
|
+
react_development.useContext = useContext;
|
|
2194
|
+
react_development.useDebugValue = useDebugValue;
|
|
2195
|
+
react_development.useEffect = useEffect;
|
|
2196
|
+
react_development.useImperativeHandle = useImperativeHandle;
|
|
2197
|
+
react_development.useLayoutEffect = useLayoutEffect;
|
|
2198
|
+
react_development.useMemo = useMemo;
|
|
2199
|
+
react_development.useReducer = useReducer;
|
|
2200
|
+
react_development.useRef = useRef;
|
|
2201
|
+
react_development.useState = useState;
|
|
2202
|
+
react_development.version = ReactVersion;
|
|
2203
|
+
})();
|
|
2204
|
+
}
|
|
2205
|
+
|
|
2206
|
+
if (process.env.NODE_ENV === 'production') {
|
|
2207
|
+
react.exports = react_production_min;
|
|
2208
|
+
} else {
|
|
2209
|
+
react.exports = react_development;
|
|
2210
|
+
}
|
|
2211
|
+
|
|
2212
|
+
var React$1 = react.exports;
|
|
2213
|
+
|
|
2214
|
+
var reactDom = {exports: {}};
|
|
2215
|
+
|
|
2216
|
+
var reactDom_production_min = {};
|
|
2217
|
+
|
|
156
2218
|
var scheduler = {exports: {}};
|
|
157
2219
|
|
|
158
2220
|
var scheduler_production_min = {};
|
|
@@ -1053,7 +3115,7 @@ if (process.env.NODE_ENV === 'production') {
|
|
|
1053
3115
|
* This source code is licensed under the MIT license found in the
|
|
1054
3116
|
* LICENSE file in the root directory of this source tree.
|
|
1055
3117
|
*/
|
|
1056
|
-
var aa=
|
|
3118
|
+
var aa=react.exports,n$1=objectAssign,r$1=scheduler.exports;function u(a){for(var b="https://reactjs.org/docs/error-decoder.html?invariant="+a,c=1;c<arguments.length;c++)b+="&args[]="+encodeURIComponent(arguments[c]);return "Minified React error #"+a+"; visit "+b+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}if(!aa)throw Error(u(227));
|
|
1057
3119
|
function ba(a,b,c,d,e,f,g,h,k){var l=Array.prototype.slice.call(arguments,3);try{b.apply(c,l);}catch(m){this.onError(m);}}var da=!1,ea=null,fa=!1,ha=null,ia={onError:function(a){da=!0;ea=a;}};function ja(a,b,c,d,e,f,g,h,k){da=!1;ea=null;ba.apply(ia,arguments);}function ka(a,b,c,d,e,f,g,h,k){ja.apply(this,arguments);if(da){if(da){var l=ea;da=!1;ea=null;}else throw Error(u(198));fa||(fa=!0,ha=l);}}var la=null,ma=null,na=null;
|
|
1058
3120
|
function oa(a,b,c){var d=a.type||"unknown-event";a.currentTarget=na(c);ka(d,b,void 0,a);a.currentTarget=null;}var pa=null,qa={};
|
|
1059
3121
|
function ra(){if(pa)for(var a in qa){var b=qa[a],c=pa.indexOf(a);if(!(-1<c))throw Error(u(96,a));if(!sa[c]){if(!b.extractEvents)throw Error(u(97,a));sa[c]=b;c=b.eventTypes;for(var d in c){var e=void 0;var f=c[d],g=b,h=d;if(ta.hasOwnProperty(h))throw Error(u(99,h));ta[h]=f;var k=f.phasedRegistrationNames;if(k){for(e in k)k.hasOwnProperty(e)&&ua(k[e],g,h);e=!0;}else f.registrationName?(ua(f.registrationName,g,h),e=!0):e=!1;if(!e)throw Error(u(98,d,a));}}}}
|
|
@@ -1336,121 +3398,6 @@ reactDom_production_min.unstable_renderSubtreeIntoContainer=function(a,b,c,d){if
|
|
|
1336
3398
|
|
|
1337
3399
|
var reactDom_development = {};
|
|
1338
3400
|
|
|
1339
|
-
/**
|
|
1340
|
-
* Copyright (c) 2013-present, Facebook, Inc.
|
|
1341
|
-
*
|
|
1342
|
-
* This source code is licensed under the MIT license found in the
|
|
1343
|
-
* LICENSE file in the root directory of this source tree.
|
|
1344
|
-
*/
|
|
1345
|
-
|
|
1346
|
-
var ReactPropTypesSecret$3 = 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED';
|
|
1347
|
-
|
|
1348
|
-
var ReactPropTypesSecret_1 = ReactPropTypesSecret$3;
|
|
1349
|
-
|
|
1350
|
-
var has$2 = Function.call.bind(Object.prototype.hasOwnProperty);
|
|
1351
|
-
|
|
1352
|
-
/**
|
|
1353
|
-
* Copyright (c) 2013-present, Facebook, Inc.
|
|
1354
|
-
*
|
|
1355
|
-
* This source code is licensed under the MIT license found in the
|
|
1356
|
-
* LICENSE file in the root directory of this source tree.
|
|
1357
|
-
*/
|
|
1358
|
-
|
|
1359
|
-
var printWarning$2 = function() {};
|
|
1360
|
-
|
|
1361
|
-
if (process.env.NODE_ENV !== 'production') {
|
|
1362
|
-
var ReactPropTypesSecret$2 = ReactPropTypesSecret_1;
|
|
1363
|
-
var loggedTypeFailures = {};
|
|
1364
|
-
var has$1 = has$2;
|
|
1365
|
-
|
|
1366
|
-
printWarning$2 = function(text) {
|
|
1367
|
-
var message = 'Warning: ' + text;
|
|
1368
|
-
if (typeof console !== 'undefined') {
|
|
1369
|
-
console.error(message);
|
|
1370
|
-
}
|
|
1371
|
-
try {
|
|
1372
|
-
// --- Welcome to debugging React ---
|
|
1373
|
-
// This error was thrown as a convenience so that you can use this stack
|
|
1374
|
-
// to find the callsite that caused this warning to fire.
|
|
1375
|
-
throw new Error(message);
|
|
1376
|
-
} catch (x) { /**/ }
|
|
1377
|
-
};
|
|
1378
|
-
}
|
|
1379
|
-
|
|
1380
|
-
/**
|
|
1381
|
-
* Assert that the values match with the type specs.
|
|
1382
|
-
* Error messages are memorized and will only be shown once.
|
|
1383
|
-
*
|
|
1384
|
-
* @param {object} typeSpecs Map of name to a ReactPropType
|
|
1385
|
-
* @param {object} values Runtime values that need to be type-checked
|
|
1386
|
-
* @param {string} location e.g. "prop", "context", "child context"
|
|
1387
|
-
* @param {string} componentName Name of the component for error messages.
|
|
1388
|
-
* @param {?Function} getStack Returns the component stack.
|
|
1389
|
-
* @private
|
|
1390
|
-
*/
|
|
1391
|
-
function checkPropTypes$1(typeSpecs, values, location, componentName, getStack) {
|
|
1392
|
-
if (process.env.NODE_ENV !== 'production') {
|
|
1393
|
-
for (var typeSpecName in typeSpecs) {
|
|
1394
|
-
if (has$1(typeSpecs, typeSpecName)) {
|
|
1395
|
-
var error;
|
|
1396
|
-
// Prop type validation may throw. In case they do, we don't want to
|
|
1397
|
-
// fail the render phase where it didn't fail before. So we log it.
|
|
1398
|
-
// After these have been cleaned up, we'll let them throw.
|
|
1399
|
-
try {
|
|
1400
|
-
// This is intentionally an invariant that gets caught. It's the same
|
|
1401
|
-
// behavior as without this statement except with a better message.
|
|
1402
|
-
if (typeof typeSpecs[typeSpecName] !== 'function') {
|
|
1403
|
-
var err = Error(
|
|
1404
|
-
(componentName || 'React class') + ': ' + location + ' type `' + typeSpecName + '` is invalid; ' +
|
|
1405
|
-
'it must be a function, usually from the `prop-types` package, but received `' + typeof typeSpecs[typeSpecName] + '`.' +
|
|
1406
|
-
'This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.'
|
|
1407
|
-
);
|
|
1408
|
-
err.name = 'Invariant Violation';
|
|
1409
|
-
throw err;
|
|
1410
|
-
}
|
|
1411
|
-
error = typeSpecs[typeSpecName](values, typeSpecName, componentName, location, null, ReactPropTypesSecret$2);
|
|
1412
|
-
} catch (ex) {
|
|
1413
|
-
error = ex;
|
|
1414
|
-
}
|
|
1415
|
-
if (error && !(error instanceof Error)) {
|
|
1416
|
-
printWarning$2(
|
|
1417
|
-
(componentName || 'React class') + ': type specification of ' +
|
|
1418
|
-
location + ' `' + typeSpecName + '` is invalid; the type checker ' +
|
|
1419
|
-
'function must return `null` or an `Error` but returned a ' + typeof error + '. ' +
|
|
1420
|
-
'You may have forgotten to pass an argument to the type checker ' +
|
|
1421
|
-
'creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and ' +
|
|
1422
|
-
'shape all require an argument).'
|
|
1423
|
-
);
|
|
1424
|
-
}
|
|
1425
|
-
if (error instanceof Error && !(error.message in loggedTypeFailures)) {
|
|
1426
|
-
// Only monitor this failure once because there tends to be a lot of the
|
|
1427
|
-
// same error.
|
|
1428
|
-
loggedTypeFailures[error.message] = true;
|
|
1429
|
-
|
|
1430
|
-
var stack = getStack ? getStack() : '';
|
|
1431
|
-
|
|
1432
|
-
printWarning$2(
|
|
1433
|
-
'Failed ' + location + ' type: ' + error.message + (stack != null ? stack : '')
|
|
1434
|
-
);
|
|
1435
|
-
}
|
|
1436
|
-
}
|
|
1437
|
-
}
|
|
1438
|
-
}
|
|
1439
|
-
}
|
|
1440
|
-
|
|
1441
|
-
/**
|
|
1442
|
-
* Resets warning cache when testing.
|
|
1443
|
-
*
|
|
1444
|
-
* @private
|
|
1445
|
-
*/
|
|
1446
|
-
checkPropTypes$1.resetWarningCache = function() {
|
|
1447
|
-
if (process.env.NODE_ENV !== 'production') {
|
|
1448
|
-
loggedTypeFailures = {};
|
|
1449
|
-
}
|
|
1450
|
-
};
|
|
1451
|
-
|
|
1452
|
-
var checkPropTypes_1 = checkPropTypes$1;
|
|
1453
|
-
|
|
1454
3401
|
var tracing = {exports: {}};
|
|
1455
3402
|
|
|
1456
3403
|
var schedulerTracing_production_min = {};
|
|
@@ -1837,7 +3784,7 @@ if (process.env.NODE_ENV === 'production') {
|
|
|
1837
3784
|
if (process.env.NODE_ENV !== "production") {
|
|
1838
3785
|
(function() {
|
|
1839
3786
|
|
|
1840
|
-
var React =
|
|
3787
|
+
var React = react.exports;
|
|
1841
3788
|
var _assign = objectAssign;
|
|
1842
3789
|
var Scheduler = scheduler.exports;
|
|
1843
3790
|
var checkPropTypes = checkPropTypes_1;
|
|
@@ -33847,7 +35794,7 @@ var _getPrototypeOf2$a = _interopRequireDefault$X(getPrototypeOf$1.exports);
|
|
|
33847
35794
|
|
|
33848
35795
|
var _inherits2$j = _interopRequireDefault$X(inherits.exports);
|
|
33849
35796
|
|
|
33850
|
-
var _react$L = _interopRequireDefault$X(
|
|
35797
|
+
var _react$L = _interopRequireDefault$X(react.exports);
|
|
33851
35798
|
|
|
33852
35799
|
var _propTypes$C = _interopRequireDefault$X(propTypes.exports);
|
|
33853
35800
|
|
|
@@ -34351,7 +36298,7 @@ var _inherits2$i = _interopRequireDefault$U(inherits.exports);
|
|
|
34351
36298
|
|
|
34352
36299
|
var _objectWithoutProperties2$w = _interopRequireDefault$U(objectWithoutProperties.exports);
|
|
34353
36300
|
|
|
34354
|
-
var _react$K = _interopRequireDefault$U(
|
|
36301
|
+
var _react$K = _interopRequireDefault$U(react.exports);
|
|
34355
36302
|
|
|
34356
36303
|
var _propTypes$B = _interopRequireDefault$U(propTypes.exports);
|
|
34357
36304
|
|
|
@@ -34742,7 +36689,7 @@ var _getPrototypeOf2$8 = _interopRequireDefault$T(getPrototypeOf$1.exports);
|
|
|
34742
36689
|
|
|
34743
36690
|
var _inherits2$h = _interopRequireDefault$T(inherits.exports);
|
|
34744
36691
|
|
|
34745
|
-
var _react$J = _interopRequireDefault$T(
|
|
36692
|
+
var _react$J = _interopRequireDefault$T(react.exports);
|
|
34746
36693
|
|
|
34747
36694
|
var _propTypes$A = _interopRequireDefault$T(propTypes.exports);
|
|
34748
36695
|
|
|
@@ -35804,7 +37751,7 @@ var _defineProperty2$i = _interopRequireDefault$R(defineProperty$4.exports);
|
|
|
35804
37751
|
|
|
35805
37752
|
var _objectWithoutProperties2$u = _interopRequireDefault$R(objectWithoutProperties.exports);
|
|
35806
37753
|
|
|
35807
|
-
var _react$I = _interopRequireDefault$R(
|
|
37754
|
+
var _react$I = _interopRequireDefault$R(react.exports);
|
|
35808
37755
|
|
|
35809
37756
|
var _propTypes$z = _interopRequireDefault$R(propTypes.exports);
|
|
35810
37757
|
|
|
@@ -36184,7 +38131,7 @@ var _objectWithoutProperties2$t = _interopRequireDefault$Q(objectWithoutProperti
|
|
|
36184
38131
|
|
|
36185
38132
|
var _extends2$t = _interopRequireDefault$Q(_extends$2.exports);
|
|
36186
38133
|
|
|
36187
|
-
var _react$H = _interopRequireDefault$Q(
|
|
38134
|
+
var _react$H = _interopRequireDefault$Q(react.exports);
|
|
36188
38135
|
|
|
36189
38136
|
var _propTypes$y = _interopRequireDefault$Q(propTypes.exports);
|
|
36190
38137
|
|
|
@@ -36503,7 +38450,7 @@ Transition$1.default = Transition$1.EXITING = Transition$1.ENTERED = Transition$
|
|
|
36503
38450
|
|
|
36504
38451
|
var PropTypes$1 = _interopRequireWildcard(propTypes.exports);
|
|
36505
38452
|
|
|
36506
|
-
var _react$G = _interopRequireDefault$O(
|
|
38453
|
+
var _react$G = _interopRequireDefault$O(react.exports);
|
|
36507
38454
|
|
|
36508
38455
|
var _reactDom$8 = _interopRequireDefault$O(reactDom.exports);
|
|
36509
38456
|
|
|
@@ -37151,7 +39098,7 @@ var _getPrototypeOf3$8 = _interopRequireDefault$N(getPrototypeOf$1.exports);
|
|
|
37151
39098
|
|
|
37152
39099
|
var _inherits2$g = _interopRequireDefault$N(inherits.exports);
|
|
37153
39100
|
|
|
37154
|
-
var _react$F = _interopRequireDefault$N(
|
|
39101
|
+
var _react$F = _interopRequireDefault$N(react.exports);
|
|
37155
39102
|
|
|
37156
39103
|
var _propTypes$w = _interopRequireDefault$N(propTypes.exports);
|
|
37157
39104
|
|
|
@@ -37334,7 +39281,7 @@ var _defineProperty2$g = _interopRequireDefault$M(defineProperty$4.exports);
|
|
|
37334
39281
|
|
|
37335
39282
|
var _objectWithoutProperties2$r = _interopRequireDefault$M(objectWithoutProperties.exports);
|
|
37336
39283
|
|
|
37337
|
-
var _react$E = _interopRequireDefault$M(
|
|
39284
|
+
var _react$E = _interopRequireDefault$M(react.exports);
|
|
37338
39285
|
|
|
37339
39286
|
var _propTypes$v = _interopRequireDefault$M(propTypes.exports);
|
|
37340
39287
|
|
|
@@ -37501,7 +39448,7 @@ var _getPrototypeOf3$7 = _interopRequireDefault$K(getPrototypeOf$1.exports);
|
|
|
37501
39448
|
|
|
37502
39449
|
var _inherits2$f = _interopRequireDefault$K(inherits.exports);
|
|
37503
39450
|
|
|
37504
|
-
var _react$D = _interopRequireDefault$K(
|
|
39451
|
+
var _react$D = _interopRequireDefault$K(react.exports);
|
|
37505
39452
|
|
|
37506
39453
|
var _propTypes$u = _interopRequireDefault$K(propTypes.exports);
|
|
37507
39454
|
|
|
@@ -37805,7 +39752,7 @@ ChildMapping.mergeChildMappings = mergeChildMappings;
|
|
|
37805
39752
|
ChildMapping.getInitialChildMapping = getInitialChildMapping;
|
|
37806
39753
|
ChildMapping.getNextChildMapping = getNextChildMapping;
|
|
37807
39754
|
|
|
37808
|
-
var _react$C =
|
|
39755
|
+
var _react$C = react.exports;
|
|
37809
39756
|
|
|
37810
39757
|
/**
|
|
37811
39758
|
* Given `this.props.children`, return an object mapping key to child.
|
|
@@ -37955,7 +39902,7 @@ exports.default = void 0;
|
|
|
37955
39902
|
|
|
37956
39903
|
var _propTypes = _interopRequireDefault(propTypes.exports);
|
|
37957
39904
|
|
|
37958
|
-
var _react = _interopRequireDefault(
|
|
39905
|
+
var _react = _interopRequireDefault(react.exports);
|
|
37959
39906
|
|
|
37960
39907
|
var _reactLifecyclesCompat = require$$2;
|
|
37961
39908
|
|
|
@@ -38183,7 +40130,7 @@ var _getPrototypeOf3$6 = _interopRequireDefault$I(getPrototypeOf$1.exports);
|
|
|
38183
40130
|
|
|
38184
40131
|
var _inherits2$e = _interopRequireDefault$I(inherits.exports);
|
|
38185
40132
|
|
|
38186
|
-
var _react$B = _interopRequireDefault$I(
|
|
40133
|
+
var _react$B = _interopRequireDefault$I(react.exports);
|
|
38187
40134
|
|
|
38188
40135
|
var _propTypes$t = _interopRequireDefault$I(propTypes.exports);
|
|
38189
40136
|
|
|
@@ -38332,7 +40279,7 @@ var _inherits2$d = _interopRequireDefault$H(inherits.exports);
|
|
|
38332
40279
|
|
|
38333
40280
|
var _assertThisInitialized2$2 = _interopRequireDefault$H(assertThisInitialized.exports);
|
|
38334
40281
|
|
|
38335
|
-
var _react$A = _interopRequireDefault$H(
|
|
40282
|
+
var _react$A = _interopRequireDefault$H(react.exports);
|
|
38336
40283
|
|
|
38337
40284
|
var _propTypes$s = _interopRequireDefault$H(propTypes.exports);
|
|
38338
40285
|
|
|
@@ -38748,7 +40695,7 @@ var _inherits2$c = _interopRequireDefault$G(inherits.exports);
|
|
|
38748
40695
|
|
|
38749
40696
|
var _assertThisInitialized2$1 = _interopRequireDefault$G(assertThisInitialized.exports);
|
|
38750
40697
|
|
|
38751
|
-
var _react$z = _interopRequireDefault$G(
|
|
40698
|
+
var _react$z = _interopRequireDefault$G(react.exports);
|
|
38752
40699
|
|
|
38753
40700
|
var _propTypes$r = _interopRequireDefault$G(propTypes.exports);
|
|
38754
40701
|
|
|
@@ -39295,7 +41242,7 @@ reactHelpers.cloneChildrenWithClassName = cloneChildrenWithClassName;
|
|
|
39295
41242
|
reactHelpers.isMuiElement = isMuiElement;
|
|
39296
41243
|
reactHelpers.setRef = setRef;
|
|
39297
41244
|
|
|
39298
|
-
var _react$y = _interopRequireDefault$F(
|
|
41245
|
+
var _react$y = _interopRequireDefault$F(react.exports);
|
|
39299
41246
|
|
|
39300
41247
|
var _classnames$h = _interopRequireDefault$F(classnames.exports);
|
|
39301
41248
|
|
|
@@ -39336,7 +41283,7 @@ Object.defineProperty(FormControlContext$1, "__esModule", {
|
|
|
39336
41283
|
});
|
|
39337
41284
|
FormControlContext$1.default = void 0;
|
|
39338
41285
|
|
|
39339
|
-
var _react$x = _interopRequireDefault$E(
|
|
41286
|
+
var _react$x = _interopRequireDefault$E(react.exports);
|
|
39340
41287
|
|
|
39341
41288
|
/**
|
|
39342
41289
|
* @ignore - internal component.
|
|
@@ -39355,7 +41302,7 @@ withFormControlContext$1.default = withFormControlContext;
|
|
|
39355
41302
|
|
|
39356
41303
|
var _extends2$n = _interopRequireDefault$D(_extends$2.exports);
|
|
39357
41304
|
|
|
39358
|
-
var _react$w = _interopRequireDefault$D(
|
|
41305
|
+
var _react$w = _interopRequireDefault$D(react.exports);
|
|
39359
41306
|
|
|
39360
41307
|
var _hoistNonReactStatics = _interopRequireDefault$D(hoistNonReactStatics_cjs);
|
|
39361
41308
|
|
|
@@ -39397,7 +41344,7 @@ var _defineProperty2$d = _interopRequireDefault$C(defineProperty$4.exports);
|
|
|
39397
41344
|
|
|
39398
41345
|
var _objectWithoutProperties2$n = _interopRequireDefault$C(objectWithoutProperties.exports);
|
|
39399
41346
|
|
|
39400
|
-
var _react$v = _interopRequireDefault$C(
|
|
41347
|
+
var _react$v = _interopRequireDefault$C(react.exports);
|
|
39401
41348
|
|
|
39402
41349
|
var _propTypes$q = _interopRequireDefault$C(propTypes.exports);
|
|
39403
41350
|
|
|
@@ -39607,7 +41554,7 @@ var _getPrototypeOf2$7 = _interopRequireDefault$B(getPrototypeOf$1.exports);
|
|
|
39607
41554
|
|
|
39608
41555
|
var _inherits2$b = _interopRequireDefault$B(inherits.exports);
|
|
39609
41556
|
|
|
39610
|
-
var _react$u = _interopRequireDefault$B(
|
|
41557
|
+
var _react$u = _interopRequireDefault$B(react.exports);
|
|
39611
41558
|
|
|
39612
41559
|
var _propTypes$p = _interopRequireDefault$B(propTypes.exports);
|
|
39613
41560
|
|
|
@@ -39998,7 +41945,7 @@ shouldUpdate$1.default = void 0;
|
|
|
39998
41945
|
|
|
39999
41946
|
var _inheritsLoose2 = _interopRequireDefault$y(inheritsLoose.exports);
|
|
40000
41947
|
|
|
40001
|
-
var _react$t =
|
|
41948
|
+
var _react$t = react.exports;
|
|
40002
41949
|
|
|
40003
41950
|
var _setDisplayName$1 = _interopRequireDefault$y(setDisplayName$1);
|
|
40004
41951
|
|
|
@@ -40160,7 +42107,7 @@ var _defineProperty2$b = _interopRequireDefault$v(defineProperty$4.exports);
|
|
|
40160
42107
|
|
|
40161
42108
|
var _objectWithoutProperties2$l = _interopRequireDefault$v(objectWithoutProperties.exports);
|
|
40162
42109
|
|
|
40163
|
-
var _react$s = _interopRequireDefault$v(
|
|
42110
|
+
var _react$s = _interopRequireDefault$v(react.exports);
|
|
40164
42111
|
|
|
40165
42112
|
var _propTypes$o = _interopRequireDefault$v(propTypes.exports);
|
|
40166
42113
|
|
|
@@ -40361,7 +42308,7 @@ var _inherits = _interopDefault(inherits.exports);
|
|
|
40361
42308
|
var _typeof = _interopDefault(_typeof$2.exports);
|
|
40362
42309
|
var _objectWithoutProperties = _interopDefault(objectWithoutProperties.exports);
|
|
40363
42310
|
var _extends = _interopDefault(_extends$2.exports);
|
|
40364
|
-
var React = _interopDefault(
|
|
42311
|
+
var React = _interopDefault(react.exports);
|
|
40365
42312
|
var PropTypes = _interopDefault(propTypes.exports);
|
|
40366
42313
|
var warning = _interopDefault(warning_1);
|
|
40367
42314
|
|
|
@@ -40555,7 +42502,7 @@ var _getPrototypeOf2$6 = _interopRequireDefault$u(getPrototypeOf$1.exports);
|
|
|
40555
42502
|
|
|
40556
42503
|
var _inherits2$a = _interopRequireDefault$u(inherits.exports);
|
|
40557
42504
|
|
|
40558
|
-
var _react$r = _interopRequireDefault$u(
|
|
42505
|
+
var _react$r = _interopRequireDefault$u(react.exports);
|
|
40559
42506
|
|
|
40560
42507
|
var _reactDom$5 = _interopRequireDefault$u(reactDom.exports);
|
|
40561
42508
|
|
|
@@ -40698,7 +42645,7 @@ var _getPrototypeOf3$3 = _interopRequireDefault$t(getPrototypeOf$1.exports);
|
|
|
40698
42645
|
|
|
40699
42646
|
var _inherits2$9 = _interopRequireDefault$t(inherits.exports);
|
|
40700
42647
|
|
|
40701
|
-
var _react$q = _interopRequireDefault$t(
|
|
42648
|
+
var _react$q = _interopRequireDefault$t(react.exports);
|
|
40702
42649
|
|
|
40703
42650
|
var _reactDom$4 = _interopRequireDefault$t(reactDom.exports);
|
|
40704
42651
|
|
|
@@ -41554,7 +43501,7 @@ var _inherits2$8 = _interopRequireDefault$p(inherits.exports);
|
|
|
41554
43501
|
|
|
41555
43502
|
var _assertThisInitialized2 = _interopRequireDefault$p(assertThisInitialized.exports);
|
|
41556
43503
|
|
|
41557
|
-
var _react$p = _interopRequireDefault$p(
|
|
43504
|
+
var _react$p = _interopRequireDefault$p(react.exports);
|
|
41558
43505
|
|
|
41559
43506
|
var _reactDom$3 = _interopRequireDefault$p(reactDom.exports);
|
|
41560
43507
|
|
|
@@ -42227,7 +44174,7 @@ var _getPrototypeOf2$4 = _interopRequireDefault$o(getPrototypeOf$1.exports);
|
|
|
42227
44174
|
|
|
42228
44175
|
var _inherits2$7 = _interopRequireDefault$o(inherits.exports);
|
|
42229
44176
|
|
|
42230
|
-
var _react$o = _interopRequireDefault$o(
|
|
44177
|
+
var _react$o = _interopRequireDefault$o(react.exports);
|
|
42231
44178
|
|
|
42232
44179
|
var _propTypes$k = _interopRequireDefault$o(propTypes.exports);
|
|
42233
44180
|
|
|
@@ -42569,7 +44516,7 @@ var _createClass2$6 = _interopRequireDefault$n(createClass.exports);
|
|
|
42569
44516
|
|
|
42570
44517
|
var _inherits2$6 = _interopRequireDefault$n(inherits.exports);
|
|
42571
44518
|
|
|
42572
|
-
var _react$n = _interopRequireDefault$n(
|
|
44519
|
+
var _react$n = _interopRequireDefault$n(react.exports);
|
|
42573
44520
|
|
|
42574
44521
|
var _propTypes$j = _interopRequireDefault$n(propTypes.exports);
|
|
42575
44522
|
|
|
@@ -43270,7 +45217,7 @@ var _defineProperty2$8 = _interopRequireDefault$m(defineProperty$4.exports);
|
|
|
43270
45217
|
|
|
43271
45218
|
var _objectWithoutProperties2$h = _interopRequireDefault$m(objectWithoutProperties.exports);
|
|
43272
45219
|
|
|
43273
|
-
var _react$m = _interopRequireDefault$m(
|
|
45220
|
+
var _react$m = _interopRequireDefault$m(react.exports);
|
|
43274
45221
|
|
|
43275
45222
|
var _propTypes$i = _interopRequireDefault$m(propTypes.exports);
|
|
43276
45223
|
|
|
@@ -43496,7 +45443,7 @@ var _defineProperty2$7 = _interopRequireDefault$l(defineProperty$4.exports);
|
|
|
43496
45443
|
|
|
43497
45444
|
var _objectWithoutProperties2$g = _interopRequireDefault$l(objectWithoutProperties.exports);
|
|
43498
45445
|
|
|
43499
|
-
var _react$l = _interopRequireDefault$l(
|
|
45446
|
+
var _react$l = _interopRequireDefault$l(react.exports);
|
|
43500
45447
|
|
|
43501
45448
|
var _propTypes$h = _interopRequireDefault$l(propTypes.exports);
|
|
43502
45449
|
|
|
@@ -43610,7 +45557,7 @@ var _getPrototypeOf3$2 = _interopRequireDefault$k(getPrototypeOf$1.exports);
|
|
|
43610
45557
|
|
|
43611
45558
|
var _inherits2$5 = _interopRequireDefault$k(inherits.exports);
|
|
43612
45559
|
|
|
43613
|
-
var _react$k = _interopRequireDefault$k(
|
|
45560
|
+
var _react$k = _interopRequireDefault$k(react.exports);
|
|
43614
45561
|
|
|
43615
45562
|
var _propTypes$g = _interopRequireDefault$k(propTypes.exports);
|
|
43616
45563
|
|
|
@@ -43858,7 +45805,7 @@ var _extends2$d = _interopRequireDefault$j(_extends$2.exports);
|
|
|
43858
45805
|
|
|
43859
45806
|
var _objectWithoutProperties2$e = _interopRequireDefault$j(objectWithoutProperties.exports);
|
|
43860
45807
|
|
|
43861
|
-
var _react$j = _interopRequireDefault$j(
|
|
45808
|
+
var _react$j = _interopRequireDefault$j(react.exports);
|
|
43862
45809
|
|
|
43863
45810
|
var _propTypes$f = _interopRequireDefault$j(propTypes.exports);
|
|
43864
45811
|
|
|
@@ -44171,7 +46118,7 @@ Object.defineProperty(ListContext$1, "__esModule", {
|
|
|
44171
46118
|
});
|
|
44172
46119
|
ListContext$1.default = void 0;
|
|
44173
46120
|
|
|
44174
|
-
var _react$i = _interopRequireDefault$i(
|
|
46121
|
+
var _react$i = _interopRequireDefault$i(react.exports);
|
|
44175
46122
|
|
|
44176
46123
|
/**
|
|
44177
46124
|
* @ignore - internal component.
|
|
@@ -44194,7 +46141,7 @@ var _defineProperty2$5 = _interopRequireDefault$h(defineProperty$4.exports);
|
|
|
44194
46141
|
|
|
44195
46142
|
var _objectWithoutProperties2$d = _interopRequireDefault$h(objectWithoutProperties.exports);
|
|
44196
46143
|
|
|
44197
|
-
var _react$h = _interopRequireDefault$h(
|
|
46144
|
+
var _react$h = _interopRequireDefault$h(react.exports);
|
|
44198
46145
|
|
|
44199
46146
|
var _propTypes$e = _interopRequireDefault$h(propTypes.exports);
|
|
44200
46147
|
|
|
@@ -44336,7 +46283,7 @@ Object.defineProperty(MergeListContext$1, "__esModule", {
|
|
|
44336
46283
|
});
|
|
44337
46284
|
MergeListContext$1.default = void 0;
|
|
44338
46285
|
|
|
44339
|
-
var _react$g = _interopRequireDefault$g(
|
|
46286
|
+
var _react$g = _interopRequireDefault$g(react.exports);
|
|
44340
46287
|
|
|
44341
46288
|
var _propTypes$d = _interopRequireDefault$g(propTypes.exports);
|
|
44342
46289
|
|
|
@@ -44383,7 +46330,7 @@ var _defineProperty2$4 = _interopRequireDefault$f(defineProperty$4.exports);
|
|
|
44383
46330
|
|
|
44384
46331
|
var _objectWithoutProperties2$c = _interopRequireDefault$f(objectWithoutProperties.exports);
|
|
44385
46332
|
|
|
44386
|
-
var _react$f = _interopRequireDefault$f(
|
|
46333
|
+
var _react$f = _interopRequireDefault$f(react.exports);
|
|
44387
46334
|
|
|
44388
46335
|
var _propTypes$c = _interopRequireDefault$f(propTypes.exports);
|
|
44389
46336
|
|
|
@@ -44720,7 +46667,7 @@ var _getPrototypeOf2$2 = _interopRequireDefault$e(getPrototypeOf$1.exports);
|
|
|
44720
46667
|
|
|
44721
46668
|
var _inherits2$4 = _interopRequireDefault$e(inherits.exports);
|
|
44722
46669
|
|
|
44723
|
-
var _react$e = _interopRequireDefault$e(
|
|
46670
|
+
var _react$e = _interopRequireDefault$e(react.exports);
|
|
44724
46671
|
|
|
44725
46672
|
var _propTypes$b = _interopRequireDefault$e(propTypes.exports);
|
|
44726
46673
|
|
|
@@ -45328,7 +47275,7 @@ var _getPrototypeOf3$1 = _interopRequireDefault$d(getPrototypeOf$1.exports);
|
|
|
45328
47275
|
|
|
45329
47276
|
var _inherits2$3 = _interopRequireDefault$d(inherits.exports);
|
|
45330
47277
|
|
|
45331
|
-
var _react$d = _interopRequireDefault$d(
|
|
47278
|
+
var _react$d = _interopRequireDefault$d(react.exports);
|
|
45332
47279
|
|
|
45333
47280
|
var _propTypes$a = _interopRequireDefault$d(propTypes.exports);
|
|
45334
47281
|
|
|
@@ -45601,7 +47548,7 @@ var _getPrototypeOf3 = _interopRequireDefault$c(getPrototypeOf$1.exports);
|
|
|
45601
47548
|
|
|
45602
47549
|
var _inherits2$2 = _interopRequireDefault$c(inherits.exports);
|
|
45603
47550
|
|
|
45604
|
-
var _react$c = _interopRequireDefault$c(
|
|
47551
|
+
var _react$c = _interopRequireDefault$c(react.exports);
|
|
45605
47552
|
|
|
45606
47553
|
var _propTypes$9 = _interopRequireDefault$c(propTypes.exports);
|
|
45607
47554
|
|
|
@@ -45883,7 +47830,7 @@ var _objectWithoutProperties2$8 = _interopRequireDefault$b(objectWithoutProperti
|
|
|
45883
47830
|
|
|
45884
47831
|
var _extends2$7 = _interopRequireDefault$b(_extends$2.exports);
|
|
45885
47832
|
|
|
45886
|
-
var _react$b = _interopRequireDefault$b(
|
|
47833
|
+
var _react$b = _interopRequireDefault$b(react.exports);
|
|
45887
47834
|
|
|
45888
47835
|
var _propTypes$8 = _interopRequireDefault$b(propTypes.exports);
|
|
45889
47836
|
|
|
@@ -46028,7 +47975,7 @@ var _defineProperty2$2 = _interopRequireDefault$a(defineProperty$4.exports);
|
|
|
46028
47975
|
|
|
46029
47976
|
var _objectWithoutProperties2$7 = _interopRequireDefault$a(objectWithoutProperties.exports);
|
|
46030
47977
|
|
|
46031
|
-
var _react$a = _interopRequireDefault$a(
|
|
47978
|
+
var _react$a = _interopRequireDefault$a(react.exports);
|
|
46032
47979
|
|
|
46033
47980
|
var _propTypes$7 = _interopRequireDefault$a(propTypes.exports);
|
|
46034
47981
|
|
|
@@ -46135,7 +48082,7 @@ Object.defineProperty(ArrowDropDown$1, "__esModule", {
|
|
|
46135
48082
|
});
|
|
46136
48083
|
ArrowDropDown$1.default = void 0;
|
|
46137
48084
|
|
|
46138
|
-
var _react$9 = _interopRequireDefault$9(
|
|
48085
|
+
var _react$9 = _interopRequireDefault$9(react.exports);
|
|
46139
48086
|
|
|
46140
48087
|
var _pure$2 = _interopRequireDefault$9(pure$1);
|
|
46141
48088
|
|
|
@@ -46168,7 +48115,7 @@ var _extends2$5 = _interopRequireDefault$8(_extends$2.exports);
|
|
|
46168
48115
|
|
|
46169
48116
|
var _objectWithoutProperties2$6 = _interopRequireDefault$8(objectWithoutProperties.exports);
|
|
46170
48117
|
|
|
46171
|
-
var _react$8 = _interopRequireDefault$8(
|
|
48118
|
+
var _react$8 = _interopRequireDefault$8(react.exports);
|
|
46172
48119
|
|
|
46173
48120
|
var _propTypes$6 = _interopRequireDefault$8(propTypes.exports);
|
|
46174
48121
|
|
|
@@ -46392,7 +48339,7 @@ var _extends3 = _interopRequireDefault$7(_extends$2.exports);
|
|
|
46392
48339
|
|
|
46393
48340
|
var _objectWithoutProperties2$5 = _interopRequireDefault$7(objectWithoutProperties.exports);
|
|
46394
48341
|
|
|
46395
|
-
var _react$7 = _interopRequireDefault$7(
|
|
48342
|
+
var _react$7 = _interopRequireDefault$7(react.exports);
|
|
46396
48343
|
|
|
46397
48344
|
var _propTypes$5 = _interopRequireDefault$7(propTypes.exports);
|
|
46398
48345
|
|
|
@@ -46530,7 +48477,7 @@ var _extends2$4 = _interopRequireDefault$6(_extends$2.exports);
|
|
|
46530
48477
|
|
|
46531
48478
|
var _objectWithoutProperties2$4 = _interopRequireDefault$6(objectWithoutProperties.exports);
|
|
46532
48479
|
|
|
46533
|
-
var _react$6 = _interopRequireDefault$6(
|
|
48480
|
+
var _react$6 = _interopRequireDefault$6(react.exports);
|
|
46534
48481
|
|
|
46535
48482
|
var _propTypes$4 = _interopRequireDefault$6(propTypes.exports);
|
|
46536
48483
|
|
|
@@ -46845,7 +48792,7 @@ Object.defineProperty(RadioButtonUnchecked$1, "__esModule", {
|
|
|
46845
48792
|
});
|
|
46846
48793
|
RadioButtonUnchecked$1.default = void 0;
|
|
46847
48794
|
|
|
46848
|
-
var _react$5 = _interopRequireDefault$5(
|
|
48795
|
+
var _react$5 = _interopRequireDefault$5(react.exports);
|
|
46849
48796
|
|
|
46850
48797
|
var _pure$1 = _interopRequireDefault$5(pure$1);
|
|
46851
48798
|
|
|
@@ -46876,7 +48823,7 @@ Object.defineProperty(RadioButtonChecked$1, "__esModule", {
|
|
|
46876
48823
|
});
|
|
46877
48824
|
RadioButtonChecked$1.default = void 0;
|
|
46878
48825
|
|
|
46879
|
-
var _react$4 = _interopRequireDefault$4(
|
|
48826
|
+
var _react$4 = _interopRequireDefault$4(react.exports);
|
|
46880
48827
|
|
|
46881
48828
|
var _pure = _interopRequireDefault$4(pure$1);
|
|
46882
48829
|
|
|
@@ -46909,7 +48856,7 @@ var _extends2$3 = _interopRequireDefault$3(_extends$2.exports);
|
|
|
46909
48856
|
|
|
46910
48857
|
var _objectWithoutProperties2$3 = _interopRequireDefault$3(objectWithoutProperties.exports);
|
|
46911
48858
|
|
|
46912
|
-
var _react$3 = _interopRequireDefault$3(
|
|
48859
|
+
var _react$3 = _interopRequireDefault$3(react.exports);
|
|
46913
48860
|
|
|
46914
48861
|
var _propTypes$3 = _interopRequireDefault$3(propTypes.exports);
|
|
46915
48862
|
|
|
@@ -47107,7 +49054,7 @@ var _getPrototypeOf2$1 = _interopRequireDefault$2(getPrototypeOf$1.exports);
|
|
|
47107
49054
|
|
|
47108
49055
|
var _inherits2$1 = _interopRequireDefault$2(inherits.exports);
|
|
47109
49056
|
|
|
47110
|
-
var _react$2 = _interopRequireDefault$2(
|
|
49057
|
+
var _react$2 = _interopRequireDefault$2(react.exports);
|
|
47111
49058
|
|
|
47112
49059
|
var _propTypes$2 = _interopRequireDefault$2(propTypes.exports);
|
|
47113
49060
|
|
|
@@ -47310,7 +49257,7 @@ var _inherits2 = _interopRequireDefault$1(inherits.exports);
|
|
|
47310
49257
|
|
|
47311
49258
|
var _typeof2 = _interopRequireDefault$1(_typeof$2.exports);
|
|
47312
49259
|
|
|
47313
|
-
var _react$1 = _interopRequireDefault$1(
|
|
49260
|
+
var _react$1 = _interopRequireDefault$1(react.exports);
|
|
47314
49261
|
|
|
47315
49262
|
var _propTypes$1 = _interopRequireDefault$1(propTypes.exports);
|
|
47316
49263
|
|
|
@@ -47830,7 +49777,7 @@ var _extends2 = _interopRequireDefault(_extends$2.exports);
|
|
|
47830
49777
|
|
|
47831
49778
|
var _objectWithoutProperties2 = _interopRequireDefault(objectWithoutProperties.exports);
|
|
47832
49779
|
|
|
47833
|
-
var _react = _interopRequireDefault(
|
|
49780
|
+
var _react = _interopRequireDefault(react.exports);
|
|
47834
49781
|
|
|
47835
49782
|
var _propTypes = _interopRequireDefault(propTypes.exports);
|
|
47836
49783
|
|
|
@@ -68396,7 +70343,7 @@ const styles$2 = theme => ({
|
|
|
68396
70343
|
}
|
|
68397
70344
|
});
|
|
68398
70345
|
|
|
68399
|
-
class GraphingConfig extends
|
|
70346
|
+
class GraphingConfig extends react.exports.Component {
|
|
68400
70347
|
constructor(props) {
|
|
68401
70348
|
super(props);
|
|
68402
70349
|
|
|
@@ -68632,28 +70579,28 @@ class GraphingConfig extends require$$4.Component {
|
|
|
68632
70579
|
step: authoring.step
|
|
68633
70580
|
};
|
|
68634
70581
|
const displayGridSetup = authoring.enabled && Object.values(displayedFields).some(field => typeof field === 'object' ? field.enabled : field);
|
|
68635
|
-
return /*#__PURE__*/
|
|
70582
|
+
return /*#__PURE__*/react.exports.createElement("div", {
|
|
68636
70583
|
className: classes.container
|
|
68637
|
-
}, /*#__PURE__*/
|
|
70584
|
+
}, /*#__PURE__*/react.exports.createElement("div", {
|
|
68638
70585
|
className: classes.gridConfigWrapper
|
|
68639
|
-
}, gridConfigurations && gridConfigurations.length ? /*#__PURE__*/
|
|
70586
|
+
}, gridConfigurations && gridConfigurations.length ? /*#__PURE__*/react.exports.createElement("div", {
|
|
68640
70587
|
className: classes.gridConfig
|
|
68641
|
-
}, /*#__PURE__*/
|
|
70588
|
+
}, /*#__PURE__*/react.exports.createElement(Typography, {
|
|
68642
70589
|
component: "div",
|
|
68643
70590
|
variant: "subheading",
|
|
68644
70591
|
className: classes.gridConfigLabel
|
|
68645
|
-
}, "Grid Configuration"), /*#__PURE__*/
|
|
68646
|
-
input: /*#__PURE__*/
|
|
70592
|
+
}, "Grid Configuration"), /*#__PURE__*/react.exports.createElement(Select, {
|
|
70593
|
+
input: /*#__PURE__*/react.exports.createElement(OutlinedInput, {
|
|
68647
70594
|
labelWidth: 10
|
|
68648
70595
|
}),
|
|
68649
70596
|
className: classes.gridConfigSelect,
|
|
68650
70597
|
displayEmpty: true,
|
|
68651
70598
|
onChange: this.changeGridConfiguration,
|
|
68652
70599
|
value: defaultGridConfiguration
|
|
68653
|
-
}, (gridConfigurations || []).map((config, index) => /*#__PURE__*/
|
|
70600
|
+
}, (gridConfigurations || []).map((config, index) => /*#__PURE__*/react.exports.createElement(MenuItem, {
|
|
68654
70601
|
key: index,
|
|
68655
70602
|
value: index
|
|
68656
|
-
}, config.label)))) : null, displayGridSetup && /*#__PURE__*/
|
|
70603
|
+
}, config.label)))) : null, displayGridSetup && /*#__PURE__*/react.exports.createElement(GridSetup, {
|
|
68657
70604
|
displayedFields: displayedFields,
|
|
68658
70605
|
domain: domain,
|
|
68659
70606
|
gridValues: gridValues,
|
|
@@ -68666,17 +70613,17 @@ class GraphingConfig extends require$$4.Component {
|
|
|
68666
70613
|
standardGrid: standardGrid,
|
|
68667
70614
|
onChange: this.onConfigChange,
|
|
68668
70615
|
onChangeView: this.onChangeView
|
|
68669
|
-
})), /*#__PURE__*/
|
|
70616
|
+
})), /*#__PURE__*/react.exports.createElement("div", {
|
|
68670
70617
|
className: classes.graphConfig,
|
|
68671
70618
|
key: "graph"
|
|
68672
|
-
}, /*#__PURE__*/
|
|
70619
|
+
}, /*#__PURE__*/react.exports.createElement(Typography, {
|
|
68673
70620
|
component: "div",
|
|
68674
70621
|
variant: "subheading"
|
|
68675
|
-
}, "Define Graph Attributes"), /*#__PURE__*/
|
|
70622
|
+
}, "Define Graph Attributes"), /*#__PURE__*/react.exports.createElement(Typography, {
|
|
68676
70623
|
component: "div",
|
|
68677
70624
|
variant: "body1",
|
|
68678
70625
|
className: classes.subtitleText
|
|
68679
|
-
}, "Use this interface to add/edit a title and/or labels"), /*#__PURE__*/
|
|
70626
|
+
}, "Use this interface to add/edit a title and/or labels"), /*#__PURE__*/react.exports.createElement(GraphContainer, {
|
|
68680
70627
|
axesSettings: {
|
|
68681
70628
|
includeArrows: arrows
|
|
68682
70629
|
},
|
|
@@ -68703,7 +70650,7 @@ class GraphingConfig extends require$$4.Component {
|
|
|
68703
70650
|
titlePlaceholder: titlePlaceholder,
|
|
68704
70651
|
disableToolbar: true,
|
|
68705
70652
|
mathMlOptions: mathMlOptions
|
|
68706
|
-
})), /*#__PURE__*/
|
|
70653
|
+
})), /*#__PURE__*/react.exports.createElement(AlertDialog, {
|
|
68707
70654
|
open: dialog.isOpened,
|
|
68708
70655
|
title: "Warning",
|
|
68709
70656
|
text: "This change would make it impossible for students to plot one or more graph objects in the current correct answers. If you proceed, all such graph objects will be removed from the correct answers.",
|
|
@@ -68834,7 +70781,7 @@ const styles$1 = theme => ({
|
|
|
68834
70781
|
}
|
|
68835
70782
|
});
|
|
68836
70783
|
|
|
68837
|
-
class CorrectResponse extends
|
|
70784
|
+
class CorrectResponse extends react.exports.Component {
|
|
68838
70785
|
constructor(...args) {
|
|
68839
70786
|
super(...args);
|
|
68840
70787
|
this.state = {
|
|
@@ -69142,38 +71089,38 @@ class CorrectResponse extends require$$4.Component {
|
|
|
69142
71089
|
const {
|
|
69143
71090
|
correctAnswerErrors = ''
|
|
69144
71091
|
} = errors || {};
|
|
69145
|
-
return /*#__PURE__*/
|
|
71092
|
+
return /*#__PURE__*/react.exports.createElement("div", null, /*#__PURE__*/react.exports.createElement(Typography, {
|
|
69146
71093
|
component: "div",
|
|
69147
71094
|
variant: "subheading"
|
|
69148
|
-
}, "Define Line Type(s) and Correct Response"), /*#__PURE__*/
|
|
71095
|
+
}, "Define Line Type(s) and Correct Response"), /*#__PURE__*/react.exports.createElement(Typography, {
|
|
69149
71096
|
component: "div",
|
|
69150
71097
|
variant: "body1",
|
|
69151
71098
|
className: classes.subtitleText
|
|
69152
|
-
}, "Use this interface to choose how many lines students will be able to draw, and to define the correct answer."), /*#__PURE__*/
|
|
71099
|
+
}, "Use this interface to choose how many lines students will be able to draw, and to define the correct answer."), /*#__PURE__*/react.exports.createElement(Typography, {
|
|
69153
71100
|
component: "div",
|
|
69154
71101
|
variant: "body1",
|
|
69155
71102
|
className: classes.subtitleText
|
|
69156
|
-
}, "Choose Number of Lines"), /*#__PURE__*/
|
|
71103
|
+
}, "Choose Number of Lines"), /*#__PURE__*/react.exports.createElement(RadioGroup, {
|
|
69157
71104
|
name: "numberOfLines",
|
|
69158
71105
|
value: gssLineData.numberOfLines,
|
|
69159
71106
|
onChange: this.changeNumberOfLines
|
|
69160
|
-
}, /*#__PURE__*/
|
|
71107
|
+
}, /*#__PURE__*/react.exports.createElement(FormControlLabel, {
|
|
69161
71108
|
className: classes.radioButtonClass,
|
|
69162
71109
|
value: "1",
|
|
69163
|
-
control: /*#__PURE__*/
|
|
71110
|
+
control: /*#__PURE__*/react.exports.createElement(Radio, {
|
|
69164
71111
|
checked: gssLineData.numberOfLines === 1,
|
|
69165
71112
|
className: classes.radioButton
|
|
69166
71113
|
}),
|
|
69167
71114
|
label: "One"
|
|
69168
|
-
}), /*#__PURE__*/
|
|
71115
|
+
}), /*#__PURE__*/react.exports.createElement(FormControlLabel, {
|
|
69169
71116
|
className: classes.radioButtonClass,
|
|
69170
71117
|
value: "2",
|
|
69171
|
-
control: /*#__PURE__*/
|
|
71118
|
+
control: /*#__PURE__*/react.exports.createElement(Radio, {
|
|
69172
71119
|
checked: gssLineData.numberOfLines === 2,
|
|
69173
71120
|
className: classes.radioButton
|
|
69174
71121
|
}),
|
|
69175
71122
|
label: "Two"
|
|
69176
|
-
})), /*#__PURE__*/
|
|
71123
|
+
})), /*#__PURE__*/react.exports.createElement(react.exports.Fragment, null, /*#__PURE__*/react.exports.createElement(GraphContainer, {
|
|
69177
71124
|
className: correctAnswerErrors['correctAnswer'] && classes.graphError,
|
|
69178
71125
|
axesSettings: {
|
|
69179
71126
|
includeArrows: arrows
|
|
@@ -69201,9 +71148,9 @@ class CorrectResponse extends require$$4.Component {
|
|
|
69201
71148
|
onSolutionSetSelected: this.onSolutionSetSelected,
|
|
69202
71149
|
toolbarTools: ['line', 'polygon'],
|
|
69203
71150
|
mathMlOptions: mathMlOptions
|
|
69204
|
-
}), correctAnswerErrors['correctAnswer'] && /*#__PURE__*/
|
|
71151
|
+
}), correctAnswerErrors['correctAnswer'] && /*#__PURE__*/react.exports.createElement("div", {
|
|
69205
71152
|
className: classes.errorMessage
|
|
69206
|
-
}, correctAnswerErrors['correctAnswer'])), /*#__PURE__*/
|
|
71153
|
+
}, correctAnswerErrors['correctAnswer'])), /*#__PURE__*/react.exports.createElement(AlertDialog, {
|
|
69207
71154
|
open: dialog.open,
|
|
69208
71155
|
title: dialog.title,
|
|
69209
71156
|
text: dialog.text,
|
|
@@ -69772,7 +71719,7 @@ const styles = theme => ({
|
|
|
69772
71719
|
}
|
|
69773
71720
|
});
|
|
69774
71721
|
|
|
69775
|
-
class Configure extends
|
|
71722
|
+
class Configure extends React$1.Component {
|
|
69776
71723
|
constructor(...args) {
|
|
69777
71724
|
super(...args);
|
|
69778
71725
|
|
|
@@ -69942,11 +71889,11 @@ class Configure extends require$$4__default.Component {
|
|
|
69942
71889
|
rubricEnabled: (withRubric == null ? void 0 : withRubric.settings) && toggle(withRubric == null ? void 0 : withRubric.label),
|
|
69943
71890
|
instruction: instruction.settings && textField(instruction.label)
|
|
69944
71891
|
};
|
|
69945
|
-
return /*#__PURE__*/
|
|
71892
|
+
return /*#__PURE__*/React$1.createElement(layout.ConfigLayout, {
|
|
69946
71893
|
extraCSSRules: extraCSSRules,
|
|
69947
71894
|
dimensions: contentDimensions,
|
|
69948
71895
|
hideSettings: settingsPanelDisabled,
|
|
69949
|
-
settings: /*#__PURE__*/
|
|
71896
|
+
settings: /*#__PURE__*/React$1.createElement(Panel, {
|
|
69950
71897
|
model: model,
|
|
69951
71898
|
configuration: configuration,
|
|
69952
71899
|
onChangeModel: onModelChanged,
|
|
@@ -69956,14 +71903,14 @@ class Configure extends require$$4__default.Component {
|
|
|
69956
71903
|
Properties: panelProperties
|
|
69957
71904
|
}
|
|
69958
71905
|
})
|
|
69959
|
-
}, /*#__PURE__*/
|
|
71906
|
+
}, /*#__PURE__*/React$1.createElement(Typography, {
|
|
69960
71907
|
component: "div",
|
|
69961
71908
|
type: "body1",
|
|
69962
71909
|
className: classes.description
|
|
69963
|
-
}, (instruction == null ? void 0 : instruction.label) || ''), teacherInstructionsEnabled && /*#__PURE__*/
|
|
71910
|
+
}, (instruction == null ? void 0 : instruction.label) || ''), teacherInstructionsEnabled && /*#__PURE__*/React$1.createElement(InputContainer, {
|
|
69964
71911
|
label: teacherInstructions.label,
|
|
69965
71912
|
className: classes.promptHolder
|
|
69966
|
-
}, /*#__PURE__*/
|
|
71913
|
+
}, /*#__PURE__*/React$1.createElement(EditableHtml, {
|
|
69967
71914
|
className: classes.prompt,
|
|
69968
71915
|
markup: model.teacherInstructions || '',
|
|
69969
71916
|
onChange: this.onTeacherInstructionsChange,
|
|
@@ -69979,10 +71926,10 @@ class Configure extends require$$4__default.Component {
|
|
|
69979
71926
|
language: 'special'
|
|
69980
71927
|
}],
|
|
69981
71928
|
mathMlOptions: mathMlOptions
|
|
69982
|
-
})), promptEnabled && /*#__PURE__*/
|
|
71929
|
+
})), promptEnabled && /*#__PURE__*/React$1.createElement(InputContainer, {
|
|
69983
71930
|
label: prompt.label,
|
|
69984
71931
|
className: classes.promptHolder
|
|
69985
|
-
}, /*#__PURE__*/
|
|
71932
|
+
}, /*#__PURE__*/React$1.createElement(EditableHtml, {
|
|
69986
71933
|
className: classes.prompt,
|
|
69987
71934
|
markup: model.prompt,
|
|
69988
71935
|
onChange: this.onPromptChange,
|
|
@@ -69999,7 +71946,7 @@ class Configure extends require$$4__default.Component {
|
|
|
69999
71946
|
language: 'special'
|
|
70000
71947
|
}],
|
|
70001
71948
|
mathMlOptions: mathMlOptions
|
|
70002
|
-
})), /*#__PURE__*/
|
|
71949
|
+
})), /*#__PURE__*/React$1.createElement(GraphingConfig$1, {
|
|
70003
71950
|
authoring: authoring,
|
|
70004
71951
|
gridConfigurations: gridConfigurations,
|
|
70005
71952
|
graphDimensions: graphDimensions,
|
|
@@ -70011,15 +71958,15 @@ class Configure extends require$$4__default.Component {
|
|
|
70011
71958
|
titlePlaceholder: title.placeholder,
|
|
70012
71959
|
onChange: this.props.onModelChanged,
|
|
70013
71960
|
mathMlOptions: mathMlOptions
|
|
70014
|
-
}), /*#__PURE__*/
|
|
71961
|
+
}), /*#__PURE__*/React$1.createElement(CorrectResponse$1, {
|
|
70015
71962
|
errors: errors,
|
|
70016
71963
|
model: model,
|
|
70017
71964
|
onChange: this.props.onModelChanged,
|
|
70018
71965
|
mathMlOptions: mathMlOptions
|
|
70019
|
-
}), rationaleEnabled && /*#__PURE__*/
|
|
71966
|
+
}), rationaleEnabled && /*#__PURE__*/React$1.createElement(InputContainer, {
|
|
70020
71967
|
label: rationale.label || 'Rationale',
|
|
70021
71968
|
className: classes.promptHolder
|
|
70022
|
-
}, /*#__PURE__*/
|
|
71969
|
+
}, /*#__PURE__*/React$1.createElement(EditableHtml, {
|
|
70023
71970
|
className: classes.prompt,
|
|
70024
71971
|
markup: model.rationale || '',
|
|
70025
71972
|
onChange: this.onRationaleChange,
|
|
@@ -70505,7 +72452,7 @@ class GraphLinesConfigure extends HTMLElement {
|
|
|
70505
72452
|
|
|
70506
72453
|
_render() {
|
|
70507
72454
|
if (this._model) {
|
|
70508
|
-
const el = /*#__PURE__*/
|
|
72455
|
+
const el = /*#__PURE__*/React$1.createElement(Configure$1, {
|
|
70509
72456
|
onModelChanged: this.onModelChanged,
|
|
70510
72457
|
onConfigurationChanged: this.onConfigurationChanged,
|
|
70511
72458
|
model: this._model,
|