react-composable-treeview 1.0.12 → 1.0.13
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 +7 -7
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +265 -269
- 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 We, useRef as K, useState as Ye, useCallback as Ue, forwardRef as J, useContext as I } from "react";
|
|
2
|
+
var le = { exports: {} }, B = {};
|
|
3
3
|
/**
|
|
4
4
|
* @license React
|
|
5
5
|
* react-jsx-runtime.production.min.js
|
|
@@ -9,25 +9,25 @@ 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 Le;
|
|
13
13
|
function br() {
|
|
14
|
-
if (
|
|
15
|
-
return
|
|
16
|
-
|
|
17
|
-
var t =
|
|
18
|
-
function
|
|
14
|
+
if (Le)
|
|
15
|
+
return B;
|
|
16
|
+
Le = 1;
|
|
17
|
+
var t = $e, o = Symbol.for("react.element"), i = Symbol.for("react.fragment"), a = Object.prototype.hasOwnProperty, h = t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, v = { key: !0, ref: !0, __self: !0, __source: !0 };
|
|
18
|
+
function f(l, _, y) {
|
|
19
19
|
var b, w = {}, T = null, S = null;
|
|
20
|
-
y !== void 0 && (T = "" + y),
|
|
21
|
-
for (b in
|
|
22
|
-
a.call(
|
|
23
|
-
if (
|
|
24
|
-
for (b in
|
|
25
|
-
w[b] === void 0 && (w[b] =
|
|
26
|
-
return { $$typeof: o, type:
|
|
20
|
+
y !== void 0 && (T = "" + y), _.key !== void 0 && (T = "" + _.key), _.ref !== void 0 && (S = _.ref);
|
|
21
|
+
for (b in _)
|
|
22
|
+
a.call(_, b) && !v.hasOwnProperty(b) && (w[b] = _[b]);
|
|
23
|
+
if (l && l.defaultProps)
|
|
24
|
+
for (b in _ = l.defaultProps, _)
|
|
25
|
+
w[b] === void 0 && (w[b] = _[b]);
|
|
26
|
+
return { $$typeof: o, type: l, key: T, ref: S, props: w, _owner: h.current };
|
|
27
27
|
}
|
|
28
|
-
return
|
|
28
|
+
return B.Fragment = i, B.jsx = f, B.jsxs = f, B;
|
|
29
29
|
}
|
|
30
|
-
var
|
|
30
|
+
var q = {};
|
|
31
31
|
/**
|
|
32
32
|
* @license React
|
|
33
33
|
* react-jsx-runtime.development.js
|
|
@@ -37,18 +37,18 @@ var K = {};
|
|
|
37
37
|
* This source code is licensed under the MIT license found in the
|
|
38
38
|
* LICENSE file in the root directory of this source tree.
|
|
39
39
|
*/
|
|
40
|
-
var
|
|
40
|
+
var Ne;
|
|
41
41
|
function Rr() {
|
|
42
|
-
return
|
|
43
|
-
var t =
|
|
44
|
-
function
|
|
42
|
+
return Ne || (Ne = 1, process.env.NODE_ENV !== "production" && function() {
|
|
43
|
+
var t = $e, o = Symbol.for("react.element"), i = Symbol.for("react.portal"), a = Symbol.for("react.fragment"), h = Symbol.for("react.strict_mode"), v = Symbol.for("react.profiler"), f = Symbol.for("react.provider"), l = Symbol.for("react.context"), _ = Symbol.for("react.forward_ref"), y = Symbol.for("react.suspense"), b = Symbol.for("react.suspense_list"), w = Symbol.for("react.memo"), T = Symbol.for("react.lazy"), S = Symbol.for("react.offscreen"), A = Symbol.iterator, E = "@@iterator";
|
|
44
|
+
function V(e) {
|
|
45
45
|
if (e === null || typeof e != "object")
|
|
46
46
|
return null;
|
|
47
47
|
var r = A && e[A] || e[E];
|
|
48
48
|
return typeof r == "function" ? r : null;
|
|
49
49
|
}
|
|
50
50
|
var P = t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
|
|
51
|
-
function
|
|
51
|
+
function p(e) {
|
|
52
52
|
{
|
|
53
53
|
for (var r = arguments.length, n = new Array(r > 1 ? r - 1 : 0), u = 1; u < r; u++)
|
|
54
54
|
n[u - 1] = arguments[u];
|
|
@@ -57,37 +57,37 @@ function Rr() {
|
|
|
57
57
|
}
|
|
58
58
|
function x(e, r, n) {
|
|
59
59
|
{
|
|
60
|
-
var u = P.ReactDebugCurrentFrame,
|
|
61
|
-
|
|
62
|
-
var g = n.map(function(
|
|
63
|
-
return String(
|
|
60
|
+
var u = P.ReactDebugCurrentFrame, d = u.getStackAddendum();
|
|
61
|
+
d !== "" && (r += "%s", n = n.concat([d]));
|
|
62
|
+
var g = n.map(function(s) {
|
|
63
|
+
return String(s);
|
|
64
64
|
});
|
|
65
65
|
g.unshift("Warning: " + r), Function.prototype.apply.call(console[e], console, g);
|
|
66
66
|
}
|
|
67
67
|
}
|
|
68
|
-
var k = !1,
|
|
69
|
-
|
|
68
|
+
var k = !1, L = !1, H = !1, X = !1, Be = !1, ve;
|
|
69
|
+
ve = Symbol.for("react.module.reference");
|
|
70
70
|
function qe(e) {
|
|
71
|
-
return !!(typeof e == "string" || typeof e == "function" || e === a || e ===
|
|
71
|
+
return !!(typeof e == "string" || typeof e == "function" || e === a || e === v || Be || e === h || e === y || e === b || X || e === S || k || L || H || typeof e == "object" && e !== null && (e.$$typeof === T || e.$$typeof === w || e.$$typeof === f || e.$$typeof === l || e.$$typeof === _ || // This needs to include all possible module reference object
|
|
72
72
|
// types supported by any Flight configuration anywhere since
|
|
73
73
|
// we don't know which Flight build this will end up being used
|
|
74
74
|
// with.
|
|
75
|
-
e.$$typeof ===
|
|
75
|
+
e.$$typeof === ve || e.getModuleId !== void 0));
|
|
76
76
|
}
|
|
77
77
|
function Ke(e, r, n) {
|
|
78
78
|
var u = e.displayName;
|
|
79
79
|
if (u)
|
|
80
80
|
return u;
|
|
81
|
-
var
|
|
82
|
-
return
|
|
81
|
+
var d = r.displayName || r.name || "";
|
|
82
|
+
return d !== "" ? n + "(" + d + ")" : n;
|
|
83
83
|
}
|
|
84
|
-
function
|
|
84
|
+
function pe(e) {
|
|
85
85
|
return e.displayName || "Context";
|
|
86
86
|
}
|
|
87
87
|
function j(e) {
|
|
88
88
|
if (e == null)
|
|
89
89
|
return null;
|
|
90
|
-
if (typeof e.tag == "number" &&
|
|
90
|
+
if (typeof e.tag == "number" && p("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."), typeof e == "function")
|
|
91
91
|
return e.displayName || e.name || null;
|
|
92
92
|
if (typeof e == "string")
|
|
93
93
|
return e;
|
|
@@ -96,9 +96,9 @@ function Rr() {
|
|
|
96
96
|
return "Fragment";
|
|
97
97
|
case i:
|
|
98
98
|
return "Portal";
|
|
99
|
-
case
|
|
99
|
+
case v:
|
|
100
100
|
return "Profiler";
|
|
101
|
-
case
|
|
101
|
+
case h:
|
|
102
102
|
return "StrictMode";
|
|
103
103
|
case y:
|
|
104
104
|
return "Suspense";
|
|
@@ -107,21 +107,21 @@ function Rr() {
|
|
|
107
107
|
}
|
|
108
108
|
if (typeof e == "object")
|
|
109
109
|
switch (e.$$typeof) {
|
|
110
|
-
case
|
|
110
|
+
case l:
|
|
111
111
|
var r = e;
|
|
112
|
-
return
|
|
113
|
-
case
|
|
112
|
+
return pe(r) + ".Consumer";
|
|
113
|
+
case f:
|
|
114
114
|
var n = e;
|
|
115
|
-
return
|
|
116
|
-
case
|
|
115
|
+
return pe(n._context) + ".Provider";
|
|
116
|
+
case _:
|
|
117
117
|
return Ke(e, e.render, "ForwardRef");
|
|
118
118
|
case w:
|
|
119
119
|
var u = e.displayName || null;
|
|
120
120
|
return u !== null ? u : j(e.type) || "Memo";
|
|
121
121
|
case T: {
|
|
122
|
-
var
|
|
122
|
+
var d = e, g = d._payload, s = d._init;
|
|
123
123
|
try {
|
|
124
|
-
return j(
|
|
124
|
+
return j(s(g));
|
|
125
125
|
} catch {
|
|
126
126
|
return null;
|
|
127
127
|
}
|
|
@@ -129,18 +129,18 @@ function Rr() {
|
|
|
129
129
|
}
|
|
130
130
|
return null;
|
|
131
131
|
}
|
|
132
|
-
var
|
|
133
|
-
function
|
|
132
|
+
var N = Object.assign, U = 0, he, _e, ge, be, Re, Ee, me;
|
|
133
|
+
function ye() {
|
|
134
134
|
}
|
|
135
|
-
|
|
136
|
-
function
|
|
135
|
+
ye.__reactDisabledLog = !0;
|
|
136
|
+
function Me() {
|
|
137
137
|
{
|
|
138
|
-
if (
|
|
139
|
-
|
|
138
|
+
if (U === 0) {
|
|
139
|
+
he = console.log, _e = console.info, ge = console.warn, be = console.error, Re = console.group, Ee = console.groupCollapsed, me = console.groupEnd;
|
|
140
140
|
var e = {
|
|
141
141
|
configurable: !0,
|
|
142
142
|
enumerable: !0,
|
|
143
|
-
value:
|
|
143
|
+
value: ye,
|
|
144
144
|
writable: !0
|
|
145
145
|
};
|
|
146
146
|
Object.defineProperties(console, {
|
|
@@ -153,65 +153,65 @@ function Rr() {
|
|
|
153
153
|
groupEnd: e
|
|
154
154
|
});
|
|
155
155
|
}
|
|
156
|
-
|
|
156
|
+
U++;
|
|
157
157
|
}
|
|
158
158
|
}
|
|
159
|
-
function
|
|
159
|
+
function Je() {
|
|
160
160
|
{
|
|
161
|
-
if (
|
|
161
|
+
if (U--, U === 0) {
|
|
162
162
|
var e = {
|
|
163
163
|
configurable: !0,
|
|
164
164
|
enumerable: !0,
|
|
165
165
|
writable: !0
|
|
166
166
|
};
|
|
167
167
|
Object.defineProperties(console, {
|
|
168
|
-
log:
|
|
168
|
+
log: N({}, e, {
|
|
169
|
+
value: he
|
|
170
|
+
}),
|
|
171
|
+
info: N({}, e, {
|
|
169
172
|
value: _e
|
|
170
173
|
}),
|
|
171
|
-
|
|
174
|
+
warn: N({}, e, {
|
|
172
175
|
value: ge
|
|
173
176
|
}),
|
|
174
|
-
|
|
177
|
+
error: N({}, e, {
|
|
175
178
|
value: be
|
|
176
179
|
}),
|
|
177
|
-
|
|
180
|
+
group: N({}, e, {
|
|
178
181
|
value: Re
|
|
179
182
|
}),
|
|
180
|
-
|
|
183
|
+
groupCollapsed: N({}, e, {
|
|
181
184
|
value: Ee
|
|
182
185
|
}),
|
|
183
|
-
|
|
186
|
+
groupEnd: N({}, e, {
|
|
184
187
|
value: me
|
|
185
|
-
}),
|
|
186
|
-
groupEnd: $({}, e, {
|
|
187
|
-
value: ye
|
|
188
188
|
})
|
|
189
189
|
});
|
|
190
190
|
}
|
|
191
|
-
|
|
191
|
+
U < 0 && p("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
|
|
192
192
|
}
|
|
193
193
|
}
|
|
194
|
-
var
|
|
194
|
+
var ne = P.ReactCurrentDispatcher, oe;
|
|
195
195
|
function Z(e, r, n) {
|
|
196
196
|
{
|
|
197
|
-
if (
|
|
197
|
+
if (oe === void 0)
|
|
198
198
|
try {
|
|
199
199
|
throw Error();
|
|
200
|
-
} catch (
|
|
201
|
-
var u =
|
|
202
|
-
|
|
200
|
+
} catch (d) {
|
|
201
|
+
var u = d.stack.trim().match(/\n( *(at )?)/);
|
|
202
|
+
oe = u && u[1] || "";
|
|
203
203
|
}
|
|
204
204
|
return `
|
|
205
|
-
` +
|
|
205
|
+
` + oe + e;
|
|
206
206
|
}
|
|
207
207
|
}
|
|
208
|
-
var
|
|
208
|
+
var ae = !1, Q;
|
|
209
209
|
{
|
|
210
210
|
var ze = typeof WeakMap == "function" ? WeakMap : Map;
|
|
211
211
|
Q = new ze();
|
|
212
212
|
}
|
|
213
|
-
function
|
|
214
|
-
if (!e ||
|
|
213
|
+
function we(e, r) {
|
|
214
|
+
if (!e || ae)
|
|
215
215
|
return "";
|
|
216
216
|
{
|
|
217
217
|
var n = Q.get(e);
|
|
@@ -219,34 +219,34 @@ function Rr() {
|
|
|
219
219
|
return n;
|
|
220
220
|
}
|
|
221
221
|
var u;
|
|
222
|
-
|
|
223
|
-
var
|
|
222
|
+
ae = !0;
|
|
223
|
+
var d = Error.prepareStackTrace;
|
|
224
224
|
Error.prepareStackTrace = void 0;
|
|
225
225
|
var g;
|
|
226
|
-
g =
|
|
226
|
+
g = ne.current, ne.current = null, Me();
|
|
227
227
|
try {
|
|
228
228
|
if (r) {
|
|
229
|
-
var
|
|
229
|
+
var s = function() {
|
|
230
230
|
throw Error();
|
|
231
231
|
};
|
|
232
|
-
if (Object.defineProperty(
|
|
232
|
+
if (Object.defineProperty(s.prototype, "props", {
|
|
233
233
|
set: function() {
|
|
234
234
|
throw Error();
|
|
235
235
|
}
|
|
236
236
|
}), typeof Reflect == "object" && Reflect.construct) {
|
|
237
237
|
try {
|
|
238
|
-
Reflect.construct(
|
|
238
|
+
Reflect.construct(s, []);
|
|
239
239
|
} catch (D) {
|
|
240
240
|
u = D;
|
|
241
241
|
}
|
|
242
|
-
Reflect.construct(e, [],
|
|
242
|
+
Reflect.construct(e, [], s);
|
|
243
243
|
} else {
|
|
244
244
|
try {
|
|
245
|
-
|
|
245
|
+
s.call();
|
|
246
246
|
} catch (D) {
|
|
247
247
|
u = D;
|
|
248
248
|
}
|
|
249
|
-
e.call(
|
|
249
|
+
e.call(s.prototype);
|
|
250
250
|
}
|
|
251
251
|
} else {
|
|
252
252
|
try {
|
|
@@ -258,17 +258,17 @@ function Rr() {
|
|
|
258
258
|
}
|
|
259
259
|
} catch (D) {
|
|
260
260
|
if (D && u && typeof D.stack == "string") {
|
|
261
|
-
for (var
|
|
261
|
+
for (var c = D.stack.split(`
|
|
262
262
|
`), C = u.stack.split(`
|
|
263
|
-
`), R =
|
|
263
|
+
`), R = c.length - 1, m = C.length - 1; R >= 1 && m >= 0 && c[R] !== C[m]; )
|
|
264
264
|
m--;
|
|
265
265
|
for (; R >= 1 && m >= 0; R--, m--)
|
|
266
|
-
if (
|
|
266
|
+
if (c[R] !== C[m]) {
|
|
267
267
|
if (R !== 1 || m !== 1)
|
|
268
268
|
do
|
|
269
|
-
if (R--, m--, m < 0 ||
|
|
269
|
+
if (R--, m--, m < 0 || c[R] !== C[m]) {
|
|
270
270
|
var O = `
|
|
271
|
-
` +
|
|
271
|
+
` + c[R].replace(" at new ", " at ");
|
|
272
272
|
return e.displayName && O.includes("<anonymous>") && (O = O.replace("<anonymous>", e.displayName)), typeof e == "function" && Q.set(e, O), O;
|
|
273
273
|
}
|
|
274
274
|
while (R >= 1 && m >= 0);
|
|
@@ -276,13 +276,13 @@ function Rr() {
|
|
|
276
276
|
}
|
|
277
277
|
}
|
|
278
278
|
} finally {
|
|
279
|
-
|
|
279
|
+
ae = !1, ne.current = g, Je(), Error.prepareStackTrace = d;
|
|
280
280
|
}
|
|
281
|
-
var
|
|
282
|
-
return typeof e == "function" && Q.set(e,
|
|
281
|
+
var W = e ? e.displayName || e.name : "", Ve = W ? Z(W) : "";
|
|
282
|
+
return typeof e == "function" && Q.set(e, Ve), Ve;
|
|
283
283
|
}
|
|
284
284
|
function He(e, r, n) {
|
|
285
|
-
return
|
|
285
|
+
return we(e, !1);
|
|
286
286
|
}
|
|
287
287
|
function Xe(e) {
|
|
288
288
|
var r = e.prototype;
|
|
@@ -292,7 +292,7 @@ function Rr() {
|
|
|
292
292
|
if (e == null)
|
|
293
293
|
return "";
|
|
294
294
|
if (typeof e == "function")
|
|
295
|
-
return
|
|
295
|
+
return we(e, Xe(e));
|
|
296
296
|
if (typeof e == "string")
|
|
297
297
|
return Z(e);
|
|
298
298
|
switch (e) {
|
|
@@ -303,49 +303,49 @@ function Rr() {
|
|
|
303
303
|
}
|
|
304
304
|
if (typeof e == "object")
|
|
305
305
|
switch (e.$$typeof) {
|
|
306
|
-
case
|
|
306
|
+
case _:
|
|
307
307
|
return He(e.render);
|
|
308
308
|
case w:
|
|
309
309
|
return ee(e.type, r, n);
|
|
310
310
|
case T: {
|
|
311
|
-
var u = e,
|
|
311
|
+
var u = e, d = u._payload, g = u._init;
|
|
312
312
|
try {
|
|
313
|
-
return ee(g(
|
|
313
|
+
return ee(g(d), r, n);
|
|
314
314
|
} catch {
|
|
315
315
|
}
|
|
316
316
|
}
|
|
317
317
|
}
|
|
318
318
|
return "";
|
|
319
319
|
}
|
|
320
|
-
var re = Object.prototype.hasOwnProperty,
|
|
320
|
+
var re = Object.prototype.hasOwnProperty, Te = {}, xe = P.ReactDebugCurrentFrame;
|
|
321
321
|
function te(e) {
|
|
322
322
|
if (e) {
|
|
323
323
|
var r = e._owner, n = ee(e.type, e._source, r ? r.type : null);
|
|
324
|
-
|
|
324
|
+
xe.setExtraStackFrame(n);
|
|
325
325
|
} else
|
|
326
|
-
|
|
326
|
+
xe.setExtraStackFrame(null);
|
|
327
327
|
}
|
|
328
|
-
function Ze(e, r, n, u,
|
|
328
|
+
function Ze(e, r, n, u, d) {
|
|
329
329
|
{
|
|
330
330
|
var g = Function.call.bind(re);
|
|
331
|
-
for (var
|
|
332
|
-
if (g(e,
|
|
333
|
-
var
|
|
331
|
+
for (var s in e)
|
|
332
|
+
if (g(e, s)) {
|
|
333
|
+
var c = void 0;
|
|
334
334
|
try {
|
|
335
|
-
if (typeof e[
|
|
336
|
-
var C = Error((u || "React class") + ": " + n + " type `" +
|
|
335
|
+
if (typeof e[s] != "function") {
|
|
336
|
+
var C = Error((u || "React class") + ": " + n + " type `" + s + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof e[s] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");
|
|
337
337
|
throw C.name = "Invariant Violation", C;
|
|
338
338
|
}
|
|
339
|
-
|
|
339
|
+
c = e[s](r, s, u, n, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
|
|
340
340
|
} catch (R) {
|
|
341
|
-
|
|
341
|
+
c = R;
|
|
342
342
|
}
|
|
343
|
-
|
|
343
|
+
c && !(c instanceof Error) && (te(d), p("%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, s, typeof c), te(null)), c instanceof Error && !(c.message in Te) && (Te[c.message] = !0, te(d), p("Failed %s type: %s", n, c.message), te(null));
|
|
344
344
|
}
|
|
345
345
|
}
|
|
346
346
|
}
|
|
347
347
|
var Qe = Array.isArray;
|
|
348
|
-
function
|
|
348
|
+
function ie(e) {
|
|
349
349
|
return Qe(e);
|
|
350
350
|
}
|
|
351
351
|
function er(e) {
|
|
@@ -356,25 +356,25 @@ function Rr() {
|
|
|
356
356
|
}
|
|
357
357
|
function rr(e) {
|
|
358
358
|
try {
|
|
359
|
-
return
|
|
359
|
+
return Ce(e), !1;
|
|
360
360
|
} catch {
|
|
361
361
|
return !0;
|
|
362
362
|
}
|
|
363
363
|
}
|
|
364
|
-
function
|
|
364
|
+
function Ce(e) {
|
|
365
365
|
return "" + e;
|
|
366
366
|
}
|
|
367
|
-
function
|
|
367
|
+
function Se(e) {
|
|
368
368
|
if (rr(e))
|
|
369
|
-
return
|
|
369
|
+
return p("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", er(e)), Ce(e);
|
|
370
370
|
}
|
|
371
|
-
var
|
|
371
|
+
var G = P.ReactCurrentOwner, tr = {
|
|
372
372
|
key: !0,
|
|
373
373
|
ref: !0,
|
|
374
374
|
__self: !0,
|
|
375
375
|
__source: !0
|
|
376
|
-
},
|
|
377
|
-
|
|
376
|
+
}, Pe, Oe, ue;
|
|
377
|
+
ue = {};
|
|
378
378
|
function nr(e) {
|
|
379
379
|
if (re.call(e, "ref")) {
|
|
380
380
|
var r = Object.getOwnPropertyDescriptor(e, "ref").get;
|
|
@@ -392,15 +392,15 @@ function Rr() {
|
|
|
392
392
|
return e.key !== void 0;
|
|
393
393
|
}
|
|
394
394
|
function ar(e, r) {
|
|
395
|
-
if (typeof e.ref == "string" &&
|
|
396
|
-
var n = j(
|
|
397
|
-
|
|
395
|
+
if (typeof e.ref == "string" && G.current && r && G.current.stateNode !== r) {
|
|
396
|
+
var n = j(G.current.type);
|
|
397
|
+
ue[n] || (p('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref', j(G.current.type), e.ref), ue[n] = !0);
|
|
398
398
|
}
|
|
399
399
|
}
|
|
400
400
|
function ir(e, r) {
|
|
401
401
|
{
|
|
402
402
|
var n = function() {
|
|
403
|
-
|
|
403
|
+
Pe || (Pe = !0, p("%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));
|
|
404
404
|
};
|
|
405
405
|
n.isReactWarning = !0, Object.defineProperty(e, "key", {
|
|
406
406
|
get: n,
|
|
@@ -411,7 +411,7 @@ function Rr() {
|
|
|
411
411
|
function ur(e, r) {
|
|
412
412
|
{
|
|
413
413
|
var n = function() {
|
|
414
|
-
|
|
414
|
+
Oe || (Oe = !0, p("%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));
|
|
415
415
|
};
|
|
416
416
|
n.isReactWarning = !0, Object.defineProperty(e, "ref", {
|
|
417
417
|
get: n,
|
|
@@ -419,70 +419,70 @@ function Rr() {
|
|
|
419
419
|
});
|
|
420
420
|
}
|
|
421
421
|
}
|
|
422
|
-
var cr = function(e, r, n, u,
|
|
423
|
-
var
|
|
422
|
+
var cr = function(e, r, n, u, d, g, s) {
|
|
423
|
+
var c = {
|
|
424
424
|
// This tag allows us to uniquely identify this as a React Element
|
|
425
425
|
$$typeof: o,
|
|
426
426
|
// Built-in properties that belong on the element
|
|
427
427
|
type: e,
|
|
428
428
|
key: r,
|
|
429
429
|
ref: n,
|
|
430
|
-
props:
|
|
430
|
+
props: s,
|
|
431
431
|
// Record the component responsible for creating this element.
|
|
432
432
|
_owner: g
|
|
433
433
|
};
|
|
434
|
-
return
|
|
434
|
+
return c._store = {}, Object.defineProperty(c._store, "validated", {
|
|
435
435
|
configurable: !1,
|
|
436
436
|
enumerable: !1,
|
|
437
437
|
writable: !0,
|
|
438
438
|
value: !1
|
|
439
|
-
}), Object.defineProperty(
|
|
439
|
+
}), Object.defineProperty(c, "_self", {
|
|
440
440
|
configurable: !1,
|
|
441
441
|
enumerable: !1,
|
|
442
442
|
writable: !1,
|
|
443
443
|
value: u
|
|
444
|
-
}), Object.defineProperty(
|
|
444
|
+
}), Object.defineProperty(c, "_source", {
|
|
445
445
|
configurable: !1,
|
|
446
446
|
enumerable: !1,
|
|
447
447
|
writable: !1,
|
|
448
|
-
value:
|
|
449
|
-
}), Object.freeze && (Object.freeze(
|
|
448
|
+
value: d
|
|
449
|
+
}), Object.freeze && (Object.freeze(c.props), Object.freeze(c)), c;
|
|
450
450
|
};
|
|
451
|
-
function sr(e, r, n, u,
|
|
451
|
+
function sr(e, r, n, u, d) {
|
|
452
452
|
{
|
|
453
|
-
var g,
|
|
454
|
-
n !== void 0 && (
|
|
453
|
+
var g, s = {}, c = null, C = null;
|
|
454
|
+
n !== void 0 && (Se(n), c = "" + n), or(r) && (Se(r.key), c = "" + r.key), nr(r) && (C = r.ref, ar(r, d));
|
|
455
455
|
for (g in r)
|
|
456
|
-
re.call(r, g) && !tr.hasOwnProperty(g) && (
|
|
456
|
+
re.call(r, g) && !tr.hasOwnProperty(g) && (s[g] = r[g]);
|
|
457
457
|
if (e && e.defaultProps) {
|
|
458
458
|
var R = e.defaultProps;
|
|
459
459
|
for (g in R)
|
|
460
|
-
|
|
460
|
+
s[g] === void 0 && (s[g] = R[g]);
|
|
461
461
|
}
|
|
462
|
-
if (
|
|
462
|
+
if (c || C) {
|
|
463
463
|
var m = typeof e == "function" ? e.displayName || e.name || "Unknown" : e;
|
|
464
|
-
|
|
464
|
+
c && ir(s, m), C && ur(s, m);
|
|
465
465
|
}
|
|
466
|
-
return cr(e,
|
|
466
|
+
return cr(e, c, C, d, u, G.current, s);
|
|
467
467
|
}
|
|
468
468
|
}
|
|
469
|
-
var
|
|
470
|
-
function
|
|
469
|
+
var ce = P.ReactCurrentOwner, ke = P.ReactDebugCurrentFrame;
|
|
470
|
+
function $(e) {
|
|
471
471
|
if (e) {
|
|
472
472
|
var r = e._owner, n = ee(e.type, e._source, r ? r.type : null);
|
|
473
|
-
|
|
473
|
+
ke.setExtraStackFrame(n);
|
|
474
474
|
} else
|
|
475
|
-
|
|
475
|
+
ke.setExtraStackFrame(null);
|
|
476
476
|
}
|
|
477
|
-
var
|
|
478
|
-
|
|
479
|
-
function
|
|
477
|
+
var se;
|
|
478
|
+
se = !1;
|
|
479
|
+
function fe(e) {
|
|
480
480
|
return typeof e == "object" && e !== null && e.$$typeof === o;
|
|
481
481
|
}
|
|
482
|
-
function
|
|
482
|
+
function je() {
|
|
483
483
|
{
|
|
484
|
-
if (
|
|
485
|
-
var e = j(
|
|
484
|
+
if (ce.current) {
|
|
485
|
+
var e = j(ce.current.type);
|
|
486
486
|
if (e)
|
|
487
487
|
return `
|
|
488
488
|
|
|
@@ -502,10 +502,10 @@ Check your code at ` + r + ":" + n + ".";
|
|
|
502
502
|
return "";
|
|
503
503
|
}
|
|
504
504
|
}
|
|
505
|
-
var
|
|
505
|
+
var De = {};
|
|
506
506
|
function lr(e) {
|
|
507
507
|
{
|
|
508
|
-
var r =
|
|
508
|
+
var r = je();
|
|
509
509
|
if (!r) {
|
|
510
510
|
var n = typeof e == "string" ? e : e.displayName || e.name;
|
|
511
511
|
n && (r = `
|
|
@@ -515,35 +515,35 @@ Check the top-level render call using <` + n + ">.");
|
|
|
515
515
|
return r;
|
|
516
516
|
}
|
|
517
517
|
}
|
|
518
|
-
function
|
|
518
|
+
function Ae(e, r) {
|
|
519
519
|
{
|
|
520
520
|
if (!e._store || e._store.validated || e.key != null)
|
|
521
521
|
return;
|
|
522
522
|
e._store.validated = !0;
|
|
523
523
|
var n = lr(r);
|
|
524
|
-
if (
|
|
524
|
+
if (De[n])
|
|
525
525
|
return;
|
|
526
|
-
|
|
526
|
+
De[n] = !0;
|
|
527
527
|
var u = "";
|
|
528
|
-
e && e._owner && e._owner !==
|
|
528
|
+
e && e._owner && e._owner !== ce.current && (u = " It was passed a child from " + j(e._owner.type) + "."), $(e), p('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), $(null);
|
|
529
529
|
}
|
|
530
530
|
}
|
|
531
|
-
function
|
|
531
|
+
function Fe(e, r) {
|
|
532
532
|
{
|
|
533
533
|
if (typeof e != "object")
|
|
534
534
|
return;
|
|
535
|
-
if (
|
|
535
|
+
if (ie(e))
|
|
536
536
|
for (var n = 0; n < e.length; n++) {
|
|
537
537
|
var u = e[n];
|
|
538
|
-
|
|
538
|
+
fe(u) && Ae(u, r);
|
|
539
539
|
}
|
|
540
|
-
else if (
|
|
540
|
+
else if (fe(e))
|
|
541
541
|
e._store && (e._store.validated = !0);
|
|
542
542
|
else if (e) {
|
|
543
|
-
var
|
|
544
|
-
if (typeof
|
|
545
|
-
for (var g =
|
|
546
|
-
|
|
543
|
+
var d = V(e);
|
|
544
|
+
if (typeof d == "function" && d !== e.entries)
|
|
545
|
+
for (var g = d.call(e), s; !(s = g.next()).done; )
|
|
546
|
+
fe(s.value) && Ae(s.value, r);
|
|
547
547
|
}
|
|
548
548
|
}
|
|
549
549
|
}
|
|
@@ -555,7 +555,7 @@ Check the top-level render call using <` + n + ">.");
|
|
|
555
555
|
var n;
|
|
556
556
|
if (typeof r == "function")
|
|
557
557
|
n = r.propTypes;
|
|
558
|
-
else if (typeof r == "object" && (r.$$typeof ===
|
|
558
|
+
else if (typeof r == "object" && (r.$$typeof === _ || // Note: Memo only checks outer props here.
|
|
559
559
|
// Inner props are checked in the reconciler.
|
|
560
560
|
r.$$typeof === w))
|
|
561
561
|
n = r.propTypes;
|
|
@@ -564,12 +564,12 @@ Check the top-level render call using <` + n + ">.");
|
|
|
564
564
|
if (n) {
|
|
565
565
|
var u = j(r);
|
|
566
566
|
Ze(n, e.props, "prop", u, e);
|
|
567
|
-
} else if (r.PropTypes !== void 0 && !
|
|
568
|
-
|
|
569
|
-
var
|
|
570
|
-
|
|
567
|
+
} else if (r.PropTypes !== void 0 && !se) {
|
|
568
|
+
se = !0;
|
|
569
|
+
var d = j(r);
|
|
570
|
+
p("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", d || "Unknown");
|
|
571
571
|
}
|
|
572
|
-
typeof r.getDefaultProps == "function" && !r.getDefaultProps.isReactClassApproved &&
|
|
572
|
+
typeof r.getDefaultProps == "function" && !r.getDefaultProps.isReactClassApproved && p("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.");
|
|
573
573
|
}
|
|
574
574
|
}
|
|
575
575
|
function vr(e) {
|
|
@@ -577,56 +577,56 @@ Check the top-level render call using <` + n + ">.");
|
|
|
577
577
|
for (var r = Object.keys(e.props), n = 0; n < r.length; n++) {
|
|
578
578
|
var u = r[n];
|
|
579
579
|
if (u !== "children" && u !== "key") {
|
|
580
|
-
|
|
580
|
+
$(e), p("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", u), $(null);
|
|
581
581
|
break;
|
|
582
582
|
}
|
|
583
583
|
}
|
|
584
|
-
e.ref !== null && (
|
|
584
|
+
e.ref !== null && ($(e), p("Invalid attribute `ref` supplied to `React.Fragment`."), $(null));
|
|
585
585
|
}
|
|
586
586
|
}
|
|
587
|
-
function
|
|
587
|
+
function Ie(e, r, n, u, d, g) {
|
|
588
588
|
{
|
|
589
|
-
var
|
|
590
|
-
if (!
|
|
591
|
-
var
|
|
592
|
-
(e === void 0 || typeof e == "object" && e !== null && Object.keys(e).length === 0) && (
|
|
593
|
-
var C = fr(
|
|
594
|
-
C ?
|
|
589
|
+
var s = qe(e);
|
|
590
|
+
if (!s) {
|
|
591
|
+
var c = "";
|
|
592
|
+
(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.");
|
|
593
|
+
var C = fr(d);
|
|
594
|
+
C ? c += C : c += je();
|
|
595
595
|
var R;
|
|
596
|
-
e === null ? R = "null" :
|
|
596
|
+
e === null ? R = "null" : ie(e) ? R = "array" : e !== void 0 && e.$$typeof === o ? (R = "<" + (j(e.type) || "Unknown") + " />", c = " Did you accidentally export a JSX literal instead of a component?") : R = typeof e, p("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", R, c);
|
|
597
597
|
}
|
|
598
|
-
var m = sr(e, r, n,
|
|
598
|
+
var m = sr(e, r, n, d, g);
|
|
599
599
|
if (m == null)
|
|
600
600
|
return m;
|
|
601
|
-
if (
|
|
601
|
+
if (s) {
|
|
602
602
|
var O = r.children;
|
|
603
603
|
if (O !== void 0)
|
|
604
604
|
if (u)
|
|
605
|
-
if (
|
|
606
|
-
for (var
|
|
607
|
-
|
|
605
|
+
if (ie(O)) {
|
|
606
|
+
for (var W = 0; W < O.length; W++)
|
|
607
|
+
Fe(O[W], e);
|
|
608
608
|
Object.freeze && Object.freeze(O);
|
|
609
609
|
} else
|
|
610
|
-
|
|
610
|
+
p("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");
|
|
611
611
|
else
|
|
612
|
-
|
|
612
|
+
Fe(O, e);
|
|
613
613
|
}
|
|
614
614
|
return e === a ? vr(m) : dr(m), m;
|
|
615
615
|
}
|
|
616
616
|
}
|
|
617
617
|
function pr(e, r, n) {
|
|
618
|
-
return
|
|
618
|
+
return Ie(e, r, n, !0);
|
|
619
619
|
}
|
|
620
620
|
function hr(e, r, n) {
|
|
621
|
-
return
|
|
621
|
+
return Ie(e, r, n, !1);
|
|
622
622
|
}
|
|
623
623
|
var _r = hr, gr = pr;
|
|
624
|
-
|
|
625
|
-
}()),
|
|
624
|
+
q.Fragment = a, q.jsx = _r, q.jsxs = gr;
|
|
625
|
+
}()), q;
|
|
626
626
|
}
|
|
627
|
-
process.env.NODE_ENV === "production" ?
|
|
628
|
-
var F =
|
|
629
|
-
const z =
|
|
627
|
+
process.env.NODE_ENV === "production" ? le.exports = br() : le.exports = Rr();
|
|
628
|
+
var F = le.exports;
|
|
629
|
+
const z = We({
|
|
630
630
|
rootValue: /* @__PURE__ */ new Set(),
|
|
631
631
|
setRootValue: () => {
|
|
632
632
|
},
|
|
@@ -639,50 +639,46 @@ const z = Ye({
|
|
|
639
639
|
}
|
|
640
640
|
});
|
|
641
641
|
function Er() {
|
|
642
|
-
const t =
|
|
642
|
+
const t = K({});
|
|
643
|
+
return t.current = {
|
|
643
644
|
__root__: { value: "__root__", parent: "", children: {}, index: 0, childrenLength: 0, isGroup: !0, ref: { current: null } }
|
|
644
|
-
}
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
return;
|
|
648
|
-
}
|
|
649
|
-
if (t.current[a] = { value: a, parent: f, children: {}, childrenLength: 0, index: l, isGroup: d, ref: c }, t.current[f].children[l] = a, (l + 1 > t.current[f].childrenLength || t.current[t.current[f].childrenLength - 1] == null) && (t.current[f].childrenLength = l + 1), o.current[a]) {
|
|
650
|
-
for (const h of o.current[a])
|
|
651
|
-
i(...h);
|
|
652
|
-
delete o.current[a];
|
|
653
|
-
}
|
|
654
|
-
}, []);
|
|
655
|
-
return [t, i];
|
|
645
|
+
}, [t, (i, a, h, v, f) => {
|
|
646
|
+
t.current[i] = { value: i, parent: a, children: {}, childrenLength: 0, index: h, isGroup: v, ref: f }, t.current[a].children[h] = i, (h + 1 > t.current[a].childrenLength || t.current[t.current[a].childrenLength - 1] == null) && (t.current[a].childrenLength = h + 1);
|
|
647
|
+
}];
|
|
656
648
|
}
|
|
657
|
-
const
|
|
649
|
+
const Y = We({
|
|
658
650
|
parent: "",
|
|
659
651
|
getIndex: () => -1,
|
|
660
652
|
depth: -1
|
|
661
653
|
});
|
|
662
654
|
function mr(t, o, i) {
|
|
663
|
-
const [a,
|
|
664
|
-
return [
|
|
665
|
-
const
|
|
666
|
-
o && o(
|
|
655
|
+
const [a, h] = Ye(i), v = t !== void 0 ? t : a;
|
|
656
|
+
return [v, (l) => {
|
|
657
|
+
const _ = typeof l == "function" ? l(v) : l;
|
|
658
|
+
o && o(_), h(_);
|
|
667
659
|
}];
|
|
668
660
|
}
|
|
669
|
-
function
|
|
661
|
+
function M(t, o) {
|
|
670
662
|
return function(a) {
|
|
671
|
-
const
|
|
672
|
-
|
|
673
|
-
let
|
|
674
|
-
return a.defaultPrevented || (
|
|
663
|
+
const h = a.defaultPrevented;
|
|
664
|
+
h && (a.defaultPrevented = !1), t == null || t(a);
|
|
665
|
+
let v;
|
|
666
|
+
return a.defaultPrevented || (v = o == null ? void 0 : o(a), h && (a.defaultPrevented = !0)), v;
|
|
675
667
|
};
|
|
676
668
|
}
|
|
677
|
-
function
|
|
678
|
-
return
|
|
669
|
+
function de(...t) {
|
|
670
|
+
return Ue((o) => {
|
|
679
671
|
for (const i of t)
|
|
680
672
|
typeof i == "function" ? i(o) : i != null && (i.current = o);
|
|
681
673
|
}, [t]);
|
|
682
674
|
}
|
|
683
675
|
function Ge() {
|
|
684
|
-
|
|
685
|
-
|
|
676
|
+
let t = -1;
|
|
677
|
+
const o = {};
|
|
678
|
+
function i(a) {
|
|
679
|
+
return o[a] == null && (o[a] = ++t), o[a];
|
|
680
|
+
}
|
|
681
|
+
return i;
|
|
686
682
|
}
|
|
687
683
|
const yr = ["ArrowRight", "ArrowUp", "ArrowLeft", "ArrowDown", "Home", "End", "Enter"];
|
|
688
684
|
function wr(t, o) {
|
|
@@ -696,23 +692,23 @@ function Tr(t, o) {
|
|
|
696
692
|
i != "__root__" && ((a = t[i].ref.current) == null || a.focus());
|
|
697
693
|
}
|
|
698
694
|
function xr(t, o) {
|
|
699
|
-
var
|
|
695
|
+
var h, v;
|
|
700
696
|
const i = t[o].parent, a = t[o].index;
|
|
701
697
|
if (a != 0) {
|
|
702
|
-
let
|
|
703
|
-
for (; t[
|
|
704
|
-
|
|
705
|
-
(
|
|
698
|
+
let f = t[i].children[a - 1], l;
|
|
699
|
+
for (; t[f].isGroup && (l = t[f].children[t[f].childrenLength - 1], !(l == null || t[l].ref.current == null)); )
|
|
700
|
+
f = l;
|
|
701
|
+
(h = t[f].ref.current) == null || h.focus();
|
|
706
702
|
return;
|
|
707
703
|
}
|
|
708
|
-
i != "__root__" && ((
|
|
704
|
+
i != "__root__" && ((v = t[i].ref.current) == null || v.focus());
|
|
709
705
|
}
|
|
710
706
|
function Cr(t, o) {
|
|
711
|
-
var
|
|
707
|
+
var h, v;
|
|
712
708
|
if (t[o].isGroup) {
|
|
713
|
-
const
|
|
714
|
-
if (
|
|
715
|
-
|
|
709
|
+
const f = (h = t[t[o].children[0]]) == null ? void 0 : h.ref.current;
|
|
710
|
+
if (f) {
|
|
711
|
+
f.focus();
|
|
716
712
|
return;
|
|
717
713
|
}
|
|
718
714
|
}
|
|
@@ -722,7 +718,7 @@ function Cr(t, o) {
|
|
|
722
718
|
return;
|
|
723
719
|
o = i;
|
|
724
720
|
}
|
|
725
|
-
(
|
|
721
|
+
(v = t[a].ref.current) == null || v.focus();
|
|
726
722
|
}
|
|
727
723
|
function Sr(t) {
|
|
728
724
|
var i;
|
|
@@ -736,104 +732,104 @@ function Pr(t) {
|
|
|
736
732
|
o = i;
|
|
737
733
|
(a = t[o].ref.current) == null || a.focus();
|
|
738
734
|
}
|
|
739
|
-
const Or =
|
|
740
|
-
const [
|
|
741
|
-
if (!(!yr.includes(
|
|
742
|
-
switch (
|
|
735
|
+
const Or = J(({ value: t, onValueChange: o, defaultValue: i, onKeyDown: a, ...h }, v) => {
|
|
736
|
+
const [f, l] = Er(), _ = Ge(), [y, b] = mr(t, o, i ?? /* @__PURE__ */ new Set()), [w, T] = Ye(null), S = K(null), A = de(S, v), E = K(""), V = Ue((p) => {
|
|
737
|
+
if (!(!yr.includes(p.key) || !f.current))
|
|
738
|
+
switch (p.key) {
|
|
743
739
|
case "ArrowRight":
|
|
744
|
-
if (!
|
|
740
|
+
if (!f.current[E.current].isGroup)
|
|
745
741
|
break;
|
|
746
|
-
|
|
742
|
+
p.preventDefault(), y.has(E.current) ? wr(f.current, E.current) : b((x) => /* @__PURE__ */ new Set([...x, E.current]));
|
|
747
743
|
break;
|
|
748
744
|
case "ArrowLeft":
|
|
749
|
-
|
|
745
|
+
p.preventDefault(), y.has(E.current) ? b((x) => new Set([...x].filter((k) => k !== E.current))) : Tr(f.current, E.current);
|
|
750
746
|
break;
|
|
751
747
|
case "ArrowUp":
|
|
752
|
-
|
|
748
|
+
p.preventDefault(), xr(f.current, E.current);
|
|
753
749
|
break;
|
|
754
750
|
case "ArrowDown":
|
|
755
|
-
|
|
751
|
+
p.preventDefault(), Cr(f.current, E.current);
|
|
756
752
|
break;
|
|
757
753
|
case "Home":
|
|
758
|
-
|
|
754
|
+
p.preventDefault(), Sr(f.current);
|
|
759
755
|
break;
|
|
760
756
|
case "End":
|
|
761
|
-
|
|
757
|
+
p.preventDefault(), Pr(f.current);
|
|
762
758
|
break;
|
|
763
759
|
case "Enter":
|
|
764
|
-
|
|
760
|
+
p.preventDefault(), T(E.current), y.has(E.current) ? b((x) => new Set([...x].filter((k) => k !== E.current))) : b((x) => /* @__PURE__ */ new Set([...x, E.current]));
|
|
765
761
|
break;
|
|
766
762
|
}
|
|
767
|
-
}, [y]), P =
|
|
768
|
-
return /* @__PURE__ */ F.jsx(z.Provider, { value: { rootValue: y, setRootValue: b, selection: w, setSelection: T, focus: E, nodeMap:
|
|
763
|
+
}, [y]), P = M(a, V);
|
|
764
|
+
return /* @__PURE__ */ F.jsx(z.Provider, { value: { rootValue: y, setRootValue: b, selection: w, setSelection: T, focus: E, nodeMap: f, pushToNodeMap: l }, children: /* @__PURE__ */ F.jsx(Y.Provider, { value: { parent: "__root__", getIndex: _, depth: 0 }, children: /* @__PURE__ */ F.jsx(
|
|
769
765
|
"ul",
|
|
770
766
|
{
|
|
771
767
|
ref: A,
|
|
772
768
|
role: "tree",
|
|
773
769
|
"aria-multiselectable": "false",
|
|
774
770
|
onKeyDown: P,
|
|
775
|
-
...
|
|
771
|
+
...h
|
|
776
772
|
}
|
|
777
773
|
) }) });
|
|
778
|
-
}), kr =
|
|
779
|
-
const { selection:
|
|
774
|
+
}), kr = J(({ value: t, onFocus: o, onClick: i, ...a }, h) => {
|
|
775
|
+
const { selection: v, setSelection: f, focus: l, nodeMap: _, pushToNodeMap: y } = I(z), { parent: b, getIndex: w, depth: T } = I(Y), S = K(null), A = de(S, h), E = M(o, P), V = M(i, p);
|
|
780
776
|
function P(k) {
|
|
781
|
-
var
|
|
782
|
-
(H = (
|
|
777
|
+
var L, H, X;
|
|
778
|
+
(H = (L = _.current) == null ? void 0 : L[l.current].ref.current) == null || H.setAttribute("tabindex", "-1"), (X = S.current) == null || X.setAttribute("tabindex", "0"), l.current = t, k.stopPropagation();
|
|
783
779
|
}
|
|
784
|
-
function
|
|
785
|
-
|
|
780
|
+
function p() {
|
|
781
|
+
f(t);
|
|
786
782
|
}
|
|
787
783
|
const x = w(t);
|
|
788
|
-
return y(t, b, x, !1, S),
|
|
784
|
+
return y(t, b, x, !1, S), l.current == "" && b == "__root__" && x == 0 && (l.current = t), /* @__PURE__ */ F.jsx(
|
|
789
785
|
"li",
|
|
790
786
|
{
|
|
791
787
|
ref: A,
|
|
792
788
|
role: "treenode",
|
|
793
|
-
"aria-selected":
|
|
794
|
-
tabIndex:
|
|
789
|
+
"aria-selected": v == t,
|
|
790
|
+
tabIndex: l.current == t ? 0 : -1,
|
|
795
791
|
onFocus: E,
|
|
796
|
-
onClick:
|
|
792
|
+
onClick: V,
|
|
797
793
|
"data-depth": T,
|
|
798
794
|
...a
|
|
799
795
|
}
|
|
800
796
|
);
|
|
801
|
-
}), jr =
|
|
802
|
-
const
|
|
803
|
-
function
|
|
804
|
-
var x, k,
|
|
805
|
-
(k = (x =
|
|
797
|
+
}), jr = J(({ value: t, onFocus: o, ...i }, a) => {
|
|
798
|
+
const h = Ge(), { rootValue: v, selection: f, focus: l, nodeMap: _, pushToNodeMap: y } = I(z), { parent: b, getIndex: w, depth: T } = I(Y), S = K(null), A = de(S, a), E = M(o, V);
|
|
799
|
+
function V(p) {
|
|
800
|
+
var x, k, L;
|
|
801
|
+
(k = (x = _.current) == null ? void 0 : x[l.current].ref.current) == null || k.setAttribute("tabindex", "-1"), (L = S.current) == null || L.setAttribute("tabindex", "0"), l.current = t, p.stopPropagation();
|
|
806
802
|
}
|
|
807
803
|
const P = w(t);
|
|
808
|
-
return y(t, b, P, !0, S),
|
|
804
|
+
return y(t, b, P, !0, S), l.current == "" && b == "__root__" && P == 0 && (l.current = t), /* @__PURE__ */ F.jsx(Y.Provider, { value: { parent: t, getIndex: h, depth: T + 1 }, children: /* @__PURE__ */ F.jsx(
|
|
809
805
|
"li",
|
|
810
806
|
{
|
|
811
807
|
ref: A,
|
|
812
808
|
role: "treenode",
|
|
813
|
-
"data-state":
|
|
809
|
+
"data-state": v.has(t) ? "open" : "closed",
|
|
814
810
|
"data-depth": T,
|
|
815
|
-
"aria-expanded":
|
|
816
|
-
"aria-selected":
|
|
817
|
-
tabIndex:
|
|
811
|
+
"aria-expanded": v.has(t),
|
|
812
|
+
"aria-selected": f == t,
|
|
813
|
+
tabIndex: l.current == t ? 0 : -1,
|
|
818
814
|
onFocus: E,
|
|
819
815
|
...i
|
|
820
816
|
}
|
|
821
817
|
) });
|
|
822
|
-
}), Dr =
|
|
823
|
-
const { setRootValue: a, setSelection:
|
|
824
|
-
function
|
|
825
|
-
|
|
818
|
+
}), Dr = J(({ onClick: t, ...o }, i) => {
|
|
819
|
+
const { setRootValue: a, setSelection: h } = I(z), { parent: v } = I(Y), f = M(t, l);
|
|
820
|
+
function l() {
|
|
821
|
+
h(v), a((_) => _.has(v) ? new Set([..._].filter((y) => y !== v)) : /* @__PURE__ */ new Set([..._, v]));
|
|
826
822
|
}
|
|
827
823
|
return /* @__PURE__ */ F.jsx(
|
|
828
824
|
"div",
|
|
829
825
|
{
|
|
830
826
|
ref: i,
|
|
831
|
-
onClick:
|
|
827
|
+
onClick: f,
|
|
832
828
|
...o
|
|
833
829
|
}
|
|
834
830
|
);
|
|
835
|
-
}), Ar =
|
|
836
|
-
const { rootValue: i } =
|
|
831
|
+
}), Ar = J(({ ...t }, o) => {
|
|
832
|
+
const { rootValue: i } = I(z), { parent: a } = I(Y);
|
|
837
833
|
if (i.has(a))
|
|
838
834
|
return /* @__PURE__ */ F.jsx(
|
|
839
835
|
"ul",
|