react-composable-treeview 1.0.4 → 1.0.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +8 -8
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +275 -271
- 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 We, { createContext as Ye, useRef as I, useCallback as ne, useState as Ue, forwardRef as M, useContext as V } from "react";
|
|
2
|
+
var de = { exports: {} }, q = {};
|
|
3
3
|
/**
|
|
4
4
|
* @license React
|
|
5
5
|
* react-jsx-runtime.production.min.js
|
|
@@ -9,25 +9,25 @@ var fe = { 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 Ne;
|
|
13
13
|
function br() {
|
|
14
|
-
if (
|
|
15
|
-
return
|
|
16
|
-
|
|
17
|
-
var t =
|
|
18
|
-
function s(
|
|
19
|
-
var
|
|
20
|
-
y !== void 0 && (T = "" + y),
|
|
21
|
-
for (
|
|
22
|
-
a.call(
|
|
23
|
-
if (
|
|
24
|
-
for (
|
|
25
|
-
w[
|
|
26
|
-
return { $$typeof: o, type:
|
|
14
|
+
if (Ne)
|
|
15
|
+
return q;
|
|
16
|
+
Ne = 1;
|
|
17
|
+
var t = We, o = Symbol.for("react.element"), i = Symbol.for("react.fragment"), a = Object.prototype.hasOwnProperty, d = t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, p = { key: !0, ref: !0, __self: !0, __source: !0 };
|
|
18
|
+
function s(f, _, y) {
|
|
19
|
+
var b, w = {}, T = null, S = null;
|
|
20
|
+
y !== void 0 && (T = "" + y), _.key !== void 0 && (T = "" + _.key), _.ref !== void 0 && (S = _.ref);
|
|
21
|
+
for (b in _)
|
|
22
|
+
a.call(_, b) && !p.hasOwnProperty(b) && (w[b] = _[b]);
|
|
23
|
+
if (f && f.defaultProps)
|
|
24
|
+
for (b in _ = f.defaultProps, _)
|
|
25
|
+
w[b] === void 0 && (w[b] = _[b]);
|
|
26
|
+
return { $$typeof: o, type: f, key: T, ref: S, props: w, _owner: d.current };
|
|
27
27
|
}
|
|
28
|
-
return
|
|
28
|
+
return q.Fragment = i, q.jsx = s, q.jsxs = s, q;
|
|
29
29
|
}
|
|
30
|
-
var
|
|
30
|
+
var K = {};
|
|
31
31
|
/**
|
|
32
32
|
* @license React
|
|
33
33
|
* react-jsx-runtime.development.js
|
|
@@ -37,18 +37,18 @@ var q = {};
|
|
|
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 $e;
|
|
41
41
|
function Rr() {
|
|
42
|
-
return
|
|
43
|
-
var t =
|
|
42
|
+
return $e || ($e = 1, process.env.NODE_ENV !== "production" && function() {
|
|
43
|
+
var t = We, o = Symbol.for("react.element"), i = Symbol.for("react.portal"), a = Symbol.for("react.fragment"), d = Symbol.for("react.strict_mode"), p = Symbol.for("react.profiler"), s = Symbol.for("react.provider"), f = 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
44
|
function L(e) {
|
|
45
45
|
if (e === null || typeof e != "object")
|
|
46
46
|
return null;
|
|
47
|
-
var r = A && e[A] || e[
|
|
47
|
+
var r = A && e[A] || e[E];
|
|
48
48
|
return typeof r == "function" ? r : null;
|
|
49
49
|
}
|
|
50
|
-
var
|
|
51
|
-
function
|
|
50
|
+
var P = t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
|
|
51
|
+
function h(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,22 +57,22 @@ function Rr() {
|
|
|
57
57
|
}
|
|
58
58
|
function x(e, r, n) {
|
|
59
59
|
{
|
|
60
|
-
var u =
|
|
60
|
+
var u = P.ReactDebugCurrentFrame, v = u.getStackAddendum();
|
|
61
61
|
v !== "" && (r += "%s", n = n.concat([v]));
|
|
62
|
-
var
|
|
62
|
+
var g = n.map(function(l) {
|
|
63
63
|
return String(l);
|
|
64
64
|
});
|
|
65
|
-
|
|
65
|
+
g.unshift("Warning: " + r), Function.prototype.apply.call(console[e], console, g);
|
|
66
66
|
}
|
|
67
67
|
}
|
|
68
|
-
var
|
|
69
|
-
|
|
68
|
+
var k = !1, N = !1, H = !1, X = !1, Be = !1, pe;
|
|
69
|
+
pe = 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 === p || Be || e === d || e === y || e === b || X || e === S || k || N || H || typeof e == "object" && e !== null && (e.$$typeof === T || e.$$typeof === w || e.$$typeof === s || e.$$typeof === f || 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 === pe || e.getModuleId !== void 0));
|
|
76
76
|
}
|
|
77
77
|
function Ke(e, r, n) {
|
|
78
78
|
var u = e.displayName;
|
|
@@ -81,13 +81,13 @@ function Rr() {
|
|
|
81
81
|
var v = r.displayName || r.name || "";
|
|
82
82
|
return v !== "" ? n + "(" + v + ")" : n;
|
|
83
83
|
}
|
|
84
|
-
function
|
|
84
|
+
function he(e) {
|
|
85
85
|
return e.displayName || "Context";
|
|
86
86
|
}
|
|
87
|
-
function
|
|
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" && h("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,32 +96,32 @@ function Rr() {
|
|
|
96
96
|
return "Fragment";
|
|
97
97
|
case i:
|
|
98
98
|
return "Portal";
|
|
99
|
-
case
|
|
99
|
+
case p:
|
|
100
100
|
return "Profiler";
|
|
101
101
|
case d:
|
|
102
102
|
return "StrictMode";
|
|
103
103
|
case y:
|
|
104
104
|
return "Suspense";
|
|
105
|
-
case
|
|
105
|
+
case b:
|
|
106
106
|
return "SuspenseList";
|
|
107
107
|
}
|
|
108
108
|
if (typeof e == "object")
|
|
109
109
|
switch (e.$$typeof) {
|
|
110
|
-
case
|
|
110
|
+
case f:
|
|
111
111
|
var r = e;
|
|
112
|
-
return
|
|
112
|
+
return he(r) + ".Consumer";
|
|
113
113
|
case s:
|
|
114
114
|
var n = e;
|
|
115
|
-
return
|
|
116
|
-
case
|
|
115
|
+
return he(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
|
-
return u !== null ? u :
|
|
120
|
+
return u !== null ? u : j(e.type) || "Memo";
|
|
121
121
|
case T: {
|
|
122
|
-
var v = e,
|
|
122
|
+
var v = e, g = v._payload, l = v._init;
|
|
123
123
|
try {
|
|
124
|
-
return
|
|
124
|
+
return j(l(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 $ = Object.assign, G = 0, _e, ge, be, Re, Ee, me, ye;
|
|
133
|
+
function we() {
|
|
134
134
|
}
|
|
135
|
-
|
|
135
|
+
we.__reactDisabledLog = !0;
|
|
136
136
|
function Je() {
|
|
137
137
|
{
|
|
138
|
-
if (
|
|
139
|
-
|
|
138
|
+
if (G === 0) {
|
|
139
|
+
_e = console.log, ge = console.info, be = console.warn, Re = console.error, Ee = console.group, me = console.groupCollapsed, ye = console.groupEnd;
|
|
140
140
|
var e = {
|
|
141
141
|
configurable: !0,
|
|
142
142
|
enumerable: !0,
|
|
143
|
-
value:
|
|
143
|
+
value: we,
|
|
144
144
|
writable: !0
|
|
145
145
|
};
|
|
146
146
|
Object.defineProperties(console, {
|
|
@@ -153,77 +153,77 @@ function Rr() {
|
|
|
153
153
|
groupEnd: e
|
|
154
154
|
});
|
|
155
155
|
}
|
|
156
|
-
|
|
156
|
+
G++;
|
|
157
157
|
}
|
|
158
158
|
}
|
|
159
159
|
function Me() {
|
|
160
160
|
{
|
|
161
|
-
if (
|
|
161
|
+
if (G--, G === 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:
|
|
169
|
-
value: pe
|
|
170
|
-
}),
|
|
171
|
-
info: N({}, e, {
|
|
172
|
-
value: he
|
|
173
|
-
}),
|
|
174
|
-
warn: N({}, e, {
|
|
168
|
+
log: $({}, e, {
|
|
175
169
|
value: _e
|
|
176
170
|
}),
|
|
177
|
-
|
|
171
|
+
info: $({}, e, {
|
|
178
172
|
value: ge
|
|
179
173
|
}),
|
|
180
|
-
|
|
174
|
+
warn: $({}, e, {
|
|
181
175
|
value: be
|
|
182
176
|
}),
|
|
183
|
-
|
|
177
|
+
error: $({}, e, {
|
|
184
178
|
value: Re
|
|
185
179
|
}),
|
|
186
|
-
|
|
180
|
+
group: $({}, e, {
|
|
187
181
|
value: Ee
|
|
182
|
+
}),
|
|
183
|
+
groupCollapsed: $({}, e, {
|
|
184
|
+
value: me
|
|
185
|
+
}),
|
|
186
|
+
groupEnd: $({}, e, {
|
|
187
|
+
value: ye
|
|
188
188
|
})
|
|
189
189
|
});
|
|
190
190
|
}
|
|
191
|
-
|
|
191
|
+
G < 0 && h("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
|
|
192
192
|
}
|
|
193
193
|
}
|
|
194
|
-
var
|
|
195
|
-
function
|
|
194
|
+
var oe = P.ReactCurrentDispatcher, ae;
|
|
195
|
+
function Z(e, r, n) {
|
|
196
196
|
{
|
|
197
|
-
if (
|
|
197
|
+
if (ae === void 0)
|
|
198
198
|
try {
|
|
199
199
|
throw Error();
|
|
200
200
|
} catch (v) {
|
|
201
201
|
var u = v.stack.trim().match(/\n( *(at )?)/);
|
|
202
|
-
|
|
202
|
+
ae = u && u[1] || "";
|
|
203
203
|
}
|
|
204
204
|
return `
|
|
205
|
-
` +
|
|
205
|
+
` + ae + e;
|
|
206
206
|
}
|
|
207
207
|
}
|
|
208
|
-
var
|
|
208
|
+
var ie = !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 Te(e, r) {
|
|
214
|
+
if (!e || ie)
|
|
215
215
|
return "";
|
|
216
216
|
{
|
|
217
|
-
var n =
|
|
217
|
+
var n = Q.get(e);
|
|
218
218
|
if (n !== void 0)
|
|
219
219
|
return n;
|
|
220
220
|
}
|
|
221
221
|
var u;
|
|
222
|
-
|
|
222
|
+
ie = !0;
|
|
223
223
|
var v = Error.prepareStackTrace;
|
|
224
224
|
Error.prepareStackTrace = void 0;
|
|
225
|
-
var
|
|
226
|
-
|
|
225
|
+
var g;
|
|
226
|
+
g = oe.current, oe.current = null, Je();
|
|
227
227
|
try {
|
|
228
228
|
if (r) {
|
|
229
229
|
var l = function() {
|
|
@@ -236,116 +236,116 @@ function Rr() {
|
|
|
236
236
|
}), typeof Reflect == "object" && Reflect.construct) {
|
|
237
237
|
try {
|
|
238
238
|
Reflect.construct(l, []);
|
|
239
|
-
} catch (
|
|
240
|
-
u =
|
|
239
|
+
} catch (D) {
|
|
240
|
+
u = D;
|
|
241
241
|
}
|
|
242
242
|
Reflect.construct(e, [], l);
|
|
243
243
|
} else {
|
|
244
244
|
try {
|
|
245
245
|
l.call();
|
|
246
|
-
} catch (
|
|
247
|
-
u =
|
|
246
|
+
} catch (D) {
|
|
247
|
+
u = D;
|
|
248
248
|
}
|
|
249
249
|
e.call(l.prototype);
|
|
250
250
|
}
|
|
251
251
|
} else {
|
|
252
252
|
try {
|
|
253
253
|
throw Error();
|
|
254
|
-
} catch (
|
|
255
|
-
u =
|
|
254
|
+
} catch (D) {
|
|
255
|
+
u = D;
|
|
256
256
|
}
|
|
257
257
|
e();
|
|
258
258
|
}
|
|
259
|
-
} catch (
|
|
260
|
-
if (
|
|
261
|
-
for (var c =
|
|
262
|
-
`),
|
|
263
|
-
`),
|
|
259
|
+
} catch (D) {
|
|
260
|
+
if (D && u && typeof D.stack == "string") {
|
|
261
|
+
for (var c = D.stack.split(`
|
|
262
|
+
`), C = u.stack.split(`
|
|
263
|
+
`), R = c.length - 1, m = C.length - 1; R >= 1 && m >= 0 && c[R] !== C[m]; )
|
|
264
264
|
m--;
|
|
265
|
-
for (;
|
|
266
|
-
if (c[
|
|
267
|
-
if (
|
|
265
|
+
for (; R >= 1 && m >= 0; R--, m--)
|
|
266
|
+
if (c[R] !== C[m]) {
|
|
267
|
+
if (R !== 1 || m !== 1)
|
|
268
268
|
do
|
|
269
|
-
if (
|
|
269
|
+
if (R--, m--, m < 0 || c[R] !== C[m]) {
|
|
270
270
|
var O = `
|
|
271
|
-
` + c[
|
|
272
|
-
return e.displayName && O.includes("<anonymous>") && (O = O.replace("<anonymous>", e.displayName)), typeof e == "function" &&
|
|
271
|
+
` + c[R].replace(" at new ", " at ");
|
|
272
|
+
return e.displayName && O.includes("<anonymous>") && (O = O.replace("<anonymous>", e.displayName)), typeof e == "function" && Q.set(e, O), O;
|
|
273
273
|
}
|
|
274
|
-
while (
|
|
274
|
+
while (R >= 1 && m >= 0);
|
|
275
275
|
break;
|
|
276
276
|
}
|
|
277
277
|
}
|
|
278
278
|
} finally {
|
|
279
|
-
|
|
279
|
+
ie = !1, oe.current = g, Me(), Error.prepareStackTrace = v;
|
|
280
280
|
}
|
|
281
|
-
var
|
|
282
|
-
return typeof e == "function" &&
|
|
281
|
+
var Y = e ? e.displayName || e.name : "", Le = Y ? Z(Y) : "";
|
|
282
|
+
return typeof e == "function" && Q.set(e, Le), Le;
|
|
283
283
|
}
|
|
284
|
-
function
|
|
285
|
-
return
|
|
284
|
+
function He(e, r, n) {
|
|
285
|
+
return Te(e, !1);
|
|
286
286
|
}
|
|
287
|
-
function
|
|
287
|
+
function Xe(e) {
|
|
288
288
|
var r = e.prototype;
|
|
289
289
|
return !!(r && r.isReactComponent);
|
|
290
290
|
}
|
|
291
|
-
function
|
|
291
|
+
function ee(e, r, n) {
|
|
292
292
|
if (e == null)
|
|
293
293
|
return "";
|
|
294
294
|
if (typeof e == "function")
|
|
295
|
-
return
|
|
295
|
+
return Te(e, Xe(e));
|
|
296
296
|
if (typeof e == "string")
|
|
297
|
-
return
|
|
297
|
+
return Z(e);
|
|
298
298
|
switch (e) {
|
|
299
299
|
case y:
|
|
300
|
-
return
|
|
301
|
-
case
|
|
302
|
-
return
|
|
300
|
+
return Z("Suspense");
|
|
301
|
+
case b:
|
|
302
|
+
return Z("SuspenseList");
|
|
303
303
|
}
|
|
304
304
|
if (typeof e == "object")
|
|
305
305
|
switch (e.$$typeof) {
|
|
306
|
-
case
|
|
307
|
-
return
|
|
306
|
+
case _:
|
|
307
|
+
return He(e.render);
|
|
308
308
|
case w:
|
|
309
|
-
return
|
|
309
|
+
return ee(e.type, r, n);
|
|
310
310
|
case T: {
|
|
311
|
-
var u = e, v = u._payload,
|
|
311
|
+
var u = e, v = u._payload, g = u._init;
|
|
312
312
|
try {
|
|
313
|
-
return
|
|
313
|
+
return ee(g(v), r, n);
|
|
314
314
|
} catch {
|
|
315
315
|
}
|
|
316
316
|
}
|
|
317
317
|
}
|
|
318
318
|
return "";
|
|
319
319
|
}
|
|
320
|
-
var
|
|
321
|
-
function
|
|
320
|
+
var re = Object.prototype.hasOwnProperty, xe = {}, Ce = P.ReactDebugCurrentFrame;
|
|
321
|
+
function te(e) {
|
|
322
322
|
if (e) {
|
|
323
|
-
var r = e._owner, n =
|
|
324
|
-
|
|
323
|
+
var r = e._owner, n = ee(e.type, e._source, r ? r.type : null);
|
|
324
|
+
Ce.setExtraStackFrame(n);
|
|
325
325
|
} else
|
|
326
|
-
|
|
326
|
+
Ce.setExtraStackFrame(null);
|
|
327
327
|
}
|
|
328
328
|
function Ze(e, r, n, u, v) {
|
|
329
329
|
{
|
|
330
|
-
var
|
|
330
|
+
var g = Function.call.bind(re);
|
|
331
331
|
for (var l in e)
|
|
332
|
-
if (
|
|
332
|
+
if (g(e, l)) {
|
|
333
333
|
var c = void 0;
|
|
334
334
|
try {
|
|
335
335
|
if (typeof e[l] != "function") {
|
|
336
|
-
var
|
|
337
|
-
throw
|
|
336
|
+
var C = Error((u || "React class") + ": " + n + " type `" + l + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof e[l] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");
|
|
337
|
+
throw C.name = "Invariant Violation", C;
|
|
338
338
|
}
|
|
339
339
|
c = e[l](r, l, u, n, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
|
|
340
|
-
} catch (
|
|
341
|
-
c =
|
|
340
|
+
} catch (R) {
|
|
341
|
+
c = R;
|
|
342
342
|
}
|
|
343
|
-
c && !(c instanceof Error) && (
|
|
343
|
+
c && !(c instanceof Error) && (te(v), h("%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, l, typeof c), te(null)), c instanceof Error && !(c.message in xe) && (xe[c.message] = !0, te(v), h("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 ue(e) {
|
|
349
349
|
return Qe(e);
|
|
350
350
|
}
|
|
351
351
|
function er(e) {
|
|
@@ -356,27 +356,27 @@ function Rr() {
|
|
|
356
356
|
}
|
|
357
357
|
function rr(e) {
|
|
358
358
|
try {
|
|
359
|
-
return
|
|
359
|
+
return Se(e), !1;
|
|
360
360
|
} catch {
|
|
361
361
|
return !0;
|
|
362
362
|
}
|
|
363
363
|
}
|
|
364
|
-
function
|
|
364
|
+
function Se(e) {
|
|
365
365
|
return "" + e;
|
|
366
366
|
}
|
|
367
|
-
function
|
|
367
|
+
function Pe(e) {
|
|
368
368
|
if (rr(e))
|
|
369
|
-
return
|
|
369
|
+
return h("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", er(e)), Se(e);
|
|
370
370
|
}
|
|
371
|
-
var
|
|
371
|
+
var B = P.ReactCurrentOwner, tr = {
|
|
372
372
|
key: !0,
|
|
373
373
|
ref: !0,
|
|
374
374
|
__self: !0,
|
|
375
375
|
__source: !0
|
|
376
|
-
},
|
|
377
|
-
|
|
376
|
+
}, Oe, ke, ce;
|
|
377
|
+
ce = {};
|
|
378
378
|
function nr(e) {
|
|
379
|
-
if (
|
|
379
|
+
if (re.call(e, "ref")) {
|
|
380
380
|
var r = Object.getOwnPropertyDescriptor(e, "ref").get;
|
|
381
381
|
if (r && r.isReactWarning)
|
|
382
382
|
return !1;
|
|
@@ -384,7 +384,7 @@ function Rr() {
|
|
|
384
384
|
return e.ref !== void 0;
|
|
385
385
|
}
|
|
386
386
|
function or(e) {
|
|
387
|
-
if (
|
|
387
|
+
if (re.call(e, "key")) {
|
|
388
388
|
var r = Object.getOwnPropertyDescriptor(e, "key").get;
|
|
389
389
|
if (r && r.isReactWarning)
|
|
390
390
|
return !1;
|
|
@@ -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 =
|
|
397
|
-
|
|
395
|
+
if (typeof e.ref == "string" && B.current && r && B.current.stateNode !== r) {
|
|
396
|
+
var n = j(B.current.type);
|
|
397
|
+
ce[n] || (h('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(B.current.type), e.ref), ce[n] = !0);
|
|
398
398
|
}
|
|
399
399
|
}
|
|
400
400
|
function ir(e, r) {
|
|
401
401
|
{
|
|
402
402
|
var n = function() {
|
|
403
|
-
|
|
403
|
+
Oe || (Oe = !0, h("%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
|
+
ke || (ke = !0, h("%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,7 +419,7 @@ function Rr() {
|
|
|
419
419
|
});
|
|
420
420
|
}
|
|
421
421
|
}
|
|
422
|
-
var cr = function(e, r, n, u, v,
|
|
422
|
+
var cr = function(e, r, n, u, v, g, l) {
|
|
423
423
|
var c = {
|
|
424
424
|
// This tag allows us to uniquely identify this as a React Element
|
|
425
425
|
$$typeof: o,
|
|
@@ -429,7 +429,7 @@ function Rr() {
|
|
|
429
429
|
ref: n,
|
|
430
430
|
props: l,
|
|
431
431
|
// Record the component responsible for creating this element.
|
|
432
|
-
_owner:
|
|
432
|
+
_owner: g
|
|
433
433
|
};
|
|
434
434
|
return c._store = {}, Object.defineProperty(c._store, "validated", {
|
|
435
435
|
configurable: !1,
|
|
@@ -450,39 +450,39 @@ function Rr() {
|
|
|
450
450
|
};
|
|
451
451
|
function sr(e, r, n, u, v) {
|
|
452
452
|
{
|
|
453
|
-
var
|
|
454
|
-
n !== void 0 && (
|
|
455
|
-
for (
|
|
456
|
-
|
|
453
|
+
var g, l = {}, c = null, C = null;
|
|
454
|
+
n !== void 0 && (Pe(n), c = "" + n), or(r) && (Pe(r.key), c = "" + r.key), nr(r) && (C = r.ref, ar(r, v));
|
|
455
|
+
for (g in r)
|
|
456
|
+
re.call(r, g) && !tr.hasOwnProperty(g) && (l[g] = r[g]);
|
|
457
457
|
if (e && e.defaultProps) {
|
|
458
|
-
var
|
|
459
|
-
for (
|
|
460
|
-
l[
|
|
458
|
+
var R = e.defaultProps;
|
|
459
|
+
for (g in R)
|
|
460
|
+
l[g] === void 0 && (l[g] = R[g]);
|
|
461
461
|
}
|
|
462
|
-
if (c ||
|
|
462
|
+
if (c || C) {
|
|
463
463
|
var m = typeof e == "function" ? e.displayName || e.name || "Unknown" : e;
|
|
464
|
-
c && ir(l, m),
|
|
464
|
+
c && ir(l, m), C && ur(l, m);
|
|
465
465
|
}
|
|
466
|
-
return cr(e, c,
|
|
466
|
+
return cr(e, c, C, v, u, B.current, l);
|
|
467
467
|
}
|
|
468
468
|
}
|
|
469
|
-
var
|
|
470
|
-
function
|
|
469
|
+
var se = P.ReactCurrentOwner, je = P.ReactDebugCurrentFrame;
|
|
470
|
+
function W(e) {
|
|
471
471
|
if (e) {
|
|
472
|
-
var r = e._owner, n =
|
|
473
|
-
|
|
472
|
+
var r = e._owner, n = ee(e.type, e._source, r ? r.type : null);
|
|
473
|
+
je.setExtraStackFrame(n);
|
|
474
474
|
} else
|
|
475
|
-
|
|
475
|
+
je.setExtraStackFrame(null);
|
|
476
476
|
}
|
|
477
|
-
var
|
|
478
|
-
|
|
479
|
-
function
|
|
477
|
+
var fe;
|
|
478
|
+
fe = !1;
|
|
479
|
+
function le(e) {
|
|
480
480
|
return typeof e == "object" && e !== null && e.$$typeof === o;
|
|
481
481
|
}
|
|
482
|
-
function
|
|
482
|
+
function De() {
|
|
483
483
|
{
|
|
484
|
-
if (
|
|
485
|
-
var e =
|
|
484
|
+
if (se.current) {
|
|
485
|
+
var e = j(se.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 Ae = {};
|
|
506
506
|
function lr(e) {
|
|
507
507
|
{
|
|
508
|
-
var r =
|
|
508
|
+
var r = De();
|
|
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 Fe(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 (Ae[n])
|
|
525
525
|
return;
|
|
526
|
-
|
|
526
|
+
Ae[n] = !0;
|
|
527
527
|
var u = "";
|
|
528
|
-
e && e._owner && e._owner !==
|
|
528
|
+
e && e._owner && e._owner !== se.current && (u = " It was passed a child from " + j(e._owner.type) + "."), W(e), h('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), W(null);
|
|
529
529
|
}
|
|
530
530
|
}
|
|
531
|
-
function
|
|
531
|
+
function Ie(e, r) {
|
|
532
532
|
{
|
|
533
533
|
if (typeof e != "object")
|
|
534
534
|
return;
|
|
535
|
-
if (
|
|
535
|
+
if (ue(e))
|
|
536
536
|
for (var n = 0; n < e.length; n++) {
|
|
537
537
|
var u = e[n];
|
|
538
|
-
|
|
538
|
+
le(u) && Fe(u, r);
|
|
539
539
|
}
|
|
540
|
-
else if (
|
|
540
|
+
else if (le(e))
|
|
541
541
|
e._store && (e._store.validated = !0);
|
|
542
542
|
else if (e) {
|
|
543
543
|
var v = L(e);
|
|
544
544
|
if (typeof v == "function" && v !== e.entries)
|
|
545
|
-
for (var
|
|
546
|
-
|
|
545
|
+
for (var g = v.call(e), l; !(l = g.next()).done; )
|
|
546
|
+
le(l.value) && Fe(l.value, r);
|
|
547
547
|
}
|
|
548
548
|
}
|
|
549
549
|
}
|
|
@@ -555,21 +555,21 @@ 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;
|
|
562
562
|
else
|
|
563
563
|
return;
|
|
564
564
|
if (n) {
|
|
565
|
-
var u =
|
|
565
|
+
var u = j(r);
|
|
566
566
|
Ze(n, e.props, "prop", u, e);
|
|
567
|
-
} else if (r.PropTypes !== void 0 && !
|
|
568
|
-
|
|
569
|
-
var v =
|
|
570
|
-
|
|
567
|
+
} else if (r.PropTypes !== void 0 && !fe) {
|
|
568
|
+
fe = !0;
|
|
569
|
+
var v = j(r);
|
|
570
|
+
h("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", v || "Unknown");
|
|
571
571
|
}
|
|
572
|
-
typeof r.getDefaultProps == "function" && !r.getDefaultProps.isReactClassApproved &&
|
|
572
|
+
typeof r.getDefaultProps == "function" && !r.getDefaultProps.isReactClassApproved && h("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
|
+
W(e), h("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", u), W(null);
|
|
581
581
|
break;
|
|
582
582
|
}
|
|
583
583
|
}
|
|
584
|
-
e.ref !== null && (
|
|
584
|
+
e.ref !== null && (W(e), h("Invalid attribute `ref` supplied to `React.Fragment`."), W(null));
|
|
585
585
|
}
|
|
586
586
|
}
|
|
587
|
-
function
|
|
587
|
+
function Ve(e, r, n, u, v, g) {
|
|
588
588
|
{
|
|
589
589
|
var l = qe(e);
|
|
590
590
|
if (!l) {
|
|
591
591
|
var c = "";
|
|
592
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
|
|
594
|
-
|
|
595
|
-
var
|
|
596
|
-
e === null ?
|
|
593
|
+
var C = fr(v);
|
|
594
|
+
C ? c += C : c += De();
|
|
595
|
+
var R;
|
|
596
|
+
e === null ? R = "null" : ue(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, h("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, v,
|
|
598
|
+
var m = sr(e, r, n, v, g);
|
|
599
599
|
if (m == null)
|
|
600
600
|
return m;
|
|
601
601
|
if (l) {
|
|
602
602
|
var O = r.children;
|
|
603
603
|
if (O !== void 0)
|
|
604
604
|
if (u)
|
|
605
|
-
if (
|
|
606
|
-
for (var
|
|
607
|
-
|
|
605
|
+
if (ue(O)) {
|
|
606
|
+
for (var Y = 0; Y < O.length; Y++)
|
|
607
|
+
Ie(O[Y], e);
|
|
608
608
|
Object.freeze && Object.freeze(O);
|
|
609
609
|
} else
|
|
610
|
-
|
|
610
|
+
h("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
|
+
Ie(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 Ve(e, r, n, !0);
|
|
619
619
|
}
|
|
620
620
|
function hr(e, r, n) {
|
|
621
|
-
return
|
|
621
|
+
return Ve(e, r, n, !1);
|
|
622
622
|
}
|
|
623
623
|
var _r = hr, gr = pr;
|
|
624
|
-
|
|
625
|
-
}()),
|
|
624
|
+
K.Fragment = a, K.jsx = _r, K.jsxs = gr;
|
|
625
|
+
}()), K;
|
|
626
626
|
}
|
|
627
|
-
process.env.NODE_ENV === "production" ?
|
|
628
|
-
var
|
|
629
|
-
const
|
|
627
|
+
process.env.NODE_ENV === "production" ? de.exports = br() : de.exports = Rr();
|
|
628
|
+
var F = de.exports;
|
|
629
|
+
const z = Ye({
|
|
630
630
|
rootValue: /* @__PURE__ */ new Set(),
|
|
631
631
|
setRootValue: () => {
|
|
632
632
|
},
|
|
@@ -641,45 +641,45 @@ const J = $e({
|
|
|
641
641
|
function Er() {
|
|
642
642
|
const t = I({
|
|
643
643
|
__root__: { value: "__root__", parent: "", children: {}, index: 0, childrenLength: 0, isGroup: !0, ref: { current: null } }
|
|
644
|
-
}), o = I({}), i =
|
|
644
|
+
}), o = I({}), i = ne((a, d, p, s, f) => {
|
|
645
645
|
if (!t.current[d]) {
|
|
646
|
-
o.current[d] ? o.current[d].push([a, d,
|
|
646
|
+
o.current[d] ? o.current[d].push([a, d, p, s, f]) : o.current[d] = [[a, d, p, s, f]];
|
|
647
647
|
return;
|
|
648
648
|
}
|
|
649
|
-
if (t.current[a] = { value: a, parent: d, children: {}, childrenLength: 0, index:
|
|
650
|
-
for (const
|
|
651
|
-
i(...
|
|
649
|
+
if (t.current[a] = { value: a, parent: d, children: {}, childrenLength: 0, index: p, isGroup: s, ref: f }, t.current[d].children[p] = a, (p + 1 > t.current[d].childrenLength || t.current[t.current[d].childrenLength - 1] == null) && (t.current[d].childrenLength = p + 1), o.current[a]) {
|
|
650
|
+
for (const _ of o.current[a])
|
|
651
|
+
i(..._);
|
|
652
652
|
delete o.current[a];
|
|
653
653
|
}
|
|
654
654
|
}, []);
|
|
655
655
|
return [t, i];
|
|
656
656
|
}
|
|
657
|
-
const
|
|
657
|
+
const U = Ye({
|
|
658
658
|
parent: "",
|
|
659
659
|
getIndex: () => -1,
|
|
660
660
|
depth: -1
|
|
661
661
|
});
|
|
662
662
|
function mr(t, o, i) {
|
|
663
|
-
const [a, d] =
|
|
664
|
-
return [t !== void 0 ? t : a, (
|
|
665
|
-
d(
|
|
663
|
+
const [a, d] = Ue(i);
|
|
664
|
+
return [t !== void 0 ? t : a, (f) => {
|
|
665
|
+
d(f), o && o(a);
|
|
666
666
|
}];
|
|
667
667
|
}
|
|
668
|
-
function
|
|
668
|
+
function J(t, o) {
|
|
669
669
|
return function(a) {
|
|
670
670
|
if (t == null || t(a), !a.defaultPrevented)
|
|
671
671
|
return o == null ? void 0 : o(a);
|
|
672
672
|
};
|
|
673
673
|
}
|
|
674
|
-
function
|
|
675
|
-
return
|
|
674
|
+
function ve(...t) {
|
|
675
|
+
return ne((o) => {
|
|
676
676
|
for (const i of t)
|
|
677
677
|
typeof i == "function" ? i(o) : i != null && (i.current = o);
|
|
678
678
|
}, [t]);
|
|
679
679
|
}
|
|
680
|
-
function
|
|
680
|
+
function Ge() {
|
|
681
681
|
const t = I(-1), o = I({});
|
|
682
|
-
return
|
|
682
|
+
return ne((a) => (o.current[a] == null && (o.current[a] = ++t.current), o.current[a]), []);
|
|
683
683
|
}
|
|
684
684
|
const yr = ["ArrowRight", "ArrowUp", "ArrowLeft", "ArrowDown", "Home", "End", "Enter"];
|
|
685
685
|
function wr(t, o) {
|
|
@@ -693,19 +693,19 @@ function Tr(t, o) {
|
|
|
693
693
|
i != "__root__" && ((a = t[i].ref.current) == null || a.focus());
|
|
694
694
|
}
|
|
695
695
|
function xr(t, o) {
|
|
696
|
-
var d,
|
|
696
|
+
var d, p;
|
|
697
697
|
const i = t[o].parent, a = t[o].index;
|
|
698
698
|
if (a != 0) {
|
|
699
|
-
let s = t[i].children[a - 1],
|
|
700
|
-
for (; t[s].isGroup && (
|
|
701
|
-
s =
|
|
699
|
+
let s = t[i].children[a - 1], f;
|
|
700
|
+
for (; t[s].isGroup && (f = t[s].children[t[s].childrenLength - 1], !(f == null || t[f].ref.current == null)); )
|
|
701
|
+
s = f;
|
|
702
702
|
(d = t[s].ref.current) == null || d.focus();
|
|
703
703
|
return;
|
|
704
704
|
}
|
|
705
|
-
i != "__root__" && ((
|
|
705
|
+
i != "__root__" && ((p = t[i].ref.current) == null || p.focus());
|
|
706
706
|
}
|
|
707
|
-
function
|
|
708
|
-
var d,
|
|
707
|
+
function Cr(t, o) {
|
|
708
|
+
var d, p;
|
|
709
709
|
if (t[o].isGroup) {
|
|
710
710
|
const s = (d = t[t[o].children[0]]) == null ? void 0 : d.ref.current;
|
|
711
711
|
if (s) {
|
|
@@ -719,9 +719,9 @@ function Sr(t, o) {
|
|
|
719
719
|
return;
|
|
720
720
|
o = i;
|
|
721
721
|
}
|
|
722
|
-
(
|
|
722
|
+
(p = t[a].ref.current) == null || p.focus();
|
|
723
723
|
}
|
|
724
|
-
function
|
|
724
|
+
function Sr(t) {
|
|
725
725
|
var i;
|
|
726
726
|
const o = t.__root__.children[0];
|
|
727
727
|
(i = t[o].ref.current) == null || i.focus();
|
|
@@ -733,91 +733,95 @@ function Pr(t) {
|
|
|
733
733
|
o = i;
|
|
734
734
|
(a = t[o].ref.current) == null || a.focus();
|
|
735
735
|
}
|
|
736
|
-
const Or =
|
|
737
|
-
const [s,
|
|
738
|
-
if (!(!yr.includes(
|
|
739
|
-
switch (
|
|
736
|
+
const Or = M(({ value: t, onValueChange: o, defaultValue: i, onKeyDown: a, ...d }, p) => {
|
|
737
|
+
const [s, f] = Er(), _ = Ge(), [y, b] = mr(t, o, i ?? /* @__PURE__ */ new Set()), [w, T] = Ue(null), S = I(null), A = ve(S, p), E = I(""), L = ne((h) => {
|
|
738
|
+
if (!(!yr.includes(h.key) || !s.current))
|
|
739
|
+
switch (h.key) {
|
|
740
740
|
case "ArrowRight":
|
|
741
|
-
if (!s.current[
|
|
741
|
+
if (!s.current[E.current].isGroup)
|
|
742
742
|
break;
|
|
743
|
-
y.has(
|
|
743
|
+
h.preventDefault(), y.has(E.current) ? wr(s.current, E.current) : b((x) => /* @__PURE__ */ new Set([...x, E.current]));
|
|
744
744
|
break;
|
|
745
745
|
case "ArrowLeft":
|
|
746
|
-
y.has(
|
|
746
|
+
h.preventDefault(), y.has(E.current) ? b((x) => new Set([...x].filter((k) => k !== E.current))) : Tr(s.current, E.current);
|
|
747
747
|
break;
|
|
748
748
|
case "ArrowUp":
|
|
749
|
-
xr(s.current,
|
|
749
|
+
h.preventDefault(), xr(s.current, E.current);
|
|
750
750
|
break;
|
|
751
751
|
case "ArrowDown":
|
|
752
|
-
|
|
752
|
+
h.preventDefault(), Cr(s.current, E.current);
|
|
753
753
|
break;
|
|
754
754
|
case "Home":
|
|
755
|
-
|
|
755
|
+
h.preventDefault(), Sr(s.current);
|
|
756
756
|
break;
|
|
757
757
|
case "End":
|
|
758
|
-
Pr(s.current);
|
|
758
|
+
h.preventDefault(), Pr(s.current);
|
|
759
759
|
break;
|
|
760
760
|
case "Enter":
|
|
761
|
-
T(
|
|
761
|
+
h.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]));
|
|
762
762
|
break;
|
|
763
763
|
}
|
|
764
|
-
}, [y]),
|
|
765
|
-
return /* @__PURE__ */
|
|
764
|
+
}, [y]), P = J(a, L);
|
|
765
|
+
return /* @__PURE__ */ F.jsx(z.Provider, { value: { rootValue: y, setRootValue: b, selection: w, setSelection: T, focus: E, nodeMap: s, pushToNodeMap: f }, children: /* @__PURE__ */ F.jsx(U.Provider, { value: { parent: "__root__", getIndex: _, depth: 0 }, children: /* @__PURE__ */ F.jsx(
|
|
766
766
|
"ul",
|
|
767
767
|
{
|
|
768
768
|
ref: A,
|
|
769
769
|
role: "tree",
|
|
770
770
|
"aria-multiselectable": "false",
|
|
771
|
-
onKeyDown:
|
|
771
|
+
onKeyDown: P,
|
|
772
772
|
...d
|
|
773
773
|
}
|
|
774
774
|
) }) });
|
|
775
|
-
}), kr =
|
|
776
|
-
const { selection:
|
|
777
|
-
function
|
|
778
|
-
var
|
|
779
|
-
(
|
|
775
|
+
}), kr = M(({ value: t, onFocus: o, onClick: i, ...a }, d) => {
|
|
776
|
+
const { selection: p, setSelection: s, focus: f, nodeMap: _, pushToNodeMap: y } = V(z), { parent: b, getIndex: w, depth: T } = V(U), S = I(null), A = ve(S, d), E = J(o, P), L = J(i, h);
|
|
777
|
+
function P(k) {
|
|
778
|
+
var N, H, X;
|
|
779
|
+
(H = (N = _.current) == null ? void 0 : N[f.current].ref.current) == null || H.setAttribute("tabindex", "-1"), (X = S.current) == null || X.setAttribute("tabindex", "0"), f.current = t, k.preventDefault();
|
|
780
|
+
}
|
|
781
|
+
function h() {
|
|
782
|
+
s(t);
|
|
780
783
|
}
|
|
781
|
-
const
|
|
782
|
-
return
|
|
784
|
+
const x = w(t);
|
|
785
|
+
return y(t, b, x, !1, S), f.current == "" && b == "__root__" && x == 0 && (f.current = t), /* @__PURE__ */ F.jsx(
|
|
783
786
|
"li",
|
|
784
787
|
{
|
|
785
|
-
ref:
|
|
788
|
+
ref: A,
|
|
786
789
|
role: "treenode",
|
|
787
|
-
"aria-selected":
|
|
790
|
+
"aria-selected": p == t,
|
|
788
791
|
tabIndex: f.current == t ? 0 : -1,
|
|
789
|
-
onFocus:
|
|
790
|
-
|
|
791
|
-
|
|
792
|
+
onFocus: E,
|
|
793
|
+
onClick: L,
|
|
794
|
+
"data-depth": T,
|
|
795
|
+
...a
|
|
792
796
|
}
|
|
793
797
|
);
|
|
794
|
-
}), jr =
|
|
795
|
-
const d =
|
|
796
|
-
function L(
|
|
797
|
-
var x,
|
|
798
|
-
(
|
|
798
|
+
}), jr = M(({ value: t, onFocus: o, ...i }, a) => {
|
|
799
|
+
const d = Ge(), { rootValue: p, selection: s, focus: f, nodeMap: _, pushToNodeMap: y } = V(z), { parent: b, getIndex: w, depth: T } = V(U), S = I(null), A = ve(S, a), E = J(o, L);
|
|
800
|
+
function L(h) {
|
|
801
|
+
var x, k, N;
|
|
802
|
+
(k = (x = _.current) == null ? void 0 : x[f.current].ref.current) == null || k.setAttribute("tabindex", "-1"), (N = S.current) == null || N.setAttribute("tabindex", "0"), f.current = t, h.preventDefault();
|
|
799
803
|
}
|
|
800
|
-
const
|
|
801
|
-
return y(t,
|
|
804
|
+
const P = w(t);
|
|
805
|
+
return y(t, b, P, !0, S), f.current == "" && b == "__root__" && P == 0 && (f.current = t), /* @__PURE__ */ F.jsx(U.Provider, { value: { parent: t, getIndex: d, depth: T + 1 }, children: /* @__PURE__ */ F.jsx(
|
|
802
806
|
"li",
|
|
803
807
|
{
|
|
804
808
|
ref: A,
|
|
805
809
|
role: "treenode",
|
|
806
|
-
"aria-expanded":
|
|
807
|
-
"data-state":
|
|
810
|
+
"aria-expanded": p.has(t),
|
|
811
|
+
"data-state": p.has(t) ? "open" : "closed",
|
|
808
812
|
"data-depth": T,
|
|
809
813
|
"aria-selected": s == t,
|
|
810
|
-
tabIndex:
|
|
811
|
-
onFocus:
|
|
814
|
+
tabIndex: f.current == t ? 0 : -1,
|
|
815
|
+
onFocus: E,
|
|
812
816
|
...i
|
|
813
817
|
}
|
|
814
818
|
) });
|
|
815
|
-
}),
|
|
816
|
-
const { setRootValue: a, setSelection: d } = V(
|
|
817
|
-
function
|
|
818
|
-
d(
|
|
819
|
+
}), Dr = M(({ onClick: t, ...o }, i) => {
|
|
820
|
+
const { setRootValue: a, setSelection: d } = V(z), { parent: p } = V(U), s = J(t, f);
|
|
821
|
+
function f() {
|
|
822
|
+
d(p), a((_) => _.has(p) ? new Set([..._].filter((y) => y !== p)) : /* @__PURE__ */ new Set([..._, p]));
|
|
819
823
|
}
|
|
820
|
-
return /* @__PURE__ */
|
|
824
|
+
return /* @__PURE__ */ F.jsx(
|
|
821
825
|
"div",
|
|
822
826
|
{
|
|
823
827
|
ref: i,
|
|
@@ -825,10 +829,10 @@ const Or = K(({ value: t, onValueChange: o, defaultValue: i, onKeyDown: a, ...d
|
|
|
825
829
|
...o
|
|
826
830
|
}
|
|
827
831
|
);
|
|
828
|
-
}),
|
|
829
|
-
const { rootValue: i } = V(
|
|
832
|
+
}), Ar = M(({ ...t }, o) => {
|
|
833
|
+
const { rootValue: i } = V(z), { parent: a } = V(U);
|
|
830
834
|
if (i.has(a))
|
|
831
|
-
return /* @__PURE__ */
|
|
835
|
+
return /* @__PURE__ */ F.jsx(
|
|
832
836
|
"ul",
|
|
833
837
|
{
|
|
834
838
|
ref: o,
|
|
@@ -839,8 +843,8 @@ const Or = K(({ value: t, onValueChange: o, defaultValue: i, onKeyDown: a, ...d
|
|
|
839
843
|
}), Ir = {
|
|
840
844
|
Root: Or,
|
|
841
845
|
Group: jr,
|
|
842
|
-
Trigger:
|
|
843
|
-
Content:
|
|
846
|
+
Trigger: Dr,
|
|
847
|
+
Content: Ar,
|
|
844
848
|
Item: kr
|
|
845
849
|
};
|
|
846
850
|
export {
|