react-composable-treeview 1.0.15 → 1.0.17
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.cjs +8 -8
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +197 -197
- package/dist/index.js.map +1 -1
- package/dist/treeView.d.ts +1 -0
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import $e, { createContext as Ne, useState as Ye, useCallback as We, forwardRef as K, useRef as re, useContext as
|
|
1
|
+
import $e, { createContext as Ne, useState as Ye, useCallback as We, forwardRef as K, useRef as re, useContext as I, useEffect as Ue } from "react";
|
|
2
2
|
var ce = { exports: {} }, G = {};
|
|
3
3
|
/**
|
|
4
4
|
* @license React
|
|
@@ -13,15 +13,15 @@ var Ve;
|
|
|
13
13
|
function br() {
|
|
14
14
|
if (Ve) return G;
|
|
15
15
|
Ve = 1;
|
|
16
|
-
var t = $e, o = Symbol.for("react.element"), i = Symbol.for("react.fragment"), a = Object.prototype.hasOwnProperty,
|
|
17
|
-
function
|
|
18
|
-
var
|
|
19
|
-
|
|
20
|
-
for (
|
|
21
|
-
if (s && s.defaultProps) for (
|
|
22
|
-
return { $$typeof: o, type: s, key:
|
|
16
|
+
var t = $e, o = Symbol.for("react.element"), i = Symbol.for("react.fragment"), a = Object.prototype.hasOwnProperty, p = t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, d = { key: !0, ref: !0, __self: !0, __source: !0 };
|
|
17
|
+
function _(s, l, C) {
|
|
18
|
+
var g, y = {}, S = null, T = null;
|
|
19
|
+
C !== void 0 && (S = "" + C), l.key !== void 0 && (S = "" + l.key), l.ref !== void 0 && (T = l.ref);
|
|
20
|
+
for (g in l) a.call(l, g) && !d.hasOwnProperty(g) && (y[g] = l[g]);
|
|
21
|
+
if (s && s.defaultProps) for (g in l = s.defaultProps, l) y[g] === void 0 && (y[g] = l[g]);
|
|
22
|
+
return { $$typeof: o, type: s, key: S, ref: T, props: y, _owner: p.current };
|
|
23
23
|
}
|
|
24
|
-
return G.Fragment = i, G.jsx =
|
|
24
|
+
return G.Fragment = i, G.jsx = _, G.jsxs = _, G;
|
|
25
25
|
}
|
|
26
26
|
var B = {};
|
|
27
27
|
/**
|
|
@@ -36,35 +36,35 @@ var B = {};
|
|
|
36
36
|
var Le;
|
|
37
37
|
function Er() {
|
|
38
38
|
return Le || (Le = 1, process.env.NODE_ENV !== "production" && function() {
|
|
39
|
-
var t = $e, o = Symbol.for("react.element"), i = Symbol.for("react.portal"), a = Symbol.for("react.fragment"),
|
|
40
|
-
function
|
|
39
|
+
var t = $e, o = Symbol.for("react.element"), i = Symbol.for("react.portal"), a = Symbol.for("react.fragment"), p = Symbol.for("react.strict_mode"), d = Symbol.for("react.profiler"), _ = Symbol.for("react.provider"), s = Symbol.for("react.context"), l = Symbol.for("react.forward_ref"), C = Symbol.for("react.suspense"), g = Symbol.for("react.suspense_list"), y = Symbol.for("react.memo"), S = Symbol.for("react.lazy"), T = Symbol.for("react.offscreen"), A = Symbol.iterator, V = "@@iterator";
|
|
40
|
+
function E(e) {
|
|
41
41
|
if (e === null || typeof e != "object")
|
|
42
42
|
return null;
|
|
43
|
-
var r =
|
|
43
|
+
var r = A && e[A] || e[V];
|
|
44
44
|
return typeof r == "function" ? r : null;
|
|
45
45
|
}
|
|
46
|
-
var
|
|
47
|
-
function
|
|
46
|
+
var O = t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
|
|
47
|
+
function R(e) {
|
|
48
48
|
{
|
|
49
49
|
for (var r = arguments.length, n = new Array(r > 1 ? r - 1 : 0), u = 1; u < r; u++)
|
|
50
50
|
n[u - 1] = arguments[u];
|
|
51
|
-
|
|
51
|
+
w("error", e, n);
|
|
52
52
|
}
|
|
53
53
|
}
|
|
54
|
-
function
|
|
54
|
+
function w(e, r, n) {
|
|
55
55
|
{
|
|
56
|
-
var u =
|
|
57
|
-
|
|
58
|
-
var
|
|
56
|
+
var u = O.ReactDebugCurrentFrame, v = u.getStackAddendum();
|
|
57
|
+
v !== "" && (r += "%s", n = n.concat([v]));
|
|
58
|
+
var h = n.map(function(f) {
|
|
59
59
|
return String(f);
|
|
60
60
|
});
|
|
61
|
-
|
|
61
|
+
h.unshift("Warning: " + r), Function.prototype.apply.call(console[e], console, h);
|
|
62
62
|
}
|
|
63
63
|
}
|
|
64
|
-
var
|
|
64
|
+
var P = !1, j = !1, z = !1, M = !1, Be = !1, le;
|
|
65
65
|
le = Symbol.for("react.module.reference");
|
|
66
66
|
function qe(e) {
|
|
67
|
-
return !!(typeof e == "string" || typeof e == "function" || e === a || e ===
|
|
67
|
+
return !!(typeof e == "string" || typeof e == "function" || e === a || e === d || Be || e === p || e === C || e === g || M || e === T || P || j || z || typeof e == "object" && e !== null && (e.$$typeof === S || e.$$typeof === y || e.$$typeof === _ || e.$$typeof === s || e.$$typeof === l || // This needs to include all possible module reference object
|
|
68
68
|
// types supported by any Flight configuration anywhere since
|
|
69
69
|
// we don't know which Flight build this will end up being used
|
|
70
70
|
// with.
|
|
@@ -74,8 +74,8 @@ function Er() {
|
|
|
74
74
|
var u = e.displayName;
|
|
75
75
|
if (u)
|
|
76
76
|
return u;
|
|
77
|
-
var
|
|
78
|
-
return
|
|
77
|
+
var v = r.displayName || r.name || "";
|
|
78
|
+
return v !== "" ? n + "(" + v + ")" : n;
|
|
79
79
|
}
|
|
80
80
|
function de(e) {
|
|
81
81
|
return e.displayName || "Context";
|
|
@@ -83,7 +83,7 @@ function Er() {
|
|
|
83
83
|
function L(e) {
|
|
84
84
|
if (e == null)
|
|
85
85
|
return null;
|
|
86
|
-
if (typeof e.tag == "number" &&
|
|
86
|
+
if (typeof e.tag == "number" && R("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."), typeof e == "function")
|
|
87
87
|
return e.displayName || e.name || null;
|
|
88
88
|
if (typeof e == "string")
|
|
89
89
|
return e;
|
|
@@ -92,13 +92,13 @@ function Er() {
|
|
|
92
92
|
return "Fragment";
|
|
93
93
|
case i:
|
|
94
94
|
return "Portal";
|
|
95
|
-
case
|
|
95
|
+
case d:
|
|
96
96
|
return "Profiler";
|
|
97
|
-
case
|
|
97
|
+
case p:
|
|
98
98
|
return "StrictMode";
|
|
99
|
-
case
|
|
99
|
+
case C:
|
|
100
100
|
return "Suspense";
|
|
101
|
-
case
|
|
101
|
+
case g:
|
|
102
102
|
return "SuspenseList";
|
|
103
103
|
}
|
|
104
104
|
if (typeof e == "object")
|
|
@@ -106,18 +106,18 @@ function Er() {
|
|
|
106
106
|
case s:
|
|
107
107
|
var r = e;
|
|
108
108
|
return de(r) + ".Consumer";
|
|
109
|
-
case
|
|
109
|
+
case _:
|
|
110
110
|
var n = e;
|
|
111
111
|
return de(n._context) + ".Provider";
|
|
112
|
-
case
|
|
112
|
+
case l:
|
|
113
113
|
return Ke(e, e.render, "ForwardRef");
|
|
114
|
-
case
|
|
114
|
+
case y:
|
|
115
115
|
var u = e.displayName || null;
|
|
116
116
|
return u !== null ? u : L(e.type) || "Memo";
|
|
117
|
-
case
|
|
118
|
-
var
|
|
117
|
+
case S: {
|
|
118
|
+
var v = e, h = v._payload, f = v._init;
|
|
119
119
|
try {
|
|
120
|
-
return L(f(
|
|
120
|
+
return L(f(h));
|
|
121
121
|
} catch {
|
|
122
122
|
return null;
|
|
123
123
|
}
|
|
@@ -184,17 +184,17 @@ function Er() {
|
|
|
184
184
|
})
|
|
185
185
|
});
|
|
186
186
|
}
|
|
187
|
-
U < 0 &&
|
|
187
|
+
U < 0 && R("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
|
|
188
188
|
}
|
|
189
189
|
}
|
|
190
|
-
var te =
|
|
190
|
+
var te = O.ReactCurrentDispatcher, ne;
|
|
191
191
|
function H(e, r, n) {
|
|
192
192
|
{
|
|
193
193
|
if (ne === void 0)
|
|
194
194
|
try {
|
|
195
195
|
throw Error();
|
|
196
|
-
} catch (
|
|
197
|
-
var u =
|
|
196
|
+
} catch (v) {
|
|
197
|
+
var u = v.stack.trim().match(/\n( *(at )?)/);
|
|
198
198
|
ne = u && u[1] || "";
|
|
199
199
|
}
|
|
200
200
|
return `
|
|
@@ -216,10 +216,10 @@ function Er() {
|
|
|
216
216
|
}
|
|
217
217
|
var u;
|
|
218
218
|
oe = !0;
|
|
219
|
-
var
|
|
219
|
+
var v = Error.prepareStackTrace;
|
|
220
220
|
Error.prepareStackTrace = void 0;
|
|
221
|
-
var
|
|
222
|
-
|
|
221
|
+
var h;
|
|
222
|
+
h = te.current, te.current = null, Je();
|
|
223
223
|
try {
|
|
224
224
|
if (r) {
|
|
225
225
|
var f = function() {
|
|
@@ -232,47 +232,47 @@ function Er() {
|
|
|
232
232
|
}), typeof Reflect == "object" && Reflect.construct) {
|
|
233
233
|
try {
|
|
234
234
|
Reflect.construct(f, []);
|
|
235
|
-
} catch (
|
|
236
|
-
u =
|
|
235
|
+
} catch (D) {
|
|
236
|
+
u = D;
|
|
237
237
|
}
|
|
238
238
|
Reflect.construct(e, [], f);
|
|
239
239
|
} else {
|
|
240
240
|
try {
|
|
241
241
|
f.call();
|
|
242
|
-
} catch (
|
|
243
|
-
u =
|
|
242
|
+
} catch (D) {
|
|
243
|
+
u = D;
|
|
244
244
|
}
|
|
245
245
|
e.call(f.prototype);
|
|
246
246
|
}
|
|
247
247
|
} else {
|
|
248
248
|
try {
|
|
249
249
|
throw Error();
|
|
250
|
-
} catch (
|
|
251
|
-
u =
|
|
250
|
+
} catch (D) {
|
|
251
|
+
u = D;
|
|
252
252
|
}
|
|
253
253
|
e();
|
|
254
254
|
}
|
|
255
|
-
} catch (
|
|
256
|
-
if (
|
|
257
|
-
for (var c =
|
|
258
|
-
`),
|
|
259
|
-
`),
|
|
255
|
+
} catch (D) {
|
|
256
|
+
if (D && u && typeof D.stack == "string") {
|
|
257
|
+
for (var c = D.stack.split(`
|
|
258
|
+
`), x = u.stack.split(`
|
|
259
|
+
`), b = c.length - 1, m = x.length - 1; b >= 1 && m >= 0 && c[b] !== x[m]; )
|
|
260
260
|
m--;
|
|
261
|
-
for (;
|
|
262
|
-
if (c[
|
|
263
|
-
if (
|
|
261
|
+
for (; b >= 1 && m >= 0; b--, m--)
|
|
262
|
+
if (c[b] !== x[m]) {
|
|
263
|
+
if (b !== 1 || m !== 1)
|
|
264
264
|
do
|
|
265
|
-
if (
|
|
266
|
-
var
|
|
267
|
-
` + c[
|
|
268
|
-
return e.displayName &&
|
|
265
|
+
if (b--, m--, m < 0 || c[b] !== x[m]) {
|
|
266
|
+
var k = `
|
|
267
|
+
` + c[b].replace(" at new ", " at ");
|
|
268
|
+
return e.displayName && k.includes("<anonymous>") && (k = k.replace("<anonymous>", e.displayName)), typeof e == "function" && X.set(e, k), k;
|
|
269
269
|
}
|
|
270
|
-
while (
|
|
270
|
+
while (b >= 1 && m >= 0);
|
|
271
271
|
break;
|
|
272
272
|
}
|
|
273
273
|
}
|
|
274
274
|
} finally {
|
|
275
|
-
oe = !1, te.current =
|
|
275
|
+
oe = !1, te.current = h, ze(), Error.prepareStackTrace = v;
|
|
276
276
|
}
|
|
277
277
|
var Y = e ? e.displayName || e.name : "", Ie = Y ? H(Y) : "";
|
|
278
278
|
return typeof e == "function" && X.set(e, Ie), Ie;
|
|
@@ -292,28 +292,28 @@ function Er() {
|
|
|
292
292
|
if (typeof e == "string")
|
|
293
293
|
return H(e);
|
|
294
294
|
switch (e) {
|
|
295
|
-
case
|
|
295
|
+
case C:
|
|
296
296
|
return H("Suspense");
|
|
297
|
-
case
|
|
297
|
+
case g:
|
|
298
298
|
return H("SuspenseList");
|
|
299
299
|
}
|
|
300
300
|
if (typeof e == "object")
|
|
301
301
|
switch (e.$$typeof) {
|
|
302
|
-
case
|
|
302
|
+
case l:
|
|
303
303
|
return He(e.render);
|
|
304
|
-
case
|
|
304
|
+
case y:
|
|
305
305
|
return Z(e.type, r, n);
|
|
306
|
-
case
|
|
307
|
-
var u = e,
|
|
306
|
+
case S: {
|
|
307
|
+
var u = e, v = u._payload, h = u._init;
|
|
308
308
|
try {
|
|
309
|
-
return Z(
|
|
309
|
+
return Z(h(v), r, n);
|
|
310
310
|
} catch {
|
|
311
311
|
}
|
|
312
312
|
}
|
|
313
313
|
}
|
|
314
314
|
return "";
|
|
315
315
|
}
|
|
316
|
-
var Q = Object.prototype.hasOwnProperty, ye = {}, we =
|
|
316
|
+
var Q = Object.prototype.hasOwnProperty, ye = {}, we = O.ReactDebugCurrentFrame;
|
|
317
317
|
function ee(e) {
|
|
318
318
|
if (e) {
|
|
319
319
|
var r = e._owner, n = Z(e.type, e._source, r ? r.type : null);
|
|
@@ -321,22 +321,22 @@ function Er() {
|
|
|
321
321
|
} else
|
|
322
322
|
we.setExtraStackFrame(null);
|
|
323
323
|
}
|
|
324
|
-
function Ze(e, r, n, u,
|
|
324
|
+
function Ze(e, r, n, u, v) {
|
|
325
325
|
{
|
|
326
|
-
var
|
|
326
|
+
var h = Function.call.bind(Q);
|
|
327
327
|
for (var f in e)
|
|
328
|
-
if (
|
|
328
|
+
if (h(e, f)) {
|
|
329
329
|
var c = void 0;
|
|
330
330
|
try {
|
|
331
331
|
if (typeof e[f] != "function") {
|
|
332
|
-
var
|
|
333
|
-
throw
|
|
332
|
+
var x = Error((u || "React class") + ": " + n + " type `" + f + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof e[f] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");
|
|
333
|
+
throw x.name = "Invariant Violation", x;
|
|
334
334
|
}
|
|
335
335
|
c = e[f](r, f, u, n, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
|
|
336
|
-
} catch (
|
|
337
|
-
c =
|
|
336
|
+
} catch (b) {
|
|
337
|
+
c = b;
|
|
338
338
|
}
|
|
339
|
-
c && !(c instanceof Error) && (ee(
|
|
339
|
+
c && !(c instanceof Error) && (ee(v), R("%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).", u || "React class", n, f, typeof c), ee(null)), c instanceof Error && !(c.message in ye) && (ye[c.message] = !0, ee(v), R("Failed %s type: %s", n, c.message), ee(null));
|
|
340
340
|
}
|
|
341
341
|
}
|
|
342
342
|
}
|
|
@@ -362,9 +362,9 @@ function Er() {
|
|
|
362
362
|
}
|
|
363
363
|
function xe(e) {
|
|
364
364
|
if (rr(e))
|
|
365
|
-
return
|
|
365
|
+
return R("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", er(e)), Te(e);
|
|
366
366
|
}
|
|
367
|
-
var Ce =
|
|
367
|
+
var Ce = O.ReactCurrentOwner, tr = {
|
|
368
368
|
key: !0,
|
|
369
369
|
ref: !0,
|
|
370
370
|
__self: !0,
|
|
@@ -392,7 +392,7 @@ function Er() {
|
|
|
392
392
|
function ir(e, r) {
|
|
393
393
|
{
|
|
394
394
|
var n = function() {
|
|
395
|
-
Se || (Se = !0,
|
|
395
|
+
Se || (Se = !0, R("%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)", r));
|
|
396
396
|
};
|
|
397
397
|
n.isReactWarning = !0, Object.defineProperty(e, "key", {
|
|
398
398
|
get: n,
|
|
@@ -403,7 +403,7 @@ function Er() {
|
|
|
403
403
|
function ur(e, r) {
|
|
404
404
|
{
|
|
405
405
|
var n = function() {
|
|
406
|
-
Pe || (Pe = !0,
|
|
406
|
+
Pe || (Pe = !0, R("%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)", r));
|
|
407
407
|
};
|
|
408
408
|
n.isReactWarning = !0, Object.defineProperty(e, "ref", {
|
|
409
409
|
get: n,
|
|
@@ -411,7 +411,7 @@ function Er() {
|
|
|
411
411
|
});
|
|
412
412
|
}
|
|
413
413
|
}
|
|
414
|
-
var sr = function(e, r, n, u,
|
|
414
|
+
var sr = function(e, r, n, u, v, h, f) {
|
|
415
415
|
var c = {
|
|
416
416
|
// This tag allows us to uniquely identify this as a React Element
|
|
417
417
|
$$typeof: o,
|
|
@@ -421,7 +421,7 @@ function Er() {
|
|
|
421
421
|
ref: n,
|
|
422
422
|
props: f,
|
|
423
423
|
// Record the component responsible for creating this element.
|
|
424
|
-
_owner:
|
|
424
|
+
_owner: h
|
|
425
425
|
};
|
|
426
426
|
return c._store = {}, Object.defineProperty(c._store, "validated", {
|
|
427
427
|
configurable: !1,
|
|
@@ -437,28 +437,28 @@ function Er() {
|
|
|
437
437
|
configurable: !1,
|
|
438
438
|
enumerable: !1,
|
|
439
439
|
writable: !1,
|
|
440
|
-
value:
|
|
440
|
+
value: v
|
|
441
441
|
}), Object.freeze && (Object.freeze(c.props), Object.freeze(c)), c;
|
|
442
442
|
};
|
|
443
|
-
function cr(e, r, n, u,
|
|
443
|
+
function cr(e, r, n, u, v) {
|
|
444
444
|
{
|
|
445
|
-
var
|
|
446
|
-
n !== void 0 && (xe(n), c = "" + n), or(r) && (xe(r.key), c = "" + r.key), nr(r) && (
|
|
447
|
-
for (
|
|
448
|
-
Q.call(r,
|
|
445
|
+
var h, f = {}, c = null, x = null;
|
|
446
|
+
n !== void 0 && (xe(n), c = "" + n), or(r) && (xe(r.key), c = "" + r.key), nr(r) && (x = r.ref, ar(r, v));
|
|
447
|
+
for (h in r)
|
|
448
|
+
Q.call(r, h) && !tr.hasOwnProperty(h) && (f[h] = r[h]);
|
|
449
449
|
if (e && e.defaultProps) {
|
|
450
|
-
var
|
|
451
|
-
for (
|
|
452
|
-
f[
|
|
450
|
+
var b = e.defaultProps;
|
|
451
|
+
for (h in b)
|
|
452
|
+
f[h] === void 0 && (f[h] = b[h]);
|
|
453
453
|
}
|
|
454
|
-
if (c ||
|
|
454
|
+
if (c || x) {
|
|
455
455
|
var m = typeof e == "function" ? e.displayName || e.name || "Unknown" : e;
|
|
456
|
-
c && ir(f, m),
|
|
456
|
+
c && ir(f, m), x && ur(f, m);
|
|
457
457
|
}
|
|
458
|
-
return sr(e, c,
|
|
458
|
+
return sr(e, c, x, v, u, Ce.current, f);
|
|
459
459
|
}
|
|
460
460
|
}
|
|
461
|
-
var ie =
|
|
461
|
+
var ie = O.ReactCurrentOwner, Oe = O.ReactDebugCurrentFrame;
|
|
462
462
|
function N(e) {
|
|
463
463
|
if (e) {
|
|
464
464
|
var r = e._owner, n = Z(e.type, e._source, r ? r.type : null);
|
|
@@ -509,7 +509,7 @@ Check the top-level render call using <` + n + ">.");
|
|
|
509
509
|
return;
|
|
510
510
|
je[n] = !0;
|
|
511
511
|
var u = "";
|
|
512
|
-
e && e._owner && e._owner !== ie.current && (u = " It was passed a child from " + L(e._owner.type) + "."), N(e),
|
|
512
|
+
e && e._owner && e._owner !== ie.current && (u = " It was passed a child from " + L(e._owner.type) + "."), N(e), R('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', n, u), N(null);
|
|
513
513
|
}
|
|
514
514
|
}
|
|
515
515
|
function Ae(e, r) {
|
|
@@ -524,9 +524,9 @@ Check the top-level render call using <` + n + ">.");
|
|
|
524
524
|
else if (se(e))
|
|
525
525
|
e._store && (e._store.validated = !0);
|
|
526
526
|
else if (e) {
|
|
527
|
-
var
|
|
528
|
-
if (typeof
|
|
529
|
-
for (var
|
|
527
|
+
var v = E(e);
|
|
528
|
+
if (typeof v == "function" && v !== e.entries)
|
|
529
|
+
for (var h = v.call(e), f; !(f = h.next()).done; )
|
|
530
530
|
se(f.value) && De(f.value, r);
|
|
531
531
|
}
|
|
532
532
|
}
|
|
@@ -539,9 +539,9 @@ Check the top-level render call using <` + n + ">.");
|
|
|
539
539
|
var n;
|
|
540
540
|
if (typeof r == "function")
|
|
541
541
|
n = r.propTypes;
|
|
542
|
-
else if (typeof r == "object" && (r.$$typeof ===
|
|
542
|
+
else if (typeof r == "object" && (r.$$typeof === l || // Note: Memo only checks outer props here.
|
|
543
543
|
// Inner props are checked in the reconciler.
|
|
544
|
-
r.$$typeof ===
|
|
544
|
+
r.$$typeof === y))
|
|
545
545
|
n = r.propTypes;
|
|
546
546
|
else
|
|
547
547
|
return;
|
|
@@ -550,10 +550,10 @@ Check the top-level render call using <` + n + ">.");
|
|
|
550
550
|
Ze(n, e.props, "prop", u, e);
|
|
551
551
|
} else if (r.PropTypes !== void 0 && !ue) {
|
|
552
552
|
ue = !0;
|
|
553
|
-
var
|
|
554
|
-
|
|
553
|
+
var v = L(r);
|
|
554
|
+
R("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", v || "Unknown");
|
|
555
555
|
}
|
|
556
|
-
typeof r.getDefaultProps == "function" && !r.getDefaultProps.isReactClassApproved &&
|
|
556
|
+
typeof r.getDefaultProps == "function" && !r.getDefaultProps.isReactClassApproved && R("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.");
|
|
557
557
|
}
|
|
558
558
|
}
|
|
559
559
|
function vr(e) {
|
|
@@ -561,39 +561,39 @@ Check the top-level render call using <` + n + ">.");
|
|
|
561
561
|
for (var r = Object.keys(e.props), n = 0; n < r.length; n++) {
|
|
562
562
|
var u = r[n];
|
|
563
563
|
if (u !== "children" && u !== "key") {
|
|
564
|
-
N(e),
|
|
564
|
+
N(e), R("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", u), N(null);
|
|
565
565
|
break;
|
|
566
566
|
}
|
|
567
567
|
}
|
|
568
|
-
e.ref !== null && (N(e),
|
|
568
|
+
e.ref !== null && (N(e), R("Invalid attribute `ref` supplied to `React.Fragment`."), N(null));
|
|
569
569
|
}
|
|
570
570
|
}
|
|
571
|
-
function Fe(e, r, n, u,
|
|
571
|
+
function Fe(e, r, n, u, v, h) {
|
|
572
572
|
{
|
|
573
573
|
var f = qe(e);
|
|
574
574
|
if (!f) {
|
|
575
575
|
var c = "";
|
|
576
576
|
(e === void 0 || typeof e == "object" && e !== null && Object.keys(e).length === 0) && (c += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");
|
|
577
|
-
var
|
|
578
|
-
|
|
579
|
-
var
|
|
580
|
-
e === null ?
|
|
577
|
+
var x = fr();
|
|
578
|
+
x ? c += x : c += ke();
|
|
579
|
+
var b;
|
|
580
|
+
e === null ? b = "null" : ae(e) ? b = "array" : e !== void 0 && e.$$typeof === o ? (b = "<" + (L(e.type) || "Unknown") + " />", c = " Did you accidentally export a JSX literal instead of a component?") : b = typeof e, R("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", b, c);
|
|
581
581
|
}
|
|
582
|
-
var m = cr(e, r, n,
|
|
582
|
+
var m = cr(e, r, n, v, h);
|
|
583
583
|
if (m == null)
|
|
584
584
|
return m;
|
|
585
585
|
if (f) {
|
|
586
|
-
var
|
|
587
|
-
if (
|
|
586
|
+
var k = r.children;
|
|
587
|
+
if (k !== void 0)
|
|
588
588
|
if (u)
|
|
589
|
-
if (ae(
|
|
590
|
-
for (var Y = 0; Y <
|
|
591
|
-
Ae(
|
|
592
|
-
Object.freeze && Object.freeze(
|
|
589
|
+
if (ae(k)) {
|
|
590
|
+
for (var Y = 0; Y < k.length; Y++)
|
|
591
|
+
Ae(k[Y], e);
|
|
592
|
+
Object.freeze && Object.freeze(k);
|
|
593
593
|
} else
|
|
594
|
-
|
|
594
|
+
R("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");
|
|
595
595
|
else
|
|
596
|
-
Ae(
|
|
596
|
+
Ae(k, e);
|
|
597
597
|
}
|
|
598
598
|
return e === a ? vr(m) : dr(m), m;
|
|
599
599
|
}
|
|
@@ -609,7 +609,7 @@ Check the top-level render call using <` + n + ">.");
|
|
|
609
609
|
}()), B;
|
|
610
610
|
}
|
|
611
611
|
process.env.NODE_ENV === "production" ? ce.exports = br() : ce.exports = Er();
|
|
612
|
-
var
|
|
612
|
+
var F = ce.exports;
|
|
613
613
|
const J = Ne({
|
|
614
614
|
rootValue: /* @__PURE__ */ new Set(),
|
|
615
615
|
setRootValue: () => {
|
|
@@ -626,8 +626,8 @@ function Rr() {
|
|
|
626
626
|
const t = {
|
|
627
627
|
__root__: { value: "__root__", parent: "", children: {}, index: 0, childrenLength: 0, isGroup: !0, ref: { current: null } }
|
|
628
628
|
};
|
|
629
|
-
return [t, (i, a,
|
|
630
|
-
t[i] = { value: i, parent: a, children: {}, childrenLength: 0, index:
|
|
629
|
+
return [t, (i, a, p, d, _) => {
|
|
630
|
+
t[i] = { value: i, parent: a, children: {}, childrenLength: 0, index: p, isGroup: d, ref: _ }, t[a].children[p] = i, (p + 1 > t[a].childrenLength || t[t[a].childrenLength - 1] == null) && (t[a].childrenLength = p + 1);
|
|
631
631
|
}];
|
|
632
632
|
}
|
|
633
633
|
const W = Ne({
|
|
@@ -636,18 +636,18 @@ const W = Ne({
|
|
|
636
636
|
depth: -1
|
|
637
637
|
});
|
|
638
638
|
function mr(t, o, i) {
|
|
639
|
-
const [a,
|
|
640
|
-
return [
|
|
641
|
-
const
|
|
642
|
-
o && o(
|
|
639
|
+
const [a, p] = Ye(i), d = t !== void 0 ? t : a;
|
|
640
|
+
return [d, (s) => {
|
|
641
|
+
const l = typeof s == "function" ? s(d) : s;
|
|
642
|
+
o && o(l), p(l);
|
|
643
643
|
}];
|
|
644
644
|
}
|
|
645
645
|
function q(t, o) {
|
|
646
646
|
return function(a) {
|
|
647
|
-
const
|
|
648
|
-
|
|
649
|
-
let
|
|
650
|
-
return a.defaultPrevented || (
|
|
647
|
+
const p = a.defaultPrevented;
|
|
648
|
+
p && (a.defaultPrevented = !1), t == null || t(a);
|
|
649
|
+
let d;
|
|
650
|
+
return a.defaultPrevented || (d = o == null ? void 0 : o(a), p && (a.defaultPrevented = !0)), d;
|
|
651
651
|
};
|
|
652
652
|
}
|
|
653
653
|
function fe(...t) {
|
|
@@ -676,23 +676,23 @@ function Tr(t, o) {
|
|
|
676
676
|
i != "__root__" && ((a = t[i].ref.current) == null || a.focus());
|
|
677
677
|
}
|
|
678
678
|
function xr(t, o) {
|
|
679
|
-
var
|
|
679
|
+
var p, d;
|
|
680
680
|
const i = t[o].parent, a = t[o].index;
|
|
681
681
|
if (a != 0) {
|
|
682
|
-
let
|
|
683
|
-
for (; t[
|
|
684
|
-
|
|
685
|
-
(
|
|
682
|
+
let _ = t[i].children[a - 1], s;
|
|
683
|
+
for (; t[_].isGroup && (s = t[_].children[t[_].childrenLength - 1], !(s == null || t[s].ref.current == null)); )
|
|
684
|
+
_ = s;
|
|
685
|
+
(p = t[_].ref.current) == null || p.focus();
|
|
686
686
|
return;
|
|
687
687
|
}
|
|
688
|
-
i != "__root__" && ((
|
|
688
|
+
i != "__root__" && ((d = t[i].ref.current) == null || d.focus());
|
|
689
689
|
}
|
|
690
690
|
function Cr(t, o) {
|
|
691
|
-
var
|
|
691
|
+
var p, d;
|
|
692
692
|
if (t[o].isGroup) {
|
|
693
|
-
const
|
|
694
|
-
if (
|
|
695
|
-
|
|
693
|
+
const _ = (p = t[t[o].children[0]]) == null ? void 0 : p.ref.current;
|
|
694
|
+
if (_) {
|
|
695
|
+
_.focus();
|
|
696
696
|
return;
|
|
697
697
|
}
|
|
698
698
|
}
|
|
@@ -701,7 +701,7 @@ function Cr(t, o) {
|
|
|
701
701
|
if (i == "__root__") return;
|
|
702
702
|
o = i;
|
|
703
703
|
}
|
|
704
|
-
(
|
|
704
|
+
(d = t[a].ref.current) == null || d.focus();
|
|
705
705
|
}
|
|
706
706
|
function Sr(t) {
|
|
707
707
|
var i;
|
|
@@ -715,109 +715,109 @@ function Pr(t) {
|
|
|
715
715
|
o = i;
|
|
716
716
|
(a = t[o].ref.current) == null || a.focus();
|
|
717
717
|
}
|
|
718
|
-
const Or = K(({ value: t, onValueChange: o, defaultValue: i,
|
|
719
|
-
const [
|
|
720
|
-
if (!(!yr.includes(
|
|
721
|
-
switch (
|
|
718
|
+
const Or = K(({ value: t, onValueChange: o, defaultValue: i, defaultSelection: a, onKeyDown: p, ...d }, _) => {
|
|
719
|
+
const [s, l] = Rr(), C = Ge(), [g, y] = mr(t, o, i ?? /* @__PURE__ */ new Set()), [S, T] = Ye(a ?? ""), A = re(null), V = fe(A, _), E = re(""), O = We((w) => {
|
|
720
|
+
if (!(!yr.includes(w.key) || !s))
|
|
721
|
+
switch (w.key) {
|
|
722
722
|
case "ArrowRight":
|
|
723
|
-
if (!
|
|
724
|
-
|
|
723
|
+
if (!s[E.current].isGroup) break;
|
|
724
|
+
w.preventDefault(), g.has(E.current) ? wr(s, E.current) : y((P) => /* @__PURE__ */ new Set([...P, E.current]));
|
|
725
725
|
break;
|
|
726
726
|
case "ArrowLeft":
|
|
727
|
-
|
|
727
|
+
w.preventDefault(), g.has(E.current) ? y((P) => new Set([...P].filter((j) => j !== E.current))) : Tr(s, E.current);
|
|
728
728
|
break;
|
|
729
729
|
case "ArrowUp":
|
|
730
|
-
|
|
730
|
+
w.preventDefault(), xr(s, E.current);
|
|
731
731
|
break;
|
|
732
732
|
case "ArrowDown":
|
|
733
|
-
|
|
733
|
+
w.preventDefault(), Cr(s, E.current);
|
|
734
734
|
break;
|
|
735
735
|
case "Home":
|
|
736
|
-
|
|
736
|
+
w.preventDefault(), Sr(s);
|
|
737
737
|
break;
|
|
738
738
|
case "End":
|
|
739
|
-
|
|
739
|
+
w.preventDefault(), Pr(s);
|
|
740
740
|
break;
|
|
741
741
|
case "Enter":
|
|
742
|
-
|
|
742
|
+
w.preventDefault(), T(E.current), g.has(E.current) ? y((P) => new Set([...P].filter((j) => j !== E.current))) : y((P) => /* @__PURE__ */ new Set([...P, E.current]));
|
|
743
743
|
break;
|
|
744
744
|
}
|
|
745
|
-
}, [
|
|
746
|
-
return /* @__PURE__ */
|
|
745
|
+
}, [g]), R = q(p, O);
|
|
746
|
+
return /* @__PURE__ */ F.jsx(J.Provider, { value: { rootValue: g, setRootValue: y, selection: S, setSelection: T, focus: E, nodeMap: s, pushToNodeMap: l }, children: /* @__PURE__ */ F.jsx(W.Provider, { value: { parent: "__root__", getIndex: C, depth: 0 }, children: /* @__PURE__ */ F.jsx(
|
|
747
747
|
"ul",
|
|
748
748
|
{
|
|
749
|
-
ref:
|
|
749
|
+
ref: V,
|
|
750
750
|
role: "tree",
|
|
751
751
|
"aria-multiselectable": "false",
|
|
752
|
-
onKeyDown:
|
|
753
|
-
...
|
|
752
|
+
onKeyDown: R,
|
|
753
|
+
...d
|
|
754
754
|
}
|
|
755
755
|
) }) });
|
|
756
|
-
}), kr = K(({ value: t, onFocus: o, onClick: i, ...a },
|
|
757
|
-
const { selection:
|
|
758
|
-
function P
|
|
759
|
-
var
|
|
760
|
-
(z = (
|
|
756
|
+
}), kr = K(({ value: t, onFocus: o, onClick: i, ...a }, p) => {
|
|
757
|
+
const { selection: d, setSelection: _, focus: s, nodeMap: l, pushToNodeMap: C } = I(J), { parent: g, getIndex: y, depth: S } = I(W), T = re(null), A = fe(T, p), V = q(o, O), E = q(i, R);
|
|
758
|
+
function O(P) {
|
|
759
|
+
var j, z, M;
|
|
760
|
+
(z = (j = l == null ? void 0 : l[s.current]) == null ? void 0 : j.ref.current) == null || z.setAttribute("tabindex", "-1"), (M = T.current) == null || M.setAttribute("tabindex", "0"), s.current = t, P.stopPropagation();
|
|
761
761
|
}
|
|
762
|
-
function
|
|
763
|
-
|
|
762
|
+
function R() {
|
|
763
|
+
_(t);
|
|
764
764
|
}
|
|
765
|
-
const
|
|
766
|
-
return
|
|
765
|
+
const w = y(t);
|
|
766
|
+
return C(t, g, w, !1, T), s.current == "" && g == "__root__" && w == 0 && (s.current = t), Ue(() => () => {
|
|
767
767
|
s.current == t && (s.current = "");
|
|
768
|
-
}, []), /* @__PURE__ */
|
|
768
|
+
}, []), /* @__PURE__ */ F.jsx(
|
|
769
769
|
"li",
|
|
770
770
|
{
|
|
771
|
-
ref:
|
|
772
|
-
role: "
|
|
773
|
-
"aria-selected":
|
|
771
|
+
ref: A,
|
|
772
|
+
role: "treeitem",
|
|
773
|
+
"aria-selected": d == t,
|
|
774
774
|
tabIndex: s.current == t ? 0 : -1,
|
|
775
|
-
onFocus:
|
|
776
|
-
onClick:
|
|
777
|
-
"data-depth":
|
|
775
|
+
onFocus: V,
|
|
776
|
+
onClick: E,
|
|
777
|
+
"data-depth": S,
|
|
778
778
|
...a
|
|
779
779
|
}
|
|
780
780
|
);
|
|
781
781
|
}), jr = K(({ value: t, onFocus: o, ...i }, a) => {
|
|
782
|
-
const
|
|
783
|
-
function
|
|
784
|
-
var
|
|
785
|
-
(
|
|
782
|
+
const p = Ge(), { rootValue: d, selection: _, focus: s, nodeMap: l, pushToNodeMap: C } = I(J), { parent: g, getIndex: y, depth: S } = I(W), T = re(null), A = fe(T, a), V = q(o, E);
|
|
783
|
+
function E(R) {
|
|
784
|
+
var w, P, j;
|
|
785
|
+
(P = (w = l == null ? void 0 : l[s.current]) == null ? void 0 : w.ref.current) == null || P.setAttribute("tabindex", "-1"), (j = T.current) == null || j.setAttribute("tabindex", "0"), s.current = t, R.stopPropagation();
|
|
786
786
|
}
|
|
787
|
-
const
|
|
788
|
-
return
|
|
787
|
+
const O = y(t);
|
|
788
|
+
return C(t, g, O, !0, T), s.current == "" && g == "__root__" && O == 0 && (s.current = t), Ue(() => () => {
|
|
789
789
|
s.current == t && (s.current = "");
|
|
790
|
-
}, []), /* @__PURE__ */
|
|
790
|
+
}, []), /* @__PURE__ */ F.jsx(W.Provider, { value: { parent: t, getIndex: p, depth: S + 1 }, children: /* @__PURE__ */ F.jsx(
|
|
791
791
|
"li",
|
|
792
792
|
{
|
|
793
|
-
ref:
|
|
794
|
-
role: "
|
|
795
|
-
"data-state":
|
|
796
|
-
"data-depth":
|
|
797
|
-
"aria-expanded":
|
|
798
|
-
"aria-selected":
|
|
793
|
+
ref: A,
|
|
794
|
+
role: "treeitem",
|
|
795
|
+
"data-state": d.has(t) ? "open" : "closed",
|
|
796
|
+
"data-depth": S,
|
|
797
|
+
"aria-expanded": d.has(t),
|
|
798
|
+
"aria-selected": _ == t,
|
|
799
799
|
tabIndex: s.current == t ? 0 : -1,
|
|
800
|
-
onFocus:
|
|
800
|
+
onFocus: V,
|
|
801
801
|
...i
|
|
802
802
|
}
|
|
803
803
|
) });
|
|
804
804
|
}), Dr = K(({ onClick: t, ...o }, i) => {
|
|
805
|
-
const { setRootValue: a, setSelection:
|
|
805
|
+
const { setRootValue: a, setSelection: p } = I(J), { parent: d } = I(W), _ = q(t, s);
|
|
806
806
|
function s() {
|
|
807
|
-
|
|
807
|
+
p(d), a((l) => l.has(d) ? new Set([...l].filter((C) => C !== d)) : /* @__PURE__ */ new Set([...l, d]));
|
|
808
808
|
}
|
|
809
|
-
return /* @__PURE__ */
|
|
809
|
+
return /* @__PURE__ */ F.jsx(
|
|
810
810
|
"div",
|
|
811
811
|
{
|
|
812
812
|
ref: i,
|
|
813
|
-
onClick:
|
|
813
|
+
onClick: _,
|
|
814
814
|
...o
|
|
815
815
|
}
|
|
816
816
|
);
|
|
817
817
|
}), Ar = K(({ ...t }, o) => {
|
|
818
|
-
const { rootValue: i } =
|
|
818
|
+
const { rootValue: i } = I(J), { parent: a } = I(W);
|
|
819
819
|
if (i.has(a))
|
|
820
|
-
return /* @__PURE__ */
|
|
820
|
+
return /* @__PURE__ */ F.jsx(
|
|
821
821
|
"ul",
|
|
822
822
|
{
|
|
823
823
|
ref: o,
|