@janrankenhohn/react-thumbnail-list 0.7.1 → 0.8.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.esm.js +15 -1642
- package/dist/index.js +15 -1642
- package/dist/types/components/ThumbnailListMainContent.d.ts +1 -1
- package/dist/types/utils/logHelper.d.ts +2 -0
- package/package.json +11 -9
package/dist/index.esm.js
CHANGED
|
@@ -63,1193 +63,6 @@ function formatMuiErrorMessage(code) {
|
|
|
63
63
|
|
|
64
64
|
var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
|
|
65
65
|
|
|
66
|
-
function getDefaultExportFromCjs (x) {
|
|
67
|
-
return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, 'default') ? x['default'] : x;
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
var propTypes = {exports: {}};
|
|
71
|
-
|
|
72
|
-
var reactIs$1 = {exports: {}};
|
|
73
|
-
|
|
74
|
-
var reactIs_production_min$1 = {};
|
|
75
|
-
|
|
76
|
-
/** @license React v16.13.1
|
|
77
|
-
* react-is.production.min.js
|
|
78
|
-
*
|
|
79
|
-
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
80
|
-
*
|
|
81
|
-
* This source code is licensed under the MIT license found in the
|
|
82
|
-
* LICENSE file in the root directory of this source tree.
|
|
83
|
-
*/
|
|
84
|
-
|
|
85
|
-
var hasRequiredReactIs_production_min$1;
|
|
86
|
-
|
|
87
|
-
function requireReactIs_production_min$1 () {
|
|
88
|
-
if (hasRequiredReactIs_production_min$1) return reactIs_production_min$1;
|
|
89
|
-
hasRequiredReactIs_production_min$1 = 1;
|
|
90
|
-
var b="function"===typeof Symbol&&Symbol.for,c=b?Symbol.for("react.element"):60103,d=b?Symbol.for("react.portal"):60106,e=b?Symbol.for("react.fragment"):60107,f=b?Symbol.for("react.strict_mode"):60108,g=b?Symbol.for("react.profiler"):60114,h=b?Symbol.for("react.provider"):60109,k=b?Symbol.for("react.context"):60110,l=b?Symbol.for("react.async_mode"):60111,m=b?Symbol.for("react.concurrent_mode"):60111,n=b?Symbol.for("react.forward_ref"):60112,p=b?Symbol.for("react.suspense"):60113,q=b?
|
|
91
|
-
Symbol.for("react.suspense_list"):60120,r=b?Symbol.for("react.memo"):60115,t=b?Symbol.for("react.lazy"):60116,v=b?Symbol.for("react.block"):60121,w=b?Symbol.for("react.fundamental"):60117,x=b?Symbol.for("react.responder"):60118,y=b?Symbol.for("react.scope"):60119;
|
|
92
|
-
function z(a){if("object"===typeof a&&null!==a){var u=a.$$typeof;switch(u){case c:switch(a=a.type,a){case l:case m:case e:case g:case f:case p:return a;default:switch(a=a&&a.$$typeof,a){case k:case n:case t:case r:case h:return a;default:return u}}case d:return u}}}function A(a){return z(a)===m}reactIs_production_min$1.AsyncMode=l;reactIs_production_min$1.ConcurrentMode=m;reactIs_production_min$1.ContextConsumer=k;reactIs_production_min$1.ContextProvider=h;reactIs_production_min$1.Element=c;reactIs_production_min$1.ForwardRef=n;reactIs_production_min$1.Fragment=e;reactIs_production_min$1.Lazy=t;reactIs_production_min$1.Memo=r;reactIs_production_min$1.Portal=d;
|
|
93
|
-
reactIs_production_min$1.Profiler=g;reactIs_production_min$1.StrictMode=f;reactIs_production_min$1.Suspense=p;reactIs_production_min$1.isAsyncMode=function(a){return A(a)||z(a)===l};reactIs_production_min$1.isConcurrentMode=A;reactIs_production_min$1.isContextConsumer=function(a){return z(a)===k};reactIs_production_min$1.isContextProvider=function(a){return z(a)===h};reactIs_production_min$1.isElement=function(a){return "object"===typeof a&&null!==a&&a.$$typeof===c};reactIs_production_min$1.isForwardRef=function(a){return z(a)===n};reactIs_production_min$1.isFragment=function(a){return z(a)===e};reactIs_production_min$1.isLazy=function(a){return z(a)===t};
|
|
94
|
-
reactIs_production_min$1.isMemo=function(a){return z(a)===r};reactIs_production_min$1.isPortal=function(a){return z(a)===d};reactIs_production_min$1.isProfiler=function(a){return z(a)===g};reactIs_production_min$1.isStrictMode=function(a){return z(a)===f};reactIs_production_min$1.isSuspense=function(a){return z(a)===p};
|
|
95
|
-
reactIs_production_min$1.isValidElementType=function(a){return "string"===typeof a||"function"===typeof a||a===e||a===m||a===g||a===f||a===p||a===q||"object"===typeof a&&null!==a&&(a.$$typeof===t||a.$$typeof===r||a.$$typeof===h||a.$$typeof===k||a.$$typeof===n||a.$$typeof===w||a.$$typeof===x||a.$$typeof===y||a.$$typeof===v)};reactIs_production_min$1.typeOf=z;
|
|
96
|
-
return reactIs_production_min$1;
|
|
97
|
-
}
|
|
98
|
-
|
|
99
|
-
var reactIs_development$1 = {};
|
|
100
|
-
|
|
101
|
-
/** @license React v16.13.1
|
|
102
|
-
* react-is.development.js
|
|
103
|
-
*
|
|
104
|
-
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
105
|
-
*
|
|
106
|
-
* This source code is licensed under the MIT license found in the
|
|
107
|
-
* LICENSE file in the root directory of this source tree.
|
|
108
|
-
*/
|
|
109
|
-
|
|
110
|
-
var hasRequiredReactIs_development$1;
|
|
111
|
-
|
|
112
|
-
function requireReactIs_development$1 () {
|
|
113
|
-
if (hasRequiredReactIs_development$1) return reactIs_development$1;
|
|
114
|
-
hasRequiredReactIs_development$1 = 1;
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
if (process.env.NODE_ENV !== "production") {
|
|
119
|
-
(function() {
|
|
120
|
-
|
|
121
|
-
// The Symbol used to tag the ReactElement-like types. If there is no native Symbol
|
|
122
|
-
// nor polyfill, then a plain number is used for performance.
|
|
123
|
-
var hasSymbol = typeof Symbol === 'function' && Symbol.for;
|
|
124
|
-
var REACT_ELEMENT_TYPE = hasSymbol ? Symbol.for('react.element') : 0xeac7;
|
|
125
|
-
var REACT_PORTAL_TYPE = hasSymbol ? Symbol.for('react.portal') : 0xeaca;
|
|
126
|
-
var REACT_FRAGMENT_TYPE = hasSymbol ? Symbol.for('react.fragment') : 0xeacb;
|
|
127
|
-
var REACT_STRICT_MODE_TYPE = hasSymbol ? Symbol.for('react.strict_mode') : 0xeacc;
|
|
128
|
-
var REACT_PROFILER_TYPE = hasSymbol ? Symbol.for('react.profiler') : 0xead2;
|
|
129
|
-
var REACT_PROVIDER_TYPE = hasSymbol ? Symbol.for('react.provider') : 0xeacd;
|
|
130
|
-
var REACT_CONTEXT_TYPE = hasSymbol ? Symbol.for('react.context') : 0xeace; // TODO: We don't use AsyncMode or ConcurrentMode anymore. They were temporary
|
|
131
|
-
// (unstable) APIs that have been removed. Can we remove the symbols?
|
|
132
|
-
|
|
133
|
-
var REACT_ASYNC_MODE_TYPE = hasSymbol ? Symbol.for('react.async_mode') : 0xeacf;
|
|
134
|
-
var REACT_CONCURRENT_MODE_TYPE = hasSymbol ? Symbol.for('react.concurrent_mode') : 0xeacf;
|
|
135
|
-
var REACT_FORWARD_REF_TYPE = hasSymbol ? Symbol.for('react.forward_ref') : 0xead0;
|
|
136
|
-
var REACT_SUSPENSE_TYPE = hasSymbol ? Symbol.for('react.suspense') : 0xead1;
|
|
137
|
-
var REACT_SUSPENSE_LIST_TYPE = hasSymbol ? Symbol.for('react.suspense_list') : 0xead8;
|
|
138
|
-
var REACT_MEMO_TYPE = hasSymbol ? Symbol.for('react.memo') : 0xead3;
|
|
139
|
-
var REACT_LAZY_TYPE = hasSymbol ? Symbol.for('react.lazy') : 0xead4;
|
|
140
|
-
var REACT_BLOCK_TYPE = hasSymbol ? Symbol.for('react.block') : 0xead9;
|
|
141
|
-
var REACT_FUNDAMENTAL_TYPE = hasSymbol ? Symbol.for('react.fundamental') : 0xead5;
|
|
142
|
-
var REACT_RESPONDER_TYPE = hasSymbol ? Symbol.for('react.responder') : 0xead6;
|
|
143
|
-
var REACT_SCOPE_TYPE = hasSymbol ? Symbol.for('react.scope') : 0xead7;
|
|
144
|
-
|
|
145
|
-
function isValidElementType(type) {
|
|
146
|
-
return typeof type === 'string' || typeof type === 'function' || // Note: its typeof might be other than 'symbol' or 'number' if it's a polyfill.
|
|
147
|
-
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);
|
|
148
|
-
}
|
|
149
|
-
|
|
150
|
-
function typeOf(object) {
|
|
151
|
-
if (typeof object === 'object' && object !== null) {
|
|
152
|
-
var $$typeof = object.$$typeof;
|
|
153
|
-
|
|
154
|
-
switch ($$typeof) {
|
|
155
|
-
case REACT_ELEMENT_TYPE:
|
|
156
|
-
var type = object.type;
|
|
157
|
-
|
|
158
|
-
switch (type) {
|
|
159
|
-
case REACT_ASYNC_MODE_TYPE:
|
|
160
|
-
case REACT_CONCURRENT_MODE_TYPE:
|
|
161
|
-
case REACT_FRAGMENT_TYPE:
|
|
162
|
-
case REACT_PROFILER_TYPE:
|
|
163
|
-
case REACT_STRICT_MODE_TYPE:
|
|
164
|
-
case REACT_SUSPENSE_TYPE:
|
|
165
|
-
return type;
|
|
166
|
-
|
|
167
|
-
default:
|
|
168
|
-
var $$typeofType = type && type.$$typeof;
|
|
169
|
-
|
|
170
|
-
switch ($$typeofType) {
|
|
171
|
-
case REACT_CONTEXT_TYPE:
|
|
172
|
-
case REACT_FORWARD_REF_TYPE:
|
|
173
|
-
case REACT_LAZY_TYPE:
|
|
174
|
-
case REACT_MEMO_TYPE:
|
|
175
|
-
case REACT_PROVIDER_TYPE:
|
|
176
|
-
return $$typeofType;
|
|
177
|
-
|
|
178
|
-
default:
|
|
179
|
-
return $$typeof;
|
|
180
|
-
}
|
|
181
|
-
|
|
182
|
-
}
|
|
183
|
-
|
|
184
|
-
case REACT_PORTAL_TYPE:
|
|
185
|
-
return $$typeof;
|
|
186
|
-
}
|
|
187
|
-
}
|
|
188
|
-
|
|
189
|
-
return undefined;
|
|
190
|
-
} // AsyncMode is deprecated along with isAsyncMode
|
|
191
|
-
|
|
192
|
-
var AsyncMode = REACT_ASYNC_MODE_TYPE;
|
|
193
|
-
var ConcurrentMode = REACT_CONCURRENT_MODE_TYPE;
|
|
194
|
-
var ContextConsumer = REACT_CONTEXT_TYPE;
|
|
195
|
-
var ContextProvider = REACT_PROVIDER_TYPE;
|
|
196
|
-
var Element = REACT_ELEMENT_TYPE;
|
|
197
|
-
var ForwardRef = REACT_FORWARD_REF_TYPE;
|
|
198
|
-
var Fragment = REACT_FRAGMENT_TYPE;
|
|
199
|
-
var Lazy = REACT_LAZY_TYPE;
|
|
200
|
-
var Memo = REACT_MEMO_TYPE;
|
|
201
|
-
var Portal = REACT_PORTAL_TYPE;
|
|
202
|
-
var Profiler = REACT_PROFILER_TYPE;
|
|
203
|
-
var StrictMode = REACT_STRICT_MODE_TYPE;
|
|
204
|
-
var Suspense = REACT_SUSPENSE_TYPE;
|
|
205
|
-
var hasWarnedAboutDeprecatedIsAsyncMode = false; // AsyncMode should be deprecated
|
|
206
|
-
|
|
207
|
-
function isAsyncMode(object) {
|
|
208
|
-
{
|
|
209
|
-
if (!hasWarnedAboutDeprecatedIsAsyncMode) {
|
|
210
|
-
hasWarnedAboutDeprecatedIsAsyncMode = true; // Using console['warn'] to evade Babel and ESLint
|
|
211
|
-
|
|
212
|
-
console['warn']('The ReactIs.isAsyncMode() alias has been deprecated, ' + 'and will be removed in React 17+. Update your code to use ' + 'ReactIs.isConcurrentMode() instead. It has the exact same API.');
|
|
213
|
-
}
|
|
214
|
-
}
|
|
215
|
-
|
|
216
|
-
return isConcurrentMode(object) || typeOf(object) === REACT_ASYNC_MODE_TYPE;
|
|
217
|
-
}
|
|
218
|
-
function isConcurrentMode(object) {
|
|
219
|
-
return typeOf(object) === REACT_CONCURRENT_MODE_TYPE;
|
|
220
|
-
}
|
|
221
|
-
function isContextConsumer(object) {
|
|
222
|
-
return typeOf(object) === REACT_CONTEXT_TYPE;
|
|
223
|
-
}
|
|
224
|
-
function isContextProvider(object) {
|
|
225
|
-
return typeOf(object) === REACT_PROVIDER_TYPE;
|
|
226
|
-
}
|
|
227
|
-
function isElement(object) {
|
|
228
|
-
return typeof object === 'object' && object !== null && object.$$typeof === REACT_ELEMENT_TYPE;
|
|
229
|
-
}
|
|
230
|
-
function isForwardRef(object) {
|
|
231
|
-
return typeOf(object) === REACT_FORWARD_REF_TYPE;
|
|
232
|
-
}
|
|
233
|
-
function isFragment(object) {
|
|
234
|
-
return typeOf(object) === REACT_FRAGMENT_TYPE;
|
|
235
|
-
}
|
|
236
|
-
function isLazy(object) {
|
|
237
|
-
return typeOf(object) === REACT_LAZY_TYPE;
|
|
238
|
-
}
|
|
239
|
-
function isMemo(object) {
|
|
240
|
-
return typeOf(object) === REACT_MEMO_TYPE;
|
|
241
|
-
}
|
|
242
|
-
function isPortal(object) {
|
|
243
|
-
return typeOf(object) === REACT_PORTAL_TYPE;
|
|
244
|
-
}
|
|
245
|
-
function isProfiler(object) {
|
|
246
|
-
return typeOf(object) === REACT_PROFILER_TYPE;
|
|
247
|
-
}
|
|
248
|
-
function isStrictMode(object) {
|
|
249
|
-
return typeOf(object) === REACT_STRICT_MODE_TYPE;
|
|
250
|
-
}
|
|
251
|
-
function isSuspense(object) {
|
|
252
|
-
return typeOf(object) === REACT_SUSPENSE_TYPE;
|
|
253
|
-
}
|
|
254
|
-
|
|
255
|
-
reactIs_development$1.AsyncMode = AsyncMode;
|
|
256
|
-
reactIs_development$1.ConcurrentMode = ConcurrentMode;
|
|
257
|
-
reactIs_development$1.ContextConsumer = ContextConsumer;
|
|
258
|
-
reactIs_development$1.ContextProvider = ContextProvider;
|
|
259
|
-
reactIs_development$1.Element = Element;
|
|
260
|
-
reactIs_development$1.ForwardRef = ForwardRef;
|
|
261
|
-
reactIs_development$1.Fragment = Fragment;
|
|
262
|
-
reactIs_development$1.Lazy = Lazy;
|
|
263
|
-
reactIs_development$1.Memo = Memo;
|
|
264
|
-
reactIs_development$1.Portal = Portal;
|
|
265
|
-
reactIs_development$1.Profiler = Profiler;
|
|
266
|
-
reactIs_development$1.StrictMode = StrictMode;
|
|
267
|
-
reactIs_development$1.Suspense = Suspense;
|
|
268
|
-
reactIs_development$1.isAsyncMode = isAsyncMode;
|
|
269
|
-
reactIs_development$1.isConcurrentMode = isConcurrentMode;
|
|
270
|
-
reactIs_development$1.isContextConsumer = isContextConsumer;
|
|
271
|
-
reactIs_development$1.isContextProvider = isContextProvider;
|
|
272
|
-
reactIs_development$1.isElement = isElement;
|
|
273
|
-
reactIs_development$1.isForwardRef = isForwardRef;
|
|
274
|
-
reactIs_development$1.isFragment = isFragment;
|
|
275
|
-
reactIs_development$1.isLazy = isLazy;
|
|
276
|
-
reactIs_development$1.isMemo = isMemo;
|
|
277
|
-
reactIs_development$1.isPortal = isPortal;
|
|
278
|
-
reactIs_development$1.isProfiler = isProfiler;
|
|
279
|
-
reactIs_development$1.isStrictMode = isStrictMode;
|
|
280
|
-
reactIs_development$1.isSuspense = isSuspense;
|
|
281
|
-
reactIs_development$1.isValidElementType = isValidElementType;
|
|
282
|
-
reactIs_development$1.typeOf = typeOf;
|
|
283
|
-
})();
|
|
284
|
-
}
|
|
285
|
-
return reactIs_development$1;
|
|
286
|
-
}
|
|
287
|
-
|
|
288
|
-
var hasRequiredReactIs;
|
|
289
|
-
|
|
290
|
-
function requireReactIs () {
|
|
291
|
-
if (hasRequiredReactIs) return reactIs$1.exports;
|
|
292
|
-
hasRequiredReactIs = 1;
|
|
293
|
-
|
|
294
|
-
if (process.env.NODE_ENV === 'production') {
|
|
295
|
-
reactIs$1.exports = requireReactIs_production_min$1();
|
|
296
|
-
} else {
|
|
297
|
-
reactIs$1.exports = requireReactIs_development$1();
|
|
298
|
-
}
|
|
299
|
-
return reactIs$1.exports;
|
|
300
|
-
}
|
|
301
|
-
|
|
302
|
-
/*
|
|
303
|
-
object-assign
|
|
304
|
-
(c) Sindre Sorhus
|
|
305
|
-
@license MIT
|
|
306
|
-
*/
|
|
307
|
-
|
|
308
|
-
var objectAssign;
|
|
309
|
-
var hasRequiredObjectAssign;
|
|
310
|
-
|
|
311
|
-
function requireObjectAssign () {
|
|
312
|
-
if (hasRequiredObjectAssign) return objectAssign;
|
|
313
|
-
hasRequiredObjectAssign = 1;
|
|
314
|
-
/* eslint-disable no-unused-vars */
|
|
315
|
-
var getOwnPropertySymbols = Object.getOwnPropertySymbols;
|
|
316
|
-
var hasOwnProperty = Object.prototype.hasOwnProperty;
|
|
317
|
-
var propIsEnumerable = Object.prototype.propertyIsEnumerable;
|
|
318
|
-
|
|
319
|
-
function toObject(val) {
|
|
320
|
-
if (val === null || val === undefined) {
|
|
321
|
-
throw new TypeError('Object.assign cannot be called with null or undefined');
|
|
322
|
-
}
|
|
323
|
-
|
|
324
|
-
return Object(val);
|
|
325
|
-
}
|
|
326
|
-
|
|
327
|
-
function shouldUseNative() {
|
|
328
|
-
try {
|
|
329
|
-
if (!Object.assign) {
|
|
330
|
-
return false;
|
|
331
|
-
}
|
|
332
|
-
|
|
333
|
-
// Detect buggy property enumeration order in older V8 versions.
|
|
334
|
-
|
|
335
|
-
// https://bugs.chromium.org/p/v8/issues/detail?id=4118
|
|
336
|
-
var test1 = new String('abc'); // eslint-disable-line no-new-wrappers
|
|
337
|
-
test1[5] = 'de';
|
|
338
|
-
if (Object.getOwnPropertyNames(test1)[0] === '5') {
|
|
339
|
-
return false;
|
|
340
|
-
}
|
|
341
|
-
|
|
342
|
-
// https://bugs.chromium.org/p/v8/issues/detail?id=3056
|
|
343
|
-
var test2 = {};
|
|
344
|
-
for (var i = 0; i < 10; i++) {
|
|
345
|
-
test2['_' + String.fromCharCode(i)] = i;
|
|
346
|
-
}
|
|
347
|
-
var order2 = Object.getOwnPropertyNames(test2).map(function (n) {
|
|
348
|
-
return test2[n];
|
|
349
|
-
});
|
|
350
|
-
if (order2.join('') !== '0123456789') {
|
|
351
|
-
return false;
|
|
352
|
-
}
|
|
353
|
-
|
|
354
|
-
// https://bugs.chromium.org/p/v8/issues/detail?id=3056
|
|
355
|
-
var test3 = {};
|
|
356
|
-
'abcdefghijklmnopqrst'.split('').forEach(function (letter) {
|
|
357
|
-
test3[letter] = letter;
|
|
358
|
-
});
|
|
359
|
-
if (Object.keys(Object.assign({}, test3)).join('') !==
|
|
360
|
-
'abcdefghijklmnopqrst') {
|
|
361
|
-
return false;
|
|
362
|
-
}
|
|
363
|
-
|
|
364
|
-
return true;
|
|
365
|
-
} catch (err) {
|
|
366
|
-
// We don't expect any of the above to throw, but better to be safe.
|
|
367
|
-
return false;
|
|
368
|
-
}
|
|
369
|
-
}
|
|
370
|
-
|
|
371
|
-
objectAssign = shouldUseNative() ? Object.assign : function (target, source) {
|
|
372
|
-
var from;
|
|
373
|
-
var to = toObject(target);
|
|
374
|
-
var symbols;
|
|
375
|
-
|
|
376
|
-
for (var s = 1; s < arguments.length; s++) {
|
|
377
|
-
from = Object(arguments[s]);
|
|
378
|
-
|
|
379
|
-
for (var key in from) {
|
|
380
|
-
if (hasOwnProperty.call(from, key)) {
|
|
381
|
-
to[key] = from[key];
|
|
382
|
-
}
|
|
383
|
-
}
|
|
384
|
-
|
|
385
|
-
if (getOwnPropertySymbols) {
|
|
386
|
-
symbols = getOwnPropertySymbols(from);
|
|
387
|
-
for (var i = 0; i < symbols.length; i++) {
|
|
388
|
-
if (propIsEnumerable.call(from, symbols[i])) {
|
|
389
|
-
to[symbols[i]] = from[symbols[i]];
|
|
390
|
-
}
|
|
391
|
-
}
|
|
392
|
-
}
|
|
393
|
-
}
|
|
394
|
-
|
|
395
|
-
return to;
|
|
396
|
-
};
|
|
397
|
-
return objectAssign;
|
|
398
|
-
}
|
|
399
|
-
|
|
400
|
-
/**
|
|
401
|
-
* Copyright (c) 2013-present, Facebook, Inc.
|
|
402
|
-
*
|
|
403
|
-
* This source code is licensed under the MIT license found in the
|
|
404
|
-
* LICENSE file in the root directory of this source tree.
|
|
405
|
-
*/
|
|
406
|
-
|
|
407
|
-
var ReactPropTypesSecret_1;
|
|
408
|
-
var hasRequiredReactPropTypesSecret;
|
|
409
|
-
|
|
410
|
-
function requireReactPropTypesSecret () {
|
|
411
|
-
if (hasRequiredReactPropTypesSecret) return ReactPropTypesSecret_1;
|
|
412
|
-
hasRequiredReactPropTypesSecret = 1;
|
|
413
|
-
|
|
414
|
-
var ReactPropTypesSecret = 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED';
|
|
415
|
-
|
|
416
|
-
ReactPropTypesSecret_1 = ReactPropTypesSecret;
|
|
417
|
-
return ReactPropTypesSecret_1;
|
|
418
|
-
}
|
|
419
|
-
|
|
420
|
-
var has;
|
|
421
|
-
var hasRequiredHas;
|
|
422
|
-
|
|
423
|
-
function requireHas () {
|
|
424
|
-
if (hasRequiredHas) return has;
|
|
425
|
-
hasRequiredHas = 1;
|
|
426
|
-
has = Function.call.bind(Object.prototype.hasOwnProperty);
|
|
427
|
-
return has;
|
|
428
|
-
}
|
|
429
|
-
|
|
430
|
-
/**
|
|
431
|
-
* Copyright (c) 2013-present, Facebook, Inc.
|
|
432
|
-
*
|
|
433
|
-
* This source code is licensed under the MIT license found in the
|
|
434
|
-
* LICENSE file in the root directory of this source tree.
|
|
435
|
-
*/
|
|
436
|
-
|
|
437
|
-
var checkPropTypes_1;
|
|
438
|
-
var hasRequiredCheckPropTypes;
|
|
439
|
-
|
|
440
|
-
function requireCheckPropTypes () {
|
|
441
|
-
if (hasRequiredCheckPropTypes) return checkPropTypes_1;
|
|
442
|
-
hasRequiredCheckPropTypes = 1;
|
|
443
|
-
|
|
444
|
-
var printWarning = function() {};
|
|
445
|
-
|
|
446
|
-
if (process.env.NODE_ENV !== 'production') {
|
|
447
|
-
var ReactPropTypesSecret = requireReactPropTypesSecret();
|
|
448
|
-
var loggedTypeFailures = {};
|
|
449
|
-
var has = requireHas();
|
|
450
|
-
|
|
451
|
-
printWarning = function(text) {
|
|
452
|
-
var message = 'Warning: ' + text;
|
|
453
|
-
if (typeof console !== 'undefined') {
|
|
454
|
-
console.error(message);
|
|
455
|
-
}
|
|
456
|
-
try {
|
|
457
|
-
// --- Welcome to debugging React ---
|
|
458
|
-
// This error was thrown as a convenience so that you can use this stack
|
|
459
|
-
// to find the callsite that caused this warning to fire.
|
|
460
|
-
throw new Error(message);
|
|
461
|
-
} catch (x) { /**/ }
|
|
462
|
-
};
|
|
463
|
-
}
|
|
464
|
-
|
|
465
|
-
/**
|
|
466
|
-
* Assert that the values match with the type specs.
|
|
467
|
-
* Error messages are memorized and will only be shown once.
|
|
468
|
-
*
|
|
469
|
-
* @param {object} typeSpecs Map of name to a ReactPropType
|
|
470
|
-
* @param {object} values Runtime values that need to be type-checked
|
|
471
|
-
* @param {string} location e.g. "prop", "context", "child context"
|
|
472
|
-
* @param {string} componentName Name of the component for error messages.
|
|
473
|
-
* @param {?Function} getStack Returns the component stack.
|
|
474
|
-
* @private
|
|
475
|
-
*/
|
|
476
|
-
function checkPropTypes(typeSpecs, values, location, componentName, getStack) {
|
|
477
|
-
if (process.env.NODE_ENV !== 'production') {
|
|
478
|
-
for (var typeSpecName in typeSpecs) {
|
|
479
|
-
if (has(typeSpecs, typeSpecName)) {
|
|
480
|
-
var error;
|
|
481
|
-
// Prop type validation may throw. In case they do, we don't want to
|
|
482
|
-
// fail the render phase where it didn't fail before. So we log it.
|
|
483
|
-
// After these have been cleaned up, we'll let them throw.
|
|
484
|
-
try {
|
|
485
|
-
// This is intentionally an invariant that gets caught. It's the same
|
|
486
|
-
// behavior as without this statement except with a better message.
|
|
487
|
-
if (typeof typeSpecs[typeSpecName] !== 'function') {
|
|
488
|
-
var err = Error(
|
|
489
|
-
(componentName || 'React class') + ': ' + location + ' type `' + typeSpecName + '` is invalid; ' +
|
|
490
|
-
'it must be a function, usually from the `prop-types` package, but received `' + typeof typeSpecs[typeSpecName] + '`.' +
|
|
491
|
-
'This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.'
|
|
492
|
-
);
|
|
493
|
-
err.name = 'Invariant Violation';
|
|
494
|
-
throw err;
|
|
495
|
-
}
|
|
496
|
-
error = typeSpecs[typeSpecName](values, typeSpecName, componentName, location, null, ReactPropTypesSecret);
|
|
497
|
-
} catch (ex) {
|
|
498
|
-
error = ex;
|
|
499
|
-
}
|
|
500
|
-
if (error && !(error instanceof Error)) {
|
|
501
|
-
printWarning(
|
|
502
|
-
(componentName || 'React class') + ': type specification of ' +
|
|
503
|
-
location + ' `' + typeSpecName + '` is invalid; the type checker ' +
|
|
504
|
-
'function must return `null` or an `Error` but returned a ' + typeof error + '. ' +
|
|
505
|
-
'You may have forgotten to pass an argument to the type checker ' +
|
|
506
|
-
'creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and ' +
|
|
507
|
-
'shape all require an argument).'
|
|
508
|
-
);
|
|
509
|
-
}
|
|
510
|
-
if (error instanceof Error && !(error.message in loggedTypeFailures)) {
|
|
511
|
-
// Only monitor this failure once because there tends to be a lot of the
|
|
512
|
-
// same error.
|
|
513
|
-
loggedTypeFailures[error.message] = true;
|
|
514
|
-
|
|
515
|
-
var stack = getStack ? getStack() : '';
|
|
516
|
-
|
|
517
|
-
printWarning(
|
|
518
|
-
'Failed ' + location + ' type: ' + error.message + (stack != null ? stack : '')
|
|
519
|
-
);
|
|
520
|
-
}
|
|
521
|
-
}
|
|
522
|
-
}
|
|
523
|
-
}
|
|
524
|
-
}
|
|
525
|
-
|
|
526
|
-
/**
|
|
527
|
-
* Resets warning cache when testing.
|
|
528
|
-
*
|
|
529
|
-
* @private
|
|
530
|
-
*/
|
|
531
|
-
checkPropTypes.resetWarningCache = function() {
|
|
532
|
-
if (process.env.NODE_ENV !== 'production') {
|
|
533
|
-
loggedTypeFailures = {};
|
|
534
|
-
}
|
|
535
|
-
};
|
|
536
|
-
|
|
537
|
-
checkPropTypes_1 = checkPropTypes;
|
|
538
|
-
return checkPropTypes_1;
|
|
539
|
-
}
|
|
540
|
-
|
|
541
|
-
/**
|
|
542
|
-
* Copyright (c) 2013-present, Facebook, Inc.
|
|
543
|
-
*
|
|
544
|
-
* This source code is licensed under the MIT license found in the
|
|
545
|
-
* LICENSE file in the root directory of this source tree.
|
|
546
|
-
*/
|
|
547
|
-
|
|
548
|
-
var factoryWithTypeCheckers;
|
|
549
|
-
var hasRequiredFactoryWithTypeCheckers;
|
|
550
|
-
|
|
551
|
-
function requireFactoryWithTypeCheckers () {
|
|
552
|
-
if (hasRequiredFactoryWithTypeCheckers) return factoryWithTypeCheckers;
|
|
553
|
-
hasRequiredFactoryWithTypeCheckers = 1;
|
|
554
|
-
|
|
555
|
-
var ReactIs = requireReactIs();
|
|
556
|
-
var assign = requireObjectAssign();
|
|
557
|
-
|
|
558
|
-
var ReactPropTypesSecret = requireReactPropTypesSecret();
|
|
559
|
-
var has = requireHas();
|
|
560
|
-
var checkPropTypes = requireCheckPropTypes();
|
|
561
|
-
|
|
562
|
-
var printWarning = function() {};
|
|
563
|
-
|
|
564
|
-
if (process.env.NODE_ENV !== 'production') {
|
|
565
|
-
printWarning = function(text) {
|
|
566
|
-
var message = 'Warning: ' + text;
|
|
567
|
-
if (typeof console !== 'undefined') {
|
|
568
|
-
console.error(message);
|
|
569
|
-
}
|
|
570
|
-
try {
|
|
571
|
-
// --- Welcome to debugging React ---
|
|
572
|
-
// This error was thrown as a convenience so that you can use this stack
|
|
573
|
-
// to find the callsite that caused this warning to fire.
|
|
574
|
-
throw new Error(message);
|
|
575
|
-
} catch (x) {}
|
|
576
|
-
};
|
|
577
|
-
}
|
|
578
|
-
|
|
579
|
-
function emptyFunctionThatReturnsNull() {
|
|
580
|
-
return null;
|
|
581
|
-
}
|
|
582
|
-
|
|
583
|
-
factoryWithTypeCheckers = function(isValidElement, throwOnDirectAccess) {
|
|
584
|
-
/* global Symbol */
|
|
585
|
-
var ITERATOR_SYMBOL = typeof Symbol === 'function' && Symbol.iterator;
|
|
586
|
-
var FAUX_ITERATOR_SYMBOL = '@@iterator'; // Before Symbol spec.
|
|
587
|
-
|
|
588
|
-
/**
|
|
589
|
-
* Returns the iterator method function contained on the iterable object.
|
|
590
|
-
*
|
|
591
|
-
* Be sure to invoke the function with the iterable as context:
|
|
592
|
-
*
|
|
593
|
-
* var iteratorFn = getIteratorFn(myIterable);
|
|
594
|
-
* if (iteratorFn) {
|
|
595
|
-
* var iterator = iteratorFn.call(myIterable);
|
|
596
|
-
* ...
|
|
597
|
-
* }
|
|
598
|
-
*
|
|
599
|
-
* @param {?object} maybeIterable
|
|
600
|
-
* @return {?function}
|
|
601
|
-
*/
|
|
602
|
-
function getIteratorFn(maybeIterable) {
|
|
603
|
-
var iteratorFn = maybeIterable && (ITERATOR_SYMBOL && maybeIterable[ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL]);
|
|
604
|
-
if (typeof iteratorFn === 'function') {
|
|
605
|
-
return iteratorFn;
|
|
606
|
-
}
|
|
607
|
-
}
|
|
608
|
-
|
|
609
|
-
/**
|
|
610
|
-
* Collection of methods that allow declaration and validation of props that are
|
|
611
|
-
* supplied to React components. Example usage:
|
|
612
|
-
*
|
|
613
|
-
* var Props = require('ReactPropTypes');
|
|
614
|
-
* var MyArticle = React.createClass({
|
|
615
|
-
* propTypes: {
|
|
616
|
-
* // An optional string prop named "description".
|
|
617
|
-
* description: Props.string,
|
|
618
|
-
*
|
|
619
|
-
* // A required enum prop named "category".
|
|
620
|
-
* category: Props.oneOf(['News','Photos']).isRequired,
|
|
621
|
-
*
|
|
622
|
-
* // A prop named "dialog" that requires an instance of Dialog.
|
|
623
|
-
* dialog: Props.instanceOf(Dialog).isRequired
|
|
624
|
-
* },
|
|
625
|
-
* render: function() { ... }
|
|
626
|
-
* });
|
|
627
|
-
*
|
|
628
|
-
* A more formal specification of how these methods are used:
|
|
629
|
-
*
|
|
630
|
-
* type := array|bool|func|object|number|string|oneOf([...])|instanceOf(...)
|
|
631
|
-
* decl := ReactPropTypes.{type}(.isRequired)?
|
|
632
|
-
*
|
|
633
|
-
* Each and every declaration produces a function with the same signature. This
|
|
634
|
-
* allows the creation of custom validation functions. For example:
|
|
635
|
-
*
|
|
636
|
-
* var MyLink = React.createClass({
|
|
637
|
-
* propTypes: {
|
|
638
|
-
* // An optional string or URI prop named "href".
|
|
639
|
-
* href: function(props, propName, componentName) {
|
|
640
|
-
* var propValue = props[propName];
|
|
641
|
-
* if (propValue != null && typeof propValue !== 'string' &&
|
|
642
|
-
* !(propValue instanceof URI)) {
|
|
643
|
-
* return new Error(
|
|
644
|
-
* 'Expected a string or an URI for ' + propName + ' in ' +
|
|
645
|
-
* componentName
|
|
646
|
-
* );
|
|
647
|
-
* }
|
|
648
|
-
* }
|
|
649
|
-
* },
|
|
650
|
-
* render: function() {...}
|
|
651
|
-
* });
|
|
652
|
-
*
|
|
653
|
-
* @internal
|
|
654
|
-
*/
|
|
655
|
-
|
|
656
|
-
var ANONYMOUS = '<<anonymous>>';
|
|
657
|
-
|
|
658
|
-
// Important!
|
|
659
|
-
// Keep this list in sync with production version in `./factoryWithThrowingShims.js`.
|
|
660
|
-
var ReactPropTypes = {
|
|
661
|
-
array: createPrimitiveTypeChecker('array'),
|
|
662
|
-
bigint: createPrimitiveTypeChecker('bigint'),
|
|
663
|
-
bool: createPrimitiveTypeChecker('boolean'),
|
|
664
|
-
func: createPrimitiveTypeChecker('function'),
|
|
665
|
-
number: createPrimitiveTypeChecker('number'),
|
|
666
|
-
object: createPrimitiveTypeChecker('object'),
|
|
667
|
-
string: createPrimitiveTypeChecker('string'),
|
|
668
|
-
symbol: createPrimitiveTypeChecker('symbol'),
|
|
669
|
-
|
|
670
|
-
any: createAnyTypeChecker(),
|
|
671
|
-
arrayOf: createArrayOfTypeChecker,
|
|
672
|
-
element: createElementTypeChecker(),
|
|
673
|
-
elementType: createElementTypeTypeChecker(),
|
|
674
|
-
instanceOf: createInstanceTypeChecker,
|
|
675
|
-
node: createNodeChecker(),
|
|
676
|
-
objectOf: createObjectOfTypeChecker,
|
|
677
|
-
oneOf: createEnumTypeChecker,
|
|
678
|
-
oneOfType: createUnionTypeChecker,
|
|
679
|
-
shape: createShapeTypeChecker,
|
|
680
|
-
exact: createStrictShapeTypeChecker,
|
|
681
|
-
};
|
|
682
|
-
|
|
683
|
-
/**
|
|
684
|
-
* inlined Object.is polyfill to avoid requiring consumers ship their own
|
|
685
|
-
* https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is
|
|
686
|
-
*/
|
|
687
|
-
/*eslint-disable no-self-compare*/
|
|
688
|
-
function is(x, y) {
|
|
689
|
-
// SameValue algorithm
|
|
690
|
-
if (x === y) {
|
|
691
|
-
// Steps 1-5, 7-10
|
|
692
|
-
// Steps 6.b-6.e: +0 != -0
|
|
693
|
-
return x !== 0 || 1 / x === 1 / y;
|
|
694
|
-
} else {
|
|
695
|
-
// Step 6.a: NaN == NaN
|
|
696
|
-
return x !== x && y !== y;
|
|
697
|
-
}
|
|
698
|
-
}
|
|
699
|
-
/*eslint-enable no-self-compare*/
|
|
700
|
-
|
|
701
|
-
/**
|
|
702
|
-
* We use an Error-like object for backward compatibility as people may call
|
|
703
|
-
* PropTypes directly and inspect their output. However, we don't use real
|
|
704
|
-
* Errors anymore. We don't inspect their stack anyway, and creating them
|
|
705
|
-
* is prohibitively expensive if they are created too often, such as what
|
|
706
|
-
* happens in oneOfType() for any type before the one that matched.
|
|
707
|
-
*/
|
|
708
|
-
function PropTypeError(message, data) {
|
|
709
|
-
this.message = message;
|
|
710
|
-
this.data = data && typeof data === 'object' ? data: {};
|
|
711
|
-
this.stack = '';
|
|
712
|
-
}
|
|
713
|
-
// Make `instanceof Error` still work for returned errors.
|
|
714
|
-
PropTypeError.prototype = Error.prototype;
|
|
715
|
-
|
|
716
|
-
function createChainableTypeChecker(validate) {
|
|
717
|
-
if (process.env.NODE_ENV !== 'production') {
|
|
718
|
-
var manualPropTypeCallCache = {};
|
|
719
|
-
var manualPropTypeWarningCount = 0;
|
|
720
|
-
}
|
|
721
|
-
function checkType(isRequired, props, propName, componentName, location, propFullName, secret) {
|
|
722
|
-
componentName = componentName || ANONYMOUS;
|
|
723
|
-
propFullName = propFullName || propName;
|
|
724
|
-
|
|
725
|
-
if (secret !== ReactPropTypesSecret) {
|
|
726
|
-
if (throwOnDirectAccess) {
|
|
727
|
-
// New behavior only for users of `prop-types` package
|
|
728
|
-
var err = new Error(
|
|
729
|
-
'Calling PropTypes validators directly is not supported by the `prop-types` package. ' +
|
|
730
|
-
'Use `PropTypes.checkPropTypes()` to call them. ' +
|
|
731
|
-
'Read more at http://fb.me/use-check-prop-types'
|
|
732
|
-
);
|
|
733
|
-
err.name = 'Invariant Violation';
|
|
734
|
-
throw err;
|
|
735
|
-
} else if (process.env.NODE_ENV !== 'production' && typeof console !== 'undefined') {
|
|
736
|
-
// Old behavior for people using React.PropTypes
|
|
737
|
-
var cacheKey = componentName + ':' + propName;
|
|
738
|
-
if (
|
|
739
|
-
!manualPropTypeCallCache[cacheKey] &&
|
|
740
|
-
// Avoid spamming the console because they are often not actionable except for lib authors
|
|
741
|
-
manualPropTypeWarningCount < 3
|
|
742
|
-
) {
|
|
743
|
-
printWarning(
|
|
744
|
-
'You are manually calling a React.PropTypes validation ' +
|
|
745
|
-
'function for the `' + propFullName + '` prop on `' + componentName + '`. This is deprecated ' +
|
|
746
|
-
'and will throw in the standalone `prop-types` package. ' +
|
|
747
|
-
'You may be seeing this warning due to a third-party PropTypes ' +
|
|
748
|
-
'library. See https://fb.me/react-warning-dont-call-proptypes ' + 'for details.'
|
|
749
|
-
);
|
|
750
|
-
manualPropTypeCallCache[cacheKey] = true;
|
|
751
|
-
manualPropTypeWarningCount++;
|
|
752
|
-
}
|
|
753
|
-
}
|
|
754
|
-
}
|
|
755
|
-
if (props[propName] == null) {
|
|
756
|
-
if (isRequired) {
|
|
757
|
-
if (props[propName] === null) {
|
|
758
|
-
return new PropTypeError('The ' + location + ' `' + propFullName + '` is marked as required ' + ('in `' + componentName + '`, but its value is `null`.'));
|
|
759
|
-
}
|
|
760
|
-
return new PropTypeError('The ' + location + ' `' + propFullName + '` is marked as required in ' + ('`' + componentName + '`, but its value is `undefined`.'));
|
|
761
|
-
}
|
|
762
|
-
return null;
|
|
763
|
-
} else {
|
|
764
|
-
return validate(props, propName, componentName, location, propFullName);
|
|
765
|
-
}
|
|
766
|
-
}
|
|
767
|
-
|
|
768
|
-
var chainedCheckType = checkType.bind(null, false);
|
|
769
|
-
chainedCheckType.isRequired = checkType.bind(null, true);
|
|
770
|
-
|
|
771
|
-
return chainedCheckType;
|
|
772
|
-
}
|
|
773
|
-
|
|
774
|
-
function createPrimitiveTypeChecker(expectedType) {
|
|
775
|
-
function validate(props, propName, componentName, location, propFullName, secret) {
|
|
776
|
-
var propValue = props[propName];
|
|
777
|
-
var propType = getPropType(propValue);
|
|
778
|
-
if (propType !== expectedType) {
|
|
779
|
-
// `propValue` being instance of, say, date/regexp, pass the 'object'
|
|
780
|
-
// check, but we can offer a more precise error message here rather than
|
|
781
|
-
// 'of type `object`'.
|
|
782
|
-
var preciseType = getPreciseType(propValue);
|
|
783
|
-
|
|
784
|
-
return new PropTypeError(
|
|
785
|
-
'Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + preciseType + '` supplied to `' + componentName + '`, expected ') + ('`' + expectedType + '`.'),
|
|
786
|
-
{expectedType: expectedType}
|
|
787
|
-
);
|
|
788
|
-
}
|
|
789
|
-
return null;
|
|
790
|
-
}
|
|
791
|
-
return createChainableTypeChecker(validate);
|
|
792
|
-
}
|
|
793
|
-
|
|
794
|
-
function createAnyTypeChecker() {
|
|
795
|
-
return createChainableTypeChecker(emptyFunctionThatReturnsNull);
|
|
796
|
-
}
|
|
797
|
-
|
|
798
|
-
function createArrayOfTypeChecker(typeChecker) {
|
|
799
|
-
function validate(props, propName, componentName, location, propFullName) {
|
|
800
|
-
if (typeof typeChecker !== 'function') {
|
|
801
|
-
return new PropTypeError('Property `' + propFullName + '` of component `' + componentName + '` has invalid PropType notation inside arrayOf.');
|
|
802
|
-
}
|
|
803
|
-
var propValue = props[propName];
|
|
804
|
-
if (!Array.isArray(propValue)) {
|
|
805
|
-
var propType = getPropType(propValue);
|
|
806
|
-
return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected an array.'));
|
|
807
|
-
}
|
|
808
|
-
for (var i = 0; i < propValue.length; i++) {
|
|
809
|
-
var error = typeChecker(propValue, i, componentName, location, propFullName + '[' + i + ']', ReactPropTypesSecret);
|
|
810
|
-
if (error instanceof Error) {
|
|
811
|
-
return error;
|
|
812
|
-
}
|
|
813
|
-
}
|
|
814
|
-
return null;
|
|
815
|
-
}
|
|
816
|
-
return createChainableTypeChecker(validate);
|
|
817
|
-
}
|
|
818
|
-
|
|
819
|
-
function createElementTypeChecker() {
|
|
820
|
-
function validate(props, propName, componentName, location, propFullName) {
|
|
821
|
-
var propValue = props[propName];
|
|
822
|
-
if (!isValidElement(propValue)) {
|
|
823
|
-
var propType = getPropType(propValue);
|
|
824
|
-
return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected a single ReactElement.'));
|
|
825
|
-
}
|
|
826
|
-
return null;
|
|
827
|
-
}
|
|
828
|
-
return createChainableTypeChecker(validate);
|
|
829
|
-
}
|
|
830
|
-
|
|
831
|
-
function createElementTypeTypeChecker() {
|
|
832
|
-
function validate(props, propName, componentName, location, propFullName) {
|
|
833
|
-
var propValue = props[propName];
|
|
834
|
-
if (!ReactIs.isValidElementType(propValue)) {
|
|
835
|
-
var propType = getPropType(propValue);
|
|
836
|
-
return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected a single ReactElement type.'));
|
|
837
|
-
}
|
|
838
|
-
return null;
|
|
839
|
-
}
|
|
840
|
-
return createChainableTypeChecker(validate);
|
|
841
|
-
}
|
|
842
|
-
|
|
843
|
-
function createInstanceTypeChecker(expectedClass) {
|
|
844
|
-
function validate(props, propName, componentName, location, propFullName) {
|
|
845
|
-
if (!(props[propName] instanceof expectedClass)) {
|
|
846
|
-
var expectedClassName = expectedClass.name || ANONYMOUS;
|
|
847
|
-
var actualClassName = getClassName(props[propName]);
|
|
848
|
-
return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + actualClassName + '` supplied to `' + componentName + '`, expected ') + ('instance of `' + expectedClassName + '`.'));
|
|
849
|
-
}
|
|
850
|
-
return null;
|
|
851
|
-
}
|
|
852
|
-
return createChainableTypeChecker(validate);
|
|
853
|
-
}
|
|
854
|
-
|
|
855
|
-
function createEnumTypeChecker(expectedValues) {
|
|
856
|
-
if (!Array.isArray(expectedValues)) {
|
|
857
|
-
if (process.env.NODE_ENV !== 'production') {
|
|
858
|
-
if (arguments.length > 1) {
|
|
859
|
-
printWarning(
|
|
860
|
-
'Invalid arguments supplied to oneOf, expected an array, got ' + arguments.length + ' arguments. ' +
|
|
861
|
-
'A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z]).'
|
|
862
|
-
);
|
|
863
|
-
} else {
|
|
864
|
-
printWarning('Invalid argument supplied to oneOf, expected an array.');
|
|
865
|
-
}
|
|
866
|
-
}
|
|
867
|
-
return emptyFunctionThatReturnsNull;
|
|
868
|
-
}
|
|
869
|
-
|
|
870
|
-
function validate(props, propName, componentName, location, propFullName) {
|
|
871
|
-
var propValue = props[propName];
|
|
872
|
-
for (var i = 0; i < expectedValues.length; i++) {
|
|
873
|
-
if (is(propValue, expectedValues[i])) {
|
|
874
|
-
return null;
|
|
875
|
-
}
|
|
876
|
-
}
|
|
877
|
-
|
|
878
|
-
var valuesString = JSON.stringify(expectedValues, function replacer(key, value) {
|
|
879
|
-
var type = getPreciseType(value);
|
|
880
|
-
if (type === 'symbol') {
|
|
881
|
-
return String(value);
|
|
882
|
-
}
|
|
883
|
-
return value;
|
|
884
|
-
});
|
|
885
|
-
return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of value `' + String(propValue) + '` ' + ('supplied to `' + componentName + '`, expected one of ' + valuesString + '.'));
|
|
886
|
-
}
|
|
887
|
-
return createChainableTypeChecker(validate);
|
|
888
|
-
}
|
|
889
|
-
|
|
890
|
-
function createObjectOfTypeChecker(typeChecker) {
|
|
891
|
-
function validate(props, propName, componentName, location, propFullName) {
|
|
892
|
-
if (typeof typeChecker !== 'function') {
|
|
893
|
-
return new PropTypeError('Property `' + propFullName + '` of component `' + componentName + '` has invalid PropType notation inside objectOf.');
|
|
894
|
-
}
|
|
895
|
-
var propValue = props[propName];
|
|
896
|
-
var propType = getPropType(propValue);
|
|
897
|
-
if (propType !== 'object') {
|
|
898
|
-
return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected an object.'));
|
|
899
|
-
}
|
|
900
|
-
for (var key in propValue) {
|
|
901
|
-
if (has(propValue, key)) {
|
|
902
|
-
var error = typeChecker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret);
|
|
903
|
-
if (error instanceof Error) {
|
|
904
|
-
return error;
|
|
905
|
-
}
|
|
906
|
-
}
|
|
907
|
-
}
|
|
908
|
-
return null;
|
|
909
|
-
}
|
|
910
|
-
return createChainableTypeChecker(validate);
|
|
911
|
-
}
|
|
912
|
-
|
|
913
|
-
function createUnionTypeChecker(arrayOfTypeCheckers) {
|
|
914
|
-
if (!Array.isArray(arrayOfTypeCheckers)) {
|
|
915
|
-
process.env.NODE_ENV !== 'production' ? printWarning('Invalid argument supplied to oneOfType, expected an instance of array.') : void 0;
|
|
916
|
-
return emptyFunctionThatReturnsNull;
|
|
917
|
-
}
|
|
918
|
-
|
|
919
|
-
for (var i = 0; i < arrayOfTypeCheckers.length; i++) {
|
|
920
|
-
var checker = arrayOfTypeCheckers[i];
|
|
921
|
-
if (typeof checker !== 'function') {
|
|
922
|
-
printWarning(
|
|
923
|
-
'Invalid argument supplied to oneOfType. Expected an array of check functions, but ' +
|
|
924
|
-
'received ' + getPostfixForTypeWarning(checker) + ' at index ' + i + '.'
|
|
925
|
-
);
|
|
926
|
-
return emptyFunctionThatReturnsNull;
|
|
927
|
-
}
|
|
928
|
-
}
|
|
929
|
-
|
|
930
|
-
function validate(props, propName, componentName, location, propFullName) {
|
|
931
|
-
var expectedTypes = [];
|
|
932
|
-
for (var i = 0; i < arrayOfTypeCheckers.length; i++) {
|
|
933
|
-
var checker = arrayOfTypeCheckers[i];
|
|
934
|
-
var checkerResult = checker(props, propName, componentName, location, propFullName, ReactPropTypesSecret);
|
|
935
|
-
if (checkerResult == null) {
|
|
936
|
-
return null;
|
|
937
|
-
}
|
|
938
|
-
if (checkerResult.data && has(checkerResult.data, 'expectedType')) {
|
|
939
|
-
expectedTypes.push(checkerResult.data.expectedType);
|
|
940
|
-
}
|
|
941
|
-
}
|
|
942
|
-
var expectedTypesMessage = (expectedTypes.length > 0) ? ', expected one of type [' + expectedTypes.join(', ') + ']': '';
|
|
943
|
-
return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` supplied to ' + ('`' + componentName + '`' + expectedTypesMessage + '.'));
|
|
944
|
-
}
|
|
945
|
-
return createChainableTypeChecker(validate);
|
|
946
|
-
}
|
|
947
|
-
|
|
948
|
-
function createNodeChecker() {
|
|
949
|
-
function validate(props, propName, componentName, location, propFullName) {
|
|
950
|
-
if (!isNode(props[propName])) {
|
|
951
|
-
return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` supplied to ' + ('`' + componentName + '`, expected a ReactNode.'));
|
|
952
|
-
}
|
|
953
|
-
return null;
|
|
954
|
-
}
|
|
955
|
-
return createChainableTypeChecker(validate);
|
|
956
|
-
}
|
|
957
|
-
|
|
958
|
-
function invalidValidatorError(componentName, location, propFullName, key, type) {
|
|
959
|
-
return new PropTypeError(
|
|
960
|
-
(componentName || 'React class') + ': ' + location + ' type `' + propFullName + '.' + key + '` is invalid; ' +
|
|
961
|
-
'it must be a function, usually from the `prop-types` package, but received `' + type + '`.'
|
|
962
|
-
);
|
|
963
|
-
}
|
|
964
|
-
|
|
965
|
-
function createShapeTypeChecker(shapeTypes) {
|
|
966
|
-
function validate(props, propName, componentName, location, propFullName) {
|
|
967
|
-
var propValue = props[propName];
|
|
968
|
-
var propType = getPropType(propValue);
|
|
969
|
-
if (propType !== 'object') {
|
|
970
|
-
return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type `' + propType + '` ' + ('supplied to `' + componentName + '`, expected `object`.'));
|
|
971
|
-
}
|
|
972
|
-
for (var key in shapeTypes) {
|
|
973
|
-
var checker = shapeTypes[key];
|
|
974
|
-
if (typeof checker !== 'function') {
|
|
975
|
-
return invalidValidatorError(componentName, location, propFullName, key, getPreciseType(checker));
|
|
976
|
-
}
|
|
977
|
-
var error = checker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret);
|
|
978
|
-
if (error) {
|
|
979
|
-
return error;
|
|
980
|
-
}
|
|
981
|
-
}
|
|
982
|
-
return null;
|
|
983
|
-
}
|
|
984
|
-
return createChainableTypeChecker(validate);
|
|
985
|
-
}
|
|
986
|
-
|
|
987
|
-
function createStrictShapeTypeChecker(shapeTypes) {
|
|
988
|
-
function validate(props, propName, componentName, location, propFullName) {
|
|
989
|
-
var propValue = props[propName];
|
|
990
|
-
var propType = getPropType(propValue);
|
|
991
|
-
if (propType !== 'object') {
|
|
992
|
-
return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type `' + propType + '` ' + ('supplied to `' + componentName + '`, expected `object`.'));
|
|
993
|
-
}
|
|
994
|
-
// We need to check all keys in case some are required but missing from props.
|
|
995
|
-
var allKeys = assign({}, props[propName], shapeTypes);
|
|
996
|
-
for (var key in allKeys) {
|
|
997
|
-
var checker = shapeTypes[key];
|
|
998
|
-
if (has(shapeTypes, key) && typeof checker !== 'function') {
|
|
999
|
-
return invalidValidatorError(componentName, location, propFullName, key, getPreciseType(checker));
|
|
1000
|
-
}
|
|
1001
|
-
if (!checker) {
|
|
1002
|
-
return new PropTypeError(
|
|
1003
|
-
'Invalid ' + location + ' `' + propFullName + '` key `' + key + '` supplied to `' + componentName + '`.' +
|
|
1004
|
-
'\nBad object: ' + JSON.stringify(props[propName], null, ' ') +
|
|
1005
|
-
'\nValid keys: ' + JSON.stringify(Object.keys(shapeTypes), null, ' ')
|
|
1006
|
-
);
|
|
1007
|
-
}
|
|
1008
|
-
var error = checker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret);
|
|
1009
|
-
if (error) {
|
|
1010
|
-
return error;
|
|
1011
|
-
}
|
|
1012
|
-
}
|
|
1013
|
-
return null;
|
|
1014
|
-
}
|
|
1015
|
-
|
|
1016
|
-
return createChainableTypeChecker(validate);
|
|
1017
|
-
}
|
|
1018
|
-
|
|
1019
|
-
function isNode(propValue) {
|
|
1020
|
-
switch (typeof propValue) {
|
|
1021
|
-
case 'number':
|
|
1022
|
-
case 'string':
|
|
1023
|
-
case 'undefined':
|
|
1024
|
-
return true;
|
|
1025
|
-
case 'boolean':
|
|
1026
|
-
return !propValue;
|
|
1027
|
-
case 'object':
|
|
1028
|
-
if (Array.isArray(propValue)) {
|
|
1029
|
-
return propValue.every(isNode);
|
|
1030
|
-
}
|
|
1031
|
-
if (propValue === null || isValidElement(propValue)) {
|
|
1032
|
-
return true;
|
|
1033
|
-
}
|
|
1034
|
-
|
|
1035
|
-
var iteratorFn = getIteratorFn(propValue);
|
|
1036
|
-
if (iteratorFn) {
|
|
1037
|
-
var iterator = iteratorFn.call(propValue);
|
|
1038
|
-
var step;
|
|
1039
|
-
if (iteratorFn !== propValue.entries) {
|
|
1040
|
-
while (!(step = iterator.next()).done) {
|
|
1041
|
-
if (!isNode(step.value)) {
|
|
1042
|
-
return false;
|
|
1043
|
-
}
|
|
1044
|
-
}
|
|
1045
|
-
} else {
|
|
1046
|
-
// Iterator will provide entry [k,v] tuples rather than values.
|
|
1047
|
-
while (!(step = iterator.next()).done) {
|
|
1048
|
-
var entry = step.value;
|
|
1049
|
-
if (entry) {
|
|
1050
|
-
if (!isNode(entry[1])) {
|
|
1051
|
-
return false;
|
|
1052
|
-
}
|
|
1053
|
-
}
|
|
1054
|
-
}
|
|
1055
|
-
}
|
|
1056
|
-
} else {
|
|
1057
|
-
return false;
|
|
1058
|
-
}
|
|
1059
|
-
|
|
1060
|
-
return true;
|
|
1061
|
-
default:
|
|
1062
|
-
return false;
|
|
1063
|
-
}
|
|
1064
|
-
}
|
|
1065
|
-
|
|
1066
|
-
function isSymbol(propType, propValue) {
|
|
1067
|
-
// Native Symbol.
|
|
1068
|
-
if (propType === 'symbol') {
|
|
1069
|
-
return true;
|
|
1070
|
-
}
|
|
1071
|
-
|
|
1072
|
-
// falsy value can't be a Symbol
|
|
1073
|
-
if (!propValue) {
|
|
1074
|
-
return false;
|
|
1075
|
-
}
|
|
1076
|
-
|
|
1077
|
-
// 19.4.3.5 Symbol.prototype[@@toStringTag] === 'Symbol'
|
|
1078
|
-
if (propValue['@@toStringTag'] === 'Symbol') {
|
|
1079
|
-
return true;
|
|
1080
|
-
}
|
|
1081
|
-
|
|
1082
|
-
// Fallback for non-spec compliant Symbols which are polyfilled.
|
|
1083
|
-
if (typeof Symbol === 'function' && propValue instanceof Symbol) {
|
|
1084
|
-
return true;
|
|
1085
|
-
}
|
|
1086
|
-
|
|
1087
|
-
return false;
|
|
1088
|
-
}
|
|
1089
|
-
|
|
1090
|
-
// Equivalent of `typeof` but with special handling for array and regexp.
|
|
1091
|
-
function getPropType(propValue) {
|
|
1092
|
-
var propType = typeof propValue;
|
|
1093
|
-
if (Array.isArray(propValue)) {
|
|
1094
|
-
return 'array';
|
|
1095
|
-
}
|
|
1096
|
-
if (propValue instanceof RegExp) {
|
|
1097
|
-
// Old webkits (at least until Android 4.0) return 'function' rather than
|
|
1098
|
-
// 'object' for typeof a RegExp. We'll normalize this here so that /bla/
|
|
1099
|
-
// passes PropTypes.object.
|
|
1100
|
-
return 'object';
|
|
1101
|
-
}
|
|
1102
|
-
if (isSymbol(propType, propValue)) {
|
|
1103
|
-
return 'symbol';
|
|
1104
|
-
}
|
|
1105
|
-
return propType;
|
|
1106
|
-
}
|
|
1107
|
-
|
|
1108
|
-
// This handles more types than `getPropType`. Only used for error messages.
|
|
1109
|
-
// See `createPrimitiveTypeChecker`.
|
|
1110
|
-
function getPreciseType(propValue) {
|
|
1111
|
-
if (typeof propValue === 'undefined' || propValue === null) {
|
|
1112
|
-
return '' + propValue;
|
|
1113
|
-
}
|
|
1114
|
-
var propType = getPropType(propValue);
|
|
1115
|
-
if (propType === 'object') {
|
|
1116
|
-
if (propValue instanceof Date) {
|
|
1117
|
-
return 'date';
|
|
1118
|
-
} else if (propValue instanceof RegExp) {
|
|
1119
|
-
return 'regexp';
|
|
1120
|
-
}
|
|
1121
|
-
}
|
|
1122
|
-
return propType;
|
|
1123
|
-
}
|
|
1124
|
-
|
|
1125
|
-
// Returns a string that is postfixed to a warning about an invalid type.
|
|
1126
|
-
// For example, "undefined" or "of type array"
|
|
1127
|
-
function getPostfixForTypeWarning(value) {
|
|
1128
|
-
var type = getPreciseType(value);
|
|
1129
|
-
switch (type) {
|
|
1130
|
-
case 'array':
|
|
1131
|
-
case 'object':
|
|
1132
|
-
return 'an ' + type;
|
|
1133
|
-
case 'boolean':
|
|
1134
|
-
case 'date':
|
|
1135
|
-
case 'regexp':
|
|
1136
|
-
return 'a ' + type;
|
|
1137
|
-
default:
|
|
1138
|
-
return type;
|
|
1139
|
-
}
|
|
1140
|
-
}
|
|
1141
|
-
|
|
1142
|
-
// Returns class name of the object, if any.
|
|
1143
|
-
function getClassName(propValue) {
|
|
1144
|
-
if (!propValue.constructor || !propValue.constructor.name) {
|
|
1145
|
-
return ANONYMOUS;
|
|
1146
|
-
}
|
|
1147
|
-
return propValue.constructor.name;
|
|
1148
|
-
}
|
|
1149
|
-
|
|
1150
|
-
ReactPropTypes.checkPropTypes = checkPropTypes;
|
|
1151
|
-
ReactPropTypes.resetWarningCache = checkPropTypes.resetWarningCache;
|
|
1152
|
-
ReactPropTypes.PropTypes = ReactPropTypes;
|
|
1153
|
-
|
|
1154
|
-
return ReactPropTypes;
|
|
1155
|
-
};
|
|
1156
|
-
return factoryWithTypeCheckers;
|
|
1157
|
-
}
|
|
1158
|
-
|
|
1159
|
-
/**
|
|
1160
|
-
* Copyright (c) 2013-present, Facebook, Inc.
|
|
1161
|
-
*
|
|
1162
|
-
* This source code is licensed under the MIT license found in the
|
|
1163
|
-
* LICENSE file in the root directory of this source tree.
|
|
1164
|
-
*/
|
|
1165
|
-
|
|
1166
|
-
var factoryWithThrowingShims;
|
|
1167
|
-
var hasRequiredFactoryWithThrowingShims;
|
|
1168
|
-
|
|
1169
|
-
function requireFactoryWithThrowingShims () {
|
|
1170
|
-
if (hasRequiredFactoryWithThrowingShims) return factoryWithThrowingShims;
|
|
1171
|
-
hasRequiredFactoryWithThrowingShims = 1;
|
|
1172
|
-
|
|
1173
|
-
var ReactPropTypesSecret = requireReactPropTypesSecret();
|
|
1174
|
-
|
|
1175
|
-
function emptyFunction() {}
|
|
1176
|
-
function emptyFunctionWithReset() {}
|
|
1177
|
-
emptyFunctionWithReset.resetWarningCache = emptyFunction;
|
|
1178
|
-
|
|
1179
|
-
factoryWithThrowingShims = function() {
|
|
1180
|
-
function shim(props, propName, componentName, location, propFullName, secret) {
|
|
1181
|
-
if (secret === ReactPropTypesSecret) {
|
|
1182
|
-
// It is still safe when called from React.
|
|
1183
|
-
return;
|
|
1184
|
-
}
|
|
1185
|
-
var err = new Error(
|
|
1186
|
-
'Calling PropTypes validators directly is not supported by the `prop-types` package. ' +
|
|
1187
|
-
'Use PropTypes.checkPropTypes() to call them. ' +
|
|
1188
|
-
'Read more at http://fb.me/use-check-prop-types'
|
|
1189
|
-
);
|
|
1190
|
-
err.name = 'Invariant Violation';
|
|
1191
|
-
throw err;
|
|
1192
|
-
} shim.isRequired = shim;
|
|
1193
|
-
function getShim() {
|
|
1194
|
-
return shim;
|
|
1195
|
-
} // Important!
|
|
1196
|
-
// Keep this list in sync with production version in `./factoryWithTypeCheckers.js`.
|
|
1197
|
-
var ReactPropTypes = {
|
|
1198
|
-
array: shim,
|
|
1199
|
-
bigint: shim,
|
|
1200
|
-
bool: shim,
|
|
1201
|
-
func: shim,
|
|
1202
|
-
number: shim,
|
|
1203
|
-
object: shim,
|
|
1204
|
-
string: shim,
|
|
1205
|
-
symbol: shim,
|
|
1206
|
-
|
|
1207
|
-
any: shim,
|
|
1208
|
-
arrayOf: getShim,
|
|
1209
|
-
element: shim,
|
|
1210
|
-
elementType: shim,
|
|
1211
|
-
instanceOf: getShim,
|
|
1212
|
-
node: shim,
|
|
1213
|
-
objectOf: getShim,
|
|
1214
|
-
oneOf: getShim,
|
|
1215
|
-
oneOfType: getShim,
|
|
1216
|
-
shape: getShim,
|
|
1217
|
-
exact: getShim,
|
|
1218
|
-
|
|
1219
|
-
checkPropTypes: emptyFunctionWithReset,
|
|
1220
|
-
resetWarningCache: emptyFunction
|
|
1221
|
-
};
|
|
1222
|
-
|
|
1223
|
-
ReactPropTypes.PropTypes = ReactPropTypes;
|
|
1224
|
-
|
|
1225
|
-
return ReactPropTypes;
|
|
1226
|
-
};
|
|
1227
|
-
return factoryWithThrowingShims;
|
|
1228
|
-
}
|
|
1229
|
-
|
|
1230
|
-
/**
|
|
1231
|
-
* Copyright (c) 2013-present, Facebook, Inc.
|
|
1232
|
-
*
|
|
1233
|
-
* This source code is licensed under the MIT license found in the
|
|
1234
|
-
* LICENSE file in the root directory of this source tree.
|
|
1235
|
-
*/
|
|
1236
|
-
|
|
1237
|
-
if (process.env.NODE_ENV !== 'production') {
|
|
1238
|
-
var ReactIs = requireReactIs();
|
|
1239
|
-
|
|
1240
|
-
// By explicitly using `prop-types` you are opting into new development behavior.
|
|
1241
|
-
// http://fb.me/prop-types-in-prod
|
|
1242
|
-
var throwOnDirectAccess = true;
|
|
1243
|
-
propTypes.exports = requireFactoryWithTypeCheckers()(ReactIs.isElement, throwOnDirectAccess);
|
|
1244
|
-
} else {
|
|
1245
|
-
// By explicitly using `prop-types` you are opting into new production behavior.
|
|
1246
|
-
// http://fb.me/prop-types-in-prod
|
|
1247
|
-
propTypes.exports = requireFactoryWithThrowingShims()();
|
|
1248
|
-
}
|
|
1249
|
-
|
|
1250
|
-
var propTypesExports = propTypes.exports;
|
|
1251
|
-
var PropTypes = /*@__PURE__*/getDefaultExportFromCjs(propTypesExports);
|
|
1252
|
-
|
|
1253
66
|
/**
|
|
1254
67
|
* @mui/styled-engine v5.15.14
|
|
1255
68
|
*
|
|
@@ -1259,17 +72,6 @@ var PropTypes = /*@__PURE__*/getDefaultExportFromCjs(propTypesExports);
|
|
|
1259
72
|
*/
|
|
1260
73
|
function styled$1(tag, options) {
|
|
1261
74
|
const stylesFactory = emStyled(tag, options);
|
|
1262
|
-
if (process.env.NODE_ENV !== 'production') {
|
|
1263
|
-
return (...styles) => {
|
|
1264
|
-
const component = typeof tag === 'string' ? `"${tag}"` : 'component';
|
|
1265
|
-
if (styles.length === 0) {
|
|
1266
|
-
console.error([`MUI: Seems like you called \`styled(${component})()\` without a \`style\` argument.`, 'You must provide a `styles` argument: `styled("div")(styleYouForgotToPass)`.'].join('\n'));
|
|
1267
|
-
} else if (styles.some(style => style === undefined)) {
|
|
1268
|
-
console.error(`MUI: the styled(${component})(...args) API requires all its args to be defined.`);
|
|
1269
|
-
}
|
|
1270
|
-
return stylesFactory(...styles);
|
|
1271
|
-
};
|
|
1272
|
-
}
|
|
1273
75
|
return stylesFactory;
|
|
1274
76
|
}
|
|
1275
77
|
|
|
@@ -1433,8 +235,6 @@ const shape = {
|
|
|
1433
235
|
borderRadius: 4
|
|
1434
236
|
};
|
|
1435
237
|
|
|
1436
|
-
const responsivePropType = process.env.NODE_ENV !== 'production' ? PropTypes.oneOfType([PropTypes.number, PropTypes.string, PropTypes.object, PropTypes.array]) : {};
|
|
1437
|
-
|
|
1438
238
|
function merge(acc, item) {
|
|
1439
239
|
if (!item) {
|
|
1440
240
|
return acc;
|
|
@@ -1570,7 +370,7 @@ function resolveBreakpointValues({
|
|
|
1570
370
|
// We only handle the first word.
|
|
1571
371
|
function capitalize(string) {
|
|
1572
372
|
if (typeof string !== 'string') {
|
|
1573
|
-
throw new Error(
|
|
373
|
+
throw new Error(formatMuiErrorMessage(7));
|
|
1574
374
|
}
|
|
1575
375
|
return string.charAt(0).toUpperCase() + string.slice(1);
|
|
1576
376
|
}
|
|
@@ -1640,9 +440,7 @@ function style$2(options) {
|
|
|
1640
440
|
};
|
|
1641
441
|
return handleBreakpoints(props, propValue, styleFromPropValue);
|
|
1642
442
|
};
|
|
1643
|
-
fn.propTypes =
|
|
1644
|
-
[prop]: responsivePropType
|
|
1645
|
-
} : {};
|
|
443
|
+
fn.propTypes = {};
|
|
1646
444
|
fn.filterProps = [prop];
|
|
1647
445
|
return fn;
|
|
1648
446
|
}
|
|
@@ -1695,7 +493,7 @@ const getCssProperties = memoize(prop => {
|
|
|
1695
493
|
});
|
|
1696
494
|
const marginKeys = ['m', 'mt', 'mr', 'mb', 'ml', 'mx', 'my', 'margin', 'marginTop', 'marginRight', 'marginBottom', 'marginLeft', 'marginX', 'marginY', 'marginInline', 'marginInlineStart', 'marginInlineEnd', 'marginBlock', 'marginBlockStart', 'marginBlockEnd'];
|
|
1697
495
|
const paddingKeys = ['p', 'pt', 'pr', 'pb', 'pl', 'px', 'py', 'padding', 'paddingTop', 'paddingRight', 'paddingBottom', 'paddingLeft', 'paddingX', 'paddingY', 'paddingInline', 'paddingInlineStart', 'paddingInlineEnd', 'paddingBlock', 'paddingBlockStart', 'paddingBlockEnd'];
|
|
1698
|
-
|
|
496
|
+
[...marginKeys, ...paddingKeys];
|
|
1699
497
|
function createUnaryUnit(theme, themeKey, defaultValue, propName) {
|
|
1700
498
|
var _getPath;
|
|
1701
499
|
const themeSpacing = (_getPath = getPath(theme, themeKey, false)) != null ? _getPath : defaultValue;
|
|
@@ -1704,11 +502,6 @@ function createUnaryUnit(theme, themeKey, defaultValue, propName) {
|
|
|
1704
502
|
if (typeof abs === 'string') {
|
|
1705
503
|
return abs;
|
|
1706
504
|
}
|
|
1707
|
-
if (process.env.NODE_ENV !== 'production') {
|
|
1708
|
-
if (typeof abs !== 'number') {
|
|
1709
|
-
console.error(`MUI: Expected ${propName} argument to be a number or a string, got ${abs}.`);
|
|
1710
|
-
}
|
|
1711
|
-
}
|
|
1712
505
|
return themeSpacing * abs;
|
|
1713
506
|
};
|
|
1714
507
|
}
|
|
@@ -1717,26 +510,16 @@ function createUnaryUnit(theme, themeKey, defaultValue, propName) {
|
|
|
1717
510
|
if (typeof abs === 'string') {
|
|
1718
511
|
return abs;
|
|
1719
512
|
}
|
|
1720
|
-
if (process.env.NODE_ENV !== 'production') {
|
|
1721
|
-
if (!Number.isInteger(abs)) {
|
|
1722
|
-
console.error([`MUI: The \`theme.${themeKey}\` array type cannot be combined with non integer values.` + `You should either use an integer value that can be used as index, or define the \`theme.${themeKey}\` as a number.`].join('\n'));
|
|
1723
|
-
} else if (abs > themeSpacing.length - 1) {
|
|
1724
|
-
console.error([`MUI: The value provided (${abs}) overflows.`, `The supported values are: ${JSON.stringify(themeSpacing)}.`, `${abs} > ${themeSpacing.length - 1}, you need to add the missing values.`].join('\n'));
|
|
1725
|
-
}
|
|
1726
|
-
}
|
|
1727
513
|
return themeSpacing[abs];
|
|
1728
514
|
};
|
|
1729
515
|
}
|
|
1730
516
|
if (typeof themeSpacing === 'function') {
|
|
1731
517
|
return themeSpacing;
|
|
1732
518
|
}
|
|
1733
|
-
if (process.env.NODE_ENV !== 'production') {
|
|
1734
|
-
console.error([`MUI: The \`theme.${themeKey}\` value (${themeSpacing}) is invalid.`, 'It should be a number, an array or a function.'].join('\n'));
|
|
1735
|
-
}
|
|
1736
519
|
return () => undefined;
|
|
1737
520
|
}
|
|
1738
521
|
function createUnarySpacing(theme) {
|
|
1739
|
-
return createUnaryUnit(theme, 'spacing', 8
|
|
522
|
+
return createUnaryUnit(theme, 'spacing', 8);
|
|
1740
523
|
}
|
|
1741
524
|
function getValue(transformer, propValue) {
|
|
1742
525
|
if (typeof propValue === 'string' || propValue == null) {
|
|
@@ -1776,23 +559,13 @@ function style$1(props, keys) {
|
|
|
1776
559
|
function margin(props) {
|
|
1777
560
|
return style$1(props, marginKeys);
|
|
1778
561
|
}
|
|
1779
|
-
margin.propTypes =
|
|
1780
|
-
obj[key] = responsivePropType;
|
|
1781
|
-
return obj;
|
|
1782
|
-
}, {}) : {};
|
|
562
|
+
margin.propTypes = {};
|
|
1783
563
|
margin.filterProps = marginKeys;
|
|
1784
564
|
function padding(props) {
|
|
1785
565
|
return style$1(props, paddingKeys);
|
|
1786
566
|
}
|
|
1787
|
-
padding.propTypes =
|
|
1788
|
-
obj[key] = responsivePropType;
|
|
1789
|
-
return obj;
|
|
1790
|
-
}, {}) : {};
|
|
567
|
+
padding.propTypes = {};
|
|
1791
568
|
padding.filterProps = paddingKeys;
|
|
1792
|
-
process.env.NODE_ENV !== 'production' ? spacingKeys.reduce((obj, key) => {
|
|
1793
|
-
obj[key] = responsivePropType;
|
|
1794
|
-
return obj;
|
|
1795
|
-
}, {}) : {};
|
|
1796
569
|
|
|
1797
570
|
// The different signatures imply different meaning for their arguments that can't be expressed structurally.
|
|
1798
571
|
// We express the difference with variable names.
|
|
@@ -1810,11 +583,6 @@ function createSpacing(spacingInput = 8) {
|
|
|
1810
583
|
spacing: spacingInput
|
|
1811
584
|
});
|
|
1812
585
|
const spacing = (...argsInput) => {
|
|
1813
|
-
if (process.env.NODE_ENV !== 'production') {
|
|
1814
|
-
if (!(argsInput.length <= 4)) {
|
|
1815
|
-
console.error(`MUI: Too many arguments provided, expected between 0 and 4, got ${argsInput.length}`);
|
|
1816
|
-
}
|
|
1817
|
-
}
|
|
1818
586
|
const args = argsInput.length === 0 ? [1] : argsInput;
|
|
1819
587
|
return args.map(argument => {
|
|
1820
588
|
const output = transform(argument);
|
|
@@ -1843,7 +611,7 @@ function compose(...styles) {
|
|
|
1843
611
|
return acc;
|
|
1844
612
|
}, {});
|
|
1845
613
|
};
|
|
1846
|
-
fn.propTypes =
|
|
614
|
+
fn.propTypes = {};
|
|
1847
615
|
fn.filterProps = styles.reduce((acc, style) => acc.concat(style.filterProps), []);
|
|
1848
616
|
return fn;
|
|
1849
617
|
}
|
|
@@ -1878,7 +646,7 @@ const outlineColor = createBorderStyle('outlineColor');
|
|
|
1878
646
|
// eslint-disable-next-line react/function-component-definition
|
|
1879
647
|
const borderRadius = props => {
|
|
1880
648
|
if (props.borderRadius !== undefined && props.borderRadius !== null) {
|
|
1881
|
-
const transformer = createUnaryUnit(props.theme, 'shape.borderRadius', 4
|
|
649
|
+
const transformer = createUnaryUnit(props.theme, 'shape.borderRadius', 4);
|
|
1882
650
|
const styleFromPropValue = propValue => ({
|
|
1883
651
|
borderRadius: getValue(transformer, propValue)
|
|
1884
652
|
});
|
|
@@ -1886,9 +654,7 @@ const borderRadius = props => {
|
|
|
1886
654
|
}
|
|
1887
655
|
return null;
|
|
1888
656
|
};
|
|
1889
|
-
borderRadius.propTypes =
|
|
1890
|
-
borderRadius: responsivePropType
|
|
1891
|
-
} : {};
|
|
657
|
+
borderRadius.propTypes = {};
|
|
1892
658
|
borderRadius.filterProps = ['borderRadius'];
|
|
1893
659
|
compose(border, borderTop, borderRight, borderBottom, borderLeft, borderColor, borderTopColor, borderRightColor, borderBottomColor, borderLeftColor, borderRadius, outline, outlineColor);
|
|
1894
660
|
|
|
@@ -1896,7 +662,7 @@ compose(border, borderTop, borderRight, borderBottom, borderLeft, borderColor, b
|
|
|
1896
662
|
// eslint-disable-next-line react/function-component-definition
|
|
1897
663
|
const gap = props => {
|
|
1898
664
|
if (props.gap !== undefined && props.gap !== null) {
|
|
1899
|
-
const transformer = createUnaryUnit(props.theme, 'spacing', 8
|
|
665
|
+
const transformer = createUnaryUnit(props.theme, 'spacing', 8);
|
|
1900
666
|
const styleFromPropValue = propValue => ({
|
|
1901
667
|
gap: getValue(transformer, propValue)
|
|
1902
668
|
});
|
|
@@ -1904,16 +670,14 @@ const gap = props => {
|
|
|
1904
670
|
}
|
|
1905
671
|
return null;
|
|
1906
672
|
};
|
|
1907
|
-
gap.propTypes =
|
|
1908
|
-
gap: responsivePropType
|
|
1909
|
-
} : {};
|
|
673
|
+
gap.propTypes = {};
|
|
1910
674
|
gap.filterProps = ['gap'];
|
|
1911
675
|
|
|
1912
676
|
// false positive
|
|
1913
677
|
// eslint-disable-next-line react/function-component-definition
|
|
1914
678
|
const columnGap = props => {
|
|
1915
679
|
if (props.columnGap !== undefined && props.columnGap !== null) {
|
|
1916
|
-
const transformer = createUnaryUnit(props.theme, 'spacing', 8
|
|
680
|
+
const transformer = createUnaryUnit(props.theme, 'spacing', 8);
|
|
1917
681
|
const styleFromPropValue = propValue => ({
|
|
1918
682
|
columnGap: getValue(transformer, propValue)
|
|
1919
683
|
});
|
|
@@ -1921,16 +685,14 @@ const columnGap = props => {
|
|
|
1921
685
|
}
|
|
1922
686
|
return null;
|
|
1923
687
|
};
|
|
1924
|
-
columnGap.propTypes =
|
|
1925
|
-
columnGap: responsivePropType
|
|
1926
|
-
} : {};
|
|
688
|
+
columnGap.propTypes = {};
|
|
1927
689
|
columnGap.filterProps = ['columnGap'];
|
|
1928
690
|
|
|
1929
691
|
// false positive
|
|
1930
692
|
// eslint-disable-next-line react/function-component-definition
|
|
1931
693
|
const rowGap = props => {
|
|
1932
694
|
if (props.rowGap !== undefined && props.rowGap !== null) {
|
|
1933
|
-
const transformer = createUnaryUnit(props.theme, 'spacing', 8
|
|
695
|
+
const transformer = createUnaryUnit(props.theme, 'spacing', 8);
|
|
1934
696
|
const styleFromPropValue = propValue => ({
|
|
1935
697
|
rowGap: getValue(transformer, propValue)
|
|
1936
698
|
});
|
|
@@ -1938,9 +700,7 @@ const rowGap = props => {
|
|
|
1938
700
|
}
|
|
1939
701
|
return null;
|
|
1940
702
|
};
|
|
1941
|
-
rowGap.propTypes =
|
|
1942
|
-
rowGap: responsivePropType
|
|
1943
|
-
} : {};
|
|
703
|
+
rowGap.propTypes = {};
|
|
1944
704
|
rowGap.filterProps = ['rowGap'];
|
|
1945
705
|
const gridColumn = style$2({
|
|
1946
706
|
prop: 'gridColumn'
|
|
@@ -2670,316 +1430,6 @@ function generateUtilityClass(componentName, slot, globalStatePrefix = 'Mui') {
|
|
|
2670
1430
|
return globalStateClass ? `${globalStatePrefix}-${globalStateClass}` : `${ClassNameGenerator.generate(componentName)}-${slot}`;
|
|
2671
1431
|
}
|
|
2672
1432
|
|
|
2673
|
-
var reactIs = {exports: {}};
|
|
2674
|
-
|
|
2675
|
-
var reactIs_production_min = {};
|
|
2676
|
-
|
|
2677
|
-
/**
|
|
2678
|
-
* @license React
|
|
2679
|
-
* react-is.production.min.js
|
|
2680
|
-
*
|
|
2681
|
-
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
2682
|
-
*
|
|
2683
|
-
* This source code is licensed under the MIT license found in the
|
|
2684
|
-
* LICENSE file in the root directory of this source tree.
|
|
2685
|
-
*/
|
|
2686
|
-
|
|
2687
|
-
var hasRequiredReactIs_production_min;
|
|
2688
|
-
|
|
2689
|
-
function requireReactIs_production_min () {
|
|
2690
|
-
if (hasRequiredReactIs_production_min) return reactIs_production_min;
|
|
2691
|
-
hasRequiredReactIs_production_min = 1;
|
|
2692
|
-
var b=Symbol.for("react.element"),c=Symbol.for("react.portal"),d=Symbol.for("react.fragment"),e=Symbol.for("react.strict_mode"),f=Symbol.for("react.profiler"),g=Symbol.for("react.provider"),h=Symbol.for("react.context"),k=Symbol.for("react.server_context"),l=Symbol.for("react.forward_ref"),m=Symbol.for("react.suspense"),n=Symbol.for("react.suspense_list"),p=Symbol.for("react.memo"),q=Symbol.for("react.lazy"),t=Symbol.for("react.offscreen"),u;u=Symbol.for("react.module.reference");
|
|
2693
|
-
function v(a){if("object"===typeof a&&null!==a){var r=a.$$typeof;switch(r){case b:switch(a=a.type,a){case d:case f:case e:case m:case n:return a;default:switch(a=a&&a.$$typeof,a){case k:case h:case l:case q:case p:case g:return a;default:return r}}case c:return r}}}reactIs_production_min.ContextConsumer=h;reactIs_production_min.ContextProvider=g;reactIs_production_min.Element=b;reactIs_production_min.ForwardRef=l;reactIs_production_min.Fragment=d;reactIs_production_min.Lazy=q;reactIs_production_min.Memo=p;reactIs_production_min.Portal=c;reactIs_production_min.Profiler=f;reactIs_production_min.StrictMode=e;reactIs_production_min.Suspense=m;
|
|
2694
|
-
reactIs_production_min.SuspenseList=n;reactIs_production_min.isAsyncMode=function(){return !1};reactIs_production_min.isConcurrentMode=function(){return !1};reactIs_production_min.isContextConsumer=function(a){return v(a)===h};reactIs_production_min.isContextProvider=function(a){return v(a)===g};reactIs_production_min.isElement=function(a){return "object"===typeof a&&null!==a&&a.$$typeof===b};reactIs_production_min.isForwardRef=function(a){return v(a)===l};reactIs_production_min.isFragment=function(a){return v(a)===d};reactIs_production_min.isLazy=function(a){return v(a)===q};reactIs_production_min.isMemo=function(a){return v(a)===p};
|
|
2695
|
-
reactIs_production_min.isPortal=function(a){return v(a)===c};reactIs_production_min.isProfiler=function(a){return v(a)===f};reactIs_production_min.isStrictMode=function(a){return v(a)===e};reactIs_production_min.isSuspense=function(a){return v(a)===m};reactIs_production_min.isSuspenseList=function(a){return v(a)===n};
|
|
2696
|
-
reactIs_production_min.isValidElementType=function(a){return "string"===typeof a||"function"===typeof a||a===d||a===f||a===e||a===m||a===n||a===t||"object"===typeof a&&null!==a&&(a.$$typeof===q||a.$$typeof===p||a.$$typeof===g||a.$$typeof===h||a.$$typeof===l||a.$$typeof===u||void 0!==a.getModuleId)?!0:!1};reactIs_production_min.typeOf=v;
|
|
2697
|
-
return reactIs_production_min;
|
|
2698
|
-
}
|
|
2699
|
-
|
|
2700
|
-
var reactIs_development = {};
|
|
2701
|
-
|
|
2702
|
-
/**
|
|
2703
|
-
* @license React
|
|
2704
|
-
* react-is.development.js
|
|
2705
|
-
*
|
|
2706
|
-
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
2707
|
-
*
|
|
2708
|
-
* This source code is licensed under the MIT license found in the
|
|
2709
|
-
* LICENSE file in the root directory of this source tree.
|
|
2710
|
-
*/
|
|
2711
|
-
|
|
2712
|
-
var hasRequiredReactIs_development;
|
|
2713
|
-
|
|
2714
|
-
function requireReactIs_development () {
|
|
2715
|
-
if (hasRequiredReactIs_development) return reactIs_development;
|
|
2716
|
-
hasRequiredReactIs_development = 1;
|
|
2717
|
-
|
|
2718
|
-
if (process.env.NODE_ENV !== "production") {
|
|
2719
|
-
(function() {
|
|
2720
|
-
|
|
2721
|
-
// ATTENTION
|
|
2722
|
-
// When adding new symbols to this file,
|
|
2723
|
-
// Please consider also adding to 'react-devtools-shared/src/backend/ReactSymbols'
|
|
2724
|
-
// The Symbol used to tag the ReactElement-like types.
|
|
2725
|
-
var REACT_ELEMENT_TYPE = Symbol.for('react.element');
|
|
2726
|
-
var REACT_PORTAL_TYPE = Symbol.for('react.portal');
|
|
2727
|
-
var REACT_FRAGMENT_TYPE = Symbol.for('react.fragment');
|
|
2728
|
-
var REACT_STRICT_MODE_TYPE = Symbol.for('react.strict_mode');
|
|
2729
|
-
var REACT_PROFILER_TYPE = Symbol.for('react.profiler');
|
|
2730
|
-
var REACT_PROVIDER_TYPE = Symbol.for('react.provider');
|
|
2731
|
-
var REACT_CONTEXT_TYPE = Symbol.for('react.context');
|
|
2732
|
-
var REACT_SERVER_CONTEXT_TYPE = Symbol.for('react.server_context');
|
|
2733
|
-
var REACT_FORWARD_REF_TYPE = Symbol.for('react.forward_ref');
|
|
2734
|
-
var REACT_SUSPENSE_TYPE = Symbol.for('react.suspense');
|
|
2735
|
-
var REACT_SUSPENSE_LIST_TYPE = Symbol.for('react.suspense_list');
|
|
2736
|
-
var REACT_MEMO_TYPE = Symbol.for('react.memo');
|
|
2737
|
-
var REACT_LAZY_TYPE = Symbol.for('react.lazy');
|
|
2738
|
-
var REACT_OFFSCREEN_TYPE = Symbol.for('react.offscreen');
|
|
2739
|
-
|
|
2740
|
-
// -----------------------------------------------------------------------------
|
|
2741
|
-
|
|
2742
|
-
var enableScopeAPI = false; // Experimental Create Event Handle API.
|
|
2743
|
-
var enableCacheElement = false;
|
|
2744
|
-
var enableTransitionTracing = false; // No known bugs, but needs performance testing
|
|
2745
|
-
|
|
2746
|
-
var enableLegacyHidden = false; // Enables unstable_avoidThisFallback feature in Fiber
|
|
2747
|
-
// stuff. Intended to enable React core members to more easily debug scheduling
|
|
2748
|
-
// issues in DEV builds.
|
|
2749
|
-
|
|
2750
|
-
var enableDebugTracing = false; // Track which Fiber(s) schedule render work.
|
|
2751
|
-
|
|
2752
|
-
var REACT_MODULE_REFERENCE;
|
|
2753
|
-
|
|
2754
|
-
{
|
|
2755
|
-
REACT_MODULE_REFERENCE = Symbol.for('react.module.reference');
|
|
2756
|
-
}
|
|
2757
|
-
|
|
2758
|
-
function isValidElementType(type) {
|
|
2759
|
-
if (typeof type === 'string' || typeof type === 'function') {
|
|
2760
|
-
return true;
|
|
2761
|
-
} // Note: typeof might be other than 'symbol' or 'number' (e.g. if it's a polyfill).
|
|
2762
|
-
|
|
2763
|
-
|
|
2764
|
-
if (type === REACT_FRAGMENT_TYPE || type === REACT_PROFILER_TYPE || enableDebugTracing || type === REACT_STRICT_MODE_TYPE || type === REACT_SUSPENSE_TYPE || type === REACT_SUSPENSE_LIST_TYPE || enableLegacyHidden || type === REACT_OFFSCREEN_TYPE || enableScopeAPI || enableCacheElement || enableTransitionTracing ) {
|
|
2765
|
-
return true;
|
|
2766
|
-
}
|
|
2767
|
-
|
|
2768
|
-
if (typeof type === 'object' && type !== null) {
|
|
2769
|
-
if (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 || // This needs to include all possible module reference object
|
|
2770
|
-
// types supported by any Flight configuration anywhere since
|
|
2771
|
-
// we don't know which Flight build this will end up being used
|
|
2772
|
-
// with.
|
|
2773
|
-
type.$$typeof === REACT_MODULE_REFERENCE || type.getModuleId !== undefined) {
|
|
2774
|
-
return true;
|
|
2775
|
-
}
|
|
2776
|
-
}
|
|
2777
|
-
|
|
2778
|
-
return false;
|
|
2779
|
-
}
|
|
2780
|
-
|
|
2781
|
-
function typeOf(object) {
|
|
2782
|
-
if (typeof object === 'object' && object !== null) {
|
|
2783
|
-
var $$typeof = object.$$typeof;
|
|
2784
|
-
|
|
2785
|
-
switch ($$typeof) {
|
|
2786
|
-
case REACT_ELEMENT_TYPE:
|
|
2787
|
-
var type = object.type;
|
|
2788
|
-
|
|
2789
|
-
switch (type) {
|
|
2790
|
-
case REACT_FRAGMENT_TYPE:
|
|
2791
|
-
case REACT_PROFILER_TYPE:
|
|
2792
|
-
case REACT_STRICT_MODE_TYPE:
|
|
2793
|
-
case REACT_SUSPENSE_TYPE:
|
|
2794
|
-
case REACT_SUSPENSE_LIST_TYPE:
|
|
2795
|
-
return type;
|
|
2796
|
-
|
|
2797
|
-
default:
|
|
2798
|
-
var $$typeofType = type && type.$$typeof;
|
|
2799
|
-
|
|
2800
|
-
switch ($$typeofType) {
|
|
2801
|
-
case REACT_SERVER_CONTEXT_TYPE:
|
|
2802
|
-
case REACT_CONTEXT_TYPE:
|
|
2803
|
-
case REACT_FORWARD_REF_TYPE:
|
|
2804
|
-
case REACT_LAZY_TYPE:
|
|
2805
|
-
case REACT_MEMO_TYPE:
|
|
2806
|
-
case REACT_PROVIDER_TYPE:
|
|
2807
|
-
return $$typeofType;
|
|
2808
|
-
|
|
2809
|
-
default:
|
|
2810
|
-
return $$typeof;
|
|
2811
|
-
}
|
|
2812
|
-
|
|
2813
|
-
}
|
|
2814
|
-
|
|
2815
|
-
case REACT_PORTAL_TYPE:
|
|
2816
|
-
return $$typeof;
|
|
2817
|
-
}
|
|
2818
|
-
}
|
|
2819
|
-
|
|
2820
|
-
return undefined;
|
|
2821
|
-
}
|
|
2822
|
-
var ContextConsumer = REACT_CONTEXT_TYPE;
|
|
2823
|
-
var ContextProvider = REACT_PROVIDER_TYPE;
|
|
2824
|
-
var Element = REACT_ELEMENT_TYPE;
|
|
2825
|
-
var ForwardRef = REACT_FORWARD_REF_TYPE;
|
|
2826
|
-
var Fragment = REACT_FRAGMENT_TYPE;
|
|
2827
|
-
var Lazy = REACT_LAZY_TYPE;
|
|
2828
|
-
var Memo = REACT_MEMO_TYPE;
|
|
2829
|
-
var Portal = REACT_PORTAL_TYPE;
|
|
2830
|
-
var Profiler = REACT_PROFILER_TYPE;
|
|
2831
|
-
var StrictMode = REACT_STRICT_MODE_TYPE;
|
|
2832
|
-
var Suspense = REACT_SUSPENSE_TYPE;
|
|
2833
|
-
var SuspenseList = REACT_SUSPENSE_LIST_TYPE;
|
|
2834
|
-
var hasWarnedAboutDeprecatedIsAsyncMode = false;
|
|
2835
|
-
var hasWarnedAboutDeprecatedIsConcurrentMode = false; // AsyncMode should be deprecated
|
|
2836
|
-
|
|
2837
|
-
function isAsyncMode(object) {
|
|
2838
|
-
{
|
|
2839
|
-
if (!hasWarnedAboutDeprecatedIsAsyncMode) {
|
|
2840
|
-
hasWarnedAboutDeprecatedIsAsyncMode = true; // Using console['warn'] to evade Babel and ESLint
|
|
2841
|
-
|
|
2842
|
-
console['warn']('The ReactIs.isAsyncMode() alias has been deprecated, ' + 'and will be removed in React 18+.');
|
|
2843
|
-
}
|
|
2844
|
-
}
|
|
2845
|
-
|
|
2846
|
-
return false;
|
|
2847
|
-
}
|
|
2848
|
-
function isConcurrentMode(object) {
|
|
2849
|
-
{
|
|
2850
|
-
if (!hasWarnedAboutDeprecatedIsConcurrentMode) {
|
|
2851
|
-
hasWarnedAboutDeprecatedIsConcurrentMode = true; // Using console['warn'] to evade Babel and ESLint
|
|
2852
|
-
|
|
2853
|
-
console['warn']('The ReactIs.isConcurrentMode() alias has been deprecated, ' + 'and will be removed in React 18+.');
|
|
2854
|
-
}
|
|
2855
|
-
}
|
|
2856
|
-
|
|
2857
|
-
return false;
|
|
2858
|
-
}
|
|
2859
|
-
function isContextConsumer(object) {
|
|
2860
|
-
return typeOf(object) === REACT_CONTEXT_TYPE;
|
|
2861
|
-
}
|
|
2862
|
-
function isContextProvider(object) {
|
|
2863
|
-
return typeOf(object) === REACT_PROVIDER_TYPE;
|
|
2864
|
-
}
|
|
2865
|
-
function isElement(object) {
|
|
2866
|
-
return typeof object === 'object' && object !== null && object.$$typeof === REACT_ELEMENT_TYPE;
|
|
2867
|
-
}
|
|
2868
|
-
function isForwardRef(object) {
|
|
2869
|
-
return typeOf(object) === REACT_FORWARD_REF_TYPE;
|
|
2870
|
-
}
|
|
2871
|
-
function isFragment(object) {
|
|
2872
|
-
return typeOf(object) === REACT_FRAGMENT_TYPE;
|
|
2873
|
-
}
|
|
2874
|
-
function isLazy(object) {
|
|
2875
|
-
return typeOf(object) === REACT_LAZY_TYPE;
|
|
2876
|
-
}
|
|
2877
|
-
function isMemo(object) {
|
|
2878
|
-
return typeOf(object) === REACT_MEMO_TYPE;
|
|
2879
|
-
}
|
|
2880
|
-
function isPortal(object) {
|
|
2881
|
-
return typeOf(object) === REACT_PORTAL_TYPE;
|
|
2882
|
-
}
|
|
2883
|
-
function isProfiler(object) {
|
|
2884
|
-
return typeOf(object) === REACT_PROFILER_TYPE;
|
|
2885
|
-
}
|
|
2886
|
-
function isStrictMode(object) {
|
|
2887
|
-
return typeOf(object) === REACT_STRICT_MODE_TYPE;
|
|
2888
|
-
}
|
|
2889
|
-
function isSuspense(object) {
|
|
2890
|
-
return typeOf(object) === REACT_SUSPENSE_TYPE;
|
|
2891
|
-
}
|
|
2892
|
-
function isSuspenseList(object) {
|
|
2893
|
-
return typeOf(object) === REACT_SUSPENSE_LIST_TYPE;
|
|
2894
|
-
}
|
|
2895
|
-
|
|
2896
|
-
reactIs_development.ContextConsumer = ContextConsumer;
|
|
2897
|
-
reactIs_development.ContextProvider = ContextProvider;
|
|
2898
|
-
reactIs_development.Element = Element;
|
|
2899
|
-
reactIs_development.ForwardRef = ForwardRef;
|
|
2900
|
-
reactIs_development.Fragment = Fragment;
|
|
2901
|
-
reactIs_development.Lazy = Lazy;
|
|
2902
|
-
reactIs_development.Memo = Memo;
|
|
2903
|
-
reactIs_development.Portal = Portal;
|
|
2904
|
-
reactIs_development.Profiler = Profiler;
|
|
2905
|
-
reactIs_development.StrictMode = StrictMode;
|
|
2906
|
-
reactIs_development.Suspense = Suspense;
|
|
2907
|
-
reactIs_development.SuspenseList = SuspenseList;
|
|
2908
|
-
reactIs_development.isAsyncMode = isAsyncMode;
|
|
2909
|
-
reactIs_development.isConcurrentMode = isConcurrentMode;
|
|
2910
|
-
reactIs_development.isContextConsumer = isContextConsumer;
|
|
2911
|
-
reactIs_development.isContextProvider = isContextProvider;
|
|
2912
|
-
reactIs_development.isElement = isElement;
|
|
2913
|
-
reactIs_development.isForwardRef = isForwardRef;
|
|
2914
|
-
reactIs_development.isFragment = isFragment;
|
|
2915
|
-
reactIs_development.isLazy = isLazy;
|
|
2916
|
-
reactIs_development.isMemo = isMemo;
|
|
2917
|
-
reactIs_development.isPortal = isPortal;
|
|
2918
|
-
reactIs_development.isProfiler = isProfiler;
|
|
2919
|
-
reactIs_development.isStrictMode = isStrictMode;
|
|
2920
|
-
reactIs_development.isSuspense = isSuspense;
|
|
2921
|
-
reactIs_development.isSuspenseList = isSuspenseList;
|
|
2922
|
-
reactIs_development.isValidElementType = isValidElementType;
|
|
2923
|
-
reactIs_development.typeOf = typeOf;
|
|
2924
|
-
})();
|
|
2925
|
-
}
|
|
2926
|
-
return reactIs_development;
|
|
2927
|
-
}
|
|
2928
|
-
|
|
2929
|
-
if (process.env.NODE_ENV === 'production') {
|
|
2930
|
-
reactIs.exports = requireReactIs_production_min();
|
|
2931
|
-
} else {
|
|
2932
|
-
reactIs.exports = requireReactIs_development();
|
|
2933
|
-
}
|
|
2934
|
-
|
|
2935
|
-
var reactIsExports = reactIs.exports;
|
|
2936
|
-
|
|
2937
|
-
// Simplified polyfill for IE11 support
|
|
2938
|
-
// https://github.com/JamesMGreene/Function.name/blob/58b314d4a983110c3682f1228f845d39ccca1817/Function.name.js#L3
|
|
2939
|
-
const fnNameMatchRegex = /^\s*function(?:\s|\s*\/\*.*\*\/\s*)+([^(\s/]*)\s*/;
|
|
2940
|
-
function getFunctionName(fn) {
|
|
2941
|
-
const match = `${fn}`.match(fnNameMatchRegex);
|
|
2942
|
-
const name = match && match[1];
|
|
2943
|
-
return name || '';
|
|
2944
|
-
}
|
|
2945
|
-
function getFunctionComponentName(Component, fallback = '') {
|
|
2946
|
-
return Component.displayName || Component.name || getFunctionName(Component) || fallback;
|
|
2947
|
-
}
|
|
2948
|
-
function getWrappedName(outerType, innerType, wrapperName) {
|
|
2949
|
-
const functionName = getFunctionComponentName(innerType);
|
|
2950
|
-
return outerType.displayName || (functionName !== '' ? `${wrapperName}(${functionName})` : wrapperName);
|
|
2951
|
-
}
|
|
2952
|
-
|
|
2953
|
-
/**
|
|
2954
|
-
* cherry-pick from
|
|
2955
|
-
* https://github.com/facebook/react/blob/769b1f270e1251d9dbdce0fcbd9e92e502d059b8/packages/shared/getComponentName.js
|
|
2956
|
-
* originally forked from recompose/getDisplayName with added IE11 support
|
|
2957
|
-
*/
|
|
2958
|
-
function getDisplayName(Component) {
|
|
2959
|
-
if (Component == null) {
|
|
2960
|
-
return undefined;
|
|
2961
|
-
}
|
|
2962
|
-
if (typeof Component === 'string') {
|
|
2963
|
-
return Component;
|
|
2964
|
-
}
|
|
2965
|
-
if (typeof Component === 'function') {
|
|
2966
|
-
return getFunctionComponentName(Component, 'Component');
|
|
2967
|
-
}
|
|
2968
|
-
|
|
2969
|
-
// TypeScript can't have components as objects but they exist in the form of `memo` or `Suspense`
|
|
2970
|
-
if (typeof Component === 'object') {
|
|
2971
|
-
switch (Component.$$typeof) {
|
|
2972
|
-
case reactIsExports.ForwardRef:
|
|
2973
|
-
return getWrappedName(Component, Component.render, 'ForwardRef');
|
|
2974
|
-
case reactIsExports.Memo:
|
|
2975
|
-
return getWrappedName(Component, Component.type, 'memo');
|
|
2976
|
-
default:
|
|
2977
|
-
return undefined;
|
|
2978
|
-
}
|
|
2979
|
-
}
|
|
2980
|
-
return undefined;
|
|
2981
|
-
}
|
|
2982
|
-
|
|
2983
1433
|
const _excluded$1 = ["ownerState"],
|
|
2984
1434
|
_excluded2 = ["variants"],
|
|
2985
1435
|
_excluded3 = ["name", "slot", "skipVariantsResolver", "skipSx", "overridesResolver"];
|
|
@@ -3102,13 +1552,6 @@ function createStyled(input = {}) {
|
|
|
3102
1552
|
componentSlot && componentSlot !== 'Root' && componentSlot !== 'root' || false;
|
|
3103
1553
|
const skipSx = inputSkipSx || false;
|
|
3104
1554
|
let label;
|
|
3105
|
-
if (process.env.NODE_ENV !== 'production') {
|
|
3106
|
-
if (componentName) {
|
|
3107
|
-
// TODO v6: remove `lowercaseFirstLetter()` in the next major release
|
|
3108
|
-
// For more details: https://github.com/mui/material-ui/pull/37908
|
|
3109
|
-
label = `${componentName}-${lowercaseFirstLetter(componentSlot || 'Root')}`;
|
|
3110
|
-
}
|
|
3111
|
-
}
|
|
3112
1555
|
let shouldForwardPropOption = shouldForwardProp;
|
|
3113
1556
|
|
|
3114
1557
|
// TODO v6: remove `Root` in the next major release
|
|
@@ -3190,16 +1633,6 @@ function createStyled(input = {}) {
|
|
|
3190
1633
|
transformedStyleArg.raw = [...styleArg.raw, ...placeholders];
|
|
3191
1634
|
}
|
|
3192
1635
|
const Component = defaultStyledResolver(transformedStyleArg, ...expressionsWithDefaultTheme);
|
|
3193
|
-
if (process.env.NODE_ENV !== 'production') {
|
|
3194
|
-
let displayName;
|
|
3195
|
-
if (componentName) {
|
|
3196
|
-
displayName = `${componentName}${capitalize(componentSlot || '')}`;
|
|
3197
|
-
}
|
|
3198
|
-
if (displayName === undefined) {
|
|
3199
|
-
displayName = `Styled(${getDisplayName(tag)})`;
|
|
3200
|
-
}
|
|
3201
|
-
Component.displayName = displayName;
|
|
3202
|
-
}
|
|
3203
1636
|
if (tag.muiName) {
|
|
3204
1637
|
Component.muiName = tag.muiName;
|
|
3205
1638
|
}
|
|
@@ -3449,13 +1882,6 @@ function createStack(options = {}) {
|
|
|
3449
1882
|
children: divider ? joinChildren(children, divider) : children
|
|
3450
1883
|
}));
|
|
3451
1884
|
});
|
|
3452
|
-
process.env.NODE_ENV !== "production" ? Stack.propTypes /* remove-proptypes */ = {
|
|
3453
|
-
children: PropTypes.node,
|
|
3454
|
-
direction: PropTypes.oneOfType([PropTypes.oneOf(['column-reverse', 'column', 'row-reverse', 'row']), PropTypes.arrayOf(PropTypes.oneOf(['column-reverse', 'column', 'row-reverse', 'row'])), PropTypes.object]),
|
|
3455
|
-
divider: PropTypes.node,
|
|
3456
|
-
spacing: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.number, PropTypes.string])), PropTypes.number, PropTypes.object, PropTypes.string]),
|
|
3457
|
-
sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object])
|
|
3458
|
-
} : void 0;
|
|
3459
1885
|
return Stack;
|
|
3460
1886
|
}
|
|
3461
1887
|
|
|
@@ -3472,50 +1898,6 @@ function createStack(options = {}) {
|
|
|
3472
1898
|
* - [Stack API](https://mui.com/system/api/stack/)
|
|
3473
1899
|
*/
|
|
3474
1900
|
const Stack = createStack();
|
|
3475
|
-
process.env.NODE_ENV !== "production" ? Stack.propTypes /* remove-proptypes */ = {
|
|
3476
|
-
// ┌────────────────────────────── Warning ──────────────────────────────┐
|
|
3477
|
-
// │ These PropTypes are generated from the TypeScript type definitions. │
|
|
3478
|
-
// │ To update them, edit the TypeScript types and run `pnpm proptypes`. │
|
|
3479
|
-
// └─────────────────────────────────────────────────────────────────────┘
|
|
3480
|
-
/**
|
|
3481
|
-
* The content of the component.
|
|
3482
|
-
*/
|
|
3483
|
-
children: PropTypes.node,
|
|
3484
|
-
/**
|
|
3485
|
-
* The component used for the root node.
|
|
3486
|
-
* Either a string to use a HTML element or a component.
|
|
3487
|
-
*/
|
|
3488
|
-
component: PropTypes.elementType,
|
|
3489
|
-
/**
|
|
3490
|
-
* Defines the `flex-direction` style property.
|
|
3491
|
-
* It is applied for all screen sizes.
|
|
3492
|
-
* @default 'column'
|
|
3493
|
-
*/
|
|
3494
|
-
direction: PropTypes.oneOfType([PropTypes.oneOf(['column-reverse', 'column', 'row-reverse', 'row']), PropTypes.arrayOf(PropTypes.oneOf(['column-reverse', 'column', 'row-reverse', 'row'])), PropTypes.object]),
|
|
3495
|
-
/**
|
|
3496
|
-
* Add an element between each child.
|
|
3497
|
-
*/
|
|
3498
|
-
divider: PropTypes.node,
|
|
3499
|
-
/**
|
|
3500
|
-
* Defines the space between immediate children.
|
|
3501
|
-
* @default 0
|
|
3502
|
-
*/
|
|
3503
|
-
spacing: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.number, PropTypes.string])), PropTypes.number, PropTypes.object, PropTypes.string]),
|
|
3504
|
-
/**
|
|
3505
|
-
* The system prop, which allows defining system overrides as well as additional CSS styles.
|
|
3506
|
-
*/
|
|
3507
|
-
sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object]),
|
|
3508
|
-
/**
|
|
3509
|
-
* If `true`, the CSS flexbox `gap` is used instead of applying `margin` to children.
|
|
3510
|
-
*
|
|
3511
|
-
* While CSS `gap` removes the [known limitations](https://mui.com/joy-ui/react-stack/#limitations),
|
|
3512
|
-
* it is not fully supported in some browsers. We recommend checking https://caniuse.com/?search=flex%20gap before using this flag.
|
|
3513
|
-
*
|
|
3514
|
-
* To enable this flag globally, follow the theme's default props configuration.
|
|
3515
|
-
* @default false
|
|
3516
|
-
*/
|
|
3517
|
-
useFlexGap: PropTypes.bool
|
|
3518
|
-
} : void 0;
|
|
3519
1901
|
|
|
3520
1902
|
function ThumbnailListItemTitle(props) {
|
|
3521
1903
|
const StyledCardContent = styled$2('div')((p) => ({
|
|
@@ -3526,12 +1908,10 @@ function ThumbnailListItemTitle(props) {
|
|
|
3526
1908
|
overflow: 'hidden',
|
|
3527
1909
|
},
|
|
3528
1910
|
}));
|
|
3529
|
-
console.log('item title rerenders');
|
|
3530
1911
|
return (jsx(Fragment, { children: jsx(Box, { children: jsxs(StyledCardContent, { children: [jsx(EllipsisContainer, { lineClamp: { xs: 1, sm: 2 }, children: jsx(Typography, { variant: "subtitle2", sx: { fontWeight: 'bold' }, children: props.title }) }), jsx(Stack, { direction: "row", gap: 1, children: jsx(EllipsisContainer, { lineClamp: { xs: 1, sm: 2 }, children: jsx(Typography, { variant: "subtitle2", sx: { fontSize: '0.84rem' }, color: "text.secondary", children: props.subTitle }) }) })] }) }) }));
|
|
3531
1912
|
}
|
|
3532
1913
|
|
|
3533
1914
|
const ThumbnailListItem = (props) => {
|
|
3534
|
-
console.log('ThumbnailListItems renders');
|
|
3535
1915
|
return (jsx(Fragment, { children: jsx(Card, { sx: { display: 'flex' }, children: jsx(CardActionArea, { disabled: !props.onClick, onClick: () => props.onClick(props.id), children: jsxs(Stack$1, { direction: "row", width: "100%", children: [jsx("img", { src: props.thumbnailUrl, width: '45%' }), jsxs(Stack$1, { direction: "row", justifyContent: "space-between", width: "100%", gap: 1, children: [jsx(ThumbnailListItemTitle, { title: props.title, subTitle: props.subTitle }), props.infoLabel] })] }) }) }) }));
|
|
3536
1916
|
};
|
|
3537
1917
|
var ThumbnailListItem$1 = React__default.memo(ThumbnailListItem);
|
|
@@ -3551,7 +1931,6 @@ const RatioWrapper = styled$2('div')(() => ({
|
|
|
3551
1931
|
}));
|
|
3552
1932
|
function ThumbnailListMainContent(props) {
|
|
3553
1933
|
const { items, isLoading } = useThumbnailListItemContext();
|
|
3554
|
-
console.log('main content rerenders');
|
|
3555
1934
|
const memoizedItems = useMemo(() => {
|
|
3556
1935
|
return items.map((item) => (jsx(Grid, { item: true, xs: props.muiBreakpoints.xs, sm: props.muiBreakpoints.sm, md: props.muiBreakpoints.md, lg: props.muiBreakpoints.lg, xl: props.muiBreakpoints.xl, children: jsx(RatioWrapper, { children: jsx(ThumbnailListItem$1, { id: item.id, thumbnailUrl: item.thumbnailUrl, title: item.title, subTitle: item.subTitle, infoLabel: item.label, onClick: item.onClick }) }) }, item.id)));
|
|
3557
1936
|
}, [items, props.muiBreakpoints]);
|
|
@@ -3596,8 +1975,6 @@ function filterByTag(array, tagType, condition) {
|
|
|
3596
1975
|
const tagValue = item[tagType];
|
|
3597
1976
|
return condition ? condition(tagValue) : !!tagValue;
|
|
3598
1977
|
});
|
|
3599
|
-
console.log('filter array');
|
|
3600
|
-
console.log(filteredArray);
|
|
3601
1978
|
return [...filteredArray];
|
|
3602
1979
|
}
|
|
3603
1980
|
|
|
@@ -20862,7 +19239,6 @@ const ThumbnailListSearchField = () => {
|
|
|
20862
19239
|
const [input, setInput] = useState('');
|
|
20863
19240
|
const [showClearIcon, setShowClearIcon] = useState('hidden');
|
|
20864
19241
|
const { setSearchTerm } = useThumbnailListItemContext();
|
|
20865
|
-
console.log('Searchfield rerenders');
|
|
20866
19242
|
const handleChange = (value) => {
|
|
20867
19243
|
setInput(value);
|
|
20868
19244
|
setShowClearIcon(value === '' ? 'hidden' : '');
|
|
@@ -20896,7 +19272,6 @@ function ThumbnailListFilterTag(props) {
|
|
|
20896
19272
|
|
|
20897
19273
|
function ThumbnailListFilterTags(props) {
|
|
20898
19274
|
const { tagFilterCallback, tagAndCondition } = useThumbnailListItemContext();
|
|
20899
|
-
console.log('filter tags rerenders');
|
|
20900
19275
|
return (jsx(Fragment, { children: props.tags.map((tag, index) => {
|
|
20901
19276
|
return (jsx(ThumbnailListFilterTag, { label: tag.label, value: tag.key.toString(), variant: tagAndCondition.tag === tag.key ? 'filled' : 'outlined', collapseBreakpoint: props.muiCollapseBreakpoint, onClickCallback: (value) => tagFilterCallback({ tag: value, condition: tag.condition }), icon: tag.icon }, `${index}_${tag.key.toString()}`));
|
|
20902
19277
|
}) }));
|
|
@@ -20936,7 +19311,6 @@ function DropdownInput(props) {
|
|
|
20936
19311
|
|
|
20937
19312
|
function ThumbnailListHeaderSort(props) {
|
|
20938
19313
|
const { setSortAscending, sortAscending, setSortBy, sortBy } = useThumbnailListItemContext();
|
|
20939
|
-
console.log('Header sort rerenders');
|
|
20940
19314
|
return (jsx(Fragment, { children: jsxs(Box, { sx: { minWidth: '80px' }, children: [jsx(Tooltip, { title: "asc/desc", children: jsx(IconButton, { onClick: () => setSortAscending(!sortAscending), children: jsx(SwapVertIcon, {}) }) }), jsx(DropdownInput, { width: "130px", collapseBreakpoint: props.muiBreakpoint, label: 'sort', defaultValue: sortBy, icon: jsx(Tooltip, { title: 'sort', children: jsx(SortIcon, {}) }), items: props.items.map((i) => {
|
|
20941
19315
|
return { name: i.label, value: i.key.toString() };
|
|
20942
19316
|
}), onChangeCallback: (value) => setSortBy(value) })] }) }));
|
|
@@ -20982,7 +19356,6 @@ function ThumbnailList(props) {
|
|
|
20982
19356
|
const { sortedItems, setSortBy, setSortAscending, sortAscending } = useSortedThumbnailListItems(listItems, combinedConfig.sortBy.toString(), combinedConfig.sortAscending);
|
|
20983
19357
|
const { tagFilteredItems, setTagAndCondition, tagAndCondition } = useTagFilteredThumbnailListItems({ allItems: sortedItems, initialTag: combinedConfig.tag.toString() });
|
|
20984
19358
|
const { setSearchTerm, filteredItems } = useFilteredThumbnailListItems(tagFilteredItems);
|
|
20985
|
-
console.log('Thumbnaillist renders');
|
|
20986
19359
|
return (jsx(Fragment, { children: jsx(ThumbnailListItemContext.Provider, { value: {
|
|
20987
19360
|
items: filteredItems,
|
|
20988
19361
|
setItems: setListItems,
|