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