react-composable-treeview 1.0.18 → 1.0.19
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 +1 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +98 -98
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import
|
|
2
|
-
var
|
|
1
|
+
import $e, { createContext as Ye, useRef as J, useState as Me, useCallback as We, forwardRef as H, useContext as I, useEffect as Ue } from "react";
|
|
2
|
+
var le = { exports: {} }, q = {};
|
|
3
3
|
/**
|
|
4
4
|
* @license React
|
|
5
5
|
* react-jsx-runtime.production.min.js
|
|
@@ -9,11 +9,11 @@ var de = { exports: {} }, q = {};
|
|
|
9
9
|
* This source code is licensed under the MIT license found in the
|
|
10
10
|
* LICENSE file in the root directory of this source tree.
|
|
11
11
|
*/
|
|
12
|
-
var
|
|
12
|
+
var Ne;
|
|
13
13
|
function mr() {
|
|
14
|
-
if (
|
|
15
|
-
|
|
16
|
-
var n =
|
|
14
|
+
if (Ne) return q;
|
|
15
|
+
Ne = 1;
|
|
16
|
+
var n = $e, i = Symbol.for("react.element"), o = Symbol.for("react.fragment"), a = Object.prototype.hasOwnProperty, s = n.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, l = { key: !0, ref: !0, __self: !0, __source: !0 };
|
|
17
17
|
function g(u, f, S) {
|
|
18
18
|
var y, m = {}, w = null, k = null;
|
|
19
19
|
S !== void 0 && (w = "" + S), f.key !== void 0 && (w = "" + f.key), f.ref !== void 0 && (k = f.ref);
|
|
@@ -33,10 +33,10 @@ var K = {};
|
|
|
33
33
|
* This source code is licensed under the MIT license found in the
|
|
34
34
|
* LICENSE file in the root directory of this source tree.
|
|
35
35
|
*/
|
|
36
|
-
var
|
|
36
|
+
var Le;
|
|
37
37
|
function br() {
|
|
38
|
-
return
|
|
39
|
-
var n =
|
|
38
|
+
return Le || (Le = 1, process.env.NODE_ENV !== "production" && function() {
|
|
39
|
+
var n = $e, i = Symbol.for("react.element"), o = Symbol.for("react.portal"), a = Symbol.for("react.fragment"), s = Symbol.for("react.strict_mode"), l = Symbol.for("react.profiler"), g = Symbol.for("react.provider"), u = Symbol.for("react.context"), f = Symbol.for("react.forward_ref"), S = Symbol.for("react.suspense"), y = Symbol.for("react.suspense_list"), m = Symbol.for("react.memo"), w = Symbol.for("react.lazy"), k = Symbol.for("react.offscreen"), P = Symbol.iterator, V = "@@iterator";
|
|
40
40
|
function N(e) {
|
|
41
41
|
if (e === null || typeof e != "object")
|
|
42
42
|
return null;
|
|
@@ -77,7 +77,7 @@ function br() {
|
|
|
77
77
|
var v = r.displayName || r.name || "";
|
|
78
78
|
return v !== "" ? t + "(" + v + ")" : t;
|
|
79
79
|
}
|
|
80
|
-
function
|
|
80
|
+
function pe(e) {
|
|
81
81
|
return e.displayName || "Context";
|
|
82
82
|
}
|
|
83
83
|
function $(e) {
|
|
@@ -105,10 +105,10 @@ function br() {
|
|
|
105
105
|
switch (e.$$typeof) {
|
|
106
106
|
case u:
|
|
107
107
|
var r = e;
|
|
108
|
-
return
|
|
108
|
+
return pe(r) + ".Consumer";
|
|
109
109
|
case g:
|
|
110
110
|
var t = e;
|
|
111
|
-
return
|
|
111
|
+
return pe(t._context) + ".Provider";
|
|
112
112
|
case f:
|
|
113
113
|
return qe(e, e.render, "ForwardRef");
|
|
114
114
|
case m:
|
|
@@ -125,18 +125,18 @@ function br() {
|
|
|
125
125
|
}
|
|
126
126
|
return null;
|
|
127
127
|
}
|
|
128
|
-
var Y = Object.assign, B = 0, he, _e, ge, me, be, Ee
|
|
129
|
-
function
|
|
128
|
+
var Y = Object.assign, B = 0, ve, he, _e, ge, me, be, Ee;
|
|
129
|
+
function Re() {
|
|
130
130
|
}
|
|
131
|
-
|
|
131
|
+
Re.__reactDisabledLog = !0;
|
|
132
132
|
function Ke() {
|
|
133
133
|
{
|
|
134
134
|
if (B === 0) {
|
|
135
|
-
|
|
135
|
+
ve = console.log, he = console.info, _e = console.warn, ge = console.error, me = console.group, be = console.groupCollapsed, Ee = console.groupEnd;
|
|
136
136
|
var e = {
|
|
137
137
|
configurable: !0,
|
|
138
138
|
enumerable: !0,
|
|
139
|
-
value:
|
|
139
|
+
value: Re,
|
|
140
140
|
writable: !0
|
|
141
141
|
};
|
|
142
142
|
Object.defineProperties(console, {
|
|
@@ -162,52 +162,52 @@ function br() {
|
|
|
162
162
|
};
|
|
163
163
|
Object.defineProperties(console, {
|
|
164
164
|
log: Y({}, e, {
|
|
165
|
-
value:
|
|
165
|
+
value: ve
|
|
166
166
|
}),
|
|
167
167
|
info: Y({}, e, {
|
|
168
|
-
value:
|
|
168
|
+
value: he
|
|
169
169
|
}),
|
|
170
170
|
warn: Y({}, e, {
|
|
171
|
-
value:
|
|
171
|
+
value: _e
|
|
172
172
|
}),
|
|
173
173
|
error: Y({}, e, {
|
|
174
|
-
value:
|
|
174
|
+
value: ge
|
|
175
175
|
}),
|
|
176
176
|
group: Y({}, e, {
|
|
177
|
-
value:
|
|
177
|
+
value: me
|
|
178
178
|
}),
|
|
179
179
|
groupCollapsed: Y({}, e, {
|
|
180
|
-
value:
|
|
180
|
+
value: be
|
|
181
181
|
}),
|
|
182
182
|
groupEnd: Y({}, e, {
|
|
183
|
-
value:
|
|
183
|
+
value: Ee
|
|
184
184
|
})
|
|
185
185
|
});
|
|
186
186
|
}
|
|
187
187
|
B < 0 && b("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
|
|
188
188
|
}
|
|
189
189
|
}
|
|
190
|
-
var
|
|
190
|
+
var oe = _.ReactCurrentDispatcher, ae;
|
|
191
191
|
function Q(e, r, t) {
|
|
192
192
|
{
|
|
193
|
-
if (
|
|
193
|
+
if (ae === void 0)
|
|
194
194
|
try {
|
|
195
195
|
throw Error();
|
|
196
196
|
} catch (v) {
|
|
197
197
|
var c = v.stack.trim().match(/\n( *(at )?)/);
|
|
198
|
-
|
|
198
|
+
ae = c && c[1] || "";
|
|
199
199
|
}
|
|
200
200
|
return `
|
|
201
|
-
` +
|
|
201
|
+
` + ae + e;
|
|
202
202
|
}
|
|
203
203
|
}
|
|
204
|
-
var
|
|
204
|
+
var ie = !1, ee;
|
|
205
205
|
{
|
|
206
206
|
var ze = typeof WeakMap == "function" ? WeakMap : Map;
|
|
207
207
|
ee = new ze();
|
|
208
208
|
}
|
|
209
|
-
function
|
|
210
|
-
if (!e ||
|
|
209
|
+
function ye(e, r) {
|
|
210
|
+
if (!e || ie)
|
|
211
211
|
return "";
|
|
212
212
|
{
|
|
213
213
|
var t = ee.get(e);
|
|
@@ -215,11 +215,11 @@ function br() {
|
|
|
215
215
|
return t;
|
|
216
216
|
}
|
|
217
217
|
var c;
|
|
218
|
-
|
|
218
|
+
ie = !0;
|
|
219
219
|
var v = Error.prepareStackTrace;
|
|
220
220
|
Error.prepareStackTrace = void 0;
|
|
221
221
|
var h;
|
|
222
|
-
h =
|
|
222
|
+
h = oe.current, oe.current = null, Ke();
|
|
223
223
|
try {
|
|
224
224
|
if (r) {
|
|
225
225
|
var p = function() {
|
|
@@ -272,13 +272,13 @@ function br() {
|
|
|
272
272
|
}
|
|
273
273
|
}
|
|
274
274
|
} finally {
|
|
275
|
-
|
|
275
|
+
ie = !1, oe.current = h, Je(), Error.prepareStackTrace = v;
|
|
276
276
|
}
|
|
277
|
-
var W = e ? e.displayName || e.name : "",
|
|
278
|
-
return typeof e == "function" && ee.set(e,
|
|
277
|
+
var W = e ? e.displayName || e.name : "", Ve = W ? Q(W) : "";
|
|
278
|
+
return typeof e == "function" && ee.set(e, Ve), Ve;
|
|
279
279
|
}
|
|
280
280
|
function He(e, r, t) {
|
|
281
|
-
return
|
|
281
|
+
return ye(e, !1);
|
|
282
282
|
}
|
|
283
283
|
function Xe(e) {
|
|
284
284
|
var r = e.prototype;
|
|
@@ -288,7 +288,7 @@ function br() {
|
|
|
288
288
|
if (e == null)
|
|
289
289
|
return "";
|
|
290
290
|
if (typeof e == "function")
|
|
291
|
-
return
|
|
291
|
+
return ye(e, Xe(e));
|
|
292
292
|
if (typeof e == "string")
|
|
293
293
|
return Q(e);
|
|
294
294
|
switch (e) {
|
|
@@ -313,13 +313,13 @@ function br() {
|
|
|
313
313
|
}
|
|
314
314
|
return "";
|
|
315
315
|
}
|
|
316
|
-
var te = Object.prototype.hasOwnProperty,
|
|
316
|
+
var te = Object.prototype.hasOwnProperty, we = {}, xe = _.ReactDebugCurrentFrame;
|
|
317
317
|
function ne(e) {
|
|
318
318
|
if (e) {
|
|
319
319
|
var r = e._owner, t = re(e.type, e._source, r ? r.type : null);
|
|
320
|
-
|
|
320
|
+
xe.setExtraStackFrame(t);
|
|
321
321
|
} else
|
|
322
|
-
|
|
322
|
+
xe.setExtraStackFrame(null);
|
|
323
323
|
}
|
|
324
324
|
function Ze(e, r, t, c, v) {
|
|
325
325
|
{
|
|
@@ -336,12 +336,12 @@ function br() {
|
|
|
336
336
|
} catch (E) {
|
|
337
337
|
d = E;
|
|
338
338
|
}
|
|
339
|
-
d && !(d instanceof Error) && (ne(v), b("%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).", c || "React class", t, p, typeof d), ne(null)), d instanceof Error && !(d.message in
|
|
339
|
+
d && !(d instanceof Error) && (ne(v), b("%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).", c || "React class", t, p, typeof d), ne(null)), d instanceof Error && !(d.message in we) && (we[d.message] = !0, ne(v), b("Failed %s type: %s", t, d.message), ne(null));
|
|
340
340
|
}
|
|
341
341
|
}
|
|
342
342
|
}
|
|
343
343
|
var Qe = Array.isArray;
|
|
344
|
-
function
|
|
344
|
+
function ue(e) {
|
|
345
345
|
return Qe(e);
|
|
346
346
|
}
|
|
347
347
|
function er(e) {
|
|
@@ -352,24 +352,24 @@ function br() {
|
|
|
352
352
|
}
|
|
353
353
|
function rr(e) {
|
|
354
354
|
try {
|
|
355
|
-
return
|
|
355
|
+
return Te(e), !1;
|
|
356
356
|
} catch {
|
|
357
357
|
return !0;
|
|
358
358
|
}
|
|
359
359
|
}
|
|
360
|
-
function
|
|
360
|
+
function Te(e) {
|
|
361
361
|
return "" + e;
|
|
362
362
|
}
|
|
363
|
-
function
|
|
363
|
+
function Ce(e) {
|
|
364
364
|
if (rr(e))
|
|
365
|
-
return b("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", er(e)),
|
|
365
|
+
return b("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
|
|
367
|
+
var Se = _.ReactCurrentOwner, tr = {
|
|
368
368
|
key: !0,
|
|
369
369
|
ref: !0,
|
|
370
370
|
__self: !0,
|
|
371
371
|
__source: !0
|
|
372
|
-
},
|
|
372
|
+
}, Pe, Oe;
|
|
373
373
|
function nr(e) {
|
|
374
374
|
if (te.call(e, "ref")) {
|
|
375
375
|
var r = Object.getOwnPropertyDescriptor(e, "ref").get;
|
|
@@ -387,12 +387,12 @@ function br() {
|
|
|
387
387
|
return e.key !== void 0;
|
|
388
388
|
}
|
|
389
389
|
function ar(e, r) {
|
|
390
|
-
typeof e.ref == "string" &&
|
|
390
|
+
typeof e.ref == "string" && Se.current;
|
|
391
391
|
}
|
|
392
392
|
function ir(e, r) {
|
|
393
393
|
{
|
|
394
394
|
var t = function() {
|
|
395
|
-
|
|
395
|
+
Pe || (Pe = !0, b("%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
|
t.isReactWarning = !0, Object.defineProperty(e, "key", {
|
|
398
398
|
get: t,
|
|
@@ -403,7 +403,7 @@ function br() {
|
|
|
403
403
|
function ur(e, r) {
|
|
404
404
|
{
|
|
405
405
|
var t = function() {
|
|
406
|
-
|
|
406
|
+
Oe || (Oe = !0, b("%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
|
t.isReactWarning = !0, Object.defineProperty(e, "ref", {
|
|
409
409
|
get: t,
|
|
@@ -443,7 +443,7 @@ function br() {
|
|
|
443
443
|
function sr(e, r, t, c, v) {
|
|
444
444
|
{
|
|
445
445
|
var h, p = {}, d = null, C = null;
|
|
446
|
-
t !== void 0 && (
|
|
446
|
+
t !== void 0 && (Ce(t), d = "" + t), or(r) && (Ce(r.key), d = "" + r.key), nr(r) && (C = r.ref, ar(r, v));
|
|
447
447
|
for (h in r)
|
|
448
448
|
te.call(r, h) && !tr.hasOwnProperty(h) && (p[h] = r[h]);
|
|
449
449
|
if (e && e.defaultProps) {
|
|
@@ -455,26 +455,26 @@ function br() {
|
|
|
455
455
|
var R = typeof e == "function" ? e.displayName || e.name || "Unknown" : e;
|
|
456
456
|
d && ir(p, R), C && ur(p, R);
|
|
457
457
|
}
|
|
458
|
-
return cr(e, d, C, v, c,
|
|
458
|
+
return cr(e, d, C, v, c, Se.current, p);
|
|
459
459
|
}
|
|
460
460
|
}
|
|
461
|
-
var
|
|
461
|
+
var ce = _.ReactCurrentOwner, ke = _.ReactDebugCurrentFrame;
|
|
462
462
|
function M(e) {
|
|
463
463
|
if (e) {
|
|
464
464
|
var r = e._owner, t = re(e.type, e._source, r ? r.type : null);
|
|
465
|
-
|
|
465
|
+
ke.setExtraStackFrame(t);
|
|
466
466
|
} else
|
|
467
|
-
|
|
467
|
+
ke.setExtraStackFrame(null);
|
|
468
468
|
}
|
|
469
|
-
var
|
|
470
|
-
|
|
471
|
-
function
|
|
469
|
+
var se;
|
|
470
|
+
se = !1;
|
|
471
|
+
function fe(e) {
|
|
472
472
|
return typeof e == "object" && e !== null && e.$$typeof === i;
|
|
473
473
|
}
|
|
474
|
-
function
|
|
474
|
+
function je() {
|
|
475
475
|
{
|
|
476
|
-
if (
|
|
477
|
-
var e = $(
|
|
476
|
+
if (ce.current) {
|
|
477
|
+
var e = $(ce.current.type);
|
|
478
478
|
if (e)
|
|
479
479
|
return `
|
|
480
480
|
|
|
@@ -486,10 +486,10 @@ Check the render method of \`` + e + "`.";
|
|
|
486
486
|
function fr(e) {
|
|
487
487
|
return "";
|
|
488
488
|
}
|
|
489
|
-
var
|
|
489
|
+
var De = {};
|
|
490
490
|
function lr(e) {
|
|
491
491
|
{
|
|
492
|
-
var r =
|
|
492
|
+
var r = je();
|
|
493
493
|
if (!r) {
|
|
494
494
|
var t = typeof e == "string" ? e : e.displayName || e.name;
|
|
495
495
|
t && (r = `
|
|
@@ -499,35 +499,35 @@ Check the top-level render call using <` + t + ">.");
|
|
|
499
499
|
return r;
|
|
500
500
|
}
|
|
501
501
|
}
|
|
502
|
-
function
|
|
502
|
+
function Ae(e, r) {
|
|
503
503
|
{
|
|
504
504
|
if (!e._store || e._store.validated || e.key != null)
|
|
505
505
|
return;
|
|
506
506
|
e._store.validated = !0;
|
|
507
507
|
var t = lr(r);
|
|
508
|
-
if (
|
|
508
|
+
if (De[t])
|
|
509
509
|
return;
|
|
510
|
-
|
|
510
|
+
De[t] = !0;
|
|
511
511
|
var c = "";
|
|
512
|
-
e && e._owner && e._owner !==
|
|
512
|
+
e && e._owner && e._owner !== ce.current && (c = " It was passed a child from " + $(e._owner.type) + "."), M(e), b('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', t, c), M(null);
|
|
513
513
|
}
|
|
514
514
|
}
|
|
515
|
-
function
|
|
515
|
+
function Fe(e, r) {
|
|
516
516
|
{
|
|
517
517
|
if (typeof e != "object")
|
|
518
518
|
return;
|
|
519
|
-
if (
|
|
519
|
+
if (ue(e))
|
|
520
520
|
for (var t = 0; t < e.length; t++) {
|
|
521
521
|
var c = e[t];
|
|
522
|
-
|
|
522
|
+
fe(c) && Ae(c, r);
|
|
523
523
|
}
|
|
524
|
-
else if (
|
|
524
|
+
else if (fe(e))
|
|
525
525
|
e._store && (e._store.validated = !0);
|
|
526
526
|
else if (e) {
|
|
527
527
|
var v = N(e);
|
|
528
528
|
if (typeof v == "function" && v !== e.entries)
|
|
529
529
|
for (var h = v.call(e), p; !(p = h.next()).done; )
|
|
530
|
-
|
|
530
|
+
fe(p.value) && Ae(p.value, r);
|
|
531
531
|
}
|
|
532
532
|
}
|
|
533
533
|
}
|
|
@@ -548,8 +548,8 @@ Check the top-level render call using <` + t + ">.");
|
|
|
548
548
|
if (t) {
|
|
549
549
|
var c = $(r);
|
|
550
550
|
Ze(t, e.props, "prop", c, e);
|
|
551
|
-
} else if (r.PropTypes !== void 0 && !
|
|
552
|
-
|
|
551
|
+
} else if (r.PropTypes !== void 0 && !se) {
|
|
552
|
+
se = !0;
|
|
553
553
|
var v = $(r);
|
|
554
554
|
b("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", v || "Unknown");
|
|
555
555
|
}
|
|
@@ -568,16 +568,16 @@ Check the top-level render call using <` + t + ">.");
|
|
|
568
568
|
e.ref !== null && (M(e), b("Invalid attribute `ref` supplied to `React.Fragment`."), M(null));
|
|
569
569
|
}
|
|
570
570
|
}
|
|
571
|
-
function
|
|
571
|
+
function Ie(e, r, t, c, v, h) {
|
|
572
572
|
{
|
|
573
573
|
var p = Be(e);
|
|
574
574
|
if (!p) {
|
|
575
575
|
var d = "";
|
|
576
576
|
(e === void 0 || typeof e == "object" && e !== null && Object.keys(e).length === 0) && (d += " 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
577
|
var C = fr();
|
|
578
|
-
C ? d += C : d +=
|
|
578
|
+
C ? d += C : d += je();
|
|
579
579
|
var E;
|
|
580
|
-
e === null ? E = "null" :
|
|
580
|
+
e === null ? E = "null" : ue(e) ? E = "array" : e !== void 0 && e.$$typeof === i ? (E = "<" + ($(e.type) || "Unknown") + " />", d = " Did you accidentally export a JSX literal instead of a component?") : E = typeof e, b("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", E, d);
|
|
581
581
|
}
|
|
582
582
|
var R = sr(e, r, t, v, h);
|
|
583
583
|
if (R == null)
|
|
@@ -586,31 +586,31 @@ Check the top-level render call using <` + t + ">.");
|
|
|
586
586
|
var O = r.children;
|
|
587
587
|
if (O !== void 0)
|
|
588
588
|
if (c)
|
|
589
|
-
if (
|
|
589
|
+
if (ue(O)) {
|
|
590
590
|
for (var W = 0; W < O.length; W++)
|
|
591
|
-
|
|
591
|
+
Fe(O[W], e);
|
|
592
592
|
Object.freeze && Object.freeze(O);
|
|
593
593
|
} else
|
|
594
594
|
b("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
|
-
|
|
596
|
+
Fe(O, e);
|
|
597
597
|
}
|
|
598
598
|
return e === a ? pr(R) : dr(R), R;
|
|
599
599
|
}
|
|
600
600
|
}
|
|
601
601
|
function vr(e, r, t) {
|
|
602
|
-
return
|
|
602
|
+
return Ie(e, r, t, !0);
|
|
603
603
|
}
|
|
604
604
|
function hr(e, r, t) {
|
|
605
|
-
return
|
|
605
|
+
return Ie(e, r, t, !1);
|
|
606
606
|
}
|
|
607
607
|
var _r = hr, gr = vr;
|
|
608
608
|
K.Fragment = a, K.jsx = _r, K.jsxs = gr;
|
|
609
609
|
}()), K;
|
|
610
610
|
}
|
|
611
|
-
process.env.NODE_ENV === "production" ?
|
|
612
|
-
var F =
|
|
613
|
-
const X =
|
|
611
|
+
process.env.NODE_ENV === "production" ? le.exports = mr() : le.exports = br();
|
|
612
|
+
var F = le.exports;
|
|
613
|
+
const X = Ye({
|
|
614
614
|
rootValue: /* @__PURE__ */ new Set(),
|
|
615
615
|
setRootValue: () => {
|
|
616
616
|
},
|
|
@@ -640,13 +640,13 @@ function Er() {
|
|
|
640
640
|
delete n.current[a];
|
|
641
641
|
}];
|
|
642
642
|
}
|
|
643
|
-
const U =
|
|
643
|
+
const U = Ye({
|
|
644
644
|
parent: "",
|
|
645
645
|
getIndex: () => -1,
|
|
646
646
|
depth: -1
|
|
647
647
|
});
|
|
648
648
|
function Rr(n, i, o) {
|
|
649
|
-
const [a, s] =
|
|
649
|
+
const [a, s] = Me(o), l = n !== void 0 ? n : a;
|
|
650
650
|
return [l, (u) => {
|
|
651
651
|
const f = typeof u == "function" ? u(l) : u;
|
|
652
652
|
i && i(f), s(f);
|
|
@@ -660,8 +660,8 @@ function z(n, i) {
|
|
|
660
660
|
return a.defaultPrevented || (l = i == null ? void 0 : i(a), s && (a.defaultPrevented = !0)), l;
|
|
661
661
|
};
|
|
662
662
|
}
|
|
663
|
-
function
|
|
664
|
-
return
|
|
663
|
+
function de(...n) {
|
|
664
|
+
return We((i) => {
|
|
665
665
|
for (const o of n)
|
|
666
666
|
typeof o == "function" ? o(i) : o != null && (o.current = i);
|
|
667
667
|
}, [n]);
|
|
@@ -738,7 +738,7 @@ function Pr(n) {
|
|
|
738
738
|
(s = i[o].ref.current) == null || s.focus();
|
|
739
739
|
}
|
|
740
740
|
const Or = H(({ value: n, onValueChange: i, defaultValue: o, defaultSelection: a, onKeyDown: s, ...l }, g) => {
|
|
741
|
-
const [u, f, S] = Er(), y = Ge(), [m, w] = Rr(n, i, o ?? /* @__PURE__ */ new Set()), [k, P] =
|
|
741
|
+
const [u, f, S] = Er(), y = Ge(), [m, w] = Rr(n, i, o ?? /* @__PURE__ */ new Set()), [k, P] = Me(""), V = J(null), N = de(V, g), _ = J(""), b = We((x) => {
|
|
742
742
|
var D;
|
|
743
743
|
if (!(!yr.includes(x.key) || !u))
|
|
744
744
|
switch (x.key) {
|
|
@@ -777,7 +777,7 @@ const Or = H(({ value: n, onValueChange: i, defaultValue: o, defaultSelection: a
|
|
|
777
777
|
}
|
|
778
778
|
) }) });
|
|
779
779
|
}), kr = H(({ value: n, onFocus: i, onClick: o, ...a }, s) => {
|
|
780
|
-
const { selection: l, setSelection: g, focus: u, nodeMap: f, registerNode: S, removeNode: y } = I(X), { parent: m, getIndex: w, depth: k } = I(U), P = J(null), V =
|
|
780
|
+
const { selection: l, setSelection: g, focus: u, nodeMap: f, registerNode: S, removeNode: y } = I(X), { parent: m, getIndex: w, depth: k } = I(U), P = J(null), V = de(P, s), N = z(i, b), _ = z(o, L);
|
|
781
781
|
function b(D) {
|
|
782
782
|
var T, j, Z, G;
|
|
783
783
|
(Z = (j = (T = f.current) == null ? void 0 : T[u.current]) == null ? void 0 : j.ref.current) == null || Z.setAttribute("tabindex", "-1"), (G = P.current) == null || G.setAttribute("tabindex", "0"), u.current = n, D.stopPropagation();
|
|
@@ -786,8 +786,8 @@ const Or = H(({ value: n, onValueChange: i, defaultValue: o, defaultSelection: a
|
|
|
786
786
|
g(n);
|
|
787
787
|
}
|
|
788
788
|
const x = w(n);
|
|
789
|
-
return u.current == "" && m == "__root__" && x == 0 && (u.current = n),
|
|
790
|
-
u.current == n && (u.current = "");
|
|
789
|
+
return S(n, m, x, !1, P), u.current == "" && m == "__root__" && x == 0 && (u.current = n), Ue(() => () => {
|
|
790
|
+
y(n), u.current == n && (u.current = "");
|
|
791
791
|
}, []), /* @__PURE__ */ F.jsx(
|
|
792
792
|
"li",
|
|
793
793
|
{
|
|
@@ -802,14 +802,14 @@ const Or = H(({ value: n, onValueChange: i, defaultValue: o, defaultSelection: a
|
|
|
802
802
|
}
|
|
803
803
|
);
|
|
804
804
|
}), jr = H(({ value: n, onFocus: i, ...o }, a) => {
|
|
805
|
-
const s = Ge(), { rootValue: l, selection: g, focus: u, nodeMap: f, registerNode: S, removeNode: y } = I(X), { parent: m, getIndex: w, depth: k } = I(U), P = J(null), V =
|
|
805
|
+
const s = Ge(), { rootValue: l, selection: g, focus: u, nodeMap: f, registerNode: S, removeNode: y } = I(X), { parent: m, getIndex: w, depth: k } = I(U), P = J(null), V = de(P, a), N = z(i, _);
|
|
806
806
|
function _(L) {
|
|
807
807
|
var x, D, T, j;
|
|
808
808
|
(T = (D = (x = f.current) == null ? void 0 : x[u.current]) == null ? void 0 : D.ref.current) == null || T.setAttribute("tabindex", "-1"), (j = P.current) == null || j.setAttribute("tabindex", "0"), u.current = n, L.stopPropagation();
|
|
809
809
|
}
|
|
810
810
|
const b = w(n);
|
|
811
|
-
return u.current == "" && m == "__root__" && b == 0 && (u.current = n),
|
|
812
|
-
u.current == n && (u.current = "");
|
|
811
|
+
return S(n, m, b, !0, P), u.current == "" && m == "__root__" && b == 0 && (u.current = n), Ue(() => () => {
|
|
812
|
+
y(n), u.current == n && (u.current = "");
|
|
813
813
|
}, []), /* @__PURE__ */ F.jsx(U.Provider, { value: { parent: n, getIndex: s, depth: k + 1 }, children: /* @__PURE__ */ F.jsx(
|
|
814
814
|
"li",
|
|
815
815
|
{
|