react-composable-treeview 1.0.14 → 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 +1 -1
- 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 +283 -300
- 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 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 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 Ve;
|
|
13
13
|
function br() {
|
|
14
|
-
if (
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
for (
|
|
22
|
-
|
|
23
|
-
if (l && l.defaultProps)
|
|
24
|
-
for (g in h = l.defaultProps, h)
|
|
25
|
-
T[g] === void 0 && (T[g] = h[g]);
|
|
26
|
-
return { $$typeof: o, type: l, key: x, ref: S, props: T, _owner: p.current };
|
|
14
|
+
if (Ve) return G;
|
|
15
|
+
Ve = 1;
|
|
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 };
|
|
17
|
+
function l(s, d, y) {
|
|
18
|
+
var b, w = {}, T = null, S = null;
|
|
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,57 +33,57 @@ var K = {};
|
|
|
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 =
|
|
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
|
-
var
|
|
51
|
-
function
|
|
46
|
+
var P = t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
|
|
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];
|
|
55
|
-
|
|
51
|
+
x("error", e, n);
|
|
56
52
|
}
|
|
57
53
|
}
|
|
58
|
-
function
|
|
54
|
+
function x(e, r, n) {
|
|
59
55
|
{
|
|
60
|
-
var u =
|
|
61
|
-
|
|
62
|
-
var
|
|
56
|
+
var u = P.ReactDebugCurrentFrame, p = u.getStackAddendum();
|
|
57
|
+
p !== "" && (r += "%s", n = n.concat([p]));
|
|
58
|
+
var g = n.map(function(f) {
|
|
63
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
|
|
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 ||
|
|
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;
|
|
@@ -98,30 +94,30 @@ function Rr() {
|
|
|
98
94
|
return "Portal";
|
|
99
95
|
case v:
|
|
100
96
|
return "Profiler";
|
|
101
|
-
case
|
|
97
|
+
case h:
|
|
102
98
|
return "StrictMode";
|
|
103
99
|
case y:
|
|
104
100
|
return "Suspense";
|
|
105
|
-
case
|
|
101
|
+
case b:
|
|
106
102
|
return "SuspenseList";
|
|
107
103
|
}
|
|
108
104
|
if (typeof e == "object")
|
|
109
105
|
switch (e.$$typeof) {
|
|
110
|
-
case l:
|
|
111
|
-
var r = e;
|
|
112
|
-
return he(r) + ".Consumer";
|
|
113
106
|
case s:
|
|
107
|
+
var r = e;
|
|
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
|
-
case
|
|
114
|
+
case w:
|
|
119
115
|
var u = e.displayName || null;
|
|
120
|
-
return u !== null ? u :
|
|
121
|
-
case
|
|
122
|
-
var
|
|
116
|
+
return u !== null ? u : L(e.type) || "Memo";
|
|
117
|
+
case T: {
|
|
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 $ = Object.assign,
|
|
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
|
-
if (
|
|
139
|
-
|
|
134
|
+
if (U === 0) {
|
|
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, {
|
|
@@ -153,12 +149,12 @@ function Rr() {
|
|
|
153
149
|
groupEnd: e
|
|
154
150
|
});
|
|
155
151
|
}
|
|
156
|
-
|
|
152
|
+
U++;
|
|
157
153
|
}
|
|
158
154
|
}
|
|
159
|
-
function
|
|
155
|
+
function ze() {
|
|
160
156
|
{
|
|
161
|
-
if (
|
|
157
|
+
if (U--, U === 0) {
|
|
162
158
|
var e = {
|
|
163
159
|
configurable: !0,
|
|
164
160
|
enumerable: !0,
|
|
@@ -166,64 +162,64 @@ function Rr() {
|
|
|
166
162
|
};
|
|
167
163
|
Object.defineProperties(console, {
|
|
168
164
|
log: $({}, e, {
|
|
169
|
-
value:
|
|
165
|
+
value: ve
|
|
170
166
|
}),
|
|
171
167
|
info: $({}, e, {
|
|
172
|
-
value:
|
|
168
|
+
value: pe
|
|
173
169
|
}),
|
|
174
170
|
warn: $({}, e, {
|
|
175
|
-
value:
|
|
171
|
+
value: he
|
|
176
172
|
}),
|
|
177
173
|
error: $({}, e, {
|
|
178
|
-
value:
|
|
174
|
+
value: _e
|
|
179
175
|
}),
|
|
180
176
|
group: $({}, e, {
|
|
181
|
-
value:
|
|
177
|
+
value: ge
|
|
182
178
|
}),
|
|
183
179
|
groupCollapsed: $({}, e, {
|
|
184
|
-
value:
|
|
180
|
+
value: be
|
|
185
181
|
}),
|
|
186
182
|
groupEnd: $({}, e, {
|
|
187
|
-
value:
|
|
183
|
+
value: Ee
|
|
188
184
|
})
|
|
189
185
|
});
|
|
190
186
|
}
|
|
191
|
-
|
|
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
|
-
var
|
|
226
|
-
|
|
221
|
+
var g;
|
|
222
|
+
g = te.current, te.current = null, Je();
|
|
227
223
|
try {
|
|
228
224
|
if (r) {
|
|
229
225
|
var f = function() {
|
|
@@ -236,29 +232,29 @@ function Rr() {
|
|
|
236
232
|
}), typeof Reflect == "object" && Reflect.construct) {
|
|
237
233
|
try {
|
|
238
234
|
Reflect.construct(f, []);
|
|
239
|
-
} catch (
|
|
240
|
-
u =
|
|
235
|
+
} catch (j) {
|
|
236
|
+
u = j;
|
|
241
237
|
}
|
|
242
238
|
Reflect.construct(e, [], f);
|
|
243
239
|
} else {
|
|
244
240
|
try {
|
|
245
241
|
f.call();
|
|
246
|
-
} catch (
|
|
247
|
-
u =
|
|
242
|
+
} catch (j) {
|
|
243
|
+
u = j;
|
|
248
244
|
}
|
|
249
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--;
|
|
@@ -267,69 +263,69 @@ function Rr() {
|
|
|
267
263
|
if (E !== 1 || m !== 1)
|
|
268
264
|
do
|
|
269
265
|
if (E--, m--, m < 0 || c[E] !== C[m]) {
|
|
270
|
-
var
|
|
266
|
+
var O = `
|
|
271
267
|
` + c[E].replace(" at new ", " at ");
|
|
272
|
-
return e.displayName &&
|
|
268
|
+
return e.displayName && O.includes("<anonymous>") && (O = O.replace("<anonymous>", e.displayName)), typeof e == "function" && X.set(e, O), O;
|
|
273
269
|
}
|
|
274
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 Y = e ? e.displayName || e.name : "",
|
|
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
|
|
301
|
-
case
|
|
302
|
-
return
|
|
296
|
+
return H("Suspense");
|
|
297
|
+
case b:
|
|
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
|
-
case
|
|
309
|
-
return
|
|
310
|
-
case
|
|
311
|
-
var u = e,
|
|
304
|
+
case w:
|
|
305
|
+
return Z(e.type, r, n);
|
|
306
|
+
case T: {
|
|
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
|
|
326
|
+
var g = Function.call.bind(Q);
|
|
331
327
|
for (var f in e)
|
|
332
|
-
if (
|
|
328
|
+
if (g(e, f)) {
|
|
333
329
|
var c = void 0;
|
|
334
330
|
try {
|
|
335
331
|
if (typeof e[f] != "function") {
|
|
@@ -340,12 +336,12 @@ function Rr() {
|
|
|
340
336
|
} catch (E) {
|
|
341
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
|
-
ce = {};
|
|
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 = D(B.current.type);
|
|
397
|
-
ce[n] || (R('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', D(B.current.type), e.ref), ce[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,
|
|
@@ -429,7 +421,7 @@ function Rr() {
|
|
|
429
421
|
ref: n,
|
|
430
422
|
props: f,
|
|
431
423
|
// Record the component responsible for creating this element.
|
|
432
|
-
_owner:
|
|
424
|
+
_owner: g
|
|
433
425
|
};
|
|
434
426
|
return c._store = {}, Object.defineProperty(c._store, "validated", {
|
|
435
427
|
configurable: !1,
|
|
@@ -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
|
|
454
|
-
n !== void 0 && (
|
|
455
|
-
for (
|
|
456
|
-
|
|
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));
|
|
447
|
+
for (g in r)
|
|
448
|
+
Q.call(r, g) && !tr.hasOwnProperty(g) && (f[g] = r[g]);
|
|
457
449
|
if (e && e.defaultProps) {
|
|
458
450
|
var E = e.defaultProps;
|
|
459
|
-
for (
|
|
460
|
-
f[
|
|
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
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
|
|
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
|
-
r.$$typeof ===
|
|
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
573
|
var f = qe(e);
|
|
590
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 +=
|
|
577
|
+
var C = fr();
|
|
578
|
+
C ? c += C : c += ke();
|
|
595
579
|
var E;
|
|
596
|
-
e === null ? E = "null" :
|
|
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
585
|
if (f) {
|
|
602
|
-
var
|
|
603
|
-
if (
|
|
586
|
+
var O = r.children;
|
|
587
|
+
if (O !== void 0)
|
|
604
588
|
if (u)
|
|
605
|
-
if (
|
|
606
|
-
for (var Y = 0; Y <
|
|
607
|
-
|
|
608
|
-
Object.freeze && Object.freeze(
|
|
589
|
+
if (ae(O)) {
|
|
590
|
+
for (var Y = 0; Y < O.length; Y++)
|
|
591
|
+
Ae(O[Y], e);
|
|
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,45 +618,45 @@ const H = Ye({
|
|
|
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
|
-
const [a,
|
|
656
|
-
return [v, (
|
|
657
|
-
const
|
|
658
|
-
o && o(
|
|
639
|
+
const [a, h] = Ye(i), v = t !== void 0 ? t : a;
|
|
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
|
-
const
|
|
664
|
-
|
|
647
|
+
const h = a.defaultPrevented;
|
|
648
|
+
h && (a.defaultPrevented = !1), t == null || t(a);
|
|
665
649
|
let v;
|
|
666
|
-
return a.defaultPrevented || (v = o == null ? void 0 : o(a),
|
|
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]);
|
|
674
658
|
}
|
|
675
|
-
function
|
|
659
|
+
function Ge() {
|
|
676
660
|
let t = -1;
|
|
677
661
|
const o = {};
|
|
678
662
|
function i(a) {
|
|
@@ -692,30 +676,29 @@ function Tr(t, o) {
|
|
|
692
676
|
i != "__root__" && ((a = t[i].ref.current) == null || a.focus());
|
|
693
677
|
}
|
|
694
678
|
function xr(t, o) {
|
|
695
|
-
var
|
|
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
|
-
(
|
|
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());
|
|
705
689
|
}
|
|
706
690
|
function Cr(t, o) {
|
|
707
|
-
var
|
|
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,109 +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
|
-
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
const L = Ge((w) => {
|
|
740
|
-
if (!(!yr.includes(w.key) || !s.current))
|
|
741
|
-
switch (w.key) {
|
|
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) {
|
|
742
722
|
case "ArrowRight":
|
|
743
|
-
if (!
|
|
744
|
-
|
|
745
|
-
w.preventDefault(), y.has(b.current) ? wr(s.current, b.current) : g((P) => /* @__PURE__ */ new Set([...P, b.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]));
|
|
746
725
|
break;
|
|
747
726
|
case "ArrowLeft":
|
|
748
|
-
|
|
727
|
+
_.preventDefault(), y.has(R.current) ? b((x) => new Set([...x].filter((k) => k !== R.current))) : Tr(l, R.current);
|
|
749
728
|
break;
|
|
750
729
|
case "ArrowUp":
|
|
751
|
-
|
|
730
|
+
_.preventDefault(), xr(l, R.current);
|
|
752
731
|
break;
|
|
753
732
|
case "ArrowDown":
|
|
754
|
-
|
|
733
|
+
_.preventDefault(), Cr(l, R.current);
|
|
755
734
|
break;
|
|
756
735
|
case "Home":
|
|
757
|
-
|
|
736
|
+
_.preventDefault(), Sr(l);
|
|
758
737
|
break;
|
|
759
738
|
case "End":
|
|
760
|
-
|
|
739
|
+
_.preventDefault(), Pr(l);
|
|
761
740
|
break;
|
|
762
741
|
case "Enter":
|
|
763
|
-
|
|
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]));
|
|
764
743
|
break;
|
|
765
744
|
}
|
|
766
|
-
}, [y]),
|
|
767
|
-
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(
|
|
768
747
|
"ul",
|
|
769
748
|
{
|
|
770
|
-
ref:
|
|
749
|
+
ref: D,
|
|
771
750
|
role: "tree",
|
|
772
751
|
"aria-multiselectable": "false",
|
|
773
|
-
onKeyDown:
|
|
774
|
-
...
|
|
752
|
+
onKeyDown: P,
|
|
753
|
+
...h
|
|
775
754
|
}
|
|
776
755
|
) }) });
|
|
777
|
-
}), kr =
|
|
778
|
-
const { selection: v, setSelection:
|
|
779
|
-
function
|
|
780
|
-
var
|
|
781
|
-
(
|
|
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, _);
|
|
758
|
+
function P(k) {
|
|
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();
|
|
782
761
|
}
|
|
783
|
-
function
|
|
784
|
-
|
|
762
|
+
function _() {
|
|
763
|
+
l(t);
|
|
785
764
|
}
|
|
786
|
-
const
|
|
787
|
-
return y(t,
|
|
765
|
+
const x = w(t);
|
|
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(
|
|
788
769
|
"li",
|
|
789
770
|
{
|
|
790
|
-
ref:
|
|
771
|
+
ref: D,
|
|
791
772
|
role: "treenode",
|
|
792
773
|
"aria-selected": v == t,
|
|
793
|
-
tabIndex:
|
|
794
|
-
onFocus:
|
|
795
|
-
onClick:
|
|
796
|
-
"data-depth":
|
|
774
|
+
tabIndex: s.current == t ? 0 : -1,
|
|
775
|
+
onFocus: R,
|
|
776
|
+
onClick: I,
|
|
777
|
+
"data-depth": T,
|
|
797
778
|
...a
|
|
798
779
|
}
|
|
799
780
|
);
|
|
800
|
-
}), jr =
|
|
801
|
-
const
|
|
802
|
-
function
|
|
803
|
-
var
|
|
804
|
-
(
|
|
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();
|
|
805
786
|
}
|
|
806
|
-
const
|
|
807
|
-
return y(t,
|
|
787
|
+
const P = w(t);
|
|
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(
|
|
808
791
|
"li",
|
|
809
792
|
{
|
|
810
|
-
ref:
|
|
793
|
+
ref: D,
|
|
811
794
|
role: "treenode",
|
|
812
795
|
"data-state": v.has(t) ? "open" : "closed",
|
|
813
|
-
"data-depth":
|
|
796
|
+
"data-depth": T,
|
|
814
797
|
"aria-expanded": v.has(t),
|
|
815
|
-
"aria-selected":
|
|
816
|
-
tabIndex:
|
|
817
|
-
onFocus:
|
|
798
|
+
"aria-selected": l == t,
|
|
799
|
+
tabIndex: s.current == t ? 0 : -1,
|
|
800
|
+
onFocus: R,
|
|
818
801
|
...i
|
|
819
802
|
}
|
|
820
803
|
) });
|
|
821
|
-
}), Dr =
|
|
822
|
-
const { setRootValue: a, setSelection:
|
|
823
|
-
function
|
|
824
|
-
|
|
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]));
|
|
825
808
|
}
|
|
826
|
-
return /* @__PURE__ */
|
|
809
|
+
return /* @__PURE__ */ A.jsx(
|
|
827
810
|
"div",
|
|
828
811
|
{
|
|
829
812
|
ref: i,
|
|
830
|
-
onClick:
|
|
813
|
+
onClick: l,
|
|
831
814
|
...o
|
|
832
815
|
}
|
|
833
816
|
);
|
|
834
|
-
}), Ar =
|
|
835
|
-
const { rootValue: i } =
|
|
817
|
+
}), Ar = K(({ ...t }, o) => {
|
|
818
|
+
const { rootValue: i } = F(J), { parent: a } = F(W);
|
|
836
819
|
if (i.has(a))
|
|
837
|
-
return /* @__PURE__ */
|
|
820
|
+
return /* @__PURE__ */ A.jsx(
|
|
838
821
|
"ul",
|
|
839
822
|
{
|
|
840
823
|
ref: o,
|