@amateescu/portal-ui-components 0.0.39 → 0.0.40
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.
|
@@ -1,38 +1,38 @@
|
|
|
1
|
-
import { jsx as v, jsxs as
|
|
2
|
-
import * as
|
|
3
|
-
import
|
|
4
|
-
import { FormControl as
|
|
5
|
-
import { S as
|
|
6
|
-
import { c as
|
|
7
|
-
import { C as
|
|
8
|
-
import { _ as
|
|
9
|
-
import { g as
|
|
10
|
-
import { u as
|
|
11
|
-
import { a as
|
|
12
|
-
import { c as
|
|
13
|
-
import { C as
|
|
14
|
-
const
|
|
1
|
+
import { jsx as v, jsxs as Y, Fragment as mn } from "react/jsx-runtime";
|
|
2
|
+
import * as M from "react";
|
|
3
|
+
import $e, { useState as We, useRef as gt, useMemo as Ke, useEffect as bt, useCallback as St } from "react";
|
|
4
|
+
import { FormControl as In, InputLabel as gn, OutlinedInput as bn, InputAdornment as yt, IconButton as Sn, Box as fe, Chip as xt, Collapse as yn, Paper as xn, TextField as En, Typography as Ue, Checkbox as Cn } from "@mui/material";
|
|
5
|
+
import { S as vn } from "../../Search-BxOqluZm.js";
|
|
6
|
+
import { c as ge } from "../../createSvgIcon-DQP4Lgl5.js";
|
|
7
|
+
import { C as wn } from "../../Clear-BzF0WMi7.js";
|
|
8
|
+
import { _ as Be, a as S, e as Tn, u as kn, f as On, B as Mn, r as Pn } from "../../ButtonBase-Cj889DO9.js";
|
|
9
|
+
import { g as Ce, a as ve, P as i, s as G, e as we, u as Kt, t as Rn, c as Q, m as Ut, b as xe, l as Ht, p as st, q as Se } from "../../DefaultPropsProvider-8An9vBcT.js";
|
|
10
|
+
import { u as Ln, b as te, T as Dn, c as _n, g as Et, d as An, m as Nn, a as Fn } from "../../useFormControl-DUby-fW8.js";
|
|
11
|
+
import { a as Vn, b as Ie, u as zn, e as re, r as Ct } from "../../useSlot-Bvdicoh5.js";
|
|
12
|
+
import { c as vt } from "../../createSimplePaletteValueFilter-Bz8RuRaa.js";
|
|
13
|
+
import { C as jn } from "../../CircularProgress-BjeN7Xv-.js";
|
|
14
|
+
const $n = ge(/* @__PURE__ */ v("path", {
|
|
15
15
|
d: "M16.59 8.59 12 13.17 7.41 8.59 6 10l6 6 6-6z"
|
|
16
|
-
}), "ExpandMore"),
|
|
17
|
-
function
|
|
18
|
-
const n =
|
|
19
|
-
return n.current ===
|
|
16
|
+
}), "ExpandMore"), wt = {};
|
|
17
|
+
function it(t, e) {
|
|
18
|
+
const n = M.useRef(wt);
|
|
19
|
+
return n.current === wt && (n.current = t(e)), n;
|
|
20
20
|
}
|
|
21
|
-
function
|
|
22
|
-
const r =
|
|
23
|
-
return
|
|
21
|
+
function Ne(t, e, n, o) {
|
|
22
|
+
const r = it(Bn).current;
|
|
23
|
+
return Wn(r, t, e, n, o) && Kn(r, [t, e, n, o]), r.callback;
|
|
24
24
|
}
|
|
25
|
-
function
|
|
25
|
+
function Bn() {
|
|
26
26
|
return {
|
|
27
27
|
callback: null,
|
|
28
28
|
cleanup: null,
|
|
29
29
|
refs: []
|
|
30
30
|
};
|
|
31
31
|
}
|
|
32
|
-
function
|
|
32
|
+
function Wn(t, e, n, o, r) {
|
|
33
33
|
return t.refs[0] !== e || t.refs[1] !== n || t.refs[2] !== o || t.refs[3] !== r;
|
|
34
34
|
}
|
|
35
|
-
function
|
|
35
|
+
function Kn(t, e) {
|
|
36
36
|
if (t.refs = e, e.every((n) => n == null)) {
|
|
37
37
|
t.callback = null;
|
|
38
38
|
return;
|
|
@@ -75,73 +75,73 @@ function $n(t, e) {
|
|
|
75
75
|
}
|
|
76
76
|
};
|
|
77
77
|
}
|
|
78
|
-
const
|
|
79
|
-
function
|
|
78
|
+
const Tt = /* @__PURE__ */ new Set();
|
|
79
|
+
function et(t, e = "warning") {
|
|
80
80
|
if (process.env.NODE_ENV === "production")
|
|
81
81
|
return;
|
|
82
82
|
const n = Array.isArray(t) ? t.join(`
|
|
83
83
|
`) : t;
|
|
84
|
-
|
|
84
|
+
Tt.has(n) || (Tt.add(n), e === "error" ? console.error(n) : console.warn(n));
|
|
85
85
|
}
|
|
86
|
-
function
|
|
87
|
-
return
|
|
86
|
+
function qt(t) {
|
|
87
|
+
return Ln;
|
|
88
88
|
}
|
|
89
|
-
function
|
|
90
|
-
return
|
|
89
|
+
function Un(t) {
|
|
90
|
+
return Ce("MuiSimpleTreeView", t);
|
|
91
91
|
}
|
|
92
|
-
|
|
93
|
-
const
|
|
94
|
-
process.env.NODE_ENV !== "production" && (
|
|
95
|
-
const
|
|
96
|
-
const t =
|
|
92
|
+
ve("MuiSimpleTreeView", ["root", "item", "itemContent", "itemGroupTransition", "itemIconContainer", "itemLabel", "itemCheckbox"]);
|
|
93
|
+
const tt = Object.freeze([]), ye = Object.freeze({}), lt = /* @__PURE__ */ M.createContext(null);
|
|
94
|
+
process.env.NODE_ENV !== "production" && (lt.displayName = "TreeViewContext");
|
|
95
|
+
const be = () => {
|
|
96
|
+
const t = M.useContext(lt);
|
|
97
97
|
if (t == null)
|
|
98
98
|
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(`
|
|
99
99
|
`));
|
|
100
100
|
return t;
|
|
101
|
-
},
|
|
101
|
+
}, at = /* @__PURE__ */ M.createContext({
|
|
102
102
|
classes: {},
|
|
103
103
|
slots: {},
|
|
104
104
|
slotProps: {}
|
|
105
105
|
});
|
|
106
|
-
process.env.NODE_ENV !== "production" && (
|
|
107
|
-
const
|
|
106
|
+
process.env.NODE_ENV !== "production" && (at.displayName = "TreeViewStyleContext");
|
|
107
|
+
const Gt = () => M.useContext(at), Hn = (t) => {
|
|
108
108
|
const {
|
|
109
109
|
store: e,
|
|
110
110
|
apiRef: n,
|
|
111
111
|
rootRef: o
|
|
112
|
-
} = t, r =
|
|
113
|
-
|
|
114
|
-
const s =
|
|
115
|
-
let
|
|
112
|
+
} = t, r = it(() => e.buildPublicAPI()).current;
|
|
113
|
+
qn(r, n);
|
|
114
|
+
const s = M.useCallback((a) => {
|
|
115
|
+
let h = null, d = null;
|
|
116
116
|
const c = [], p = {};
|
|
117
|
-
e.itemPluginManager.listPlugins().forEach((
|
|
118
|
-
const I =
|
|
117
|
+
e.itemPluginManager.listPlugins().forEach((m) => {
|
|
118
|
+
const I = m({
|
|
119
119
|
props: a,
|
|
120
|
-
rootRef:
|
|
120
|
+
rootRef: h,
|
|
121
121
|
contentRef: d
|
|
122
122
|
});
|
|
123
|
-
I?.rootRef && (
|
|
123
|
+
I?.rootRef && (h = I.rootRef), I?.contentRef && (d = I.contentRef), I?.propsEnhancers && (c.push(I.propsEnhancers), Object.keys(I.propsEnhancers).forEach((b) => {
|
|
124
124
|
p[b] = !0;
|
|
125
125
|
}));
|
|
126
126
|
});
|
|
127
|
-
const f = (
|
|
127
|
+
const f = (m) => (I) => {
|
|
128
128
|
const b = {};
|
|
129
|
-
return c.forEach((
|
|
130
|
-
const
|
|
131
|
-
|
|
129
|
+
return c.forEach((x) => {
|
|
130
|
+
const w = x[m];
|
|
131
|
+
w != null && Object.assign(b, w(I));
|
|
132
132
|
}), b;
|
|
133
|
-
}, u = Object.fromEntries(Object.keys(p).map((
|
|
133
|
+
}, u = Object.fromEntries(Object.keys(p).map((m) => [m, f(m)]));
|
|
134
134
|
return {
|
|
135
135
|
contentRef: d,
|
|
136
|
-
rootRef:
|
|
136
|
+
rootRef: h,
|
|
137
137
|
propsEnhancers: u
|
|
138
138
|
};
|
|
139
|
-
}, [e]), l =
|
|
139
|
+
}, [e]), l = M.useCallback(({
|
|
140
140
|
itemId: a,
|
|
141
|
-
children:
|
|
141
|
+
children: h,
|
|
142
142
|
idAttribute: d
|
|
143
143
|
}) => {
|
|
144
|
-
let c =
|
|
144
|
+
let c = h;
|
|
145
145
|
const p = e.itemPluginManager.listWrappers();
|
|
146
146
|
for (let f = p.length - 1; f >= 0; f -= 1) {
|
|
147
147
|
const u = p[f];
|
|
@@ -154,7 +154,7 @@ const Ut = () => O.useContext(it), Wn = (t) => {
|
|
|
154
154
|
}
|
|
155
155
|
return c;
|
|
156
156
|
}, [e]);
|
|
157
|
-
return
|
|
157
|
+
return M.useMemo(() => ({
|
|
158
158
|
runItemPlugins: s,
|
|
159
159
|
wrapItem: l,
|
|
160
160
|
publicAPI: r,
|
|
@@ -162,10 +162,10 @@ const Ut = () => O.useContext(it), Wn = (t) => {
|
|
|
162
162
|
rootRef: o
|
|
163
163
|
}), [s, l, r, e, o]);
|
|
164
164
|
};
|
|
165
|
-
function
|
|
165
|
+
function qn(t, e) {
|
|
166
166
|
e != null && e.current == null && (e.current = t);
|
|
167
167
|
}
|
|
168
|
-
function
|
|
168
|
+
function Gn(t) {
|
|
169
169
|
const {
|
|
170
170
|
store: e,
|
|
171
171
|
apiRef: n,
|
|
@@ -174,11 +174,11 @@ function Un(t) {
|
|
|
174
174
|
slots: s = ye,
|
|
175
175
|
slotProps: l = ye,
|
|
176
176
|
children: a
|
|
177
|
-
} = t,
|
|
177
|
+
} = t, h = Hn({
|
|
178
178
|
store: e,
|
|
179
179
|
apiRef: n,
|
|
180
180
|
rootRef: o
|
|
181
|
-
}), d =
|
|
181
|
+
}), d = M.useMemo(() => ({
|
|
182
182
|
classes: r,
|
|
183
183
|
slots: {
|
|
184
184
|
collapseIcon: s.collapseIcon,
|
|
@@ -191,16 +191,16 @@ function Un(t) {
|
|
|
191
191
|
endIcon: l.endIcon
|
|
192
192
|
}
|
|
193
193
|
}), [r, s.collapseIcon, s.expandIcon, s.endIcon, l.collapseIcon, l.expandIcon, l.endIcon]);
|
|
194
|
-
return /* @__PURE__ */ v(
|
|
195
|
-
value:
|
|
196
|
-
children: /* @__PURE__ */ v(
|
|
194
|
+
return /* @__PURE__ */ v(lt.Provider, {
|
|
195
|
+
value: h,
|
|
196
|
+
children: /* @__PURE__ */ v(at.Provider, {
|
|
197
197
|
value: d,
|
|
198
198
|
children: a
|
|
199
199
|
})
|
|
200
200
|
});
|
|
201
201
|
}
|
|
202
|
-
const
|
|
203
|
-
function
|
|
202
|
+
const Xn = ["apiRef", "slots", "slotProps", "disabledItemsFocusable", "onItemClick", "itemChildrenIndentation", "id", "expandedItems", "defaultExpandedItems", "onExpandedItemsChange", "onItemExpansionToggle", "expansionTrigger", "disableSelection", "selectedItems", "defaultSelectedItems", "multiSelect", "checkboxSelection", "selectionPropagation", "onSelectedItemsChange", "onItemSelectionToggle", "onItemFocus"];
|
|
203
|
+
function Jn(t) {
|
|
204
204
|
const {
|
|
205
205
|
// Props for Provider
|
|
206
206
|
apiRef: e,
|
|
@@ -211,42 +211,42 @@ function qn(t) {
|
|
|
211
211
|
onItemClick: s,
|
|
212
212
|
itemChildrenIndentation: l,
|
|
213
213
|
id: a,
|
|
214
|
-
expandedItems:
|
|
214
|
+
expandedItems: h,
|
|
215
215
|
defaultExpandedItems: d,
|
|
216
216
|
onExpandedItemsChange: c,
|
|
217
217
|
onItemExpansionToggle: p,
|
|
218
218
|
expansionTrigger: f,
|
|
219
219
|
disableSelection: u,
|
|
220
|
-
selectedItems:
|
|
220
|
+
selectedItems: m,
|
|
221
221
|
defaultSelectedItems: I,
|
|
222
222
|
multiSelect: b,
|
|
223
|
-
checkboxSelection:
|
|
224
|
-
selectionPropagation:
|
|
225
|
-
onSelectedItemsChange:
|
|
223
|
+
checkboxSelection: x,
|
|
224
|
+
selectionPropagation: w,
|
|
225
|
+
onSelectedItemsChange: _,
|
|
226
226
|
onItemSelectionToggle: R,
|
|
227
|
-
onItemFocus:
|
|
227
|
+
onItemFocus: F
|
|
228
228
|
// SimpleTreeViewStore parameters
|
|
229
229
|
// Forwarded props
|
|
230
|
-
} = t,
|
|
230
|
+
} = t, C = Be(t, Xn), D = M.useMemo(() => ({
|
|
231
231
|
// Shared parameters
|
|
232
232
|
disabledItemsFocusable: r,
|
|
233
233
|
onItemClick: s,
|
|
234
234
|
itemChildrenIndentation: l,
|
|
235
235
|
id: a,
|
|
236
|
-
expandedItems:
|
|
236
|
+
expandedItems: h,
|
|
237
237
|
defaultExpandedItems: d,
|
|
238
238
|
onExpandedItemsChange: c,
|
|
239
239
|
onItemExpansionToggle: p,
|
|
240
240
|
expansionTrigger: f,
|
|
241
241
|
disableSelection: u,
|
|
242
|
-
selectedItems:
|
|
242
|
+
selectedItems: m,
|
|
243
243
|
defaultSelectedItems: I,
|
|
244
244
|
multiSelect: b,
|
|
245
|
-
checkboxSelection:
|
|
246
|
-
selectionPropagation:
|
|
247
|
-
onSelectedItemsChange:
|
|
245
|
+
checkboxSelection: x,
|
|
246
|
+
selectionPropagation: w,
|
|
247
|
+
onSelectedItemsChange: _,
|
|
248
248
|
onItemSelectionToggle: R,
|
|
249
|
-
onItemFocus:
|
|
249
|
+
onItemFocus: F
|
|
250
250
|
// SimpleTreeViewStore parameters
|
|
251
251
|
}), [
|
|
252
252
|
// Shared parameters
|
|
@@ -254,31 +254,31 @@ function qn(t) {
|
|
|
254
254
|
s,
|
|
255
255
|
l,
|
|
256
256
|
a,
|
|
257
|
-
|
|
257
|
+
h,
|
|
258
258
|
d,
|
|
259
259
|
c,
|
|
260
260
|
p,
|
|
261
261
|
f,
|
|
262
262
|
u,
|
|
263
|
-
|
|
263
|
+
m,
|
|
264
264
|
I,
|
|
265
265
|
b,
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
266
|
+
x,
|
|
267
|
+
w,
|
|
268
|
+
_,
|
|
269
269
|
R,
|
|
270
|
-
|
|
270
|
+
F
|
|
271
271
|
// SimpleTreeViewStore parameters
|
|
272
272
|
]);
|
|
273
273
|
return {
|
|
274
274
|
apiRef: e,
|
|
275
275
|
slots: n,
|
|
276
276
|
slotProps: o,
|
|
277
|
-
parameters:
|
|
278
|
-
forwardedProps:
|
|
277
|
+
parameters: D,
|
|
278
|
+
forwardedProps: C
|
|
279
279
|
};
|
|
280
280
|
}
|
|
281
|
-
var
|
|
281
|
+
var Qn = (t, e, n) => {
|
|
282
282
|
if (e.length === 1 && e[0] === n) {
|
|
283
283
|
let o = !1;
|
|
284
284
|
try {
|
|
@@ -302,7 +302,7 @@ Ensure transformation logic is in the result function, and extraction logic is i
|
|
|
302
302
|
);
|
|
303
303
|
}
|
|
304
304
|
}
|
|
305
|
-
},
|
|
305
|
+
}, Yn = (t, e, n) => {
|
|
306
306
|
const { memoize: o, memoizeOptions: r } = e, { inputSelectorResults: s, inputSelectorResultsCopy: l } = t, a = o(() => ({}), ...r);
|
|
307
307
|
if (!(a.apply(null, s) === a.apply(null, l))) {
|
|
308
308
|
let d;
|
|
@@ -324,19 +324,19 @@ Avoid returning a new reference inside your input selector, e.g.
|
|
|
324
324
|
}
|
|
325
325
|
);
|
|
326
326
|
}
|
|
327
|
-
},
|
|
327
|
+
}, Zn = {
|
|
328
328
|
inputStabilityCheck: "once",
|
|
329
329
|
identityFunctionCheck: "once"
|
|
330
|
-
},
|
|
331
|
-
function
|
|
330
|
+
}, Fe = /* @__PURE__ */ Symbol("NOT_FOUND");
|
|
331
|
+
function eo(t, e = `expected a function, instead received ${typeof t}`) {
|
|
332
332
|
if (typeof t != "function")
|
|
333
333
|
throw new TypeError(e);
|
|
334
334
|
}
|
|
335
|
-
function
|
|
335
|
+
function to(t, e = `expected an object, instead received ${typeof t}`) {
|
|
336
336
|
if (typeof t != "object")
|
|
337
337
|
throw new TypeError(e);
|
|
338
338
|
}
|
|
339
|
-
function
|
|
339
|
+
function no(t, e = "expected all items to be functions, instead received the following types: ") {
|
|
340
340
|
if (!t.every((n) => typeof n == "function")) {
|
|
341
341
|
const n = t.map(
|
|
342
342
|
(o) => typeof o == "function" ? `function ${o.name || "unnamed"}()` : typeof o
|
|
@@ -344,41 +344,41 @@ function Zn(t, e = "expected all items to be functions, instead received the fol
|
|
|
344
344
|
throw new TypeError(`${e}[${n}]`);
|
|
345
345
|
}
|
|
346
346
|
}
|
|
347
|
-
var
|
|
348
|
-
function
|
|
347
|
+
var kt = (t) => Array.isArray(t) ? t : [t];
|
|
348
|
+
function oo(t) {
|
|
349
349
|
const e = Array.isArray(t[0]) ? t[0] : t;
|
|
350
|
-
return
|
|
350
|
+
return no(
|
|
351
351
|
e,
|
|
352
352
|
"createSelector expects all input-selectors to be functions, but received the following types: "
|
|
353
353
|
), e;
|
|
354
354
|
}
|
|
355
|
-
function
|
|
355
|
+
function Ot(t, e) {
|
|
356
356
|
const n = [], { length: o } = t;
|
|
357
357
|
for (let r = 0; r < o; r++)
|
|
358
358
|
n.push(t[r].apply(null, e));
|
|
359
359
|
return n;
|
|
360
360
|
}
|
|
361
|
-
var
|
|
361
|
+
var ro = (t, e) => {
|
|
362
362
|
const { identityFunctionCheck: n, inputStabilityCheck: o } = {
|
|
363
|
-
...
|
|
363
|
+
...Zn,
|
|
364
364
|
...e
|
|
365
365
|
};
|
|
366
366
|
return {
|
|
367
367
|
identityFunctionCheck: {
|
|
368
368
|
shouldRun: n === "always" || n === "once" && t,
|
|
369
|
-
run:
|
|
369
|
+
run: Qn
|
|
370
370
|
},
|
|
371
371
|
inputStabilityCheck: {
|
|
372
372
|
shouldRun: o === "always" || o === "once" && t,
|
|
373
|
-
run:
|
|
373
|
+
run: Yn
|
|
374
374
|
}
|
|
375
375
|
};
|
|
376
376
|
};
|
|
377
|
-
function
|
|
377
|
+
function so(t) {
|
|
378
378
|
let e;
|
|
379
379
|
return {
|
|
380
380
|
get(n) {
|
|
381
|
-
return e && t(e.key, n) ? e.value :
|
|
381
|
+
return e && t(e.key, n) ? e.value : Fe;
|
|
382
382
|
},
|
|
383
383
|
put(n, o) {
|
|
384
384
|
e = { key: n, value: o };
|
|
@@ -391,18 +391,18 @@ function no(t) {
|
|
|
391
391
|
}
|
|
392
392
|
};
|
|
393
393
|
}
|
|
394
|
-
function
|
|
394
|
+
function io(t, e) {
|
|
395
395
|
let n = [];
|
|
396
396
|
function o(a) {
|
|
397
|
-
const
|
|
398
|
-
if (
|
|
399
|
-
const d = n[
|
|
400
|
-
return
|
|
397
|
+
const h = n.findIndex((d) => e(a, d.key));
|
|
398
|
+
if (h > -1) {
|
|
399
|
+
const d = n[h];
|
|
400
|
+
return h > 0 && (n.splice(h, 1), n.unshift(d)), d.value;
|
|
401
401
|
}
|
|
402
|
-
return
|
|
402
|
+
return Fe;
|
|
403
403
|
}
|
|
404
|
-
function r(a,
|
|
405
|
-
o(a) ===
|
|
404
|
+
function r(a, h) {
|
|
405
|
+
o(a) === Fe && (n.unshift({ key: a, value: h }), n.length > t && n.pop());
|
|
406
406
|
}
|
|
407
407
|
function s() {
|
|
408
408
|
return n;
|
|
@@ -412,8 +412,8 @@ function oo(t, e) {
|
|
|
412
412
|
}
|
|
413
413
|
return { get: o, put: r, getEntries: s, clear: l };
|
|
414
414
|
}
|
|
415
|
-
var
|
|
416
|
-
function
|
|
415
|
+
var lo = (t, e) => t === e;
|
|
416
|
+
function ao(t) {
|
|
417
417
|
return function(n, o) {
|
|
418
418
|
if (n === null || o === null || n.length !== o.length)
|
|
419
419
|
return !1;
|
|
@@ -424,131 +424,131 @@ function so(t) {
|
|
|
424
424
|
return !0;
|
|
425
425
|
};
|
|
426
426
|
}
|
|
427
|
-
function
|
|
427
|
+
function co(t, e) {
|
|
428
428
|
const n = typeof e == "object" ? e : { equalityCheck: e }, {
|
|
429
|
-
equalityCheck: o =
|
|
429
|
+
equalityCheck: o = lo,
|
|
430
430
|
maxSize: r = 1,
|
|
431
431
|
resultEqualityCheck: s
|
|
432
|
-
} = n, l =
|
|
432
|
+
} = n, l = ao(o);
|
|
433
433
|
let a = 0;
|
|
434
|
-
const
|
|
434
|
+
const h = r <= 1 ? so(l) : io(r, l);
|
|
435
435
|
function d() {
|
|
436
|
-
let c =
|
|
437
|
-
if (c ===
|
|
436
|
+
let c = h.get(arguments);
|
|
437
|
+
if (c === Fe) {
|
|
438
438
|
if (c = t.apply(null, arguments), a++, s) {
|
|
439
|
-
const f =
|
|
439
|
+
const f = h.getEntries().find(
|
|
440
440
|
(u) => s(u.value, c)
|
|
441
441
|
);
|
|
442
442
|
f && (c = f.value, a !== 0 && a--);
|
|
443
443
|
}
|
|
444
|
-
|
|
444
|
+
h.put(arguments, c);
|
|
445
445
|
}
|
|
446
446
|
return c;
|
|
447
447
|
}
|
|
448
448
|
return d.clearCache = () => {
|
|
449
|
-
|
|
449
|
+
h.clear(), d.resetResultsCount();
|
|
450
450
|
}, d.resultsCount = () => a, d.resetResultsCount = () => {
|
|
451
451
|
a = 0;
|
|
452
452
|
}, d;
|
|
453
453
|
}
|
|
454
|
-
var
|
|
454
|
+
var uo = class {
|
|
455
455
|
constructor(t) {
|
|
456
456
|
this.value = t;
|
|
457
457
|
}
|
|
458
458
|
deref() {
|
|
459
459
|
return this.value;
|
|
460
460
|
}
|
|
461
|
-
},
|
|
462
|
-
function
|
|
461
|
+
}, po = typeof WeakRef < "u" ? WeakRef : uo, fo = 0, Mt = 1;
|
|
462
|
+
function Pe() {
|
|
463
463
|
return {
|
|
464
|
-
s:
|
|
464
|
+
s: fo,
|
|
465
465
|
v: void 0,
|
|
466
466
|
o: null,
|
|
467
467
|
p: null
|
|
468
468
|
};
|
|
469
469
|
}
|
|
470
|
-
function
|
|
471
|
-
let n =
|
|
470
|
+
function Xt(t, e = {}) {
|
|
471
|
+
let n = Pe();
|
|
472
472
|
const { resultEqualityCheck: o } = e;
|
|
473
473
|
let r, s = 0;
|
|
474
474
|
function l() {
|
|
475
475
|
let a = n;
|
|
476
|
-
const { length:
|
|
477
|
-
for (let p = 0, f =
|
|
476
|
+
const { length: h } = arguments;
|
|
477
|
+
for (let p = 0, f = h; p < f; p++) {
|
|
478
478
|
const u = arguments[p];
|
|
479
479
|
if (typeof u == "function" || typeof u == "object" && u !== null) {
|
|
480
|
-
let
|
|
481
|
-
|
|
482
|
-
const I =
|
|
483
|
-
I === void 0 ? (a =
|
|
480
|
+
let m = a.o;
|
|
481
|
+
m === null && (a.o = m = /* @__PURE__ */ new WeakMap());
|
|
482
|
+
const I = m.get(u);
|
|
483
|
+
I === void 0 ? (a = Pe(), m.set(u, a)) : a = I;
|
|
484
484
|
} else {
|
|
485
|
-
let
|
|
486
|
-
|
|
487
|
-
const I =
|
|
488
|
-
I === void 0 ? (a =
|
|
485
|
+
let m = a.p;
|
|
486
|
+
m === null && (a.p = m = /* @__PURE__ */ new Map());
|
|
487
|
+
const I = m.get(u);
|
|
488
|
+
I === void 0 ? (a = Pe(), m.set(u, a)) : a = I;
|
|
489
489
|
}
|
|
490
490
|
}
|
|
491
491
|
const d = a;
|
|
492
492
|
let c;
|
|
493
|
-
if (a.s ===
|
|
493
|
+
if (a.s === Mt)
|
|
494
494
|
c = a.v;
|
|
495
495
|
else if (c = t.apply(null, arguments), s++, o) {
|
|
496
496
|
const p = r?.deref?.() ?? r;
|
|
497
|
-
p != null && o(p, c) && (c = p, s !== 0 && s--), r = typeof c == "object" && c !== null || typeof c == "function" ? new
|
|
497
|
+
p != null && o(p, c) && (c = p, s !== 0 && s--), r = typeof c == "object" && c !== null || typeof c == "function" ? new po(c) : c;
|
|
498
498
|
}
|
|
499
|
-
return d.s =
|
|
499
|
+
return d.s = Mt, d.v = c, c;
|
|
500
500
|
}
|
|
501
501
|
return l.clearCache = () => {
|
|
502
|
-
n =
|
|
502
|
+
n = Pe(), l.resetResultsCount();
|
|
503
503
|
}, l.resultsCount = () => s, l.resetResultsCount = () => {
|
|
504
504
|
s = 0;
|
|
505
505
|
}, l;
|
|
506
506
|
}
|
|
507
|
-
function
|
|
507
|
+
function Jt(t, ...e) {
|
|
508
508
|
const n = typeof t == "function" ? {
|
|
509
509
|
memoize: t,
|
|
510
510
|
memoizeOptions: e
|
|
511
511
|
} : t, o = (...r) => {
|
|
512
|
-
let s = 0, l = 0, a,
|
|
513
|
-
typeof d == "object" && (
|
|
512
|
+
let s = 0, l = 0, a, h = {}, d = r.pop();
|
|
513
|
+
typeof d == "object" && (h = d, d = r.pop()), eo(
|
|
514
514
|
d,
|
|
515
515
|
`createSelector expects an output function after the inputs, but received: [${typeof d}]`
|
|
516
516
|
);
|
|
517
517
|
const c = {
|
|
518
518
|
...n,
|
|
519
|
-
...
|
|
519
|
+
...h
|
|
520
520
|
}, {
|
|
521
521
|
memoize: p,
|
|
522
522
|
memoizeOptions: f = [],
|
|
523
|
-
argsMemoize: u =
|
|
524
|
-
argsMemoizeOptions:
|
|
523
|
+
argsMemoize: u = Xt,
|
|
524
|
+
argsMemoizeOptions: m = [],
|
|
525
525
|
devModeChecks: I = {}
|
|
526
|
-
} = c, b =
|
|
526
|
+
} = c, b = kt(f), x = kt(m), w = oo(r), _ = p(function() {
|
|
527
527
|
return s++, d.apply(
|
|
528
528
|
null,
|
|
529
529
|
arguments
|
|
530
530
|
);
|
|
531
531
|
}, ...b);
|
|
532
532
|
let R = !0;
|
|
533
|
-
const
|
|
533
|
+
const F = u(function() {
|
|
534
534
|
l++;
|
|
535
|
-
const
|
|
536
|
-
|
|
535
|
+
const D = Ot(
|
|
536
|
+
w,
|
|
537
537
|
arguments
|
|
538
538
|
);
|
|
539
|
-
if (a =
|
|
540
|
-
const { identityFunctionCheck:
|
|
541
|
-
if (
|
|
539
|
+
if (a = _.apply(null, D), process.env.NODE_ENV !== "production") {
|
|
540
|
+
const { identityFunctionCheck: V, inputStabilityCheck: j } = ro(R, I);
|
|
541
|
+
if (V.shouldRun && V.run(
|
|
542
542
|
d,
|
|
543
|
-
|
|
543
|
+
D,
|
|
544
544
|
a
|
|
545
|
-
),
|
|
546
|
-
const
|
|
547
|
-
|
|
545
|
+
), j.shouldRun) {
|
|
546
|
+
const E = Ot(
|
|
547
|
+
w,
|
|
548
548
|
arguments
|
|
549
549
|
);
|
|
550
|
-
|
|
551
|
-
{ inputSelectorResults:
|
|
550
|
+
j.run(
|
|
551
|
+
{ inputSelectorResults: D, inputSelectorResultsCopy: E },
|
|
552
552
|
{ memoize: p, memoizeOptions: b },
|
|
553
553
|
arguments
|
|
554
554
|
);
|
|
@@ -556,11 +556,11 @@ function qt(t, ...e) {
|
|
|
556
556
|
R && (R = !1);
|
|
557
557
|
}
|
|
558
558
|
return a;
|
|
559
|
-
}, ...
|
|
560
|
-
return Object.assign(
|
|
559
|
+
}, ...x);
|
|
560
|
+
return Object.assign(F, {
|
|
561
561
|
resultFunc: d,
|
|
562
|
-
memoizedResultFunc:
|
|
563
|
-
dependencies:
|
|
562
|
+
memoizedResultFunc: _,
|
|
563
|
+
dependencies: w,
|
|
564
564
|
dependencyRecomputations: () => l,
|
|
565
565
|
resetDependencyRecomputations: () => {
|
|
566
566
|
l = 0;
|
|
@@ -578,9 +578,9 @@ function qt(t, ...e) {
|
|
|
578
578
|
withTypes: () => o
|
|
579
579
|
}), o;
|
|
580
580
|
}
|
|
581
|
-
var
|
|
582
|
-
(t, e =
|
|
583
|
-
|
|
581
|
+
var ho = /* @__PURE__ */ Jt(Xt), mo = Object.assign(
|
|
582
|
+
(t, e = ho) => {
|
|
583
|
+
to(
|
|
584
584
|
t,
|
|
585
585
|
`createStructuredSelector expects first argument to be an object where each property is a selector, instead received a ${typeof t}`
|
|
586
586
|
);
|
|
@@ -589,96 +589,96 @@ var uo = /* @__PURE__ */ qt(Ht), po = Object.assign(
|
|
|
589
589
|
);
|
|
590
590
|
return e(
|
|
591
591
|
o,
|
|
592
|
-
(...s) => s.reduce((l, a,
|
|
592
|
+
(...s) => s.reduce((l, a, h) => (l[n[h]] = a, l), {})
|
|
593
593
|
);
|
|
594
594
|
},
|
|
595
|
-
{ withTypes: () =>
|
|
595
|
+
{ withTypes: () => mo }
|
|
596
596
|
);
|
|
597
|
-
const
|
|
598
|
-
memoize:
|
|
597
|
+
const Io = Jt({
|
|
598
|
+
memoize: co,
|
|
599
599
|
memoizeOptions: {
|
|
600
600
|
maxSize: 1,
|
|
601
601
|
equalityCheck: Object.is
|
|
602
602
|
}
|
|
603
|
-
}),
|
|
604
|
-
if (
|
|
603
|
+
}), P = (t, e, n, o, r, s, l, a, ...h) => {
|
|
604
|
+
if (h.length > 0)
|
|
605
605
|
throw new Error("Unsupported number of selectors");
|
|
606
606
|
let d;
|
|
607
607
|
if (t && e && n && o && r && s && l && a)
|
|
608
608
|
d = (c, p, f, u) => {
|
|
609
|
-
const
|
|
610
|
-
return a(
|
|
609
|
+
const m = t(c, p, f, u), I = e(c, p, f, u), b = n(c, p, f, u), x = o(c, p, f, u), w = r(c, p, f, u), _ = s(c, p, f, u), R = l(c, p, f, u);
|
|
610
|
+
return a(m, I, b, x, w, _, R, p, f, u);
|
|
611
611
|
};
|
|
612
612
|
else if (t && e && n && o && r && s && l)
|
|
613
613
|
d = (c, p, f, u) => {
|
|
614
|
-
const
|
|
615
|
-
return l(
|
|
614
|
+
const m = t(c, p, f, u), I = e(c, p, f, u), b = n(c, p, f, u), x = o(c, p, f, u), w = r(c, p, f, u), _ = s(c, p, f, u);
|
|
615
|
+
return l(m, I, b, x, w, _, p, f, u);
|
|
616
616
|
};
|
|
617
617
|
else if (t && e && n && o && r && s)
|
|
618
618
|
d = (c, p, f, u) => {
|
|
619
|
-
const
|
|
620
|
-
return s(
|
|
619
|
+
const m = t(c, p, f, u), I = e(c, p, f, u), b = n(c, p, f, u), x = o(c, p, f, u), w = r(c, p, f, u);
|
|
620
|
+
return s(m, I, b, x, w, p, f, u);
|
|
621
621
|
};
|
|
622
622
|
else if (t && e && n && o && r)
|
|
623
623
|
d = (c, p, f, u) => {
|
|
624
|
-
const
|
|
625
|
-
return r(
|
|
624
|
+
const m = t(c, p, f, u), I = e(c, p, f, u), b = n(c, p, f, u), x = o(c, p, f, u);
|
|
625
|
+
return r(m, I, b, x, p, f, u);
|
|
626
626
|
};
|
|
627
627
|
else if (t && e && n && o)
|
|
628
628
|
d = (c, p, f, u) => {
|
|
629
|
-
const
|
|
630
|
-
return o(
|
|
629
|
+
const m = t(c, p, f, u), I = e(c, p, f, u), b = n(c, p, f, u);
|
|
630
|
+
return o(m, I, b, p, f, u);
|
|
631
631
|
};
|
|
632
632
|
else if (t && e && n)
|
|
633
633
|
d = (c, p, f, u) => {
|
|
634
|
-
const
|
|
635
|
-
return n(
|
|
634
|
+
const m = t(c, p, f, u), I = e(c, p, f, u);
|
|
635
|
+
return n(m, I, p, f, u);
|
|
636
636
|
};
|
|
637
637
|
else if (t && e)
|
|
638
638
|
d = (c, p, f, u) => {
|
|
639
|
-
const
|
|
640
|
-
return e(
|
|
639
|
+
const m = t(c, p, f, u);
|
|
640
|
+
return e(m, p, f, u);
|
|
641
641
|
};
|
|
642
642
|
else if (t)
|
|
643
643
|
d = t;
|
|
644
644
|
else
|
|
645
645
|
throw new Error("Missing arguments");
|
|
646
646
|
return d;
|
|
647
|
-
},
|
|
647
|
+
}, go = (t) => (...e) => {
|
|
648
648
|
const n = /* @__PURE__ */ new WeakMap();
|
|
649
649
|
let o = 1;
|
|
650
650
|
const r = e[e.length - 1], s = e.length - 1 || 1, l = Math.max(r.length - s, 0);
|
|
651
651
|
if (l > 3)
|
|
652
652
|
throw new Error("Unsupported number of arguments");
|
|
653
|
-
return (
|
|
654
|
-
let f =
|
|
653
|
+
return (h, d, c, p) => {
|
|
654
|
+
let f = h.__cacheKey__;
|
|
655
655
|
f || (f = {
|
|
656
656
|
id: o
|
|
657
|
-
},
|
|
657
|
+
}, h.__cacheKey__ = f, o += 1);
|
|
658
658
|
let u = n.get(f);
|
|
659
659
|
if (!u) {
|
|
660
|
-
const
|
|
660
|
+
const m = e.length === 1 ? [(x) => x, r] : e;
|
|
661
661
|
let I = e;
|
|
662
662
|
const b = [void 0, void 0, void 0];
|
|
663
663
|
switch (l) {
|
|
664
664
|
case 0:
|
|
665
665
|
break;
|
|
666
666
|
case 1: {
|
|
667
|
-
I = [...
|
|
667
|
+
I = [...m.slice(0, -1), () => b[0], r];
|
|
668
668
|
break;
|
|
669
669
|
}
|
|
670
670
|
case 2: {
|
|
671
|
-
I = [...
|
|
671
|
+
I = [...m.slice(0, -1), () => b[0], () => b[1], r];
|
|
672
672
|
break;
|
|
673
673
|
}
|
|
674
674
|
case 3: {
|
|
675
|
-
I = [...
|
|
675
|
+
I = [...m.slice(0, -1), () => b[0], () => b[1], () => b[2], r];
|
|
676
676
|
break;
|
|
677
677
|
}
|
|
678
678
|
default:
|
|
679
679
|
throw new Error("Unsupported number of arguments");
|
|
680
680
|
}
|
|
681
|
-
u =
|
|
681
|
+
u = Io(...I), u.selectorArgs = b, n.set(f, u);
|
|
682
682
|
}
|
|
683
683
|
switch (l) {
|
|
684
684
|
case 3:
|
|
@@ -690,45 +690,45 @@ const fo = qt({
|
|
|
690
690
|
}
|
|
691
691
|
switch (l) {
|
|
692
692
|
case 0:
|
|
693
|
-
return u(
|
|
693
|
+
return u(h);
|
|
694
694
|
case 1:
|
|
695
|
-
return u(
|
|
695
|
+
return u(h, d);
|
|
696
696
|
case 2:
|
|
697
|
-
return u(
|
|
697
|
+
return u(h, d, c);
|
|
698
698
|
case 3:
|
|
699
|
-
return u(
|
|
699
|
+
return u(h, d, c, p);
|
|
700
700
|
default:
|
|
701
701
|
throw new Error("unreachable");
|
|
702
702
|
}
|
|
703
703
|
};
|
|
704
|
-
},
|
|
705
|
-
var
|
|
706
|
-
var
|
|
707
|
-
function
|
|
708
|
-
if (
|
|
709
|
-
|
|
710
|
-
var t =
|
|
704
|
+
}, Te = go();
|
|
705
|
+
var Re = { exports: {} }, He = {};
|
|
706
|
+
var Pt;
|
|
707
|
+
function bo() {
|
|
708
|
+
if (Pt) return He;
|
|
709
|
+
Pt = 1;
|
|
710
|
+
var t = $e;
|
|
711
711
|
function e(p, f) {
|
|
712
712
|
return p === f && (p !== 0 || 1 / p === 1 / f) || p !== p && f !== f;
|
|
713
713
|
}
|
|
714
714
|
var n = typeof Object.is == "function" ? Object.is : e, o = t.useState, r = t.useEffect, s = t.useLayoutEffect, l = t.useDebugValue;
|
|
715
715
|
function a(p, f) {
|
|
716
|
-
var u = f(),
|
|
716
|
+
var u = f(), m = o({ inst: { value: u, getSnapshot: f } }), I = m[0].inst, b = m[1];
|
|
717
717
|
return s(
|
|
718
718
|
function() {
|
|
719
|
-
I.value = u, I.getSnapshot = f,
|
|
719
|
+
I.value = u, I.getSnapshot = f, h(I) && b({ inst: I });
|
|
720
720
|
},
|
|
721
721
|
[p, u, f]
|
|
722
722
|
), r(
|
|
723
723
|
function() {
|
|
724
|
-
return
|
|
725
|
-
|
|
724
|
+
return h(I) && b({ inst: I }), p(function() {
|
|
725
|
+
h(I) && b({ inst: I });
|
|
726
726
|
});
|
|
727
727
|
},
|
|
728
728
|
[p]
|
|
729
729
|
), l(u), u;
|
|
730
730
|
}
|
|
731
|
-
function
|
|
731
|
+
function h(p) {
|
|
732
732
|
var f = p.getSnapshot;
|
|
733
733
|
p = p.value;
|
|
734
734
|
try {
|
|
@@ -742,192 +742,192 @@ function ho() {
|
|
|
742
742
|
return f();
|
|
743
743
|
}
|
|
744
744
|
var c = typeof window > "u" || typeof window.document > "u" || typeof window.document.createElement > "u" ? d : a;
|
|
745
|
-
return
|
|
745
|
+
return He.useSyncExternalStore = t.useSyncExternalStore !== void 0 ? t.useSyncExternalStore : c, He;
|
|
746
746
|
}
|
|
747
|
-
var
|
|
748
|
-
var
|
|
749
|
-
function
|
|
750
|
-
return
|
|
751
|
-
function t(u,
|
|
752
|
-
return u ===
|
|
747
|
+
var qe = {};
|
|
748
|
+
var Rt;
|
|
749
|
+
function So() {
|
|
750
|
+
return Rt || (Rt = 1, process.env.NODE_ENV !== "production" && (function() {
|
|
751
|
+
function t(u, m) {
|
|
752
|
+
return u === m && (u !== 0 || 1 / u === 1 / m) || u !== u && m !== m;
|
|
753
753
|
}
|
|
754
|
-
function e(u,
|
|
754
|
+
function e(u, m) {
|
|
755
755
|
c || r.startTransition === void 0 || (c = !0, console.error(
|
|
756
756
|
"You are using an outdated, pre-release alpha of React 18 that does not support useSyncExternalStore. The use-sync-external-store shim will not work correctly. Upgrade to a newer pre-release."
|
|
757
757
|
));
|
|
758
|
-
var I =
|
|
758
|
+
var I = m();
|
|
759
759
|
if (!p) {
|
|
760
|
-
var b =
|
|
760
|
+
var b = m();
|
|
761
761
|
s(I, b) || (console.error(
|
|
762
762
|
"The result of getSnapshot should be cached to avoid an infinite loop"
|
|
763
763
|
), p = !0);
|
|
764
764
|
}
|
|
765
765
|
b = l({
|
|
766
|
-
inst: { value: I, getSnapshot:
|
|
766
|
+
inst: { value: I, getSnapshot: m }
|
|
767
767
|
});
|
|
768
|
-
var
|
|
769
|
-
return
|
|
768
|
+
var x = b[0].inst, w = b[1];
|
|
769
|
+
return h(
|
|
770
770
|
function() {
|
|
771
|
-
|
|
771
|
+
x.value = I, x.getSnapshot = m, n(x) && w({ inst: x });
|
|
772
772
|
},
|
|
773
|
-
[u, I,
|
|
773
|
+
[u, I, m]
|
|
774
774
|
), a(
|
|
775
775
|
function() {
|
|
776
|
-
return n(
|
|
777
|
-
n(
|
|
776
|
+
return n(x) && w({ inst: x }), u(function() {
|
|
777
|
+
n(x) && w({ inst: x });
|
|
778
778
|
});
|
|
779
779
|
},
|
|
780
780
|
[u]
|
|
781
781
|
), d(I), I;
|
|
782
782
|
}
|
|
783
783
|
function n(u) {
|
|
784
|
-
var
|
|
784
|
+
var m = u.getSnapshot;
|
|
785
785
|
u = u.value;
|
|
786
786
|
try {
|
|
787
|
-
var I =
|
|
787
|
+
var I = m();
|
|
788
788
|
return !s(u, I);
|
|
789
789
|
} catch {
|
|
790
790
|
return !0;
|
|
791
791
|
}
|
|
792
792
|
}
|
|
793
|
-
function o(u,
|
|
794
|
-
return
|
|
793
|
+
function o(u, m) {
|
|
794
|
+
return m();
|
|
795
795
|
}
|
|
796
796
|
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ < "u" && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart == "function" && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());
|
|
797
|
-
var r =
|
|
798
|
-
|
|
799
|
-
})()),
|
|
797
|
+
var r = $e, s = typeof Object.is == "function" ? Object.is : t, l = r.useState, a = r.useEffect, h = r.useLayoutEffect, d = r.useDebugValue, c = !1, p = !1, f = typeof window > "u" || typeof window.document > "u" || typeof window.document.createElement > "u" ? o : e;
|
|
798
|
+
qe.useSyncExternalStore = r.useSyncExternalStore !== void 0 ? r.useSyncExternalStore : f, typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ < "u" && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop == "function" && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error());
|
|
799
|
+
})()), qe;
|
|
800
800
|
}
|
|
801
|
-
var
|
|
802
|
-
function
|
|
803
|
-
return
|
|
801
|
+
var Lt;
|
|
802
|
+
function ct() {
|
|
803
|
+
return Lt || (Lt = 1, process.env.NODE_ENV === "production" ? Re.exports = bo() : Re.exports = So()), Re.exports;
|
|
804
804
|
}
|
|
805
|
-
var
|
|
806
|
-
var
|
|
807
|
-
function
|
|
808
|
-
if (
|
|
809
|
-
|
|
810
|
-
var t =
|
|
805
|
+
var yo = ct(), Le = { exports: {} }, Ge = {};
|
|
806
|
+
var Dt;
|
|
807
|
+
function xo() {
|
|
808
|
+
if (Dt) return Ge;
|
|
809
|
+
Dt = 1;
|
|
810
|
+
var t = $e, e = ct();
|
|
811
811
|
function n(d, c) {
|
|
812
812
|
return d === c && (d !== 0 || 1 / d === 1 / c) || d !== d && c !== c;
|
|
813
813
|
}
|
|
814
|
-
var o = typeof Object.is == "function" ? Object.is : n, r = e.useSyncExternalStore, s = t.useRef, l = t.useEffect, a = t.useMemo,
|
|
815
|
-
return
|
|
816
|
-
var
|
|
817
|
-
if (
|
|
814
|
+
var o = typeof Object.is == "function" ? Object.is : n, r = e.useSyncExternalStore, s = t.useRef, l = t.useEffect, a = t.useMemo, h = t.useDebugValue;
|
|
815
|
+
return Ge.useSyncExternalStoreWithSelector = function(d, c, p, f, u) {
|
|
816
|
+
var m = s(null);
|
|
817
|
+
if (m.current === null) {
|
|
818
818
|
var I = { hasValue: !1, value: null };
|
|
819
|
-
|
|
820
|
-
} else I =
|
|
821
|
-
|
|
819
|
+
m.current = I;
|
|
820
|
+
} else I = m.current;
|
|
821
|
+
m = a(
|
|
822
822
|
function() {
|
|
823
|
-
function C
|
|
824
|
-
if (!
|
|
825
|
-
if (
|
|
826
|
-
var
|
|
827
|
-
if (u(
|
|
828
|
-
return R =
|
|
823
|
+
function x(C) {
|
|
824
|
+
if (!w) {
|
|
825
|
+
if (w = !0, _ = C, C = f(C), u !== void 0 && I.hasValue) {
|
|
826
|
+
var D = I.value;
|
|
827
|
+
if (u(D, C))
|
|
828
|
+
return R = D;
|
|
829
829
|
}
|
|
830
|
-
return R =
|
|
830
|
+
return R = C;
|
|
831
831
|
}
|
|
832
|
-
if (
|
|
833
|
-
var
|
|
834
|
-
return u !== void 0 && u(
|
|
832
|
+
if (D = R, o(_, C)) return D;
|
|
833
|
+
var V = f(C);
|
|
834
|
+
return u !== void 0 && u(D, V) ? (_ = C, D) : (_ = C, R = V);
|
|
835
835
|
}
|
|
836
|
-
var
|
|
836
|
+
var w = !1, _, R, F = p === void 0 ? null : p;
|
|
837
837
|
return [
|
|
838
838
|
function() {
|
|
839
|
-
return
|
|
839
|
+
return x(c());
|
|
840
840
|
},
|
|
841
|
-
|
|
842
|
-
return
|
|
841
|
+
F === null ? void 0 : function() {
|
|
842
|
+
return x(F());
|
|
843
843
|
}
|
|
844
844
|
];
|
|
845
845
|
},
|
|
846
846
|
[c, p, f, u]
|
|
847
847
|
);
|
|
848
|
-
var b = r(d,
|
|
848
|
+
var b = r(d, m[0], m[1]);
|
|
849
849
|
return l(
|
|
850
850
|
function() {
|
|
851
851
|
I.hasValue = !0, I.value = b;
|
|
852
852
|
},
|
|
853
853
|
[b]
|
|
854
|
-
),
|
|
855
|
-
},
|
|
854
|
+
), h(b), b;
|
|
855
|
+
}, Ge;
|
|
856
856
|
}
|
|
857
|
-
var
|
|
858
|
-
var
|
|
859
|
-
function
|
|
860
|
-
return
|
|
857
|
+
var Xe = {};
|
|
858
|
+
var _t;
|
|
859
|
+
function Eo() {
|
|
860
|
+
return _t || (_t = 1, process.env.NODE_ENV !== "production" && (function() {
|
|
861
861
|
function t(d, c) {
|
|
862
862
|
return d === c && (d !== 0 || 1 / d === 1 / c) || d !== d && c !== c;
|
|
863
863
|
}
|
|
864
864
|
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ < "u" && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart == "function" && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());
|
|
865
|
-
var e =
|
|
866
|
-
|
|
867
|
-
var
|
|
868
|
-
if (
|
|
865
|
+
var e = $e, n = ct(), o = typeof Object.is == "function" ? Object.is : t, r = n.useSyncExternalStore, s = e.useRef, l = e.useEffect, a = e.useMemo, h = e.useDebugValue;
|
|
866
|
+
Xe.useSyncExternalStoreWithSelector = function(d, c, p, f, u) {
|
|
867
|
+
var m = s(null);
|
|
868
|
+
if (m.current === null) {
|
|
869
869
|
var I = { hasValue: !1, value: null };
|
|
870
|
-
|
|
871
|
-
} else I =
|
|
872
|
-
|
|
870
|
+
m.current = I;
|
|
871
|
+
} else I = m.current;
|
|
872
|
+
m = a(
|
|
873
873
|
function() {
|
|
874
|
-
function C
|
|
875
|
-
if (!
|
|
876
|
-
if (
|
|
877
|
-
var
|
|
878
|
-
if (u(
|
|
879
|
-
return R =
|
|
874
|
+
function x(C) {
|
|
875
|
+
if (!w) {
|
|
876
|
+
if (w = !0, _ = C, C = f(C), u !== void 0 && I.hasValue) {
|
|
877
|
+
var D = I.value;
|
|
878
|
+
if (u(D, C))
|
|
879
|
+
return R = D;
|
|
880
880
|
}
|
|
881
|
-
return R =
|
|
881
|
+
return R = C;
|
|
882
882
|
}
|
|
883
|
-
if (
|
|
884
|
-
return
|
|
885
|
-
var
|
|
886
|
-
return u !== void 0 && u(
|
|
883
|
+
if (D = R, o(_, C))
|
|
884
|
+
return D;
|
|
885
|
+
var V = f(C);
|
|
886
|
+
return u !== void 0 && u(D, V) ? (_ = C, D) : (_ = C, R = V);
|
|
887
887
|
}
|
|
888
|
-
var
|
|
888
|
+
var w = !1, _, R, F = p === void 0 ? null : p;
|
|
889
889
|
return [
|
|
890
890
|
function() {
|
|
891
|
-
return
|
|
891
|
+
return x(c());
|
|
892
892
|
},
|
|
893
|
-
|
|
894
|
-
return
|
|
893
|
+
F === null ? void 0 : function() {
|
|
894
|
+
return x(F());
|
|
895
895
|
}
|
|
896
896
|
];
|
|
897
897
|
},
|
|
898
898
|
[c, p, f, u]
|
|
899
899
|
);
|
|
900
|
-
var b = r(d,
|
|
900
|
+
var b = r(d, m[0], m[1]);
|
|
901
901
|
return l(
|
|
902
902
|
function() {
|
|
903
903
|
I.hasValue = !0, I.value = b;
|
|
904
904
|
},
|
|
905
905
|
[b]
|
|
906
|
-
),
|
|
906
|
+
), h(b), b;
|
|
907
907
|
}, typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ < "u" && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop == "function" && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error());
|
|
908
|
-
})()),
|
|
908
|
+
})()), Xe;
|
|
909
909
|
}
|
|
910
|
-
var
|
|
911
|
-
function
|
|
912
|
-
return
|
|
910
|
+
var At;
|
|
911
|
+
function Co() {
|
|
912
|
+
return At || (At = 1, process.env.NODE_ENV === "production" ? Le.exports = xo() : Le.exports = Eo()), Le.exports;
|
|
913
913
|
}
|
|
914
|
-
var
|
|
915
|
-
const
|
|
916
|
-
function
|
|
917
|
-
return
|
|
914
|
+
var vo = Co();
|
|
915
|
+
const wo = parseInt(M.version, 10), To = wo >= 19, ko = To ? Oo : Mo;
|
|
916
|
+
function W(t, e, n, o, r) {
|
|
917
|
+
return ko(t, e, n, o, r);
|
|
918
918
|
}
|
|
919
|
-
function
|
|
920
|
-
const s =
|
|
921
|
-
return
|
|
919
|
+
function Oo(t, e, n, o, r) {
|
|
920
|
+
const s = M.useCallback(() => e(t.getSnapshot(), n, o, r), [t, e, n, o, r]);
|
|
921
|
+
return yo.useSyncExternalStore(t.subscribe, s, s);
|
|
922
922
|
}
|
|
923
|
-
function
|
|
924
|
-
return
|
|
923
|
+
function Mo(t, e, n, o, r) {
|
|
924
|
+
return vo.useSyncExternalStoreWithSelector(t.subscribe, t.getSnapshot, t.getSnapshot, (s) => e(s, n, o, r));
|
|
925
925
|
}
|
|
926
|
-
class
|
|
926
|
+
class dt {
|
|
927
927
|
// HACK: `any` fixes adding listeners that accept partial state.
|
|
928
928
|
// Internal state to handle recursive `setState()` calls
|
|
929
929
|
static create(e) {
|
|
930
|
-
return new
|
|
930
|
+
return new dt(e);
|
|
931
931
|
}
|
|
932
932
|
constructor(e) {
|
|
933
933
|
this.state = e, this.listeners = /* @__PURE__ */ new Set(), this.updateTick = 0;
|
|
@@ -963,25 +963,25 @@ class at {
|
|
|
963
963
|
[e]: n
|
|
964
964
|
}));
|
|
965
965
|
}
|
|
966
|
-
use = (e, n, o, r) =>
|
|
966
|
+
use = (e, n, o, r) => W(this, e, n, o, r);
|
|
967
967
|
}
|
|
968
|
-
const
|
|
968
|
+
const Nt = P((t) => t.providedTreeId ?? t.treeId), ke = {
|
|
969
969
|
/**
|
|
970
970
|
* Get the id attribute of the tree view.
|
|
971
971
|
*/
|
|
972
|
-
treeId:
|
|
972
|
+
treeId: Nt,
|
|
973
973
|
/**
|
|
974
974
|
* Generate the id attribute (i.e.: the `id` attribute passed to the DOM element) of a Tree Item.
|
|
975
975
|
* If the user explicitly defined an id attribute, it will be returned.
|
|
976
976
|
* Otherwise, the method creates a unique id for the item based on the Tree View id attribute and the item `itemId`
|
|
977
977
|
*/
|
|
978
|
-
treeItemIdAttribute:
|
|
979
|
-
},
|
|
978
|
+
treeItemIdAttribute: P(Nt, (t, e, n) => n ?? `${t ?? ""}-${e}`)
|
|
979
|
+
}, se = "__TREE_VIEW_ROOT_PARENT_ID__", Qt = (t) => {
|
|
980
980
|
const e = {};
|
|
981
981
|
return t.forEach((n, o) => {
|
|
982
982
|
e[n] = o;
|
|
983
983
|
}), e;
|
|
984
|
-
},
|
|
984
|
+
}, Ve = (t, e) => {
|
|
985
985
|
if (e == null)
|
|
986
986
|
return !1;
|
|
987
987
|
let n = t[e];
|
|
@@ -997,7 +997,7 @@ const Dt = M((t) => t.providedTreeId ?? t.treeId), Te = {
|
|
|
997
997
|
}
|
|
998
998
|
return !1;
|
|
999
999
|
};
|
|
1000
|
-
function
|
|
1000
|
+
function Ft(t) {
|
|
1001
1001
|
const {
|
|
1002
1002
|
storeParameters: e,
|
|
1003
1003
|
items: n,
|
|
@@ -1005,26 +1005,26 @@ function _t(t) {
|
|
|
1005
1005
|
depth: r,
|
|
1006
1006
|
isItemExpandable: s,
|
|
1007
1007
|
otherItemsMetaLookup: l
|
|
1008
|
-
} = t, a = {},
|
|
1008
|
+
} = t, a = {}, h = {}, d = [], c = [], p = (f) => {
|
|
1009
1009
|
const u = e.getItemId ? e.getItemId(f) : f.id;
|
|
1010
|
-
|
|
1010
|
+
Po({
|
|
1011
1011
|
id: u,
|
|
1012
1012
|
parentId: o,
|
|
1013
1013
|
item: f,
|
|
1014
1014
|
itemMetaLookup: l,
|
|
1015
1015
|
siblingsMetaLookup: a
|
|
1016
1016
|
});
|
|
1017
|
-
const
|
|
1018
|
-
if (
|
|
1017
|
+
const m = e.getItemLabel ? e.getItemLabel(f) : f.label;
|
|
1018
|
+
if (m == null)
|
|
1019
1019
|
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(`
|
|
1020
1020
|
`));
|
|
1021
1021
|
const I = (e.getItemChildren ? e.getItemChildren(f) : f.children) || [];
|
|
1022
1022
|
c.push({
|
|
1023
1023
|
id: u,
|
|
1024
1024
|
children: I
|
|
1025
|
-
}),
|
|
1025
|
+
}), h[u] = f, a[u] = {
|
|
1026
1026
|
id: u,
|
|
1027
|
-
label:
|
|
1027
|
+
label: m,
|
|
1028
1028
|
parentId: o,
|
|
1029
1029
|
idAttribute: void 0,
|
|
1030
1030
|
expandable: s(f, I),
|
|
@@ -1037,13 +1037,13 @@ function _t(t) {
|
|
|
1037
1037
|
p(f);
|
|
1038
1038
|
return {
|
|
1039
1039
|
metaLookup: a,
|
|
1040
|
-
modelLookup:
|
|
1040
|
+
modelLookup: h,
|
|
1041
1041
|
orderedChildrenIds: d,
|
|
1042
|
-
childrenIndexes:
|
|
1042
|
+
childrenIndexes: Qt(d),
|
|
1043
1043
|
itemsChildren: c
|
|
1044
1044
|
};
|
|
1045
1045
|
}
|
|
1046
|
-
function
|
|
1046
|
+
function Po({
|
|
1047
1047
|
id: t,
|
|
1048
1048
|
parentId: e,
|
|
1049
1049
|
item: n,
|
|
@@ -1058,64 +1058,64 @@ function ko({
|
|
|
1058
1058
|
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: "${t}"`].join(`
|
|
1059
1059
|
`));
|
|
1060
1060
|
}
|
|
1061
|
-
const
|
|
1061
|
+
const Ro = [], y = {
|
|
1062
1062
|
/**
|
|
1063
1063
|
* Gets the DOM structure of the Tree View.
|
|
1064
1064
|
*/
|
|
1065
|
-
domStructure:
|
|
1065
|
+
domStructure: P((t) => t.domStructure),
|
|
1066
1066
|
/**
|
|
1067
1067
|
* Checks whether the disabled items are focusable.
|
|
1068
1068
|
*/
|
|
1069
|
-
disabledItemFocusable:
|
|
1069
|
+
disabledItemFocusable: P((t) => t.disabledItemsFocusable),
|
|
1070
1070
|
/**
|
|
1071
1071
|
* Gets the meta-information of all items.
|
|
1072
1072
|
*/
|
|
1073
|
-
itemMetaLookup:
|
|
1073
|
+
itemMetaLookup: P((t) => t.itemMetaLookup),
|
|
1074
1074
|
/**
|
|
1075
1075
|
* Gets the ordered children ids of all items.
|
|
1076
1076
|
*/
|
|
1077
|
-
itemOrderedChildrenIdsLookup:
|
|
1077
|
+
itemOrderedChildrenIdsLookup: P((t) => t.itemOrderedChildrenIdsLookup),
|
|
1078
1078
|
/**
|
|
1079
1079
|
* Gets the meta-information of an item.
|
|
1080
1080
|
*/
|
|
1081
|
-
itemMeta:
|
|
1081
|
+
itemMeta: P((t, e) => t.itemMetaLookup[e ?? se] ?? null),
|
|
1082
1082
|
/**
|
|
1083
1083
|
* Gets the ordered children ids of an item.
|
|
1084
1084
|
*/
|
|
1085
|
-
itemOrderedChildrenIds:
|
|
1085
|
+
itemOrderedChildrenIds: P((t, e) => t.itemOrderedChildrenIdsLookup[e ?? se] ?? Ro),
|
|
1086
1086
|
/**
|
|
1087
1087
|
* Gets the model of an item.
|
|
1088
1088
|
*/
|
|
1089
|
-
itemModel:
|
|
1089
|
+
itemModel: P((t, e) => t.itemModelLookup[e]),
|
|
1090
1090
|
/**
|
|
1091
1091
|
* Checks whether an item is disabled.
|
|
1092
1092
|
*/
|
|
1093
|
-
isItemDisabled:
|
|
1093
|
+
isItemDisabled: P((t, e) => Ve(t.itemMetaLookup, e)),
|
|
1094
1094
|
/**
|
|
1095
1095
|
* Gets the index of an item in its parent's children.
|
|
1096
1096
|
*/
|
|
1097
|
-
itemIndex:
|
|
1097
|
+
itemIndex: P((t, e) => {
|
|
1098
1098
|
const n = t.itemMetaLookup[e];
|
|
1099
|
-
return n == null ? -1 : t.itemChildrenIndexesLookup[n.parentId ??
|
|
1099
|
+
return n == null ? -1 : t.itemChildrenIndexesLookup[n.parentId ?? se][n.id];
|
|
1100
1100
|
}),
|
|
1101
1101
|
/**
|
|
1102
1102
|
* Gets the id of an item's parent.
|
|
1103
1103
|
*/
|
|
1104
|
-
itemParentId:
|
|
1104
|
+
itemParentId: P((t, e) => t.itemMetaLookup[e]?.parentId ?? null),
|
|
1105
1105
|
/**
|
|
1106
1106
|
* Gets the depth of an item (items at the root level have a depth of 0).
|
|
1107
1107
|
*/
|
|
1108
|
-
itemDepth:
|
|
1108
|
+
itemDepth: P((t, e) => t.itemMetaLookup[e]?.depth ?? 0),
|
|
1109
1109
|
/**
|
|
1110
1110
|
* Checks whether an item can be focused.
|
|
1111
1111
|
*/
|
|
1112
|
-
canItemBeFocused:
|
|
1112
|
+
canItemBeFocused: P((t, e) => t.disabledItemsFocusable || !Ve(t.itemMetaLookup, e)),
|
|
1113
1113
|
/**
|
|
1114
1114
|
* Gets the identation between an item and its children.
|
|
1115
1115
|
*/
|
|
1116
|
-
itemChildrenIndentation:
|
|
1116
|
+
itemChildrenIndentation: P((t) => t.itemChildrenIndentation)
|
|
1117
1117
|
};
|
|
1118
|
-
class
|
|
1118
|
+
class De {
|
|
1119
1119
|
// We can't type `store`, otherwise we get the following TS error:
|
|
1120
1120
|
// 'items' implicitly has type 'any' because it does not have a type annotation and is referenced directly or indirectly in its own initializer.
|
|
1121
1121
|
constructor(e) {
|
|
@@ -1133,22 +1133,22 @@ class Le {
|
|
|
1133
1133
|
*/
|
|
1134
1134
|
static buildItemsStateIfNeeded = (e) => {
|
|
1135
1135
|
const n = {}, o = {}, r = {}, s = {};
|
|
1136
|
-
function l(a,
|
|
1137
|
-
const c =
|
|
1136
|
+
function l(a, h, d) {
|
|
1137
|
+
const c = h ?? se, {
|
|
1138
1138
|
metaLookup: p,
|
|
1139
1139
|
modelLookup: f,
|
|
1140
1140
|
orderedChildrenIds: u,
|
|
1141
|
-
childrenIndexes:
|
|
1141
|
+
childrenIndexes: m,
|
|
1142
1142
|
itemsChildren: I
|
|
1143
|
-
} =
|
|
1143
|
+
} = Ft({
|
|
1144
1144
|
storeParameters: e,
|
|
1145
1145
|
items: a,
|
|
1146
|
-
parentId:
|
|
1146
|
+
parentId: h,
|
|
1147
1147
|
depth: d,
|
|
1148
|
-
isItemExpandable: (b,
|
|
1148
|
+
isItemExpandable: (b, x) => !!x && x.length > 0,
|
|
1149
1149
|
otherItemsMetaLookup: n
|
|
1150
1150
|
});
|
|
1151
|
-
Object.assign(n, p), Object.assign(o, f), r[c] = u, s[c] =
|
|
1151
|
+
Object.assign(n, p), Object.assign(o, f), r[c] = u, s[c] = m;
|
|
1152
1152
|
for (const b of I)
|
|
1153
1153
|
l(b.children || [], b.id, d + 1);
|
|
1154
1154
|
}
|
|
@@ -1165,17 +1165,17 @@ class Le {
|
|
|
1165
1165
|
* @param {TreeViewItemId} itemId The id of the item to retrieve.
|
|
1166
1166
|
* @returns {R} The item with the given id.
|
|
1167
1167
|
*/
|
|
1168
|
-
getItem = (e) =>
|
|
1168
|
+
getItem = (e) => y.itemModel(this.store.state, e);
|
|
1169
1169
|
/**
|
|
1170
1170
|
* Get all the items in the same format as provided by `props.items`.
|
|
1171
1171
|
* @returns {R[]} The items in the tree.
|
|
1172
1172
|
*/
|
|
1173
1173
|
getItemTree = () => {
|
|
1174
1174
|
const e = (n) => {
|
|
1175
|
-
const o =
|
|
1175
|
+
const o = y.itemModel(this.store.state, n), r = S({}, o), s = y.itemOrderedChildrenIds(this.store.state, n);
|
|
1176
1176
|
return s.length > 0 ? r.children = s.map(e) : delete r.children, r;
|
|
1177
1177
|
};
|
|
1178
|
-
return
|
|
1178
|
+
return y.itemOrderedChildrenIds(this.store.state, null).map(e);
|
|
1179
1179
|
};
|
|
1180
1180
|
/**
|
|
1181
1181
|
* Get the ids of a given item's children.
|
|
@@ -1184,12 +1184,12 @@ class Le {
|
|
|
1184
1184
|
* @param {TreeViewItemId | null} itemId The id of the item to get the children of.
|
|
1185
1185
|
* @returns {TreeViewItemId[]} The ids of the item's children.
|
|
1186
1186
|
*/
|
|
1187
|
-
getItemOrderedChildrenIds = (e) =>
|
|
1187
|
+
getItemOrderedChildrenIds = (e) => y.itemOrderedChildrenIds(this.store.state, e);
|
|
1188
1188
|
/** * Get the id of the parent item.
|
|
1189
1189
|
* @param {TreeViewItemId} itemId The id of the item to whose parentId we want to retrieve.
|
|
1190
1190
|
* @returns {TreeViewItemId | null} The id of the parent item.
|
|
1191
1191
|
*/
|
|
1192
|
-
getParentId = (e) =>
|
|
1192
|
+
getParentId = (e) => y.itemMeta(this.store.state, e)?.parentId || null;
|
|
1193
1193
|
/**
|
|
1194
1194
|
* Toggle the disabled state of the item with the given id.
|
|
1195
1195
|
* @param {object} parameters The params of the method.
|
|
@@ -1221,10 +1221,10 @@ class Le {
|
|
|
1221
1221
|
* @returns {HTMLElement | null} The DOM element of the item with the given id.
|
|
1222
1222
|
*/
|
|
1223
1223
|
getItemDOMElement = (e) => {
|
|
1224
|
-
const n =
|
|
1224
|
+
const n = y.itemMeta(this.store.state, e);
|
|
1225
1225
|
if (n == null)
|
|
1226
1226
|
return null;
|
|
1227
|
-
const o =
|
|
1227
|
+
const o = ke.treeItemIdAttribute(this.store.state, e, n.idAttribute);
|
|
1228
1228
|
return document.getElementById(o);
|
|
1229
1229
|
};
|
|
1230
1230
|
/**
|
|
@@ -1236,24 +1236,24 @@ class Le {
|
|
|
1236
1236
|
parentId: n,
|
|
1237
1237
|
getChildrenCount: o
|
|
1238
1238
|
}) => {
|
|
1239
|
-
const r = n ??
|
|
1239
|
+
const r = n ?? se, s = n == null ? -1 : y.itemDepth(this.store.state, n), {
|
|
1240
1240
|
metaLookup: l,
|
|
1241
1241
|
modelLookup: a,
|
|
1242
|
-
orderedChildrenIds:
|
|
1242
|
+
orderedChildrenIds: h,
|
|
1243
1243
|
childrenIndexes: d
|
|
1244
|
-
} =
|
|
1244
|
+
} = Ft({
|
|
1245
1245
|
storeParameters: this.store.parameters,
|
|
1246
1246
|
items: e,
|
|
1247
1247
|
parentId: n,
|
|
1248
1248
|
depth: s + 1,
|
|
1249
1249
|
isItemExpandable: o ? (c) => o(c) !== 0 : () => !1,
|
|
1250
|
-
otherItemsMetaLookup:
|
|
1250
|
+
otherItemsMetaLookup: y.itemMetaLookup(this.store.state)
|
|
1251
1251
|
});
|
|
1252
1252
|
this.store.update({
|
|
1253
1253
|
itemModelLookup: S({}, this.store.state.itemModelLookup, a),
|
|
1254
1254
|
itemMetaLookup: S({}, this.store.state.itemMetaLookup, l),
|
|
1255
1255
|
itemOrderedChildrenIdsLookup: S({}, this.store.state.itemOrderedChildrenIdsLookup, {
|
|
1256
|
-
[r]:
|
|
1256
|
+
[r]: h
|
|
1257
1257
|
}),
|
|
1258
1258
|
itemChildrenIndexesLookup: S({}, this.store.state.itemChildrenIndexesLookup, {
|
|
1259
1259
|
[r]: d
|
|
@@ -1265,12 +1265,12 @@ class Le {
|
|
|
1265
1265
|
* @param {TreeViewItemId | null} parentId The id of the item to remove the children of.
|
|
1266
1266
|
*/
|
|
1267
1267
|
removeChildren = (e) => {
|
|
1268
|
-
const n = this.store.state.itemMetaLookup, o = Object.keys(n).reduce((a,
|
|
1269
|
-
const d = n[
|
|
1268
|
+
const n = this.store.state.itemMetaLookup, o = Object.keys(n).reduce((a, h) => {
|
|
1269
|
+
const d = n[h];
|
|
1270
1270
|
return d.parentId === e ? a : S({}, a, {
|
|
1271
1271
|
[d.id]: d
|
|
1272
1272
|
});
|
|
1273
|
-
}, {}), r = S({}, this.store.state.itemOrderedChildrenIdsLookup), s = S({}, this.store.state.itemChildrenIndexesLookup), l = e ??
|
|
1273
|
+
}, {}), r = S({}, this.store.state.itemOrderedChildrenIdsLookup), s = S({}, this.store.state.itemChildrenIndexesLookup), l = e ?? se;
|
|
1274
1274
|
delete s[l], delete r[l], this.store.update({
|
|
1275
1275
|
itemMetaLookup: o,
|
|
1276
1276
|
itemOrderedChildrenIdsLookup: r,
|
|
@@ -1286,73 +1286,73 @@ class Le {
|
|
|
1286
1286
|
this.store.parameters.onItemClick?.(e, n);
|
|
1287
1287
|
};
|
|
1288
1288
|
}
|
|
1289
|
-
const
|
|
1289
|
+
const Yt = Te((t) => t.selectedItems, (t) => Array.isArray(t) ? t : t != null ? [t] : []), Vt = Te(Yt, (t) => {
|
|
1290
1290
|
const e = /* @__PURE__ */ new Map();
|
|
1291
1291
|
return t.forEach((n) => {
|
|
1292
1292
|
e.set(n, !0);
|
|
1293
1293
|
}), e;
|
|
1294
|
-
}),
|
|
1294
|
+
}), Je = P((t, e) => t.itemMetaLookup[e]?.selectable ?? !0), N = {
|
|
1295
1295
|
/**
|
|
1296
1296
|
* Gets the selected items as provided to the component.
|
|
1297
1297
|
*/
|
|
1298
|
-
selectedItemsRaw:
|
|
1298
|
+
selectedItemsRaw: P((t) => t.selectedItems),
|
|
1299
1299
|
/**
|
|
1300
1300
|
* Gets the selected items as an array.
|
|
1301
1301
|
*/
|
|
1302
|
-
selectedItems:
|
|
1302
|
+
selectedItems: Yt,
|
|
1303
1303
|
/**
|
|
1304
1304
|
* Gets the selected items as a Map.
|
|
1305
1305
|
*/
|
|
1306
|
-
selectedItemsMap:
|
|
1306
|
+
selectedItemsMap: Vt,
|
|
1307
1307
|
/**
|
|
1308
1308
|
* Checks whether selection is enabled.
|
|
1309
1309
|
*/
|
|
1310
|
-
enabled:
|
|
1310
|
+
enabled: P((t) => !t.disableSelection),
|
|
1311
1311
|
/**
|
|
1312
1312
|
* Checks whether multi selection is enabled.
|
|
1313
1313
|
*/
|
|
1314
|
-
isMultiSelectEnabled:
|
|
1314
|
+
isMultiSelectEnabled: P((t) => t.multiSelect),
|
|
1315
1315
|
/**
|
|
1316
1316
|
* Checks whether checkbox selection is enabled.
|
|
1317
1317
|
*/
|
|
1318
|
-
isCheckboxSelectionEnabled:
|
|
1318
|
+
isCheckboxSelectionEnabled: P((t) => t.checkboxSelection),
|
|
1319
1319
|
/**
|
|
1320
1320
|
* Gets the selection propagation rules.
|
|
1321
1321
|
*/
|
|
1322
|
-
propagationRules:
|
|
1322
|
+
propagationRules: P((t) => t.selectionPropagation),
|
|
1323
1323
|
/**
|
|
1324
1324
|
* Checks whether an item is selected.
|
|
1325
1325
|
*/
|
|
1326
|
-
isItemSelected:
|
|
1326
|
+
isItemSelected: P(Vt, (t, e) => t.has(e)),
|
|
1327
1327
|
/**
|
|
1328
1328
|
* Checks whether the selection feature is enabled for an item.
|
|
1329
1329
|
* Returns `true` when selection is enabled on the Tree View and the item is selectable (even if the item is disabled).
|
|
1330
1330
|
*/
|
|
1331
|
-
isFeatureEnabledForItem:
|
|
1331
|
+
isFeatureEnabledForItem: P(Je, (t) => !t.disableSelection, (t, e, n) => e && t),
|
|
1332
1332
|
/**
|
|
1333
1333
|
* Checks whether an item can be selected (if selection is enabled, if the item is not disabled, and if the item is selectable).
|
|
1334
1334
|
*/
|
|
1335
|
-
canItemBeSelected:
|
|
1335
|
+
canItemBeSelected: P(y.isItemDisabled, Je, (t) => !t.disableSelection, (t, e, n, o) => n && !t && e),
|
|
1336
1336
|
/**
|
|
1337
1337
|
* Checks whether an item is selectable based on the `isItemSelectionDisabled` prop.
|
|
1338
1338
|
*/
|
|
1339
|
-
isItemSelectable:
|
|
1340
|
-
},
|
|
1341
|
-
if (
|
|
1339
|
+
isItemSelectable: Je
|
|
1340
|
+
}, Lo = P((t, e) => {
|
|
1341
|
+
if (N.isItemSelected(t, e))
|
|
1342
1342
|
return "checked";
|
|
1343
1343
|
let n = !1, o = !1;
|
|
1344
1344
|
const r = (l) => {
|
|
1345
|
-
l !== e && (
|
|
1345
|
+
l !== e && (N.isItemSelected(t, l) ? n = !0 : o = !0), y.itemOrderedChildrenIds(t, l).forEach(r);
|
|
1346
1346
|
};
|
|
1347
|
-
return r(e),
|
|
1348
|
-
}),
|
|
1347
|
+
return r(e), N.propagationRules(t).parents ? n && o ? "indeterminate" : n && !o ? "checked" : "empty" : n ? "indeterminate" : "empty";
|
|
1348
|
+
}), Do = ({
|
|
1349
1349
|
props: t
|
|
1350
1350
|
}) => {
|
|
1351
1351
|
const {
|
|
1352
1352
|
itemId: e
|
|
1353
1353
|
} = t, {
|
|
1354
1354
|
store: n
|
|
1355
|
-
} =
|
|
1355
|
+
} = be(), o = W(n, N.isCheckboxSelectionEnabled), r = W(n, N.isFeatureEnabledForItem, e), s = W(n, N.canItemBeSelected, e), l = W(n, Lo, e);
|
|
1356
1356
|
return {
|
|
1357
1357
|
propsEnhancers: {
|
|
1358
1358
|
root: () => {
|
|
@@ -1363,11 +1363,11 @@ const Xt = we((t) => t.selectedItems, (t) => Array.isArray(t) ? t : t != null ?
|
|
|
1363
1363
|
},
|
|
1364
1364
|
checkbox: ({
|
|
1365
1365
|
externalEventHandlers: a,
|
|
1366
|
-
interactions:
|
|
1366
|
+
interactions: h
|
|
1367
1367
|
}) => ({
|
|
1368
1368
|
tabIndex: -1,
|
|
1369
1369
|
onChange: (c) => {
|
|
1370
|
-
a.onChange?.(c), !c.defaultMuiPrevented &&
|
|
1370
|
+
a.onChange?.(c), !c.defaultMuiPrevented && N.canItemBeSelected(n.state, e) && h.handleCheckboxSelection(c);
|
|
1371
1371
|
},
|
|
1372
1372
|
visible: o && r,
|
|
1373
1373
|
disabled: !s,
|
|
@@ -1376,24 +1376,24 @@ const Xt = we((t) => t.selectedItems, (t) => Array.isArray(t) ? t : t != null ?
|
|
|
1376
1376
|
})
|
|
1377
1377
|
}
|
|
1378
1378
|
};
|
|
1379
|
-
},
|
|
1379
|
+
}, Qe = Te((t) => t.expandedItems, (t) => {
|
|
1380
1380
|
const e = /* @__PURE__ */ new Map();
|
|
1381
1381
|
return t.forEach((n) => {
|
|
1382
1382
|
e.set(n, !0);
|
|
1383
1383
|
}), e;
|
|
1384
|
-
}),
|
|
1384
|
+
}), H = {
|
|
1385
1385
|
/**
|
|
1386
1386
|
* Gets the expanded items as provided to the component.
|
|
1387
1387
|
*/
|
|
1388
|
-
expandedItemsRaw:
|
|
1388
|
+
expandedItemsRaw: P((t) => t.expandedItems),
|
|
1389
1389
|
/**
|
|
1390
1390
|
* Gets the expanded items as a Map.
|
|
1391
1391
|
*/
|
|
1392
|
-
expandedItemsMap:
|
|
1392
|
+
expandedItemsMap: Qe,
|
|
1393
1393
|
/**
|
|
1394
1394
|
* Gets the items to render as a flat list (the descendants of an expanded item are listed as siblings of the item).
|
|
1395
1395
|
*/
|
|
1396
|
-
flatList:
|
|
1396
|
+
flatList: Te(y.itemOrderedChildrenIdsLookup, Qe, (t, e) => {
|
|
1397
1397
|
function n(o) {
|
|
1398
1398
|
if (!e.has(o))
|
|
1399
1399
|
return [o];
|
|
@@ -1402,115 +1402,115 @@ const Xt = we((t) => t.selectedItems, (t) => Array.isArray(t) ? t : t != null ?
|
|
|
1402
1402
|
r.push(...n(l));
|
|
1403
1403
|
return r;
|
|
1404
1404
|
}
|
|
1405
|
-
return (t[
|
|
1405
|
+
return (t[se] ?? []).flatMap(n);
|
|
1406
1406
|
}),
|
|
1407
1407
|
/**
|
|
1408
1408
|
* Gets the slot that triggers the item's expansion when clicked.
|
|
1409
1409
|
*/
|
|
1410
|
-
triggerSlot:
|
|
1410
|
+
triggerSlot: P((t) => t.expansionTrigger),
|
|
1411
1411
|
/**
|
|
1412
1412
|
* Checks whether an item is expanded.
|
|
1413
1413
|
*/
|
|
1414
|
-
isItemExpanded:
|
|
1414
|
+
isItemExpanded: P(Qe, (t, e) => t.has(e)),
|
|
1415
1415
|
/**
|
|
1416
1416
|
* Checks whether an item is expandable.
|
|
1417
1417
|
*/
|
|
1418
|
-
isItemExpandable:
|
|
1419
|
-
},
|
|
1418
|
+
isItemExpandable: P(y.itemMeta, (t, e) => t?.expandable ?? !1)
|
|
1419
|
+
}, nt = (t, e) => {
|
|
1420
1420
|
let n = e.length - 1;
|
|
1421
|
-
for (; n >= 0 && !
|
|
1421
|
+
for (; n >= 0 && !y.canItemBeFocused(t, e[n]); )
|
|
1422
1422
|
n -= 1;
|
|
1423
1423
|
if (n !== -1)
|
|
1424
1424
|
return e[n];
|
|
1425
|
-
},
|
|
1426
|
-
const n =
|
|
1425
|
+
}, Zt = (t, e) => {
|
|
1426
|
+
const n = y.itemMeta(t, e);
|
|
1427
1427
|
if (!n)
|
|
1428
1428
|
return null;
|
|
1429
|
-
const o =
|
|
1429
|
+
const o = y.itemOrderedChildrenIds(t, n.parentId), r = y.itemIndex(t, e);
|
|
1430
1430
|
if (r === 0)
|
|
1431
1431
|
return n.parentId;
|
|
1432
1432
|
let s = r - 1;
|
|
1433
|
-
for (; !
|
|
1433
|
+
for (; !y.canItemBeFocused(t, o[s]) && s >= 0; )
|
|
1434
1434
|
s -= 1;
|
|
1435
1435
|
if (s === -1)
|
|
1436
|
-
return n.parentId == null ? null :
|
|
1437
|
-
let l = o[s], a =
|
|
1438
|
-
for (;
|
|
1439
|
-
l = a, a =
|
|
1436
|
+
return n.parentId == null ? null : Zt(t, n.parentId);
|
|
1437
|
+
let l = o[s], a = nt(t, y.itemOrderedChildrenIds(t, l));
|
|
1438
|
+
for (; H.isItemExpanded(t, l) && a != null; )
|
|
1439
|
+
l = a, a = nt(t, y.itemOrderedChildrenIds(t, l));
|
|
1440
1440
|
return l;
|
|
1441
|
-
},
|
|
1442
|
-
if (
|
|
1443
|
-
const o =
|
|
1441
|
+
}, _e = (t, e) => {
|
|
1442
|
+
if (H.isItemExpanded(t, e)) {
|
|
1443
|
+
const o = y.itemOrderedChildrenIds(t, e).find((r) => y.canItemBeFocused(t, r));
|
|
1444
1444
|
if (o != null)
|
|
1445
1445
|
return o;
|
|
1446
1446
|
}
|
|
1447
|
-
let n =
|
|
1447
|
+
let n = y.itemMeta(t, e);
|
|
1448
1448
|
for (; n != null; ) {
|
|
1449
|
-
const o =
|
|
1449
|
+
const o = y.itemOrderedChildrenIds(t, n.parentId), r = y.itemIndex(t, n.id);
|
|
1450
1450
|
if (r < o.length - 1) {
|
|
1451
1451
|
let s = r + 1;
|
|
1452
|
-
for (; !
|
|
1452
|
+
for (; !y.canItemBeFocused(t, o[s]) && s < o.length - 1; )
|
|
1453
1453
|
s += 1;
|
|
1454
|
-
if (
|
|
1454
|
+
if (y.canItemBeFocused(t, o[s]))
|
|
1455
1455
|
return o[s];
|
|
1456
1456
|
}
|
|
1457
|
-
n =
|
|
1457
|
+
n = y.itemMeta(t, n.parentId);
|
|
1458
1458
|
}
|
|
1459
1459
|
return null;
|
|
1460
|
-
},
|
|
1460
|
+
}, en = (t) => {
|
|
1461
1461
|
let e = null;
|
|
1462
|
-
for (; e == null ||
|
|
1463
|
-
const n =
|
|
1462
|
+
for (; e == null || H.isItemExpanded(t, e); ) {
|
|
1463
|
+
const n = y.itemOrderedChildrenIds(t, e), o = nt(t, n);
|
|
1464
1464
|
if (o == null)
|
|
1465
1465
|
return e;
|
|
1466
1466
|
e = o;
|
|
1467
1467
|
}
|
|
1468
1468
|
return e;
|
|
1469
|
-
},
|
|
1469
|
+
}, ze = (t) => y.itemOrderedChildrenIds(t, null).find((e) => y.canItemBeFocused(t, e)), tn = (t, e, n) => {
|
|
1470
1470
|
if (e === n)
|
|
1471
1471
|
return [e, n];
|
|
1472
|
-
const o =
|
|
1472
|
+
const o = y.itemMeta(t, e), r = y.itemMeta(t, n);
|
|
1473
1473
|
if (!o || !r)
|
|
1474
1474
|
return [e, n];
|
|
1475
1475
|
if (o.parentId === r.id || r.parentId === o.id)
|
|
1476
1476
|
return r.parentId === o.id ? [o.id, r.id] : [r.id, o.id];
|
|
1477
1477
|
const s = [o.id], l = [r.id];
|
|
1478
|
-
let a = o.parentId,
|
|
1478
|
+
let a = o.parentId, h = r.parentId, d = l.indexOf(a) !== -1, c = s.indexOf(h) !== -1, p = !0, f = !0;
|
|
1479
1479
|
for (; !c && !d; )
|
|
1480
|
-
p && (s.push(a), d = l.indexOf(a) !== -1, p = a !== null, !d && p && (a =
|
|
1481
|
-
const u = d ? a :
|
|
1482
|
-
return
|
|
1483
|
-
},
|
|
1484
|
-
const o = (
|
|
1485
|
-
if (
|
|
1486
|
-
return
|
|
1487
|
-
let d =
|
|
1480
|
+
p && (s.push(a), d = l.indexOf(a) !== -1, p = a !== null, !d && p && (a = y.itemParentId(t, a))), f && !d && (l.push(h), c = s.indexOf(h) !== -1, f = h !== null, !c && f && (h = y.itemParentId(t, h)));
|
|
1481
|
+
const u = d ? a : h, m = y.itemOrderedChildrenIds(t, u), I = s[s.indexOf(u) - 1], b = l[l.indexOf(u) - 1];
|
|
1482
|
+
return m.indexOf(I) < m.indexOf(b) ? [e, n] : [n, e];
|
|
1483
|
+
}, _o = (t, e, n) => {
|
|
1484
|
+
const o = (h) => {
|
|
1485
|
+
if (H.isItemExpandable(t, h) && H.isItemExpanded(t, h))
|
|
1486
|
+
return y.itemOrderedChildrenIds(t, h)[0];
|
|
1487
|
+
let d = y.itemMeta(t, h);
|
|
1488
1488
|
for (; d != null; ) {
|
|
1489
|
-
const c =
|
|
1489
|
+
const c = y.itemOrderedChildrenIds(t, d.parentId), p = y.itemIndex(t, d.id);
|
|
1490
1490
|
if (p < c.length - 1)
|
|
1491
1491
|
return c[p + 1];
|
|
1492
|
-
d = d.parentId ?
|
|
1492
|
+
d = d.parentId ? y.itemMeta(t, d.parentId) : null;
|
|
1493
1493
|
}
|
|
1494
1494
|
throw new Error("Invalid range");
|
|
1495
|
-
}, [r, s] =
|
|
1495
|
+
}, [r, s] = tn(t, e, n), l = [r];
|
|
1496
1496
|
let a = r;
|
|
1497
1497
|
for (; a !== s; )
|
|
1498
|
-
a = o(a),
|
|
1498
|
+
a = o(a), y.isItemDisabled(t, a) || l.push(a);
|
|
1499
1499
|
return l;
|
|
1500
|
-
},
|
|
1501
|
-
let e =
|
|
1500
|
+
}, Ao = (t) => {
|
|
1501
|
+
let e = ze(t);
|
|
1502
1502
|
const n = [];
|
|
1503
1503
|
for (; e != null; )
|
|
1504
|
-
n.push(e), e =
|
|
1504
|
+
n.push(e), e = _e(t, e);
|
|
1505
1505
|
return n;
|
|
1506
|
-
},
|
|
1507
|
-
class
|
|
1506
|
+
}, ot = (t, e) => e !== t.closest('*[role="treeitem"]');
|
|
1507
|
+
class No {
|
|
1508
1508
|
lastSelectedItem = null;
|
|
1509
1509
|
lastSelectedRange = {};
|
|
1510
1510
|
// We can't type `store`, otherwise we get the following TS error:
|
|
1511
1511
|
// 'selection' implicitly has type 'any' because it does not have a type annotation and is referenced directly or indirectly in its own initializer.
|
|
1512
1512
|
constructor(e) {
|
|
1513
|
-
this.store = e, e.itemPluginManager.register(
|
|
1513
|
+
this.store = e, e.itemPluginManager.register(Do, null);
|
|
1514
1514
|
}
|
|
1515
1515
|
setSelectedItems = (e, n, o) => {
|
|
1516
1516
|
const {
|
|
@@ -1518,37 +1518,37 @@ class Do {
|
|
|
1518
1518
|
selectedItems: s,
|
|
1519
1519
|
onItemSelectionToggle: l,
|
|
1520
1520
|
onSelectedItemsChange: a
|
|
1521
|
-
} = this.store.parameters,
|
|
1521
|
+
} = this.store.parameters, h = N.selectedItemsRaw(this.store.state);
|
|
1522
1522
|
let d;
|
|
1523
|
-
const c =
|
|
1524
|
-
if (c && (r.descendants || r.parents) ? d =
|
|
1523
|
+
const c = N.isMultiSelectEnabled(this.store.state);
|
|
1524
|
+
if (c && (r.descendants || r.parents) ? d = Fo({
|
|
1525
1525
|
store: this.store,
|
|
1526
1526
|
selectionPropagation: r,
|
|
1527
1527
|
newModel: n,
|
|
1528
|
-
oldModel:
|
|
1528
|
+
oldModel: h,
|
|
1529
1529
|
additionalItemsToPropagate: o
|
|
1530
1530
|
}) : d = n, l)
|
|
1531
1531
|
if (c) {
|
|
1532
|
-
const p =
|
|
1532
|
+
const p = nn({
|
|
1533
1533
|
store: this.store,
|
|
1534
1534
|
newModel: d,
|
|
1535
|
-
oldModel:
|
|
1535
|
+
oldModel: h
|
|
1536
1536
|
});
|
|
1537
1537
|
l && (p.added.forEach((f) => {
|
|
1538
1538
|
l(e, f, !0);
|
|
1539
1539
|
}), p.removed.forEach((f) => {
|
|
1540
1540
|
l(e, f, !1);
|
|
1541
1541
|
}));
|
|
1542
|
-
} else d !==
|
|
1542
|
+
} else d !== h && (h != null && l(e, h, !1), d != null && l(e, d, !0));
|
|
1543
1543
|
s === void 0 && this.store.set("selectedItems", d), a?.(e, d);
|
|
1544
1544
|
};
|
|
1545
1545
|
selectRange = (e, [n, o]) => {
|
|
1546
|
-
if (!
|
|
1546
|
+
if (!N.isMultiSelectEnabled(this.store.state))
|
|
1547
1547
|
return;
|
|
1548
|
-
let s =
|
|
1548
|
+
let s = N.selectedItems(this.store.state).slice();
|
|
1549
1549
|
Object.keys(this.lastSelectedRange).length > 0 && (s = s.filter((d) => !this.lastSelectedRange[d]));
|
|
1550
|
-
const l =
|
|
1551
|
-
s = s.concat(
|
|
1550
|
+
const l = Ae(s), a = _o(this.store.state, n, o).filter((d) => N.isItemSelectable(this.store.state, d)), h = a.filter((d) => !l[d]);
|
|
1551
|
+
s = s.concat(h), this.setSelectedItems(e, s), this.lastSelectedRange = Ae(a);
|
|
1552
1552
|
};
|
|
1553
1553
|
buildPublicAPI = () => ({
|
|
1554
1554
|
setItemSelection: this.setItemSelection
|
|
@@ -1567,15 +1567,15 @@ class Do {
|
|
|
1567
1567
|
keepExistingSelection: o = !1,
|
|
1568
1568
|
shouldBeSelected: r
|
|
1569
1569
|
}) => {
|
|
1570
|
-
if (!
|
|
1570
|
+
if (!N.enabled(this.store.state))
|
|
1571
1571
|
return;
|
|
1572
1572
|
let s;
|
|
1573
|
-
const l =
|
|
1573
|
+
const l = N.isMultiSelectEnabled(this.store.state);
|
|
1574
1574
|
if (o) {
|
|
1575
|
-
const a =
|
|
1576
|
-
|
|
1575
|
+
const a = N.selectedItems(this.store.state), h = N.isItemSelected(this.store.state, e);
|
|
1576
|
+
h && (r === !1 || r == null) ? s = a.filter((d) => d !== e) : !h && (r === !0 || r == null) ? s = [e].concat(a) : s = a;
|
|
1577
1577
|
} else
|
|
1578
|
-
r === !1 || r == null &&
|
|
1578
|
+
r === !1 || r == null && N.isItemSelected(this.store.state, e) ? s = l ? [] : null : s = l ? [e] : e;
|
|
1579
1579
|
this.setSelectedItems(
|
|
1580
1580
|
n,
|
|
1581
1581
|
s,
|
|
@@ -1589,10 +1589,10 @@ class Do {
|
|
|
1589
1589
|
* @param {React.SyntheticEvent} event The DOM event that triggered the change.
|
|
1590
1590
|
*/
|
|
1591
1591
|
selectAllNavigableItems = (e) => {
|
|
1592
|
-
if (!
|
|
1592
|
+
if (!N.isMultiSelectEnabled(this.store.state))
|
|
1593
1593
|
return;
|
|
1594
|
-
const o =
|
|
1595
|
-
this.setSelectedItems(e, o), this.lastSelectedRange =
|
|
1594
|
+
const o = Ao(this.store.state);
|
|
1595
|
+
this.setSelectedItems(e, o), this.lastSelectedRange = Ae(o);
|
|
1596
1596
|
};
|
|
1597
1597
|
/**
|
|
1598
1598
|
* Expand the current selection range up to the given item.
|
|
@@ -1601,7 +1601,7 @@ class Do {
|
|
|
1601
1601
|
*/
|
|
1602
1602
|
expandSelectionRange = (e, n) => {
|
|
1603
1603
|
if (this.lastSelectedItem != null) {
|
|
1604
|
-
const [o, r] =
|
|
1604
|
+
const [o, r] = tn(this.store.state, n, this.lastSelectedItem);
|
|
1605
1605
|
this.selectRange(e, [o, r]);
|
|
1606
1606
|
}
|
|
1607
1607
|
};
|
|
@@ -1611,7 +1611,7 @@ class Do {
|
|
|
1611
1611
|
* @param {TreeViewItemId} itemId The id of the item up to which the selection range should be expanded.
|
|
1612
1612
|
*/
|
|
1613
1613
|
selectRangeFromStartToItem = (e, n) => {
|
|
1614
|
-
this.selectRange(e, [
|
|
1614
|
+
this.selectRange(e, [ze(this.store.state), n]);
|
|
1615
1615
|
};
|
|
1616
1616
|
/**
|
|
1617
1617
|
* Expand the current selection range from the given item to the last navigable item.
|
|
@@ -1619,7 +1619,7 @@ class Do {
|
|
|
1619
1619
|
* @param {TreeViewItemId} itemId The id of the item from which the selection range should be expanded.
|
|
1620
1620
|
*/
|
|
1621
1621
|
selectRangeFromItemToEnd = (e, n) => {
|
|
1622
|
-
this.selectRange(e, [n,
|
|
1622
|
+
this.selectRange(e, [n, en(this.store.state)]);
|
|
1623
1623
|
};
|
|
1624
1624
|
/**
|
|
1625
1625
|
* Update the selection when navigating with ArrowUp / ArrowDown keys.
|
|
@@ -1628,16 +1628,16 @@ class Do {
|
|
|
1628
1628
|
* @param {TreeViewItemId} nextItemId The id of the active item after the keyboard navigation.
|
|
1629
1629
|
*/
|
|
1630
1630
|
selectItemFromArrowNavigation = (e, n, o) => {
|
|
1631
|
-
if (!
|
|
1631
|
+
if (!N.isMultiSelectEnabled(this.store.state))
|
|
1632
1632
|
return;
|
|
1633
|
-
let s =
|
|
1633
|
+
let s = N.selectedItems(this.store.state).slice();
|
|
1634
1634
|
Object.keys(this.lastSelectedRange).length === 0 ? (s.push(o), this.lastSelectedRange = {
|
|
1635
1635
|
[n]: !0,
|
|
1636
1636
|
[o]: !0
|
|
1637
1637
|
}) : (this.lastSelectedRange[n] || (this.lastSelectedRange = {}), this.lastSelectedRange[o] ? (s = s.filter((l) => l !== n), delete this.lastSelectedRange[n]) : (s.push(o), this.lastSelectedRange[o] = !0)), this.setSelectedItems(e, s);
|
|
1638
1638
|
};
|
|
1639
1639
|
}
|
|
1640
|
-
function
|
|
1640
|
+
function Fo({
|
|
1641
1641
|
store: t,
|
|
1642
1642
|
selectionPropagation: e,
|
|
1643
1643
|
newModel: n,
|
|
@@ -1647,44 +1647,44 @@ function _o({
|
|
|
1647
1647
|
if (!e.descendants && !e.parents)
|
|
1648
1648
|
return n;
|
|
1649
1649
|
let s = !1;
|
|
1650
|
-
const l =
|
|
1650
|
+
const l = Ae(n), a = nn({
|
|
1651
1651
|
store: t,
|
|
1652
1652
|
newModel: n,
|
|
1653
1653
|
oldModel: o
|
|
1654
1654
|
});
|
|
1655
|
-
return r?.forEach((
|
|
1656
|
-
l[
|
|
1657
|
-
}), a.added.forEach((
|
|
1655
|
+
return r?.forEach((h) => {
|
|
1656
|
+
l[h] ? a.added.includes(h) || a.added.push(h) : a.removed.includes(h) || a.removed.push(h);
|
|
1657
|
+
}), a.added.forEach((h) => {
|
|
1658
1658
|
if (e.descendants) {
|
|
1659
1659
|
const d = (c) => {
|
|
1660
|
-
c !==
|
|
1660
|
+
c !== h && (s = !0, l[c] = !0), y.itemOrderedChildrenIds(t.state, c).forEach(d);
|
|
1661
1661
|
};
|
|
1662
|
-
d(
|
|
1662
|
+
d(h);
|
|
1663
1663
|
}
|
|
1664
1664
|
if (e.parents) {
|
|
1665
|
-
const d = (p) => l[p] ?
|
|
1666
|
-
const f =
|
|
1665
|
+
const d = (p) => l[p] ? y.itemOrderedChildrenIds(t.state, p).every(d) : !1, c = (p) => {
|
|
1666
|
+
const f = y.itemParentId(t.state, p);
|
|
1667
1667
|
if (f == null)
|
|
1668
1668
|
return;
|
|
1669
|
-
|
|
1669
|
+
y.itemOrderedChildrenIds(t.state, f).every(d) && (s = !0, l[f] = !0, c(f));
|
|
1670
1670
|
};
|
|
1671
|
-
c(
|
|
1671
|
+
c(h);
|
|
1672
1672
|
}
|
|
1673
|
-
}), a.removed.forEach((
|
|
1673
|
+
}), a.removed.forEach((h) => {
|
|
1674
1674
|
if (e.parents) {
|
|
1675
|
-
let d =
|
|
1675
|
+
let d = y.itemParentId(t.state, h);
|
|
1676
1676
|
for (; d != null; )
|
|
1677
|
-
l[d] && (s = !0, delete l[d]), d =
|
|
1677
|
+
l[d] && (s = !0, delete l[d]), d = y.itemParentId(t.state, d);
|
|
1678
1678
|
}
|
|
1679
1679
|
if (e.descendants) {
|
|
1680
1680
|
const d = (c) => {
|
|
1681
|
-
c !==
|
|
1681
|
+
c !== h && (s = !0, delete l[c]), y.itemOrderedChildrenIds(t.state, c).forEach(d);
|
|
1682
1682
|
};
|
|
1683
|
-
d(
|
|
1683
|
+
d(h);
|
|
1684
1684
|
}
|
|
1685
1685
|
}), s ? Object.keys(l) : n;
|
|
1686
1686
|
}
|
|
1687
|
-
function
|
|
1687
|
+
function nn({
|
|
1688
1688
|
store: t,
|
|
1689
1689
|
oldModel: e,
|
|
1690
1690
|
newModel: n
|
|
@@ -1693,18 +1693,18 @@ function Zt({
|
|
|
1693
1693
|
return n.forEach((r) => {
|
|
1694
1694
|
o.set(r, !0);
|
|
1695
1695
|
}), {
|
|
1696
|
-
added: n.filter((r) => !
|
|
1696
|
+
added: n.filter((r) => !N.isItemSelected(t.state, r)),
|
|
1697
1697
|
removed: e.filter((r) => !o.has(r))
|
|
1698
1698
|
};
|
|
1699
1699
|
}
|
|
1700
|
-
function
|
|
1700
|
+
function Ae(t) {
|
|
1701
1701
|
const e = {};
|
|
1702
1702
|
return t.forEach((n) => {
|
|
1703
1703
|
e[n] = !0;
|
|
1704
1704
|
}), e;
|
|
1705
1705
|
}
|
|
1706
|
-
function
|
|
1707
|
-
const o =
|
|
1706
|
+
function Vo(t, e, n) {
|
|
1707
|
+
const o = W(t, ke.treeId), r = W(t, y.itemChildrenIndentation), s = W(t, N.isMultiSelectEnabled);
|
|
1708
1708
|
return (l) => S({
|
|
1709
1709
|
ref: n,
|
|
1710
1710
|
role: "tree",
|
|
@@ -1722,12 +1722,12 @@ function Ao(t, e, n) {
|
|
|
1722
1722
|
}
|
|
1723
1723
|
});
|
|
1724
1724
|
}
|
|
1725
|
-
function
|
|
1725
|
+
function zo(t) {
|
|
1726
1726
|
return t.replace(/["\\]/g, "\\$&");
|
|
1727
1727
|
}
|
|
1728
|
-
const
|
|
1729
|
-
process.env.NODE_ENV !== "production" && (
|
|
1730
|
-
function
|
|
1728
|
+
const ut = /* @__PURE__ */ M.createContext(null);
|
|
1729
|
+
process.env.NODE_ENV !== "production" && (ut.displayName = "TreeViewChildrenItemContext");
|
|
1730
|
+
function pt(t) {
|
|
1731
1731
|
const {
|
|
1732
1732
|
children: e,
|
|
1733
1733
|
itemId: n = null,
|
|
@@ -1735,49 +1735,49 @@ function dt(t) {
|
|
|
1735
1735
|
} = t, {
|
|
1736
1736
|
store: r,
|
|
1737
1737
|
rootRef: s
|
|
1738
|
-
} =
|
|
1739
|
-
|
|
1738
|
+
} = be(), l = M.useRef(/* @__PURE__ */ new Map());
|
|
1739
|
+
M.useEffect(() => {
|
|
1740
1740
|
if (!s.current)
|
|
1741
1741
|
return;
|
|
1742
|
-
const
|
|
1742
|
+
const h = y.itemOrderedChildrenIds(r.state, n ?? null) ?? [], d = zo(o ?? s.current.id);
|
|
1743
1743
|
if (n != null) {
|
|
1744
1744
|
const u = s.current.querySelector(`*[id="${d}"][role="treeitem"]`);
|
|
1745
1745
|
if (u && u.getAttribute("aria-expanded") === "false")
|
|
1746
1746
|
return;
|
|
1747
1747
|
}
|
|
1748
1748
|
const c = s.current.querySelectorAll(`${n == null ? "" : `*[id="${d}"] `}[role="treeitem"]:not(*[id="${d}"] [role="treeitem"] [role="treeitem"])`), p = Array.from(c).map((u) => l.current.get(u.id));
|
|
1749
|
-
(p.length !==
|
|
1749
|
+
(p.length !== h.length || p.some((u, m) => u !== h[m])) && r.jsxItems.setJSXItemsOrderedChildrenIds(n ?? null, p);
|
|
1750
1750
|
});
|
|
1751
|
-
const a =
|
|
1752
|
-
registerChild: (
|
|
1753
|
-
unregisterChild: (
|
|
1751
|
+
const a = M.useMemo(() => ({
|
|
1752
|
+
registerChild: (h, d) => l.current.set(h, d),
|
|
1753
|
+
unregisterChild: (h) => l.current.delete(h),
|
|
1754
1754
|
parentId: n
|
|
1755
1755
|
}), [n]);
|
|
1756
|
-
return /* @__PURE__ */ v(
|
|
1756
|
+
return /* @__PURE__ */ v(ut.Provider, {
|
|
1757
1757
|
value: a,
|
|
1758
1758
|
children: e
|
|
1759
1759
|
});
|
|
1760
1760
|
}
|
|
1761
|
-
process.env.NODE_ENV !== "production" && (
|
|
1761
|
+
process.env.NODE_ENV !== "production" && (pt.propTypes = {
|
|
1762
1762
|
children: i.node,
|
|
1763
1763
|
id: i.string
|
|
1764
1764
|
});
|
|
1765
|
-
const
|
|
1766
|
-
process.env.NODE_ENV !== "production" && (
|
|
1767
|
-
const
|
|
1768
|
-
},
|
|
1769
|
-
function
|
|
1770
|
-
|
|
1765
|
+
const Ee = /* @__PURE__ */ M.createContext(() => -1);
|
|
1766
|
+
process.env.NODE_ENV !== "production" && (Ee.displayName = "TreeViewItemDepthContext");
|
|
1767
|
+
const jo = () => {
|
|
1768
|
+
}, rt = typeof document < "u" ? M.useLayoutEffect : jo, $o = [];
|
|
1769
|
+
function Bo(t) {
|
|
1770
|
+
M.useEffect(t, $o);
|
|
1771
1771
|
}
|
|
1772
|
-
function
|
|
1773
|
-
const n =
|
|
1772
|
+
function Wo(t, e) {
|
|
1773
|
+
const n = Vn(), o = it(() => new t(S({}, e, {
|
|
1774
1774
|
isRtl: n
|
|
1775
1775
|
}))).current;
|
|
1776
|
-
return
|
|
1776
|
+
return rt(() => o.updateStateFromParameters(S({}, e, {
|
|
1777
1777
|
isRtl: n
|
|
1778
|
-
})), [o, n, e]),
|
|
1778
|
+
})), [o, n, e]), Bo(o.disposeEffect), o;
|
|
1779
1779
|
}
|
|
1780
|
-
class
|
|
1780
|
+
class Ko {
|
|
1781
1781
|
maxListeners = 20;
|
|
1782
1782
|
warnOnce = !1;
|
|
1783
1783
|
events = {};
|
|
@@ -1819,18 +1819,18 @@ class $o {
|
|
|
1819
1819
|
});
|
|
1820
1820
|
}
|
|
1821
1821
|
}
|
|
1822
|
-
const
|
|
1822
|
+
const Uo = ({
|
|
1823
1823
|
isItemEditable: t,
|
|
1824
1824
|
expansionTrigger: e
|
|
1825
1825
|
}) => e || (t ? "iconContainer" : "content");
|
|
1826
|
-
function
|
|
1826
|
+
function on(t) {
|
|
1827
1827
|
return {
|
|
1828
1828
|
disabledItemsFocusable: t.disabledItemsFocusable ?? !1,
|
|
1829
1829
|
domStructure: "nested",
|
|
1830
1830
|
itemChildrenIndentation: t.itemChildrenIndentation ?? "12px",
|
|
1831
1831
|
providedTreeId: t.id,
|
|
1832
1832
|
// TODO: Fix
|
|
1833
|
-
expansionTrigger:
|
|
1833
|
+
expansionTrigger: Uo({
|
|
1834
1834
|
isItemEditable: t.isItemEditable,
|
|
1835
1835
|
expansionTrigger: t.expansionTrigger
|
|
1836
1836
|
}),
|
|
@@ -1840,21 +1840,21 @@ function en(t) {
|
|
|
1840
1840
|
selectionPropagation: t.selectionPropagation ?? ye
|
|
1841
1841
|
};
|
|
1842
1842
|
}
|
|
1843
|
-
function
|
|
1843
|
+
function zt(t, e, n) {
|
|
1844
1844
|
return t !== void 0 ? t : e !== void 0 ? e : n;
|
|
1845
1845
|
}
|
|
1846
|
-
function
|
|
1846
|
+
function Ho(t) {
|
|
1847
1847
|
return S({
|
|
1848
1848
|
treeId: void 0,
|
|
1849
1849
|
focusedItemId: null
|
|
1850
|
-
},
|
|
1851
|
-
expandedItems:
|
|
1852
|
-
selectedItems:
|
|
1850
|
+
}, on(t), De.buildItemsStateIfNeeded(t), {
|
|
1851
|
+
expandedItems: zt(t.expandedItems, t.defaultExpandedItems, []),
|
|
1852
|
+
selectedItems: zt(t.selectedItems, t.defaultSelectedItems, t.multiSelect ? tt : null)
|
|
1853
1853
|
});
|
|
1854
1854
|
}
|
|
1855
|
-
let
|
|
1856
|
-
const
|
|
1857
|
-
class
|
|
1855
|
+
let jt = 0;
|
|
1856
|
+
const qo = () => (jt += 1, `mui-tree-view-${jt}`);
|
|
1857
|
+
class Go {
|
|
1858
1858
|
timeoutIds = /* @__PURE__ */ new Map();
|
|
1859
1859
|
intervalIds = /* @__PURE__ */ new Map();
|
|
1860
1860
|
startTimeout = (e, n, o) => {
|
|
@@ -1881,7 +1881,7 @@ class Uo {
|
|
|
1881
1881
|
this.timeoutIds.forEach(clearTimeout), this.timeoutIds.clear(), this.intervalIds.forEach(clearInterval), this.intervalIds.clear();
|
|
1882
1882
|
};
|
|
1883
1883
|
}
|
|
1884
|
-
class
|
|
1884
|
+
class Xo {
|
|
1885
1885
|
// We can't type `store`, otherwise we get the following TS error:
|
|
1886
1886
|
// 'expansion' implicitly has type 'any' because it does not have a type annotation and is referenced directly or indirectly in its own initializer.
|
|
1887
1887
|
constructor(e) {
|
|
@@ -1895,7 +1895,7 @@ class Ho {
|
|
|
1895
1895
|
* @param {TreeViewItemId} itemId The id of the item to check.
|
|
1896
1896
|
* @returns {boolean} `true` if the item is expanded, `false` otherwise.
|
|
1897
1897
|
*/
|
|
1898
|
-
isItemExpanded = (e) =>
|
|
1898
|
+
isItemExpanded = (e) => H.isItemExpanded(this.store.state, e);
|
|
1899
1899
|
buildPublicAPI = () => ({
|
|
1900
1900
|
isItemExpanded: this.isItemExpanded,
|
|
1901
1901
|
setItemExpansion: this.setItemExpansion
|
|
@@ -1912,7 +1912,7 @@ class Ho {
|
|
|
1912
1912
|
event: n = null,
|
|
1913
1913
|
shouldBeExpanded: o
|
|
1914
1914
|
}) => {
|
|
1915
|
-
const r =
|
|
1915
|
+
const r = H.isItemExpanded(this.store.state, e), s = o ?? !r;
|
|
1916
1916
|
if (r === s)
|
|
1917
1917
|
return;
|
|
1918
1918
|
const l = {
|
|
@@ -1940,7 +1940,7 @@ class Ho {
|
|
|
1940
1940
|
event: n,
|
|
1941
1941
|
shouldBeExpanded: o
|
|
1942
1942
|
}) => {
|
|
1943
|
-
const r =
|
|
1943
|
+
const r = H.expandedItemsRaw(this.store.state);
|
|
1944
1944
|
let s;
|
|
1945
1945
|
o ? s = [e].concat(r) : s = r.filter((l) => l !== e), this.store.parameters.onItemExpansionToggle?.(n, e, o), this.setExpandedItems(n, s);
|
|
1946
1946
|
};
|
|
@@ -1950,10 +1950,10 @@ class Ho {
|
|
|
1950
1950
|
* @param {TreeViewItemId} itemId The id of the item whose siblings will be expanded.
|
|
1951
1951
|
*/
|
|
1952
1952
|
expandAllSiblings = (e, n) => {
|
|
1953
|
-
const o =
|
|
1953
|
+
const o = y.itemMeta(this.store.state, n);
|
|
1954
1954
|
if (o == null)
|
|
1955
1955
|
return;
|
|
1956
|
-
const s =
|
|
1956
|
+
const s = y.itemOrderedChildrenIds(this.store.state, o.parentId).filter((a) => H.isItemExpandable(this.store.state, a) && !H.isItemExpanded(this.store.state, a)), l = H.expandedItemsRaw(this.store.state).concat(s);
|
|
1957
1957
|
s.length > 0 && (this.store.parameters.onItemExpansionToggle && s.forEach((a) => {
|
|
1958
1958
|
this.store.parameters.onItemExpansionToggle(e, a, !0);
|
|
1959
1959
|
}), this.setExpandedItems(e, l));
|
|
@@ -1975,31 +1975,31 @@ const me = {
|
|
|
1975
1975
|
/**
|
|
1976
1976
|
* Checks whether an item is editable.
|
|
1977
1977
|
*/
|
|
1978
|
-
isItemEditable:
|
|
1978
|
+
isItemEditable: P((t) => t.isItemEditable, y.itemModel, (t, e, n) => !e || t == null ? !1 : typeof t == "boolean" ? t : t(e)),
|
|
1979
1979
|
/**
|
|
1980
1980
|
* Checks whether an item is being edited.
|
|
1981
1981
|
*/
|
|
1982
|
-
isItemBeingEdited:
|
|
1982
|
+
isItemBeingEdited: P((t, e) => e == null ? !1 : t.editedItemId === e),
|
|
1983
1983
|
/**
|
|
1984
1984
|
* Checks whether any item is being edited.
|
|
1985
1985
|
*/
|
|
1986
|
-
isAnyItemBeingEdited:
|
|
1987
|
-
},
|
|
1988
|
-
class
|
|
1986
|
+
isAnyItemBeingEdited: P((t) => !!t.editedItemId)
|
|
1987
|
+
}, Jo = 500;
|
|
1988
|
+
class Qo {
|
|
1989
1989
|
typeaheadQuery = "";
|
|
1990
1990
|
// We can't type `store`, otherwise we get the following TS error:
|
|
1991
1991
|
// 'keyboardNavigation' implicitly has type 'any' because it does not have a type annotation and is referenced directly or indirectly in its own initializer.
|
|
1992
1992
|
constructor(e) {
|
|
1993
|
-
this.store = e, this.labelMap =
|
|
1994
|
-
this.store.shouldIgnoreItemsStateUpdate() || (this.labelMap =
|
|
1993
|
+
this.store = e, this.labelMap = $t(y.itemMetaLookup(this.store.state)), this.store.registerStoreEffect(y.itemMetaLookup, (n, o) => {
|
|
1994
|
+
this.store.shouldIgnoreItemsStateUpdate() || (this.labelMap = $t(o));
|
|
1995
1995
|
});
|
|
1996
1996
|
}
|
|
1997
|
-
canToggleItemSelection = (e) =>
|
|
1998
|
-
canToggleItemExpansion = (e) => !
|
|
1997
|
+
canToggleItemSelection = (e) => N.canItemBeSelected(this.store.state, e);
|
|
1998
|
+
canToggleItemExpansion = (e) => !y.isItemDisabled(this.store.state, e) && H.isItemExpandable(this.store.state, e);
|
|
1999
1999
|
getFirstItemMatchingTypeaheadQuery = (e, n) => {
|
|
2000
2000
|
const o = (d) => {
|
|
2001
|
-
const c =
|
|
2002
|
-
return c === null ?
|
|
2001
|
+
const c = _e(this.store.state, d);
|
|
2002
|
+
return c === null ? ze(this.store.state) : c;
|
|
2003
2003
|
}, r = (d) => {
|
|
2004
2004
|
let c = null;
|
|
2005
2005
|
const p = {};
|
|
@@ -2010,8 +2010,8 @@ class Go {
|
|
|
2010
2010
|
}, s = n.toLowerCase(), l = `${this.typeaheadQuery}${s}`, a = r(l);
|
|
2011
2011
|
if (a != null)
|
|
2012
2012
|
return this.typeaheadQuery = l, a;
|
|
2013
|
-
const
|
|
2014
|
-
return
|
|
2013
|
+
const h = r(s);
|
|
2014
|
+
return h != null ? (this.typeaheadQuery = s, h) : (this.typeaheadQuery = "", null);
|
|
2015
2015
|
};
|
|
2016
2016
|
/**
|
|
2017
2017
|
* Updates the `labelMap` to add/remove the first character of some item's labels.
|
|
@@ -2030,9 +2030,9 @@ class Go {
|
|
|
2030
2030
|
* @param {TreeViewItemId} itemId The id of the item that the event was triggered on.
|
|
2031
2031
|
*/
|
|
2032
2032
|
handleItemKeyDown = async (e, n) => {
|
|
2033
|
-
if (e.defaultMuiPrevented || e.altKey ||
|
|
2033
|
+
if (e.defaultMuiPrevented || e.altKey || ot(e.target, e.currentTarget))
|
|
2034
2034
|
return;
|
|
2035
|
-
const o = e.ctrlKey || e.metaKey, r = e.key, s =
|
|
2035
|
+
const o = e.ctrlKey || e.metaKey, r = e.key, s = N.isMultiSelectEnabled(this.store.state);
|
|
2036
2036
|
switch (!0) {
|
|
2037
2037
|
// Select the item when pressing "Space"
|
|
2038
2038
|
case (r === " " && this.canToggleItemSelection(n)): {
|
|
@@ -2054,7 +2054,7 @@ class Go {
|
|
|
2054
2054
|
event: e,
|
|
2055
2055
|
itemId: n,
|
|
2056
2056
|
keepExistingSelection: !0
|
|
2057
|
-
})) :
|
|
2057
|
+
})) : N.isItemSelected(this.store.state, n) || (this.store.selection.setItemSelection({
|
|
2058
2058
|
event: e,
|
|
2059
2059
|
itemId: n
|
|
2060
2060
|
}), e.preventDefault()));
|
|
@@ -2062,13 +2062,13 @@ class Go {
|
|
|
2062
2062
|
}
|
|
2063
2063
|
// Focus the next focusable item
|
|
2064
2064
|
case r === "ArrowDown": {
|
|
2065
|
-
const l =
|
|
2065
|
+
const l = _e(this.store.state, n);
|
|
2066
2066
|
l && (e.preventDefault(), this.store.focus.focusItem(e, l), s && e.shiftKey && this.canToggleItemSelection(l) && this.store.selection.selectItemFromArrowNavigation(e, n, l));
|
|
2067
2067
|
break;
|
|
2068
2068
|
}
|
|
2069
2069
|
// Focuses the previous focusable item
|
|
2070
2070
|
case r === "ArrowUp": {
|
|
2071
|
-
const l =
|
|
2071
|
+
const l = Zt(this.store.state, n);
|
|
2072
2072
|
l && (e.preventDefault(), this.store.focus.focusItem(e, l), s && e.shiftKey && this.canToggleItemSelection(l) && this.store.selection.selectItemFromArrowNavigation(e, n, l));
|
|
2073
2073
|
break;
|
|
2074
2074
|
}
|
|
@@ -2077,8 +2077,8 @@ class Go {
|
|
|
2077
2077
|
case (r === "ArrowRight" && !this.store.parameters.isRtl || r === "ArrowLeft" && this.store.parameters.isRtl): {
|
|
2078
2078
|
if (o)
|
|
2079
2079
|
return;
|
|
2080
|
-
if (
|
|
2081
|
-
const l =
|
|
2080
|
+
if (H.isItemExpanded(this.store.state, n)) {
|
|
2081
|
+
const l = _e(this.store.state, n);
|
|
2082
2082
|
l && (this.store.focus.focusItem(e, l), e.preventDefault());
|
|
2083
2083
|
} else this.canToggleItemExpansion(n) && (this.store.expansion.setItemExpansion({
|
|
2084
2084
|
event: e,
|
|
@@ -2091,25 +2091,25 @@ class Go {
|
|
|
2091
2091
|
case (r === "ArrowLeft" && !this.store.parameters.isRtl || r === "ArrowRight" && this.store.parameters.isRtl): {
|
|
2092
2092
|
if (o)
|
|
2093
2093
|
return;
|
|
2094
|
-
if (this.canToggleItemExpansion(n) &&
|
|
2094
|
+
if (this.canToggleItemExpansion(n) && H.isItemExpanded(this.store.state, n))
|
|
2095
2095
|
this.store.expansion.setItemExpansion({
|
|
2096
2096
|
event: e,
|
|
2097
2097
|
itemId: n
|
|
2098
2098
|
}), e.preventDefault();
|
|
2099
2099
|
else {
|
|
2100
|
-
const l =
|
|
2100
|
+
const l = y.itemParentId(this.store.state, n);
|
|
2101
2101
|
l && (this.store.focus.focusItem(e, l), e.preventDefault());
|
|
2102
2102
|
}
|
|
2103
2103
|
break;
|
|
2104
2104
|
}
|
|
2105
2105
|
// Focuses the first item in the tree
|
|
2106
2106
|
case r === "Home": {
|
|
2107
|
-
this.canToggleItemSelection(n) && s && o && e.shiftKey ? this.store.selection.selectRangeFromStartToItem(e, n) : this.store.focus.focusItem(e,
|
|
2107
|
+
this.canToggleItemSelection(n) && s && o && e.shiftKey ? this.store.selection.selectRangeFromStartToItem(e, n) : this.store.focus.focusItem(e, ze(this.store.state)), e.preventDefault();
|
|
2108
2108
|
break;
|
|
2109
2109
|
}
|
|
2110
2110
|
// Focuses the last item in the tree
|
|
2111
2111
|
case r === "End": {
|
|
2112
|
-
this.canToggleItemSelection(n) && s && o && e.shiftKey ? this.store.selection.selectRangeFromItemToEnd(e, n) : this.store.focus.focusItem(e,
|
|
2112
|
+
this.canToggleItemSelection(n) && s && o && e.shiftKey ? this.store.selection.selectRangeFromItemToEnd(e, n) : this.store.focus.focusItem(e, en(this.store.state)), e.preventDefault();
|
|
2113
2113
|
break;
|
|
2114
2114
|
}
|
|
2115
2115
|
// Expand all siblings that are at the same level as the focused item
|
|
@@ -2119,15 +2119,15 @@ class Go {
|
|
|
2119
2119
|
}
|
|
2120
2120
|
// Multi select behavior when pressing Ctrl + a
|
|
2121
2121
|
// Selects all the items
|
|
2122
|
-
case (String.fromCharCode(e.keyCode) === "A" && o && s &&
|
|
2122
|
+
case (String.fromCharCode(e.keyCode) === "A" && o && s && N.enabled(this.store.state)): {
|
|
2123
2123
|
this.store.selection.selectAllNavigableItems(e), e.preventDefault();
|
|
2124
2124
|
break;
|
|
2125
2125
|
}
|
|
2126
2126
|
// Type-ahead
|
|
2127
|
-
case (!o && !e.shiftKey &&
|
|
2127
|
+
case (!o && !e.shiftKey && Yo(r)): {
|
|
2128
2128
|
this.store.timeoutManager.clearTimeout("typeahead");
|
|
2129
2129
|
const l = this.getFirstItemMatchingTypeaheadQuery(n, r);
|
|
2130
|
-
l != null ? (this.store.focus.focusItem(e, l), e.preventDefault()) : this.typeaheadQuery = "", this.store.timeoutManager.startTimeout("typeahead",
|
|
2130
|
+
l != null ? (this.store.focus.focusItem(e, l), e.preventDefault()) : this.typeaheadQuery = "", this.store.timeoutManager.startTimeout("typeahead", Jo, () => {
|
|
2131
2131
|
this.typeaheadQuery = "";
|
|
2132
2132
|
});
|
|
2133
2133
|
break;
|
|
@@ -2135,25 +2135,25 @@ class Go {
|
|
|
2135
2135
|
}
|
|
2136
2136
|
};
|
|
2137
2137
|
}
|
|
2138
|
-
function
|
|
2138
|
+
function Yo(t) {
|
|
2139
2139
|
return !!t && t.length === 1 && !!t.match(/\S/);
|
|
2140
2140
|
}
|
|
2141
|
-
function
|
|
2141
|
+
function $t(t) {
|
|
2142
2142
|
const e = {}, n = (o) => {
|
|
2143
2143
|
e[o.id] = o.label.toLowerCase();
|
|
2144
2144
|
};
|
|
2145
2145
|
return Object.values(t).forEach(n), e;
|
|
2146
2146
|
}
|
|
2147
|
-
const
|
|
2147
|
+
const Bt = Te(N.selectedItems, H.expandedItemsMap, y.itemMetaLookup, y.disabledItemFocusable, (t) => y.itemOrderedChildrenIds(t, null), (t, e, n, o, r) => {
|
|
2148
2148
|
const s = t.find((a) => {
|
|
2149
|
-
if (!o &&
|
|
2149
|
+
if (!o && Ve(n, a))
|
|
2150
2150
|
return !1;
|
|
2151
|
-
const
|
|
2152
|
-
return
|
|
2151
|
+
const h = n[a];
|
|
2152
|
+
return h && (h.parentId == null || e.has(h.parentId));
|
|
2153
2153
|
});
|
|
2154
2154
|
if (s != null)
|
|
2155
2155
|
return s;
|
|
2156
|
-
const l = r.find((a) => o || !
|
|
2156
|
+
const l = r.find((a) => o || !Ve(n, a));
|
|
2157
2157
|
return l ?? null;
|
|
2158
2158
|
}), de = {
|
|
2159
2159
|
/**
|
|
@@ -2161,27 +2161,27 @@ const zt = we(_.selectedItems, $.expandedItemsMap, x.itemMetaLookup, x.disabledI
|
|
|
2161
2161
|
* At any point in time, there is a single item that can be sequentially focused in the Tree View.
|
|
2162
2162
|
* This item is the first selected item (that is both visible and navigable), if any, or the first navigable item if no item is selected.
|
|
2163
2163
|
*/
|
|
2164
|
-
defaultFocusableItemId:
|
|
2164
|
+
defaultFocusableItemId: Bt,
|
|
2165
2165
|
/**
|
|
2166
2166
|
* Checks whether an item is the default focusable item.
|
|
2167
2167
|
*/
|
|
2168
|
-
isItemTheDefaultFocusableItem:
|
|
2168
|
+
isItemTheDefaultFocusableItem: P(Bt, (t, e) => t === e),
|
|
2169
2169
|
/**
|
|
2170
2170
|
* Gets the id of the item that is currently focused.
|
|
2171
2171
|
*/
|
|
2172
|
-
focusedItemId:
|
|
2172
|
+
focusedItemId: P((t) => t.focusedItemId),
|
|
2173
2173
|
/**
|
|
2174
2174
|
* Checks whether an item is focused.
|
|
2175
2175
|
*/
|
|
2176
|
-
isItemFocused:
|
|
2176
|
+
isItemFocused: P((t, e) => t.focusedItemId === e)
|
|
2177
2177
|
};
|
|
2178
|
-
class
|
|
2178
|
+
class Zo {
|
|
2179
2179
|
// We can't type `store`, otherwise we get the following TS error:
|
|
2180
2180
|
// 'focus' implicitly has type 'any' because it does not have a type annotation and is referenced directly or indirectly in its own initializer.
|
|
2181
2181
|
constructor(e) {
|
|
2182
|
-
this.store = e, this.store.registerStoreEffect(
|
|
2182
|
+
this.store = e, this.store.registerStoreEffect(y.itemMetaLookup, () => {
|
|
2183
2183
|
const n = de.focusedItemId(e.state);
|
|
2184
|
-
if (n == null || !!
|
|
2184
|
+
if (n == null || !!y.itemMeta(e.state, n))
|
|
2185
2185
|
return;
|
|
2186
2186
|
const r = de.defaultFocusableItemId(e.state);
|
|
2187
2187
|
if (r == null) {
|
|
@@ -2209,8 +2209,8 @@ class Jo {
|
|
|
2209
2209
|
* @param {TreeViewItemId} itemId The id of the item to focus.
|
|
2210
2210
|
*/
|
|
2211
2211
|
focusItem = (e, n) => {
|
|
2212
|
-
const o =
|
|
2213
|
-
o && (o.parentId == null ||
|
|
2212
|
+
const o = y.itemMeta(this.store.state, n);
|
|
2213
|
+
o && (o.parentId == null || H.isItemExpanded(this.store.state, o.parentId)) && this.applyItemFocus(e, n);
|
|
2214
2214
|
};
|
|
2215
2215
|
/**
|
|
2216
2216
|
* Remove the focus from the currently focused item (both from the internal state and the DOM).
|
|
@@ -2219,7 +2219,7 @@ class Jo {
|
|
|
2219
2219
|
const e = de.focusedItemId(this.store.state);
|
|
2220
2220
|
if (e == null)
|
|
2221
2221
|
return;
|
|
2222
|
-
if (
|
|
2222
|
+
if (y.itemMeta(this.store.state, e)) {
|
|
2223
2223
|
const o = this.store.items.getItemDOMElement(e);
|
|
2224
2224
|
o && o.blur();
|
|
2225
2225
|
}
|
|
@@ -2243,7 +2243,7 @@ class Jo {
|
|
|
2243
2243
|
e.defaultMuiPrevented || this.setFocusedItemId(null);
|
|
2244
2244
|
};
|
|
2245
2245
|
}
|
|
2246
|
-
class
|
|
2246
|
+
class er {
|
|
2247
2247
|
itemPlugins = [];
|
|
2248
2248
|
itemWrappers = [];
|
|
2249
2249
|
register = (e, n) => {
|
|
@@ -2252,14 +2252,14 @@ class Qo {
|
|
|
2252
2252
|
listPlugins = () => this.itemPlugins;
|
|
2253
2253
|
listWrappers = () => this.itemWrappers;
|
|
2254
2254
|
}
|
|
2255
|
-
class
|
|
2255
|
+
class tr extends dt {
|
|
2256
2256
|
initialParameters = null;
|
|
2257
|
-
eventManager = new
|
|
2258
|
-
timeoutManager = new
|
|
2259
|
-
itemPluginManager = new
|
|
2257
|
+
eventManager = new Ko();
|
|
2258
|
+
timeoutManager = new Go();
|
|
2259
|
+
itemPluginManager = new er();
|
|
2260
2260
|
constructor(e, n, o) {
|
|
2261
|
-
const r =
|
|
2262
|
-
super(s), this.parameters = e, this.instanceName = n, this.mapper = o, this.items = new
|
|
2261
|
+
const r = Ho(e), s = o.getInitialState(r, e);
|
|
2262
|
+
super(s), this.parameters = e, this.instanceName = n, this.mapper = o, this.items = new De(this), this.focus = new Zo(this), this.expansion = new Xo(this), this.selection = new No(this), this.keyboardNavigation = new Qo(this), process.env.NODE_ENV !== "production" && (this.initialParameters = e);
|
|
2263
2263
|
}
|
|
2264
2264
|
/**
|
|
2265
2265
|
* Builds an object containing the method that should be exposed publicly by the Tree View components.
|
|
@@ -2273,11 +2273,11 @@ class Yo extends at {
|
|
|
2273
2273
|
updateStateFromParameters(e) {
|
|
2274
2274
|
const n = (s, l, a) => {
|
|
2275
2275
|
if (e[l] !== void 0 && (s[l] = e[l]), process.env.NODE_ENV !== "production") {
|
|
2276
|
-
const
|
|
2277
|
-
p !== d ?
|
|
2276
|
+
const h = e[a], d = e[l] !== void 0, c = this.initialParameters?.[a], p = this.initialParameters?.[l] !== void 0;
|
|
2277
|
+
p !== d ? et([`MUI X Tree View: A component is changing the ${p ? "" : "un"}controlled ${l} state of ${this.instanceName} to be ${p ? "un" : ""}controlled.`, "Elements should not switch from uncontrolled to controlled (or vice versa).", `Decide between using a controlled or uncontrolled ${l} 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"], "error") : JSON.stringify(c) !== JSON.stringify(h) && et([`MUI X Tree View: A component is changing the default ${l} state of an uncontrolled ${this.instanceName} after being initialized. `, `To suppress this warning opt to use a controlled ${this.instanceName}.`], "error");
|
|
2278
2278
|
}
|
|
2279
|
-
}, o =
|
|
2280
|
-
n(o, "expandedItems", "defaultExpandedItems"), n(o, "selectedItems", "defaultSelectedItems"), (this.state.providedTreeId !== e.id || this.state.treeId === void 0) && (o.treeId =
|
|
2279
|
+
}, o = on(e);
|
|
2280
|
+
n(o, "expandedItems", "defaultExpandedItems"), n(o, "selectedItems", "defaultSelectedItems"), (this.state.providedTreeId !== e.id || this.state.treeId === void 0) && (o.treeId = qo()), !this.mapper.shouldIgnoreItemsStateUpdate(e) && De.shouldRebuildItemsState(e, this.parameters) && Object.assign(o, De.buildItemsStateIfNeeded(e));
|
|
2281
2281
|
const r = this.mapper.updateStateFromParameters(o, e, n);
|
|
2282
2282
|
this.update(r), this.parameters = e;
|
|
2283
2283
|
}
|
|
@@ -2303,7 +2303,7 @@ class Yo extends at {
|
|
|
2303
2303
|
* Publishes an event to all its subscribers.
|
|
2304
2304
|
*/
|
|
2305
2305
|
publishEvent = (e, n, o) => {
|
|
2306
|
-
|
|
2306
|
+
nr(o) && o.isPropagationStopped() || this.eventManager.emit(e, n, o);
|
|
2307
2307
|
};
|
|
2308
2308
|
/**
|
|
2309
2309
|
* Subscribe to an event emitted by the store.
|
|
@@ -2313,36 +2313,36 @@ class Yo extends at {
|
|
|
2313
2313
|
this.eventManager.on(e, n);
|
|
2314
2314
|
};
|
|
2315
2315
|
}
|
|
2316
|
-
function
|
|
2316
|
+
function nr(t) {
|
|
2317
2317
|
return t.isPropagationStopped !== void 0;
|
|
2318
2318
|
}
|
|
2319
|
-
const
|
|
2319
|
+
const Wt = {
|
|
2320
2320
|
/**
|
|
2321
2321
|
* Checks if the lazy loaded state is empty.
|
|
2322
2322
|
*/
|
|
2323
|
-
isEmpty:
|
|
2323
|
+
isEmpty: P((t) => t.lazyLoadedItems == null ? !0 : Object.keys(t.lazyLoadedItems.loading).length === 0 && Object.keys(t.lazyLoadedItems.errors).length === 0),
|
|
2324
2324
|
/**
|
|
2325
2325
|
* Checks whether an item is loading.
|
|
2326
2326
|
*/
|
|
2327
|
-
isItemLoading:
|
|
2327
|
+
isItemLoading: P((t, e) => t.lazyLoadedItems?.loading[e ?? se] ?? !1),
|
|
2328
2328
|
/**
|
|
2329
2329
|
* Checks whether an item has errors.
|
|
2330
2330
|
*/
|
|
2331
|
-
itemHasError:
|
|
2331
|
+
itemHasError: P((t, e) => !!t.lazyLoadedItems?.errors[e ?? se]),
|
|
2332
2332
|
/**
|
|
2333
2333
|
* Get an item error.
|
|
2334
2334
|
*/
|
|
2335
|
-
itemError:
|
|
2336
|
-
},
|
|
2335
|
+
itemError: P((t, e) => t.lazyLoadedItems?.errors[e ?? se])
|
|
2336
|
+
}, ft = (t) => Array.isArray(t) ? t.length > 0 && t.some(ft) : !!t, or = ({
|
|
2337
2337
|
itemId: t,
|
|
2338
2338
|
children: e
|
|
2339
2339
|
}) => {
|
|
2340
2340
|
const {
|
|
2341
2341
|
store: n,
|
|
2342
2342
|
publicAPI: o
|
|
2343
|
-
} =
|
|
2343
|
+
} = be(), r = W(n, H.isItemExpandable, t), s = W(n, Wt.isItemLoading, t), l = W(n, Wt.itemHasError, t), a = ft(e) || r, h = W(n, H.isItemExpanded, t), d = W(n, de.isItemFocused, t), c = W(n, N.isItemSelected, t), p = W(n, y.isItemDisabled, t), f = W(n, me.isItemBeingEdited, t), u = W(n, me.isItemEditable, t), m = {
|
|
2344
2344
|
expandable: a,
|
|
2345
|
-
expanded:
|
|
2345
|
+
expanded: h,
|
|
2346
2346
|
focused: d,
|
|
2347
2347
|
selected: c,
|
|
2348
2348
|
disabled: p,
|
|
@@ -2350,69 +2350,69 @@ const jt = {
|
|
|
2350
2350
|
editable: u,
|
|
2351
2351
|
loading: s,
|
|
2352
2352
|
error: l
|
|
2353
|
-
}, I = (
|
|
2354
|
-
if (
|
|
2353
|
+
}, I = (C) => {
|
|
2354
|
+
if (m.disabled)
|
|
2355
2355
|
return;
|
|
2356
|
-
|
|
2357
|
-
const
|
|
2358
|
-
|
|
2359
|
-
event:
|
|
2356
|
+
m.focused || n.focus.focusItem(C, t);
|
|
2357
|
+
const D = N.isMultiSelectEnabled(n.state) && (C.shiftKey || C.ctrlKey || C.metaKey);
|
|
2358
|
+
m.expandable && !(D && H.isItemExpanded(n.state, t)) && n.expansion.setItemExpansion({
|
|
2359
|
+
event: C,
|
|
2360
2360
|
itemId: t
|
|
2361
2361
|
});
|
|
2362
|
-
}, b = (
|
|
2363
|
-
if (!
|
|
2362
|
+
}, b = (C) => {
|
|
2363
|
+
if (!N.canItemBeSelected(n.state, t))
|
|
2364
2364
|
return;
|
|
2365
|
-
!
|
|
2366
|
-
event:
|
|
2365
|
+
!m.focused && !m.editing && n.focus.focusItem(C, t), N.isMultiSelectEnabled(n.state) && (C.shiftKey || C.ctrlKey || C.metaKey) ? C.shiftKey ? n.selection.expandSelectionRange(C, t) : n.selection.setItemSelection({
|
|
2366
|
+
event: C,
|
|
2367
2367
|
itemId: t,
|
|
2368
2368
|
keepExistingSelection: !0
|
|
2369
2369
|
}) : n.selection.setItemSelection({
|
|
2370
|
-
event:
|
|
2370
|
+
event: C,
|
|
2371
2371
|
itemId: t,
|
|
2372
2372
|
shouldBeSelected: !0
|
|
2373
2373
|
});
|
|
2374
|
-
},
|
|
2375
|
-
const
|
|
2376
|
-
|
|
2377
|
-
event:
|
|
2374
|
+
}, x = (C) => {
|
|
2375
|
+
const D = C.nativeEvent.shiftKey, V = N.isMultiSelectEnabled(n.state);
|
|
2376
|
+
V && D ? n.selection.expandSelectionRange(C, t) : n.selection.setItemSelection({
|
|
2377
|
+
event: C,
|
|
2378
2378
|
itemId: t,
|
|
2379
|
-
keepExistingSelection:
|
|
2380
|
-
shouldBeSelected:
|
|
2379
|
+
keepExistingSelection: V,
|
|
2380
|
+
shouldBeSelected: C.target.checked
|
|
2381
2381
|
});
|
|
2382
|
-
},
|
|
2382
|
+
}, w = () => {
|
|
2383
2383
|
n.labelEditing && (f ? n.labelEditing.setEditedItem(null) : n.labelEditing.setEditedItem(t));
|
|
2384
2384
|
};
|
|
2385
2385
|
return {
|
|
2386
2386
|
interactions: {
|
|
2387
2387
|
handleExpansion: I,
|
|
2388
2388
|
handleSelection: b,
|
|
2389
|
-
handleCheckboxSelection:
|
|
2390
|
-
toggleItemEditing:
|
|
2391
|
-
handleSaveItemLabel: (
|
|
2392
|
-
n.labelEditing && me.isItemBeingEdited(n.state, t) && (n.labelEditing.updateItemLabel(t,
|
|
2389
|
+
handleCheckboxSelection: x,
|
|
2390
|
+
toggleItemEditing: w,
|
|
2391
|
+
handleSaveItemLabel: (C, D) => {
|
|
2392
|
+
n.labelEditing && me.isItemBeingEdited(n.state, t) && (n.labelEditing.updateItemLabel(t, D), w(), n.focus.focusItem(C, t));
|
|
2393
2393
|
},
|
|
2394
|
-
handleCancelItemLabelEditing: (
|
|
2395
|
-
n.labelEditing && me.isItemBeingEdited(n.state, t) && (
|
|
2394
|
+
handleCancelItemLabelEditing: (C) => {
|
|
2395
|
+
n.labelEditing && me.isItemBeingEdited(n.state, t) && (w(), n.focus.focusItem(C, t));
|
|
2396
2396
|
}
|
|
2397
2397
|
},
|
|
2398
|
-
status:
|
|
2398
|
+
status: m,
|
|
2399
2399
|
publicAPI: o
|
|
2400
2400
|
};
|
|
2401
|
-
},
|
|
2401
|
+
}, rr = ({
|
|
2402
2402
|
props: t,
|
|
2403
2403
|
rootRef: e,
|
|
2404
2404
|
contentRef: n
|
|
2405
2405
|
}) => {
|
|
2406
2406
|
const {
|
|
2407
2407
|
store: o
|
|
2408
|
-
} =
|
|
2408
|
+
} = be(), {
|
|
2409
2409
|
children: r,
|
|
2410
2410
|
disabled: s = !1,
|
|
2411
2411
|
disableSelection: l = !1,
|
|
2412
2412
|
label: a,
|
|
2413
|
-
itemId:
|
|
2413
|
+
itemId: h,
|
|
2414
2414
|
id: d
|
|
2415
|
-
} = t, c =
|
|
2415
|
+
} = t, c = M.useContext(ut);
|
|
2416
2416
|
if (c == null)
|
|
2417
2417
|
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(`
|
|
2418
2418
|
`));
|
|
@@ -2420,42 +2420,42 @@ const jt = {
|
|
|
2420
2420
|
registerChild: p,
|
|
2421
2421
|
unregisterChild: f,
|
|
2422
2422
|
parentId: u
|
|
2423
|
-
} = c,
|
|
2424
|
-
return
|
|
2425
|
-
f(
|
|
2426
|
-
}), [o, p, f,
|
|
2427
|
-
id:
|
|
2423
|
+
} = c, m = ft(r), I = M.useRef(null), b = Ne(I, n), x = W(o, ke.treeItemIdAttribute, h, d);
|
|
2424
|
+
return rt(() => (p(x, h), () => {
|
|
2425
|
+
f(x), f(x);
|
|
2426
|
+
}), [o, p, f, x, h]), rt(() => o.jsxItems.insertJSXItem({
|
|
2427
|
+
id: h,
|
|
2428
2428
|
idAttribute: d,
|
|
2429
2429
|
parentId: u,
|
|
2430
|
-
expandable:
|
|
2430
|
+
expandable: m,
|
|
2431
2431
|
disabled: s,
|
|
2432
2432
|
selectable: !l
|
|
2433
|
-
}), [o, u,
|
|
2433
|
+
}), [o, u, h, m, s, l, d]), M.useEffect(() => {
|
|
2434
2434
|
if (a)
|
|
2435
|
-
return o.jsxItems.mapLabelFromJSX(
|
|
2436
|
-
}, [o,
|
|
2435
|
+
return o.jsxItems.mapLabelFromJSX(h, (I.current?.textContent ?? "").toLowerCase());
|
|
2436
|
+
}, [o, h, a]), {
|
|
2437
2437
|
contentRef: b,
|
|
2438
2438
|
rootRef: e
|
|
2439
2439
|
};
|
|
2440
|
-
},
|
|
2440
|
+
}, rn = ({
|
|
2441
2441
|
children: t,
|
|
2442
2442
|
itemId: e,
|
|
2443
2443
|
idAttribute: n
|
|
2444
2444
|
}) => {
|
|
2445
|
-
const o =
|
|
2446
|
-
return /* @__PURE__ */ v(
|
|
2445
|
+
const o = M.useContext(Ee);
|
|
2446
|
+
return /* @__PURE__ */ v(pt, {
|
|
2447
2447
|
itemId: e,
|
|
2448
2448
|
idAttribute: n,
|
|
2449
|
-
children: /* @__PURE__ */ v(
|
|
2449
|
+
children: /* @__PURE__ */ v(Ee.Provider, {
|
|
2450
2450
|
value: o + 1,
|
|
2451
2451
|
children: t
|
|
2452
2452
|
})
|
|
2453
2453
|
});
|
|
2454
2454
|
};
|
|
2455
|
-
process.env.NODE_ENV !== "production" && (
|
|
2456
|
-
class
|
|
2455
|
+
process.env.NODE_ENV !== "production" && (rn.displayName = "jsxItemsitemWrapper");
|
|
2456
|
+
class sr {
|
|
2457
2457
|
constructor(e) {
|
|
2458
|
-
this.store = e, e.itemPluginManager.register(
|
|
2458
|
+
this.store = e, e.itemPluginManager.register(rr, rn);
|
|
2459
2459
|
}
|
|
2460
2460
|
/**
|
|
2461
2461
|
* Insert a new item in the state from a Tree Item component.
|
|
@@ -2505,40 +2505,40 @@ class nr {
|
|
|
2505
2505
|
* @param {TreeViewItemId[]} orderedChildrenIds The ids of the item's children.
|
|
2506
2506
|
*/
|
|
2507
2507
|
setJSXItemsOrderedChildrenIds = (e, n) => {
|
|
2508
|
-
const o = e ??
|
|
2508
|
+
const o = e ?? se;
|
|
2509
2509
|
this.store.update({
|
|
2510
2510
|
itemOrderedChildrenIdsLookup: S({}, this.store.state.itemOrderedChildrenIdsLookup, {
|
|
2511
2511
|
[o]: n
|
|
2512
2512
|
}),
|
|
2513
2513
|
itemChildrenIndexesLookup: S({}, this.store.state.itemChildrenIndexesLookup, {
|
|
2514
|
-
[o]:
|
|
2514
|
+
[o]: Qt(n)
|
|
2515
2515
|
})
|
|
2516
2516
|
});
|
|
2517
2517
|
};
|
|
2518
2518
|
}
|
|
2519
|
-
const
|
|
2519
|
+
const ir = {
|
|
2520
2520
|
getInitialState: (t) => t,
|
|
2521
2521
|
updateStateFromParameters: (t) => t,
|
|
2522
2522
|
shouldIgnoreItemsStateUpdate: () => !0
|
|
2523
2523
|
};
|
|
2524
|
-
class
|
|
2525
|
-
jsxItems = new
|
|
2524
|
+
class lr extends tr {
|
|
2525
|
+
jsxItems = new sr(this);
|
|
2526
2526
|
constructor(e) {
|
|
2527
2527
|
super(S({}, e, {
|
|
2528
|
-
items:
|
|
2529
|
-
}), "SimpleTreeView",
|
|
2528
|
+
items: tt
|
|
2529
|
+
}), "SimpleTreeView", ir);
|
|
2530
2530
|
}
|
|
2531
2531
|
updateStateFromParameters(e) {
|
|
2532
2532
|
super.updateStateFromParameters(S({}, e, {
|
|
2533
|
-
items:
|
|
2533
|
+
items: tt
|
|
2534
2534
|
}));
|
|
2535
2535
|
}
|
|
2536
2536
|
}
|
|
2537
|
-
const
|
|
2537
|
+
const ar = qt(), cr = (t) => {
|
|
2538
2538
|
const {
|
|
2539
2539
|
classes: e
|
|
2540
2540
|
} = t;
|
|
2541
|
-
return
|
|
2541
|
+
return M.useMemo(() => we({
|
|
2542
2542
|
root: ["root"],
|
|
2543
2543
|
item: ["item"],
|
|
2544
2544
|
itemContent: ["itemContent"],
|
|
@@ -2549,8 +2549,8 @@ const sr = Kt(), ir = (t) => {
|
|
|
2549
2549
|
itemCheckbox: ["itemCheckbox"]
|
|
2550
2550
|
// itemDragAndDropOverlay: ['itemDragAndDropOverlay'], => feature not available on this component
|
|
2551
2551
|
// itemErrorIcon: ['itemErrorIcon'], => feature not available on this component
|
|
2552
|
-
},
|
|
2553
|
-
},
|
|
2552
|
+
}, Un, e), [e]);
|
|
2553
|
+
}, dr = G("ul", {
|
|
2554
2554
|
name: "MuiSimpleTreeView",
|
|
2555
2555
|
slot: "Root"
|
|
2556
2556
|
})({
|
|
@@ -2559,44 +2559,44 @@ const sr = Kt(), ir = (t) => {
|
|
|
2559
2559
|
listStyle: "none",
|
|
2560
2560
|
outline: 0,
|
|
2561
2561
|
position: "relative"
|
|
2562
|
-
}),
|
|
2563
|
-
const o =
|
|
2562
|
+
}), ht = /* @__PURE__ */ M.forwardRef(function(e, n) {
|
|
2563
|
+
const o = ar({
|
|
2564
2564
|
props: e,
|
|
2565
2565
|
name: "MuiSimpleTreeView"
|
|
2566
2566
|
});
|
|
2567
|
-
process.env.NODE_ENV !== "production" && o.items != null &&
|
|
2567
|
+
process.env.NODE_ENV !== "production" && o.items != null && et(["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/."]);
|
|
2568
2568
|
const {
|
|
2569
2569
|
slots: r,
|
|
2570
2570
|
slotProps: s,
|
|
2571
2571
|
apiRef: l,
|
|
2572
2572
|
parameters: a,
|
|
2573
|
-
forwardedProps:
|
|
2574
|
-
} =
|
|
2575
|
-
elementType:
|
|
2573
|
+
forwardedProps: h
|
|
2574
|
+
} = Jn(o), d = Wo(lr, a), c = M.useRef(null), p = Ne(n, c), f = Vo(d, h, p), u = cr(o), m = r?.root ?? dr, I = te({
|
|
2575
|
+
elementType: m,
|
|
2576
2576
|
externalSlotProps: s?.root,
|
|
2577
2577
|
className: u.root,
|
|
2578
2578
|
getSlotProps: f,
|
|
2579
2579
|
ownerState: o
|
|
2580
2580
|
});
|
|
2581
|
-
return /* @__PURE__ */ v(
|
|
2581
|
+
return /* @__PURE__ */ v(Gn, {
|
|
2582
2582
|
store: d,
|
|
2583
2583
|
classes: u,
|
|
2584
2584
|
slots: r,
|
|
2585
2585
|
slotProps: s,
|
|
2586
2586
|
apiRef: l,
|
|
2587
2587
|
rootRef: c,
|
|
2588
|
-
children: /* @__PURE__ */ v(
|
|
2588
|
+
children: /* @__PURE__ */ v(pt, {
|
|
2589
2589
|
itemId: null,
|
|
2590
2590
|
idAttribute: null,
|
|
2591
|
-
children: /* @__PURE__ */ v(
|
|
2591
|
+
children: /* @__PURE__ */ v(Ee.Provider, {
|
|
2592
2592
|
value: 0,
|
|
2593
|
-
children: /* @__PURE__ */ v(
|
|
2593
|
+
children: /* @__PURE__ */ v(m, S({}, I))
|
|
2594
2594
|
})
|
|
2595
2595
|
})
|
|
2596
2596
|
});
|
|
2597
2597
|
});
|
|
2598
|
-
process.env.NODE_ENV !== "production" && (
|
|
2599
|
-
process.env.NODE_ENV !== "production" && (
|
|
2598
|
+
process.env.NODE_ENV !== "production" && (ht.displayName = "SimpleTreeView");
|
|
2599
|
+
process.env.NODE_ENV !== "production" && (ht.propTypes = {
|
|
2600
2600
|
// ----------------------------- Warning --------------------------------
|
|
2601
2601
|
// | These PropTypes are generated from the TypeScript type definitions |
|
|
2602
2602
|
// | To update them edit the TypeScript types and run "pnpm proptypes" |
|
|
@@ -2757,11 +2757,11 @@ process.env.NODE_ENV !== "production" && (pt.propTypes = {
|
|
|
2757
2757
|
*/
|
|
2758
2758
|
sx: i.oneOfType([i.arrayOf(i.oneOfType([i.func, i.object, i.bool])), i.func, i.object])
|
|
2759
2759
|
});
|
|
2760
|
-
function
|
|
2761
|
-
return
|
|
2760
|
+
function ur(t) {
|
|
2761
|
+
return Ce("MuiCollapse", t);
|
|
2762
2762
|
}
|
|
2763
|
-
|
|
2764
|
-
const
|
|
2763
|
+
ve("MuiCollapse", ["root", "horizontal", "vertical", "entered", "hidden", "wrapper", "wrapperInner"]);
|
|
2764
|
+
const pr = (t) => {
|
|
2765
2765
|
const {
|
|
2766
2766
|
orientation: e,
|
|
2767
2767
|
classes: n
|
|
@@ -2772,8 +2772,8 @@ const cr = (t) => {
|
|
|
2772
2772
|
wrapper: ["wrapper", `${e}`],
|
|
2773
2773
|
wrapperInner: ["wrapperInner", `${e}`]
|
|
2774
2774
|
};
|
|
2775
|
-
return
|
|
2776
|
-
},
|
|
2775
|
+
return we(o, ur, n);
|
|
2776
|
+
}, fr = G("div", {
|
|
2777
2777
|
name: "MuiCollapse",
|
|
2778
2778
|
slot: "Root",
|
|
2779
2779
|
overridesResolver: (t, e) => {
|
|
@@ -2782,7 +2782,7 @@ const cr = (t) => {
|
|
|
2782
2782
|
} = t;
|
|
2783
2783
|
return [e.root, e[n.orientation], n.state === "entered" && e.entered, n.state === "exited" && !n.in && n.collapsedSize === "0px" && e.hidden];
|
|
2784
2784
|
}
|
|
2785
|
-
})(
|
|
2785
|
+
})(Ut(({
|
|
2786
2786
|
theme: t
|
|
2787
2787
|
}) => ({
|
|
2788
2788
|
height: 0,
|
|
@@ -2821,7 +2821,7 @@ const cr = (t) => {
|
|
|
2821
2821
|
visibility: "hidden"
|
|
2822
2822
|
}
|
|
2823
2823
|
}]
|
|
2824
|
-
}))),
|
|
2824
|
+
}))), hr = G("div", {
|
|
2825
2825
|
name: "MuiCollapse",
|
|
2826
2826
|
slot: "Wrapper"
|
|
2827
2827
|
})({
|
|
@@ -2837,7 +2837,7 @@ const cr = (t) => {
|
|
|
2837
2837
|
height: "100%"
|
|
2838
2838
|
}
|
|
2839
2839
|
}]
|
|
2840
|
-
}),
|
|
2840
|
+
}), mr = G("div", {
|
|
2841
2841
|
name: "MuiCollapse",
|
|
2842
2842
|
slot: "WrapperInner"
|
|
2843
2843
|
})({
|
|
@@ -2851,8 +2851,8 @@ const cr = (t) => {
|
|
|
2851
2851
|
height: "100%"
|
|
2852
2852
|
}
|
|
2853
2853
|
}]
|
|
2854
|
-
}),
|
|
2855
|
-
const o =
|
|
2854
|
+
}), je = /* @__PURE__ */ M.forwardRef(function(e, n) {
|
|
2855
|
+
const o = Kt({
|
|
2856
2856
|
props: e,
|
|
2857
2857
|
name: "MuiCollapse"
|
|
2858
2858
|
}), {
|
|
@@ -2860,138 +2860,138 @@ const cr = (t) => {
|
|
|
2860
2860
|
children: s,
|
|
2861
2861
|
className: l,
|
|
2862
2862
|
collapsedSize: a = "0px",
|
|
2863
|
-
component:
|
|
2863
|
+
component: h,
|
|
2864
2864
|
easing: d,
|
|
2865
2865
|
in: c,
|
|
2866
2866
|
onEnter: p,
|
|
2867
2867
|
onEntered: f,
|
|
2868
2868
|
onEntering: u,
|
|
2869
|
-
onExit:
|
|
2869
|
+
onExit: m,
|
|
2870
2870
|
onExited: I,
|
|
2871
2871
|
onExiting: b,
|
|
2872
|
-
orientation:
|
|
2873
|
-
slots:
|
|
2874
|
-
slotProps:
|
|
2872
|
+
orientation: x = "vertical",
|
|
2873
|
+
slots: w = {},
|
|
2874
|
+
slotProps: _ = {},
|
|
2875
2875
|
style: R,
|
|
2876
|
-
timeout:
|
|
2876
|
+
timeout: F = Rn.standard,
|
|
2877
2877
|
// eslint-disable-next-line react/prop-types
|
|
2878
|
-
TransitionComponent:
|
|
2879
|
-
...
|
|
2880
|
-
} = o,
|
|
2878
|
+
TransitionComponent: C = Dn,
|
|
2879
|
+
...D
|
|
2880
|
+
} = o, V = {
|
|
2881
2881
|
...o,
|
|
2882
|
-
orientation:
|
|
2882
|
+
orientation: x,
|
|
2883
2883
|
collapsedSize: a
|
|
2884
|
-
},
|
|
2885
|
-
if (
|
|
2886
|
-
const
|
|
2887
|
-
|
|
2884
|
+
}, j = pr(V), E = _n(), k = Tn(), O = M.useRef(null), A = M.useRef(), L = typeof a == "number" ? `${a}px` : a, $ = x === "horizontal", B = $ ? "width" : "height", J = M.useRef(null), Z = kn(n, J), q = (z) => (ne) => {
|
|
2885
|
+
if (z) {
|
|
2886
|
+
const oe = J.current;
|
|
2887
|
+
ne === void 0 ? z(oe) : z(oe, ne);
|
|
2888
2888
|
}
|
|
2889
|
-
},
|
|
2890
|
-
|
|
2891
|
-
}), ue = q((
|
|
2892
|
-
const
|
|
2893
|
-
|
|
2889
|
+
}, ie = () => O.current ? O.current[$ ? "clientWidth" : "clientHeight"] : 0, ae = q((z, ne) => {
|
|
2890
|
+
O.current && $ && (O.current.style.position = "absolute"), z.style[B] = L, p && p(z, ne);
|
|
2891
|
+
}), ue = q((z, ne) => {
|
|
2892
|
+
const oe = ie();
|
|
2893
|
+
O.current && $ && (O.current.style.position = "");
|
|
2894
2894
|
const {
|
|
2895
|
-
duration:
|
|
2896
|
-
easing:
|
|
2897
|
-
} =
|
|
2895
|
+
duration: le,
|
|
2896
|
+
easing: Me
|
|
2897
|
+
} = Et({
|
|
2898
2898
|
style: R,
|
|
2899
|
-
timeout:
|
|
2899
|
+
timeout: F,
|
|
2900
2900
|
easing: d
|
|
2901
2901
|
}, {
|
|
2902
2902
|
mode: "enter"
|
|
2903
2903
|
});
|
|
2904
|
-
if (
|
|
2905
|
-
const
|
|
2906
|
-
|
|
2904
|
+
if (F === "auto") {
|
|
2905
|
+
const It = E.transitions.getAutoHeightDuration(oe);
|
|
2906
|
+
z.style.transitionDuration = `${It}ms`, A.current = It;
|
|
2907
2907
|
} else
|
|
2908
|
-
|
|
2909
|
-
|
|
2910
|
-
}), ce = q((
|
|
2911
|
-
|
|
2912
|
-
}), pe = q((
|
|
2913
|
-
|
|
2914
|
-
}),
|
|
2915
|
-
const
|
|
2916
|
-
duration:
|
|
2917
|
-
easing:
|
|
2918
|
-
} =
|
|
2908
|
+
z.style.transitionDuration = typeof le == "string" ? le : `${le}ms`;
|
|
2909
|
+
z.style[B] = `${oe}px`, z.style.transitionTimingFunction = Me, u && u(z, ne);
|
|
2910
|
+
}), ce = q((z, ne) => {
|
|
2911
|
+
z.style[B] = "auto", f && f(z, ne);
|
|
2912
|
+
}), pe = q((z) => {
|
|
2913
|
+
z.style[B] = `${ie()}px`, m && m(z);
|
|
2914
|
+
}), K = q(I), X = q((z) => {
|
|
2915
|
+
const ne = ie(), {
|
|
2916
|
+
duration: oe,
|
|
2917
|
+
easing: le
|
|
2918
|
+
} = Et({
|
|
2919
2919
|
style: R,
|
|
2920
|
-
timeout:
|
|
2920
|
+
timeout: F,
|
|
2921
2921
|
easing: d
|
|
2922
2922
|
}, {
|
|
2923
2923
|
mode: "exit"
|
|
2924
2924
|
});
|
|
2925
|
-
if (
|
|
2926
|
-
const
|
|
2927
|
-
|
|
2925
|
+
if (F === "auto") {
|
|
2926
|
+
const Me = E.transitions.getAutoHeightDuration(ne);
|
|
2927
|
+
z.style.transitionDuration = `${Me}ms`, A.current = Me;
|
|
2928
2928
|
} else
|
|
2929
|
-
|
|
2930
|
-
|
|
2931
|
-
}),
|
|
2932
|
-
|
|
2933
|
-
},
|
|
2934
|
-
slots:
|
|
2935
|
-
slotProps:
|
|
2936
|
-
component:
|
|
2937
|
-
}, [
|
|
2938
|
-
ref:
|
|
2939
|
-
className:
|
|
2940
|
-
elementType:
|
|
2941
|
-
externalForwardedProps:
|
|
2942
|
-
ownerState:
|
|
2929
|
+
z.style.transitionDuration = typeof oe == "string" ? oe : `${oe}ms`;
|
|
2930
|
+
z.style[B] = L, z.style.transitionTimingFunction = le, b && b(z);
|
|
2931
|
+
}), T = (z) => {
|
|
2932
|
+
F === "auto" && k.start(A.current || 0, z), r && r(J.current, z);
|
|
2933
|
+
}, g = {
|
|
2934
|
+
slots: w,
|
|
2935
|
+
slotProps: _,
|
|
2936
|
+
component: h
|
|
2937
|
+
}, [U, ee] = Ie("root", {
|
|
2938
|
+
ref: Z,
|
|
2939
|
+
className: Q(j.root, l),
|
|
2940
|
+
elementType: fr,
|
|
2941
|
+
externalForwardedProps: g,
|
|
2942
|
+
ownerState: V,
|
|
2943
2943
|
additionalProps: {
|
|
2944
2944
|
style: {
|
|
2945
|
-
[
|
|
2945
|
+
[$ ? "minWidth" : "minHeight"]: L,
|
|
2946
2946
|
...R
|
|
2947
2947
|
}
|
|
2948
2948
|
}
|
|
2949
|
-
}), [
|
|
2950
|
-
ref:
|
|
2951
|
-
className:
|
|
2952
|
-
elementType:
|
|
2953
|
-
externalForwardedProps:
|
|
2954
|
-
ownerState:
|
|
2955
|
-
}), [
|
|
2956
|
-
className:
|
|
2957
|
-
elementType:
|
|
2958
|
-
externalForwardedProps:
|
|
2959
|
-
ownerState:
|
|
2949
|
+
}), [Oe, pn] = Ie("wrapper", {
|
|
2950
|
+
ref: O,
|
|
2951
|
+
className: j.wrapper,
|
|
2952
|
+
elementType: hr,
|
|
2953
|
+
externalForwardedProps: g,
|
|
2954
|
+
ownerState: V
|
|
2955
|
+
}), [fn, hn] = Ie("wrapperInner", {
|
|
2956
|
+
className: j.wrapperInner,
|
|
2957
|
+
elementType: mr,
|
|
2958
|
+
externalForwardedProps: g,
|
|
2959
|
+
ownerState: V
|
|
2960
2960
|
});
|
|
2961
|
-
return /* @__PURE__ */ v(
|
|
2961
|
+
return /* @__PURE__ */ v(C, {
|
|
2962
2962
|
in: c,
|
|
2963
2963
|
onEnter: ae,
|
|
2964
2964
|
onEntered: ce,
|
|
2965
2965
|
onEntering: ue,
|
|
2966
2966
|
onExit: pe,
|
|
2967
|
-
onExited:
|
|
2968
|
-
onExiting:
|
|
2969
|
-
addEndListener:
|
|
2970
|
-
nodeRef:
|
|
2971
|
-
timeout:
|
|
2972
|
-
...
|
|
2973
|
-
children: (
|
|
2974
|
-
ownerState:
|
|
2975
|
-
...
|
|
2967
|
+
onExited: K,
|
|
2968
|
+
onExiting: X,
|
|
2969
|
+
addEndListener: T,
|
|
2970
|
+
nodeRef: J,
|
|
2971
|
+
timeout: F === "auto" ? null : F,
|
|
2972
|
+
...D,
|
|
2973
|
+
children: (z, {
|
|
2974
|
+
ownerState: ne,
|
|
2975
|
+
...oe
|
|
2976
2976
|
}) => {
|
|
2977
|
-
const
|
|
2978
|
-
...
|
|
2979
|
-
state:
|
|
2977
|
+
const le = {
|
|
2978
|
+
...V,
|
|
2979
|
+
state: z
|
|
2980
2980
|
};
|
|
2981
|
-
return /* @__PURE__ */ v(
|
|
2982
|
-
...
|
|
2983
|
-
className:
|
|
2984
|
-
entered:
|
|
2985
|
-
exited: !c &&
|
|
2986
|
-
}[
|
|
2987
|
-
ownerState:
|
|
2988
|
-
...
|
|
2989
|
-
children: /* @__PURE__ */ v(
|
|
2990
|
-
...
|
|
2991
|
-
ownerState:
|
|
2992
|
-
children: /* @__PURE__ */ v(
|
|
2993
|
-
...
|
|
2994
|
-
ownerState:
|
|
2981
|
+
return /* @__PURE__ */ v(U, {
|
|
2982
|
+
...ee,
|
|
2983
|
+
className: Q(ee.className, {
|
|
2984
|
+
entered: j.entered,
|
|
2985
|
+
exited: !c && L === "0px" && j.hidden
|
|
2986
|
+
}[z]),
|
|
2987
|
+
ownerState: le,
|
|
2988
|
+
...oe,
|
|
2989
|
+
children: /* @__PURE__ */ v(Oe, {
|
|
2990
|
+
...pn,
|
|
2991
|
+
ownerState: le,
|
|
2992
|
+
children: /* @__PURE__ */ v(fn, {
|
|
2993
|
+
...hn,
|
|
2994
|
+
ownerState: le,
|
|
2995
2995
|
children: s
|
|
2996
2996
|
})
|
|
2997
2997
|
})
|
|
@@ -2999,7 +2999,7 @@ const cr = (t) => {
|
|
|
2999
2999
|
}
|
|
3000
3000
|
});
|
|
3001
3001
|
});
|
|
3002
|
-
process.env.NODE_ENV !== "production" && (
|
|
3002
|
+
process.env.NODE_ENV !== "production" && (je.propTypes = {
|
|
3003
3003
|
// ┌────────────────────────────── Warning ──────────────────────────────┐
|
|
3004
3004
|
// │ These PropTypes are generated from the TypeScript type definitions. │
|
|
3005
3005
|
// │ To update them, edit the d.ts file and run `pnpm proptypes`. │
|
|
@@ -3031,7 +3031,7 @@ process.env.NODE_ENV !== "production" && (ze.propTypes = {
|
|
|
3031
3031
|
* The component used for the root node.
|
|
3032
3032
|
* Either a string to use a HTML element or a component.
|
|
3033
3033
|
*/
|
|
3034
|
-
component:
|
|
3034
|
+
component: On,
|
|
3035
3035
|
/**
|
|
3036
3036
|
* The transition timing function.
|
|
3037
3037
|
* You may specify a single easing or a object containing enter and exit values.
|
|
@@ -3112,23 +3112,23 @@ process.env.NODE_ENV !== "production" && (ze.propTypes = {
|
|
|
3112
3112
|
exit: i.number
|
|
3113
3113
|
})])
|
|
3114
3114
|
});
|
|
3115
|
-
|
|
3116
|
-
function
|
|
3117
|
-
return
|
|
3115
|
+
je && (je.muiSupportAuto = !0);
|
|
3116
|
+
function Ir(t) {
|
|
3117
|
+
return Ce("PrivateSwitchBase", t);
|
|
3118
3118
|
}
|
|
3119
|
-
|
|
3120
|
-
const
|
|
3119
|
+
ve("PrivateSwitchBase", ["root", "checked", "disabled", "input", "edgeStart", "edgeEnd"]);
|
|
3120
|
+
const gr = (t) => {
|
|
3121
3121
|
const {
|
|
3122
3122
|
classes: e,
|
|
3123
3123
|
checked: n,
|
|
3124
3124
|
disabled: o,
|
|
3125
3125
|
edge: r
|
|
3126
3126
|
} = t, s = {
|
|
3127
|
-
root: ["root", n && "checked", o && "disabled", r && `edge${
|
|
3127
|
+
root: ["root", n && "checked", o && "disabled", r && `edge${xe(r)}`],
|
|
3128
3128
|
input: ["input"]
|
|
3129
3129
|
};
|
|
3130
|
-
return
|
|
3131
|
-
},
|
|
3130
|
+
return we(s, Ir, e);
|
|
3131
|
+
}, br = G(Mn, {
|
|
3132
3132
|
name: "MuiSwitchBase"
|
|
3133
3133
|
})({
|
|
3134
3134
|
padding: 9,
|
|
@@ -3166,9 +3166,9 @@ const mr = (t) => {
|
|
|
3166
3166
|
marginRight: -12
|
|
3167
3167
|
}
|
|
3168
3168
|
}]
|
|
3169
|
-
}),
|
|
3169
|
+
}), Sr = G("input", {
|
|
3170
3170
|
name: "MuiSwitchBase",
|
|
3171
|
-
shouldForwardProp:
|
|
3171
|
+
shouldForwardProp: Ht
|
|
3172
3172
|
})({
|
|
3173
3173
|
cursor: "inherit",
|
|
3174
3174
|
position: "absolute",
|
|
@@ -3180,123 +3180,123 @@ const mr = (t) => {
|
|
|
3180
3180
|
margin: 0,
|
|
3181
3181
|
padding: 0,
|
|
3182
3182
|
zIndex: 1
|
|
3183
|
-
}),
|
|
3183
|
+
}), sn = /* @__PURE__ */ M.forwardRef(function(e, n) {
|
|
3184
3184
|
const {
|
|
3185
3185
|
autoFocus: o,
|
|
3186
3186
|
checked: r,
|
|
3187
3187
|
checkedIcon: s,
|
|
3188
3188
|
defaultChecked: l,
|
|
3189
3189
|
disabled: a,
|
|
3190
|
-
disableFocusRipple:
|
|
3190
|
+
disableFocusRipple: h = !1,
|
|
3191
3191
|
edge: d = !1,
|
|
3192
3192
|
icon: c,
|
|
3193
3193
|
id: p,
|
|
3194
3194
|
inputProps: f,
|
|
3195
3195
|
inputRef: u,
|
|
3196
|
-
name:
|
|
3196
|
+
name: m,
|
|
3197
3197
|
onBlur: I,
|
|
3198
3198
|
onChange: b,
|
|
3199
|
-
onFocus:
|
|
3200
|
-
readOnly:
|
|
3201
|
-
required:
|
|
3199
|
+
onFocus: x,
|
|
3200
|
+
readOnly: w,
|
|
3201
|
+
required: _ = !1,
|
|
3202
3202
|
tabIndex: R,
|
|
3203
|
-
type:
|
|
3204
|
-
value:
|
|
3205
|
-
slots:
|
|
3206
|
-
slotProps:
|
|
3207
|
-
...
|
|
3208
|
-
} = e, [
|
|
3203
|
+
type: F,
|
|
3204
|
+
value: C,
|
|
3205
|
+
slots: D = {},
|
|
3206
|
+
slotProps: V = {},
|
|
3207
|
+
...j
|
|
3208
|
+
} = e, [E, k] = zn({
|
|
3209
3209
|
controlled: r,
|
|
3210
3210
|
default: !!l,
|
|
3211
3211
|
name: "SwitchBase",
|
|
3212
3212
|
state: "checked"
|
|
3213
|
-
}),
|
|
3214
|
-
|
|
3215
|
-
},
|
|
3216
|
-
I && I(
|
|
3217
|
-
},
|
|
3218
|
-
if (
|
|
3213
|
+
}), O = An(), A = (K) => {
|
|
3214
|
+
x && x(K), O && O.onFocus && O.onFocus(K);
|
|
3215
|
+
}, L = (K) => {
|
|
3216
|
+
I && I(K), O && O.onBlur && O.onBlur(K);
|
|
3217
|
+
}, $ = (K) => {
|
|
3218
|
+
if (K.nativeEvent.defaultPrevented || w)
|
|
3219
3219
|
return;
|
|
3220
|
-
const
|
|
3221
|
-
|
|
3220
|
+
const X = K.target.checked;
|
|
3221
|
+
k(X), b && b(K, X);
|
|
3222
3222
|
};
|
|
3223
|
-
let
|
|
3224
|
-
|
|
3225
|
-
const
|
|
3223
|
+
let B = a;
|
|
3224
|
+
O && typeof B > "u" && (B = O.disabled);
|
|
3225
|
+
const J = F === "checkbox" || F === "radio", Z = {
|
|
3226
3226
|
...e,
|
|
3227
|
-
checked:
|
|
3228
|
-
disabled:
|
|
3229
|
-
disableFocusRipple:
|
|
3227
|
+
checked: E,
|
|
3228
|
+
disabled: B,
|
|
3229
|
+
disableFocusRipple: h,
|
|
3230
3230
|
edge: d
|
|
3231
|
-
}, q =
|
|
3232
|
-
slots:
|
|
3231
|
+
}, q = gr(Z), ie = {
|
|
3232
|
+
slots: D,
|
|
3233
3233
|
slotProps: {
|
|
3234
3234
|
input: f,
|
|
3235
|
-
...
|
|
3235
|
+
...V
|
|
3236
3236
|
}
|
|
3237
|
-
}, [ae, ue] =
|
|
3237
|
+
}, [ae, ue] = Ie("root", {
|
|
3238
3238
|
ref: n,
|
|
3239
|
-
elementType:
|
|
3239
|
+
elementType: br,
|
|
3240
3240
|
className: q.root,
|
|
3241
3241
|
shouldForwardComponentProp: !0,
|
|
3242
3242
|
externalForwardedProps: {
|
|
3243
|
-
...
|
|
3243
|
+
...ie,
|
|
3244
3244
|
component: "span",
|
|
3245
|
-
...
|
|
3245
|
+
...j
|
|
3246
3246
|
},
|
|
3247
|
-
getSlotProps: (
|
|
3248
|
-
...
|
|
3249
|
-
onFocus: (
|
|
3250
|
-
|
|
3247
|
+
getSlotProps: (K) => ({
|
|
3248
|
+
...K,
|
|
3249
|
+
onFocus: (X) => {
|
|
3250
|
+
K.onFocus?.(X), A(X);
|
|
3251
3251
|
},
|
|
3252
|
-
onBlur: (
|
|
3253
|
-
|
|
3252
|
+
onBlur: (X) => {
|
|
3253
|
+
K.onBlur?.(X), L(X);
|
|
3254
3254
|
}
|
|
3255
3255
|
}),
|
|
3256
|
-
ownerState:
|
|
3256
|
+
ownerState: Z,
|
|
3257
3257
|
additionalProps: {
|
|
3258
3258
|
centerRipple: !0,
|
|
3259
|
-
focusRipple: !
|
|
3260
|
-
disabled:
|
|
3259
|
+
focusRipple: !h,
|
|
3260
|
+
disabled: B,
|
|
3261
3261
|
role: void 0,
|
|
3262
3262
|
tabIndex: null
|
|
3263
3263
|
}
|
|
3264
|
-
}), [ce, pe] =
|
|
3264
|
+
}), [ce, pe] = Ie("input", {
|
|
3265
3265
|
ref: u,
|
|
3266
|
-
elementType:
|
|
3266
|
+
elementType: Sr,
|
|
3267
3267
|
className: q.input,
|
|
3268
|
-
externalForwardedProps:
|
|
3269
|
-
getSlotProps: (
|
|
3270
|
-
...
|
|
3271
|
-
onChange: (
|
|
3272
|
-
|
|
3268
|
+
externalForwardedProps: ie,
|
|
3269
|
+
getSlotProps: (K) => ({
|
|
3270
|
+
...K,
|
|
3271
|
+
onChange: (X) => {
|
|
3272
|
+
K.onChange?.(X), $(X);
|
|
3273
3273
|
}
|
|
3274
3274
|
}),
|
|
3275
|
-
ownerState:
|
|
3275
|
+
ownerState: Z,
|
|
3276
3276
|
additionalProps: {
|
|
3277
3277
|
autoFocus: o,
|
|
3278
3278
|
checked: r,
|
|
3279
3279
|
defaultChecked: l,
|
|
3280
|
-
disabled:
|
|
3281
|
-
id:
|
|
3282
|
-
name:
|
|
3283
|
-
readOnly:
|
|
3284
|
-
required:
|
|
3280
|
+
disabled: B,
|
|
3281
|
+
id: J ? p : void 0,
|
|
3282
|
+
name: m,
|
|
3283
|
+
readOnly: w,
|
|
3284
|
+
required: _,
|
|
3285
3285
|
tabIndex: R,
|
|
3286
|
-
type:
|
|
3287
|
-
...
|
|
3288
|
-
value:
|
|
3286
|
+
type: F,
|
|
3287
|
+
...F === "checkbox" && C === void 0 ? {} : {
|
|
3288
|
+
value: C
|
|
3289
3289
|
}
|
|
3290
3290
|
}
|
|
3291
3291
|
});
|
|
3292
|
-
return /* @__PURE__ */
|
|
3292
|
+
return /* @__PURE__ */ Y(ae, {
|
|
3293
3293
|
...ue,
|
|
3294
3294
|
children: [/* @__PURE__ */ v(ce, {
|
|
3295
3295
|
...pe
|
|
3296
|
-
}),
|
|
3296
|
+
}), E ? s : c]
|
|
3297
3297
|
});
|
|
3298
3298
|
});
|
|
3299
|
-
process.env.NODE_ENV !== "production" && (
|
|
3299
|
+
process.env.NODE_ENV !== "production" && (sn.propTypes = {
|
|
3300
3300
|
/**
|
|
3301
3301
|
* If `true`, the `input` element is focused during the first mount.
|
|
3302
3302
|
*/
|
|
@@ -3353,7 +3353,7 @@ process.env.NODE_ENV !== "production" && (nn.propTypes = {
|
|
|
3353
3353
|
/**
|
|
3354
3354
|
* Pass a ref to the `input` element.
|
|
3355
3355
|
*/
|
|
3356
|
-
inputRef:
|
|
3356
|
+
inputRef: Pn,
|
|
3357
3357
|
/*
|
|
3358
3358
|
* @ignore
|
|
3359
3359
|
*/
|
|
@@ -3415,41 +3415,41 @@ process.env.NODE_ENV !== "production" && (nn.propTypes = {
|
|
|
3415
3415
|
*/
|
|
3416
3416
|
value: i.any
|
|
3417
3417
|
});
|
|
3418
|
-
const
|
|
3418
|
+
const yr = ge(/* @__PURE__ */ v("path", {
|
|
3419
3419
|
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"
|
|
3420
|
-
}), "CheckBoxOutlineBlank"),
|
|
3420
|
+
}), "CheckBoxOutlineBlank"), xr = ge(/* @__PURE__ */ v("path", {
|
|
3421
3421
|
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"
|
|
3422
|
-
}), "CheckBox"),
|
|
3422
|
+
}), "CheckBox"), Er = ge(/* @__PURE__ */ v("path", {
|
|
3423
3423
|
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"
|
|
3424
3424
|
}), "IndeterminateCheckBox");
|
|
3425
|
-
function
|
|
3426
|
-
return
|
|
3425
|
+
function Cr(t) {
|
|
3426
|
+
return Ce("MuiCheckbox", t);
|
|
3427
3427
|
}
|
|
3428
|
-
const
|
|
3428
|
+
const Ye = ve("MuiCheckbox", ["root", "checked", "disabled", "indeterminate", "colorPrimary", "colorSecondary", "sizeSmall", "sizeMedium"]), vr = (t) => {
|
|
3429
3429
|
const {
|
|
3430
3430
|
classes: e,
|
|
3431
3431
|
indeterminate: n,
|
|
3432
3432
|
color: o,
|
|
3433
3433
|
size: r
|
|
3434
3434
|
} = t, s = {
|
|
3435
|
-
root: ["root", n && "indeterminate", `color${
|
|
3436
|
-
}, l =
|
|
3435
|
+
root: ["root", n && "indeterminate", `color${xe(o)}`, `size${xe(r)}`]
|
|
3436
|
+
}, l = we(s, Cr, e);
|
|
3437
3437
|
return {
|
|
3438
3438
|
...e,
|
|
3439
3439
|
// forward the disabled and checked classes to the SwitchBase
|
|
3440
3440
|
...l
|
|
3441
3441
|
};
|
|
3442
|
-
},
|
|
3443
|
-
shouldForwardProp: (t) =>
|
|
3442
|
+
}, wr = G(sn, {
|
|
3443
|
+
shouldForwardProp: (t) => Ht(t) || t === "classes",
|
|
3444
3444
|
name: "MuiCheckbox",
|
|
3445
3445
|
slot: "Root",
|
|
3446
3446
|
overridesResolver: (t, e) => {
|
|
3447
3447
|
const {
|
|
3448
3448
|
ownerState: n
|
|
3449
3449
|
} = t;
|
|
3450
|
-
return [e.root, n.indeterminate && e.indeterminate, e[`size${
|
|
3450
|
+
return [e.root, n.indeterminate && e.indeterminate, e[`size${xe(n.size)}`], n.color !== "default" && e[`color${xe(n.color)}`]];
|
|
3451
3451
|
}
|
|
3452
|
-
})(
|
|
3452
|
+
})(Ut(({
|
|
3453
3453
|
theme: t
|
|
3454
3454
|
}) => ({
|
|
3455
3455
|
color: (t.vars || t).palette.text.secondary,
|
|
@@ -3463,7 +3463,7 @@ const Je = Ce("MuiCheckbox", ["root", "checked", "disabled", "indeterminate", "c
|
|
|
3463
3463
|
backgroundColor: t.alpha((t.vars || t).palette.action.active, (t.vars || t).palette.action.hoverOpacity)
|
|
3464
3464
|
}
|
|
3465
3465
|
}
|
|
3466
|
-
}, ...Object.entries(t.palette).filter(
|
|
3466
|
+
}, ...Object.entries(t.palette).filter(vt()).map(([e]) => ({
|
|
3467
3467
|
props: {
|
|
3468
3468
|
color: e,
|
|
3469
3469
|
disableRipple: !1
|
|
@@ -3473,15 +3473,15 @@ const Je = Ce("MuiCheckbox", ["root", "checked", "disabled", "indeterminate", "c
|
|
|
3473
3473
|
backgroundColor: t.alpha((t.vars || t).palette[e].main, (t.vars || t).palette.action.hoverOpacity)
|
|
3474
3474
|
}
|
|
3475
3475
|
}
|
|
3476
|
-
})), ...Object.entries(t.palette).filter(
|
|
3476
|
+
})), ...Object.entries(t.palette).filter(vt()).map(([e]) => ({
|
|
3477
3477
|
props: {
|
|
3478
3478
|
color: e
|
|
3479
3479
|
},
|
|
3480
3480
|
style: {
|
|
3481
|
-
[`&.${
|
|
3481
|
+
[`&.${Ye.checked}, &.${Ye.indeterminate}`]: {
|
|
3482
3482
|
color: (t.vars || t).palette[e].main
|
|
3483
3483
|
},
|
|
3484
|
-
[`&.${
|
|
3484
|
+
[`&.${Ye.disabled}`]: {
|
|
3485
3485
|
color: (t.vars || t).palette.action.disabled
|
|
3486
3486
|
}
|
|
3487
3487
|
}
|
|
@@ -3499,63 +3499,63 @@ const Je = Ce("MuiCheckbox", ["root", "checked", "disabled", "indeterminate", "c
|
|
|
3499
3499
|
}
|
|
3500
3500
|
}
|
|
3501
3501
|
}]
|
|
3502
|
-
}))),
|
|
3503
|
-
const o =
|
|
3502
|
+
}))), Tr = /* @__PURE__ */ v(xr, {}), kr = /* @__PURE__ */ v(yr, {}), Or = /* @__PURE__ */ v(Er, {}), ln = /* @__PURE__ */ M.forwardRef(function(e, n) {
|
|
3503
|
+
const o = Kt({
|
|
3504
3504
|
props: e,
|
|
3505
3505
|
name: "MuiCheckbox"
|
|
3506
3506
|
}), {
|
|
3507
|
-
checkedIcon: r =
|
|
3507
|
+
checkedIcon: r = Tr,
|
|
3508
3508
|
color: s = "primary",
|
|
3509
|
-
icon: l =
|
|
3509
|
+
icon: l = kr,
|
|
3510
3510
|
indeterminate: a = !1,
|
|
3511
|
-
indeterminateIcon:
|
|
3511
|
+
indeterminateIcon: h = Or,
|
|
3512
3512
|
inputProps: d,
|
|
3513
3513
|
size: c = "medium",
|
|
3514
3514
|
disableRipple: p = !1,
|
|
3515
3515
|
className: f,
|
|
3516
3516
|
slots: u = {},
|
|
3517
|
-
slotProps:
|
|
3517
|
+
slotProps: m = {},
|
|
3518
3518
|
...I
|
|
3519
|
-
} = o, b = a ?
|
|
3519
|
+
} = o, b = a ? h : l, x = a ? h : r, w = {
|
|
3520
3520
|
...o,
|
|
3521
3521
|
disableRipple: p,
|
|
3522
3522
|
color: s,
|
|
3523
3523
|
indeterminate: a,
|
|
3524
3524
|
size: c
|
|
3525
|
-
},
|
|
3525
|
+
}, _ = vr(w), R = m.input ?? d, [F, C] = Ie("root", {
|
|
3526
3526
|
ref: n,
|
|
3527
|
-
elementType:
|
|
3528
|
-
className:
|
|
3527
|
+
elementType: wr,
|
|
3528
|
+
className: Q(_.root, f),
|
|
3529
3529
|
shouldForwardComponentProp: !0,
|
|
3530
3530
|
externalForwardedProps: {
|
|
3531
3531
|
slots: u,
|
|
3532
|
-
slotProps:
|
|
3532
|
+
slotProps: m,
|
|
3533
3533
|
...I
|
|
3534
3534
|
},
|
|
3535
|
-
ownerState:
|
|
3535
|
+
ownerState: w,
|
|
3536
3536
|
additionalProps: {
|
|
3537
3537
|
type: "checkbox",
|
|
3538
|
-
icon: /* @__PURE__ */
|
|
3538
|
+
icon: /* @__PURE__ */ M.cloneElement(b, {
|
|
3539
3539
|
fontSize: b.props.fontSize ?? c
|
|
3540
3540
|
}),
|
|
3541
|
-
checkedIcon: /* @__PURE__ */
|
|
3542
|
-
fontSize:
|
|
3541
|
+
checkedIcon: /* @__PURE__ */ M.cloneElement(x, {
|
|
3542
|
+
fontSize: x.props.fontSize ?? c
|
|
3543
3543
|
}),
|
|
3544
3544
|
disableRipple: p,
|
|
3545
3545
|
slots: u,
|
|
3546
3546
|
slotProps: {
|
|
3547
|
-
input:
|
|
3547
|
+
input: Nn(typeof R == "function" ? R(w) : R, {
|
|
3548
3548
|
"data-indeterminate": a
|
|
3549
3549
|
})
|
|
3550
3550
|
}
|
|
3551
3551
|
}
|
|
3552
3552
|
});
|
|
3553
|
-
return /* @__PURE__ */ v(
|
|
3554
|
-
...
|
|
3555
|
-
classes:
|
|
3553
|
+
return /* @__PURE__ */ v(F, {
|
|
3554
|
+
...C,
|
|
3555
|
+
classes: _
|
|
3556
3556
|
});
|
|
3557
3557
|
});
|
|
3558
|
-
process.env.NODE_ENV !== "production" && (
|
|
3558
|
+
process.env.NODE_ENV !== "production" && (ln.propTypes = {
|
|
3559
3559
|
// ┌────────────────────────────── Warning ──────────────────────────────┐
|
|
3560
3560
|
// │ These PropTypes are generated from the TypeScript type definitions. │
|
|
3561
3561
|
// │ To update them, edit the d.ts file and run `pnpm proptypes`. │
|
|
@@ -3669,15 +3669,15 @@ process.env.NODE_ENV !== "production" && (on.propTypes = {
|
|
|
3669
3669
|
*/
|
|
3670
3670
|
value: i.any
|
|
3671
3671
|
});
|
|
3672
|
-
const
|
|
3672
|
+
const Mr = (t, e, n) => typeof n == "function" ? n(t, e) : n, Pr = (t) => {
|
|
3673
3673
|
const {
|
|
3674
3674
|
runItemPlugins: e,
|
|
3675
3675
|
publicAPI: n,
|
|
3676
3676
|
store: o
|
|
3677
|
-
} =
|
|
3677
|
+
} = be(), r = M.useContext(Ee), s = W(o, Mr, t.itemId, r), {
|
|
3678
3678
|
id: l,
|
|
3679
3679
|
itemId: a,
|
|
3680
|
-
label:
|
|
3680
|
+
label: h,
|
|
3681
3681
|
children: d,
|
|
3682
3682
|
rootRef: c
|
|
3683
3683
|
} = t, {
|
|
@@ -3685,142 +3685,142 @@ const Tr = (t, e, n) => typeof n == "function" ? n(t, e) : n, kr = (t) => {
|
|
|
3685
3685
|
contentRef: f,
|
|
3686
3686
|
propsEnhancers: u
|
|
3687
3687
|
} = e(t), {
|
|
3688
|
-
interactions:
|
|
3688
|
+
interactions: m,
|
|
3689
3689
|
status: I
|
|
3690
|
-
} =
|
|
3690
|
+
} = or({
|
|
3691
3691
|
itemId: a,
|
|
3692
3692
|
children: d
|
|
3693
|
-
}), b =
|
|
3693
|
+
}), b = M.useRef(null), x = M.useRef(null), w = Ne(c, p, b), _ = Ne(f, x), R = M.useRef(null), F = W(o, N.isCheckboxSelectionEnabled), C = W(o, ke.treeItemIdAttribute, a, l), D = W(o, de.isItemTheDefaultFocusableItem, a), V = {
|
|
3694
3694
|
rootRefObject: b,
|
|
3695
|
-
contentRefObject:
|
|
3696
|
-
interactions:
|
|
3697
|
-
},
|
|
3698
|
-
|
|
3699
|
-
},
|
|
3700
|
-
if (
|
|
3695
|
+
contentRefObject: x,
|
|
3696
|
+
interactions: m
|
|
3697
|
+
}, j = (T) => (g) => {
|
|
3698
|
+
T.onFocus?.(g), !g.defaultMuiPrevented && !I.focused && y.canItemBeFocused(o.state, a) && g.currentTarget === g.target && o.focus.focusItem(g, a);
|
|
3699
|
+
}, E = (T) => (g) => {
|
|
3700
|
+
if (T.onBlur?.(g), g.defaultMuiPrevented)
|
|
3701
3701
|
return;
|
|
3702
|
-
const
|
|
3702
|
+
const U = o.items.getItemDOMElement(a);
|
|
3703
3703
|
I.editing || // 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
|
|
3704
3704
|
// 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
|
|
3705
|
-
|
|
3706
|
-
},
|
|
3707
|
-
|
|
3708
|
-
},
|
|
3709
|
-
|
|
3710
|
-
},
|
|
3711
|
-
|
|
3712
|
-
},
|
|
3713
|
-
|
|
3714
|
-
},
|
|
3715
|
-
|
|
3705
|
+
g.relatedTarget && ot(g.relatedTarget, U) && (g.target && g.target?.dataset?.element === "labelInput" && ot(g.target, U) || g.relatedTarget?.dataset?.element === "labelInput") || o.focus.removeFocusedItem();
|
|
3706
|
+
}, k = (T) => (g) => {
|
|
3707
|
+
T.onKeyDown?.(g), !(g.defaultMuiPrevented || g.target?.dataset?.element === "labelInput") && o.keyboardNavigation.handleItemKeyDown(g, a);
|
|
3708
|
+
}, O = (T) => (g) => {
|
|
3709
|
+
T.onDoubleClick?.(g), !g.defaultMuiPrevented && m.toggleItemEditing();
|
|
3710
|
+
}, A = (T) => (g) => {
|
|
3711
|
+
T.onClick?.(g), o.items.handleItemClick(g, a), !(g.defaultMuiPrevented || R.current?.contains(g.target)) && (H.triggerSlot(o.state) === "content" && m.handleExpansion(g), F || m.handleSelection(g));
|
|
3712
|
+
}, L = (T) => (g) => {
|
|
3713
|
+
T.onMouseDown?.(g), !g.defaultMuiPrevented && (g.shiftKey || g.ctrlKey || g.metaKey || I.disabled) && g.preventDefault();
|
|
3714
|
+
}, $ = (T) => (g) => {
|
|
3715
|
+
T.onClick?.(g), !g.defaultMuiPrevented && H.triggerSlot(o.state) === "iconContainer" && m.handleExpansion(g);
|
|
3716
3716
|
};
|
|
3717
3717
|
return {
|
|
3718
3718
|
getContextProviderProps: () => ({
|
|
3719
3719
|
itemId: a,
|
|
3720
3720
|
id: l
|
|
3721
3721
|
}),
|
|
3722
|
-
getRootProps: (
|
|
3723
|
-
const
|
|
3724
|
-
ref:
|
|
3722
|
+
getRootProps: (T = {}) => {
|
|
3723
|
+
const g = S({}, re(t), re(T)), U = S({}, g, {
|
|
3724
|
+
ref: w,
|
|
3725
3725
|
role: "treeitem",
|
|
3726
|
-
tabIndex:
|
|
3727
|
-
id:
|
|
3726
|
+
tabIndex: D ? 0 : -1,
|
|
3727
|
+
id: C,
|
|
3728
3728
|
"aria-expanded": I.expandable ? I.expanded : void 0,
|
|
3729
3729
|
"aria-disabled": I.disabled || void 0
|
|
3730
|
-
},
|
|
3731
|
-
style: S({},
|
|
3730
|
+
}, T, {
|
|
3731
|
+
style: S({}, T.style ?? {}, {
|
|
3732
3732
|
"--TreeView-itemDepth": s
|
|
3733
3733
|
}),
|
|
3734
|
-
onFocus:
|
|
3735
|
-
onBlur:
|
|
3736
|
-
onKeyDown:
|
|
3737
|
-
}),
|
|
3738
|
-
externalEventHandlers:
|
|
3734
|
+
onFocus: j(g),
|
|
3735
|
+
onBlur: E(g),
|
|
3736
|
+
onKeyDown: k(g)
|
|
3737
|
+
}), ee = u.root?.(S({}, V, {
|
|
3738
|
+
externalEventHandlers: g
|
|
3739
3739
|
})) ?? {};
|
|
3740
|
-
return S({},
|
|
3740
|
+
return S({}, U, ee);
|
|
3741
3741
|
},
|
|
3742
|
-
getContentProps: (
|
|
3743
|
-
const
|
|
3744
|
-
ref:
|
|
3745
|
-
onClick:
|
|
3746
|
-
onMouseDown:
|
|
3742
|
+
getContentProps: (T = {}) => {
|
|
3743
|
+
const g = re(T), U = S({}, g, T, {
|
|
3744
|
+
ref: _,
|
|
3745
|
+
onClick: A(g),
|
|
3746
|
+
onMouseDown: L(g),
|
|
3747
3747
|
status: I
|
|
3748
3748
|
});
|
|
3749
|
-
["expanded", "selected", "focused", "disabled", "editing", "editable"].forEach((
|
|
3750
|
-
I[
|
|
3749
|
+
["expanded", "selected", "focused", "disabled", "editing", "editable"].forEach((Oe) => {
|
|
3750
|
+
I[Oe] && (U[`data-${Oe}`] = "");
|
|
3751
3751
|
});
|
|
3752
|
-
const
|
|
3753
|
-
externalEventHandlers:
|
|
3752
|
+
const ee = u.content?.(S({}, V, {
|
|
3753
|
+
externalEventHandlers: g
|
|
3754
3754
|
})) ?? {};
|
|
3755
|
-
return S({},
|
|
3755
|
+
return S({}, U, ee);
|
|
3756
3756
|
},
|
|
3757
|
-
getGroupTransitionProps: (
|
|
3758
|
-
const
|
|
3759
|
-
return S({},
|
|
3757
|
+
getGroupTransitionProps: (T = {}) => {
|
|
3758
|
+
const g = re(T);
|
|
3759
|
+
return S({}, g, {
|
|
3760
3760
|
unmountOnExit: !0,
|
|
3761
3761
|
component: "ul",
|
|
3762
3762
|
role: "group",
|
|
3763
3763
|
in: I.expanded,
|
|
3764
3764
|
children: d
|
|
3765
|
-
},
|
|
3765
|
+
}, T);
|
|
3766
3766
|
},
|
|
3767
|
-
getIconContainerProps: (
|
|
3768
|
-
const
|
|
3769
|
-
return S({},
|
|
3770
|
-
onClick:
|
|
3767
|
+
getIconContainerProps: (T = {}) => {
|
|
3768
|
+
const g = re(T);
|
|
3769
|
+
return S({}, g, T, {
|
|
3770
|
+
onClick: $(g)
|
|
3771
3771
|
});
|
|
3772
3772
|
},
|
|
3773
|
-
getCheckboxProps: (
|
|
3774
|
-
const
|
|
3773
|
+
getCheckboxProps: (T = {}) => {
|
|
3774
|
+
const g = re(T), U = S({}, g, {
|
|
3775
3775
|
ref: R,
|
|
3776
3776
|
"aria-hidden": !0
|
|
3777
|
-
},
|
|
3778
|
-
externalEventHandlers:
|
|
3777
|
+
}, T), ee = u.checkbox?.(S({}, V, {
|
|
3778
|
+
externalEventHandlers: g
|
|
3779
3779
|
})) ?? {};
|
|
3780
|
-
return S({},
|
|
3780
|
+
return S({}, U, ee);
|
|
3781
3781
|
},
|
|
3782
|
-
getLabelProps: (
|
|
3783
|
-
const
|
|
3784
|
-
children:
|
|
3785
|
-
},
|
|
3786
|
-
onDoubleClick:
|
|
3787
|
-
}),
|
|
3788
|
-
externalEventHandlers:
|
|
3782
|
+
getLabelProps: (T = {}) => {
|
|
3783
|
+
const g = S({}, re(T)), U = S({}, g, {
|
|
3784
|
+
children: h
|
|
3785
|
+
}, T, {
|
|
3786
|
+
onDoubleClick: O(g)
|
|
3787
|
+
}), ee = u.label?.(S({}, V, {
|
|
3788
|
+
externalEventHandlers: g
|
|
3789
3789
|
})) ?? {};
|
|
3790
|
-
return S({},
|
|
3790
|
+
return S({}, ee, U);
|
|
3791
3791
|
},
|
|
3792
|
-
getLabelInputProps: (
|
|
3793
|
-
const
|
|
3794
|
-
externalEventHandlers:
|
|
3792
|
+
getLabelInputProps: (T = {}) => {
|
|
3793
|
+
const g = re(T), U = u.labelInput?.(S({}, V, {
|
|
3794
|
+
externalEventHandlers: g
|
|
3795
3795
|
})) ?? {};
|
|
3796
|
-
return S({},
|
|
3796
|
+
return S({}, T, U);
|
|
3797
3797
|
},
|
|
3798
|
-
getDragAndDropOverlayProps: (
|
|
3799
|
-
const
|
|
3800
|
-
externalEventHandlers:
|
|
3798
|
+
getDragAndDropOverlayProps: (T = {}) => {
|
|
3799
|
+
const g = re(T), U = u.dragAndDropOverlay?.(S({}, V, {
|
|
3800
|
+
externalEventHandlers: g
|
|
3801
3801
|
})) ?? {};
|
|
3802
|
-
return S({},
|
|
3802
|
+
return S({}, T, U);
|
|
3803
3803
|
},
|
|
3804
|
-
getErrorContainerProps: (
|
|
3805
|
-
const
|
|
3806
|
-
return S({},
|
|
3804
|
+
getErrorContainerProps: (T = {}) => {
|
|
3805
|
+
const g = re(T);
|
|
3806
|
+
return S({}, g, T);
|
|
3807
3807
|
},
|
|
3808
|
-
getLoadingContainerProps: (
|
|
3809
|
-
const
|
|
3808
|
+
getLoadingContainerProps: (T = {}) => {
|
|
3809
|
+
const g = re(T);
|
|
3810
3810
|
return S({
|
|
3811
3811
|
size: "12px",
|
|
3812
3812
|
thickness: 6
|
|
3813
|
-
},
|
|
3813
|
+
}, g, T);
|
|
3814
3814
|
},
|
|
3815
|
-
rootRef:
|
|
3815
|
+
rootRef: w,
|
|
3816
3816
|
status: I,
|
|
3817
3817
|
publicAPI: n
|
|
3818
3818
|
};
|
|
3819
3819
|
};
|
|
3820
|
-
function
|
|
3821
|
-
return
|
|
3820
|
+
function Rr(t) {
|
|
3821
|
+
return Ce("MuiTreeItem", t);
|
|
3822
3822
|
}
|
|
3823
|
-
|
|
3823
|
+
ve("MuiTreeItem", [
|
|
3824
3824
|
"root",
|
|
3825
3825
|
"content",
|
|
3826
3826
|
"groupTransition",
|
|
@@ -3839,15 +3839,15 @@ Ce("MuiTreeItem", [
|
|
|
3839
3839
|
"editable",
|
|
3840
3840
|
"editing"
|
|
3841
3841
|
]);
|
|
3842
|
-
const
|
|
3842
|
+
const Lr = ge(/* @__PURE__ */ v("path", {
|
|
3843
3843
|
d: "M10 6 8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z"
|
|
3844
|
-
}), "TreeViewExpandIcon"),
|
|
3844
|
+
}), "TreeViewExpandIcon"), Dr = ge(/* @__PURE__ */ v("path", {
|
|
3845
3845
|
d: "M16.59 8.59 12 13.17 7.41 8.59 6 10l6 6 6-6z"
|
|
3846
|
-
}), "TreeViewCollapseIcon"),
|
|
3847
|
-
function
|
|
3846
|
+
}), "TreeViewCollapseIcon"), _r = ["ownerState"];
|
|
3847
|
+
function Ze(t, e, n) {
|
|
3848
3848
|
return t !== void 0 ? t : e !== void 0 ? e : n;
|
|
3849
3849
|
}
|
|
3850
|
-
function
|
|
3850
|
+
function an(t) {
|
|
3851
3851
|
const {
|
|
3852
3852
|
slots: e,
|
|
3853
3853
|
slotProps: n,
|
|
@@ -3855,23 +3855,23 @@ function rn(t) {
|
|
|
3855
3855
|
} = t, {
|
|
3856
3856
|
slots: r,
|
|
3857
3857
|
slotProps: s
|
|
3858
|
-
} =
|
|
3859
|
-
collapseIcon:
|
|
3860
|
-
expandIcon:
|
|
3861
|
-
endIcon:
|
|
3858
|
+
} = Gt(), l = {
|
|
3859
|
+
collapseIcon: Ze(e?.collapseIcon, r.collapseIcon, Dr),
|
|
3860
|
+
expandIcon: Ze(e?.expandIcon, r.expandIcon, Lr),
|
|
3861
|
+
endIcon: Ze(e?.endIcon, r.endIcon),
|
|
3862
3862
|
icon: e?.icon
|
|
3863
3863
|
};
|
|
3864
3864
|
let a;
|
|
3865
3865
|
l?.icon ? a = "icon" : o.expandable ? o.expanded ? a = "collapseIcon" : a = "expandIcon" : a = "endIcon";
|
|
3866
|
-
const
|
|
3867
|
-
elementType:
|
|
3868
|
-
externalSlotProps: (p) => S({},
|
|
3866
|
+
const h = l[a], d = te({
|
|
3867
|
+
elementType: h,
|
|
3868
|
+
externalSlotProps: (p) => S({}, Ct(s[a], p), Ct(n?.[a], p)),
|
|
3869
3869
|
// TODO: Add proper ownerState
|
|
3870
3870
|
ownerState: {}
|
|
3871
|
-
}), c =
|
|
3872
|
-
return
|
|
3871
|
+
}), c = Be(d, _r);
|
|
3872
|
+
return h ? /* @__PURE__ */ v(h, S({}, c)) : null;
|
|
3873
3873
|
}
|
|
3874
|
-
process.env.NODE_ENV !== "production" && (
|
|
3874
|
+
process.env.NODE_ENV !== "production" && (an.propTypes = {
|
|
3875
3875
|
// ----------------------------- Warning --------------------------------
|
|
3876
3876
|
// | These PropTypes are generated from the TypeScript type definitions |
|
|
3877
3877
|
// | To update them edit the TypeScript types and run "pnpm proptypes" |
|
|
@@ -3898,10 +3898,10 @@ process.env.NODE_ENV !== "production" && (rn.propTypes = {
|
|
|
3898
3898
|
selected: i.bool.isRequired
|
|
3899
3899
|
}).isRequired
|
|
3900
3900
|
});
|
|
3901
|
-
const
|
|
3901
|
+
const Ar = G("div", {
|
|
3902
3902
|
name: "MuiTreeItemDragAndDropOverlay",
|
|
3903
3903
|
slot: "Root",
|
|
3904
|
-
shouldForwardProp: (t) =>
|
|
3904
|
+
shouldForwardProp: (t) => st(t) && t !== "action"
|
|
3905
3905
|
})(({
|
|
3906
3906
|
theme: t
|
|
3907
3907
|
}) => ({
|
|
@@ -3919,7 +3919,7 @@ const Lr = B("div", {
|
|
|
3919
3919
|
style: {
|
|
3920
3920
|
marginLeft: "calc(var(--TreeView-indentMultiplier) * var(--TreeView-itemDepth))",
|
|
3921
3921
|
borderRadius: t.shape.borderRadius,
|
|
3922
|
-
backgroundColor: t.vars ? `rgba(${t.vars.palette.primary.darkChannel} / ${t.vars.palette.action.focusOpacity})` :
|
|
3922
|
+
backgroundColor: t.vars ? `rgba(${t.vars.palette.primary.darkChannel} / ${t.vars.palette.action.focusOpacity})` : Se(t.palette.primary.dark, t.palette.action.focusOpacity)
|
|
3923
3923
|
}
|
|
3924
3924
|
}, {
|
|
3925
3925
|
props: {
|
|
@@ -3947,10 +3947,10 @@ const Lr = B("div", {
|
|
|
3947
3947
|
}
|
|
3948
3948
|
}]
|
|
3949
3949
|
}));
|
|
3950
|
-
function
|
|
3951
|
-
return t.action == null ? null : /* @__PURE__ */ v(
|
|
3950
|
+
function cn(t) {
|
|
3951
|
+
return t.action == null ? null : /* @__PURE__ */ v(Ar, S({}, t));
|
|
3952
3952
|
}
|
|
3953
|
-
process.env.NODE_ENV !== "production" && (
|
|
3953
|
+
process.env.NODE_ENV !== "production" && (cn.propTypes = {
|
|
3954
3954
|
// ----------------------------- Warning --------------------------------
|
|
3955
3955
|
// | These PropTypes are generated from the TypeScript type definitions |
|
|
3956
3956
|
// | To update them edit the TypeScript types and run "pnpm proptypes" |
|
|
@@ -3958,7 +3958,7 @@ process.env.NODE_ENV !== "production" && (sn.propTypes = {
|
|
|
3958
3958
|
action: i.oneOf(["make-child", "move-to-parent", "reorder-above", "reorder-below"]),
|
|
3959
3959
|
style: i.object
|
|
3960
3960
|
});
|
|
3961
|
-
function
|
|
3961
|
+
function dn(t) {
|
|
3962
3962
|
const {
|
|
3963
3963
|
children: e,
|
|
3964
3964
|
itemId: n,
|
|
@@ -3966,8 +3966,8 @@ function ln(t) {
|
|
|
3966
3966
|
} = t, {
|
|
3967
3967
|
wrapItem: r,
|
|
3968
3968
|
store: s
|
|
3969
|
-
} =
|
|
3970
|
-
return /* @__PURE__ */ v(
|
|
3969
|
+
} = be(), l = W(s, ke.treeItemIdAttribute, n, o);
|
|
3970
|
+
return /* @__PURE__ */ v(M.Fragment, {
|
|
3971
3971
|
children: r({
|
|
3972
3972
|
children: e,
|
|
3973
3973
|
itemId: n,
|
|
@@ -3976,7 +3976,7 @@ function ln(t) {
|
|
|
3976
3976
|
})
|
|
3977
3977
|
});
|
|
3978
3978
|
}
|
|
3979
|
-
process.env.NODE_ENV !== "production" && (
|
|
3979
|
+
process.env.NODE_ENV !== "production" && (dn.propTypes = {
|
|
3980
3980
|
// ----------------------------- Warning --------------------------------
|
|
3981
3981
|
// | These PropTypes are generated from the TypeScript type definitions |
|
|
3982
3982
|
// | To update them edit the TypeScript types and run "pnpm proptypes" |
|
|
@@ -3985,7 +3985,7 @@ process.env.NODE_ENV !== "production" && (ln.propTypes = {
|
|
|
3985
3985
|
id: i.string,
|
|
3986
3986
|
itemId: i.string.isRequired
|
|
3987
3987
|
});
|
|
3988
|
-
const
|
|
3988
|
+
const Nr = G("input", {
|
|
3989
3989
|
name: "MuiTreeItem",
|
|
3990
3990
|
slot: "LabelInput"
|
|
3991
3991
|
})(({
|
|
@@ -4000,7 +4000,7 @@ const Dr = B("input", {
|
|
|
4000
4000
|
"&:focus": {
|
|
4001
4001
|
outline: `1px solid ${(t.vars || t).palette.primary.main}`
|
|
4002
4002
|
}
|
|
4003
|
-
})),
|
|
4003
|
+
})), Fr = ["visible"], Vr = ["id", "itemId", "label", "disabled", "disableSelection", "children", "slots", "slotProps", "classes"], zr = qt(), jr = G("li", {
|
|
4004
4004
|
name: "MuiTreeItem",
|
|
4005
4005
|
slot: "Root"
|
|
4006
4006
|
})({
|
|
@@ -4008,10 +4008,10 @@ const Dr = B("input", {
|
|
|
4008
4008
|
margin: 0,
|
|
4009
4009
|
padding: 0,
|
|
4010
4010
|
outline: 0
|
|
4011
|
-
}),
|
|
4011
|
+
}), $r = G("div", {
|
|
4012
4012
|
name: "MuiTreeItem",
|
|
4013
4013
|
slot: "Content",
|
|
4014
|
-
shouldForwardProp: (t) =>
|
|
4014
|
+
shouldForwardProp: (t) => st(t) && t !== "status"
|
|
4015
4015
|
})(({
|
|
4016
4016
|
theme: t
|
|
4017
4017
|
}) => ({
|
|
@@ -4043,22 +4043,22 @@ const Dr = B("input", {
|
|
|
4043
4043
|
backgroundColor: (t.vars || t).palette.action.focus
|
|
4044
4044
|
},
|
|
4045
4045
|
"&[data-selected]": {
|
|
4046
|
-
backgroundColor: t.vars ? `rgba(${t.vars.palette.primary.mainChannel} / ${t.vars.palette.action.selectedOpacity})` :
|
|
4046
|
+
backgroundColor: t.vars ? `rgba(${t.vars.palette.primary.mainChannel} / ${t.vars.palette.action.selectedOpacity})` : Se(t.palette.primary.main, t.palette.action.selectedOpacity),
|
|
4047
4047
|
"&:hover": {
|
|
4048
|
-
backgroundColor: t.vars ? `rgba(${t.vars.palette.primary.mainChannel} / calc(${t.vars.palette.action.selectedOpacity} + ${t.vars.palette.action.hoverOpacity}))` :
|
|
4048
|
+
backgroundColor: t.vars ? `rgba(${t.vars.palette.primary.mainChannel} / calc(${t.vars.palette.action.selectedOpacity} + ${t.vars.palette.action.hoverOpacity}))` : Se(t.palette.primary.main, t.palette.action.selectedOpacity + t.palette.action.hoverOpacity),
|
|
4049
4049
|
// Reset on touch devices, it doesn't add specificity
|
|
4050
4050
|
"@media (hover: none)": {
|
|
4051
|
-
backgroundColor: t.vars ? `rgba(${t.vars.palette.primary.mainChannel} / ${t.vars.palette.action.selectedOpacity})` :
|
|
4051
|
+
backgroundColor: t.vars ? `rgba(${t.vars.palette.primary.mainChannel} / ${t.vars.palette.action.selectedOpacity})` : Se(t.palette.primary.main, t.palette.action.selectedOpacity)
|
|
4052
4052
|
}
|
|
4053
4053
|
}
|
|
4054
4054
|
},
|
|
4055
4055
|
"&[data-selected][data-focused]": {
|
|
4056
|
-
backgroundColor: t.vars ? `rgba(${t.vars.palette.primary.mainChannel} / calc(${t.vars.palette.action.selectedOpacity} + ${t.vars.palette.action.focusOpacity}))` :
|
|
4056
|
+
backgroundColor: t.vars ? `rgba(${t.vars.palette.primary.mainChannel} / calc(${t.vars.palette.action.selectedOpacity} + ${t.vars.palette.action.focusOpacity}))` : Se(t.palette.primary.main, t.palette.action.selectedOpacity + t.palette.action.focusOpacity)
|
|
4057
4057
|
}
|
|
4058
|
-
})),
|
|
4058
|
+
})), Br = G("div", {
|
|
4059
4059
|
name: "MuiTreeItem",
|
|
4060
4060
|
slot: "Label",
|
|
4061
|
-
shouldForwardProp: (t) =>
|
|
4061
|
+
shouldForwardProp: (t) => st(t) && t !== "editable"
|
|
4062
4062
|
})(({
|
|
4063
4063
|
theme: t
|
|
4064
4064
|
}) => S({
|
|
@@ -4078,7 +4078,7 @@ const Dr = B("input", {
|
|
|
4078
4078
|
paddingLeft: "2px"
|
|
4079
4079
|
}
|
|
4080
4080
|
}]
|
|
4081
|
-
})),
|
|
4081
|
+
})), Wr = G("div", {
|
|
4082
4082
|
name: "MuiTreeItem",
|
|
4083
4083
|
slot: "IconContainer"
|
|
4084
4084
|
})({
|
|
@@ -4091,14 +4091,14 @@ const Dr = B("input", {
|
|
|
4091
4091
|
"& svg": {
|
|
4092
4092
|
fontSize: 18
|
|
4093
4093
|
}
|
|
4094
|
-
}),
|
|
4094
|
+
}), Kr = G(je, {
|
|
4095
4095
|
name: "MuiTreeItem",
|
|
4096
4096
|
slot: "GroupTransition",
|
|
4097
4097
|
overridesResolver: (t, e) => e.groupTransition
|
|
4098
4098
|
})({
|
|
4099
4099
|
margin: 0,
|
|
4100
4100
|
padding: 0
|
|
4101
|
-
}),
|
|
4101
|
+
}), Ur = G("div", {
|
|
4102
4102
|
name: "MuiTreeItem",
|
|
4103
4103
|
slot: "ErrorIcon"
|
|
4104
4104
|
})({
|
|
@@ -4108,16 +4108,16 @@ const Dr = B("input", {
|
|
|
4108
4108
|
height: 7,
|
|
4109
4109
|
borderRadius: "50%",
|
|
4110
4110
|
backgroundColor: "red"
|
|
4111
|
-
}),
|
|
4111
|
+
}), Hr = G(jn, {
|
|
4112
4112
|
name: "MuiTreeItem",
|
|
4113
4113
|
slot: "LoadingIcon"
|
|
4114
4114
|
})({
|
|
4115
4115
|
color: "text.primary"
|
|
4116
|
-
}),
|
|
4116
|
+
}), un = G(/* @__PURE__ */ M.forwardRef((t, e) => {
|
|
4117
4117
|
const {
|
|
4118
4118
|
visible: n
|
|
4119
|
-
} = t, o =
|
|
4120
|
-
return n ? /* @__PURE__ */ v(
|
|
4119
|
+
} = t, o = Be(t, Fr);
|
|
4120
|
+
return n ? /* @__PURE__ */ v(ln, S({}, o, {
|
|
4121
4121
|
ref: e
|
|
4122
4122
|
})) : null;
|
|
4123
4123
|
}), {
|
|
@@ -4126,23 +4126,23 @@ const Dr = B("input", {
|
|
|
4126
4126
|
})({
|
|
4127
4127
|
padding: 0
|
|
4128
4128
|
});
|
|
4129
|
-
process.env.NODE_ENV !== "production" && (
|
|
4130
|
-
const
|
|
4129
|
+
process.env.NODE_ENV !== "production" && (un.displayName = "TreeItemCheckbox");
|
|
4130
|
+
const qr = (t) => {
|
|
4131
4131
|
const {
|
|
4132
4132
|
classes: e
|
|
4133
|
-
} =
|
|
4134
|
-
root:
|
|
4135
|
-
content:
|
|
4136
|
-
iconContainer:
|
|
4137
|
-
checkbox:
|
|
4138
|
-
label:
|
|
4139
|
-
groupTransition:
|
|
4140
|
-
labelInput:
|
|
4141
|
-
dragAndDropOverlay:
|
|
4142
|
-
errorIcon:
|
|
4143
|
-
loadingIcon:
|
|
4133
|
+
} = Gt(), n = S({}, t, {
|
|
4134
|
+
root: Q(t?.root, e.root),
|
|
4135
|
+
content: Q(t?.content, e.itemContent),
|
|
4136
|
+
iconContainer: Q(t?.iconContainer, e.itemIconContainer),
|
|
4137
|
+
checkbox: Q(t?.checkbox, e.itemCheckbox),
|
|
4138
|
+
label: Q(t?.label, e.itemLabel),
|
|
4139
|
+
groupTransition: Q(t?.groupTransition, e.itemGroupTransition),
|
|
4140
|
+
labelInput: Q(t?.labelInput, e.itemLabelInput),
|
|
4141
|
+
dragAndDropOverlay: Q(t?.dragAndDropOverlay, e.itemDragAndDropOverlay),
|
|
4142
|
+
errorIcon: Q(t?.errorIcon, e.itemErrorIcon),
|
|
4143
|
+
loadingIcon: Q(t?.loadingIcon, e.itemLoadingIcon)
|
|
4144
4144
|
});
|
|
4145
|
-
return
|
|
4145
|
+
return we({
|
|
4146
4146
|
root: ["root"],
|
|
4147
4147
|
content: ["content"],
|
|
4148
4148
|
iconContainer: ["iconContainer"],
|
|
@@ -4159,9 +4159,9 @@ const Kr = (t) => {
|
|
|
4159
4159
|
selected: ["selected"],
|
|
4160
4160
|
focused: ["focused"],
|
|
4161
4161
|
disabled: ["disabled"]
|
|
4162
|
-
},
|
|
4163
|
-
},
|
|
4164
|
-
const o =
|
|
4162
|
+
}, Rr, n);
|
|
4163
|
+
}, mt = /* @__PURE__ */ M.forwardRef(function(e, n) {
|
|
4164
|
+
const o = zr({
|
|
4165
4165
|
props: e,
|
|
4166
4166
|
name: "MuiTreeItem"
|
|
4167
4167
|
}), {
|
|
@@ -4169,33 +4169,33 @@ const Kr = (t) => {
|
|
|
4169
4169
|
itemId: s,
|
|
4170
4170
|
label: l,
|
|
4171
4171
|
disabled: a,
|
|
4172
|
-
disableSelection:
|
|
4172
|
+
disableSelection: h,
|
|
4173
4173
|
children: d,
|
|
4174
4174
|
slots: c = {},
|
|
4175
4175
|
slotProps: p = {},
|
|
4176
4176
|
classes: f
|
|
4177
|
-
} = o, u =
|
|
4178
|
-
getContextProviderProps:
|
|
4177
|
+
} = o, u = Be(o, Vr), {
|
|
4178
|
+
getContextProviderProps: m,
|
|
4179
4179
|
getRootProps: I,
|
|
4180
4180
|
getContentProps: b,
|
|
4181
|
-
getIconContainerProps:
|
|
4182
|
-
getCheckboxProps:
|
|
4183
|
-
getLabelProps:
|
|
4181
|
+
getIconContainerProps: x,
|
|
4182
|
+
getCheckboxProps: w,
|
|
4183
|
+
getLabelProps: _,
|
|
4184
4184
|
getGroupTransitionProps: R,
|
|
4185
|
-
getLabelInputProps:
|
|
4186
|
-
getDragAndDropOverlayProps:
|
|
4187
|
-
getErrorContainerProps:
|
|
4188
|
-
getLoadingContainerProps:
|
|
4189
|
-
status:
|
|
4190
|
-
} =
|
|
4185
|
+
getLabelInputProps: F,
|
|
4186
|
+
getDragAndDropOverlayProps: C,
|
|
4187
|
+
getErrorContainerProps: D,
|
|
4188
|
+
getLoadingContainerProps: V,
|
|
4189
|
+
status: j
|
|
4190
|
+
} = Pr({
|
|
4191
4191
|
id: r,
|
|
4192
4192
|
itemId: s,
|
|
4193
4193
|
children: d,
|
|
4194
4194
|
label: l,
|
|
4195
4195
|
disabled: a,
|
|
4196
|
-
disableSelection:
|
|
4197
|
-
}),
|
|
4198
|
-
elementType:
|
|
4196
|
+
disableSelection: h
|
|
4197
|
+
}), E = qr(f), k = c.root ?? jr, O = te({
|
|
4198
|
+
elementType: k,
|
|
4199
4199
|
getSlotProps: I,
|
|
4200
4200
|
externalForwardedProps: u,
|
|
4201
4201
|
externalSlotProps: p.root,
|
|
@@ -4203,80 +4203,80 @@ const Kr = (t) => {
|
|
|
4203
4203
|
ref: n
|
|
4204
4204
|
},
|
|
4205
4205
|
ownerState: {},
|
|
4206
|
-
className:
|
|
4207
|
-
}),
|
|
4208
|
-
elementType:
|
|
4206
|
+
className: E.root
|
|
4207
|
+
}), A = c.content ?? $r, L = te({
|
|
4208
|
+
elementType: A,
|
|
4209
4209
|
getSlotProps: b,
|
|
4210
4210
|
externalSlotProps: p.content,
|
|
4211
4211
|
ownerState: {},
|
|
4212
|
-
className:
|
|
4213
|
-
}),
|
|
4214
|
-
elementType:
|
|
4215
|
-
getSlotProps:
|
|
4212
|
+
className: Q(E.content, j.expanded && E.expanded, j.selected && E.selected, j.focused && E.focused, j.disabled && E.disabled, j.editing && E.editing, j.editable && E.editable)
|
|
4213
|
+
}), $ = c.iconContainer ?? Wr, B = te({
|
|
4214
|
+
elementType: $,
|
|
4215
|
+
getSlotProps: x,
|
|
4216
4216
|
externalSlotProps: p.iconContainer,
|
|
4217
4217
|
ownerState: {},
|
|
4218
|
-
className:
|
|
4219
|
-
}),
|
|
4220
|
-
elementType:
|
|
4221
|
-
getSlotProps:
|
|
4218
|
+
className: E.iconContainer
|
|
4219
|
+
}), J = c.label ?? Br, Z = te({
|
|
4220
|
+
elementType: J,
|
|
4221
|
+
getSlotProps: _,
|
|
4222
4222
|
externalSlotProps: p.label,
|
|
4223
4223
|
ownerState: {},
|
|
4224
|
-
className:
|
|
4225
|
-
}), q = c.checkbox ??
|
|
4224
|
+
className: E.label
|
|
4225
|
+
}), q = c.checkbox ?? un, ie = te({
|
|
4226
4226
|
elementType: q,
|
|
4227
|
-
getSlotProps:
|
|
4227
|
+
getSlotProps: w,
|
|
4228
4228
|
externalSlotProps: p.checkbox,
|
|
4229
4229
|
ownerState: {},
|
|
4230
|
-
className:
|
|
4231
|
-
}), ae = c.groupTransition ?? void 0, ue =
|
|
4230
|
+
className: E.checkbox
|
|
4231
|
+
}), ae = c.groupTransition ?? void 0, ue = te({
|
|
4232
4232
|
elementType: ae,
|
|
4233
4233
|
getSlotProps: R,
|
|
4234
4234
|
externalSlotProps: p.groupTransition,
|
|
4235
4235
|
ownerState: {},
|
|
4236
|
-
className:
|
|
4237
|
-
}), ce = c.labelInput ??
|
|
4236
|
+
className: E.groupTransition
|
|
4237
|
+
}), ce = c.labelInput ?? Nr, pe = te({
|
|
4238
4238
|
elementType: ce,
|
|
4239
|
-
getSlotProps:
|
|
4239
|
+
getSlotProps: F,
|
|
4240
4240
|
externalSlotProps: p.labelInput,
|
|
4241
4241
|
ownerState: {},
|
|
4242
|
-
className:
|
|
4243
|
-
}),
|
|
4244
|
-
elementType:
|
|
4245
|
-
getSlotProps:
|
|
4242
|
+
className: E.labelInput
|
|
4243
|
+
}), K = c.dragAndDropOverlay ?? cn, X = te({
|
|
4244
|
+
elementType: K,
|
|
4245
|
+
getSlotProps: C,
|
|
4246
4246
|
externalSlotProps: p.dragAndDropOverlay,
|
|
4247
4247
|
ownerState: {},
|
|
4248
|
-
className:
|
|
4249
|
-
}),
|
|
4250
|
-
elementType:
|
|
4251
|
-
getSlotProps:
|
|
4248
|
+
className: E.dragAndDropOverlay
|
|
4249
|
+
}), T = c.errorIcon ?? Ur, g = te({
|
|
4250
|
+
elementType: T,
|
|
4251
|
+
getSlotProps: D,
|
|
4252
4252
|
externalSlotProps: p.errorIcon,
|
|
4253
4253
|
ownerState: {},
|
|
4254
|
-
className:
|
|
4255
|
-
}),
|
|
4256
|
-
elementType:
|
|
4257
|
-
getSlotProps:
|
|
4254
|
+
className: E.errorIcon
|
|
4255
|
+
}), U = c.loadingIcon ?? Hr, ee = te({
|
|
4256
|
+
elementType: U,
|
|
4257
|
+
getSlotProps: V,
|
|
4258
4258
|
externalSlotProps: p.loadingIcon,
|
|
4259
4259
|
ownerState: {},
|
|
4260
|
-
className:
|
|
4260
|
+
className: E.loadingIcon
|
|
4261
4261
|
});
|
|
4262
|
-
return /* @__PURE__ */ v(
|
|
4263
|
-
children: /* @__PURE__ */
|
|
4264
|
-
children: [/* @__PURE__ */
|
|
4265
|
-
children: [/* @__PURE__ */
|
|
4266
|
-
children: [
|
|
4267
|
-
status:
|
|
4262
|
+
return /* @__PURE__ */ v(dn, S({}, m(), {
|
|
4263
|
+
children: /* @__PURE__ */ Y(k, S({}, O, {
|
|
4264
|
+
children: [/* @__PURE__ */ Y(A, S({}, L, {
|
|
4265
|
+
children: [/* @__PURE__ */ Y($, S({}, B, {
|
|
4266
|
+
children: [j.error && /* @__PURE__ */ v(T, S({}, g)), j.loading ? /* @__PURE__ */ v(U, S({}, ee)) : /* @__PURE__ */ v(an, {
|
|
4267
|
+
status: j,
|
|
4268
4268
|
slots: c,
|
|
4269
4269
|
slotProps: p
|
|
4270
4270
|
})]
|
|
4271
|
-
})), /* @__PURE__ */ v(q, S({},
|
|
4272
|
-
})), d && /* @__PURE__ */ v(
|
|
4271
|
+
})), /* @__PURE__ */ v(q, S({}, ie)), j.editing ? /* @__PURE__ */ v(ce, S({}, pe)) : /* @__PURE__ */ v(J, S({}, Z)), /* @__PURE__ */ v(K, S({}, X))]
|
|
4272
|
+
})), d && /* @__PURE__ */ v(Kr, S({
|
|
4273
4273
|
as: ae
|
|
4274
4274
|
}, ue))]
|
|
4275
4275
|
}))
|
|
4276
4276
|
}));
|
|
4277
4277
|
});
|
|
4278
|
-
process.env.NODE_ENV !== "production" && (
|
|
4279
|
-
process.env.NODE_ENV !== "production" && (
|
|
4278
|
+
process.env.NODE_ENV !== "production" && (mt.displayName = "TreeItem");
|
|
4279
|
+
process.env.NODE_ENV !== "production" && (mt.propTypes = {
|
|
4280
4280
|
// ----------------------------- Warning --------------------------------
|
|
4281
4281
|
// | These PropTypes are generated from the TypeScript type definitions |
|
|
4282
4282
|
// | To update them edit the TypeScript types and run "pnpm proptypes" |
|
|
@@ -4321,7 +4321,7 @@ process.env.NODE_ENV !== "production" && (ft.propTypes = {
|
|
|
4321
4321
|
* This prop isn't supported.
|
|
4322
4322
|
* Use the `onItemFocus` callback on the tree if you need to monitor an item's focus.
|
|
4323
4323
|
*/
|
|
4324
|
-
onFocus:
|
|
4324
|
+
onFocus: Fn,
|
|
4325
4325
|
/**
|
|
4326
4326
|
* Callback fired when a key is pressed on the keyboard and the tree is in focus.
|
|
4327
4327
|
*/
|
|
@@ -4341,22 +4341,16 @@ process.env.NODE_ENV !== "production" && (ft.propTypes = {
|
|
|
4341
4341
|
*/
|
|
4342
4342
|
sx: i.oneOfType([i.arrayOf(i.oneOfType([i.func, i.object, i.bool])), i.func, i.object])
|
|
4343
4343
|
});
|
|
4344
|
-
const
|
|
4345
|
-
const e = [], n = (o) => {
|
|
4346
|
-
for (const r of o)
|
|
4347
|
-
e.push(r.value), r.children && n(r.children);
|
|
4348
|
-
};
|
|
4349
|
-
return n(t), e;
|
|
4350
|
-
}, cn = (t, e) => {
|
|
4344
|
+
const he = (t, e) => {
|
|
4351
4345
|
for (const n of t) {
|
|
4352
4346
|
if (n.value === e) return n;
|
|
4353
4347
|
if (n.children) {
|
|
4354
|
-
const o =
|
|
4348
|
+
const o = he(n.children, e);
|
|
4355
4349
|
if (o) return o;
|
|
4356
4350
|
}
|
|
4357
4351
|
}
|
|
4358
|
-
}
|
|
4359
|
-
function
|
|
4352
|
+
};
|
|
4353
|
+
function is({
|
|
4360
4354
|
label: t,
|
|
4361
4355
|
data: e,
|
|
4362
4356
|
handleChange: n,
|
|
@@ -4365,51 +4359,93 @@ function ss({
|
|
|
4365
4359
|
disabled: s = !1,
|
|
4366
4360
|
isRtl: l = !1,
|
|
4367
4361
|
width: a = 300,
|
|
4368
|
-
placeholder:
|
|
4362
|
+
placeholder: h = "Search...",
|
|
4369
4363
|
maxHeight: d = 300
|
|
4370
4364
|
}) {
|
|
4371
|
-
const [c, p] =
|
|
4365
|
+
const [c, p] = We(""), [f, u] = We(!1), [m, I] = We(5), b = gt(null), x = gt(null), w = Ke(() => {
|
|
4366
|
+
if (!e || r.length === 0) return [];
|
|
4367
|
+
const E = new Set(r), k = [], O = (A) => {
|
|
4368
|
+
for (const L of A)
|
|
4369
|
+
L.children && L.children.length > 0 ? O(L.children) : E.has(L.value) && k.push(L.label);
|
|
4370
|
+
};
|
|
4371
|
+
return O(e), k;
|
|
4372
|
+
}, [e, r]);
|
|
4373
|
+
bt(() => {
|
|
4374
|
+
const E = (k) => {
|
|
4375
|
+
b.current && !b.current.contains(k.target) && u(!1);
|
|
4376
|
+
};
|
|
4377
|
+
return f && document.addEventListener("mousedown", E), () => {
|
|
4378
|
+
document.removeEventListener("mousedown", E);
|
|
4379
|
+
};
|
|
4380
|
+
}, [f]), bt(() => {
|
|
4381
|
+
const E = () => {
|
|
4382
|
+
if (!x.current || w.length === 0) {
|
|
4383
|
+
I(5);
|
|
4384
|
+
return;
|
|
4385
|
+
}
|
|
4386
|
+
const O = x.current.offsetWidth, A = 60, L = 110, $ = 45, B = 4, J = O - $ - B, Z = (A + L) / 2, q = Math.max(1, Math.floor(J / (Z + B)));
|
|
4387
|
+
I(Math.min(q, w.length));
|
|
4388
|
+
};
|
|
4389
|
+
E();
|
|
4390
|
+
const k = new ResizeObserver(E);
|
|
4391
|
+
return x.current && k.observe(x.current), () => k.disconnect();
|
|
4392
|
+
}, [w.length]);
|
|
4393
|
+
const _ = Ke(() => {
|
|
4372
4394
|
if (!e) return [];
|
|
4373
4395
|
if (!c.trim()) return e;
|
|
4374
|
-
const E = c.toLowerCase(),
|
|
4375
|
-
const
|
|
4376
|
-
for (const L of
|
|
4377
|
-
const
|
|
4378
|
-
(
|
|
4396
|
+
const E = c.toLowerCase(), k = (O) => {
|
|
4397
|
+
const A = [];
|
|
4398
|
+
for (const L of O) {
|
|
4399
|
+
const $ = L.label.toLowerCase().includes(E) || String(L.id).toLowerCase().includes(E) || L.externalId && String(L.externalId).toLowerCase().includes(E), B = L.children ? k(L.children) : [];
|
|
4400
|
+
($ || B.length > 0) && A.push({
|
|
4379
4401
|
...L,
|
|
4380
|
-
children:
|
|
4402
|
+
children: B.length > 0 ? B : L.children
|
|
4381
4403
|
});
|
|
4382
4404
|
}
|
|
4383
|
-
return
|
|
4405
|
+
return A;
|
|
4384
4406
|
};
|
|
4385
|
-
return
|
|
4386
|
-
}, [e, c]),
|
|
4407
|
+
return k(e);
|
|
4408
|
+
}, [e, c]), R = St((E) => !E.children || E.children.length === 0 ? [E.value] : E.children.flatMap((k) => {
|
|
4409
|
+
const O = he(e || [], k.value) || k;
|
|
4410
|
+
return R(O);
|
|
4411
|
+
}), [e]), F = St(
|
|
4387
4412
|
(E) => {
|
|
4388
|
-
const
|
|
4389
|
-
if (
|
|
4390
|
-
|
|
4391
|
-
|
|
4392
|
-
|
|
4393
|
-
|
|
4394
|
-
|
|
4413
|
+
const k = he(e || [], E.value) || E, O = R(k);
|
|
4414
|
+
if (k.children && k.children.length > 0)
|
|
4415
|
+
if (O.every(($) => r.includes($))) {
|
|
4416
|
+
const $ = new Set(O);
|
|
4417
|
+
n(r.filter((B) => !$.has(B)));
|
|
4418
|
+
} else {
|
|
4419
|
+
const $ = /* @__PURE__ */ new Set([...r, ...O]);
|
|
4420
|
+
n(Array.from($));
|
|
4421
|
+
}
|
|
4422
|
+
else {
|
|
4423
|
+
const L = r.includes(E.value);
|
|
4424
|
+
n(L ? r.filter(($) => $ !== E.value) : [...r, E.value]);
|
|
4395
4425
|
}
|
|
4396
4426
|
},
|
|
4397
|
-
[r, n]
|
|
4398
|
-
),
|
|
4427
|
+
[e, r, n, R]
|
|
4428
|
+
), C = (E) => {
|
|
4399
4429
|
E.stopPropagation(), n([]);
|
|
4400
|
-
},
|
|
4401
|
-
|
|
4402
|
-
|
|
4403
|
-
|
|
4404
|
-
|
|
4405
|
-
|
|
4406
|
-
|
|
4407
|
-
|
|
4430
|
+
}, { areAllChildrenSelected: D, areSomeChildrenSelected: V } = Ke(() => {
|
|
4431
|
+
const E = (O) => {
|
|
4432
|
+
const A = he(e || [], O);
|
|
4433
|
+
return !A || !A.children || A.children.length === 0 ? r.includes(O) : A.children.every((L) => E(L.value));
|
|
4434
|
+
}, k = (O) => {
|
|
4435
|
+
const A = he(e || [], O);
|
|
4436
|
+
return !A || !A.children || A.children.length === 0 ? r.includes(O) : A.children.some((L) => k(L.value));
|
|
4437
|
+
};
|
|
4438
|
+
return {
|
|
4439
|
+
areAllChildrenSelected: E,
|
|
4440
|
+
areSomeChildrenSelected: k
|
|
4441
|
+
};
|
|
4442
|
+
}, [e, r]), j = (E) => E.map((k) => {
|
|
4443
|
+
const O = he(e || [], k.value), A = O?.children && O.children.length > 0, L = !A, $ = L && r.includes(k.value), B = A && D(k.value), J = A && V(k.value), Z = A && J && !B;
|
|
4408
4444
|
return /* @__PURE__ */ v(
|
|
4409
|
-
|
|
4445
|
+
mt,
|
|
4410
4446
|
{
|
|
4411
|
-
itemId:
|
|
4412
|
-
label: /* @__PURE__ */
|
|
4447
|
+
itemId: k.value,
|
|
4448
|
+
label: /* @__PURE__ */ Y(
|
|
4413
4449
|
fe,
|
|
4414
4450
|
{
|
|
4415
4451
|
sx: {
|
|
@@ -4417,39 +4453,39 @@ function ss({
|
|
|
4417
4453
|
alignItems: "flex-start",
|
|
4418
4454
|
py: 0.5
|
|
4419
4455
|
},
|
|
4420
|
-
onClick: (
|
|
4421
|
-
|
|
4456
|
+
onClick: (q) => {
|
|
4457
|
+
q.stopPropagation(), F(k);
|
|
4422
4458
|
},
|
|
4423
4459
|
children: [
|
|
4424
4460
|
/* @__PURE__ */ v(
|
|
4425
|
-
|
|
4461
|
+
Cn,
|
|
4426
4462
|
{
|
|
4427
|
-
checked:
|
|
4428
|
-
indeterminate:
|
|
4463
|
+
checked: L ? $ : B,
|
|
4464
|
+
indeterminate: Z,
|
|
4429
4465
|
size: "small",
|
|
4430
4466
|
sx: { p: 0, mr: 1 }
|
|
4431
4467
|
}
|
|
4432
4468
|
),
|
|
4433
|
-
/* @__PURE__ */
|
|
4469
|
+
/* @__PURE__ */ Y(fe, { sx: { display: "flex", flexDirection: "column" }, children: [
|
|
4434
4470
|
/* @__PURE__ */ v(
|
|
4435
|
-
|
|
4471
|
+
Ue,
|
|
4436
4472
|
{
|
|
4437
4473
|
component: "span",
|
|
4438
4474
|
sx: { fontWeight: 600, fontSize: "0.875rem" },
|
|
4439
|
-
children:
|
|
4475
|
+
children: k.label
|
|
4440
4476
|
}
|
|
4441
4477
|
),
|
|
4442
|
-
/* @__PURE__ */
|
|
4443
|
-
|
|
4478
|
+
/* @__PURE__ */ Y(
|
|
4479
|
+
Ue,
|
|
4444
4480
|
{
|
|
4445
4481
|
component: "span",
|
|
4446
4482
|
sx: { fontSize: "0.75rem", color: "text.secondary" },
|
|
4447
4483
|
children: [
|
|
4448
4484
|
"Id: ",
|
|
4449
|
-
|
|
4450
|
-
|
|
4485
|
+
k.id,
|
|
4486
|
+
k.externalId !== void 0 && k.externalId !== "" && /* @__PURE__ */ Y("span", { style: { marginLeft: 8 }, children: [
|
|
4451
4487
|
"External ID: ",
|
|
4452
|
-
|
|
4488
|
+
k.externalId
|
|
4453
4489
|
] })
|
|
4454
4490
|
]
|
|
4455
4491
|
}
|
|
@@ -4458,14 +4494,15 @@ function ss({
|
|
|
4458
4494
|
]
|
|
4459
4495
|
}
|
|
4460
4496
|
),
|
|
4461
|
-
children:
|
|
4497
|
+
children: k.children && j(k.children)
|
|
4462
4498
|
},
|
|
4463
|
-
|
|
4499
|
+
k.value
|
|
4464
4500
|
);
|
|
4465
4501
|
});
|
|
4466
|
-
return /* @__PURE__ */
|
|
4467
|
-
|
|
4502
|
+
return /* @__PURE__ */ Y(
|
|
4503
|
+
In,
|
|
4468
4504
|
{
|
|
4505
|
+
ref: b,
|
|
4469
4506
|
size: "small",
|
|
4470
4507
|
sx: {
|
|
4471
4508
|
width: o ? "100%" : a,
|
|
@@ -4473,30 +4510,78 @@ function ss({
|
|
|
4473
4510
|
},
|
|
4474
4511
|
disabled: s,
|
|
4475
4512
|
children: [
|
|
4476
|
-
/* @__PURE__ */ v(
|
|
4513
|
+
/* @__PURE__ */ v(gn, { shrink: f || r.length > 0, children: t }),
|
|
4477
4514
|
/* @__PURE__ */ v(
|
|
4478
|
-
|
|
4515
|
+
bn,
|
|
4479
4516
|
{
|
|
4480
4517
|
label: t,
|
|
4518
|
+
notched: f || r.length > 0,
|
|
4481
4519
|
readOnly: !0,
|
|
4482
4520
|
onClick: () => !s && u(!f),
|
|
4483
4521
|
sx: {
|
|
4484
4522
|
borderRadius: "8px",
|
|
4485
4523
|
bgcolor: "var(--color-background)",
|
|
4486
4524
|
cursor: s ? "default" : "pointer",
|
|
4525
|
+
minHeight: 40,
|
|
4526
|
+
display: "flex",
|
|
4527
|
+
flexWrap: "nowrap",
|
|
4487
4528
|
"& .MuiOutlinedInput-notchedOutline": {
|
|
4488
4529
|
border: "1px solid var(--color-gray)"
|
|
4530
|
+
},
|
|
4531
|
+
"& .MuiOutlinedInput-input": {
|
|
4532
|
+
display: "none"
|
|
4489
4533
|
}
|
|
4490
4534
|
},
|
|
4491
4535
|
value: "",
|
|
4492
|
-
startAdornment:
|
|
4493
|
-
|
|
4494
|
-
|
|
4495
|
-
|
|
4496
|
-
|
|
4497
|
-
|
|
4536
|
+
startAdornment: /* @__PURE__ */ v(
|
|
4537
|
+
fe,
|
|
4538
|
+
{
|
|
4539
|
+
ref: x,
|
|
4540
|
+
sx: {
|
|
4541
|
+
display: "flex",
|
|
4542
|
+
flexWrap: "nowrap",
|
|
4543
|
+
gap: 0.5,
|
|
4544
|
+
flex: 1,
|
|
4545
|
+
overflow: "hidden",
|
|
4546
|
+
alignItems: "center",
|
|
4547
|
+
py: 0.5,
|
|
4548
|
+
pl: 1
|
|
4549
|
+
},
|
|
4550
|
+
children: w.length > 0 ? /* @__PURE__ */ Y(mn, { children: [
|
|
4551
|
+
w.slice(0, m).map((E) => /* @__PURE__ */ v(
|
|
4552
|
+
xt,
|
|
4553
|
+
{
|
|
4554
|
+
label: E,
|
|
4555
|
+
size: "small",
|
|
4556
|
+
sx: {
|
|
4557
|
+
height: 24,
|
|
4558
|
+
flexShrink: 0,
|
|
4559
|
+
"& .MuiChip-label": {
|
|
4560
|
+
px: 1,
|
|
4561
|
+
maxWidth: 100,
|
|
4562
|
+
overflow: "hidden",
|
|
4563
|
+
textOverflow: "ellipsis",
|
|
4564
|
+
whiteSpace: "nowrap"
|
|
4565
|
+
}
|
|
4566
|
+
}
|
|
4567
|
+
},
|
|
4568
|
+
E
|
|
4569
|
+
)),
|
|
4570
|
+
w.length > m && /* @__PURE__ */ v(
|
|
4571
|
+
xt,
|
|
4572
|
+
{
|
|
4573
|
+
label: `+${w.length - m}`,
|
|
4574
|
+
size: "small",
|
|
4575
|
+
sx: { height: 24, flexShrink: 0 }
|
|
4576
|
+
}
|
|
4577
|
+
)
|
|
4578
|
+
] }) : null
|
|
4579
|
+
}
|
|
4580
|
+
),
|
|
4581
|
+
endAdornment: /* @__PURE__ */ Y(yt, { position: "end", sx: { flexShrink: 0 }, children: [
|
|
4582
|
+
r.length > 0 && !s && /* @__PURE__ */ v(Sn, { size: "small", onClick: C, children: /* @__PURE__ */ v(wn, { fontSize: "small" }) }),
|
|
4498
4583
|
/* @__PURE__ */ v(
|
|
4499
|
-
|
|
4584
|
+
$n,
|
|
4500
4585
|
{
|
|
4501
4586
|
sx: {
|
|
4502
4587
|
transform: f ? "rotate(180deg)" : "rotate(0deg)",
|
|
@@ -4507,8 +4592,8 @@ function ss({
|
|
|
4507
4592
|
] })
|
|
4508
4593
|
}
|
|
4509
4594
|
),
|
|
4510
|
-
/* @__PURE__ */ v(
|
|
4511
|
-
|
|
4595
|
+
/* @__PURE__ */ v(yn, { in: f && !s, children: /* @__PURE__ */ Y(
|
|
4596
|
+
xn,
|
|
4512
4597
|
{
|
|
4513
4598
|
elevation: 3,
|
|
4514
4599
|
sx: {
|
|
@@ -4521,16 +4606,16 @@ function ss({
|
|
|
4521
4606
|
},
|
|
4522
4607
|
children: [
|
|
4523
4608
|
/* @__PURE__ */ v(fe, { sx: { p: 1 }, children: /* @__PURE__ */ v(
|
|
4524
|
-
|
|
4609
|
+
En,
|
|
4525
4610
|
{
|
|
4526
4611
|
fullWidth: !0,
|
|
4527
4612
|
size: "small",
|
|
4528
|
-
placeholder:
|
|
4613
|
+
placeholder: h,
|
|
4529
4614
|
value: c,
|
|
4530
4615
|
onChange: (E) => p(E.target.value),
|
|
4531
4616
|
slotProps: {
|
|
4532
4617
|
input: {
|
|
4533
|
-
startAdornment: /* @__PURE__ */ v(
|
|
4618
|
+
startAdornment: /* @__PURE__ */ v(yt, { position: "start", children: /* @__PURE__ */ v(vn, { fontSize: "small" }) })
|
|
4534
4619
|
}
|
|
4535
4620
|
},
|
|
4536
4621
|
sx: {
|
|
@@ -4540,9 +4625,9 @@ function ss({
|
|
|
4540
4625
|
}
|
|
4541
4626
|
}
|
|
4542
4627
|
) }),
|
|
4543
|
-
/* @__PURE__ */
|
|
4544
|
-
/* @__PURE__ */ v(
|
|
4545
|
-
|
|
4628
|
+
/* @__PURE__ */ Y(fe, { sx: { maxHeight: d, overflow: "auto" }, children: [
|
|
4629
|
+
/* @__PURE__ */ v(ht, { children: j(_) }),
|
|
4630
|
+
_.length === 0 && /* @__PURE__ */ v(fe, { sx: { p: 2, textAlign: "center" }, children: /* @__PURE__ */ v(Ue, { color: "text.secondary", variant: "body2", children: "No options found" }) })
|
|
4546
4631
|
] })
|
|
4547
4632
|
]
|
|
4548
4633
|
}
|
|
@@ -4552,5 +4637,5 @@ function ss({
|
|
|
4552
4637
|
);
|
|
4553
4638
|
}
|
|
4554
4639
|
export {
|
|
4555
|
-
|
|
4640
|
+
is as PassportTreeSelect
|
|
4556
4641
|
};
|