@smart-factor/gem-ui-components 0.0.114 → 0.0.115
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/{Drawer-C7iAluIV.js → Drawer-DbJg-t8M.js} +50 -50
- package/dist/SignEditor.js +3 -3
- package/dist/{Stack-BmOPvE5G.js → Stack-Bsa5WF4E.js} +46 -46
- package/dist/{Tree-Cg45ggbj.js → Tree-BScJ4KG_.js} +782 -1103
- package/dist/components/Drawer/index.js +1 -1
- package/dist/components/Login/AppVersion.d.ts +2 -0
- package/dist/components/Sidebar/Sidebar.d.ts +2 -1
- package/dist/components/Sidebar/index.d.ts +1 -1
- package/dist/components/Tree/index.js +1 -1
- package/dist/main.d.ts +1 -1
- package/dist/main.js +1901 -1976
- package/dist/{theme-BJI1wus0.js → theme-Dfrivrji.js} +13503 -13059
- package/dist/warning-BcYeNKLQ.js +416 -0
- package/package.json +1 -1
- package/dist/warning--yabK0jO.js +0 -95
|
@@ -1,344 +1,24 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { jsxs as Ce, jsx as E } from "react/jsx-runtime";
|
|
2
2
|
import * as x from "react";
|
|
3
|
-
import { createElement as
|
|
4
|
-
import { g as
|
|
5
|
-
import { u as
|
|
6
|
-
function
|
|
7
|
-
return
|
|
3
|
+
import { createElement as qt } from "react";
|
|
4
|
+
import { g as Te, c as we, A as Ae, s as _, F as le, l as Ee, L as Xt, G as rt, P as o, M as Jt, q as ce, e as Wt, E as Gt, k as $e, o as Yt, w as W, N as et, _ as C, O as G, u as ye, B as U, v as Qt, D as Zt, y as Ht, Q as Ne, r as te, C as tt, p as en, I as tn, S as nn, J as on, K as rn } from "./Stack-Bsa5WF4E.js";
|
|
5
|
+
import { u as sn, a as ln, b as an, w as xe, c as se, C as cn, d as dn, V as un, e as pn } from "./warning-BcYeNKLQ.js";
|
|
6
|
+
function fn(e) {
|
|
7
|
+
return Te("PrivateSwitchBase", e);
|
|
8
8
|
}
|
|
9
|
-
|
|
10
|
-
const
|
|
11
|
-
const {
|
|
12
|
-
orientation: t,
|
|
13
|
-
classes: n
|
|
14
|
-
} = e, r = {
|
|
15
|
-
root: ["root", `${t}`],
|
|
16
|
-
entered: ["entered"],
|
|
17
|
-
hidden: ["hidden"],
|
|
18
|
-
wrapper: ["wrapper", `${t}`],
|
|
19
|
-
wrapperInner: ["wrapperInner", `${t}`]
|
|
20
|
-
};
|
|
21
|
-
return he(r, bn, n);
|
|
22
|
-
}, xn = U("div", {
|
|
23
|
-
name: "MuiCollapse",
|
|
24
|
-
slot: "Root",
|
|
25
|
-
overridesResolver: (e, t) => {
|
|
26
|
-
const {
|
|
27
|
-
ownerState: n
|
|
28
|
-
} = e;
|
|
29
|
-
return [t.root, t[n.orientation], n.state === "entered" && t.entered, n.state === "exited" && !n.in && n.collapsedSize === "0px" && t.hidden];
|
|
30
|
-
}
|
|
31
|
-
})(lt(({
|
|
32
|
-
theme: e
|
|
33
|
-
}) => ({
|
|
34
|
-
height: 0,
|
|
35
|
-
overflow: "hidden",
|
|
36
|
-
transition: e.transitions.create("height"),
|
|
37
|
-
variants: [{
|
|
38
|
-
props: {
|
|
39
|
-
orientation: "horizontal"
|
|
40
|
-
},
|
|
41
|
-
style: {
|
|
42
|
-
height: "auto",
|
|
43
|
-
width: 0,
|
|
44
|
-
transition: e.transitions.create("width")
|
|
45
|
-
}
|
|
46
|
-
}, {
|
|
47
|
-
props: {
|
|
48
|
-
state: "entered"
|
|
49
|
-
},
|
|
50
|
-
style: {
|
|
51
|
-
height: "auto",
|
|
52
|
-
overflow: "visible"
|
|
53
|
-
}
|
|
54
|
-
}, {
|
|
55
|
-
props: {
|
|
56
|
-
state: "entered",
|
|
57
|
-
orientation: "horizontal"
|
|
58
|
-
},
|
|
59
|
-
style: {
|
|
60
|
-
width: "auto"
|
|
61
|
-
}
|
|
62
|
-
}, {
|
|
63
|
-
props: ({
|
|
64
|
-
ownerState: t
|
|
65
|
-
}) => t.state === "exited" && !t.in && t.collapsedSize === "0px",
|
|
66
|
-
style: {
|
|
67
|
-
visibility: "hidden"
|
|
68
|
-
}
|
|
69
|
-
}]
|
|
70
|
-
}))), wn = U("div", {
|
|
71
|
-
name: "MuiCollapse",
|
|
72
|
-
slot: "Wrapper",
|
|
73
|
-
overridesResolver: (e, t) => t.wrapper
|
|
74
|
-
})({
|
|
75
|
-
// Hack to get children with a negative margin to not falsify the height computation.
|
|
76
|
-
display: "flex",
|
|
77
|
-
width: "100%",
|
|
78
|
-
variants: [{
|
|
79
|
-
props: {
|
|
80
|
-
orientation: "horizontal"
|
|
81
|
-
},
|
|
82
|
-
style: {
|
|
83
|
-
width: "auto",
|
|
84
|
-
height: "100%"
|
|
85
|
-
}
|
|
86
|
-
}]
|
|
87
|
-
}), Tn = U("div", {
|
|
88
|
-
name: "MuiCollapse",
|
|
89
|
-
slot: "WrapperInner",
|
|
90
|
-
overridesResolver: (e, t) => t.wrapperInner
|
|
91
|
-
})({
|
|
92
|
-
width: "100%",
|
|
93
|
-
variants: [{
|
|
94
|
-
props: {
|
|
95
|
-
orientation: "horizontal"
|
|
96
|
-
},
|
|
97
|
-
style: {
|
|
98
|
-
width: "auto",
|
|
99
|
-
height: "100%"
|
|
100
|
-
}
|
|
101
|
-
}]
|
|
102
|
-
}), Pe = /* @__PURE__ */ x.forwardRef(function(t, n) {
|
|
103
|
-
const r = st({
|
|
104
|
-
props: t,
|
|
105
|
-
name: "MuiCollapse"
|
|
106
|
-
}), {
|
|
107
|
-
addEndListener: l,
|
|
108
|
-
children: I,
|
|
109
|
-
className: c,
|
|
110
|
-
collapsedSize: s = "0px",
|
|
111
|
-
component: d,
|
|
112
|
-
easing: f,
|
|
113
|
-
in: i,
|
|
114
|
-
onEnter: a,
|
|
115
|
-
onEntered: u,
|
|
116
|
-
onEntering: g,
|
|
117
|
-
onExit: b,
|
|
118
|
-
onExited: m,
|
|
119
|
-
onExiting: p,
|
|
120
|
-
orientation: h = "vertical",
|
|
121
|
-
style: y,
|
|
122
|
-
timeout: w = Yt.standard,
|
|
123
|
-
// eslint-disable-next-line react/prop-types
|
|
124
|
-
TransitionComponent: R = Qt,
|
|
125
|
-
...C
|
|
126
|
-
} = r, S = {
|
|
127
|
-
...r,
|
|
128
|
-
orientation: h,
|
|
129
|
-
collapsedSize: s
|
|
130
|
-
}, M = yn(S), z = Zt(), W = en(), D = x.useRef(null), j = x.useRef(), V = typeof s == "number" ? `${s}px` : s, B = h === "horizontal", N = B ? "width" : "height", K = x.useRef(null), q = pe(n, K), _ = (E) => (O) => {
|
|
131
|
-
if (E) {
|
|
132
|
-
const L = K.current;
|
|
133
|
-
O === void 0 ? E(L) : E(L, O);
|
|
134
|
-
}
|
|
135
|
-
}, X = () => D.current ? D.current[B ? "clientWidth" : "clientHeight"] : 0, A = _((E, O) => {
|
|
136
|
-
D.current && B && (D.current.style.position = "absolute"), E.style[N] = V, a && a(E, O);
|
|
137
|
-
}), J = _((E, O) => {
|
|
138
|
-
const L = X();
|
|
139
|
-
D.current && B && (D.current.style.position = "");
|
|
140
|
-
const {
|
|
141
|
-
duration: G,
|
|
142
|
-
easing: F
|
|
143
|
-
} = tt({
|
|
144
|
-
style: y,
|
|
145
|
-
timeout: w,
|
|
146
|
-
easing: f
|
|
147
|
-
}, {
|
|
148
|
-
mode: "enter"
|
|
149
|
-
});
|
|
150
|
-
if (w === "auto") {
|
|
151
|
-
const ce = z.transitions.getAutoHeightDuration(L);
|
|
152
|
-
E.style.transitionDuration = `${ce}ms`, j.current = ce;
|
|
153
|
-
} else
|
|
154
|
-
E.style.transitionDuration = typeof G == "string" ? G : `${G}ms`;
|
|
155
|
-
E.style[N] = `${L}px`, E.style.transitionTimingFunction = F, g && g(E, O);
|
|
156
|
-
}), $ = _((E, O) => {
|
|
157
|
-
E.style[N] = "auto", u && u(E, O);
|
|
158
|
-
}), Y = _((E) => {
|
|
159
|
-
E.style[N] = `${X()}px`, b && b(E);
|
|
160
|
-
}), oe = _(m), ae = _((E) => {
|
|
161
|
-
const O = X(), {
|
|
162
|
-
duration: L,
|
|
163
|
-
easing: G
|
|
164
|
-
} = tt({
|
|
165
|
-
style: y,
|
|
166
|
-
timeout: w,
|
|
167
|
-
easing: f
|
|
168
|
-
}, {
|
|
169
|
-
mode: "exit"
|
|
170
|
-
});
|
|
171
|
-
if (w === "auto") {
|
|
172
|
-
const F = z.transitions.getAutoHeightDuration(O);
|
|
173
|
-
E.style.transitionDuration = `${F}ms`, j.current = F;
|
|
174
|
-
} else
|
|
175
|
-
E.style.transitionDuration = typeof L == "string" ? L : `${L}ms`;
|
|
176
|
-
E.style[N] = V, E.style.transitionTimingFunction = G, p && p(E);
|
|
177
|
-
});
|
|
178
|
-
return /* @__PURE__ */ v(R, {
|
|
179
|
-
in: i,
|
|
180
|
-
onEnter: A,
|
|
181
|
-
onEntered: $,
|
|
182
|
-
onEntering: J,
|
|
183
|
-
onExit: Y,
|
|
184
|
-
onExited: oe,
|
|
185
|
-
onExiting: ae,
|
|
186
|
-
addEndListener: (E) => {
|
|
187
|
-
w === "auto" && W.start(j.current || 0, E), l && l(K.current, E);
|
|
188
|
-
},
|
|
189
|
-
nodeRef: K,
|
|
190
|
-
timeout: w === "auto" ? null : w,
|
|
191
|
-
...C,
|
|
192
|
-
children: (E, {
|
|
193
|
-
ownerState: O,
|
|
194
|
-
...L
|
|
195
|
-
}) => /* @__PURE__ */ v(xn, {
|
|
196
|
-
as: d,
|
|
197
|
-
className: Me(M.root, c, {
|
|
198
|
-
entered: M.entered,
|
|
199
|
-
exited: !i && V === "0px" && M.hidden
|
|
200
|
-
}[E]),
|
|
201
|
-
style: {
|
|
202
|
-
[B ? "minWidth" : "minHeight"]: V,
|
|
203
|
-
...y
|
|
204
|
-
},
|
|
205
|
-
ref: q,
|
|
206
|
-
ownerState: {
|
|
207
|
-
...S,
|
|
208
|
-
state: E
|
|
209
|
-
},
|
|
210
|
-
...L,
|
|
211
|
-
children: /* @__PURE__ */ v(wn, {
|
|
212
|
-
ownerState: {
|
|
213
|
-
...S,
|
|
214
|
-
state: E
|
|
215
|
-
},
|
|
216
|
-
className: M.wrapper,
|
|
217
|
-
ref: D,
|
|
218
|
-
children: /* @__PURE__ */ v(Tn, {
|
|
219
|
-
ownerState: {
|
|
220
|
-
...S,
|
|
221
|
-
state: E
|
|
222
|
-
},
|
|
223
|
-
className: M.wrapperInner,
|
|
224
|
-
children: I
|
|
225
|
-
})
|
|
226
|
-
})
|
|
227
|
-
})
|
|
228
|
-
});
|
|
229
|
-
});
|
|
230
|
-
process.env.NODE_ENV !== "production" && (Pe.propTypes = {
|
|
231
|
-
// ┌────────────────────────────── Warning ──────────────────────────────┐
|
|
232
|
-
// │ These PropTypes are generated from the TypeScript type definitions. │
|
|
233
|
-
// │ To update them, edit the d.ts file and run `pnpm proptypes`. │
|
|
234
|
-
// └─────────────────────────────────────────────────────────────────────┘
|
|
235
|
-
/**
|
|
236
|
-
* Add a custom transition end trigger. Called with the transitioning DOM
|
|
237
|
-
* node and a done callback. Allows for more fine grained transition end
|
|
238
|
-
* logic. Note: Timeouts are still used as a fallback if provided.
|
|
239
|
-
*/
|
|
240
|
-
addEndListener: o.func,
|
|
241
|
-
/**
|
|
242
|
-
* The content node to be collapsed.
|
|
243
|
-
*/
|
|
244
|
-
children: o.node,
|
|
245
|
-
/**
|
|
246
|
-
* Override or extend the styles applied to the component.
|
|
247
|
-
*/
|
|
248
|
-
classes: o.object,
|
|
249
|
-
/**
|
|
250
|
-
* @ignore
|
|
251
|
-
*/
|
|
252
|
-
className: o.string,
|
|
253
|
-
/**
|
|
254
|
-
* The width (horizontal) or height (vertical) of the container when collapsed.
|
|
255
|
-
* @default '0px'
|
|
256
|
-
*/
|
|
257
|
-
collapsedSize: o.oneOfType([o.number, o.string]),
|
|
258
|
-
/**
|
|
259
|
-
* The component used for the root node.
|
|
260
|
-
* Either a string to use a HTML element or a component.
|
|
261
|
-
*/
|
|
262
|
-
component: at,
|
|
263
|
-
/**
|
|
264
|
-
* The transition timing function.
|
|
265
|
-
* You may specify a single easing or a object containing enter and exit values.
|
|
266
|
-
*/
|
|
267
|
-
easing: o.oneOfType([o.shape({
|
|
268
|
-
enter: o.string,
|
|
269
|
-
exit: o.string
|
|
270
|
-
}), o.string]),
|
|
271
|
-
/**
|
|
272
|
-
* If `true`, the component will transition in.
|
|
273
|
-
*/
|
|
274
|
-
in: o.bool,
|
|
275
|
-
/**
|
|
276
|
-
* @ignore
|
|
277
|
-
*/
|
|
278
|
-
onEnter: o.func,
|
|
279
|
-
/**
|
|
280
|
-
* @ignore
|
|
281
|
-
*/
|
|
282
|
-
onEntered: o.func,
|
|
283
|
-
/**
|
|
284
|
-
* @ignore
|
|
285
|
-
*/
|
|
286
|
-
onEntering: o.func,
|
|
287
|
-
/**
|
|
288
|
-
* @ignore
|
|
289
|
-
*/
|
|
290
|
-
onExit: o.func,
|
|
291
|
-
/**
|
|
292
|
-
* @ignore
|
|
293
|
-
*/
|
|
294
|
-
onExited: o.func,
|
|
295
|
-
/**
|
|
296
|
-
* @ignore
|
|
297
|
-
*/
|
|
298
|
-
onExiting: o.func,
|
|
299
|
-
/**
|
|
300
|
-
* The transition orientation.
|
|
301
|
-
* @default 'vertical'
|
|
302
|
-
*/
|
|
303
|
-
orientation: o.oneOf(["horizontal", "vertical"]),
|
|
304
|
-
/**
|
|
305
|
-
* @ignore
|
|
306
|
-
*/
|
|
307
|
-
style: o.object,
|
|
308
|
-
/**
|
|
309
|
-
* The system prop that allows defining system overrides as well as additional CSS styles.
|
|
310
|
-
*/
|
|
311
|
-
sx: o.oneOfType([o.arrayOf(o.oneOfType([o.func, o.object, o.bool])), o.func, o.object]),
|
|
312
|
-
/**
|
|
313
|
-
* The duration for the transition, in milliseconds.
|
|
314
|
-
* You may specify a single timeout for all transitions, or individually with an object.
|
|
315
|
-
*
|
|
316
|
-
* Set to 'auto' to automatically calculate transition time based on height.
|
|
317
|
-
* @default duration.standard
|
|
318
|
-
*/
|
|
319
|
-
timeout: o.oneOfType([o.oneOf(["auto"]), o.number, o.shape({
|
|
320
|
-
appear: o.number,
|
|
321
|
-
enter: o.number,
|
|
322
|
-
exit: o.number
|
|
323
|
-
})])
|
|
324
|
-
});
|
|
325
|
-
Pe && (Pe.muiSupportAuto = !0);
|
|
326
|
-
function Cn(e) {
|
|
327
|
-
return Ie("PrivateSwitchBase", e);
|
|
328
|
-
}
|
|
329
|
-
ge("PrivateSwitchBase", ["root", "checked", "disabled", "input", "edgeStart", "edgeEnd"]);
|
|
330
|
-
const En = (e) => {
|
|
9
|
+
we("PrivateSwitchBase", ["root", "checked", "disabled", "input", "edgeStart", "edgeEnd"]);
|
|
10
|
+
const mn = (e) => {
|
|
331
11
|
const {
|
|
332
12
|
classes: t,
|
|
333
13
|
checked: n,
|
|
334
14
|
disabled: r,
|
|
335
|
-
edge:
|
|
15
|
+
edge: s
|
|
336
16
|
} = e, I = {
|
|
337
|
-
root: ["root", n && "checked", r && "disabled",
|
|
17
|
+
root: ["root", n && "checked", r && "disabled", s && `edge${le(s)}`],
|
|
338
18
|
input: ["input"]
|
|
339
19
|
};
|
|
340
|
-
return
|
|
341
|
-
},
|
|
20
|
+
return Ee(I, fn, t);
|
|
21
|
+
}, In = _(Xt)({
|
|
342
22
|
padding: 9,
|
|
343
23
|
borderRadius: "50%",
|
|
344
24
|
variants: [{
|
|
@@ -374,8 +54,8 @@ const En = (e) => {
|
|
|
374
54
|
marginRight: -12
|
|
375
55
|
}
|
|
376
56
|
}]
|
|
377
|
-
}),
|
|
378
|
-
shouldForwardProp:
|
|
57
|
+
}), gn = _("input", {
|
|
58
|
+
shouldForwardProp: rt
|
|
379
59
|
})({
|
|
380
60
|
cursor: "inherit",
|
|
381
61
|
position: "absolute",
|
|
@@ -387,126 +67,126 @@ const En = (e) => {
|
|
|
387
67
|
margin: 0,
|
|
388
68
|
padding: 0,
|
|
389
69
|
zIndex: 1
|
|
390
|
-
}),
|
|
70
|
+
}), it = /* @__PURE__ */ x.forwardRef(function(t, n) {
|
|
391
71
|
const {
|
|
392
72
|
autoFocus: r,
|
|
393
|
-
checked:
|
|
73
|
+
checked: s,
|
|
394
74
|
checkedIcon: I,
|
|
395
75
|
defaultChecked: c,
|
|
396
|
-
disabled:
|
|
76
|
+
disabled: l,
|
|
397
77
|
disableFocusRipple: d = !1,
|
|
398
78
|
edge: f = !1,
|
|
399
79
|
icon: i,
|
|
400
80
|
id: a,
|
|
401
81
|
inputProps: u,
|
|
402
82
|
inputRef: g,
|
|
403
|
-
name:
|
|
83
|
+
name: h,
|
|
404
84
|
onBlur: m,
|
|
405
85
|
onChange: p,
|
|
406
|
-
onFocus:
|
|
86
|
+
onFocus: b,
|
|
407
87
|
readOnly: y,
|
|
408
|
-
required:
|
|
409
|
-
tabIndex:
|
|
410
|
-
type:
|
|
411
|
-
value:
|
|
88
|
+
required: T = !1,
|
|
89
|
+
tabIndex: S,
|
|
90
|
+
type: w,
|
|
91
|
+
value: v,
|
|
412
92
|
slots: M = {},
|
|
413
|
-
slotProps:
|
|
414
|
-
...
|
|
415
|
-
} = t, [
|
|
416
|
-
controlled:
|
|
93
|
+
slotProps: $ = {},
|
|
94
|
+
...q
|
|
95
|
+
} = t, [A, N] = sn({
|
|
96
|
+
controlled: s,
|
|
417
97
|
default: !!c,
|
|
418
98
|
name: "SwitchBase",
|
|
419
99
|
state: "checked"
|
|
420
|
-
}),
|
|
421
|
-
|
|
422
|
-
},
|
|
423
|
-
m && m(
|
|
424
|
-
},
|
|
425
|
-
if (
|
|
100
|
+
}), D = ln(), Q = (R) => {
|
|
101
|
+
b && b(R), D && D.onFocus && D.onFocus(R);
|
|
102
|
+
}, z = (R) => {
|
|
103
|
+
m && m(R), D && D.onBlur && D.onBlur(R);
|
|
104
|
+
}, Z = (R) => {
|
|
105
|
+
if (R.nativeEvent.defaultPrevented)
|
|
426
106
|
return;
|
|
427
|
-
const
|
|
428
|
-
|
|
107
|
+
const k = R.target.checked;
|
|
108
|
+
N(k), p && p(R, k);
|
|
429
109
|
};
|
|
430
|
-
let
|
|
431
|
-
|
|
432
|
-
const
|
|
110
|
+
let j = l;
|
|
111
|
+
D && typeof j > "u" && (j = D.disabled);
|
|
112
|
+
const re = w === "checkbox" || w === "radio", X = {
|
|
433
113
|
...t,
|
|
434
|
-
checked:
|
|
435
|
-
disabled:
|
|
114
|
+
checked: A,
|
|
115
|
+
disabled: j,
|
|
436
116
|
disableFocusRipple: d,
|
|
437
117
|
edge: f
|
|
438
|
-
},
|
|
118
|
+
}, O = mn(X), J = {
|
|
439
119
|
slots: M,
|
|
440
120
|
slotProps: {
|
|
441
121
|
input: u,
|
|
442
|
-
|
|
122
|
+
...$
|
|
443
123
|
}
|
|
444
|
-
}, [
|
|
124
|
+
}, [V, H] = Ae("root", {
|
|
445
125
|
ref: n,
|
|
446
|
-
elementType:
|
|
447
|
-
className:
|
|
126
|
+
elementType: In,
|
|
127
|
+
className: O.root,
|
|
448
128
|
shouldForwardComponentProp: !0,
|
|
449
129
|
externalForwardedProps: {
|
|
450
130
|
...J,
|
|
451
131
|
component: "span",
|
|
452
|
-
...
|
|
132
|
+
...q
|
|
453
133
|
},
|
|
454
|
-
getSlotProps: (
|
|
455
|
-
...
|
|
456
|
-
onFocus: (
|
|
457
|
-
var
|
|
458
|
-
(
|
|
134
|
+
getSlotProps: (R) => ({
|
|
135
|
+
...R,
|
|
136
|
+
onFocus: (k) => {
|
|
137
|
+
var L;
|
|
138
|
+
(L = R.onFocus) == null || L.call(R, k), Q(k);
|
|
459
139
|
},
|
|
460
|
-
onBlur: (
|
|
461
|
-
var
|
|
462
|
-
(
|
|
140
|
+
onBlur: (k) => {
|
|
141
|
+
var L;
|
|
142
|
+
(L = R.onBlur) == null || L.call(R, k), z(k);
|
|
463
143
|
}
|
|
464
144
|
}),
|
|
465
145
|
ownerState: X,
|
|
466
146
|
additionalProps: {
|
|
467
147
|
centerRipple: !0,
|
|
468
148
|
focusRipple: !d,
|
|
469
|
-
disabled:
|
|
149
|
+
disabled: j,
|
|
470
150
|
role: void 0,
|
|
471
151
|
tabIndex: null
|
|
472
152
|
}
|
|
473
|
-
}), [
|
|
153
|
+
}), [pe, Re] = Ae("input", {
|
|
474
154
|
ref: g,
|
|
475
|
-
elementType:
|
|
476
|
-
className:
|
|
155
|
+
elementType: gn,
|
|
156
|
+
className: O.input,
|
|
477
157
|
externalForwardedProps: J,
|
|
478
|
-
getSlotProps: (
|
|
479
|
-
...
|
|
480
|
-
onChange: (
|
|
481
|
-
var
|
|
482
|
-
(
|
|
158
|
+
getSlotProps: (R) => ({
|
|
159
|
+
...R,
|
|
160
|
+
onChange: (k) => {
|
|
161
|
+
var L;
|
|
162
|
+
(L = R.onChange) == null || L.call(R, k), Z(k);
|
|
483
163
|
}
|
|
484
164
|
}),
|
|
485
165
|
ownerState: X,
|
|
486
166
|
additionalProps: {
|
|
487
167
|
autoFocus: r,
|
|
488
|
-
checked:
|
|
168
|
+
checked: s,
|
|
489
169
|
defaultChecked: c,
|
|
490
|
-
disabled:
|
|
491
|
-
id:
|
|
492
|
-
name:
|
|
170
|
+
disabled: j,
|
|
171
|
+
id: re ? a : void 0,
|
|
172
|
+
name: h,
|
|
493
173
|
readOnly: y,
|
|
494
|
-
required:
|
|
495
|
-
tabIndex:
|
|
496
|
-
type:
|
|
497
|
-
...
|
|
498
|
-
value:
|
|
174
|
+
required: T,
|
|
175
|
+
tabIndex: S,
|
|
176
|
+
type: w,
|
|
177
|
+
...w === "checkbox" && v === void 0 ? {} : {
|
|
178
|
+
value: v
|
|
499
179
|
}
|
|
500
180
|
}
|
|
501
181
|
});
|
|
502
|
-
return /* @__PURE__ */
|
|
503
|
-
...
|
|
504
|
-
children: [/* @__PURE__ */
|
|
505
|
-
...
|
|
506
|
-
}),
|
|
182
|
+
return /* @__PURE__ */ Ce(V, {
|
|
183
|
+
...H,
|
|
184
|
+
children: [/* @__PURE__ */ E(pe, {
|
|
185
|
+
...Re
|
|
186
|
+
}), A ? I : i]
|
|
507
187
|
});
|
|
508
188
|
});
|
|
509
|
-
process.env.NODE_ENV !== "production" && (
|
|
189
|
+
process.env.NODE_ENV !== "production" && (it.propTypes = {
|
|
510
190
|
/**
|
|
511
191
|
* If `true`, the `input` element is focused during the first mount.
|
|
512
192
|
*/
|
|
@@ -563,7 +243,7 @@ process.env.NODE_ENV !== "production" && (dt.propTypes = {
|
|
|
563
243
|
/**
|
|
564
244
|
* Pass a ref to the `input` element.
|
|
565
245
|
*/
|
|
566
|
-
inputRef:
|
|
246
|
+
inputRef: Jt,
|
|
567
247
|
/*
|
|
568
248
|
* @ignore
|
|
569
249
|
*/
|
|
@@ -625,41 +305,41 @@ process.env.NODE_ENV !== "production" && (dt.propTypes = {
|
|
|
625
305
|
*/
|
|
626
306
|
value: o.any
|
|
627
307
|
});
|
|
628
|
-
const
|
|
308
|
+
const bn = ce(/* @__PURE__ */ E("path", {
|
|
629
309
|
d: "M19 5v14H5V5h14m0-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2z"
|
|
630
|
-
}), "CheckBoxOutlineBlank"),
|
|
310
|
+
}), "CheckBoxOutlineBlank"), hn = ce(/* @__PURE__ */ E("path", {
|
|
631
311
|
d: "M19 3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.11 0 2-.9 2-2V5c0-1.1-.89-2-2-2zm-9 14l-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z"
|
|
632
|
-
}), "CheckBox"),
|
|
312
|
+
}), "CheckBox"), yn = ce(/* @__PURE__ */ E("path", {
|
|
633
313
|
d: "M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-2 10H7v-2h10v2z"
|
|
634
314
|
}), "IndeterminateCheckBox");
|
|
635
|
-
function
|
|
636
|
-
return
|
|
315
|
+
function xn(e) {
|
|
316
|
+
return Te("MuiCheckbox", e);
|
|
637
317
|
}
|
|
638
|
-
const
|
|
318
|
+
const De = we("MuiCheckbox", ["root", "checked", "disabled", "indeterminate", "colorPrimary", "colorSecondary", "sizeSmall", "sizeMedium"]), Cn = (e) => {
|
|
639
319
|
const {
|
|
640
320
|
classes: t,
|
|
641
321
|
indeterminate: n,
|
|
642
322
|
color: r,
|
|
643
|
-
size:
|
|
323
|
+
size: s
|
|
644
324
|
} = e, I = {
|
|
645
|
-
root: ["root", n && "indeterminate", `color${
|
|
646
|
-
}, c =
|
|
325
|
+
root: ["root", n && "indeterminate", `color${le(r)}`, `size${le(s)}`]
|
|
326
|
+
}, c = Ee(I, xn, t);
|
|
647
327
|
return {
|
|
648
328
|
...t,
|
|
649
329
|
// forward the disabled and checked classes to the SwitchBase
|
|
650
330
|
...c
|
|
651
331
|
};
|
|
652
|
-
},
|
|
653
|
-
shouldForwardProp: (e) =>
|
|
332
|
+
}, Tn = _(it, {
|
|
333
|
+
shouldForwardProp: (e) => rt(e) || e === "classes",
|
|
654
334
|
name: "MuiCheckbox",
|
|
655
335
|
slot: "Root",
|
|
656
336
|
overridesResolver: (e, t) => {
|
|
657
337
|
const {
|
|
658
338
|
ownerState: n
|
|
659
339
|
} = e;
|
|
660
|
-
return [t.root, n.indeterminate && t.indeterminate, t[`size${
|
|
340
|
+
return [t.root, n.indeterminate && t.indeterminate, t[`size${le(n.size)}`], n.color !== "default" && t[`color${le(n.color)}`]];
|
|
661
341
|
}
|
|
662
|
-
})(
|
|
342
|
+
})(Yt(({
|
|
663
343
|
theme: e
|
|
664
344
|
}) => ({
|
|
665
345
|
color: (e.vars || e).palette.text.secondary,
|
|
@@ -670,28 +350,28 @@ const $e = ge("MuiCheckbox", ["root", "checked", "disabled", "indeterminate", "c
|
|
|
670
350
|
},
|
|
671
351
|
style: {
|
|
672
352
|
"&:hover": {
|
|
673
|
-
backgroundColor: e.vars ? `rgba(${e.vars.palette.action.activeChannel} / ${e.vars.palette.action.hoverOpacity})` :
|
|
353
|
+
backgroundColor: e.vars ? `rgba(${e.vars.palette.action.activeChannel} / ${e.vars.palette.action.hoverOpacity})` : W(e.palette.action.active, e.palette.action.hoverOpacity)
|
|
674
354
|
}
|
|
675
355
|
}
|
|
676
|
-
}, ...Object.entries(e.palette).filter(
|
|
356
|
+
}, ...Object.entries(e.palette).filter(et()).map(([t]) => ({
|
|
677
357
|
props: {
|
|
678
358
|
color: t,
|
|
679
359
|
disableRipple: !1
|
|
680
360
|
},
|
|
681
361
|
style: {
|
|
682
362
|
"&:hover": {
|
|
683
|
-
backgroundColor: e.vars ? `rgba(${e.vars.palette[t].mainChannel} / ${e.vars.palette.action.hoverOpacity})` :
|
|
363
|
+
backgroundColor: e.vars ? `rgba(${e.vars.palette[t].mainChannel} / ${e.vars.palette.action.hoverOpacity})` : W(e.palette[t].main, e.palette.action.hoverOpacity)
|
|
684
364
|
}
|
|
685
365
|
}
|
|
686
|
-
})), ...Object.entries(e.palette).filter(
|
|
366
|
+
})), ...Object.entries(e.palette).filter(et()).map(([t]) => ({
|
|
687
367
|
props: {
|
|
688
368
|
color: t
|
|
689
369
|
},
|
|
690
370
|
style: {
|
|
691
|
-
[`&.${
|
|
371
|
+
[`&.${De.checked}, &.${De.indeterminate}`]: {
|
|
692
372
|
color: (e.vars || e).palette[t].main
|
|
693
373
|
},
|
|
694
|
-
[`&.${
|
|
374
|
+
[`&.${De.disabled}`]: {
|
|
695
375
|
color: (e.vars || e).palette.action.disabled
|
|
696
376
|
}
|
|
697
377
|
}
|
|
@@ -709,37 +389,37 @@ const $e = ge("MuiCheckbox", ["root", "checked", "disabled", "indeterminate", "c
|
|
|
709
389
|
}
|
|
710
390
|
}
|
|
711
391
|
}]
|
|
712
|
-
}))),
|
|
713
|
-
const r =
|
|
392
|
+
}))), wn = /* @__PURE__ */ E(hn, {}), En = /* @__PURE__ */ E(bn, {}), vn = /* @__PURE__ */ E(yn, {}), st = /* @__PURE__ */ x.forwardRef(function(t, n) {
|
|
393
|
+
const r = Wt({
|
|
714
394
|
props: t,
|
|
715
395
|
name: "MuiCheckbox"
|
|
716
396
|
}), {
|
|
717
|
-
checkedIcon:
|
|
397
|
+
checkedIcon: s = wn,
|
|
718
398
|
color: I = "primary",
|
|
719
|
-
icon: c =
|
|
720
|
-
indeterminate:
|
|
721
|
-
indeterminateIcon: d =
|
|
399
|
+
icon: c = En,
|
|
400
|
+
indeterminate: l = !1,
|
|
401
|
+
indeterminateIcon: d = vn,
|
|
722
402
|
inputProps: f,
|
|
723
403
|
size: i = "medium",
|
|
724
404
|
disableRipple: a = !1,
|
|
725
405
|
className: u,
|
|
726
406
|
slots: g = {},
|
|
727
|
-
slotProps:
|
|
407
|
+
slotProps: h = {},
|
|
728
408
|
...m
|
|
729
|
-
} = r, p =
|
|
409
|
+
} = r, p = l ? d : c, b = l ? d : s, y = {
|
|
730
410
|
...r,
|
|
731
411
|
disableRipple: a,
|
|
732
412
|
color: I,
|
|
733
|
-
indeterminate:
|
|
413
|
+
indeterminate: l,
|
|
734
414
|
size: i
|
|
735
|
-
},
|
|
415
|
+
}, T = Cn(y), S = h.input ?? f, [w, v] = Ae("root", {
|
|
736
416
|
ref: n,
|
|
737
|
-
elementType:
|
|
738
|
-
className:
|
|
417
|
+
elementType: Tn,
|
|
418
|
+
className: $e(T.root, u),
|
|
739
419
|
shouldForwardComponentProp: !0,
|
|
740
420
|
externalForwardedProps: {
|
|
741
421
|
slots: g,
|
|
742
|
-
slotProps:
|
|
422
|
+
slotProps: h,
|
|
743
423
|
...m
|
|
744
424
|
},
|
|
745
425
|
ownerState: y,
|
|
@@ -748,24 +428,24 @@ const $e = ge("MuiCheckbox", ["root", "checked", "disabled", "indeterminate", "c
|
|
|
748
428
|
icon: /* @__PURE__ */ x.cloneElement(p, {
|
|
749
429
|
fontSize: p.props.fontSize ?? i
|
|
750
430
|
}),
|
|
751
|
-
checkedIcon: /* @__PURE__ */ x.cloneElement(
|
|
752
|
-
fontSize:
|
|
431
|
+
checkedIcon: /* @__PURE__ */ x.cloneElement(b, {
|
|
432
|
+
fontSize: b.props.fontSize ?? i
|
|
753
433
|
}),
|
|
754
434
|
disableRipple: a,
|
|
755
435
|
slots: g,
|
|
756
436
|
slotProps: {
|
|
757
|
-
input:
|
|
758
|
-
"data-indeterminate":
|
|
437
|
+
input: Gt(typeof S == "function" ? S(y) : S, {
|
|
438
|
+
"data-indeterminate": l
|
|
759
439
|
})
|
|
760
440
|
}
|
|
761
441
|
}
|
|
762
442
|
});
|
|
763
|
-
return /* @__PURE__ */
|
|
764
|
-
...
|
|
765
|
-
classes:
|
|
443
|
+
return /* @__PURE__ */ E(w, {
|
|
444
|
+
...v,
|
|
445
|
+
classes: T
|
|
766
446
|
});
|
|
767
447
|
});
|
|
768
|
-
process.env.NODE_ENV !== "production" && (
|
|
448
|
+
process.env.NODE_ENV !== "production" && (st.propTypes = {
|
|
769
449
|
// ┌────────────────────────────── Warning ──────────────────────────────┐
|
|
770
450
|
// │ These PropTypes are generated from the TypeScript type definitions. │
|
|
771
451
|
// │ To update them, edit the d.ts file and run `pnpm proptypes`. │
|
|
@@ -879,61 +559,61 @@ process.env.NODE_ENV !== "production" && (ut.propTypes = {
|
|
|
879
559
|
*/
|
|
880
560
|
value: o.any
|
|
881
561
|
});
|
|
882
|
-
function
|
|
883
|
-
return
|
|
562
|
+
function lt(e) {
|
|
563
|
+
return an;
|
|
884
564
|
}
|
|
885
|
-
function
|
|
886
|
-
return
|
|
565
|
+
function Pn(e) {
|
|
566
|
+
return Te("MuiSimpleTreeView", e);
|
|
887
567
|
}
|
|
888
|
-
|
|
889
|
-
const
|
|
890
|
-
const n = x.useRef({}), [r,
|
|
568
|
+
we("MuiSimpleTreeView", ["root"]);
|
|
569
|
+
const Sn = (e, t) => {
|
|
570
|
+
const n = x.useRef({}), [r, s] = x.useState(() => {
|
|
891
571
|
const c = {};
|
|
892
|
-
return e.forEach((
|
|
893
|
-
|
|
572
|
+
return e.forEach((l) => {
|
|
573
|
+
l.models && Object.entries(l.models).forEach(([d, f]) => {
|
|
894
574
|
n.current[d] = {
|
|
895
575
|
isControlled: t[d] !== void 0,
|
|
896
576
|
getDefaultValue: f.getDefaultValue
|
|
897
577
|
}, c[d] = f.getDefaultValue(t);
|
|
898
578
|
});
|
|
899
579
|
}), c;
|
|
900
|
-
}), I = Object.fromEntries(Object.entries(n.current).map(([c,
|
|
580
|
+
}), I = Object.fromEntries(Object.entries(n.current).map(([c, l]) => {
|
|
901
581
|
const d = t[c] ?? r[c];
|
|
902
582
|
return [c, {
|
|
903
583
|
value: d,
|
|
904
584
|
setControlledValue: (f) => {
|
|
905
|
-
|
|
585
|
+
l.isControlled || s((i) => C({}, i, {
|
|
906
586
|
[c]: f
|
|
907
587
|
}));
|
|
908
588
|
}
|
|
909
589
|
}];
|
|
910
590
|
}));
|
|
911
|
-
return process.env.NODE_ENV !== "production" && Object.entries(n.current).forEach(([c,
|
|
912
|
-
const d = t[c], f =
|
|
591
|
+
return process.env.NODE_ENV !== "production" && Object.entries(n.current).forEach(([c, l]) => {
|
|
592
|
+
const d = t[c], f = l.getDefaultValue(t);
|
|
913
593
|
x.useEffect(() => {
|
|
914
|
-
|
|
594
|
+
l.isControlled !== (d !== void 0) && console.error([`MUI X: A component is changing the ${l.isControlled ? "" : "un"}controlled ${c} state of TreeView to be ${l.isControlled ? "un" : ""}controlled.`, "Elements should not switch from uncontrolled to controlled (or vice versa).", `Decide between using a controlled or uncontrolled ${c} element for the lifetime of the component.`, "The nature of the state is determined during the first render. It's considered controlled if the value is not `undefined`.", "More info: https://fb.me/react-controlled-components"].join(`
|
|
915
595
|
`));
|
|
916
596
|
}, [d]);
|
|
917
597
|
const {
|
|
918
598
|
current: i
|
|
919
599
|
} = x.useRef(f);
|
|
920
600
|
x.useEffect(() => {
|
|
921
|
-
!
|
|
601
|
+
!l.isControlled && i !== f && console.error([`MUI X: A component is changing the default ${c} state of an uncontrolled TreeView after being initialized. To suppress this warning opt to use a controlled TreeView.`].join(`
|
|
922
602
|
`));
|
|
923
603
|
}, [JSON.stringify(f)]);
|
|
924
604
|
}), I;
|
|
925
605
|
};
|
|
926
|
-
class
|
|
606
|
+
class Rn {
|
|
927
607
|
constructor() {
|
|
928
608
|
this.maxListeners = 20, this.warnOnce = !1, this.events = {};
|
|
929
609
|
}
|
|
930
610
|
on(t, n, r = {}) {
|
|
931
|
-
let
|
|
932
|
-
if (
|
|
611
|
+
let s = this.events[t];
|
|
612
|
+
if (s || (s = {
|
|
933
613
|
highPriority: /* @__PURE__ */ new Map(),
|
|
934
614
|
regular: /* @__PURE__ */ new Map()
|
|
935
|
-
}, this.events[t] =
|
|
936
|
-
const I =
|
|
615
|
+
}, this.events[t] = s), r.isFirst ? s.highPriority.set(n, !0) : s.regular.set(n, !0), process.env.NODE_ENV !== "production") {
|
|
616
|
+
const I = s.highPriority.size + s.regular.size;
|
|
937
617
|
I > this.maxListeners && !this.warnOnce && (this.warnOnce = !0, console.warn([`Possible EventEmitter memory leak detected. ${I} ${t} listeners added.`].join(`
|
|
938
618
|
`)));
|
|
939
619
|
}
|
|
@@ -948,29 +628,29 @@ class Nn {
|
|
|
948
628
|
const r = this.events[t];
|
|
949
629
|
if (!r)
|
|
950
630
|
return;
|
|
951
|
-
const
|
|
952
|
-
for (let c =
|
|
953
|
-
const
|
|
954
|
-
r.highPriority.has(
|
|
631
|
+
const s = Array.from(r.highPriority.keys()), I = Array.from(r.regular.keys());
|
|
632
|
+
for (let c = s.length - 1; c >= 0; c -= 1) {
|
|
633
|
+
const l = s[c];
|
|
634
|
+
r.highPriority.has(l) && l.apply(this, n);
|
|
955
635
|
}
|
|
956
636
|
for (let c = 0; c < I.length; c += 1) {
|
|
957
|
-
const
|
|
958
|
-
r.regular.has(
|
|
637
|
+
const l = I[c];
|
|
638
|
+
r.regular.has(l) && l.apply(this, n);
|
|
959
639
|
}
|
|
960
640
|
}
|
|
961
641
|
once(t, n) {
|
|
962
642
|
const r = this;
|
|
963
|
-
this.on(t, function
|
|
964
|
-
r.removeListener(t,
|
|
643
|
+
this.on(t, function s(...I) {
|
|
644
|
+
r.removeListener(t, s), n.apply(r, I);
|
|
965
645
|
});
|
|
966
646
|
}
|
|
967
647
|
}
|
|
968
|
-
const
|
|
969
|
-
const [e] = x.useState(() => new
|
|
970
|
-
const [
|
|
971
|
-
c.defaultMuiPrevented = !1, !(
|
|
972
|
-
}, [e]), n = x.useCallback((r,
|
|
973
|
-
e.removeListener(r,
|
|
648
|
+
const Mn = (e) => e.isPropagationStopped !== void 0, at = () => {
|
|
649
|
+
const [e] = x.useState(() => new Rn()), t = x.useCallback((...r) => {
|
|
650
|
+
const [s, I, c = {}] = r;
|
|
651
|
+
c.defaultMuiPrevented = !1, !(Mn(c) && c.isPropagationStopped()) && e.emit(s, I, c);
|
|
652
|
+
}, [e]), n = x.useCallback((r, s) => (e.on(r, s), () => {
|
|
653
|
+
e.removeListener(r, s);
|
|
974
654
|
}), [e]);
|
|
975
655
|
return {
|
|
976
656
|
instance: {
|
|
@@ -979,8 +659,8 @@ const jn = (e) => e.isPropagationStopped !== void 0, ft = () => {
|
|
|
979
659
|
}
|
|
980
660
|
};
|
|
981
661
|
};
|
|
982
|
-
|
|
983
|
-
const
|
|
662
|
+
at.params = {};
|
|
663
|
+
const ct = ({
|
|
984
664
|
plugins: e
|
|
985
665
|
}) => {
|
|
986
666
|
const t = new Set(e);
|
|
@@ -990,21 +670,21 @@ const mt = ({
|
|
|
990
670
|
}
|
|
991
671
|
};
|
|
992
672
|
};
|
|
993
|
-
|
|
994
|
-
let
|
|
995
|
-
const
|
|
673
|
+
ct.params = {};
|
|
674
|
+
let nt = 0;
|
|
675
|
+
const kn = () => (nt += 1, `mui-tree-view-${nt}`), ve = ({
|
|
996
676
|
id: e,
|
|
997
677
|
treeId: t = "",
|
|
998
678
|
itemId: n
|
|
999
|
-
}) => e ?? `${t}-${n}`,
|
|
679
|
+
}) => e ?? `${t}-${n}`, je = ({
|
|
1000
680
|
params: e,
|
|
1001
681
|
state: t,
|
|
1002
682
|
setState: n
|
|
1003
683
|
}) => {
|
|
1004
684
|
x.useEffect(() => {
|
|
1005
|
-
n((
|
|
1006
|
-
id:
|
|
1007
|
-
treeId: e.id ??
|
|
685
|
+
n((s) => s.id.treeId === e.id && s.id.treeId !== void 0 ? s : C({}, s, {
|
|
686
|
+
id: C({}, s.id, {
|
|
687
|
+
treeId: e.id ?? kn()
|
|
1008
688
|
})
|
|
1009
689
|
}));
|
|
1010
690
|
}, [n, e.id]);
|
|
@@ -1018,36 +698,36 @@ const zn = () => (rt += 1, `mui-tree-view-${rt}`), ke = ({
|
|
|
1018
698
|
}
|
|
1019
699
|
};
|
|
1020
700
|
};
|
|
1021
|
-
|
|
701
|
+
je.params = {
|
|
1022
702
|
id: !0
|
|
1023
703
|
};
|
|
1024
|
-
|
|
704
|
+
je.getInitialState = ({
|
|
1025
705
|
id: e
|
|
1026
706
|
}) => ({
|
|
1027
707
|
id: {
|
|
1028
708
|
treeId: e ?? void 0
|
|
1029
709
|
}
|
|
1030
710
|
});
|
|
1031
|
-
const
|
|
711
|
+
const On = [at, ct, je], Vn = ["slots", "slotProps", "apiRef", "experimentalFeatures"], Dn = (e) => {
|
|
1032
712
|
let {
|
|
1033
713
|
props: {
|
|
1034
714
|
slots: t,
|
|
1035
715
|
slotProps: n,
|
|
1036
716
|
apiRef: r,
|
|
1037
|
-
experimentalFeatures:
|
|
717
|
+
experimentalFeatures: s
|
|
1038
718
|
},
|
|
1039
719
|
plugins: I
|
|
1040
|
-
} = e, c =
|
|
1041
|
-
const
|
|
720
|
+
} = e, c = G(e.props, Vn);
|
|
721
|
+
const l = {};
|
|
1042
722
|
I.forEach((u) => {
|
|
1043
|
-
Object.assign(
|
|
723
|
+
Object.assign(l, u.params);
|
|
1044
724
|
});
|
|
1045
725
|
const d = {}, f = {};
|
|
1046
726
|
Object.keys(c).forEach((u) => {
|
|
1047
727
|
const g = c[u];
|
|
1048
|
-
|
|
728
|
+
l[u] ? d[u] = g : f[u] = g;
|
|
1049
729
|
});
|
|
1050
|
-
const i =
|
|
730
|
+
const i = s ?? {}, a = I.reduce((u, g) => g.getDefaultizedParams ? g.getDefaultizedParams({
|
|
1051
731
|
params: u,
|
|
1052
732
|
experimentalFeatures: i
|
|
1053
733
|
}) : u, d);
|
|
@@ -1059,20 +739,20 @@ const Bn = [ft, mt, Be], _n = ["slots", "slotProps", "apiRef", "experimentalFeat
|
|
|
1059
739
|
slotProps: n ?? {},
|
|
1060
740
|
experimentalFeatures: i
|
|
1061
741
|
};
|
|
1062
|
-
},
|
|
742
|
+
}, Fn = ({
|
|
1063
743
|
plugins: e,
|
|
1064
744
|
instance: t,
|
|
1065
745
|
publicAPI: n,
|
|
1066
746
|
rootRef: r
|
|
1067
747
|
}) => ({
|
|
1068
|
-
runItemPlugins: (
|
|
748
|
+
runItemPlugins: (l) => {
|
|
1069
749
|
let d = null, f = null;
|
|
1070
750
|
const i = [], a = {};
|
|
1071
|
-
e.forEach((
|
|
1072
|
-
if (!
|
|
751
|
+
e.forEach((h) => {
|
|
752
|
+
if (!h.itemPlugin)
|
|
1073
753
|
return;
|
|
1074
|
-
const m =
|
|
1075
|
-
props:
|
|
754
|
+
const m = h.itemPlugin({
|
|
755
|
+
props: l,
|
|
1076
756
|
rootRef: d,
|
|
1077
757
|
contentRef: f
|
|
1078
758
|
});
|
|
@@ -1080,13 +760,13 @@ const Bn = [ft, mt, Be], _n = ["slots", "slotProps", "apiRef", "experimentalFeat
|
|
|
1080
760
|
a[p] = !0;
|
|
1081
761
|
}));
|
|
1082
762
|
});
|
|
1083
|
-
const u = (
|
|
763
|
+
const u = (h) => (m) => {
|
|
1084
764
|
const p = {};
|
|
1085
|
-
return i.forEach((
|
|
1086
|
-
const y = h
|
|
765
|
+
return i.forEach((b) => {
|
|
766
|
+
const y = b[h];
|
|
1087
767
|
y != null && Object.assign(p, y(m));
|
|
1088
768
|
}), p;
|
|
1089
|
-
}, g = Object.fromEntries(Object.keys(a).map((
|
|
769
|
+
}, g = Object.fromEntries(Object.keys(a).map((h) => [h, u(h)]));
|
|
1090
770
|
return {
|
|
1091
771
|
contentRef: f,
|
|
1092
772
|
rootRef: d,
|
|
@@ -1094,14 +774,14 @@ const Bn = [ft, mt, Be], _n = ["slots", "slotProps", "apiRef", "experimentalFeat
|
|
|
1094
774
|
};
|
|
1095
775
|
},
|
|
1096
776
|
wrapItem: ({
|
|
1097
|
-
itemId:
|
|
777
|
+
itemId: l,
|
|
1098
778
|
children: d
|
|
1099
779
|
}) => {
|
|
1100
780
|
let f = d;
|
|
1101
781
|
for (let i = e.length - 1; i >= 0; i -= 1) {
|
|
1102
782
|
const a = e[i];
|
|
1103
783
|
a.wrapItem && (f = a.wrapItem({
|
|
1104
|
-
itemId:
|
|
784
|
+
itemId: l,
|
|
1105
785
|
children: f,
|
|
1106
786
|
instance: t
|
|
1107
787
|
}));
|
|
@@ -1109,9 +789,9 @@ const Bn = [ft, mt, Be], _n = ["slots", "slotProps", "apiRef", "experimentalFeat
|
|
|
1109
789
|
return f;
|
|
1110
790
|
},
|
|
1111
791
|
wrapRoot: ({
|
|
1112
|
-
children:
|
|
792
|
+
children: l
|
|
1113
793
|
}) => {
|
|
1114
|
-
let d =
|
|
794
|
+
let d = l;
|
|
1115
795
|
for (let f = e.length - 1; f >= 0; f -= 1) {
|
|
1116
796
|
const i = e[f];
|
|
1117
797
|
i.wrapRoot && (d = i.wrapRoot({
|
|
@@ -1125,73 +805,73 @@ const Bn = [ft, mt, Be], _n = ["slots", "slotProps", "apiRef", "experimentalFeat
|
|
|
1125
805
|
rootRef: r,
|
|
1126
806
|
publicAPI: n
|
|
1127
807
|
});
|
|
1128
|
-
function
|
|
808
|
+
function An(e) {
|
|
1129
809
|
const t = x.useRef({});
|
|
1130
810
|
return e ? (e.current == null && (e.current = {}), e.current) : t.current;
|
|
1131
811
|
}
|
|
1132
|
-
const
|
|
812
|
+
const Ln = ({
|
|
1133
813
|
plugins: e,
|
|
1134
814
|
rootRef: t,
|
|
1135
815
|
props: n
|
|
1136
816
|
}) => {
|
|
1137
|
-
const r = [...
|
|
1138
|
-
pluginParams:
|
|
817
|
+
const r = [...On, ...e], {
|
|
818
|
+
pluginParams: s,
|
|
1139
819
|
forwardedProps: I,
|
|
1140
820
|
apiRef: c,
|
|
1141
|
-
experimentalFeatures:
|
|
821
|
+
experimentalFeatures: l,
|
|
1142
822
|
slots: d,
|
|
1143
823
|
slotProps: f
|
|
1144
|
-
} =
|
|
824
|
+
} = Dn({
|
|
1145
825
|
plugins: r,
|
|
1146
826
|
props: n
|
|
1147
|
-
}), i =
|
|
827
|
+
}), i = Sn(r, s), u = x.useRef({}).current, g = An(c), h = x.useRef(null), m = ye(h, t), p = Fn({
|
|
1148
828
|
plugins: r,
|
|
1149
829
|
instance: u,
|
|
1150
830
|
publicAPI: g,
|
|
1151
|
-
rootRef:
|
|
1152
|
-
}), [
|
|
1153
|
-
const
|
|
831
|
+
rootRef: h
|
|
832
|
+
}), [b, y] = x.useState(() => {
|
|
833
|
+
const v = {};
|
|
1154
834
|
return r.forEach((M) => {
|
|
1155
|
-
M.getInitialState && Object.assign(
|
|
1156
|
-
}),
|
|
1157
|
-
}),
|
|
1158
|
-
const M =
|
|
835
|
+
M.getInitialState && Object.assign(v, M.getInitialState(s));
|
|
836
|
+
}), v;
|
|
837
|
+
}), T = [], S = (v) => {
|
|
838
|
+
const M = v({
|
|
1159
839
|
instance: u,
|
|
1160
|
-
params:
|
|
840
|
+
params: s,
|
|
1161
841
|
slots: d,
|
|
1162
842
|
slotProps: f,
|
|
1163
|
-
experimentalFeatures:
|
|
1164
|
-
state:
|
|
843
|
+
experimentalFeatures: l,
|
|
844
|
+
state: b,
|
|
1165
845
|
setState: y,
|
|
1166
|
-
rootRef:
|
|
846
|
+
rootRef: h,
|
|
1167
847
|
models: i,
|
|
1168
848
|
plugins: r
|
|
1169
849
|
});
|
|
1170
|
-
M.getRootProps &&
|
|
850
|
+
M.getRootProps && T.push(M.getRootProps), M.publicAPI && Object.assign(g, M.publicAPI), M.instance && Object.assign(u, M.instance), M.contextValue && Object.assign(p, M.contextValue);
|
|
1171
851
|
};
|
|
1172
|
-
return r.forEach(
|
|
1173
|
-
getRootProps: (
|
|
1174
|
-
const M =
|
|
852
|
+
return r.forEach(S), {
|
|
853
|
+
getRootProps: (v = {}) => {
|
|
854
|
+
const M = C({
|
|
1175
855
|
role: "tree"
|
|
1176
|
-
}, I,
|
|
856
|
+
}, I, v, {
|
|
1177
857
|
ref: m
|
|
1178
858
|
});
|
|
1179
|
-
return
|
|
1180
|
-
Object.assign(M,
|
|
859
|
+
return T.forEach(($) => {
|
|
860
|
+
Object.assign(M, $(v));
|
|
1181
861
|
}), M;
|
|
1182
862
|
},
|
|
1183
863
|
rootRef: m,
|
|
1184
864
|
contextValue: p,
|
|
1185
865
|
instance: u
|
|
1186
866
|
};
|
|
1187
|
-
},
|
|
1188
|
-
process.env.NODE_ENV !== "production" && (
|
|
1189
|
-
function
|
|
867
|
+
}, Be = /* @__PURE__ */ x.createContext(null);
|
|
868
|
+
process.env.NODE_ENV !== "production" && (Be.displayName = "TreeViewContext");
|
|
869
|
+
function $n(e) {
|
|
1190
870
|
const {
|
|
1191
871
|
value: t,
|
|
1192
872
|
children: n
|
|
1193
873
|
} = e;
|
|
1194
|
-
return /* @__PURE__ */
|
|
874
|
+
return /* @__PURE__ */ E(Be.Provider, {
|
|
1195
875
|
value: t,
|
|
1196
876
|
children: t.wrapRoot({
|
|
1197
877
|
children: n,
|
|
@@ -1199,43 +879,43 @@ function Wn(e) {
|
|
|
1199
879
|
})
|
|
1200
880
|
});
|
|
1201
881
|
}
|
|
1202
|
-
const
|
|
1203
|
-
const e = x.useContext(
|
|
882
|
+
const oe = () => {
|
|
883
|
+
const e = x.useContext(Be);
|
|
1204
884
|
if (e == null)
|
|
1205
885
|
throw new Error(["MUI X: Could not find the Tree View context.", "It looks like you rendered your component outside of a SimpleTreeView or RichTreeView parent component.", "This can also happen if you are bundling multiple versions of the Tree View."].join(`
|
|
1206
886
|
`));
|
|
1207
887
|
return e;
|
|
1208
|
-
},
|
|
888
|
+
}, dt = (e, t, n) => {
|
|
1209
889
|
e.$$publishEvent(t, n);
|
|
1210
|
-
},
|
|
890
|
+
}, Y = "__TREE_VIEW_ROOT_PARENT_ID__", ut = (e) => {
|
|
1211
891
|
const t = {};
|
|
1212
892
|
return e.forEach((n, r) => {
|
|
1213
893
|
t[n] = r;
|
|
1214
894
|
}), t;
|
|
1215
|
-
},
|
|
1216
|
-
process.env.NODE_ENV !== "production" && (
|
|
1217
|
-
const
|
|
895
|
+
}, ne = /* @__PURE__ */ x.createContext(() => -1);
|
|
896
|
+
process.env.NODE_ENV !== "production" && (ne.displayName = "TreeViewItemDepthContext");
|
|
897
|
+
const Nn = ["children"], pt = ({
|
|
1218
898
|
items: e,
|
|
1219
899
|
isItemDisabled: t,
|
|
1220
900
|
getItemLabel: n,
|
|
1221
901
|
getItemId: r
|
|
1222
902
|
}) => {
|
|
1223
|
-
const
|
|
1224
|
-
[
|
|
1225
|
-
},
|
|
903
|
+
const s = {}, I = {}, c = {
|
|
904
|
+
[Y]: []
|
|
905
|
+
}, l = (f, i, a) => {
|
|
1226
906
|
var m, p;
|
|
1227
907
|
const u = r ? r(f) : f.id;
|
|
1228
908
|
if (u == null)
|
|
1229
909
|
throw new Error(["MUI X: The Tree View component requires all items to have a unique `id` property.", "Alternatively, you can use the `getItemId` prop to specify a custom id for each item.", "An item was provided without id in the `items` prop:", JSON.stringify(f)].join(`
|
|
1230
910
|
`));
|
|
1231
|
-
if (
|
|
911
|
+
if (s[u] != null)
|
|
1232
912
|
throw new Error(["MUI X: The Tree View component requires all items to have a unique `id` property.", "Alternatively, you can use the `getItemId` prop to specify a custom id for each item.", `Two items were provided with the same id in the \`items\` prop: "${u}"`].join(`
|
|
1233
913
|
`));
|
|
1234
914
|
const g = n ? n(f) : f.label;
|
|
1235
915
|
if (g == null)
|
|
1236
916
|
throw new Error(["MUI X: The Tree View component requires all items to have a `label` property.", "Alternatively, you can use the `getItemLabel` prop to specify a custom label for each item.", "An item was provided without label in the `items` prop:", JSON.stringify(f)].join(`
|
|
1237
917
|
`));
|
|
1238
|
-
|
|
918
|
+
s[u] = {
|
|
1239
919
|
id: u,
|
|
1240
920
|
label: g,
|
|
1241
921
|
parentId: a,
|
|
@@ -1244,36 +924,36 @@ const Jn = ["children"], ht = ({
|
|
|
1244
924
|
disabled: t ? t(f) : !1,
|
|
1245
925
|
depth: i
|
|
1246
926
|
}, I[u] = f;
|
|
1247
|
-
const
|
|
1248
|
-
c[
|
|
927
|
+
const h = a ?? Y;
|
|
928
|
+
c[h] || (c[h] = []), c[h].push(u), (p = f.children) == null || p.forEach((b) => l(b, i + 1, u));
|
|
1249
929
|
};
|
|
1250
|
-
e.forEach((f) =>
|
|
930
|
+
e.forEach((f) => l(f, 0, null));
|
|
1251
931
|
const d = {};
|
|
1252
932
|
return Object.keys(c).forEach((f) => {
|
|
1253
|
-
d[f] =
|
|
933
|
+
d[f] = ut(c[f]);
|
|
1254
934
|
}), {
|
|
1255
|
-
itemMetaMap:
|
|
935
|
+
itemMetaMap: s,
|
|
1256
936
|
itemMap: I,
|
|
1257
937
|
itemOrderedChildrenIds: c,
|
|
1258
938
|
itemChildrenIndexes: d
|
|
1259
939
|
};
|
|
1260
|
-
},
|
|
940
|
+
}, de = ({
|
|
1261
941
|
instance: e,
|
|
1262
942
|
params: t,
|
|
1263
943
|
state: n,
|
|
1264
944
|
setState: r,
|
|
1265
|
-
experimentalFeatures:
|
|
945
|
+
experimentalFeatures: s
|
|
1266
946
|
}) => {
|
|
1267
|
-
const I = x.useCallback((
|
|
1268
|
-
const
|
|
1269
|
-
const
|
|
1270
|
-
return
|
|
947
|
+
const I = x.useCallback((b) => n.items.itemMetaMap[b], [n.items.itemMetaMap]), c = x.useCallback((b) => n.items.itemMap[b], [n.items.itemMap]), l = x.useCallback(() => {
|
|
948
|
+
const b = (y) => {
|
|
949
|
+
const T = n.items.itemMap[y], S = G(T, Nn), w = n.items.itemOrderedChildrenIds[y];
|
|
950
|
+
return w && (S.children = w.map(b)), S;
|
|
1271
951
|
};
|
|
1272
|
-
return n.items.itemOrderedChildrenIds[
|
|
1273
|
-
}, [n.items.itemMap, n.items.itemOrderedChildrenIds]), d = x.useCallback((
|
|
1274
|
-
if (
|
|
952
|
+
return n.items.itemOrderedChildrenIds[Y].map(b);
|
|
953
|
+
}, [n.items.itemMap, n.items.itemOrderedChildrenIds]), d = x.useCallback((b) => {
|
|
954
|
+
if (b == null)
|
|
1275
955
|
return !1;
|
|
1276
|
-
let y = e.getItemMeta(
|
|
956
|
+
let y = e.getItemMeta(b);
|
|
1277
957
|
if (!y)
|
|
1278
958
|
return !1;
|
|
1279
959
|
if (y.disabled)
|
|
@@ -1282,32 +962,32 @@ const Jn = ["children"], ht = ({
|
|
|
1282
962
|
if (y = e.getItemMeta(y.parentId), y.disabled)
|
|
1283
963
|
return !0;
|
|
1284
964
|
return !1;
|
|
1285
|
-
}, [e]), f = x.useCallback((
|
|
1286
|
-
const y = e.getItemMeta(
|
|
1287
|
-
return n.items.itemChildrenIndexes[y][
|
|
1288
|
-
}, [e, n.items.itemChildrenIndexes]), i = x.useCallback((
|
|
1289
|
-
const y = e.getItemMeta(
|
|
1290
|
-
return y == null ? null : document.getElementById(
|
|
965
|
+
}, [e]), f = x.useCallback((b) => {
|
|
966
|
+
const y = e.getItemMeta(b).parentId ?? Y;
|
|
967
|
+
return n.items.itemChildrenIndexes[y][b];
|
|
968
|
+
}, [e, n.items.itemChildrenIndexes]), i = x.useCallback((b) => n.items.itemOrderedChildrenIds[b ?? Y] ?? [], [n.items.itemOrderedChildrenIds]), a = (b) => {
|
|
969
|
+
const y = e.getItemMeta(b);
|
|
970
|
+
return y == null ? null : document.getElementById(ve({
|
|
1291
971
|
treeId: n.id.treeId,
|
|
1292
|
-
itemId:
|
|
972
|
+
itemId: b,
|
|
1293
973
|
id: y.idAttribute
|
|
1294
974
|
}));
|
|
1295
|
-
}, u = (
|
|
975
|
+
}, u = (b) => t.disabledItemsFocusable ? !0 : !e.isItemDisabled(b), g = x.useRef(!1), h = x.useCallback(() => {
|
|
1296
976
|
g.current = !0;
|
|
1297
977
|
}, []), m = x.useCallback(() => g.current, []);
|
|
1298
978
|
return x.useEffect(() => {
|
|
1299
|
-
e.areItemUpdatesPrevented() || r((
|
|
1300
|
-
const y =
|
|
979
|
+
e.areItemUpdatesPrevented() || r((b) => {
|
|
980
|
+
const y = pt({
|
|
1301
981
|
items: t.items,
|
|
1302
982
|
isItemDisabled: t.isItemDisabled,
|
|
1303
983
|
getItemId: t.getItemId,
|
|
1304
984
|
getItemLabel: t.getItemLabel
|
|
1305
985
|
});
|
|
1306
|
-
return Object.values(
|
|
1307
|
-
y.itemMetaMap[
|
|
1308
|
-
id:
|
|
986
|
+
return Object.values(b.items.itemMetaMap).forEach((T) => {
|
|
987
|
+
y.itemMetaMap[T.id] || dt(e, "removeItem", {
|
|
988
|
+
id: T.id
|
|
1309
989
|
});
|
|
1310
|
-
}),
|
|
990
|
+
}), C({}, b, {
|
|
1311
991
|
items: y
|
|
1312
992
|
});
|
|
1313
993
|
});
|
|
@@ -1320,68 +1000,68 @@ const Jn = ["children"], ht = ({
|
|
|
1320
1000
|
publicAPI: {
|
|
1321
1001
|
getItem: c,
|
|
1322
1002
|
getItemDOMElement: a,
|
|
1323
|
-
getItemTree:
|
|
1003
|
+
getItemTree: l,
|
|
1324
1004
|
getItemOrderedChildrenIds: i
|
|
1325
1005
|
},
|
|
1326
1006
|
instance: {
|
|
1327
1007
|
getItemMeta: I,
|
|
1328
1008
|
getItem: c,
|
|
1329
|
-
getItemTree:
|
|
1009
|
+
getItemTree: l,
|
|
1330
1010
|
getItemsToRender: () => {
|
|
1331
|
-
const
|
|
1332
|
-
var
|
|
1333
|
-
const
|
|
1011
|
+
const b = (y) => {
|
|
1012
|
+
var S;
|
|
1013
|
+
const T = n.items.itemMetaMap[y];
|
|
1334
1014
|
return {
|
|
1335
|
-
label:
|
|
1336
|
-
itemId:
|
|
1337
|
-
id:
|
|
1338
|
-
children: (
|
|
1015
|
+
label: T.label,
|
|
1016
|
+
itemId: T.id,
|
|
1017
|
+
id: T.idAttribute,
|
|
1018
|
+
children: (S = n.items.itemOrderedChildrenIds[y]) == null ? void 0 : S.map(b)
|
|
1339
1019
|
};
|
|
1340
1020
|
};
|
|
1341
|
-
return n.items.itemOrderedChildrenIds[
|
|
1021
|
+
return n.items.itemOrderedChildrenIds[Y].map(b);
|
|
1342
1022
|
},
|
|
1343
1023
|
getItemIndex: f,
|
|
1344
1024
|
getItemDOMElement: a,
|
|
1345
1025
|
getItemOrderedChildrenIds: i,
|
|
1346
1026
|
isItemDisabled: d,
|
|
1347
1027
|
isItemNavigable: u,
|
|
1348
|
-
preventItemUpdates:
|
|
1028
|
+
preventItemUpdates: h,
|
|
1349
1029
|
areItemUpdatesPrevented: m
|
|
1350
1030
|
},
|
|
1351
1031
|
contextValue: {
|
|
1352
1032
|
items: {
|
|
1353
1033
|
onItemClick: t.onItemClick,
|
|
1354
1034
|
disabledItemsFocusable: t.disabledItemsFocusable,
|
|
1355
|
-
indentationAtItemLevel:
|
|
1035
|
+
indentationAtItemLevel: s.indentationAtItemLevel ?? !1
|
|
1356
1036
|
}
|
|
1357
1037
|
}
|
|
1358
1038
|
};
|
|
1359
1039
|
};
|
|
1360
|
-
|
|
1361
|
-
items:
|
|
1040
|
+
de.getInitialState = (e) => ({
|
|
1041
|
+
items: pt({
|
|
1362
1042
|
items: e.items,
|
|
1363
1043
|
isItemDisabled: e.isItemDisabled,
|
|
1364
1044
|
getItemId: e.getItemId,
|
|
1365
1045
|
getItemLabel: e.getItemLabel
|
|
1366
1046
|
})
|
|
1367
1047
|
});
|
|
1368
|
-
|
|
1048
|
+
de.getDefaultizedParams = ({
|
|
1369
1049
|
params: e
|
|
1370
|
-
}) =>
|
|
1050
|
+
}) => C({}, e, {
|
|
1371
1051
|
disabledItemsFocusable: e.disabledItemsFocusable ?? !1,
|
|
1372
1052
|
itemChildrenIndentation: e.itemChildrenIndentation ?? "12px"
|
|
1373
1053
|
});
|
|
1374
|
-
|
|
1054
|
+
de.wrapRoot = ({
|
|
1375
1055
|
children: e,
|
|
1376
1056
|
instance: t
|
|
1377
|
-
}) => /* @__PURE__ */
|
|
1057
|
+
}) => /* @__PURE__ */ E(ne.Provider, {
|
|
1378
1058
|
value: (n) => {
|
|
1379
1059
|
var r;
|
|
1380
1060
|
return ((r = t.getItemMeta(n)) == null ? void 0 : r.depth) ?? 0;
|
|
1381
1061
|
},
|
|
1382
1062
|
children: e
|
|
1383
1063
|
});
|
|
1384
|
-
|
|
1064
|
+
de.params = {
|
|
1385
1065
|
disabledItemsFocusable: !0,
|
|
1386
1066
|
items: !0,
|
|
1387
1067
|
isItemDisabled: !0,
|
|
@@ -1390,7 +1070,7 @@ ye.params = {
|
|
|
1390
1070
|
onItemClick: !0,
|
|
1391
1071
|
itemChildrenIndentation: !0
|
|
1392
1072
|
};
|
|
1393
|
-
const
|
|
1073
|
+
const Pe = ({
|
|
1394
1074
|
instance: e,
|
|
1395
1075
|
params: t,
|
|
1396
1076
|
models: n
|
|
@@ -1400,25 +1080,25 @@ const Oe = ({
|
|
|
1400
1080
|
return n.expandedItems.value.forEach((u) => {
|
|
1401
1081
|
a.set(u, !0);
|
|
1402
1082
|
}), a;
|
|
1403
|
-
}, [n.expandedItems.value]),
|
|
1083
|
+
}, [n.expandedItems.value]), s = (a, u) => {
|
|
1404
1084
|
var g;
|
|
1405
1085
|
(g = t.onExpandedItemsChange) == null || g.call(t, a, u), n.expandedItems.setControlledValue(u);
|
|
1406
1086
|
}, I = x.useCallback((a) => r.has(a), [r]), c = x.useCallback((a) => {
|
|
1407
1087
|
var u;
|
|
1408
1088
|
return !!((u = e.getItemMeta(a)) != null && u.expandable);
|
|
1409
|
-
}, [e]),
|
|
1089
|
+
}, [e]), l = U((a, u) => {
|
|
1410
1090
|
const g = e.isItemExpanded(u);
|
|
1411
1091
|
e.setItemExpansion(a, u, !g);
|
|
1412
|
-
}), d =
|
|
1092
|
+
}), d = U((a, u, g) => {
|
|
1413
1093
|
if (e.isItemExpanded(u) === g)
|
|
1414
1094
|
return;
|
|
1415
1095
|
let m;
|
|
1416
|
-
g ? m = [u].concat(n.expandedItems.value) : m = n.expandedItems.value.filter((p) => p !== u), t.onItemExpansionToggle && t.onItemExpansionToggle(a, u, g),
|
|
1096
|
+
g ? m = [u].concat(n.expandedItems.value) : m = n.expandedItems.value.filter((p) => p !== u), t.onItemExpansionToggle && t.onItemExpansionToggle(a, u, g), s(a, m);
|
|
1417
1097
|
}), f = (a, u) => {
|
|
1418
|
-
const g = e.getItemMeta(u), m = e.getItemOrderedChildrenIds(g.parentId).filter((
|
|
1419
|
-
m.length > 0 && (t.onItemExpansionToggle && m.forEach((
|
|
1420
|
-
t.onItemExpansionToggle(a,
|
|
1421
|
-
}),
|
|
1098
|
+
const g = e.getItemMeta(u), m = e.getItemOrderedChildrenIds(g.parentId).filter((b) => e.isItemExpandable(b) && !e.isItemExpanded(b)), p = n.expandedItems.value.concat(m);
|
|
1099
|
+
m.length > 0 && (t.onItemExpansionToggle && m.forEach((b) => {
|
|
1100
|
+
t.onItemExpansionToggle(a, b, !0);
|
|
1101
|
+
}), s(a, p));
|
|
1422
1102
|
}, i = x.useMemo(() => t.expansionTrigger ? t.expansionTrigger : e.isTreeViewEditable ? "iconContainer" : "content", [t.expansionTrigger, e.isTreeViewEditable]);
|
|
1423
1103
|
return {
|
|
1424
1104
|
publicAPI: {
|
|
@@ -1428,7 +1108,7 @@ const Oe = ({
|
|
|
1428
1108
|
isItemExpanded: I,
|
|
1429
1109
|
isItemExpandable: c,
|
|
1430
1110
|
setItemExpansion: d,
|
|
1431
|
-
toggleItemExpansion:
|
|
1111
|
+
toggleItemExpansion: l,
|
|
1432
1112
|
expandAllSiblings: f
|
|
1433
1113
|
},
|
|
1434
1114
|
contextValue: {
|
|
@@ -1438,44 +1118,44 @@ const Oe = ({
|
|
|
1438
1118
|
}
|
|
1439
1119
|
};
|
|
1440
1120
|
};
|
|
1441
|
-
|
|
1121
|
+
Pe.models = {
|
|
1442
1122
|
expandedItems: {
|
|
1443
1123
|
getDefaultValue: (e) => e.defaultExpandedItems
|
|
1444
1124
|
}
|
|
1445
1125
|
};
|
|
1446
|
-
const
|
|
1447
|
-
|
|
1126
|
+
const jn = [];
|
|
1127
|
+
Pe.getDefaultizedParams = ({
|
|
1448
1128
|
params: e
|
|
1449
|
-
}) =>
|
|
1450
|
-
defaultExpandedItems: e.defaultExpandedItems ??
|
|
1129
|
+
}) => C({}, e, {
|
|
1130
|
+
defaultExpandedItems: e.defaultExpandedItems ?? jn
|
|
1451
1131
|
});
|
|
1452
|
-
|
|
1132
|
+
Pe.params = {
|
|
1453
1133
|
expandedItems: !0,
|
|
1454
1134
|
defaultExpandedItems: !0,
|
|
1455
1135
|
onExpandedItemsChange: !0,
|
|
1456
1136
|
onItemExpansionToggle: !0,
|
|
1457
1137
|
expansionTrigger: !0
|
|
1458
1138
|
};
|
|
1459
|
-
const
|
|
1139
|
+
const ft = (e, t) => {
|
|
1460
1140
|
let n = t.length - 1;
|
|
1461
1141
|
for (; n >= 0 && !e.isItemNavigable(t[n]); )
|
|
1462
1142
|
n -= 1;
|
|
1463
1143
|
if (n !== -1)
|
|
1464
1144
|
return t[n];
|
|
1465
|
-
},
|
|
1466
|
-
const n = e.getItemMeta(t), r = e.getItemOrderedChildrenIds(n.parentId),
|
|
1467
|
-
if (
|
|
1145
|
+
}, mt = (e, t) => {
|
|
1146
|
+
const n = e.getItemMeta(t), r = e.getItemOrderedChildrenIds(n.parentId), s = e.getItemIndex(t);
|
|
1147
|
+
if (s === 0)
|
|
1468
1148
|
return n.parentId;
|
|
1469
|
-
let I =
|
|
1149
|
+
let I = s - 1;
|
|
1470
1150
|
for (; !e.isItemNavigable(r[I]) && I >= 0; )
|
|
1471
1151
|
I -= 1;
|
|
1472
1152
|
if (I === -1)
|
|
1473
|
-
return n.parentId == null ? null :
|
|
1474
|
-
let c = r[I],
|
|
1475
|
-
for (; e.isItemExpanded(c) &&
|
|
1476
|
-
c =
|
|
1153
|
+
return n.parentId == null ? null : mt(e, n.parentId);
|
|
1154
|
+
let c = r[I], l = ft(e, e.getItemOrderedChildrenIds(c));
|
|
1155
|
+
for (; e.isItemExpanded(c) && l != null; )
|
|
1156
|
+
c = l, l = e.getItemOrderedChildrenIds(c).find(e.isItemNavigable);
|
|
1477
1157
|
return c;
|
|
1478
|
-
},
|
|
1158
|
+
}, ge = (e, t) => {
|
|
1479
1159
|
if (e.isItemExpanded(t)) {
|
|
1480
1160
|
const r = e.getItemOrderedChildrenIds(t).find(e.isItemNavigable);
|
|
1481
1161
|
if (r != null)
|
|
@@ -1483,9 +1163,9 @@ const bt = (e, t) => {
|
|
|
1483
1163
|
}
|
|
1484
1164
|
let n = e.getItemMeta(t);
|
|
1485
1165
|
for (; n != null; ) {
|
|
1486
|
-
const r = e.getItemOrderedChildrenIds(n.parentId),
|
|
1487
|
-
if (
|
|
1488
|
-
let I =
|
|
1166
|
+
const r = e.getItemOrderedChildrenIds(n.parentId), s = e.getItemIndex(n.id);
|
|
1167
|
+
if (s < r.length - 1) {
|
|
1168
|
+
let I = s + 1;
|
|
1489
1169
|
for (; !e.isItemNavigable(r[I]) && I < r.length - 1; )
|
|
1490
1170
|
I += 1;
|
|
1491
1171
|
if (e.isItemNavigable(r[I]))
|
|
@@ -1494,28 +1174,28 @@ const bt = (e, t) => {
|
|
|
1494
1174
|
n = e.getItemMeta(n.parentId);
|
|
1495
1175
|
}
|
|
1496
1176
|
return null;
|
|
1497
|
-
},
|
|
1177
|
+
}, It = (e) => {
|
|
1498
1178
|
let t = null;
|
|
1499
1179
|
for (; t == null || e.isItemExpanded(t); ) {
|
|
1500
|
-
const n = e.getItemOrderedChildrenIds(t), r =
|
|
1180
|
+
const n = e.getItemOrderedChildrenIds(t), r = ft(e, n);
|
|
1501
1181
|
if (r == null)
|
|
1502
1182
|
return t;
|
|
1503
1183
|
t = r;
|
|
1504
1184
|
}
|
|
1505
1185
|
return t;
|
|
1506
|
-
},
|
|
1186
|
+
}, ae = (e) => e.getItemOrderedChildrenIds(null).find(e.isItemNavigable), gt = (e, t, n) => {
|
|
1507
1187
|
if (t === n)
|
|
1508
1188
|
return [t, n];
|
|
1509
|
-
const r = e.getItemMeta(t),
|
|
1510
|
-
if (r.parentId ===
|
|
1511
|
-
return
|
|
1512
|
-
const I = [r.id], c = [
|
|
1513
|
-
let
|
|
1189
|
+
const r = e.getItemMeta(t), s = e.getItemMeta(n);
|
|
1190
|
+
if (r.parentId === s.id || s.parentId === r.id)
|
|
1191
|
+
return s.parentId === r.id ? [r.id, s.id] : [s.id, r.id];
|
|
1192
|
+
const I = [r.id], c = [s.id];
|
|
1193
|
+
let l = r.parentId, d = s.parentId, f = c.indexOf(l) !== -1, i = I.indexOf(d) !== -1, a = !0, u = !0;
|
|
1514
1194
|
for (; !i && !f; )
|
|
1515
|
-
a && (I.push(
|
|
1516
|
-
const g = f ?
|
|
1517
|
-
return
|
|
1518
|
-
},
|
|
1195
|
+
a && (I.push(l), f = c.indexOf(l) !== -1, a = l !== null, !f && a && (l = e.getItemMeta(l).parentId)), u && !f && (c.push(d), i = I.indexOf(d) !== -1, u = d !== null, !i && u && (d = e.getItemMeta(d).parentId));
|
|
1196
|
+
const g = f ? l : d, h = e.getItemOrderedChildrenIds(g), m = I[I.indexOf(g) - 1], p = c[c.indexOf(g) - 1];
|
|
1197
|
+
return h.indexOf(m) < h.indexOf(p) ? [t, n] : [n, t];
|
|
1198
|
+
}, Bn = (e, t, n) => {
|
|
1519
1199
|
const r = (d) => {
|
|
1520
1200
|
if (e.isItemExpandable(d) && e.isItemExpanded(d))
|
|
1521
1201
|
return e.getItemOrderedChildrenIds(d)[0];
|
|
@@ -1527,28 +1207,28 @@ const bt = (e, t) => {
|
|
|
1527
1207
|
f = e.getItemMeta(f.parentId);
|
|
1528
1208
|
}
|
|
1529
1209
|
throw new Error("Invalid range");
|
|
1530
|
-
}, [
|
|
1531
|
-
let
|
|
1532
|
-
for (;
|
|
1533
|
-
|
|
1210
|
+
}, [s, I] = gt(e, t, n), c = [s];
|
|
1211
|
+
let l = s;
|
|
1212
|
+
for (; l !== I; )
|
|
1213
|
+
l = r(l), e.isItemDisabled(l) || c.push(l);
|
|
1534
1214
|
return c;
|
|
1535
|
-
},
|
|
1536
|
-
let t =
|
|
1215
|
+
}, _n = (e) => {
|
|
1216
|
+
let t = ae(e);
|
|
1537
1217
|
const n = [];
|
|
1538
1218
|
for (; t != null; )
|
|
1539
|
-
n.push(t), t =
|
|
1219
|
+
n.push(t), t = ge(e, t);
|
|
1540
1220
|
return n;
|
|
1541
|
-
},
|
|
1221
|
+
}, Le = (e, t) => t !== e.closest('*[role="treeitem"]'), be = (e) => Array.isArray(e) ? e : e != null ? [e] : [], Fe = (e) => {
|
|
1542
1222
|
const t = {};
|
|
1543
1223
|
return e.forEach((n) => {
|
|
1544
1224
|
t[n] = !0;
|
|
1545
1225
|
}), t;
|
|
1546
|
-
},
|
|
1226
|
+
}, Se = ({
|
|
1547
1227
|
instance: e,
|
|
1548
1228
|
params: t,
|
|
1549
1229
|
models: n
|
|
1550
1230
|
}) => {
|
|
1551
|
-
const r = x.useRef(null),
|
|
1231
|
+
const r = x.useRef(null), s = x.useRef({}), I = x.useMemo(() => {
|
|
1552
1232
|
const m = /* @__PURE__ */ new Map();
|
|
1553
1233
|
return Array.isArray(n.selectedItems.value) ? n.selectedItems.value.forEach((p) => {
|
|
1554
1234
|
m.set(p, !0);
|
|
@@ -1556,36 +1236,36 @@ const bt = (e, t) => {
|
|
|
1556
1236
|
}, [n.selectedItems.value]), c = (m, p) => {
|
|
1557
1237
|
if (t.onItemSelectionToggle)
|
|
1558
1238
|
if (t.multiSelect) {
|
|
1559
|
-
const
|
|
1560
|
-
|
|
1561
|
-
t.onItemSelectionToggle(m,
|
|
1562
|
-
}), y.forEach((
|
|
1563
|
-
t.onItemSelectionToggle(m,
|
|
1239
|
+
const b = p.filter((T) => !e.isItemSelected(T)), y = n.selectedItems.value.filter((T) => !p.includes(T));
|
|
1240
|
+
b.forEach((T) => {
|
|
1241
|
+
t.onItemSelectionToggle(m, T, !0);
|
|
1242
|
+
}), y.forEach((T) => {
|
|
1243
|
+
t.onItemSelectionToggle(m, T, !1);
|
|
1564
1244
|
});
|
|
1565
1245
|
} else p !== n.selectedItems.value && (n.selectedItems.value != null && t.onItemSelectionToggle(m, n.selectedItems.value, !1), p != null && t.onItemSelectionToggle(m, p, !0));
|
|
1566
1246
|
t.onSelectedItemsChange && t.onSelectedItemsChange(m, p), n.selectedItems.setControlledValue(p);
|
|
1567
|
-
},
|
|
1247
|
+
}, l = (m) => I.has(m), d = ({
|
|
1568
1248
|
event: m,
|
|
1569
1249
|
itemId: p,
|
|
1570
|
-
keepExistingSelection:
|
|
1250
|
+
keepExistingSelection: b = !1,
|
|
1571
1251
|
shouldBeSelected: y
|
|
1572
1252
|
}) => {
|
|
1573
1253
|
if (t.disableSelection)
|
|
1574
1254
|
return;
|
|
1575
|
-
let
|
|
1576
|
-
if (
|
|
1577
|
-
const
|
|
1578
|
-
|
|
1255
|
+
let T;
|
|
1256
|
+
if (b) {
|
|
1257
|
+
const S = be(n.selectedItems.value), w = e.isItemSelected(p);
|
|
1258
|
+
w && (y === !1 || y == null) ? T = S.filter((v) => v !== p) : !w && (y === !0 || y == null) ? T = [p].concat(S) : T = S;
|
|
1579
1259
|
} else
|
|
1580
|
-
y === !1 || y == null && e.isItemSelected(p) ?
|
|
1581
|
-
c(m,
|
|
1582
|
-
}, f = (m, [p,
|
|
1260
|
+
y === !1 || y == null && e.isItemSelected(p) ? T = t.multiSelect ? [] : null : T = t.multiSelect ? [p] : p;
|
|
1261
|
+
c(m, T), r.current = p, s.current = {};
|
|
1262
|
+
}, f = (m, [p, b]) => {
|
|
1583
1263
|
if (t.disableSelection || !t.multiSelect)
|
|
1584
1264
|
return;
|
|
1585
|
-
let y =
|
|
1586
|
-
Object.keys(
|
|
1587
|
-
const
|
|
1588
|
-
y = y.concat(
|
|
1265
|
+
let y = be(n.selectedItems.value).slice();
|
|
1266
|
+
Object.keys(s.current).length > 0 && (y = y.filter((v) => !s.current[v]));
|
|
1267
|
+
const T = Fe(y), S = Bn(e, p, b), w = S.filter((v) => !T[v]);
|
|
1268
|
+
y = y.concat(w), c(m, y), s.current = Fe(S);
|
|
1589
1269
|
};
|
|
1590
1270
|
return {
|
|
1591
1271
|
getRootProps: () => ({
|
|
@@ -1595,34 +1275,34 @@ const bt = (e, t) => {
|
|
|
1595
1275
|
selectItem: d
|
|
1596
1276
|
},
|
|
1597
1277
|
instance: {
|
|
1598
|
-
isItemSelected:
|
|
1278
|
+
isItemSelected: l,
|
|
1599
1279
|
selectItem: d,
|
|
1600
1280
|
selectAllNavigableItems: (m) => {
|
|
1601
1281
|
if (t.disableSelection || !t.multiSelect)
|
|
1602
1282
|
return;
|
|
1603
|
-
const p =
|
|
1604
|
-
c(m, p),
|
|
1283
|
+
const p = _n(e);
|
|
1284
|
+
c(m, p), s.current = Fe(p);
|
|
1605
1285
|
},
|
|
1606
1286
|
expandSelectionRange: (m, p) => {
|
|
1607
1287
|
if (r.current != null) {
|
|
1608
|
-
const [
|
|
1609
|
-
f(m, [
|
|
1288
|
+
const [b, y] = gt(e, p, r.current);
|
|
1289
|
+
f(m, [b, y]);
|
|
1610
1290
|
}
|
|
1611
1291
|
},
|
|
1612
1292
|
selectRangeFromStartToItem: (m, p) => {
|
|
1613
|
-
f(m, [
|
|
1293
|
+
f(m, [ae(e), p]);
|
|
1614
1294
|
},
|
|
1615
1295
|
selectRangeFromItemToEnd: (m, p) => {
|
|
1616
|
-
f(m, [p,
|
|
1296
|
+
f(m, [p, It(e)]);
|
|
1617
1297
|
},
|
|
1618
|
-
selectItemFromArrowNavigation: (m, p,
|
|
1298
|
+
selectItemFromArrowNavigation: (m, p, b) => {
|
|
1619
1299
|
if (t.disableSelection || !t.multiSelect)
|
|
1620
1300
|
return;
|
|
1621
|
-
let y =
|
|
1622
|
-
Object.keys(
|
|
1301
|
+
let y = be(n.selectedItems.value).slice();
|
|
1302
|
+
Object.keys(s.current).length === 0 ? (y.push(b), s.current = {
|
|
1623
1303
|
[p]: !0,
|
|
1624
|
-
[
|
|
1625
|
-
}) : (
|
|
1304
|
+
[b]: !0
|
|
1305
|
+
}) : (s.current[p] || (s.current = {}), s.current[b] ? (y = y.filter((T) => T !== p), delete s.current[p]) : (y.push(b), s.current[b] = !0)), c(m, y);
|
|
1626
1306
|
}
|
|
1627
1307
|
},
|
|
1628
1308
|
contextValue: {
|
|
@@ -1634,21 +1314,21 @@ const bt = (e, t) => {
|
|
|
1634
1314
|
}
|
|
1635
1315
|
};
|
|
1636
1316
|
};
|
|
1637
|
-
|
|
1317
|
+
Se.models = {
|
|
1638
1318
|
selectedItems: {
|
|
1639
1319
|
getDefaultValue: (e) => e.defaultSelectedItems
|
|
1640
1320
|
}
|
|
1641
1321
|
};
|
|
1642
|
-
const
|
|
1643
|
-
|
|
1322
|
+
const zn = [];
|
|
1323
|
+
Se.getDefaultizedParams = ({
|
|
1644
1324
|
params: e
|
|
1645
|
-
}) =>
|
|
1325
|
+
}) => C({}, e, {
|
|
1646
1326
|
disableSelection: e.disableSelection ?? !1,
|
|
1647
1327
|
multiSelect: e.multiSelect ?? !1,
|
|
1648
1328
|
checkboxSelection: e.checkboxSelection ?? !1,
|
|
1649
|
-
defaultSelectedItems: e.defaultSelectedItems ?? (e.multiSelect ?
|
|
1329
|
+
defaultSelectedItems: e.defaultSelectedItems ?? (e.multiSelect ? zn : null)
|
|
1650
1330
|
});
|
|
1651
|
-
|
|
1331
|
+
Se.params = {
|
|
1652
1332
|
disableSelection: !0,
|
|
1653
1333
|
multiSelect: !0,
|
|
1654
1334
|
checkboxSelection: !0,
|
|
@@ -1657,17 +1337,17 @@ De.params = {
|
|
|
1657
1337
|
onSelectedItemsChange: !0,
|
|
1658
1338
|
onItemSelectionToggle: !0
|
|
1659
1339
|
};
|
|
1660
|
-
const
|
|
1661
|
-
class
|
|
1662
|
-
constructor(t =
|
|
1663
|
-
this.timeouts = /* @__PURE__ */ new Map(), this.cleanupTimeout =
|
|
1340
|
+
const ot = 1e3;
|
|
1341
|
+
class Un {
|
|
1342
|
+
constructor(t = ot) {
|
|
1343
|
+
this.timeouts = /* @__PURE__ */ new Map(), this.cleanupTimeout = ot, this.cleanupTimeout = t;
|
|
1664
1344
|
}
|
|
1665
1345
|
register(t, n, r) {
|
|
1666
1346
|
this.timeouts || (this.timeouts = /* @__PURE__ */ new Map());
|
|
1667
|
-
const
|
|
1347
|
+
const s = setTimeout(() => {
|
|
1668
1348
|
typeof n == "function" && n(), this.timeouts.delete(r.cleanupToken);
|
|
1669
1349
|
}, this.cleanupTimeout);
|
|
1670
|
-
this.timeouts.set(r.cleanupToken,
|
|
1350
|
+
this.timeouts.set(r.cleanupToken, s);
|
|
1671
1351
|
}
|
|
1672
1352
|
unregister(t) {
|
|
1673
1353
|
const n = this.timeouts.get(t.cleanupToken);
|
|
@@ -1681,7 +1361,7 @@ class Zn {
|
|
|
1681
1361
|
}), this.timeouts = void 0);
|
|
1682
1362
|
}
|
|
1683
1363
|
}
|
|
1684
|
-
class
|
|
1364
|
+
class Kn {
|
|
1685
1365
|
constructor() {
|
|
1686
1366
|
this.registry = new FinalizationRegistry((t) => {
|
|
1687
1367
|
typeof t == "function" && t();
|
|
@@ -1697,102 +1377,102 @@ class eo {
|
|
|
1697
1377
|
reset() {
|
|
1698
1378
|
}
|
|
1699
1379
|
}
|
|
1700
|
-
class
|
|
1380
|
+
class qn {
|
|
1701
1381
|
}
|
|
1702
|
-
function
|
|
1382
|
+
function Xn(e) {
|
|
1703
1383
|
let t = 0;
|
|
1704
|
-
return function(r,
|
|
1705
|
-
e.registry === null && (e.registry = typeof FinalizationRegistry < "u" ? new
|
|
1706
|
-
const [c] = x.useState(new
|
|
1384
|
+
return function(r, s, I) {
|
|
1385
|
+
e.registry === null && (e.registry = typeof FinalizationRegistry < "u" ? new Kn() : new Un());
|
|
1386
|
+
const [c] = x.useState(new qn()), l = x.useRef(null), d = x.useRef(void 0);
|
|
1707
1387
|
d.current = I;
|
|
1708
1388
|
const f = x.useRef(null);
|
|
1709
|
-
if (!
|
|
1389
|
+
if (!l.current && d.current) {
|
|
1710
1390
|
const i = (a, u) => {
|
|
1711
1391
|
var g;
|
|
1712
1392
|
u.defaultMuiPrevented || (g = d.current) == null || g.call(d, a, u);
|
|
1713
1393
|
};
|
|
1714
|
-
|
|
1394
|
+
l.current = r.$$subscribeEvent(s, i), t += 1, f.current = {
|
|
1715
1395
|
cleanupToken: t
|
|
1716
1396
|
}, e.registry.register(
|
|
1717
1397
|
c,
|
|
1718
1398
|
// The callback below will be called once this reference stops being retained
|
|
1719
1399
|
() => {
|
|
1720
1400
|
var a;
|
|
1721
|
-
(a =
|
|
1401
|
+
(a = l.current) == null || a.call(l), l.current = null, f.current = null;
|
|
1722
1402
|
},
|
|
1723
1403
|
f.current
|
|
1724
1404
|
);
|
|
1725
|
-
} else !d.current &&
|
|
1405
|
+
} else !d.current && l.current && (l.current(), l.current = null, f.current && (e.registry.unregister(f.current), f.current = null));
|
|
1726
1406
|
x.useEffect(() => {
|
|
1727
|
-
if (!
|
|
1407
|
+
if (!l.current && d.current) {
|
|
1728
1408
|
const i = (a, u) => {
|
|
1729
1409
|
var g;
|
|
1730
1410
|
u.defaultMuiPrevented || (g = d.current) == null || g.call(d, a, u);
|
|
1731
1411
|
};
|
|
1732
|
-
|
|
1412
|
+
l.current = r.$$subscribeEvent(s, i);
|
|
1733
1413
|
}
|
|
1734
1414
|
return f.current && e.registry && (e.registry.unregister(f.current), f.current = null), () => {
|
|
1735
1415
|
var i;
|
|
1736
|
-
(i =
|
|
1416
|
+
(i = l.current) == null || i.call(l), l.current = null;
|
|
1737
1417
|
};
|
|
1738
|
-
}, [r,
|
|
1418
|
+
}, [r, s]);
|
|
1739
1419
|
};
|
|
1740
1420
|
}
|
|
1741
|
-
const
|
|
1421
|
+
const Jn = {
|
|
1742
1422
|
registry: null
|
|
1743
|
-
},
|
|
1423
|
+
}, Wn = Xn(Jn), bt = (e = document) => {
|
|
1744
1424
|
const t = e.activeElement;
|
|
1745
|
-
return t ? t.shadowRoot ?
|
|
1425
|
+
return t ? t.shadowRoot ? bt(t.shadowRoot) : t : null;
|
|
1746
1426
|
};
|
|
1747
|
-
function
|
|
1427
|
+
function Gn(e) {
|
|
1748
1428
|
return e.replace(/["\\]/g, "\\$&");
|
|
1749
1429
|
}
|
|
1750
|
-
const
|
|
1751
|
-
let n =
|
|
1430
|
+
const Yn = (e, t) => {
|
|
1431
|
+
let n = be(t).find((r) => {
|
|
1752
1432
|
if (!e.isItemNavigable(r))
|
|
1753
1433
|
return !1;
|
|
1754
|
-
const
|
|
1755
|
-
return
|
|
1434
|
+
const s = e.getItemMeta(r);
|
|
1435
|
+
return s && (s.parentId == null || e.isItemExpanded(s.parentId));
|
|
1756
1436
|
});
|
|
1757
|
-
return n == null && (n =
|
|
1758
|
-
},
|
|
1437
|
+
return n == null && (n = ae(e)), n;
|
|
1438
|
+
}, _e = ({
|
|
1759
1439
|
instance: e,
|
|
1760
1440
|
params: t,
|
|
1761
1441
|
state: n,
|
|
1762
1442
|
setState: r,
|
|
1763
|
-
models:
|
|
1443
|
+
models: s,
|
|
1764
1444
|
rootRef: I
|
|
1765
1445
|
}) => {
|
|
1766
|
-
const c =
|
|
1767
|
-
const
|
|
1768
|
-
n.focusedItemId !==
|
|
1769
|
-
focusedItemId:
|
|
1446
|
+
const c = Yn(e, s.selectedItems.value), l = U((p) => {
|
|
1447
|
+
const b = typeof p == "function" ? p(n.focusedItemId) : p;
|
|
1448
|
+
n.focusedItemId !== b && r((y) => C({}, y, {
|
|
1449
|
+
focusedItemId: b
|
|
1770
1450
|
}));
|
|
1771
|
-
}), d = x.useCallback(() => !!I.current && I.current.contains(
|
|
1772
|
-
const
|
|
1773
|
-
return
|
|
1774
|
-
}, a = (p,
|
|
1775
|
-
const y = e.getItemDOMElement(
|
|
1776
|
-
y && y.focus(),
|
|
1777
|
-
}, u =
|
|
1778
|
-
i(
|
|
1779
|
-
}), g =
|
|
1451
|
+
}), d = x.useCallback(() => !!I.current && I.current.contains(bt(Qt(I.current))), [I]), f = x.useCallback((p) => n.focusedItemId === p && d(), [n.focusedItemId, d]), i = (p) => {
|
|
1452
|
+
const b = e.getItemMeta(p);
|
|
1453
|
+
return b && (b.parentId == null || e.isItemExpanded(b.parentId));
|
|
1454
|
+
}, a = (p, b) => {
|
|
1455
|
+
const y = e.getItemDOMElement(b);
|
|
1456
|
+
y && y.focus(), l(b), t.onItemFocus && t.onItemFocus(p, b);
|
|
1457
|
+
}, u = U((p, b) => {
|
|
1458
|
+
i(b) && a(p, b);
|
|
1459
|
+
}), g = U(() => {
|
|
1780
1460
|
if (n.focusedItemId == null)
|
|
1781
1461
|
return;
|
|
1782
1462
|
if (e.getItemMeta(n.focusedItemId)) {
|
|
1783
|
-
const
|
|
1784
|
-
|
|
1463
|
+
const b = e.getItemDOMElement(n.focusedItemId);
|
|
1464
|
+
b && b.blur();
|
|
1785
1465
|
}
|
|
1786
|
-
|
|
1787
|
-
}),
|
|
1788
|
-
|
|
1466
|
+
l(null);
|
|
1467
|
+
}), h = (p) => p === c;
|
|
1468
|
+
Wn(e, "removeItem", ({
|
|
1789
1469
|
id: p
|
|
1790
1470
|
}) => {
|
|
1791
1471
|
n.focusedItemId === p && a(null, c);
|
|
1792
1472
|
});
|
|
1793
|
-
const m = (p) => (
|
|
1473
|
+
const m = (p) => (b) => {
|
|
1794
1474
|
var y;
|
|
1795
|
-
(y = p.onFocus) == null || y.call(p,
|
|
1475
|
+
(y = p.onFocus) == null || y.call(p, b), !b.defaultMuiPrevented && b.target === b.currentTarget && a(b, c);
|
|
1796
1476
|
};
|
|
1797
1477
|
return {
|
|
1798
1478
|
getRootProps: (p) => ({
|
|
@@ -1803,68 +1483,68 @@ const so = (e, t) => {
|
|
|
1803
1483
|
},
|
|
1804
1484
|
instance: {
|
|
1805
1485
|
isItemFocused: f,
|
|
1806
|
-
canItemBeTabbed:
|
|
1486
|
+
canItemBeTabbed: h,
|
|
1807
1487
|
focusItem: u,
|
|
1808
1488
|
removeFocusedItem: g
|
|
1809
1489
|
}
|
|
1810
1490
|
};
|
|
1811
1491
|
};
|
|
1812
|
-
|
|
1492
|
+
_e.getInitialState = () => ({
|
|
1813
1493
|
focusedItemId: null
|
|
1814
1494
|
});
|
|
1815
|
-
|
|
1495
|
+
_e.params = {
|
|
1816
1496
|
onItemFocus: !0
|
|
1817
1497
|
};
|
|
1818
|
-
const
|
|
1498
|
+
const he = (e, t) => e.getAvailablePlugins().has(t), Qn = ({
|
|
1819
1499
|
props: e
|
|
1820
1500
|
}) => {
|
|
1821
1501
|
const {
|
|
1822
1502
|
instance: t
|
|
1823
|
-
} =
|
|
1503
|
+
} = oe(), {
|
|
1824
1504
|
label: n,
|
|
1825
1505
|
itemId: r
|
|
1826
|
-
} = e, [
|
|
1506
|
+
} = e, [s, I] = x.useState(n), c = t.isItemBeingEdited(r);
|
|
1827
1507
|
return x.useEffect(() => {
|
|
1828
1508
|
c || I(n);
|
|
1829
1509
|
}, [c, n]), {
|
|
1830
1510
|
propsEnhancers: {
|
|
1831
1511
|
labelInput: ({
|
|
1832
|
-
externalEventHandlers:
|
|
1512
|
+
externalEventHandlers: l,
|
|
1833
1513
|
interactions: d
|
|
1834
1514
|
}) => t.isItemEditable(r) ? {
|
|
1835
|
-
value:
|
|
1515
|
+
value: s ?? "",
|
|
1836
1516
|
"data-element": "labelInput",
|
|
1837
1517
|
onChange: (g) => {
|
|
1838
|
-
var
|
|
1839
|
-
(
|
|
1518
|
+
var h;
|
|
1519
|
+
(h = l.onChange) == null || h.call(l, g), I(g.target.value);
|
|
1840
1520
|
},
|
|
1841
1521
|
onKeyDown: (g) => {
|
|
1842
1522
|
var m;
|
|
1843
|
-
if ((m =
|
|
1523
|
+
if ((m = l.onKeyDown) == null || m.call(l, g), g.defaultMuiPrevented)
|
|
1844
1524
|
return;
|
|
1845
|
-
const
|
|
1846
|
-
g.key === "Enter" &&
|
|
1525
|
+
const h = g.target;
|
|
1526
|
+
g.key === "Enter" && h.value ? d.handleSaveItemLabel(g, h.value) : g.key === "Escape" && d.handleCancelItemLabelEditing(g);
|
|
1847
1527
|
},
|
|
1848
1528
|
onBlur: (g) => {
|
|
1849
|
-
var
|
|
1850
|
-
(
|
|
1529
|
+
var h;
|
|
1530
|
+
(h = l.onBlur) == null || h.call(l, g), !g.defaultMuiPrevented && g.target.value && d.handleSaveItemLabel(g, g.target.value);
|
|
1851
1531
|
},
|
|
1852
1532
|
autoFocus: !0,
|
|
1853
1533
|
type: "text"
|
|
1854
1534
|
} : {}
|
|
1855
1535
|
}
|
|
1856
1536
|
};
|
|
1857
|
-
},
|
|
1537
|
+
}, K = ({
|
|
1858
1538
|
instance: e,
|
|
1859
1539
|
state: t,
|
|
1860
1540
|
setState: n,
|
|
1861
1541
|
params: r
|
|
1862
1542
|
}) => {
|
|
1863
|
-
const
|
|
1864
|
-
n((u) =>
|
|
1543
|
+
const s = x.useRef(t.editedItemId), I = (a) => s.current === a, c = (a) => {
|
|
1544
|
+
n((u) => C({}, u, {
|
|
1865
1545
|
editedItemId: a
|
|
1866
|
-
})),
|
|
1867
|
-
},
|
|
1546
|
+
})), s.current = a;
|
|
1547
|
+
}, l = (a) => a === t.editedItemId, d = !!r.isItemEditable, f = (a) => {
|
|
1868
1548
|
if (a == null || !d)
|
|
1869
1549
|
return !1;
|
|
1870
1550
|
const u = e.getItem(a);
|
|
@@ -1874,11 +1554,11 @@ const ve = (e, t) => e.getAvailablePlugins().has(t), lo = ({
|
|
|
1874
1554
|
throw new Error(["MUI X: The Tree View component requires all items to have a `label` property.", "The label of an item cannot be empty.", a].join(`
|
|
1875
1555
|
`));
|
|
1876
1556
|
n((g) => {
|
|
1877
|
-
const
|
|
1878
|
-
return
|
|
1879
|
-
items:
|
|
1880
|
-
itemMetaMap:
|
|
1881
|
-
[a]:
|
|
1557
|
+
const h = g.items.itemMetaMap[a];
|
|
1558
|
+
return h.label !== u ? C({}, g, {
|
|
1559
|
+
items: C({}, g.items, {
|
|
1560
|
+
itemMetaMap: C({}, g.items.itemMetaMap, {
|
|
1561
|
+
[a]: C({}, h, {
|
|
1882
1562
|
label: u
|
|
1883
1563
|
})
|
|
1884
1564
|
})
|
|
@@ -1889,7 +1569,7 @@ const ve = (e, t) => e.getAvailablePlugins().has(t), lo = ({
|
|
|
1889
1569
|
return {
|
|
1890
1570
|
instance: {
|
|
1891
1571
|
setEditedItemId: c,
|
|
1892
|
-
isItemBeingEdited:
|
|
1572
|
+
isItemBeingEdited: l,
|
|
1893
1573
|
updateItemLabel: i,
|
|
1894
1574
|
isItemEditable: f,
|
|
1895
1575
|
isTreeViewEditable: d,
|
|
@@ -1900,33 +1580,33 @@ const ve = (e, t) => e.getAvailablePlugins().has(t), lo = ({
|
|
|
1900
1580
|
}
|
|
1901
1581
|
};
|
|
1902
1582
|
};
|
|
1903
|
-
|
|
1904
|
-
|
|
1583
|
+
K.itemPlugin = Qn;
|
|
1584
|
+
K.getDefaultizedParams = ({
|
|
1905
1585
|
params: e,
|
|
1906
1586
|
experimentalFeatures: t
|
|
1907
1587
|
}) => {
|
|
1908
1588
|
const n = t == null ? void 0 : t.labelEditing;
|
|
1909
|
-
return process.env.NODE_ENV !== "production" && e.isItemEditable && !n &&
|
|
1589
|
+
return process.env.NODE_ENV !== "production" && e.isItemEditable && !n && xe(["MUI X: The label editing feature requires the `labelEditing` experimental feature to be enabled.", "You can do it by passing `experimentalFeatures={{ labelEditing: true}}` to the Rich Tree View Pro component.", "Check the documentation for more details: https://mui.com/x/react-tree-view/rich-tree-view/editing/"]), C({}, e, {
|
|
1910
1590
|
isItemEditable: n ? e.isItemEditable ?? !1 : !1
|
|
1911
1591
|
});
|
|
1912
1592
|
};
|
|
1913
|
-
|
|
1593
|
+
K.getInitialState = () => ({
|
|
1914
1594
|
editedItemId: null
|
|
1915
1595
|
});
|
|
1916
|
-
|
|
1596
|
+
K.params = {
|
|
1917
1597
|
onItemLabelChange: !0,
|
|
1918
1598
|
isItemEditable: !0
|
|
1919
1599
|
};
|
|
1920
|
-
function
|
|
1600
|
+
function Zn(e) {
|
|
1921
1601
|
return !!e && e.length === 1 && !!e.match(/\S/);
|
|
1922
1602
|
}
|
|
1923
|
-
const
|
|
1603
|
+
const ht = ({
|
|
1924
1604
|
instance: e,
|
|
1925
1605
|
params: t,
|
|
1926
1606
|
state: n
|
|
1927
1607
|
}) => {
|
|
1928
|
-
const r =
|
|
1929
|
-
|
|
1608
|
+
const r = Zt(), s = x.useRef({}), I = U((i) => {
|
|
1609
|
+
s.current = i(s.current);
|
|
1930
1610
|
});
|
|
1931
1611
|
x.useEffect(() => {
|
|
1932
1612
|
if (e.areItemUpdatesPrevented())
|
|
@@ -1934,29 +1614,29 @@ const Ct = ({
|
|
|
1934
1614
|
const i = {}, a = (u) => {
|
|
1935
1615
|
i[u.id] = u.label.substring(0, 1).toLowerCase();
|
|
1936
1616
|
};
|
|
1937
|
-
Object.values(n.items.itemMetaMap).forEach(a),
|
|
1617
|
+
Object.values(n.items.itemMetaMap).forEach(a), s.current = i;
|
|
1938
1618
|
}, [n.items.itemMetaMap, t.getItemId, e]);
|
|
1939
1619
|
const c = (i, a) => {
|
|
1940
|
-
const u = a.toLowerCase(), g = (
|
|
1941
|
-
const y =
|
|
1942
|
-
return y === null ?
|
|
1620
|
+
const u = a.toLowerCase(), g = (b) => {
|
|
1621
|
+
const y = ge(e, b);
|
|
1622
|
+
return y === null ? ae(e) : y;
|
|
1943
1623
|
};
|
|
1944
|
-
let
|
|
1624
|
+
let h = null, m = g(i);
|
|
1945
1625
|
const p = {};
|
|
1946
|
-
for (;
|
|
1947
|
-
|
|
1948
|
-
return
|
|
1949
|
-
},
|
|
1626
|
+
for (; h == null && !p[m]; )
|
|
1627
|
+
s.current[m] === u ? h = m : (p[m] = !0, m = g(m));
|
|
1628
|
+
return h;
|
|
1629
|
+
}, l = (i) => !t.disableSelection && !e.isItemDisabled(i), d = (i) => !e.isItemDisabled(i) && e.isItemExpandable(i);
|
|
1950
1630
|
return {
|
|
1951
1631
|
instance: {
|
|
1952
1632
|
updateFirstCharMap: I,
|
|
1953
1633
|
handleItemKeyDown: (i, a) => {
|
|
1954
|
-
if (i.defaultMuiPrevented || i.altKey ||
|
|
1634
|
+
if (i.defaultMuiPrevented || i.altKey || Le(i.target, i.currentTarget))
|
|
1955
1635
|
return;
|
|
1956
1636
|
const u = i.ctrlKey || i.metaKey, g = i.key;
|
|
1957
1637
|
switch (!0) {
|
|
1958
1638
|
// Select the item when pressing "Space"
|
|
1959
|
-
case (g === " " &&
|
|
1639
|
+
case (g === " " && l(a)): {
|
|
1960
1640
|
i.preventDefault(), t.multiSelect && i.shiftKey ? e.expandSelectionRange(i, a) : e.selectItem({
|
|
1961
1641
|
event: i,
|
|
1962
1642
|
itemId: a,
|
|
@@ -1968,7 +1648,7 @@ const Ct = ({
|
|
|
1968
1648
|
// If the focused item has children, we expand it.
|
|
1969
1649
|
// If the focused item has no children, we select it.
|
|
1970
1650
|
case g === "Enter": {
|
|
1971
|
-
|
|
1651
|
+
he(e, K) && e.isItemEditable(a) && !e.isItemBeingEdited(a) ? e.setEditedItemId(a) : d(a) ? (e.toggleItemExpansion(i, a), i.preventDefault()) : l(a) && (t.multiSelect ? (i.preventDefault(), e.selectItem({
|
|
1972
1652
|
event: i,
|
|
1973
1653
|
itemId: a,
|
|
1974
1654
|
keepExistingSelection: !0
|
|
@@ -1980,14 +1660,14 @@ const Ct = ({
|
|
|
1980
1660
|
}
|
|
1981
1661
|
// Focus the next focusable item
|
|
1982
1662
|
case g === "ArrowDown": {
|
|
1983
|
-
const
|
|
1984
|
-
|
|
1663
|
+
const h = ge(e, a);
|
|
1664
|
+
h && (i.preventDefault(), e.focusItem(i, h), t.multiSelect && i.shiftKey && l(h) && e.selectItemFromArrowNavigation(i, a, h));
|
|
1985
1665
|
break;
|
|
1986
1666
|
}
|
|
1987
1667
|
// Focuses the previous focusable item
|
|
1988
1668
|
case g === "ArrowUp": {
|
|
1989
|
-
const
|
|
1990
|
-
|
|
1669
|
+
const h = mt(e, a);
|
|
1670
|
+
h && (i.preventDefault(), e.focusItem(i, h), t.multiSelect && i.shiftKey && l(h) && e.selectItemFromArrowNavigation(i, a, h));
|
|
1991
1671
|
break;
|
|
1992
1672
|
}
|
|
1993
1673
|
// If the focused item is expanded, we move the focus to its first child
|
|
@@ -1996,8 +1676,8 @@ const Ct = ({
|
|
|
1996
1676
|
if (u)
|
|
1997
1677
|
return;
|
|
1998
1678
|
if (e.isItemExpanded(a)) {
|
|
1999
|
-
const
|
|
2000
|
-
|
|
1679
|
+
const h = ge(e, a);
|
|
1680
|
+
h && (e.focusItem(i, h), i.preventDefault());
|
|
2001
1681
|
} else d(a) && (e.toggleItemExpansion(i, a), i.preventDefault());
|
|
2002
1682
|
break;
|
|
2003
1683
|
}
|
|
@@ -2009,19 +1689,19 @@ const Ct = ({
|
|
|
2009
1689
|
if (d(a) && e.isItemExpanded(a))
|
|
2010
1690
|
e.toggleItemExpansion(i, a), i.preventDefault();
|
|
2011
1691
|
else {
|
|
2012
|
-
const
|
|
2013
|
-
|
|
1692
|
+
const h = e.getItemMeta(a).parentId;
|
|
1693
|
+
h && (e.focusItem(i, h), i.preventDefault());
|
|
2014
1694
|
}
|
|
2015
1695
|
break;
|
|
2016
1696
|
}
|
|
2017
1697
|
// Focuses the first item in the tree
|
|
2018
1698
|
case g === "Home": {
|
|
2019
|
-
|
|
1699
|
+
l(a) && t.multiSelect && u && i.shiftKey ? e.selectRangeFromStartToItem(i, a) : e.focusItem(i, ae(e)), i.preventDefault();
|
|
2020
1700
|
break;
|
|
2021
1701
|
}
|
|
2022
1702
|
// Focuses the last item in the tree
|
|
2023
1703
|
case g === "End": {
|
|
2024
|
-
|
|
1704
|
+
l(a) && t.multiSelect && u && i.shiftKey ? e.selectRangeFromItemToEnd(i, a) : e.focusItem(i, It(e)), i.preventDefault();
|
|
2025
1705
|
break;
|
|
2026
1706
|
}
|
|
2027
1707
|
// Expand all siblings that are at the same level as the focused item
|
|
@@ -2037,9 +1717,9 @@ const Ct = ({
|
|
|
2037
1717
|
}
|
|
2038
1718
|
// Type-ahead
|
|
2039
1719
|
// TODO: Support typing multiple characters
|
|
2040
|
-
case (!u && !i.shiftKey &&
|
|
2041
|
-
const
|
|
2042
|
-
|
|
1720
|
+
case (!u && !i.shiftKey && Zn(g)): {
|
|
1721
|
+
const h = c(a, g);
|
|
1722
|
+
h != null && (e.focusItem(i, h), i.preventDefault());
|
|
2043
1723
|
break;
|
|
2044
1724
|
}
|
|
2045
1725
|
}
|
|
@@ -2047,8 +1727,8 @@ const Ct = ({
|
|
|
2047
1727
|
}
|
|
2048
1728
|
};
|
|
2049
1729
|
};
|
|
2050
|
-
|
|
2051
|
-
const
|
|
1730
|
+
ht.params = {};
|
|
1731
|
+
const yt = ({
|
|
2052
1732
|
slots: e,
|
|
2053
1733
|
slotProps: t
|
|
2054
1734
|
}) => ({
|
|
@@ -2067,18 +1747,18 @@ const Et = ({
|
|
|
2067
1747
|
}
|
|
2068
1748
|
}
|
|
2069
1749
|
});
|
|
2070
|
-
|
|
2071
|
-
const
|
|
2072
|
-
process.env.NODE_ENV !== "production" && (
|
|
2073
|
-
function
|
|
1750
|
+
yt.params = {};
|
|
1751
|
+
const ze = /* @__PURE__ */ x.createContext(null);
|
|
1752
|
+
process.env.NODE_ENV !== "production" && (ze.displayName = "TreeViewChildrenItemContext");
|
|
1753
|
+
function Ue(e) {
|
|
2074
1754
|
const {
|
|
2075
1755
|
children: t,
|
|
2076
1756
|
itemId: n = null
|
|
2077
1757
|
} = e, {
|
|
2078
1758
|
instance: r,
|
|
2079
|
-
treeId:
|
|
1759
|
+
treeId: s,
|
|
2080
1760
|
rootRef: I
|
|
2081
|
-
} =
|
|
1761
|
+
} = oe(), c = x.useRef(/* @__PURE__ */ new Map());
|
|
2082
1762
|
x.useEffect(() => {
|
|
2083
1763
|
if (!I.current)
|
|
2084
1764
|
return;
|
|
@@ -2086,48 +1766,48 @@ function qe(e) {
|
|
|
2086
1766
|
if (n == null)
|
|
2087
1767
|
d = I.current.id;
|
|
2088
1768
|
else {
|
|
2089
|
-
const
|
|
2090
|
-
|
|
1769
|
+
const h = r.getItemMeta(n);
|
|
1770
|
+
h !== void 0 && (d = ve({
|
|
2091
1771
|
itemId: n,
|
|
2092
|
-
treeId:
|
|
2093
|
-
id:
|
|
1772
|
+
treeId: s,
|
|
1773
|
+
id: h.idAttribute
|
|
2094
1774
|
}));
|
|
2095
1775
|
}
|
|
2096
1776
|
if (d == null)
|
|
2097
1777
|
return;
|
|
2098
|
-
const f = r.getItemOrderedChildrenIds(n ?? null) ?? [], i =
|
|
2099
|
-
(u.length !== f.length || u.some((
|
|
1778
|
+
const f = r.getItemOrderedChildrenIds(n ?? null) ?? [], i = Gn(d), a = I.current.querySelectorAll(`${n == null ? "" : `*[id="${i}"] `}[role="treeitem"]:not(*[id="${i}"] [role="treeitem"] [role="treeitem"])`), u = Array.from(a).map((h) => c.current.get(h.id));
|
|
1779
|
+
(u.length !== f.length || u.some((h, m) => h !== f[m])) && r.setJSXItemsOrderedChildrenIds(n ?? null, u);
|
|
2100
1780
|
});
|
|
2101
|
-
const
|
|
1781
|
+
const l = x.useMemo(() => ({
|
|
2102
1782
|
registerChild: (d, f) => c.current.set(d, f),
|
|
2103
1783
|
unregisterChild: (d) => c.current.delete(d),
|
|
2104
1784
|
parentId: n
|
|
2105
1785
|
}), [n]);
|
|
2106
|
-
return /* @__PURE__ */
|
|
2107
|
-
value:
|
|
1786
|
+
return /* @__PURE__ */ E(ze.Provider, {
|
|
1787
|
+
value: l,
|
|
2108
1788
|
children: t
|
|
2109
1789
|
});
|
|
2110
1790
|
}
|
|
2111
|
-
process.env.NODE_ENV !== "production" && (
|
|
1791
|
+
process.env.NODE_ENV !== "production" && (Ue.propTypes = {
|
|
2112
1792
|
children: o.node,
|
|
2113
1793
|
id: o.string
|
|
2114
1794
|
});
|
|
2115
|
-
const
|
|
1795
|
+
const ue = ({
|
|
2116
1796
|
instance: e,
|
|
2117
1797
|
setState: t
|
|
2118
1798
|
}) => {
|
|
2119
1799
|
e.preventItemUpdates();
|
|
2120
|
-
const n =
|
|
1800
|
+
const n = U((I) => (t((c) => {
|
|
2121
1801
|
if (c.items.itemMetaMap[I.id] != null)
|
|
2122
1802
|
throw new Error(["MUI X: The Tree View component requires all items to have a unique `id` property.", "Alternatively, you can use the `getItemId` prop to specify a custom id for each item.", `Two items were provided with the same id in the \`items\` prop: "${I.id}"`].join(`
|
|
2123
1803
|
`));
|
|
2124
|
-
return
|
|
2125
|
-
items:
|
|
2126
|
-
itemMetaMap:
|
|
1804
|
+
return C({}, c, {
|
|
1805
|
+
items: C({}, c.items, {
|
|
1806
|
+
itemMetaMap: C({}, c.items.itemMetaMap, {
|
|
2127
1807
|
[I.id]: I
|
|
2128
1808
|
}),
|
|
2129
1809
|
// For Simple Tree View, we don't have a proper `item` object, so we create a very basic one.
|
|
2130
|
-
itemMap:
|
|
1810
|
+
itemMap: C({}, c.items.itemMap, {
|
|
2131
1811
|
[I.id]: {
|
|
2132
1812
|
id: I.id,
|
|
2133
1813
|
label: I.label
|
|
@@ -2137,31 +1817,31 @@ const xe = ({
|
|
|
2137
1817
|
});
|
|
2138
1818
|
}), () => {
|
|
2139
1819
|
t((c) => {
|
|
2140
|
-
const
|
|
2141
|
-
return delete
|
|
2142
|
-
items:
|
|
2143
|
-
itemMetaMap:
|
|
1820
|
+
const l = C({}, c.items.itemMetaMap), d = C({}, c.items.itemMap);
|
|
1821
|
+
return delete l[I.id], delete d[I.id], C({}, c, {
|
|
1822
|
+
items: C({}, c.items, {
|
|
1823
|
+
itemMetaMap: l,
|
|
2144
1824
|
itemMap: d
|
|
2145
1825
|
})
|
|
2146
1826
|
});
|
|
2147
|
-
}),
|
|
1827
|
+
}), dt(e, "removeItem", {
|
|
2148
1828
|
id: I.id
|
|
2149
1829
|
});
|
|
2150
1830
|
})), r = (I, c) => {
|
|
2151
|
-
const
|
|
2152
|
-
t((d) =>
|
|
2153
|
-
items:
|
|
2154
|
-
itemOrderedChildrenIds:
|
|
2155
|
-
[
|
|
1831
|
+
const l = I ?? Y;
|
|
1832
|
+
t((d) => C({}, d, {
|
|
1833
|
+
items: C({}, d.items, {
|
|
1834
|
+
itemOrderedChildrenIds: C({}, d.items.itemOrderedChildrenIds, {
|
|
1835
|
+
[l]: c
|
|
2156
1836
|
}),
|
|
2157
|
-
itemChildrenIndexes:
|
|
2158
|
-
[
|
|
1837
|
+
itemChildrenIndexes: C({}, d.items.itemChildrenIndexes, {
|
|
1838
|
+
[l]: ut(c)
|
|
2159
1839
|
})
|
|
2160
1840
|
})
|
|
2161
1841
|
}));
|
|
2162
|
-
},
|
|
2163
|
-
e.updateFirstCharMap((
|
|
2164
|
-
const d =
|
|
1842
|
+
}, s = U((I, c) => (e.updateFirstCharMap((l) => (l[I] = c, l)), () => {
|
|
1843
|
+
e.updateFirstCharMap((l) => {
|
|
1844
|
+
const d = C({}, l);
|
|
2165
1845
|
return delete d[I], d;
|
|
2166
1846
|
});
|
|
2167
1847
|
}));
|
|
@@ -2169,24 +1849,24 @@ const xe = ({
|
|
|
2169
1849
|
instance: {
|
|
2170
1850
|
insertJSXItem: n,
|
|
2171
1851
|
setJSXItemsOrderedChildrenIds: r,
|
|
2172
|
-
mapFirstCharFromJSX:
|
|
1852
|
+
mapFirstCharFromJSX: s
|
|
2173
1853
|
}
|
|
2174
1854
|
};
|
|
2175
|
-
},
|
|
1855
|
+
}, xt = (e) => Array.isArray(e) ? e.length > 0 && e.some(xt) : !!e, Hn = ({
|
|
2176
1856
|
props: e,
|
|
2177
1857
|
rootRef: t,
|
|
2178
1858
|
contentRef: n
|
|
2179
1859
|
}) => {
|
|
2180
1860
|
const {
|
|
2181
1861
|
instance: r,
|
|
2182
|
-
treeId:
|
|
2183
|
-
} =
|
|
1862
|
+
treeId: s
|
|
1863
|
+
} = oe(), {
|
|
2184
1864
|
children: I,
|
|
2185
1865
|
disabled: c = !1,
|
|
2186
|
-
label:
|
|
1866
|
+
label: l,
|
|
2187
1867
|
itemId: d,
|
|
2188
1868
|
id: f
|
|
2189
|
-
} = e, i = x.useContext(
|
|
1869
|
+
} = e, i = x.useContext(ze);
|
|
2190
1870
|
if (i == null)
|
|
2191
1871
|
throw new Error(["MUI X: Could not find the Tree View Children Item context.", "It looks like you rendered your component outside of a SimpleTreeView parent component.", "This can also happen if you are bundling multiple versions of the Tree View."].join(`
|
|
2192
1872
|
`));
|
|
@@ -2194,62 +1874,62 @@ const xe = ({
|
|
|
2194
1874
|
registerChild: a,
|
|
2195
1875
|
unregisterChild: u,
|
|
2196
1876
|
parentId: g
|
|
2197
|
-
} = i,
|
|
2198
|
-
return
|
|
2199
|
-
const
|
|
1877
|
+
} = i, h = xt(I), m = x.useRef(null), p = ye(m, n);
|
|
1878
|
+
return Ht(() => {
|
|
1879
|
+
const b = ve({
|
|
2200
1880
|
itemId: d,
|
|
2201
|
-
treeId:
|
|
1881
|
+
treeId: s,
|
|
2202
1882
|
id: f
|
|
2203
1883
|
});
|
|
2204
|
-
return a(
|
|
2205
|
-
u(
|
|
1884
|
+
return a(b, d), () => {
|
|
1885
|
+
u(b);
|
|
2206
1886
|
};
|
|
2207
|
-
}, [a, u, d, f,
|
|
1887
|
+
}, [a, u, d, f, s]), x.useEffect(() => r.insertJSXItem({
|
|
2208
1888
|
id: d,
|
|
2209
1889
|
idAttribute: f,
|
|
2210
1890
|
parentId: g,
|
|
2211
|
-
expandable:
|
|
1891
|
+
expandable: h,
|
|
2212
1892
|
disabled: c
|
|
2213
|
-
}), [r, g, d,
|
|
2214
|
-
var
|
|
2215
|
-
if (
|
|
2216
|
-
return r.mapFirstCharFromJSX(d, (((
|
|
2217
|
-
}, [r, d,
|
|
1893
|
+
}), [r, g, d, h, c, f]), x.useEffect(() => {
|
|
1894
|
+
var b;
|
|
1895
|
+
if (l)
|
|
1896
|
+
return r.mapFirstCharFromJSX(d, (((b = m.current) == null ? void 0 : b.textContent) ?? "").substring(0, 1).toLowerCase());
|
|
1897
|
+
}, [r, d, l]), {
|
|
2218
1898
|
contentRef: p,
|
|
2219
1899
|
rootRef: t
|
|
2220
1900
|
};
|
|
2221
1901
|
};
|
|
2222
|
-
|
|
2223
|
-
|
|
1902
|
+
ue.itemPlugin = Hn;
|
|
1903
|
+
ue.wrapItem = ({
|
|
2224
1904
|
children: e,
|
|
2225
1905
|
itemId: t
|
|
2226
1906
|
}) => {
|
|
2227
|
-
const n = x.useContext(
|
|
2228
|
-
return /* @__PURE__ */
|
|
1907
|
+
const n = x.useContext(ne);
|
|
1908
|
+
return /* @__PURE__ */ E(Ue, {
|
|
2229
1909
|
itemId: t,
|
|
2230
|
-
children: /* @__PURE__ */
|
|
1910
|
+
children: /* @__PURE__ */ E(ne.Provider, {
|
|
2231
1911
|
value: n + 1,
|
|
2232
1912
|
children: e
|
|
2233
1913
|
})
|
|
2234
1914
|
});
|
|
2235
1915
|
};
|
|
2236
|
-
|
|
1916
|
+
ue.wrapRoot = ({
|
|
2237
1917
|
children: e
|
|
2238
|
-
}) => /* @__PURE__ */
|
|
2239
|
-
children: /* @__PURE__ */
|
|
1918
|
+
}) => /* @__PURE__ */ E(Ue, {
|
|
1919
|
+
children: /* @__PURE__ */ E(ne.Provider, {
|
|
2240
1920
|
value: 0,
|
|
2241
1921
|
children: e
|
|
2242
1922
|
})
|
|
2243
1923
|
});
|
|
2244
|
-
|
|
2245
|
-
const
|
|
1924
|
+
ue.params = {};
|
|
1925
|
+
const eo = [de, Pe, Se, _e, ht, yt, ue], to = lt(), no = (e) => {
|
|
2246
1926
|
const {
|
|
2247
1927
|
classes: t
|
|
2248
1928
|
} = e;
|
|
2249
|
-
return
|
|
1929
|
+
return Ee({
|
|
2250
1930
|
root: ["root"]
|
|
2251
|
-
},
|
|
2252
|
-
},
|
|
1931
|
+
}, Pn, t);
|
|
1932
|
+
}, oo = _("ul", {
|
|
2253
1933
|
name: "MuiSimpleTreeView",
|
|
2254
1934
|
slot: "Root",
|
|
2255
1935
|
overridesResolver: (e, t) => t.root
|
|
@@ -2259,37 +1939,37 @@ const uo = [ye, Oe, De, Ue, Ct, Et, xe], po = pt(), fo = (e) => {
|
|
|
2259
1939
|
listStyle: "none",
|
|
2260
1940
|
outline: 0,
|
|
2261
1941
|
position: "relative"
|
|
2262
|
-
}),
|
|
2263
|
-
const r =
|
|
1942
|
+
}), ro = [], Ct = /* @__PURE__ */ x.forwardRef(function(t, n) {
|
|
1943
|
+
const r = to({
|
|
2264
1944
|
props: t,
|
|
2265
1945
|
name: "MuiSimpleTreeView"
|
|
2266
|
-
}),
|
|
2267
|
-
process.env.NODE_ENV !== "production" && r.items != null &&
|
|
1946
|
+
}), s = r;
|
|
1947
|
+
process.env.NODE_ENV !== "production" && r.items != null && xe(["MUI X: The Simple Tree View component does not support the `items` prop.", "If you want to add items, you need to pass them as JSX children.", "Check the documentation for more details: https://mui.com/x/react-tree-view/simple-tree-view/items/."]);
|
|
2268
1948
|
const {
|
|
2269
1949
|
getRootProps: I,
|
|
2270
1950
|
contextValue: c
|
|
2271
|
-
} =
|
|
2272
|
-
plugins:
|
|
1951
|
+
} = Ln({
|
|
1952
|
+
plugins: eo,
|
|
2273
1953
|
rootRef: n,
|
|
2274
|
-
props:
|
|
2275
|
-
items:
|
|
1954
|
+
props: C({}, r, {
|
|
1955
|
+
items: ro
|
|
2276
1956
|
})
|
|
2277
1957
|
}), {
|
|
2278
|
-
slots:
|
|
1958
|
+
slots: l,
|
|
2279
1959
|
slotProps: d
|
|
2280
|
-
} = r, f =
|
|
1960
|
+
} = r, f = no(r), i = (l == null ? void 0 : l.root) ?? oo, a = se({
|
|
2281
1961
|
elementType: i,
|
|
2282
1962
|
externalSlotProps: d == null ? void 0 : d.root,
|
|
2283
1963
|
className: f.root,
|
|
2284
1964
|
getSlotProps: I,
|
|
2285
|
-
ownerState:
|
|
1965
|
+
ownerState: s
|
|
2286
1966
|
});
|
|
2287
|
-
return /* @__PURE__ */
|
|
1967
|
+
return /* @__PURE__ */ E($n, {
|
|
2288
1968
|
value: c,
|
|
2289
|
-
children: /* @__PURE__ */
|
|
1969
|
+
children: /* @__PURE__ */ E(i, C({}, a))
|
|
2290
1970
|
});
|
|
2291
1971
|
});
|
|
2292
|
-
process.env.NODE_ENV !== "production" && (
|
|
1972
|
+
process.env.NODE_ENV !== "production" && (Ct.propTypes = {
|
|
2293
1973
|
// ----------------------------- Warning --------------------------------
|
|
2294
1974
|
// | These PropTypes are generated from the TypeScript type definitions |
|
|
2295
1975
|
// | To update them edit the TypeScript types and run "pnpm proptypes" |
|
|
@@ -2435,7 +2115,7 @@ process.env.NODE_ENV !== "production" && (St.propTypes = {
|
|
|
2435
2115
|
*/
|
|
2436
2116
|
sx: o.oneOfType([o.arrayOf(o.oneOfType([o.func, o.object, o.bool])), o.func, o.object])
|
|
2437
2117
|
});
|
|
2438
|
-
function
|
|
2118
|
+
function Tt(e) {
|
|
2439
2119
|
const {
|
|
2440
2120
|
instance: t,
|
|
2441
2121
|
items: {
|
|
@@ -2443,42 +2123,42 @@ function Pt(e) {
|
|
|
2443
2123
|
},
|
|
2444
2124
|
selection: {
|
|
2445
2125
|
multiSelect: r,
|
|
2446
|
-
checkboxSelection:
|
|
2126
|
+
checkboxSelection: s,
|
|
2447
2127
|
disableSelection: I
|
|
2448
2128
|
},
|
|
2449
2129
|
expansion: {
|
|
2450
2130
|
expansionTrigger: c
|
|
2451
2131
|
}
|
|
2452
|
-
} =
|
|
2132
|
+
} = oe(), l = t.isItemExpandable(e), d = t.isItemExpanded(e), f = t.isItemFocused(e), i = t.isItemSelected(e), a = t.isItemDisabled(e), u = t != null && t.isItemBeingEdited ? t == null ? void 0 : t.isItemBeingEdited(e) : !1, g = t.isItemEditable ? t.isItemEditable(e) : !1, h = (w) => {
|
|
2453
2133
|
if (!a) {
|
|
2454
|
-
f || t.focusItem(
|
|
2455
|
-
const
|
|
2456
|
-
|
|
2134
|
+
f || t.focusItem(w, e);
|
|
2135
|
+
const v = r && (w.shiftKey || w.ctrlKey || w.metaKey);
|
|
2136
|
+
l && !(v && t.isItemExpanded(e)) && t.toggleItemExpansion(w, e);
|
|
2457
2137
|
}
|
|
2458
|
-
}, m = (
|
|
2459
|
-
a || (!f && !u && t.focusItem(
|
|
2460
|
-
event:
|
|
2138
|
+
}, m = (w) => {
|
|
2139
|
+
a || (!f && !u && t.focusItem(w, e), r && (w.shiftKey || w.ctrlKey || w.metaKey) ? w.shiftKey ? t.expandSelectionRange(w, e) : t.selectItem({
|
|
2140
|
+
event: w,
|
|
2461
2141
|
itemId: e,
|
|
2462
2142
|
keepExistingSelection: !0
|
|
2463
2143
|
}) : t.selectItem({
|
|
2464
|
-
event:
|
|
2144
|
+
event: w,
|
|
2465
2145
|
itemId: e,
|
|
2466
2146
|
shouldBeSelected: !0
|
|
2467
2147
|
}));
|
|
2468
|
-
}, p = (
|
|
2148
|
+
}, p = (w) => {
|
|
2469
2149
|
if (I || a)
|
|
2470
2150
|
return;
|
|
2471
|
-
const
|
|
2472
|
-
r &&
|
|
2473
|
-
event:
|
|
2151
|
+
const v = w.nativeEvent.shiftKey;
|
|
2152
|
+
r && v ? t.expandSelectionRange(w, e) : t.selectItem({
|
|
2153
|
+
event: w,
|
|
2474
2154
|
itemId: e,
|
|
2475
2155
|
keepExistingSelection: r,
|
|
2476
|
-
shouldBeSelected:
|
|
2156
|
+
shouldBeSelected: w.target.checked
|
|
2477
2157
|
});
|
|
2478
|
-
},
|
|
2479
|
-
(
|
|
2158
|
+
}, b = (w) => {
|
|
2159
|
+
(w.shiftKey || w.ctrlKey || w.metaKey || a) && w.preventDefault();
|
|
2480
2160
|
}, y = () => {
|
|
2481
|
-
|
|
2161
|
+
he(t, K) && t.isItemEditable(e) && (t.isItemBeingEdited(e) ? t.setEditedItemId(null) : t.setEditedItemId(e));
|
|
2482
2162
|
};
|
|
2483
2163
|
return {
|
|
2484
2164
|
disabled: a,
|
|
@@ -2488,27 +2168,27 @@ function Pt(e) {
|
|
|
2488
2168
|
editable: g,
|
|
2489
2169
|
editing: u,
|
|
2490
2170
|
disableSelection: I,
|
|
2491
|
-
checkboxSelection:
|
|
2492
|
-
handleExpansion:
|
|
2171
|
+
checkboxSelection: s,
|
|
2172
|
+
handleExpansion: h,
|
|
2493
2173
|
handleSelection: m,
|
|
2494
2174
|
handleCheckboxSelection: p,
|
|
2495
2175
|
handleContentClick: n,
|
|
2496
|
-
preventSelection:
|
|
2176
|
+
preventSelection: b,
|
|
2497
2177
|
expansionTrigger: c,
|
|
2498
2178
|
toggleItemEditing: y,
|
|
2499
|
-
handleSaveItemLabel: (
|
|
2500
|
-
|
|
2179
|
+
handleSaveItemLabel: (w, v) => {
|
|
2180
|
+
he(t, K) && t.isItemBeingEditedRef(e) && (t.updateItemLabel(e, v), y(), t.focusItem(w, e));
|
|
2501
2181
|
},
|
|
2502
|
-
handleCancelItemLabelEditing: (
|
|
2503
|
-
|
|
2182
|
+
handleCancelItemLabelEditing: (w) => {
|
|
2183
|
+
he(t, K) && t.isItemBeingEditedRef(e) && (y(), t.focusItem(w, e));
|
|
2504
2184
|
}
|
|
2505
2185
|
};
|
|
2506
2186
|
}
|
|
2507
|
-
const
|
|
2187
|
+
const io = _("div", {
|
|
2508
2188
|
name: "MuiTreeItem2DragAndDropOverlay",
|
|
2509
2189
|
slot: "Root",
|
|
2510
2190
|
overridesResolver: (e, t) => t.root,
|
|
2511
|
-
shouldForwardProp: (e) =>
|
|
2191
|
+
shouldForwardProp: (e) => Ne(e) && e !== "action"
|
|
2512
2192
|
})(({
|
|
2513
2193
|
theme: e
|
|
2514
2194
|
}) => ({
|
|
@@ -2526,7 +2206,7 @@ const go = U("div", {
|
|
|
2526
2206
|
style: {
|
|
2527
2207
|
marginLeft: "calc(var(--TreeView-indentMultiplier) * var(--TreeView-itemDepth))",
|
|
2528
2208
|
borderRadius: e.shape.borderRadius,
|
|
2529
|
-
backgroundColor: e.vars ? `rgba(${e.vars.palette.primary.darkChannel} / ${e.vars.palette.action.focusOpacity})` :
|
|
2209
|
+
backgroundColor: e.vars ? `rgba(${e.vars.palette.primary.darkChannel} / ${e.vars.palette.action.focusOpacity})` : W(e.palette.primary.dark, e.palette.action.focusOpacity)
|
|
2530
2210
|
}
|
|
2531
2211
|
}, {
|
|
2532
2212
|
props: {
|
|
@@ -2554,10 +2234,10 @@ const go = U("div", {
|
|
|
2554
2234
|
}
|
|
2555
2235
|
}]
|
|
2556
2236
|
}));
|
|
2557
|
-
function
|
|
2558
|
-
return e.action == null ? null : /* @__PURE__ */
|
|
2237
|
+
function wt(e) {
|
|
2238
|
+
return e.action == null ? null : /* @__PURE__ */ E(io, C({}, e));
|
|
2559
2239
|
}
|
|
2560
|
-
process.env.NODE_ENV !== "production" && (
|
|
2240
|
+
process.env.NODE_ENV !== "production" && (wt.propTypes = {
|
|
2561
2241
|
// ----------------------------- Warning --------------------------------
|
|
2562
2242
|
// | These PropTypes are generated from the TypeScript type definitions |
|
|
2563
2243
|
// | To update them edit the TypeScript types and run "pnpm proptypes" |
|
|
@@ -2565,13 +2245,13 @@ process.env.NODE_ENV !== "production" && (Rt.propTypes = {
|
|
|
2565
2245
|
action: o.oneOf(["make-child", "move-to-parent", "reorder-above", "reorder-below"]),
|
|
2566
2246
|
style: o.object
|
|
2567
2247
|
});
|
|
2568
|
-
const
|
|
2248
|
+
const so = _("input", {
|
|
2569
2249
|
name: "MuiTreeItem2",
|
|
2570
2250
|
slot: "LabelInput",
|
|
2571
2251
|
overridesResolver: (e, t) => t.labelInput
|
|
2572
2252
|
})(({
|
|
2573
2253
|
theme: e
|
|
2574
|
-
}) =>
|
|
2254
|
+
}) => C({}, e.typography.body1, {
|
|
2575
2255
|
width: "100%",
|
|
2576
2256
|
backgroundColor: e.palette.background.paper,
|
|
2577
2257
|
borderRadius: e.shape.borderRadius,
|
|
@@ -2581,73 +2261,73 @@ const ho = U("input", {
|
|
|
2581
2261
|
"&:focus": {
|
|
2582
2262
|
outline: `1px solid ${e.palette.primary.main}`
|
|
2583
2263
|
}
|
|
2584
|
-
})),
|
|
2264
|
+
})), lo = ["classes", "className", "displayIcon", "expansionIcon", "icon", "label", "itemId", "onClick", "onMouseDown", "dragAndDropOverlayProps", "labelInputProps"], Ke = /* @__PURE__ */ x.forwardRef(function(t, n) {
|
|
2585
2265
|
const {
|
|
2586
2266
|
classes: r,
|
|
2587
|
-
className:
|
|
2267
|
+
className: s,
|
|
2588
2268
|
displayIcon: I,
|
|
2589
2269
|
expansionIcon: c,
|
|
2590
|
-
icon:
|
|
2270
|
+
icon: l,
|
|
2591
2271
|
label: d,
|
|
2592
2272
|
itemId: f,
|
|
2593
2273
|
onClick: i,
|
|
2594
2274
|
onMouseDown: a,
|
|
2595
2275
|
dragAndDropOverlayProps: u,
|
|
2596
2276
|
labelInputProps: g
|
|
2597
|
-
} = t,
|
|
2277
|
+
} = t, h = G(t, lo), {
|
|
2598
2278
|
disabled: m,
|
|
2599
2279
|
expanded: p,
|
|
2600
|
-
selected:
|
|
2280
|
+
selected: b,
|
|
2601
2281
|
focused: y,
|
|
2602
|
-
editing:
|
|
2603
|
-
editable:
|
|
2604
|
-
disableSelection:
|
|
2605
|
-
checkboxSelection:
|
|
2282
|
+
editing: T,
|
|
2283
|
+
editable: S,
|
|
2284
|
+
disableSelection: w,
|
|
2285
|
+
checkboxSelection: v,
|
|
2606
2286
|
handleExpansion: M,
|
|
2607
|
-
handleSelection:
|
|
2608
|
-
handleCheckboxSelection:
|
|
2609
|
-
handleContentClick:
|
|
2610
|
-
preventSelection:
|
|
2611
|
-
expansionTrigger:
|
|
2612
|
-
toggleItemEditing:
|
|
2613
|
-
} =
|
|
2614
|
-
|
|
2615
|
-
},
|
|
2287
|
+
handleSelection: $,
|
|
2288
|
+
handleCheckboxSelection: q,
|
|
2289
|
+
handleContentClick: A,
|
|
2290
|
+
preventSelection: N,
|
|
2291
|
+
expansionTrigger: D,
|
|
2292
|
+
toggleItemEditing: Q
|
|
2293
|
+
} = Tt(f), z = l || c || I, Z = x.useRef(null), j = (O) => {
|
|
2294
|
+
N(O), a && a(O);
|
|
2295
|
+
}, re = (O) => {
|
|
2616
2296
|
var J;
|
|
2617
|
-
|
|
2618
|
-
}, X = (
|
|
2619
|
-
|
|
2297
|
+
A == null || A(O, f), !((J = Z.current) != null && J.contains(O.target)) && (D === "content" && M(O), v || $(O), i && i(O));
|
|
2298
|
+
}, X = (O) => {
|
|
2299
|
+
O.defaultMuiPrevented || Q();
|
|
2620
2300
|
};
|
|
2621
2301
|
return (
|
|
2622
2302
|
/* eslint-disable-next-line jsx-a11y/click-events-have-key-events,jsx-a11y/no-static-element-interactions -- Key event is handled by the TreeView */
|
|
2623
|
-
/* @__PURE__ */
|
|
2624
|
-
className:
|
|
2625
|
-
onClick:
|
|
2626
|
-
onMouseDown:
|
|
2303
|
+
/* @__PURE__ */ Ce("div", C({}, h, {
|
|
2304
|
+
className: $e(r.root, s, p && r.expanded, b && r.selected, y && r.focused, m && r.disabled, T && r.editing, S && r.editable),
|
|
2305
|
+
onClick: re,
|
|
2306
|
+
onMouseDown: j,
|
|
2627
2307
|
ref: n,
|
|
2628
|
-
children: [/* @__PURE__ */
|
|
2308
|
+
children: [/* @__PURE__ */ E("div", {
|
|
2629
2309
|
className: r.iconContainer,
|
|
2630
|
-
children:
|
|
2631
|
-
}),
|
|
2310
|
+
children: z
|
|
2311
|
+
}), v && /* @__PURE__ */ E(st, {
|
|
2632
2312
|
className: r.checkbox,
|
|
2633
|
-
checked:
|
|
2634
|
-
onChange:
|
|
2635
|
-
disabled: m ||
|
|
2636
|
-
ref:
|
|
2313
|
+
checked: b,
|
|
2314
|
+
onChange: q,
|
|
2315
|
+
disabled: m || w,
|
|
2316
|
+
ref: Z,
|
|
2637
2317
|
tabIndex: -1
|
|
2638
|
-
}),
|
|
2318
|
+
}), T ? /* @__PURE__ */ E(so, C({}, g, {
|
|
2639
2319
|
className: r.labelInput
|
|
2640
|
-
})) : /* @__PURE__ */
|
|
2320
|
+
})) : /* @__PURE__ */ E("div", C({
|
|
2641
2321
|
className: r.label
|
|
2642
|
-
},
|
|
2322
|
+
}, S && {
|
|
2643
2323
|
onDoubleClick: X
|
|
2644
2324
|
}, {
|
|
2645
2325
|
children: d
|
|
2646
|
-
})), u && /* @__PURE__ */
|
|
2326
|
+
})), u && /* @__PURE__ */ E(wt, C({}, u))]
|
|
2647
2327
|
}))
|
|
2648
2328
|
);
|
|
2649
2329
|
});
|
|
2650
|
-
process.env.NODE_ENV !== "production" && (
|
|
2330
|
+
process.env.NODE_ENV !== "production" && (Ke.propTypes = {
|
|
2651
2331
|
// ----------------------------- Warning --------------------------------
|
|
2652
2332
|
// | These PropTypes are generated from the TypeScript type definitions |
|
|
2653
2333
|
// | To update them edit the TypeScript types and run "pnpm proptypes" |
|
|
@@ -2691,29 +2371,29 @@ process.env.NODE_ENV !== "production" && (Xe.propTypes = {
|
|
|
2691
2371
|
value: o.string
|
|
2692
2372
|
})
|
|
2693
2373
|
});
|
|
2694
|
-
function
|
|
2695
|
-
return
|
|
2374
|
+
function ao(e) {
|
|
2375
|
+
return Te("MuiTreeItem", e);
|
|
2696
2376
|
}
|
|
2697
|
-
const
|
|
2377
|
+
const B = we("MuiTreeItem", ["root", "groupTransition", "content", "expanded", "selected", "focused", "disabled", "iconContainer", "label", "checkbox", "labelInput", "editable", "editing", "dragAndDropOverlay"]), co = ce(/* @__PURE__ */ E("path", {
|
|
2698
2378
|
d: "M10 6 8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z"
|
|
2699
|
-
}), "TreeViewExpandIcon"),
|
|
2379
|
+
}), "TreeViewExpandIcon"), uo = ce(/* @__PURE__ */ E("path", {
|
|
2700
2380
|
d: "M16.59 8.59 12 13.17 7.41 8.59 6 10l6 6 6-6z"
|
|
2701
2381
|
}), "TreeViewCollapseIcon");
|
|
2702
|
-
function
|
|
2382
|
+
function Et(e) {
|
|
2703
2383
|
const {
|
|
2704
2384
|
children: t,
|
|
2705
2385
|
itemId: n
|
|
2706
2386
|
} = e, {
|
|
2707
2387
|
wrapItem: r,
|
|
2708
|
-
instance:
|
|
2709
|
-
} =
|
|
2388
|
+
instance: s
|
|
2389
|
+
} = oe();
|
|
2710
2390
|
return r({
|
|
2711
2391
|
children: t,
|
|
2712
2392
|
itemId: n,
|
|
2713
|
-
instance:
|
|
2393
|
+
instance: s
|
|
2714
2394
|
});
|
|
2715
2395
|
}
|
|
2716
|
-
|
|
2396
|
+
Et.propTypes = {
|
|
2717
2397
|
// ----------------------------- Warning --------------------------------
|
|
2718
2398
|
// | These PropTypes are generated from the TypeScript type definitions |
|
|
2719
2399
|
// | To update them edit the TypeScript types and run "pnpm proptypes" |
|
|
@@ -2721,11 +2401,11 @@ Mt.propTypes = {
|
|
|
2721
2401
|
children: o.node,
|
|
2722
2402
|
itemId: o.string.isRequired
|
|
2723
2403
|
};
|
|
2724
|
-
const
|
|
2404
|
+
const po = ["children", "className", "slots", "slotProps", "ContentComponent", "ContentProps", "itemId", "id", "label", "onClick", "onMouseDown", "onFocus", "onBlur", "onKeyDown"], fo = ["ownerState"], mo = ["ownerState"], Io = ["ownerState"], go = lt(), bo = (e) => {
|
|
2725
2405
|
const {
|
|
2726
2406
|
classes: t
|
|
2727
2407
|
} = e;
|
|
2728
|
-
return
|
|
2408
|
+
return Ee({
|
|
2729
2409
|
root: ["root"],
|
|
2730
2410
|
content: ["content"],
|
|
2731
2411
|
expanded: ["expanded"],
|
|
@@ -2739,8 +2419,8 @@ const To = ["children", "className", "slots", "slotProps", "ContentComponent", "
|
|
|
2739
2419
|
editing: ["editing"],
|
|
2740
2420
|
editable: ["editable"],
|
|
2741
2421
|
groupTransition: ["groupTransition"]
|
|
2742
|
-
},
|
|
2743
|
-
},
|
|
2422
|
+
}, ao, t);
|
|
2423
|
+
}, ho = _("li", {
|
|
2744
2424
|
name: "MuiTreeItem",
|
|
2745
2425
|
slot: "Root",
|
|
2746
2426
|
overridesResolver: (e, t) => t.root
|
|
@@ -2749,15 +2429,15 @@ const To = ["children", "className", "slots", "slotProps", "ContentComponent", "
|
|
|
2749
2429
|
margin: 0,
|
|
2750
2430
|
padding: 0,
|
|
2751
2431
|
outline: 0
|
|
2752
|
-
}),
|
|
2432
|
+
}), yo = _(Ke, {
|
|
2753
2433
|
name: "MuiTreeItem",
|
|
2754
2434
|
slot: "Content",
|
|
2755
2435
|
overridesResolver: (e, t) => [t.content, t.iconContainer && {
|
|
2756
|
-
[`& .${
|
|
2436
|
+
[`& .${B.iconContainer}`]: t.iconContainer
|
|
2757
2437
|
}, t.label && {
|
|
2758
|
-
[`& .${
|
|
2438
|
+
[`& .${B.label}`]: t.label
|
|
2759
2439
|
}],
|
|
2760
|
-
shouldForwardProp: (e) =>
|
|
2440
|
+
shouldForwardProp: (e) => Ne(e) && e !== "indentationAtItemLevel"
|
|
2761
2441
|
})(({
|
|
2762
2442
|
theme: e
|
|
2763
2443
|
}) => ({
|
|
@@ -2779,27 +2459,27 @@ const To = ["children", "className", "slots", "slotProps", "ContentComponent", "
|
|
|
2779
2459
|
backgroundColor: "transparent"
|
|
2780
2460
|
}
|
|
2781
2461
|
},
|
|
2782
|
-
[`&.${
|
|
2462
|
+
[`&.${B.disabled}`]: {
|
|
2783
2463
|
opacity: (e.vars || e).palette.action.disabledOpacity,
|
|
2784
2464
|
backgroundColor: "transparent"
|
|
2785
2465
|
},
|
|
2786
|
-
[`&.${
|
|
2466
|
+
[`&.${B.focused}`]: {
|
|
2787
2467
|
backgroundColor: (e.vars || e).palette.action.focus
|
|
2788
2468
|
},
|
|
2789
|
-
[`&.${
|
|
2790
|
-
backgroundColor: e.vars ? `rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.selectedOpacity})` :
|
|
2469
|
+
[`&.${B.selected}`]: {
|
|
2470
|
+
backgroundColor: e.vars ? `rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.selectedOpacity})` : W(e.palette.primary.main, e.palette.action.selectedOpacity),
|
|
2791
2471
|
"&:hover": {
|
|
2792
|
-
backgroundColor: e.vars ? `rgba(${e.vars.palette.primary.mainChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.hoverOpacity}))` :
|
|
2472
|
+
backgroundColor: e.vars ? `rgba(${e.vars.palette.primary.mainChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.hoverOpacity}))` : W(e.palette.primary.main, e.palette.action.selectedOpacity + e.palette.action.hoverOpacity),
|
|
2793
2473
|
// Reset on touch devices, it doesn't add specificity
|
|
2794
2474
|
"@media (hover: none)": {
|
|
2795
|
-
backgroundColor: e.vars ? `rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.selectedOpacity})` :
|
|
2475
|
+
backgroundColor: e.vars ? `rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.selectedOpacity})` : W(e.palette.primary.main, e.palette.action.selectedOpacity)
|
|
2796
2476
|
}
|
|
2797
2477
|
},
|
|
2798
|
-
[`&.${
|
|
2799
|
-
backgroundColor: e.vars ? `rgba(${e.vars.palette.primary.mainChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.focusOpacity}))` :
|
|
2478
|
+
[`&.${B.focused}`]: {
|
|
2479
|
+
backgroundColor: e.vars ? `rgba(${e.vars.palette.primary.mainChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.focusOpacity}))` : W(e.palette.primary.main, e.palette.action.selectedOpacity + e.palette.action.focusOpacity)
|
|
2800
2480
|
}
|
|
2801
2481
|
},
|
|
2802
|
-
[`& .${
|
|
2482
|
+
[`& .${B.iconContainer}`]: {
|
|
2803
2483
|
width: 16,
|
|
2804
2484
|
display: "flex",
|
|
2805
2485
|
flexShrink: 0,
|
|
@@ -2808,7 +2488,7 @@ const To = ["children", "className", "slots", "slotProps", "ContentComponent", "
|
|
|
2808
2488
|
fontSize: 18
|
|
2809
2489
|
}
|
|
2810
2490
|
},
|
|
2811
|
-
[`& .${
|
|
2491
|
+
[`& .${B.label}`]: C({
|
|
2812
2492
|
width: "100%",
|
|
2813
2493
|
boxSizing: "border-box",
|
|
2814
2494
|
// prevent width + padding to overflow
|
|
@@ -2816,7 +2496,7 @@ const To = ["children", "className", "slots", "slotProps", "ContentComponent", "
|
|
|
2816
2496
|
minWidth: 0,
|
|
2817
2497
|
position: "relative"
|
|
2818
2498
|
}, e.typography.body1),
|
|
2819
|
-
[`& .${
|
|
2499
|
+
[`& .${B.checkbox}`]: {
|
|
2820
2500
|
padding: 0
|
|
2821
2501
|
},
|
|
2822
2502
|
variants: [{
|
|
@@ -2827,11 +2507,11 @@ const To = ["children", "className", "slots", "slotProps", "ContentComponent", "
|
|
|
2827
2507
|
paddingLeft: `calc(${e.spacing(1)} + var(--TreeView-itemChildrenIndentation) * var(--TreeView-itemDepth))`
|
|
2828
2508
|
}
|
|
2829
2509
|
}]
|
|
2830
|
-
})),
|
|
2510
|
+
})), xo = _(cn, {
|
|
2831
2511
|
name: "MuiTreeItem",
|
|
2832
2512
|
slot: "GroupTransition",
|
|
2833
2513
|
overridesResolver: (e, t) => t.groupTransition,
|
|
2834
|
-
shouldForwardProp: (e) =>
|
|
2514
|
+
shouldForwardProp: (e) => Ne(e) && e !== "indentationAtItemLevel"
|
|
2835
2515
|
})({
|
|
2836
2516
|
margin: 0,
|
|
2837
2517
|
padding: 0,
|
|
@@ -2844,154 +2524,154 @@ const To = ["children", "className", "slots", "slotProps", "ContentComponent", "
|
|
|
2844
2524
|
paddingLeft: 0
|
|
2845
2525
|
}
|
|
2846
2526
|
}]
|
|
2847
|
-
}),
|
|
2848
|
-
var
|
|
2527
|
+
}), vt = /* @__PURE__ */ x.forwardRef(function(t, n) {
|
|
2528
|
+
var We, Ge, Ye, Qe;
|
|
2849
2529
|
const {
|
|
2850
2530
|
icons: r,
|
|
2851
|
-
runItemPlugins:
|
|
2531
|
+
runItemPlugins: s,
|
|
2852
2532
|
items: {
|
|
2853
2533
|
disabledItemsFocusable: I,
|
|
2854
2534
|
indentationAtItemLevel: c
|
|
2855
2535
|
},
|
|
2856
2536
|
selection: {
|
|
2857
|
-
disableSelection:
|
|
2537
|
+
disableSelection: l
|
|
2858
2538
|
},
|
|
2859
2539
|
expansion: {
|
|
2860
2540
|
expansionTrigger: d
|
|
2861
2541
|
},
|
|
2862
2542
|
treeId: f,
|
|
2863
2543
|
instance: i
|
|
2864
|
-
} =
|
|
2544
|
+
} = oe(), a = x.useContext(ne), u = go({
|
|
2865
2545
|
props: t,
|
|
2866
2546
|
name: "MuiTreeItem"
|
|
2867
2547
|
}), {
|
|
2868
2548
|
children: g,
|
|
2869
|
-
className:
|
|
2549
|
+
className: h,
|
|
2870
2550
|
slots: m,
|
|
2871
2551
|
slotProps: p,
|
|
2872
|
-
ContentComponent:
|
|
2552
|
+
ContentComponent: b = Ke,
|
|
2873
2553
|
ContentProps: y,
|
|
2874
|
-
itemId:
|
|
2875
|
-
id:
|
|
2876
|
-
label:
|
|
2877
|
-
onClick:
|
|
2554
|
+
itemId: T,
|
|
2555
|
+
id: S,
|
|
2556
|
+
label: w,
|
|
2557
|
+
onClick: v,
|
|
2878
2558
|
onMouseDown: M,
|
|
2879
|
-
onBlur:
|
|
2880
|
-
onKeyDown:
|
|
2881
|
-
} = u,
|
|
2882
|
-
expanded:
|
|
2883
|
-
focused:
|
|
2884
|
-
selected:
|
|
2885
|
-
disabled:
|
|
2886
|
-
editing:
|
|
2887
|
-
handleExpansion:
|
|
2888
|
-
handleCancelItemLabelEditing:
|
|
2559
|
+
onBlur: $,
|
|
2560
|
+
onKeyDown: q
|
|
2561
|
+
} = u, A = G(u, po), {
|
|
2562
|
+
expanded: N,
|
|
2563
|
+
focused: D,
|
|
2564
|
+
selected: Q,
|
|
2565
|
+
disabled: z,
|
|
2566
|
+
editing: Z,
|
|
2567
|
+
handleExpansion: j,
|
|
2568
|
+
handleCancelItemLabelEditing: re,
|
|
2889
2569
|
handleSaveItemLabel: X
|
|
2890
|
-
} =
|
|
2891
|
-
process.env.NODE_ENV !== "production" && (u.ContentComponent &&
|
|
2570
|
+
} = Tt(T);
|
|
2571
|
+
process.env.NODE_ENV !== "production" && (u.ContentComponent && xe(["MUI X: The ContentComponent prop of the TreeItem component is deprecated and will be removed in the next major release.", "You can use the new TreeItem2 component or the new useTreeItem2 hook to customize the rendering of the content.", "For more detail, see https://mui.com/x/react-tree-view/tree-item-customization/."]), u.ContentProps && xe(["MUI X: The ContentProps prop of the TreeItem component is deprecated and will be removed in the next major release.", "You can use the new TreeItem2 component or the new useTreeItem2 hook to customize the rendering of the content.", "For more detail, see https://mui.com/x/react-tree-view/tree-item-customization/."]));
|
|
2892
2572
|
const {
|
|
2893
|
-
contentRef:
|
|
2573
|
+
contentRef: O,
|
|
2894
2574
|
rootRef: J,
|
|
2895
|
-
propsEnhancers:
|
|
2896
|
-
} =
|
|
2897
|
-
expandIcon: (m == null ? void 0 : m.expandIcon) ?? r.slots.expandIcon ??
|
|
2898
|
-
collapseIcon: (m == null ? void 0 : m.collapseIcon) ?? r.slots.collapseIcon ??
|
|
2575
|
+
propsEnhancers: V
|
|
2576
|
+
} = s(u), H = x.useRef(null), pe = x.useRef(null), Re = ye(n, J, H), R = ye(y == null ? void 0 : y.ref, O, pe), k = {
|
|
2577
|
+
expandIcon: (m == null ? void 0 : m.expandIcon) ?? r.slots.expandIcon ?? co,
|
|
2578
|
+
collapseIcon: (m == null ? void 0 : m.collapseIcon) ?? r.slots.collapseIcon ?? uo,
|
|
2899
2579
|
endIcon: (m == null ? void 0 : m.endIcon) ?? r.slots.endIcon,
|
|
2900
2580
|
icon: m == null ? void 0 : m.icon,
|
|
2901
2581
|
groupTransition: m == null ? void 0 : m.groupTransition
|
|
2902
|
-
},
|
|
2903
|
-
expanded:
|
|
2904
|
-
focused:
|
|
2905
|
-
selected:
|
|
2906
|
-
disabled:
|
|
2582
|
+
}, L = (P) => Array.isArray(P) ? P.length > 0 && P.some(L) : !!P, fe = L(g), Me = C({}, u, {
|
|
2583
|
+
expanded: N,
|
|
2584
|
+
focused: D,
|
|
2585
|
+
selected: Q,
|
|
2586
|
+
disabled: z,
|
|
2907
2587
|
indentationAtItemLevel: c
|
|
2908
|
-
}), F =
|
|
2909
|
-
elementType:
|
|
2588
|
+
}), F = bo(Me), qe = k.groupTransition ?? void 0, St = se({
|
|
2589
|
+
elementType: qe,
|
|
2910
2590
|
ownerState: {},
|
|
2911
2591
|
externalSlotProps: p == null ? void 0 : p.groupTransition,
|
|
2912
|
-
additionalProps:
|
|
2592
|
+
additionalProps: C({
|
|
2913
2593
|
unmountOnExit: !0,
|
|
2914
|
-
in:
|
|
2594
|
+
in: N,
|
|
2915
2595
|
component: "ul",
|
|
2916
2596
|
role: "group"
|
|
2917
2597
|
}, c ? {
|
|
2918
2598
|
indentationAtItemLevel: !0
|
|
2919
2599
|
} : {}),
|
|
2920
2600
|
className: F.groupTransition
|
|
2921
|
-
}),
|
|
2922
|
-
d === "iconContainer" &&
|
|
2923
|
-
},
|
|
2924
|
-
elementType:
|
|
2601
|
+
}), Rt = (P) => {
|
|
2602
|
+
d === "iconContainer" && j(P);
|
|
2603
|
+
}, ke = N ? k.collapseIcon : k.expandIcon, Mt = se({
|
|
2604
|
+
elementType: ke,
|
|
2925
2605
|
ownerState: {},
|
|
2926
|
-
externalSlotProps: (P) =>
|
|
2606
|
+
externalSlotProps: (P) => N ? C({}, te(r.slotProps.collapseIcon, P), te(p == null ? void 0 : p.collapseIcon, P)) : C({}, te(r.slotProps.expandIcon, P), te(p == null ? void 0 : p.expandIcon, P)),
|
|
2927
2607
|
additionalProps: {
|
|
2928
|
-
onClick:
|
|
2608
|
+
onClick: Rt
|
|
2929
2609
|
}
|
|
2930
|
-
}),
|
|
2931
|
-
elementType:
|
|
2610
|
+
}), kt = G(Mt, fo), Ot = fe && ke ? /* @__PURE__ */ E(ke, C({}, kt)) : null, Oe = fe ? void 0 : k.endIcon, Vt = se({
|
|
2611
|
+
elementType: Oe,
|
|
2932
2612
|
ownerState: {},
|
|
2933
|
-
externalSlotProps: (P) =>
|
|
2934
|
-
}),
|
|
2935
|
-
elementType:
|
|
2613
|
+
externalSlotProps: (P) => fe ? {} : C({}, te(r.slotProps.endIcon, P), te(p == null ? void 0 : p.endIcon, P))
|
|
2614
|
+
}), Dt = G(Vt, mo), Ft = Oe ? /* @__PURE__ */ E(Oe, C({}, Dt)) : null, Ve = k.icon, At = se({
|
|
2615
|
+
elementType: Ve,
|
|
2936
2616
|
ownerState: {},
|
|
2937
2617
|
externalSlotProps: p == null ? void 0 : p.icon
|
|
2938
|
-
}),
|
|
2939
|
-
let
|
|
2940
|
-
|
|
2941
|
-
function
|
|
2942
|
-
!
|
|
2618
|
+
}), Lt = G(At, Io), $t = Ve ? /* @__PURE__ */ E(Ve, C({}, Lt)) : null;
|
|
2619
|
+
let me;
|
|
2620
|
+
Q ? me = !0 : l || z ? me = void 0 : me = !1;
|
|
2621
|
+
function Nt(P) {
|
|
2622
|
+
!D && (!z || I) && P.currentTarget === P.target && i.focusItem(P, T);
|
|
2943
2623
|
}
|
|
2944
|
-
function
|
|
2945
|
-
var
|
|
2946
|
-
|
|
2624
|
+
function jt(P) {
|
|
2625
|
+
var ee, ie, Ze, He;
|
|
2626
|
+
$ == null || $(P), !(Z || // we can exit the editing state by clicking outside the input (within the Tree Item) or by pressing Enter or Escape -> we don't want to remove the focused item from the state in these cases
|
|
2947
2627
|
// we can also exit the editing state by clicking on the root itself -> want to remove the focused item from the state in this case
|
|
2948
|
-
P.relatedTarget &&
|
|
2628
|
+
P.relatedTarget && Le(P.relatedTarget, H.current) && (P.target && ((ie = (ee = P.target) == null ? void 0 : ee.dataset) == null ? void 0 : ie.element) === "labelInput" && Le(P.target, H.current) || ((He = (Ze = P.relatedTarget) == null ? void 0 : Ze.dataset) == null ? void 0 : He.element) === "labelInput")) && i.removeFocusedItem();
|
|
2949
2629
|
}
|
|
2950
|
-
const
|
|
2951
|
-
var
|
|
2952
|
-
|
|
2953
|
-
},
|
|
2954
|
-
itemId:
|
|
2630
|
+
const Bt = (P) => {
|
|
2631
|
+
var ee, ie;
|
|
2632
|
+
q == null || q(P), ((ie = (ee = P.target) == null ? void 0 : ee.dataset) == null ? void 0 : ie.element) !== "labelInput" && i.handleItemKeyDown(P, T);
|
|
2633
|
+
}, _t = ve({
|
|
2634
|
+
itemId: T,
|
|
2955
2635
|
treeId: f,
|
|
2956
|
-
id:
|
|
2957
|
-
}),
|
|
2958
|
-
rootRefObject:
|
|
2959
|
-
contentRefObject:
|
|
2636
|
+
id: S
|
|
2637
|
+
}), zt = i.canItemBeTabbed(T) ? 0 : -1, Ie = {
|
|
2638
|
+
rootRefObject: H,
|
|
2639
|
+
contentRefObject: pe,
|
|
2960
2640
|
interactions: {
|
|
2961
2641
|
handleSaveItemLabel: X,
|
|
2962
|
-
handleCancelItemLabelEditing:
|
|
2642
|
+
handleCancelItemLabelEditing: re
|
|
2963
2643
|
}
|
|
2964
|
-
},
|
|
2965
|
-
externalEventHandlers:
|
|
2966
|
-
}))) ?? {},
|
|
2967
|
-
externalEventHandlers:
|
|
2968
|
-
}))) ?? {},
|
|
2644
|
+
}, Ut = ((We = V.root) == null ? void 0 : We.call(V, C({}, Ie, {
|
|
2645
|
+
externalEventHandlers: tt(A)
|
|
2646
|
+
}))) ?? {}, Kt = ((Ge = V.content) == null ? void 0 : Ge.call(V, C({}, Ie, {
|
|
2647
|
+
externalEventHandlers: tt(y)
|
|
2648
|
+
}))) ?? {}, Xe = ((Ye = V.dragAndDropOverlay) == null ? void 0 : Ye.call(V, C({}, Ie, {
|
|
2969
2649
|
externalEventHandlers: {}
|
|
2970
|
-
}))) ?? {}, Je = ((Qe =
|
|
2650
|
+
}))) ?? {}, Je = ((Qe = V.labelInput) == null ? void 0 : Qe.call(V, C({}, Ie, {
|
|
2971
2651
|
externalEventHandlers: {}
|
|
2972
2652
|
}))) ?? {};
|
|
2973
|
-
return /* @__PURE__ */
|
|
2974
|
-
itemId:
|
|
2975
|
-
children: /* @__PURE__ */
|
|
2976
|
-
className:
|
|
2653
|
+
return /* @__PURE__ */ E(Et, {
|
|
2654
|
+
itemId: T,
|
|
2655
|
+
children: /* @__PURE__ */ Ce(ho, C({
|
|
2656
|
+
className: $e(F.root, h),
|
|
2977
2657
|
role: "treeitem",
|
|
2978
|
-
"aria-expanded":
|
|
2979
|
-
"aria-selected":
|
|
2980
|
-
"aria-disabled":
|
|
2981
|
-
id:
|
|
2982
|
-
tabIndex:
|
|
2983
|
-
},
|
|
2984
|
-
ownerState:
|
|
2985
|
-
onFocus:
|
|
2986
|
-
onBlur:
|
|
2987
|
-
onKeyDown:
|
|
2988
|
-
ref:
|
|
2989
|
-
style: c ?
|
|
2990
|
-
"--TreeView-itemDepth": typeof a == "function" ? a(
|
|
2991
|
-
}) :
|
|
2992
|
-
},
|
|
2993
|
-
children: [/* @__PURE__ */
|
|
2994
|
-
as:
|
|
2658
|
+
"aria-expanded": fe ? N : void 0,
|
|
2659
|
+
"aria-selected": me,
|
|
2660
|
+
"aria-disabled": z || void 0,
|
|
2661
|
+
id: _t,
|
|
2662
|
+
tabIndex: zt
|
|
2663
|
+
}, A, {
|
|
2664
|
+
ownerState: Me,
|
|
2665
|
+
onFocus: Nt,
|
|
2666
|
+
onBlur: jt,
|
|
2667
|
+
onKeyDown: Bt,
|
|
2668
|
+
ref: Re,
|
|
2669
|
+
style: c ? C({}, A.style, {
|
|
2670
|
+
"--TreeView-itemDepth": typeof a == "function" ? a(T) : a
|
|
2671
|
+
}) : A.style
|
|
2672
|
+
}, Ut, {
|
|
2673
|
+
children: [/* @__PURE__ */ E(yo, C({
|
|
2674
|
+
as: b,
|
|
2995
2675
|
classes: {
|
|
2996
2676
|
root: F.content,
|
|
2997
2677
|
expanded: F.expanded,
|
|
@@ -3005,29 +2685,29 @@ const To = ["children", "className", "slots", "slotProps", "ContentComponent", "
|
|
|
3005
2685
|
labelInput: F.labelInput,
|
|
3006
2686
|
checkbox: F.checkbox
|
|
3007
2687
|
},
|
|
3008
|
-
label:
|
|
3009
|
-
itemId:
|
|
3010
|
-
onClick:
|
|
2688
|
+
label: w,
|
|
2689
|
+
itemId: T,
|
|
2690
|
+
onClick: v,
|
|
3011
2691
|
onMouseDown: M,
|
|
3012
|
-
icon:
|
|
3013
|
-
expansionIcon:
|
|
3014
|
-
displayIcon:
|
|
3015
|
-
ownerState:
|
|
3016
|
-
}, y,
|
|
3017
|
-
dragAndDropOverlayProps:
|
|
2692
|
+
icon: $t,
|
|
2693
|
+
expansionIcon: Ot,
|
|
2694
|
+
displayIcon: Ft,
|
|
2695
|
+
ownerState: Me
|
|
2696
|
+
}, y, Kt, Xe.action == null ? {} : {
|
|
2697
|
+
dragAndDropOverlayProps: Xe
|
|
3018
2698
|
}, Je.value == null ? {} : {
|
|
3019
2699
|
labelInputProps: Je
|
|
3020
2700
|
}, {
|
|
3021
|
-
ref:
|
|
3022
|
-
})), g && /* @__PURE__ */
|
|
3023
|
-
as:
|
|
3024
|
-
},
|
|
2701
|
+
ref: R
|
|
2702
|
+
})), g && /* @__PURE__ */ E(xo, C({
|
|
2703
|
+
as: qe
|
|
2704
|
+
}, St, {
|
|
3025
2705
|
children: g
|
|
3026
2706
|
}))]
|
|
3027
2707
|
}))
|
|
3028
2708
|
});
|
|
3029
2709
|
});
|
|
3030
|
-
process.env.NODE_ENV !== "production" && (
|
|
2710
|
+
process.env.NODE_ENV !== "production" && (vt.propTypes = {
|
|
3031
2711
|
// ----------------------------- Warning --------------------------------
|
|
3032
2712
|
// | These PropTypes are generated from the TypeScript type definitions |
|
|
3033
2713
|
// | To update them edit the TypeScript types and run "pnpm proptypes" |
|
|
@@ -3046,7 +2726,7 @@ process.env.NODE_ENV !== "production" && (kt.propTypes = {
|
|
|
3046
2726
|
* @deprecated Consider using the `<TreeItem2 />` component or the `useTreeItem2` hook instead. For more details, see https://mui.com/x/react-tree-view/tree-item-customization/.
|
|
3047
2727
|
* @default TreeItemContent
|
|
3048
2728
|
*/
|
|
3049
|
-
ContentComponent:
|
|
2729
|
+
ContentComponent: en,
|
|
3050
2730
|
/**
|
|
3051
2731
|
* Props applied to ContentComponent.
|
|
3052
2732
|
* @deprecated Consider using the `<TreeItem2 />` component or the `useTreeItem2` hook instead. For more details, see https://mui.com/x/react-tree-view/tree-item-customization/.
|
|
@@ -3069,7 +2749,7 @@ process.env.NODE_ENV !== "production" && (kt.propTypes = {
|
|
|
3069
2749
|
* This prop isn't supported.
|
|
3070
2750
|
* Use the `onItemFocus` callback on the tree if you need to monitor a item's focus.
|
|
3071
2751
|
*/
|
|
3072
|
-
onFocus:
|
|
2752
|
+
onFocus: dn,
|
|
3073
2753
|
/**
|
|
3074
2754
|
* Callback fired when a key of the keyboard is pressed on the item.
|
|
3075
2755
|
*/
|
|
@@ -3089,42 +2769,41 @@ process.env.NODE_ENV !== "production" && (kt.propTypes = {
|
|
|
3089
2769
|
*/
|
|
3090
2770
|
sx: o.oneOfType([o.arrayOf(o.oneOfType([o.func, o.object, o.bool])), o.func, o.object])
|
|
3091
2771
|
});
|
|
3092
|
-
const
|
|
2772
|
+
const Po = ({
|
|
3093
2773
|
items: e,
|
|
3094
2774
|
handleCheck: t,
|
|
3095
2775
|
width: n = "250px",
|
|
3096
2776
|
height: r = "350px",
|
|
3097
|
-
expanded:
|
|
3098
|
-
}) => /* @__PURE__ */
|
|
2777
|
+
expanded: s
|
|
2778
|
+
}) => /* @__PURE__ */ E(tn, { width: n, height: r, children: /* @__PURE__ */ E(Ct, { expandedItems: s, children: Pt(e, t) }) }), Pt = (e, t) => e.map((n) => /* @__PURE__ */ qt(Co, { ...n, key: n.id, handleCheck: t })), Co = ({
|
|
3099
2779
|
id: e,
|
|
3100
2780
|
checked: t,
|
|
3101
2781
|
children: n,
|
|
3102
2782
|
label: r,
|
|
3103
|
-
handleCheck:
|
|
3104
|
-
}) => /* @__PURE__ */
|
|
3105
|
-
|
|
2783
|
+
handleCheck: s
|
|
2784
|
+
}) => /* @__PURE__ */ E(
|
|
2785
|
+
vt,
|
|
3106
2786
|
{
|
|
3107
2787
|
itemId: e,
|
|
3108
|
-
label: /* @__PURE__ */
|
|
3109
|
-
/* @__PURE__ */
|
|
3110
|
-
|
|
3111
|
-
|
|
2788
|
+
label: /* @__PURE__ */ Ce(nn, { flexDirection: "row", alignItems: "center", children: [
|
|
2789
|
+
/* @__PURE__ */ E(on, { children: r }),
|
|
2790
|
+
s && /* @__PURE__ */ E(
|
|
2791
|
+
rn,
|
|
3112
2792
|
{
|
|
3113
2793
|
disableRipple: !0,
|
|
3114
2794
|
sx: { marginLeft: "auto" },
|
|
3115
2795
|
onClick: (I) => {
|
|
3116
|
-
I.stopPropagation(),
|
|
2796
|
+
I.stopPropagation(), s(e, !t);
|
|
3117
2797
|
},
|
|
3118
2798
|
"data-testid": `toggle-visibility-${e}`,
|
|
3119
|
-
children: t ? /* @__PURE__ */
|
|
2799
|
+
children: t ? /* @__PURE__ */ E(un, { "data-testid": `visibility-icon-${e}` }) : /* @__PURE__ */ E(pn, { "data-testid": `visibility-off-icon-${e}` })
|
|
3120
2800
|
}
|
|
3121
2801
|
)
|
|
3122
2802
|
] }),
|
|
3123
|
-
children: n.length > 0 &&
|
|
2803
|
+
children: n.length > 0 && Pt(n, s)
|
|
3124
2804
|
}
|
|
3125
2805
|
);
|
|
3126
2806
|
export {
|
|
3127
|
-
|
|
3128
|
-
|
|
3129
|
-
ut as a
|
|
2807
|
+
st as C,
|
|
2808
|
+
Po as T
|
|
3130
2809
|
};
|