@rolster/react-components 18.26.23 → 19.0.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/cjs/assets/{index-3tg8B_CA.css → index-QCv-Uo8R.css} +29 -44
- package/dist/cjs/index.js +356 -1289
- package/dist/cjs/index.js.map +1 -1
- package/dist/es/assets/{index-3tg8B_CA.css → index-QCv-Uo8R.css} +29 -44
- package/dist/es/index.js +357 -1289
- package/dist/es/index.js.map +1 -1
- package/dist/esm/components/atoms/Amount/Amount.css +2 -0
- package/dist/esm/components/atoms/Amount/Amount.css.map +1 -1
- package/dist/esm/components/atoms/Badge/Badge.css +13 -4
- package/dist/esm/components/atoms/Badge/Badge.css.map +1 -1
- package/dist/esm/components/definitions.d.ts +1 -0
- package/dist/esm/components/molecules/Pagination/Pagination.js +1 -1
- package/dist/esm/components/molecules/Pagination/Pagination.js.map +1 -1
- package/dist/esm/components/organisms/BottomSheet/BottomSheet.d.ts +0 -1
- package/dist/esm/components/organisms/BottomSheet/BottomSheet.js.map +1 -1
- package/dist/esm/components/organisms/Card/Card.d.ts +0 -1
- package/dist/esm/components/organisms/Card/Card.js.map +1 -1
- package/dist/esm/components/organisms/Datatable/Datatable.d.ts +1 -6
- package/dist/esm/components/organisms/Datatable/Datatable.js.map +1 -1
- package/dist/esm/components/organisms/FieldAutocomplete/FieldAutocomplete.d.ts +0 -1
- package/dist/esm/components/organisms/FieldAutocomplete/FieldAutocomplete.js.map +1 -1
- package/dist/esm/components/organisms/FieldSelect/FieldSelect.d.ts +0 -1
- package/dist/esm/components/organisms/FieldSelect/FieldSelect.js.map +1 -1
- package/dist/esm/components/organisms/FormNavigation/FormNavigation.css +14 -40
- package/dist/esm/components/organisms/FormNavigation/FormNavigation.css.map +1 -1
- package/dist/esm/components/organisms/FormNavigation/FormNavigation.d.ts +2 -5
- package/dist/esm/components/organisms/FormNavigation/FormNavigation.js +4 -7
- package/dist/esm/components/organisms/FormNavigation/FormNavigation.js.map +1 -1
- package/dist/esm/components/organisms/ImageEditor/ImageEditor.js +1 -1
- package/dist/esm/components/organisms/ImageEditor/ImageEditor.js.map +1 -1
- package/dist/esm/components/organisms/Modal/Modal.d.ts +0 -1
- package/dist/esm/components/organisms/Modal/Modal.js.map +1 -1
- package/dist/esm/components/organisms/ModalSheet/ModalSheet.d.ts +0 -1
- package/dist/esm/components/organisms/ModalSheet/ModalSheet.js.map +1 -1
- package/dist/esm/components/organisms/Snackbar/Snackbar.js +1 -1
- package/dist/esm/components/organisms/Snackbar/Snackbar.js.map +1 -1
- package/dist/esm/controllers/DatatableController.d.ts +1 -1
- package/dist/esm/controllers/DatatableController.js.map +1 -1
- package/dist/esm/controllers/ListController.d.ts +3 -3
- package/dist/esm/controllers/ListController.js +1 -1
- package/dist/esm/controllers/ListController.js.map +1 -1
- package/dist/esm/definitions.d.ts +3 -3
- package/dist/esm/index.d.ts +0 -1
- package/dist/esm/index.js +0 -1
- package/dist/esm/index.js.map +1 -1
- package/package.json +7 -8
- package/dist/esm/components/organisms/FormNavigation/FormNavigationController.d.ts +0 -6
- package/dist/esm/components/organisms/FormNavigation/FormNavigationController.js +0 -10
- package/dist/esm/components/organisms/FormNavigation/FormNavigationController.js.map +0 -1
package/dist/cjs/index.js
CHANGED
|
@@ -10,26 +10,47 @@ var reactForms = require('@rolster/react-forms');
|
|
|
10
10
|
|
|
11
11
|
var jsxRuntime = {exports: {}};
|
|
12
12
|
|
|
13
|
-
var
|
|
13
|
+
var reactJsxRuntime_production = {};
|
|
14
14
|
|
|
15
15
|
/**
|
|
16
16
|
* @license React
|
|
17
|
-
* react-jsx-runtime.production.
|
|
17
|
+
* react-jsx-runtime.production.js
|
|
18
18
|
*
|
|
19
|
-
* Copyright (c)
|
|
19
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
20
20
|
*
|
|
21
21
|
* This source code is licensed under the MIT license found in the
|
|
22
22
|
* LICENSE file in the root directory of this source tree.
|
|
23
23
|
*/
|
|
24
24
|
|
|
25
|
-
var
|
|
26
|
-
|
|
27
|
-
function
|
|
28
|
-
if (
|
|
29
|
-
|
|
30
|
-
var
|
|
31
|
-
|
|
32
|
-
|
|
25
|
+
var hasRequiredReactJsxRuntime_production;
|
|
26
|
+
|
|
27
|
+
function requireReactJsxRuntime_production () {
|
|
28
|
+
if (hasRequiredReactJsxRuntime_production) return reactJsxRuntime_production;
|
|
29
|
+
hasRequiredReactJsxRuntime_production = 1;
|
|
30
|
+
var REACT_ELEMENT_TYPE = Symbol.for("react.transitional.element"),
|
|
31
|
+
REACT_FRAGMENT_TYPE = Symbol.for("react.fragment");
|
|
32
|
+
function jsxProd(type, config, maybeKey) {
|
|
33
|
+
var key = null;
|
|
34
|
+
void 0 !== maybeKey && (key = "" + maybeKey);
|
|
35
|
+
void 0 !== config.key && (key = "" + config.key);
|
|
36
|
+
if ("key" in config) {
|
|
37
|
+
maybeKey = {};
|
|
38
|
+
for (var propName in config)
|
|
39
|
+
"key" !== propName && (maybeKey[propName] = config[propName]);
|
|
40
|
+
} else maybeKey = config;
|
|
41
|
+
config = maybeKey.ref;
|
|
42
|
+
return {
|
|
43
|
+
$$typeof: REACT_ELEMENT_TYPE,
|
|
44
|
+
type: type,
|
|
45
|
+
key: key,
|
|
46
|
+
ref: void 0 !== config ? config : null,
|
|
47
|
+
props: maybeKey
|
|
48
|
+
};
|
|
49
|
+
}
|
|
50
|
+
reactJsxRuntime_production.Fragment = REACT_FRAGMENT_TYPE;
|
|
51
|
+
reactJsxRuntime_production.jsx = jsxProd;
|
|
52
|
+
reactJsxRuntime_production.jsxs = jsxProd;
|
|
53
|
+
return reactJsxRuntime_production;
|
|
33
54
|
}
|
|
34
55
|
|
|
35
56
|
var reactJsxRuntime_development = {};
|
|
@@ -38,7 +59,7 @@ var reactJsxRuntime_development = {};
|
|
|
38
59
|
* @license React
|
|
39
60
|
* react-jsx-runtime.development.js
|
|
40
61
|
*
|
|
41
|
-
* Copyright (c)
|
|
62
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
42
63
|
*
|
|
43
64
|
* This source code is licensed under the MIT license found in the
|
|
44
65
|
* LICENSE file in the root directory of this source tree.
|
|
@@ -49,1295 +70,352 @@ var hasRequiredReactJsxRuntime_development;
|
|
|
49
70
|
function requireReactJsxRuntime_development () {
|
|
50
71
|
if (hasRequiredReactJsxRuntime_development) return reactJsxRuntime_development;
|
|
51
72
|
hasRequiredReactJsxRuntime_development = 1;
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
var REACT_OFFSCREEN_TYPE = Symbol.for('react.offscreen');
|
|
75
|
-
var MAYBE_ITERATOR_SYMBOL = Symbol.iterator;
|
|
76
|
-
var FAUX_ITERATOR_SYMBOL = '@@iterator';
|
|
77
|
-
function getIteratorFn(maybeIterable) {
|
|
78
|
-
if (maybeIterable === null || typeof maybeIterable !== 'object') {
|
|
79
|
-
return null;
|
|
80
|
-
}
|
|
81
|
-
|
|
82
|
-
var maybeIterator = MAYBE_ITERATOR_SYMBOL && maybeIterable[MAYBE_ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL];
|
|
83
|
-
|
|
84
|
-
if (typeof maybeIterator === 'function') {
|
|
85
|
-
return maybeIterator;
|
|
86
|
-
}
|
|
87
|
-
|
|
88
|
-
return null;
|
|
89
|
-
}
|
|
90
|
-
|
|
91
|
-
var ReactSharedInternals = React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
|
|
92
|
-
|
|
93
|
-
function error(format) {
|
|
94
|
-
{
|
|
95
|
-
{
|
|
96
|
-
for (var _len2 = arguments.length, args = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {
|
|
97
|
-
args[_key2 - 1] = arguments[_key2];
|
|
73
|
+
"production" !== process.env.NODE_ENV &&
|
|
74
|
+
(function () {
|
|
75
|
+
function getComponentNameFromType(type) {
|
|
76
|
+
if (null == type) return null;
|
|
77
|
+
if ("function" === typeof type)
|
|
78
|
+
return type.$$typeof === REACT_CLIENT_REFERENCE
|
|
79
|
+
? null
|
|
80
|
+
: type.displayName || type.name || null;
|
|
81
|
+
if ("string" === typeof type) return type;
|
|
82
|
+
switch (type) {
|
|
83
|
+
case REACT_FRAGMENT_TYPE:
|
|
84
|
+
return "Fragment";
|
|
85
|
+
case REACT_PROFILER_TYPE:
|
|
86
|
+
return "Profiler";
|
|
87
|
+
case REACT_STRICT_MODE_TYPE:
|
|
88
|
+
return "StrictMode";
|
|
89
|
+
case REACT_SUSPENSE_TYPE:
|
|
90
|
+
return "Suspense";
|
|
91
|
+
case REACT_SUSPENSE_LIST_TYPE:
|
|
92
|
+
return "SuspenseList";
|
|
93
|
+
case REACT_ACTIVITY_TYPE:
|
|
94
|
+
return "Activity";
|
|
98
95
|
}
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
var enableCacheElement = false;
|
|
134
|
-
var enableTransitionTracing = false; // No known bugs, but needs performance testing
|
|
135
|
-
|
|
136
|
-
var enableLegacyHidden = false; // Enables unstable_avoidThisFallback feature in Fiber
|
|
137
|
-
// stuff. Intended to enable React core members to more easily debug scheduling
|
|
138
|
-
// issues in DEV builds.
|
|
139
|
-
|
|
140
|
-
var enableDebugTracing = false; // Track which Fiber(s) schedule render work.
|
|
141
|
-
|
|
142
|
-
var REACT_MODULE_REFERENCE;
|
|
143
|
-
|
|
144
|
-
{
|
|
145
|
-
REACT_MODULE_REFERENCE = Symbol.for('react.module.reference');
|
|
146
|
-
}
|
|
147
|
-
|
|
148
|
-
function isValidElementType(type) {
|
|
149
|
-
if (typeof type === 'string' || typeof type === 'function') {
|
|
150
|
-
return true;
|
|
151
|
-
} // Note: typeof might be other than 'symbol' or 'number' (e.g. if it's a polyfill).
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
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 ) {
|
|
155
|
-
return true;
|
|
156
|
-
}
|
|
157
|
-
|
|
158
|
-
if (typeof type === 'object' && type !== null) {
|
|
159
|
-
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
|
|
160
|
-
// types supported by any Flight configuration anywhere since
|
|
161
|
-
// we don't know which Flight build this will end up being used
|
|
162
|
-
// with.
|
|
163
|
-
type.$$typeof === REACT_MODULE_REFERENCE || type.getModuleId !== undefined) {
|
|
164
|
-
return true;
|
|
165
|
-
}
|
|
166
|
-
}
|
|
167
|
-
|
|
168
|
-
return false;
|
|
169
|
-
}
|
|
170
|
-
|
|
171
|
-
function getWrappedName(outerType, innerType, wrapperName) {
|
|
172
|
-
var displayName = outerType.displayName;
|
|
173
|
-
|
|
174
|
-
if (displayName) {
|
|
175
|
-
return displayName;
|
|
176
|
-
}
|
|
177
|
-
|
|
178
|
-
var functionName = innerType.displayName || innerType.name || '';
|
|
179
|
-
return functionName !== '' ? wrapperName + "(" + functionName + ")" : wrapperName;
|
|
180
|
-
} // Keep in sync with react-reconciler/getComponentNameFromFiber
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
function getContextName(type) {
|
|
184
|
-
return type.displayName || 'Context';
|
|
185
|
-
} // Note that the reconciler package should generally prefer to use getComponentNameFromFiber() instead.
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
function getComponentNameFromType(type) {
|
|
189
|
-
if (type == null) {
|
|
190
|
-
// Host root, text node or just invalid type.
|
|
191
|
-
return null;
|
|
192
|
-
}
|
|
193
|
-
|
|
194
|
-
{
|
|
195
|
-
if (typeof type.tag === 'number') {
|
|
196
|
-
error('Received an unexpected object in getComponentNameFromType(). ' + 'This is likely a bug in React. Please file an issue.');
|
|
197
|
-
}
|
|
198
|
-
}
|
|
199
|
-
|
|
200
|
-
if (typeof type === 'function') {
|
|
201
|
-
return type.displayName || type.name || null;
|
|
202
|
-
}
|
|
203
|
-
|
|
204
|
-
if (typeof type === 'string') {
|
|
205
|
-
return type;
|
|
206
|
-
}
|
|
207
|
-
|
|
208
|
-
switch (type) {
|
|
209
|
-
case REACT_FRAGMENT_TYPE:
|
|
210
|
-
return 'Fragment';
|
|
211
|
-
|
|
212
|
-
case REACT_PORTAL_TYPE:
|
|
213
|
-
return 'Portal';
|
|
214
|
-
|
|
215
|
-
case REACT_PROFILER_TYPE:
|
|
216
|
-
return 'Profiler';
|
|
217
|
-
|
|
218
|
-
case REACT_STRICT_MODE_TYPE:
|
|
219
|
-
return 'StrictMode';
|
|
220
|
-
|
|
221
|
-
case REACT_SUSPENSE_TYPE:
|
|
222
|
-
return 'Suspense';
|
|
223
|
-
|
|
224
|
-
case REACT_SUSPENSE_LIST_TYPE:
|
|
225
|
-
return 'SuspenseList';
|
|
226
|
-
|
|
227
|
-
}
|
|
228
|
-
|
|
229
|
-
if (typeof type === 'object') {
|
|
230
|
-
switch (type.$$typeof) {
|
|
231
|
-
case REACT_CONTEXT_TYPE:
|
|
232
|
-
var context = type;
|
|
233
|
-
return getContextName(context) + '.Consumer';
|
|
234
|
-
|
|
235
|
-
case REACT_PROVIDER_TYPE:
|
|
236
|
-
var provider = type;
|
|
237
|
-
return getContextName(provider._context) + '.Provider';
|
|
238
|
-
|
|
239
|
-
case REACT_FORWARD_REF_TYPE:
|
|
240
|
-
return getWrappedName(type, type.render, 'ForwardRef');
|
|
241
|
-
|
|
242
|
-
case REACT_MEMO_TYPE:
|
|
243
|
-
var outerName = type.displayName || null;
|
|
244
|
-
|
|
245
|
-
if (outerName !== null) {
|
|
246
|
-
return outerName;
|
|
96
|
+
if ("object" === typeof type)
|
|
97
|
+
switch (
|
|
98
|
+
("number" === typeof type.tag &&
|
|
99
|
+
console.error(
|
|
100
|
+
"Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."
|
|
101
|
+
),
|
|
102
|
+
type.$$typeof)
|
|
103
|
+
) {
|
|
104
|
+
case REACT_PORTAL_TYPE:
|
|
105
|
+
return "Portal";
|
|
106
|
+
case REACT_CONTEXT_TYPE:
|
|
107
|
+
return type.displayName || "Context";
|
|
108
|
+
case REACT_CONSUMER_TYPE:
|
|
109
|
+
return (type._context.displayName || "Context") + ".Consumer";
|
|
110
|
+
case REACT_FORWARD_REF_TYPE:
|
|
111
|
+
var innerType = type.render;
|
|
112
|
+
type = type.displayName;
|
|
113
|
+
type ||
|
|
114
|
+
((type = innerType.displayName || innerType.name || ""),
|
|
115
|
+
(type = "" !== type ? "ForwardRef(" + type + ")" : "ForwardRef"));
|
|
116
|
+
return type;
|
|
117
|
+
case REACT_MEMO_TYPE:
|
|
118
|
+
return (
|
|
119
|
+
(innerType = type.displayName || null),
|
|
120
|
+
null !== innerType
|
|
121
|
+
? innerType
|
|
122
|
+
: getComponentNameFromType(type.type) || "Memo"
|
|
123
|
+
);
|
|
124
|
+
case REACT_LAZY_TYPE:
|
|
125
|
+
innerType = type._payload;
|
|
126
|
+
type = type._init;
|
|
127
|
+
try {
|
|
128
|
+
return getComponentNameFromType(type(innerType));
|
|
129
|
+
} catch (x) {}
|
|
247
130
|
}
|
|
248
|
-
|
|
249
|
-
return getComponentNameFromType(type.type) || 'Memo';
|
|
250
|
-
|
|
251
|
-
case REACT_LAZY_TYPE:
|
|
252
|
-
{
|
|
253
|
-
var lazyComponent = type;
|
|
254
|
-
var payload = lazyComponent._payload;
|
|
255
|
-
var init = lazyComponent._init;
|
|
256
|
-
|
|
257
|
-
try {
|
|
258
|
-
return getComponentNameFromType(init(payload));
|
|
259
|
-
} catch (x) {
|
|
260
|
-
return null;
|
|
261
|
-
}
|
|
262
|
-
}
|
|
263
|
-
|
|
264
|
-
// eslint-disable-next-line no-fallthrough
|
|
131
|
+
return null;
|
|
265
132
|
}
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
return null;
|
|
269
|
-
}
|
|
270
|
-
|
|
271
|
-
var assign = Object.assign;
|
|
272
|
-
|
|
273
|
-
// Helpers to patch console.logs to avoid logging during side-effect free
|
|
274
|
-
// replaying on render function. This currently only patches the object
|
|
275
|
-
// lazily which won't cover if the log function was extracted eagerly.
|
|
276
|
-
// We could also eagerly patch the method.
|
|
277
|
-
var disabledDepth = 0;
|
|
278
|
-
var prevLog;
|
|
279
|
-
var prevInfo;
|
|
280
|
-
var prevWarn;
|
|
281
|
-
var prevError;
|
|
282
|
-
var prevGroup;
|
|
283
|
-
var prevGroupCollapsed;
|
|
284
|
-
var prevGroupEnd;
|
|
285
|
-
|
|
286
|
-
function disabledLog() {}
|
|
287
|
-
|
|
288
|
-
disabledLog.__reactDisabledLog = true;
|
|
289
|
-
function disableLogs() {
|
|
290
|
-
{
|
|
291
|
-
if (disabledDepth === 0) {
|
|
292
|
-
/* eslint-disable react-internal/no-production-logging */
|
|
293
|
-
prevLog = console.log;
|
|
294
|
-
prevInfo = console.info;
|
|
295
|
-
prevWarn = console.warn;
|
|
296
|
-
prevError = console.error;
|
|
297
|
-
prevGroup = console.group;
|
|
298
|
-
prevGroupCollapsed = console.groupCollapsed;
|
|
299
|
-
prevGroupEnd = console.groupEnd; // https://github.com/facebook/react/issues/19099
|
|
300
|
-
|
|
301
|
-
var props = {
|
|
302
|
-
configurable: true,
|
|
303
|
-
enumerable: true,
|
|
304
|
-
value: disabledLog,
|
|
305
|
-
writable: true
|
|
306
|
-
}; // $FlowFixMe Flow thinks console is immutable.
|
|
307
|
-
|
|
308
|
-
Object.defineProperties(console, {
|
|
309
|
-
info: props,
|
|
310
|
-
log: props,
|
|
311
|
-
warn: props,
|
|
312
|
-
error: props,
|
|
313
|
-
group: props,
|
|
314
|
-
groupCollapsed: props,
|
|
315
|
-
groupEnd: props
|
|
316
|
-
});
|
|
317
|
-
/* eslint-enable react-internal/no-production-logging */
|
|
133
|
+
function testStringCoercion(value) {
|
|
134
|
+
return "" + value;
|
|
318
135
|
}
|
|
319
|
-
|
|
320
|
-
disabledDepth++;
|
|
321
|
-
}
|
|
322
|
-
}
|
|
323
|
-
function reenableLogs() {
|
|
324
|
-
{
|
|
325
|
-
disabledDepth--;
|
|
326
|
-
|
|
327
|
-
if (disabledDepth === 0) {
|
|
328
|
-
/* eslint-disable react-internal/no-production-logging */
|
|
329
|
-
var props = {
|
|
330
|
-
configurable: true,
|
|
331
|
-
enumerable: true,
|
|
332
|
-
writable: true
|
|
333
|
-
}; // $FlowFixMe Flow thinks console is immutable.
|
|
334
|
-
|
|
335
|
-
Object.defineProperties(console, {
|
|
336
|
-
log: assign({}, props, {
|
|
337
|
-
value: prevLog
|
|
338
|
-
}),
|
|
339
|
-
info: assign({}, props, {
|
|
340
|
-
value: prevInfo
|
|
341
|
-
}),
|
|
342
|
-
warn: assign({}, props, {
|
|
343
|
-
value: prevWarn
|
|
344
|
-
}),
|
|
345
|
-
error: assign({}, props, {
|
|
346
|
-
value: prevError
|
|
347
|
-
}),
|
|
348
|
-
group: assign({}, props, {
|
|
349
|
-
value: prevGroup
|
|
350
|
-
}),
|
|
351
|
-
groupCollapsed: assign({}, props, {
|
|
352
|
-
value: prevGroupCollapsed
|
|
353
|
-
}),
|
|
354
|
-
groupEnd: assign({}, props, {
|
|
355
|
-
value: prevGroupEnd
|
|
356
|
-
})
|
|
357
|
-
});
|
|
358
|
-
/* eslint-enable react-internal/no-production-logging */
|
|
359
|
-
}
|
|
360
|
-
|
|
361
|
-
if (disabledDepth < 0) {
|
|
362
|
-
error('disabledDepth fell below zero. ' + 'This is a bug in React. Please file an issue.');
|
|
363
|
-
}
|
|
364
|
-
}
|
|
365
|
-
}
|
|
366
|
-
|
|
367
|
-
var ReactCurrentDispatcher = ReactSharedInternals.ReactCurrentDispatcher;
|
|
368
|
-
var prefix;
|
|
369
|
-
function describeBuiltInComponentFrame(name, source, ownerFn) {
|
|
370
|
-
{
|
|
371
|
-
if (prefix === undefined) {
|
|
372
|
-
// Extract the VM specific prefix used by each line.
|
|
136
|
+
function checkKeyStringCoercion(value) {
|
|
373
137
|
try {
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
138
|
+
testStringCoercion(value);
|
|
139
|
+
var JSCompiler_inline_result = !1;
|
|
140
|
+
} catch (e) {
|
|
141
|
+
JSCompiler_inline_result = true;
|
|
378
142
|
}
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
// If something asked for a stack inside a fake render, it should get ignored.
|
|
395
|
-
if ( !fn || reentry) {
|
|
396
|
-
return '';
|
|
397
|
-
}
|
|
398
|
-
|
|
399
|
-
{
|
|
400
|
-
var frame = componentFrameCache.get(fn);
|
|
401
|
-
|
|
402
|
-
if (frame !== undefined) {
|
|
403
|
-
return frame;
|
|
404
|
-
}
|
|
405
|
-
}
|
|
406
|
-
|
|
407
|
-
var control;
|
|
408
|
-
reentry = true;
|
|
409
|
-
var previousPrepareStackTrace = Error.prepareStackTrace; // $FlowFixMe It does accept undefined.
|
|
410
|
-
|
|
411
|
-
Error.prepareStackTrace = undefined;
|
|
412
|
-
var previousDispatcher;
|
|
413
|
-
|
|
414
|
-
{
|
|
415
|
-
previousDispatcher = ReactCurrentDispatcher.current; // Set the dispatcher in DEV because this might be call in the render function
|
|
416
|
-
// for warnings.
|
|
417
|
-
|
|
418
|
-
ReactCurrentDispatcher.current = null;
|
|
419
|
-
disableLogs();
|
|
420
|
-
}
|
|
421
|
-
|
|
422
|
-
try {
|
|
423
|
-
// This should throw.
|
|
424
|
-
if (construct) {
|
|
425
|
-
// Something should be setting the props in the constructor.
|
|
426
|
-
var Fake = function () {
|
|
427
|
-
throw Error();
|
|
428
|
-
}; // $FlowFixMe
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
Object.defineProperty(Fake.prototype, 'props', {
|
|
432
|
-
set: function () {
|
|
433
|
-
// We use a throwing setter instead of frozen or non-writable props
|
|
434
|
-
// because that won't throw in a non-strict mode function.
|
|
435
|
-
throw Error();
|
|
436
|
-
}
|
|
437
|
-
});
|
|
438
|
-
|
|
439
|
-
if (typeof Reflect === 'object' && Reflect.construct) {
|
|
440
|
-
// We construct a different control for this case to include any extra
|
|
441
|
-
// frames added by the construct call.
|
|
442
|
-
try {
|
|
443
|
-
Reflect.construct(Fake, []);
|
|
444
|
-
} catch (x) {
|
|
445
|
-
control = x;
|
|
446
|
-
}
|
|
447
|
-
|
|
448
|
-
Reflect.construct(fn, [], Fake);
|
|
449
|
-
} else {
|
|
450
|
-
try {
|
|
451
|
-
Fake.call();
|
|
452
|
-
} catch (x) {
|
|
453
|
-
control = x;
|
|
454
|
-
}
|
|
455
|
-
|
|
456
|
-
fn.call(Fake.prototype);
|
|
143
|
+
if (JSCompiler_inline_result) {
|
|
144
|
+
JSCompiler_inline_result = console;
|
|
145
|
+
var JSCompiler_temp_const = JSCompiler_inline_result.error;
|
|
146
|
+
var JSCompiler_inline_result$jscomp$0 =
|
|
147
|
+
("function" === typeof Symbol &&
|
|
148
|
+
Symbol.toStringTag &&
|
|
149
|
+
value[Symbol.toStringTag]) ||
|
|
150
|
+
value.constructor.name ||
|
|
151
|
+
"Object";
|
|
152
|
+
JSCompiler_temp_const.call(
|
|
153
|
+
JSCompiler_inline_result,
|
|
154
|
+
"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",
|
|
155
|
+
JSCompiler_inline_result$jscomp$0
|
|
156
|
+
);
|
|
157
|
+
return testStringCoercion(value);
|
|
457
158
|
}
|
|
458
|
-
}
|
|
159
|
+
}
|
|
160
|
+
function getTaskName(type) {
|
|
161
|
+
if (type === REACT_FRAGMENT_TYPE) return "<>";
|
|
162
|
+
if (
|
|
163
|
+
"object" === typeof type &&
|
|
164
|
+
null !== type &&
|
|
165
|
+
type.$$typeof === REACT_LAZY_TYPE
|
|
166
|
+
)
|
|
167
|
+
return "<...>";
|
|
459
168
|
try {
|
|
460
|
-
|
|
169
|
+
var name = getComponentNameFromType(type);
|
|
170
|
+
return name ? "<" + name + ">" : "<...>";
|
|
461
171
|
} catch (x) {
|
|
462
|
-
|
|
463
|
-
}
|
|
464
|
-
|
|
465
|
-
fn();
|
|
466
|
-
}
|
|
467
|
-
} catch (sample) {
|
|
468
|
-
// This is inlined manually because closure doesn't do it for us.
|
|
469
|
-
if (sample && control && typeof sample.stack === 'string') {
|
|
470
|
-
// This extracts the first frame from the sample that isn't also in the control.
|
|
471
|
-
// Skipping one frame that we assume is the frame that calls the two.
|
|
472
|
-
var sampleLines = sample.stack.split('\n');
|
|
473
|
-
var controlLines = control.stack.split('\n');
|
|
474
|
-
var s = sampleLines.length - 1;
|
|
475
|
-
var c = controlLines.length - 1;
|
|
476
|
-
|
|
477
|
-
while (s >= 1 && c >= 0 && sampleLines[s] !== controlLines[c]) {
|
|
478
|
-
// We expect at least one stack frame to be shared.
|
|
479
|
-
// Typically this will be the root most one. However, stack frames may be
|
|
480
|
-
// cut off due to maximum stack limits. In this case, one maybe cut off
|
|
481
|
-
// earlier than the other. We assume that the sample is longer or the same
|
|
482
|
-
// and there for cut off earlier. So we should find the root most frame in
|
|
483
|
-
// the sample somewhere in the control.
|
|
484
|
-
c--;
|
|
485
|
-
}
|
|
486
|
-
|
|
487
|
-
for (; s >= 1 && c >= 0; s--, c--) {
|
|
488
|
-
// Next we find the first one that isn't the same which should be the
|
|
489
|
-
// frame that called our sample function and the control.
|
|
490
|
-
if (sampleLines[s] !== controlLines[c]) {
|
|
491
|
-
// In V8, the first line is describing the message but other VMs don't.
|
|
492
|
-
// If we're about to return the first line, and the control is also on the same
|
|
493
|
-
// line, that's a pretty good indicator that our sample threw at same line as
|
|
494
|
-
// the control. I.e. before we entered the sample frame. So we ignore this result.
|
|
495
|
-
// This can happen if you passed a class to function component, or non-function.
|
|
496
|
-
if (s !== 1 || c !== 1) {
|
|
497
|
-
do {
|
|
498
|
-
s--;
|
|
499
|
-
c--; // We may still have similar intermediate frames from the construct call.
|
|
500
|
-
// The next one that isn't the same should be our match though.
|
|
501
|
-
|
|
502
|
-
if (c < 0 || sampleLines[s] !== controlLines[c]) {
|
|
503
|
-
// V8 adds a "new" prefix for native classes. Let's remove it to make it prettier.
|
|
504
|
-
var _frame = '\n' + sampleLines[s].replace(' at new ', ' at '); // If our component frame is labeled "<anonymous>"
|
|
505
|
-
// but we have a user-provided "displayName"
|
|
506
|
-
// splice it in to make the stack more readable.
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
if (fn.displayName && _frame.includes('<anonymous>')) {
|
|
510
|
-
_frame = _frame.replace('<anonymous>', fn.displayName);
|
|
511
|
-
}
|
|
512
|
-
|
|
513
|
-
{
|
|
514
|
-
if (typeof fn === 'function') {
|
|
515
|
-
componentFrameCache.set(fn, _frame);
|
|
516
|
-
}
|
|
517
|
-
} // Return the line we found.
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
return _frame;
|
|
521
|
-
}
|
|
522
|
-
} while (s >= 1 && c >= 0);
|
|
523
|
-
}
|
|
524
|
-
|
|
525
|
-
break;
|
|
526
|
-
}
|
|
527
|
-
}
|
|
528
|
-
}
|
|
529
|
-
} finally {
|
|
530
|
-
reentry = false;
|
|
531
|
-
|
|
532
|
-
{
|
|
533
|
-
ReactCurrentDispatcher.current = previousDispatcher;
|
|
534
|
-
reenableLogs();
|
|
535
|
-
}
|
|
536
|
-
|
|
537
|
-
Error.prepareStackTrace = previousPrepareStackTrace;
|
|
538
|
-
} // Fallback to just using the name if we couldn't make it throw.
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
var name = fn ? fn.displayName || fn.name : '';
|
|
542
|
-
var syntheticFrame = name ? describeBuiltInComponentFrame(name) : '';
|
|
543
|
-
|
|
544
|
-
{
|
|
545
|
-
if (typeof fn === 'function') {
|
|
546
|
-
componentFrameCache.set(fn, syntheticFrame);
|
|
547
|
-
}
|
|
548
|
-
}
|
|
549
|
-
|
|
550
|
-
return syntheticFrame;
|
|
551
|
-
}
|
|
552
|
-
function describeFunctionComponentFrame(fn, source, ownerFn) {
|
|
553
|
-
{
|
|
554
|
-
return describeNativeComponentFrame(fn, false);
|
|
555
|
-
}
|
|
556
|
-
}
|
|
557
|
-
|
|
558
|
-
function shouldConstruct(Component) {
|
|
559
|
-
var prototype = Component.prototype;
|
|
560
|
-
return !!(prototype && prototype.isReactComponent);
|
|
561
|
-
}
|
|
562
|
-
|
|
563
|
-
function describeUnknownElementTypeFrameInDEV(type, source, ownerFn) {
|
|
564
|
-
|
|
565
|
-
if (type == null) {
|
|
566
|
-
return '';
|
|
567
|
-
}
|
|
568
|
-
|
|
569
|
-
if (typeof type === 'function') {
|
|
570
|
-
{
|
|
571
|
-
return describeNativeComponentFrame(type, shouldConstruct(type));
|
|
572
|
-
}
|
|
573
|
-
}
|
|
574
|
-
|
|
575
|
-
if (typeof type === 'string') {
|
|
576
|
-
return describeBuiltInComponentFrame(type);
|
|
577
|
-
}
|
|
578
|
-
|
|
579
|
-
switch (type) {
|
|
580
|
-
case REACT_SUSPENSE_TYPE:
|
|
581
|
-
return describeBuiltInComponentFrame('Suspense');
|
|
582
|
-
|
|
583
|
-
case REACT_SUSPENSE_LIST_TYPE:
|
|
584
|
-
return describeBuiltInComponentFrame('SuspenseList');
|
|
585
|
-
}
|
|
586
|
-
|
|
587
|
-
if (typeof type === 'object') {
|
|
588
|
-
switch (type.$$typeof) {
|
|
589
|
-
case REACT_FORWARD_REF_TYPE:
|
|
590
|
-
return describeFunctionComponentFrame(type.render);
|
|
591
|
-
|
|
592
|
-
case REACT_MEMO_TYPE:
|
|
593
|
-
// Memo may contain any component type so we recursively resolve it.
|
|
594
|
-
return describeUnknownElementTypeFrameInDEV(type.type, source, ownerFn);
|
|
595
|
-
|
|
596
|
-
case REACT_LAZY_TYPE:
|
|
597
|
-
{
|
|
598
|
-
var lazyComponent = type;
|
|
599
|
-
var payload = lazyComponent._payload;
|
|
600
|
-
var init = lazyComponent._init;
|
|
601
|
-
|
|
602
|
-
try {
|
|
603
|
-
// Lazy may contain any component type so we recursively resolve it.
|
|
604
|
-
return describeUnknownElementTypeFrameInDEV(init(payload), source, ownerFn);
|
|
605
|
-
} catch (x) {}
|
|
606
|
-
}
|
|
607
|
-
}
|
|
608
|
-
}
|
|
609
|
-
|
|
610
|
-
return '';
|
|
611
|
-
}
|
|
612
|
-
|
|
613
|
-
var hasOwnProperty = Object.prototype.hasOwnProperty;
|
|
614
|
-
|
|
615
|
-
var loggedTypeFailures = {};
|
|
616
|
-
var ReactDebugCurrentFrame = ReactSharedInternals.ReactDebugCurrentFrame;
|
|
617
|
-
|
|
618
|
-
function setCurrentlyValidatingElement(element) {
|
|
619
|
-
{
|
|
620
|
-
if (element) {
|
|
621
|
-
var owner = element._owner;
|
|
622
|
-
var stack = describeUnknownElementTypeFrameInDEV(element.type, element._source, owner ? owner.type : null);
|
|
623
|
-
ReactDebugCurrentFrame.setExtraStackFrame(stack);
|
|
624
|
-
} else {
|
|
625
|
-
ReactDebugCurrentFrame.setExtraStackFrame(null);
|
|
626
|
-
}
|
|
627
|
-
}
|
|
628
|
-
}
|
|
629
|
-
|
|
630
|
-
function checkPropTypes(typeSpecs, values, location, componentName, element) {
|
|
631
|
-
{
|
|
632
|
-
// $FlowFixMe This is okay but Flow doesn't know it.
|
|
633
|
-
var has = Function.call.bind(hasOwnProperty);
|
|
634
|
-
|
|
635
|
-
for (var typeSpecName in typeSpecs) {
|
|
636
|
-
if (has(typeSpecs, typeSpecName)) {
|
|
637
|
-
var error$1 = void 0; // Prop type validation may throw. In case they do, we don't want to
|
|
638
|
-
// fail the render phase where it didn't fail before. So we log it.
|
|
639
|
-
// After these have been cleaned up, we'll let them throw.
|
|
640
|
-
|
|
641
|
-
try {
|
|
642
|
-
// This is intentionally an invariant that gets caught. It's the same
|
|
643
|
-
// behavior as without this statement except with a better message.
|
|
644
|
-
if (typeof typeSpecs[typeSpecName] !== 'function') {
|
|
645
|
-
// eslint-disable-next-line react-internal/prod-error-codes
|
|
646
|
-
var err = Error((componentName || 'React class') + ': ' + location + ' type `' + typeSpecName + '` is invalid; ' + 'it must be a function, usually from the `prop-types` package, but received `' + typeof typeSpecs[typeSpecName] + '`.' + 'This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.');
|
|
647
|
-
err.name = 'Invariant Violation';
|
|
648
|
-
throw err;
|
|
649
|
-
}
|
|
650
|
-
|
|
651
|
-
error$1 = typeSpecs[typeSpecName](values, typeSpecName, componentName, location, null, 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED');
|
|
652
|
-
} catch (ex) {
|
|
653
|
-
error$1 = ex;
|
|
654
|
-
}
|
|
655
|
-
|
|
656
|
-
if (error$1 && !(error$1 instanceof Error)) {
|
|
657
|
-
setCurrentlyValidatingElement(element);
|
|
658
|
-
|
|
659
|
-
error('%s: type specification of %s' + ' `%s` is invalid; the type checker ' + 'function must return `null` or an `Error` but returned a %s. ' + 'You may have forgotten to pass an argument to the type checker ' + 'creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and ' + 'shape all require an argument).', componentName || 'React class', location, typeSpecName, typeof error$1);
|
|
660
|
-
|
|
661
|
-
setCurrentlyValidatingElement(null);
|
|
662
|
-
}
|
|
663
|
-
|
|
664
|
-
if (error$1 instanceof Error && !(error$1.message in loggedTypeFailures)) {
|
|
665
|
-
// Only monitor this failure once because there tends to be a lot of the
|
|
666
|
-
// same error.
|
|
667
|
-
loggedTypeFailures[error$1.message] = true;
|
|
668
|
-
setCurrentlyValidatingElement(element);
|
|
669
|
-
|
|
670
|
-
error('Failed %s type: %s', location, error$1.message);
|
|
671
|
-
|
|
672
|
-
setCurrentlyValidatingElement(null);
|
|
673
|
-
}
|
|
674
|
-
}
|
|
675
|
-
}
|
|
676
|
-
}
|
|
677
|
-
}
|
|
678
|
-
|
|
679
|
-
var isArrayImpl = Array.isArray; // eslint-disable-next-line no-redeclare
|
|
680
|
-
|
|
681
|
-
function isArray(a) {
|
|
682
|
-
return isArrayImpl(a);
|
|
683
|
-
}
|
|
684
|
-
|
|
685
|
-
/*
|
|
686
|
-
* The `'' + value` pattern (used in in perf-sensitive code) throws for Symbol
|
|
687
|
-
* and Temporal.* types. See https://github.com/facebook/react/pull/22064.
|
|
688
|
-
*
|
|
689
|
-
* The functions in this module will throw an easier-to-understand,
|
|
690
|
-
* easier-to-debug exception with a clear errors message message explaining the
|
|
691
|
-
* problem. (Instead of a confusing exception thrown inside the implementation
|
|
692
|
-
* of the `value` object).
|
|
693
|
-
*/
|
|
694
|
-
// $FlowFixMe only called in DEV, so void return is not possible.
|
|
695
|
-
function typeName(value) {
|
|
696
|
-
{
|
|
697
|
-
// toStringTag is needed for namespaced types like Temporal.Instant
|
|
698
|
-
var hasToStringTag = typeof Symbol === 'function' && Symbol.toStringTag;
|
|
699
|
-
var type = hasToStringTag && value[Symbol.toStringTag] || value.constructor.name || 'Object';
|
|
700
|
-
return type;
|
|
701
|
-
}
|
|
702
|
-
} // $FlowFixMe only called in DEV, so void return is not possible.
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
function willCoercionThrow(value) {
|
|
706
|
-
{
|
|
707
|
-
try {
|
|
708
|
-
testStringCoercion(value);
|
|
709
|
-
return false;
|
|
710
|
-
} catch (e) {
|
|
711
|
-
return true;
|
|
712
|
-
}
|
|
713
|
-
}
|
|
714
|
-
}
|
|
715
|
-
|
|
716
|
-
function testStringCoercion(value) {
|
|
717
|
-
// If you ended up here by following an exception call stack, here's what's
|
|
718
|
-
// happened: you supplied an object or symbol value to React (as a prop, key,
|
|
719
|
-
// DOM attribute, CSS property, string ref, etc.) and when React tried to
|
|
720
|
-
// coerce it to a string using `'' + value`, an exception was thrown.
|
|
721
|
-
//
|
|
722
|
-
// The most common types that will cause this exception are `Symbol` instances
|
|
723
|
-
// and Temporal objects like `Temporal.Instant`. But any object that has a
|
|
724
|
-
// `valueOf` or `[Symbol.toPrimitive]` method that throws will also cause this
|
|
725
|
-
// exception. (Library authors do this to prevent users from using built-in
|
|
726
|
-
// numeric operators like `+` or comparison operators like `>=` because custom
|
|
727
|
-
// methods are needed to perform accurate arithmetic or comparison.)
|
|
728
|
-
//
|
|
729
|
-
// To fix the problem, coerce this object or symbol value to a string before
|
|
730
|
-
// passing it to React. The most reliable way is usually `String(value)`.
|
|
731
|
-
//
|
|
732
|
-
// To find which value is throwing, check the browser or debugger console.
|
|
733
|
-
// Before this exception was thrown, there should be `console.error` output
|
|
734
|
-
// that shows the type (Symbol, Temporal.PlainDate, etc.) that caused the
|
|
735
|
-
// problem and how that type was used: key, atrribute, input value prop, etc.
|
|
736
|
-
// In most cases, this console output also shows the component and its
|
|
737
|
-
// ancestor components where the exception happened.
|
|
738
|
-
//
|
|
739
|
-
// eslint-disable-next-line react-internal/safe-string-coercion
|
|
740
|
-
return '' + value;
|
|
741
|
-
}
|
|
742
|
-
function checkKeyStringCoercion(value) {
|
|
743
|
-
{
|
|
744
|
-
if (willCoercionThrow(value)) {
|
|
745
|
-
error('The provided key is an unsupported type %s.' + ' This value must be coerced to a string before before using it here.', typeName(value));
|
|
746
|
-
|
|
747
|
-
return testStringCoercion(value); // throw (to help callers find troubleshooting comments)
|
|
748
|
-
}
|
|
749
|
-
}
|
|
750
|
-
}
|
|
751
|
-
|
|
752
|
-
var ReactCurrentOwner = ReactSharedInternals.ReactCurrentOwner;
|
|
753
|
-
var RESERVED_PROPS = {
|
|
754
|
-
key: true,
|
|
755
|
-
ref: true,
|
|
756
|
-
__self: true,
|
|
757
|
-
__source: true
|
|
758
|
-
};
|
|
759
|
-
var specialPropKeyWarningShown;
|
|
760
|
-
var specialPropRefWarningShown;
|
|
761
|
-
|
|
762
|
-
function hasValidRef(config) {
|
|
763
|
-
{
|
|
764
|
-
if (hasOwnProperty.call(config, 'ref')) {
|
|
765
|
-
var getter = Object.getOwnPropertyDescriptor(config, 'ref').get;
|
|
766
|
-
|
|
767
|
-
if (getter && getter.isReactWarning) {
|
|
768
|
-
return false;
|
|
769
|
-
}
|
|
770
|
-
}
|
|
771
|
-
}
|
|
772
|
-
|
|
773
|
-
return config.ref !== undefined;
|
|
774
|
-
}
|
|
775
|
-
|
|
776
|
-
function hasValidKey(config) {
|
|
777
|
-
{
|
|
778
|
-
if (hasOwnProperty.call(config, 'key')) {
|
|
779
|
-
var getter = Object.getOwnPropertyDescriptor(config, 'key').get;
|
|
780
|
-
|
|
781
|
-
if (getter && getter.isReactWarning) {
|
|
782
|
-
return false;
|
|
783
|
-
}
|
|
784
|
-
}
|
|
785
|
-
}
|
|
786
|
-
|
|
787
|
-
return config.key !== undefined;
|
|
788
|
-
}
|
|
789
|
-
|
|
790
|
-
function warnIfStringRefCannotBeAutoConverted(config, self) {
|
|
791
|
-
{
|
|
792
|
-
if (typeof config.ref === 'string' && ReactCurrentOwner.current && self) ;
|
|
793
|
-
}
|
|
794
|
-
}
|
|
795
|
-
|
|
796
|
-
function defineKeyPropWarningGetter(props, displayName) {
|
|
797
|
-
{
|
|
798
|
-
var warnAboutAccessingKey = function () {
|
|
799
|
-
if (!specialPropKeyWarningShown) {
|
|
800
|
-
specialPropKeyWarningShown = true;
|
|
801
|
-
|
|
802
|
-
error('%s: `key` is not a prop. Trying to access it will result ' + 'in `undefined` being returned. If you need to access the same ' + 'value within the child component, you should pass it as a different ' + 'prop. (https://reactjs.org/link/special-props)', displayName);
|
|
803
|
-
}
|
|
804
|
-
};
|
|
805
|
-
|
|
806
|
-
warnAboutAccessingKey.isReactWarning = true;
|
|
807
|
-
Object.defineProperty(props, 'key', {
|
|
808
|
-
get: warnAboutAccessingKey,
|
|
809
|
-
configurable: true
|
|
810
|
-
});
|
|
811
|
-
}
|
|
812
|
-
}
|
|
813
|
-
|
|
814
|
-
function defineRefPropWarningGetter(props, displayName) {
|
|
815
|
-
{
|
|
816
|
-
var warnAboutAccessingRef = function () {
|
|
817
|
-
if (!specialPropRefWarningShown) {
|
|
818
|
-
specialPropRefWarningShown = true;
|
|
819
|
-
|
|
820
|
-
error('%s: `ref` is not a prop. Trying to access it will result ' + 'in `undefined` being returned. If you need to access the same ' + 'value within the child component, you should pass it as a different ' + 'prop. (https://reactjs.org/link/special-props)', displayName);
|
|
821
|
-
}
|
|
822
|
-
};
|
|
823
|
-
|
|
824
|
-
warnAboutAccessingRef.isReactWarning = true;
|
|
825
|
-
Object.defineProperty(props, 'ref', {
|
|
826
|
-
get: warnAboutAccessingRef,
|
|
827
|
-
configurable: true
|
|
828
|
-
});
|
|
829
|
-
}
|
|
830
|
-
}
|
|
831
|
-
/**
|
|
832
|
-
* Factory method to create a new React element. This no longer adheres to
|
|
833
|
-
* the class pattern, so do not use new to call it. Also, instanceof check
|
|
834
|
-
* will not work. Instead test $$typeof field against Symbol.for('react.element') to check
|
|
835
|
-
* if something is a React Element.
|
|
836
|
-
*
|
|
837
|
-
* @param {*} type
|
|
838
|
-
* @param {*} props
|
|
839
|
-
* @param {*} key
|
|
840
|
-
* @param {string|object} ref
|
|
841
|
-
* @param {*} owner
|
|
842
|
-
* @param {*} self A *temporary* helper to detect places where `this` is
|
|
843
|
-
* different from the `owner` when React.createElement is called, so that we
|
|
844
|
-
* can warn. We want to get rid of owner and replace string `ref`s with arrow
|
|
845
|
-
* functions, and as long as `this` and owner are the same, there will be no
|
|
846
|
-
* change in behavior.
|
|
847
|
-
* @param {*} source An annotation object (added by a transpiler or otherwise)
|
|
848
|
-
* indicating filename, line number, and/or other information.
|
|
849
|
-
* @internal
|
|
850
|
-
*/
|
|
851
|
-
|
|
852
|
-
|
|
853
|
-
var ReactElement = function (type, key, ref, self, source, owner, props) {
|
|
854
|
-
var element = {
|
|
855
|
-
// This tag allows us to uniquely identify this as a React Element
|
|
856
|
-
$$typeof: REACT_ELEMENT_TYPE,
|
|
857
|
-
// Built-in properties that belong on the element
|
|
858
|
-
type: type,
|
|
859
|
-
key: key,
|
|
860
|
-
ref: ref,
|
|
861
|
-
props: props,
|
|
862
|
-
// Record the component responsible for creating this element.
|
|
863
|
-
_owner: owner
|
|
864
|
-
};
|
|
865
|
-
|
|
866
|
-
{
|
|
867
|
-
// The validation flag is currently mutative. We put it on
|
|
868
|
-
// an external backing store so that we can freeze the whole object.
|
|
869
|
-
// This can be replaced with a WeakMap once they are implemented in
|
|
870
|
-
// commonly used development environments.
|
|
871
|
-
element._store = {}; // To make comparing ReactElements easier for testing purposes, we make
|
|
872
|
-
// the validation flag non-enumerable (where possible, which should
|
|
873
|
-
// include every environment we run tests in), so the test framework
|
|
874
|
-
// ignores it.
|
|
875
|
-
|
|
876
|
-
Object.defineProperty(element._store, 'validated', {
|
|
877
|
-
configurable: false,
|
|
878
|
-
enumerable: false,
|
|
879
|
-
writable: true,
|
|
880
|
-
value: false
|
|
881
|
-
}); // self and source are DEV only properties.
|
|
882
|
-
|
|
883
|
-
Object.defineProperty(element, '_self', {
|
|
884
|
-
configurable: false,
|
|
885
|
-
enumerable: false,
|
|
886
|
-
writable: false,
|
|
887
|
-
value: self
|
|
888
|
-
}); // Two elements created in two different places should be considered
|
|
889
|
-
// equal for testing purposes and therefore we hide it from enumeration.
|
|
890
|
-
|
|
891
|
-
Object.defineProperty(element, '_source', {
|
|
892
|
-
configurable: false,
|
|
893
|
-
enumerable: false,
|
|
894
|
-
writable: false,
|
|
895
|
-
value: source
|
|
896
|
-
});
|
|
897
|
-
|
|
898
|
-
if (Object.freeze) {
|
|
899
|
-
Object.freeze(element.props);
|
|
900
|
-
Object.freeze(element);
|
|
901
|
-
}
|
|
902
|
-
}
|
|
903
|
-
|
|
904
|
-
return element;
|
|
905
|
-
};
|
|
906
|
-
/**
|
|
907
|
-
* https://github.com/reactjs/rfcs/pull/107
|
|
908
|
-
* @param {*} type
|
|
909
|
-
* @param {object} props
|
|
910
|
-
* @param {string} key
|
|
911
|
-
*/
|
|
912
|
-
|
|
913
|
-
function jsxDEV(type, config, maybeKey, source, self) {
|
|
914
|
-
{
|
|
915
|
-
var propName; // Reserved names are extracted
|
|
916
|
-
|
|
917
|
-
var props = {};
|
|
918
|
-
var key = null;
|
|
919
|
-
var ref = null; // Currently, key can be spread in as a prop. This causes a potential
|
|
920
|
-
// issue if key is also explicitly declared (ie. <div {...props} key="Hi" />
|
|
921
|
-
// or <div key="Hi" {...props} /> ). We want to deprecate key spread,
|
|
922
|
-
// but as an intermediary step, we will use jsxDEV for everything except
|
|
923
|
-
// <div {...props} key="Hi" />, because we aren't currently able to tell if
|
|
924
|
-
// key is explicitly declared to be undefined or not.
|
|
925
|
-
|
|
926
|
-
if (maybeKey !== undefined) {
|
|
927
|
-
{
|
|
928
|
-
checkKeyStringCoercion(maybeKey);
|
|
929
|
-
}
|
|
930
|
-
|
|
931
|
-
key = '' + maybeKey;
|
|
932
|
-
}
|
|
933
|
-
|
|
934
|
-
if (hasValidKey(config)) {
|
|
935
|
-
{
|
|
936
|
-
checkKeyStringCoercion(config.key);
|
|
937
|
-
}
|
|
938
|
-
|
|
939
|
-
key = '' + config.key;
|
|
940
|
-
}
|
|
941
|
-
|
|
942
|
-
if (hasValidRef(config)) {
|
|
943
|
-
ref = config.ref;
|
|
944
|
-
warnIfStringRefCannotBeAutoConverted(config, self);
|
|
945
|
-
} // Remaining properties are added to a new props object
|
|
946
|
-
|
|
947
|
-
|
|
948
|
-
for (propName in config) {
|
|
949
|
-
if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {
|
|
950
|
-
props[propName] = config[propName];
|
|
951
|
-
}
|
|
952
|
-
} // Resolve default props
|
|
953
|
-
|
|
954
|
-
|
|
955
|
-
if (type && type.defaultProps) {
|
|
956
|
-
var defaultProps = type.defaultProps;
|
|
957
|
-
|
|
958
|
-
for (propName in defaultProps) {
|
|
959
|
-
if (props[propName] === undefined) {
|
|
960
|
-
props[propName] = defaultProps[propName];
|
|
961
|
-
}
|
|
172
|
+
return "<...>";
|
|
962
173
|
}
|
|
963
174
|
}
|
|
964
|
-
|
|
965
|
-
|
|
966
|
-
|
|
967
|
-
|
|
968
|
-
if (key) {
|
|
969
|
-
defineKeyPropWarningGetter(props, displayName);
|
|
970
|
-
}
|
|
971
|
-
|
|
972
|
-
if (ref) {
|
|
973
|
-
defineRefPropWarningGetter(props, displayName);
|
|
974
|
-
}
|
|
175
|
+
function getOwner() {
|
|
176
|
+
var dispatcher = ReactSharedInternals.A;
|
|
177
|
+
return null === dispatcher ? null : dispatcher.getOwner();
|
|
975
178
|
}
|
|
976
|
-
|
|
977
|
-
|
|
978
|
-
}
|
|
979
|
-
}
|
|
980
|
-
|
|
981
|
-
var ReactCurrentOwner$1 = ReactSharedInternals.ReactCurrentOwner;
|
|
982
|
-
var ReactDebugCurrentFrame$1 = ReactSharedInternals.ReactDebugCurrentFrame;
|
|
983
|
-
|
|
984
|
-
function setCurrentlyValidatingElement$1(element) {
|
|
985
|
-
{
|
|
986
|
-
if (element) {
|
|
987
|
-
var owner = element._owner;
|
|
988
|
-
var stack = describeUnknownElementTypeFrameInDEV(element.type, element._source, owner ? owner.type : null);
|
|
989
|
-
ReactDebugCurrentFrame$1.setExtraStackFrame(stack);
|
|
990
|
-
} else {
|
|
991
|
-
ReactDebugCurrentFrame$1.setExtraStackFrame(null);
|
|
179
|
+
function UnknownOwner() {
|
|
180
|
+
return Error("react-stack-top-frame");
|
|
992
181
|
}
|
|
993
|
-
|
|
994
|
-
|
|
995
|
-
|
|
996
|
-
|
|
997
|
-
|
|
998
|
-
{
|
|
999
|
-
propTypesMisspellWarningShown = false;
|
|
1000
|
-
}
|
|
1001
|
-
/**
|
|
1002
|
-
* Verifies the object is a ReactElement.
|
|
1003
|
-
* See https://reactjs.org/docs/react-api.html#isvalidelement
|
|
1004
|
-
* @param {?object} object
|
|
1005
|
-
* @return {boolean} True if `object` is a ReactElement.
|
|
1006
|
-
* @final
|
|
1007
|
-
*/
|
|
1008
|
-
|
|
1009
|
-
|
|
1010
|
-
function isValidElement(object) {
|
|
1011
|
-
{
|
|
1012
|
-
return typeof object === 'object' && object !== null && object.$$typeof === REACT_ELEMENT_TYPE;
|
|
1013
|
-
}
|
|
1014
|
-
}
|
|
1015
|
-
|
|
1016
|
-
function getDeclarationErrorAddendum() {
|
|
1017
|
-
{
|
|
1018
|
-
if (ReactCurrentOwner$1.current) {
|
|
1019
|
-
var name = getComponentNameFromType(ReactCurrentOwner$1.current.type);
|
|
1020
|
-
|
|
1021
|
-
if (name) {
|
|
1022
|
-
return '\n\nCheck the render method of `' + name + '`.';
|
|
182
|
+
function hasValidKey(config) {
|
|
183
|
+
if (hasOwnProperty.call(config, "key")) {
|
|
184
|
+
var getter = Object.getOwnPropertyDescriptor(config, "key").get;
|
|
185
|
+
if (getter && getter.isReactWarning) return false;
|
|
1023
186
|
}
|
|
187
|
+
return void 0 !== config.key;
|
|
1024
188
|
}
|
|
1025
|
-
|
|
1026
|
-
|
|
1027
|
-
|
|
1028
|
-
|
|
1029
|
-
|
|
1030
|
-
|
|
1031
|
-
|
|
1032
|
-
|
|
1033
|
-
return '';
|
|
1034
|
-
}
|
|
1035
|
-
}
|
|
1036
|
-
/**
|
|
1037
|
-
* Warn if there's no key explicitly set on dynamic arrays of children or
|
|
1038
|
-
* object keys are not valid. This allows us to keep track of children between
|
|
1039
|
-
* updates.
|
|
1040
|
-
*/
|
|
1041
|
-
|
|
1042
|
-
|
|
1043
|
-
var ownerHasKeyUseWarning = {};
|
|
1044
|
-
|
|
1045
|
-
function getCurrentComponentErrorInfo(parentType) {
|
|
1046
|
-
{
|
|
1047
|
-
var info = getDeclarationErrorAddendum();
|
|
1048
|
-
|
|
1049
|
-
if (!info) {
|
|
1050
|
-
var parentName = typeof parentType === 'string' ? parentType : parentType.displayName || parentType.name;
|
|
1051
|
-
|
|
1052
|
-
if (parentName) {
|
|
1053
|
-
info = "\n\nCheck the top-level render call using <" + parentName + ">.";
|
|
189
|
+
function defineKeyPropWarningGetter(props, displayName) {
|
|
190
|
+
function warnAboutAccessingKey() {
|
|
191
|
+
specialPropKeyWarningShown ||
|
|
192
|
+
((specialPropKeyWarningShown = true),
|
|
193
|
+
console.error(
|
|
194
|
+
"%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",
|
|
195
|
+
displayName
|
|
196
|
+
));
|
|
1054
197
|
}
|
|
198
|
+
warnAboutAccessingKey.isReactWarning = true;
|
|
199
|
+
Object.defineProperty(props, "key", {
|
|
200
|
+
get: warnAboutAccessingKey,
|
|
201
|
+
configurable: true
|
|
202
|
+
});
|
|
1055
203
|
}
|
|
1056
|
-
|
|
1057
|
-
|
|
1058
|
-
|
|
1059
|
-
|
|
1060
|
-
|
|
1061
|
-
|
|
1062
|
-
|
|
1063
|
-
|
|
1064
|
-
|
|
1065
|
-
* will only be shown once.
|
|
1066
|
-
*
|
|
1067
|
-
* @internal
|
|
1068
|
-
* @param {ReactElement} element Element that requires a key.
|
|
1069
|
-
* @param {*} parentType element's parent's type.
|
|
1070
|
-
*/
|
|
1071
|
-
|
|
1072
|
-
|
|
1073
|
-
function validateExplicitKey(element, parentType) {
|
|
1074
|
-
{
|
|
1075
|
-
if (!element._store || element._store.validated || element.key != null) {
|
|
1076
|
-
return;
|
|
1077
|
-
}
|
|
1078
|
-
|
|
1079
|
-
element._store.validated = true;
|
|
1080
|
-
var currentComponentErrorInfo = getCurrentComponentErrorInfo(parentType);
|
|
1081
|
-
|
|
1082
|
-
if (ownerHasKeyUseWarning[currentComponentErrorInfo]) {
|
|
1083
|
-
return;
|
|
1084
|
-
}
|
|
1085
|
-
|
|
1086
|
-
ownerHasKeyUseWarning[currentComponentErrorInfo] = true; // Usually the current owner is the offender, but if it accepts children as a
|
|
1087
|
-
// property, it may be the creator of the child that's responsible for
|
|
1088
|
-
// assigning it a key.
|
|
1089
|
-
|
|
1090
|
-
var childOwner = '';
|
|
1091
|
-
|
|
1092
|
-
if (element && element._owner && element._owner !== ReactCurrentOwner$1.current) {
|
|
1093
|
-
// Give the component that originally created this child.
|
|
1094
|
-
childOwner = " It was passed a child from " + getComponentNameFromType(element._owner.type) + ".";
|
|
204
|
+
function elementRefGetterWithDeprecationWarning() {
|
|
205
|
+
var componentName = getComponentNameFromType(this.type);
|
|
206
|
+
didWarnAboutElementRef[componentName] ||
|
|
207
|
+
((didWarnAboutElementRef[componentName] = true),
|
|
208
|
+
console.error(
|
|
209
|
+
"Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release."
|
|
210
|
+
));
|
|
211
|
+
componentName = this.props.ref;
|
|
212
|
+
return void 0 !== componentName ? componentName : null;
|
|
1095
213
|
}
|
|
1096
|
-
|
|
1097
|
-
|
|
1098
|
-
|
|
1099
|
-
|
|
1100
|
-
|
|
1101
|
-
|
|
1102
|
-
|
|
1103
|
-
|
|
1104
|
-
|
|
1105
|
-
|
|
1106
|
-
|
|
1107
|
-
|
|
1108
|
-
|
|
1109
|
-
|
|
1110
|
-
|
|
1111
|
-
|
|
1112
|
-
|
|
1113
|
-
|
|
1114
|
-
|
|
1115
|
-
|
|
1116
|
-
|
|
1117
|
-
|
|
1118
|
-
|
|
214
|
+
function ReactElement(type, key, props, owner, debugStack, debugTask) {
|
|
215
|
+
var refProp = props.ref;
|
|
216
|
+
type = {
|
|
217
|
+
$$typeof: REACT_ELEMENT_TYPE,
|
|
218
|
+
type: type,
|
|
219
|
+
key: key,
|
|
220
|
+
props: props,
|
|
221
|
+
_owner: owner
|
|
222
|
+
};
|
|
223
|
+
null !== (void 0 !== refProp ? refProp : null)
|
|
224
|
+
? Object.defineProperty(type, "ref", {
|
|
225
|
+
enumerable: false,
|
|
226
|
+
get: elementRefGetterWithDeprecationWarning
|
|
227
|
+
})
|
|
228
|
+
: Object.defineProperty(type, "ref", { enumerable: false, value: null });
|
|
229
|
+
type._store = {};
|
|
230
|
+
Object.defineProperty(type._store, "validated", {
|
|
231
|
+
configurable: false,
|
|
232
|
+
enumerable: false,
|
|
233
|
+
writable: true,
|
|
234
|
+
value: 0
|
|
235
|
+
});
|
|
236
|
+
Object.defineProperty(type, "_debugInfo", {
|
|
237
|
+
configurable: false,
|
|
238
|
+
enumerable: false,
|
|
239
|
+
writable: true,
|
|
240
|
+
value: null
|
|
241
|
+
});
|
|
242
|
+
Object.defineProperty(type, "_debugStack", {
|
|
243
|
+
configurable: false,
|
|
244
|
+
enumerable: false,
|
|
245
|
+
writable: true,
|
|
246
|
+
value: debugStack
|
|
247
|
+
});
|
|
248
|
+
Object.defineProperty(type, "_debugTask", {
|
|
249
|
+
configurable: false,
|
|
250
|
+
enumerable: false,
|
|
251
|
+
writable: true,
|
|
252
|
+
value: debugTask
|
|
253
|
+
});
|
|
254
|
+
Object.freeze && (Object.freeze(type.props), Object.freeze(type));
|
|
255
|
+
return type;
|
|
1119
256
|
}
|
|
1120
|
-
|
|
1121
|
-
|
|
1122
|
-
|
|
1123
|
-
|
|
1124
|
-
|
|
1125
|
-
|
|
1126
|
-
|
|
1127
|
-
|
|
1128
|
-
|
|
1129
|
-
|
|
1130
|
-
|
|
1131
|
-
|
|
1132
|
-
|
|
1133
|
-
|
|
1134
|
-
|
|
1135
|
-
|
|
1136
|
-
|
|
1137
|
-
|
|
1138
|
-
|
|
1139
|
-
|
|
1140
|
-
|
|
1141
|
-
|
|
1142
|
-
|
|
1143
|
-
|
|
1144
|
-
|
|
1145
|
-
|
|
1146
|
-
|
|
1147
|
-
|
|
1148
|
-
|
|
1149
|
-
|
|
257
|
+
function jsxDEVImpl(
|
|
258
|
+
type,
|
|
259
|
+
config,
|
|
260
|
+
maybeKey,
|
|
261
|
+
isStaticChildren,
|
|
262
|
+
debugStack,
|
|
263
|
+
debugTask
|
|
264
|
+
) {
|
|
265
|
+
var children = config.children;
|
|
266
|
+
if (void 0 !== children)
|
|
267
|
+
if (isStaticChildren)
|
|
268
|
+
if (isArrayImpl(children)) {
|
|
269
|
+
for (
|
|
270
|
+
isStaticChildren = 0;
|
|
271
|
+
isStaticChildren < children.length;
|
|
272
|
+
isStaticChildren++
|
|
273
|
+
)
|
|
274
|
+
validateChildKeys(children[isStaticChildren]);
|
|
275
|
+
Object.freeze && Object.freeze(children);
|
|
276
|
+
} else
|
|
277
|
+
console.error(
|
|
278
|
+
"React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead."
|
|
279
|
+
);
|
|
280
|
+
else validateChildKeys(children);
|
|
281
|
+
if (hasOwnProperty.call(config, "key")) {
|
|
282
|
+
children = getComponentNameFromType(type);
|
|
283
|
+
var keys = Object.keys(config).filter(function (k) {
|
|
284
|
+
return "key" !== k;
|
|
285
|
+
});
|
|
286
|
+
isStaticChildren =
|
|
287
|
+
0 < keys.length
|
|
288
|
+
? "{key: someKey, " + keys.join(": ..., ") + ": ...}"
|
|
289
|
+
: "{key: someKey}";
|
|
290
|
+
didWarnAboutKeySpread[children + isStaticChildren] ||
|
|
291
|
+
((keys =
|
|
292
|
+
0 < keys.length ? "{" + keys.join(": ..., ") + ": ...}" : "{}"),
|
|
293
|
+
console.error(
|
|
294
|
+
'A props object containing a "key" prop is being spread into JSX:\n let props = %s;\n <%s {...props} />\nReact keys must be passed directly to JSX without using spread:\n let props = %s;\n <%s key={someKey} {...props} />',
|
|
295
|
+
isStaticChildren,
|
|
296
|
+
children,
|
|
297
|
+
keys,
|
|
298
|
+
children
|
|
299
|
+
),
|
|
300
|
+
(didWarnAboutKeySpread[children + isStaticChildren] = true));
|
|
1150
301
|
}
|
|
302
|
+
children = null;
|
|
303
|
+
void 0 !== maybeKey &&
|
|
304
|
+
(checkKeyStringCoercion(maybeKey), (children = "" + maybeKey));
|
|
305
|
+
hasValidKey(config) &&
|
|
306
|
+
(checkKeyStringCoercion(config.key), (children = "" + config.key));
|
|
307
|
+
if ("key" in config) {
|
|
308
|
+
maybeKey = {};
|
|
309
|
+
for (var propName in config)
|
|
310
|
+
"key" !== propName && (maybeKey[propName] = config[propName]);
|
|
311
|
+
} else maybeKey = config;
|
|
312
|
+
children &&
|
|
313
|
+
defineKeyPropWarningGetter(
|
|
314
|
+
maybeKey,
|
|
315
|
+
"function" === typeof type
|
|
316
|
+
? type.displayName || type.name || "Unknown"
|
|
317
|
+
: type
|
|
318
|
+
);
|
|
319
|
+
return ReactElement(
|
|
320
|
+
type,
|
|
321
|
+
children,
|
|
322
|
+
maybeKey,
|
|
323
|
+
getOwner(),
|
|
324
|
+
debugStack,
|
|
325
|
+
debugTask
|
|
326
|
+
);
|
|
1151
327
|
}
|
|
1152
|
-
|
|
1153
|
-
|
|
1154
|
-
|
|
1155
|
-
|
|
1156
|
-
|
|
1157
|
-
|
|
1158
|
-
|
|
1159
|
-
|
|
1160
|
-
|
|
1161
|
-
|
|
1162
|
-
|
|
1163
|
-
{
|
|
1164
|
-
var type = element.type;
|
|
1165
|
-
|
|
1166
|
-
if (type === null || type === undefined || typeof type === 'string') {
|
|
1167
|
-
return;
|
|
1168
|
-
}
|
|
1169
|
-
|
|
1170
|
-
var propTypes;
|
|
1171
|
-
|
|
1172
|
-
if (typeof type === 'function') {
|
|
1173
|
-
propTypes = type.propTypes;
|
|
1174
|
-
} else if (typeof type === 'object' && (type.$$typeof === REACT_FORWARD_REF_TYPE || // Note: Memo only checks outer props here.
|
|
1175
|
-
// Inner props are checked in the reconciler.
|
|
1176
|
-
type.$$typeof === REACT_MEMO_TYPE)) {
|
|
1177
|
-
propTypes = type.propTypes;
|
|
1178
|
-
} else {
|
|
1179
|
-
return;
|
|
328
|
+
function validateChildKeys(node) {
|
|
329
|
+
isValidElement(node)
|
|
330
|
+
? node._store && (node._store.validated = 1)
|
|
331
|
+
: "object" === typeof node &&
|
|
332
|
+
null !== node &&
|
|
333
|
+
node.$$typeof === REACT_LAZY_TYPE &&
|
|
334
|
+
("fulfilled" === node._payload.status
|
|
335
|
+
? isValidElement(node._payload.value) &&
|
|
336
|
+
node._payload.value._store &&
|
|
337
|
+
(node._payload.value._store.validated = 1)
|
|
338
|
+
: node._store && (node._store.validated = 1));
|
|
1180
339
|
}
|
|
1181
|
-
|
|
1182
|
-
|
|
1183
|
-
|
|
1184
|
-
|
|
1185
|
-
|
|
1186
|
-
|
|
1187
|
-
propTypesMisspellWarningShown = true; // Intentionally inside to avoid triggering lazy initializers:
|
|
1188
|
-
|
|
1189
|
-
var _name = getComponentNameFromType(type);
|
|
1190
|
-
|
|
1191
|
-
error('Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?', _name || 'Unknown');
|
|
340
|
+
function isValidElement(object) {
|
|
341
|
+
return (
|
|
342
|
+
"object" === typeof object &&
|
|
343
|
+
null !== object &&
|
|
344
|
+
object.$$typeof === REACT_ELEMENT_TYPE
|
|
345
|
+
);
|
|
1192
346
|
}
|
|
1193
|
-
|
|
1194
|
-
|
|
1195
|
-
|
|
1196
|
-
|
|
1197
|
-
|
|
1198
|
-
|
|
1199
|
-
|
|
1200
|
-
|
|
1201
|
-
|
|
1202
|
-
|
|
1203
|
-
|
|
1204
|
-
|
|
1205
|
-
|
|
1206
|
-
|
|
1207
|
-
|
|
1208
|
-
|
|
1209
|
-
|
|
1210
|
-
|
|
1211
|
-
|
|
1212
|
-
|
|
1213
|
-
|
|
1214
|
-
|
|
1215
|
-
|
|
1216
|
-
|
|
1217
|
-
|
|
1218
|
-
|
|
1219
|
-
|
|
1220
|
-
}
|
|
1221
|
-
|
|
1222
|
-
if (fragment.ref !== null) {
|
|
1223
|
-
setCurrentlyValidatingElement$1(fragment);
|
|
1224
|
-
|
|
1225
|
-
error('Invalid attribute `ref` supplied to `React.Fragment`.');
|
|
1226
|
-
|
|
1227
|
-
setCurrentlyValidatingElement$1(null);
|
|
1228
|
-
}
|
|
1229
|
-
}
|
|
1230
|
-
}
|
|
1231
|
-
|
|
1232
|
-
function jsxWithValidation(type, props, key, isStaticChildren, source, self) {
|
|
1233
|
-
{
|
|
1234
|
-
var validType = isValidElementType(type); // We warn in this case but don't throw. We expect the element creation to
|
|
1235
|
-
// succeed and there will likely be errors in render.
|
|
1236
|
-
|
|
1237
|
-
if (!validType) {
|
|
1238
|
-
var info = '';
|
|
1239
|
-
|
|
1240
|
-
if (type === undefined || typeof type === 'object' && type !== null && Object.keys(type).length === 0) {
|
|
1241
|
-
info += ' You likely forgot to export your component from the file ' + "it's defined in, or you might have mixed up default and named imports.";
|
|
1242
|
-
}
|
|
1243
|
-
|
|
1244
|
-
var sourceInfo = getSourceInfoErrorAddendum();
|
|
1245
|
-
|
|
1246
|
-
if (sourceInfo) {
|
|
1247
|
-
info += sourceInfo;
|
|
1248
|
-
} else {
|
|
1249
|
-
info += getDeclarationErrorAddendum();
|
|
1250
|
-
}
|
|
1251
|
-
|
|
1252
|
-
var typeString;
|
|
1253
|
-
|
|
1254
|
-
if (type === null) {
|
|
1255
|
-
typeString = 'null';
|
|
1256
|
-
} else if (isArray(type)) {
|
|
1257
|
-
typeString = 'array';
|
|
1258
|
-
} else if (type !== undefined && type.$$typeof === REACT_ELEMENT_TYPE) {
|
|
1259
|
-
typeString = "<" + (getComponentNameFromType(type.type) || 'Unknown') + " />";
|
|
1260
|
-
info = ' Did you accidentally export a JSX literal instead of a component?';
|
|
1261
|
-
} else {
|
|
1262
|
-
typeString = typeof type;
|
|
1263
|
-
}
|
|
1264
|
-
|
|
1265
|
-
error('React.jsx: type is invalid -- expected a string (for ' + 'built-in components) or a class/function (for composite ' + 'components) but got: %s.%s', typeString, info);
|
|
1266
|
-
}
|
|
1267
|
-
|
|
1268
|
-
var element = jsxDEV(type, props, key, source, self); // The result can be nullish if a mock or a custom function is used.
|
|
1269
|
-
// TODO: Drop this when these are no longer allowed as the type argument.
|
|
1270
|
-
|
|
1271
|
-
if (element == null) {
|
|
1272
|
-
return element;
|
|
1273
|
-
} // Skip key warning if the type isn't valid since our key validation logic
|
|
1274
|
-
// doesn't expect a non-string/function type and can throw confusing errors.
|
|
1275
|
-
// We don't want exception behavior to differ between dev and prod.
|
|
1276
|
-
// (Rendering will throw with a helpful message and as soon as the type is
|
|
1277
|
-
// fixed, the key warnings will appear.)
|
|
1278
|
-
|
|
1279
|
-
|
|
1280
|
-
if (validType) {
|
|
1281
|
-
var children = props.children;
|
|
1282
|
-
|
|
1283
|
-
if (children !== undefined) {
|
|
1284
|
-
if (isStaticChildren) {
|
|
1285
|
-
if (isArray(children)) {
|
|
1286
|
-
for (var i = 0; i < children.length; i++) {
|
|
1287
|
-
validateChildKeys(children[i], type);
|
|
1288
|
-
}
|
|
1289
|
-
|
|
1290
|
-
if (Object.freeze) {
|
|
1291
|
-
Object.freeze(children);
|
|
1292
|
-
}
|
|
1293
|
-
} else {
|
|
1294
|
-
error('React.jsx: Static children should always be an array. ' + 'You are likely explicitly calling React.jsxs or React.jsxDEV. ' + 'Use the Babel transform instead.');
|
|
1295
|
-
}
|
|
1296
|
-
} else {
|
|
1297
|
-
validateChildKeys(children, type);
|
|
1298
|
-
}
|
|
347
|
+
var React = require$$0,
|
|
348
|
+
REACT_ELEMENT_TYPE = Symbol.for("react.transitional.element"),
|
|
349
|
+
REACT_PORTAL_TYPE = Symbol.for("react.portal"),
|
|
350
|
+
REACT_FRAGMENT_TYPE = Symbol.for("react.fragment"),
|
|
351
|
+
REACT_STRICT_MODE_TYPE = Symbol.for("react.strict_mode"),
|
|
352
|
+
REACT_PROFILER_TYPE = Symbol.for("react.profiler"),
|
|
353
|
+
REACT_CONSUMER_TYPE = Symbol.for("react.consumer"),
|
|
354
|
+
REACT_CONTEXT_TYPE = Symbol.for("react.context"),
|
|
355
|
+
REACT_FORWARD_REF_TYPE = Symbol.for("react.forward_ref"),
|
|
356
|
+
REACT_SUSPENSE_TYPE = Symbol.for("react.suspense"),
|
|
357
|
+
REACT_SUSPENSE_LIST_TYPE = Symbol.for("react.suspense_list"),
|
|
358
|
+
REACT_MEMO_TYPE = Symbol.for("react.memo"),
|
|
359
|
+
REACT_LAZY_TYPE = Symbol.for("react.lazy"),
|
|
360
|
+
REACT_ACTIVITY_TYPE = Symbol.for("react.activity"),
|
|
361
|
+
REACT_CLIENT_REFERENCE = Symbol.for("react.client.reference"),
|
|
362
|
+
ReactSharedInternals =
|
|
363
|
+
React.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,
|
|
364
|
+
hasOwnProperty = Object.prototype.hasOwnProperty,
|
|
365
|
+
isArrayImpl = Array.isArray,
|
|
366
|
+
createTask = console.createTask
|
|
367
|
+
? console.createTask
|
|
368
|
+
: function () {
|
|
369
|
+
return null;
|
|
370
|
+
};
|
|
371
|
+
React = {
|
|
372
|
+
react_stack_bottom_frame: function (callStackForError) {
|
|
373
|
+
return callStackForError();
|
|
1299
374
|
}
|
|
1300
|
-
}
|
|
1301
|
-
|
|
1302
|
-
|
|
1303
|
-
|
|
1304
|
-
|
|
1305
|
-
|
|
1306
|
-
|
|
1307
|
-
|
|
1308
|
-
|
|
1309
|
-
|
|
1310
|
-
|
|
1311
|
-
|
|
1312
|
-
|
|
1313
|
-
|
|
1314
|
-
|
|
1315
|
-
|
|
1316
|
-
|
|
1317
|
-
|
|
1318
|
-
|
|
1319
|
-
|
|
1320
|
-
|
|
1321
|
-
|
|
1322
|
-
|
|
1323
|
-
|
|
1324
|
-
|
|
1325
|
-
|
|
1326
|
-
|
|
1327
|
-
|
|
1328
|
-
|
|
1329
|
-
|
|
1330
|
-
|
|
1331
|
-
|
|
1332
|
-
|
|
1333
|
-
|
|
375
|
+
};
|
|
376
|
+
var specialPropKeyWarningShown;
|
|
377
|
+
var didWarnAboutElementRef = {};
|
|
378
|
+
var unknownOwnerDebugStack = React.react_stack_bottom_frame.bind(
|
|
379
|
+
React,
|
|
380
|
+
UnknownOwner
|
|
381
|
+
)();
|
|
382
|
+
var unknownOwnerDebugTask = createTask(getTaskName(UnknownOwner));
|
|
383
|
+
var didWarnAboutKeySpread = {};
|
|
384
|
+
reactJsxRuntime_development.Fragment = REACT_FRAGMENT_TYPE;
|
|
385
|
+
reactJsxRuntime_development.jsx = function (type, config, maybeKey) {
|
|
386
|
+
var trackActualOwner =
|
|
387
|
+
1e4 > ReactSharedInternals.recentlyCreatedOwnerStacks++;
|
|
388
|
+
return jsxDEVImpl(
|
|
389
|
+
type,
|
|
390
|
+
config,
|
|
391
|
+
maybeKey,
|
|
392
|
+
false,
|
|
393
|
+
trackActualOwner
|
|
394
|
+
? Error("react-stack-top-frame")
|
|
395
|
+
: unknownOwnerDebugStack,
|
|
396
|
+
trackActualOwner ? createTask(getTaskName(type)) : unknownOwnerDebugTask
|
|
397
|
+
);
|
|
398
|
+
};
|
|
399
|
+
reactJsxRuntime_development.jsxs = function (type, config, maybeKey) {
|
|
400
|
+
var trackActualOwner =
|
|
401
|
+
1e4 > ReactSharedInternals.recentlyCreatedOwnerStacks++;
|
|
402
|
+
return jsxDEVImpl(
|
|
403
|
+
type,
|
|
404
|
+
config,
|
|
405
|
+
maybeKey,
|
|
406
|
+
true,
|
|
407
|
+
trackActualOwner
|
|
408
|
+
? Error("react-stack-top-frame")
|
|
409
|
+
: unknownOwnerDebugStack,
|
|
410
|
+
trackActualOwner ? createTask(getTaskName(type)) : unknownOwnerDebugTask
|
|
411
|
+
);
|
|
412
|
+
};
|
|
1334
413
|
})();
|
|
1335
|
-
}
|
|
1336
414
|
return reactJsxRuntime_development;
|
|
1337
415
|
}
|
|
1338
416
|
|
|
1339
417
|
if (process.env.NODE_ENV === 'production') {
|
|
1340
|
-
jsxRuntime.exports =
|
|
418
|
+
jsxRuntime.exports = requireReactJsxRuntime_production();
|
|
1341
419
|
} else {
|
|
1342
420
|
jsxRuntime.exports = requireReactJsxRuntime_development();
|
|
1343
421
|
}
|
|
@@ -2054,7 +1132,7 @@ function RlsNavbar({ children, identifier, rlsTheme }) {
|
|
|
2054
1132
|
|
|
2055
1133
|
function RlsPagination({ suggestions, count, filter, onPagination }) {
|
|
2056
1134
|
const [template, setTemplate] = require$$0.useState();
|
|
2057
|
-
const controller = require$$0.useRef();
|
|
1135
|
+
const controller = require$$0.useRef(undefined);
|
|
2058
1136
|
const refreshTemplate = require$$0.useCallback((template, suggestions) => {
|
|
2059
1137
|
const { firstPage, lastPage } = template;
|
|
2060
1138
|
onPagination && onPagination({ firstPage, lastPage, suggestions });
|
|
@@ -2693,7 +1771,7 @@ function useListController(props) {
|
|
|
2693
1771
|
});
|
|
2694
1772
|
const changeValueInternal = require$$0.useRef(false);
|
|
2695
1773
|
const position = require$$0.useRef(0);
|
|
2696
|
-
const valueProtected = require$$0.useRef();
|
|
1774
|
+
const valueProtected = require$$0.useRef(undefined);
|
|
2697
1775
|
require$$0.useEffect(() => {
|
|
2698
1776
|
function onCloseSuggestions({ target }) {
|
|
2699
1777
|
!refContent?.current?.contains(target) &&
|
|
@@ -3389,21 +2467,11 @@ function RlsFieldSelect(props) {
|
|
|
3389
2467
|
return jsxRuntimeExports.jsx(RlsFieldSelectTemplate, { ...props, render: render });
|
|
3390
2468
|
}
|
|
3391
2469
|
|
|
3392
|
-
function RlsFormNavigation({
|
|
2470
|
+
function RlsFormNavigation({ children, className, visible, rlsTheme }) {
|
|
3393
2471
|
const classNameForm = require$$0.useMemo(() => {
|
|
3394
2472
|
return renderClassStatus('rls-form-navigation', { visible }, className);
|
|
3395
2473
|
}, [visible, className]);
|
|
3396
|
-
|
|
3397
|
-
onAutoClose && onAutoClose();
|
|
3398
|
-
}, [onAutoClose]);
|
|
3399
|
-
return ReactDOM.createPortal(jsxRuntimeExports.jsxs("div", { className: classNameForm, "rls-theme": rlsTheme, children: [jsxRuntimeExports.jsx("div", { className: "rls-form-navigation__component", children: children }), jsxRuntimeExports.jsx("div", { className: "rls-form-navigation__backdrop", onClick: onClickBackdrop })] }), document.body);
|
|
3400
|
-
}
|
|
3401
|
-
|
|
3402
|
-
function useFormNavigationController(portal) {
|
|
3403
|
-
const FormNavigation = require$$0.useCallback(({ children }) => {
|
|
3404
|
-
return (jsxRuntimeExports.jsx(RlsFormNavigation, { visible: portal.visible, children: children }));
|
|
3405
|
-
}, [portal.visible]);
|
|
3406
|
-
return FormNavigation;
|
|
2474
|
+
return ReactDOM.createPortal(jsxRuntimeExports.jsx("div", { className: classNameForm, "rls-theme": rlsTheme, children: jsxRuntimeExports.jsx("div", { className: "rls-form-navigation__component", children: children }) }), document.body);
|
|
3407
2475
|
}
|
|
3408
2476
|
|
|
3409
2477
|
function useRelocationOnComponent({ container, element, onDrag }) {
|
|
@@ -3574,7 +2642,7 @@ function RlsImageEditor(props) {
|
|
|
3574
2642
|
const refCanvas = require$$0.useRef(null);
|
|
3575
2643
|
const refPicture = require$$0.useRef(null);
|
|
3576
2644
|
const image = require$$0.useRef(new Image());
|
|
3577
|
-
const originalImage = require$$0.useRef();
|
|
2645
|
+
const originalImage = require$$0.useRef(undefined);
|
|
3578
2646
|
const ratio = require$$0.useMemo(() => {
|
|
3579
2647
|
return props.ratio || '1:1';
|
|
3580
2648
|
}, [props.ratio]);
|
|
@@ -3863,7 +2931,7 @@ function RlsSnackbar({ content, onClose, icon, rlsTheme, title, visible }) {
|
|
|
3863
2931
|
return (jsxRuntimeExports.jsxs("div", { className: className, "rls-theme": rlsTheme, children: [icon && (jsxRuntimeExports.jsx("div", { className: "rls-snackbar__avatar", children: jsxRuntimeExports.jsx(RlsIcon, { value: icon }) })), jsxRuntimeExports.jsxs("div", { className: "rls-snackbar__component", children: [jsxRuntimeExports.jsxs("div", { className: "rls-snackbar__header", children: [jsxRuntimeExports.jsx("div", { className: "rls-snackbar__title", children: title }), jsxRuntimeExports.jsx("button", { onClick: onClose, children: jsxRuntimeExports.jsx(RlsIcon, { value: "close" }) })] }), jsxRuntimeExports.jsx("div", { className: "rls-snackbar__content", children: content })] })] }));
|
|
3864
2932
|
}
|
|
3865
2933
|
function useSnackbar() {
|
|
3866
|
-
const timeoutId = require$$0.useRef();
|
|
2934
|
+
const timeoutId = require$$0.useRef(undefined);
|
|
3867
2935
|
const duration = require$$0.useRef(4000);
|
|
3868
2936
|
const [state, setState] = require$$0.useState({
|
|
3869
2937
|
config: {},
|
|
@@ -4040,7 +3108,6 @@ exports.useConfirmation = useConfirmation;
|
|
|
4040
3108
|
exports.useDatatable = useDatatable;
|
|
4041
3109
|
exports.useFieldAutocomplete = useFieldAutocomplete;
|
|
4042
3110
|
exports.useFieldSelect = useFieldSelect;
|
|
4043
|
-
exports.useFormNavigationController = useFormNavigationController;
|
|
4044
3111
|
exports.useFormSingleSelectionController = useFormSingleSelectionController;
|
|
4045
3112
|
exports.useFormToggleController = useFormToggleController;
|
|
4046
3113
|
exports.useImageEditorController = useImageEditorController;
|