@hybridcore/ui 1.4.31 → 1.4.32
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/AccordionDetails-mpRYHtGq.js +743 -0
- package/dist/{Add-eepk2WTM.js → Add-BKnWHZ7A.js} +10 -9
- package/dist/{Box-BPyg-Ybm.js → Box-SSMZuKnS.js} +8 -8
- package/dist/{Button-DLwB_sKd.js → Button-jy67CcTH.js} +8 -7
- package/dist/{ButtonBase-D0qccOVb.js → ButtonBase-CgQC8DUB.js} +13 -12
- package/dist/{CardContent-DFsCCOWk.js → CardContent-CCq4R1KS.js} +14 -13
- package/dist/{Checkbox-qy3cjvnb.js → Checkbox-B0P8LhCl.js} +10 -9
- package/dist/{Delete-OHEw9lDi.js → Delete-DfyX03ib.js} +1 -1
- package/dist/{DialogContent-CxOSq6h9.js → DialogContent-B0_-g7B0.js} +10 -9
- package/dist/{FormControlLabel-D9KFjcIx.js → FormControlLabel-BNT5EI0b.js} +10 -9
- package/dist/{IconButton-BaiyAtmS.js → IconButton-DekcZv4i.js} +16 -15
- package/dist/{Input-CmCkXczh.js → Input-BAbDr3Tk.js} +17 -16
- package/dist/{InputAdornment-CZUPEeia.js → InputAdornment-BAVRrRts.js} +8 -7
- package/dist/{InputLabel-CWkW8NtU.js → InputLabel-ClDXuWBr.js} +16 -14
- package/dist/{List-PpNAWJ_I.js → List-CNeRnfGL.js} +10 -9
- package/dist/{ListItem-CZbZ91vp.js → ListItem-N_dSd02S.js} +15 -14
- package/dist/{MenuItem-D-INSvZa.js → MenuItem-Lcjh1XlV.js} +11 -10
- package/dist/{Modal-KrI5qFIq.js → Modal-CJn-Bqyo.js} +14 -13
- package/dist/{OutlinedInput-DkIUD30e.js → OutlinedInput-De2keFJK.js} +28 -27
- package/dist/{Paper-btu3j72o.js → Paper-DRRYGupP.js} +22 -21
- package/dist/{Select-ClaBvSqf.js → Select-DwAJxKTN.js} +65 -63
- package/dist/{Source-Hf_SiWEW.js → Source-CnCcu5UP.js} +123 -123
- package/dist/{Tabs-BzelDJKy.js → Tabs-DqdkJU6b.js} +16 -14
- package/dist/{Text-D6oGbCdi.js → Text-BT5kPHOo.js} +41 -41
- package/dist/{TextField-D87qTh1k.js → TextField-BAXUnwnR.js} +14 -13
- package/dist/{Typography-Bm7PFqUT.js → Typography-CLq43OVQ.js} +21 -20
- package/dist/components/access/helpers.js +1 -1
- package/dist/components/access/index.js +1 -1
- package/dist/components/card/index.js +49 -48
- package/dist/components/card/styled.js +1 -1
- package/dist/components/collapsible-card/style.js +3 -3
- package/dist/components/confirm/dialog.js +3 -3
- package/dist/components/confirm/index.js +1 -1
- package/dist/components/container/index.js +10 -9
- package/dist/components/context-menu/index.js +13 -12
- package/dist/components/data-security-selectors/dissemination-list/index.js +1 -1
- package/dist/components/data-security-selectors/security-level/index.js +7 -7
- package/dist/components/geometry-picker/coordinate/index.js +1 -1
- package/dist/components/geometry-picker/edit/index.js +2 -2
- package/dist/components/geometry-picker/geometry/index.js +1 -1
- package/dist/components/geometry-picker/index.js +3 -3
- package/dist/components/geometry-picker/kml/index.js +1 -1
- package/dist/components/geometry-picker/map/logic.js +19 -19
- package/dist/components/geometry-picker/map/style.js +1 -1
- package/dist/components/icon-button/index.js +1 -1
- package/dist/components/instance-form/components/composite-list/index.js +1 -1
- package/dist/components/instance-form/components/variable/index.js +8 -8
- package/dist/components/instance-form/components/variables/index.js +1 -1
- package/dist/components/instance-hierarchy-table/styled.js +1 -1
- package/dist/components/map/helpers/mapbox.js +3 -3
- package/dist/components/map/helpers/ol.js +3 -3
- package/dist/components/map/logic.js +2 -2
- package/dist/components/map/styled.js +2 -2
- package/dist/components/property-mapping/index.js +2 -2
- package/dist/components/range-selector/components/composite-list-range/index.js +1 -1
- package/dist/components/range-selector/components/date-range/index.js +1 -1
- package/dist/components/range-selector/index.js +1 -1
- package/dist/components/search-input/index.js +4 -4
- package/dist/components/tabs/index.js +1 -1
- package/dist/components/template-filters/components/filter/index.js +44 -0
- package/dist/components/template-filters/components/tab-panel/index.js +27 -0
- package/dist/components/template-filters/index.js +39 -0
- package/dist/components/template-filters/styled.js +1 -0
- package/dist/components/template-form/components/property-list/index.js +7 -7
- package/dist/components/template-form/components/property-list/property-list-columns.js +3 -3
- package/dist/components/template-form/components/property-list/property-list-form.js +9 -9
- package/dist/components/template-form/components/recognition-property-list/index.js +6 -6
- package/dist/components/template-form/components/recognition-property-list/recognition-property-list-columns.js +2 -2
- package/dist/components/template-form/components/recognition-property-list/recognition-property-list-form.js +7 -7
- package/dist/components/template-form/index.js +5 -5
- package/dist/components/template-property-filters/property.js +5 -5
- package/dist/components/tree-select/index.js +5 -5
- package/dist/components/treeview-filter/index.js +384 -318
- package/dist/components/treeview-filter/item/index.js +56 -5
- package/dist/components/treeview-filter/item/styled.js +38 -0
- package/dist/components/treeview-filter/item-label/index.js +27 -26
- package/dist/createStyled-CUatW1r9.js +352 -0
- package/dist/{createSvgIcon-Cfm1LkEe.js → createSvgIcon-BXjHHQ0B.js} +28 -29
- package/dist/{createSvgIcon-DEXLbMwp.js → createSvgIcon-CBoAEepv.js} +9 -8
- package/dist/{styled-LNCprp4n.js → createTheme-DVoJnXAT.js} +134 -142
- package/dist/createTheme-DrgvKMA_.js +1563 -0
- package/dist/{dialog-v5-nL5yy.js → dialog-DPGR2gik.js} +7 -7
- package/dist/{exactProp-DkmnwNVS.js → exactProp-H1i70prd.js} +3 -3
- package/dist/{extendSxProp-qqdkfHzS.js → extendSxProp-BmK2hLmq.js} +4 -4
- package/dist/{has-CjQtZJa9.js → has-9_asnBxn.js} +26 -26
- package/dist/{helpers-B4UL9NMD.js → helpers-DaCoWmi2.js} +3 -3
- package/dist/{index-oPY7k6mu.js → index-B_GNCJdV.js} +7 -7
- package/dist/{index-C1fczHEW.js → index-RfDWDd66.js} +28 -27
- package/dist/{listItemTextClasses-DsHGzpPM.js → listItemTextClasses-CC7nbQWN.js} +4 -4
- package/dist/main.js +35 -35
- package/dist/{objectWithoutPropertiesLoose-BK36oJDi.js → objectWithoutPropertiesLoose-DJteAcBH.js} +2 -2
- package/dist/{ol-CHaVTXvL.js → ol-9hySGI6D.js} +3 -3
- package/dist/{property-list-form-B1GZ9ZGO.js → property-list-form-DgmTiBvu.js} +36 -35
- package/dist/styled-DkqItiLo.js +12 -0
- package/dist/unsupportedProp-BND8AB6O.js +25 -0
- package/dist/{useTheme-DBiahn6p.js → useTheme-B6oa3v5u.js} +4 -4
- package/dist/useTheme-GN5Dc3mG.js +18 -0
- package/dist/useThemeProps-BlXpIqSE.js +95 -0
- package/dist/{utils-DNe_YYjm.js → utils-BRsEqTye.js} +8 -8
- package/package.json +1 -1
- package/dist/AccordionDetails-CGs6GZQK.js +0 -454
- package/dist/Collapse-CL6LGGZw.js +0 -298
- package/dist/createStyled-BzvgQjjR.js +0 -1910
- package/dist/index-B0JPwFI9.js +0 -596
- package/dist/requirePropFactory-BjhhI-AW.js +0 -18
- package/dist/unsupportedProp-BuVD30Gh.js +0 -9
- package/dist/useThemeProps-uYx_RkOH.js +0 -109
|
@@ -1,288 +1,351 @@
|
|
|
1
|
-
import
|
|
2
|
-
import * as
|
|
3
|
-
import
|
|
4
|
-
import { r as
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import { Box as
|
|
8
|
-
import { SearchInput as
|
|
9
|
-
import { flattenNestedTemplates as
|
|
10
|
-
import { g as
|
|
11
|
-
import { P as
|
|
12
|
-
import { g as
|
|
13
|
-
import {
|
|
14
|
-
import { u as
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
18
|
-
|
|
19
|
-
|
|
1
|
+
import Te, { jsx as O, jsxs as Se, Fragment as we } from "react/jsx-runtime";
|
|
2
|
+
import * as u from "react";
|
|
3
|
+
import Ne from "react";
|
|
4
|
+
import { r as Ee, i as Re } from "../../createSvgIcon-BXjHHQ0B.js";
|
|
5
|
+
import ht from "./item/index.js";
|
|
6
|
+
import ye from "lodash";
|
|
7
|
+
import { Box as mt, Divider as xt } from "@mui/material";
|
|
8
|
+
import { SearchInput as gt } from "../search-input/index.js";
|
|
9
|
+
import { flattenNestedTemplates as bt } from "../../utils/ontology.js";
|
|
10
|
+
import { g as St, u as wt, c as Nt, a as yt } from "../../useThemeProps-BlXpIqSE.js";
|
|
11
|
+
import { P as s } from "../../createTheme-DrgvKMA_.js";
|
|
12
|
+
import { g as Ct } from "../../createTheme-DVoJnXAT.js";
|
|
13
|
+
import { s as It } from "../../styled-DkqItiLo.js";
|
|
14
|
+
import { u as Ot } from "../../useTheme-B6oa3v5u.js";
|
|
15
|
+
import { u as Tt } from "../../useId-BHG98T5I.js";
|
|
16
|
+
import { a as Et } from "../../ButtonBase-CgQC8DUB.js";
|
|
17
|
+
import { u as Ce } from "../../useControlled-BYdyS7Pn.js";
|
|
18
|
+
import { o as Rt } from "../../ownerDocument-CUrv0DIK.js";
|
|
19
|
+
const De = /* @__PURE__ */ u.createContext({});
|
|
20
|
+
process.env.NODE_ENV !== "production" && (De.displayName = "TreeViewContext");
|
|
21
|
+
function Dt(i, h) {
|
|
22
|
+
let m = 0, p = i.length - 1;
|
|
23
|
+
for (; m <= p; ) {
|
|
24
|
+
const b = Math.floor((m + p) / 2);
|
|
25
|
+
if (i[b].element === h)
|
|
26
|
+
return b;
|
|
27
|
+
i[b].element.compareDocumentPosition(h) & Node.DOCUMENT_POSITION_PRECEDING ? p = b - 1 : m = b + 1;
|
|
28
|
+
}
|
|
29
|
+
return m;
|
|
20
30
|
}
|
|
21
|
-
|
|
22
|
-
|
|
31
|
+
const Pe = /* @__PURE__ */ u.createContext({});
|
|
32
|
+
process.env.NODE_ENV !== "production" && (Pe.displayName = "DescendantContext");
|
|
33
|
+
function ke(i) {
|
|
23
34
|
const {
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
35
|
+
children: h,
|
|
36
|
+
id: m
|
|
37
|
+
} = i, [p, b] = u.useState([]), j = u.useCallback(({
|
|
38
|
+
element: S,
|
|
39
|
+
...P
|
|
40
|
+
}) => {
|
|
41
|
+
b((N) => {
|
|
42
|
+
let T;
|
|
43
|
+
if (N.length === 0)
|
|
44
|
+
return [{
|
|
45
|
+
...P,
|
|
46
|
+
element: S,
|
|
47
|
+
index: 0
|
|
48
|
+
}];
|
|
49
|
+
const w = Dt(N, S);
|
|
50
|
+
if (N[w] && N[w].element === S)
|
|
51
|
+
T = N;
|
|
52
|
+
else {
|
|
53
|
+
const x = {
|
|
54
|
+
...P,
|
|
55
|
+
element: S,
|
|
56
|
+
index: w
|
|
57
|
+
};
|
|
58
|
+
T = N.slice(), T.splice(w, 0, x);
|
|
59
|
+
}
|
|
60
|
+
return T.forEach((x, J) => {
|
|
61
|
+
x.index = J;
|
|
62
|
+
}), T;
|
|
63
|
+
});
|
|
64
|
+
}, []), K = u.useCallback((S) => {
|
|
65
|
+
b((P) => P.filter((N) => S !== N.element));
|
|
66
|
+
}, []), $ = u.useMemo(() => ({
|
|
67
|
+
descendants: p,
|
|
68
|
+
registerDescendant: j,
|
|
69
|
+
unregisterDescendant: K,
|
|
70
|
+
parentId: m
|
|
71
|
+
}), [p, j, K, m]);
|
|
72
|
+
return /* @__PURE__ */ O(Pe.Provider, {
|
|
73
|
+
value: $,
|
|
74
|
+
children: h
|
|
75
|
+
});
|
|
76
|
+
}
|
|
77
|
+
process.env.NODE_ENV !== "production" && (ke.propTypes = {
|
|
78
|
+
children: s.node,
|
|
79
|
+
id: s.string
|
|
80
|
+
});
|
|
81
|
+
function Pt(i) {
|
|
82
|
+
return Ct("MuiTreeView", i);
|
|
83
|
+
}
|
|
84
|
+
St("MuiTreeView", ["root"]);
|
|
85
|
+
const kt = (i) => {
|
|
86
|
+
const {
|
|
87
|
+
classes: h
|
|
88
|
+
} = i;
|
|
89
|
+
return yt({
|
|
27
90
|
root: ["root"]
|
|
28
|
-
},
|
|
29
|
-
},
|
|
91
|
+
}, Pt, h);
|
|
92
|
+
}, Ft = It("ul", {
|
|
30
93
|
name: "MuiTreeView",
|
|
31
94
|
slot: "Root",
|
|
32
|
-
overridesResolver: (
|
|
95
|
+
overridesResolver: (i, h) => h.root
|
|
33
96
|
})({
|
|
34
97
|
padding: 0,
|
|
35
98
|
margin: 0,
|
|
36
99
|
listStyle: "none",
|
|
37
100
|
outline: 0
|
|
38
101
|
});
|
|
39
|
-
function
|
|
40
|
-
return
|
|
102
|
+
function Mt(i) {
|
|
103
|
+
return i && i.length === 1 && i.match(/\S/);
|
|
41
104
|
}
|
|
42
|
-
function Ie(
|
|
43
|
-
for (let
|
|
44
|
-
if (
|
|
45
|
-
return
|
|
105
|
+
function Ie(i, h, m) {
|
|
106
|
+
for (let p = h; p < i.length; p += 1)
|
|
107
|
+
if (m === i[p])
|
|
108
|
+
return p;
|
|
46
109
|
return -1;
|
|
47
110
|
}
|
|
48
|
-
function
|
|
111
|
+
function Oe() {
|
|
49
112
|
return !1;
|
|
50
113
|
}
|
|
51
|
-
const
|
|
52
|
-
const
|
|
53
|
-
props:
|
|
114
|
+
const _t = [], At = [], Fe = /* @__PURE__ */ u.forwardRef(function(h, m) {
|
|
115
|
+
const p = wt({
|
|
116
|
+
props: h,
|
|
54
117
|
name: "MuiTreeView"
|
|
55
118
|
}), {
|
|
56
|
-
children:
|
|
57
|
-
className:
|
|
58
|
-
defaultCollapseIcon:
|
|
59
|
-
defaultEndIcon:
|
|
60
|
-
defaultExpanded:
|
|
61
|
-
defaultExpandIcon:
|
|
62
|
-
defaultParentIcon:
|
|
63
|
-
defaultSelected:
|
|
64
|
-
disabledItemsFocusable:
|
|
65
|
-
disableSelection:
|
|
66
|
-
expanded:
|
|
67
|
-
id:
|
|
68
|
-
multiSelect:
|
|
69
|
-
onBlur:
|
|
70
|
-
onFocus:
|
|
71
|
-
onKeyDown:
|
|
119
|
+
children: b,
|
|
120
|
+
className: j,
|
|
121
|
+
defaultCollapseIcon: K,
|
|
122
|
+
defaultEndIcon: $,
|
|
123
|
+
defaultExpanded: S = _t,
|
|
124
|
+
defaultExpandIcon: P,
|
|
125
|
+
defaultParentIcon: N,
|
|
126
|
+
defaultSelected: T = At,
|
|
127
|
+
disabledItemsFocusable: w = !1,
|
|
128
|
+
disableSelection: x = !1,
|
|
129
|
+
expanded: J,
|
|
130
|
+
id: D,
|
|
131
|
+
multiSelect: g = !1,
|
|
132
|
+
onBlur: L,
|
|
133
|
+
onFocus: Q,
|
|
134
|
+
onKeyDown: X,
|
|
72
135
|
onNodeFocus: ue,
|
|
73
|
-
onNodeSelect:
|
|
74
|
-
onNodeToggle:
|
|
75
|
-
selected:
|
|
76
|
-
...
|
|
77
|
-
} =
|
|
78
|
-
...
|
|
79
|
-
defaultExpanded:
|
|
80
|
-
defaultSelected:
|
|
81
|
-
disabledItemsFocusable:
|
|
82
|
-
disableSelection:
|
|
83
|
-
multiSelect:
|
|
84
|
-
},
|
|
85
|
-
controlled:
|
|
86
|
-
default:
|
|
136
|
+
onNodeSelect: k,
|
|
137
|
+
onNodeToggle: Y,
|
|
138
|
+
selected: Ae,
|
|
139
|
+
...Ve
|
|
140
|
+
} = p, de = Ot().direction === "rtl", fe = {
|
|
141
|
+
...p,
|
|
142
|
+
defaultExpanded: S,
|
|
143
|
+
defaultSelected: T,
|
|
144
|
+
disabledItemsFocusable: w,
|
|
145
|
+
disableSelection: x,
|
|
146
|
+
multiSelect: g
|
|
147
|
+
}, je = kt(fe), pe = Tt(D), ne = u.useRef(null), Ke = Et(ne, m), [c, se] = u.useState(null), d = u.useRef({}), q = u.useRef({}), [A, he] = Ce({
|
|
148
|
+
controlled: J,
|
|
149
|
+
default: S,
|
|
87
150
|
name: "TreeView",
|
|
88
151
|
state: "expanded"
|
|
89
|
-
}), [
|
|
90
|
-
controlled:
|
|
91
|
-
default:
|
|
152
|
+
}), [y, Z] = Ce({
|
|
153
|
+
controlled: Ae,
|
|
154
|
+
default: T,
|
|
92
155
|
name: "TreeView",
|
|
93
156
|
state: "selected"
|
|
94
|
-
}),
|
|
95
|
-
let t =
|
|
157
|
+
}), F = u.useCallback((e) => Array.isArray(A) ? A.indexOf(e) !== -1 : !1, [A]), v = u.useCallback((e) => d.current[e] && d.current[e].expandable, []), Le = u.useCallback((e) => Array.isArray(y) ? y.indexOf(e) !== -1 : y === e, [y]), C = u.useCallback((e) => {
|
|
158
|
+
let t = d.current[e];
|
|
96
159
|
if (!t)
|
|
97
160
|
return !1;
|
|
98
161
|
if (t.disabled)
|
|
99
162
|
return !0;
|
|
100
163
|
for (; t.parentId != null; )
|
|
101
|
-
if (t =
|
|
164
|
+
if (t = d.current[t.parentId], t.disabled)
|
|
102
165
|
return !0;
|
|
103
166
|
return !1;
|
|
104
|
-
}, []),
|
|
105
|
-
let t =
|
|
106
|
-
return
|
|
107
|
-
},
|
|
108
|
-
if (
|
|
109
|
-
return
|
|
110
|
-
let t =
|
|
167
|
+
}, []), Be = (e) => c === e, ee = (e) => Object.keys(d.current).map((t) => d.current[t]).filter((t) => t.parentId === e).sort((t, r) => t.index - r.index).map((t) => t.id), E = (e) => {
|
|
168
|
+
let t = ee(e);
|
|
169
|
+
return w || (t = t.filter((r) => !C(r))), t;
|
|
170
|
+
}, te = (e) => {
|
|
171
|
+
if (F(e) && E(e).length > 0)
|
|
172
|
+
return E(e)[0];
|
|
173
|
+
let t = d.current[e];
|
|
111
174
|
for (; t != null; ) {
|
|
112
|
-
const r =
|
|
175
|
+
const r = E(t.parentId), n = r[r.indexOf(t.id) + 1];
|
|
113
176
|
if (n)
|
|
114
177
|
return n;
|
|
115
|
-
t =
|
|
178
|
+
t = d.current[t.parentId];
|
|
116
179
|
}
|
|
117
180
|
return null;
|
|
118
|
-
},
|
|
119
|
-
const t =
|
|
181
|
+
}, oe = (e) => {
|
|
182
|
+
const t = d.current[e], r = E(t.parentId), n = r.indexOf(e);
|
|
120
183
|
if (n === 0)
|
|
121
184
|
return t.parentId;
|
|
122
|
-
let
|
|
123
|
-
for (;
|
|
124
|
-
|
|
125
|
-
return
|
|
126
|
-
},
|
|
127
|
-
let e =
|
|
128
|
-
for (;
|
|
129
|
-
e =
|
|
185
|
+
let o = r[n - 1];
|
|
186
|
+
for (; F(o) && E(o).length > 0; )
|
|
187
|
+
o = E(o).pop();
|
|
188
|
+
return o;
|
|
189
|
+
}, ce = () => {
|
|
190
|
+
let e = E(null).pop();
|
|
191
|
+
for (; F(e); )
|
|
192
|
+
e = E(e).pop();
|
|
130
193
|
return e;
|
|
131
|
-
}, ae = () =>
|
|
194
|
+
}, ae = () => E(null)[0], Ue = (e) => d.current[e].parentId, $e = (e, t) => {
|
|
132
195
|
if (e === t)
|
|
133
196
|
return [e, t];
|
|
134
|
-
const r =
|
|
197
|
+
const r = d.current[e], n = d.current[t];
|
|
135
198
|
if (r.parentId === n.id || n.parentId === r.id)
|
|
136
199
|
return n.parentId === r.id ? [r.id, n.id] : [n.id, r.id];
|
|
137
|
-
const
|
|
138
|
-
let l = r.parentId,
|
|
139
|
-
for (; !
|
|
140
|
-
|
|
141
|
-
const
|
|
142
|
-
return be.indexOf(
|
|
143
|
-
},
|
|
144
|
-
const [r, n] =
|
|
145
|
-
let
|
|
146
|
-
for (;
|
|
147
|
-
|
|
148
|
-
return
|
|
149
|
-
},
|
|
150
|
-
t && (
|
|
151
|
-
}, me = (e, t) =>
|
|
152
|
-
let n,
|
|
153
|
-
const
|
|
154
|
-
Object.keys(
|
|
155
|
-
const
|
|
156
|
-
|
|
157
|
-
}), n = l.indexOf(t) + 1, n >= l.length && (n = 0),
|
|
158
|
-
},
|
|
200
|
+
const o = [r.id], a = [n.id];
|
|
201
|
+
let l = r.parentId, f = n.parentId, I = a.indexOf(l) !== -1, W = o.indexOf(f) !== -1, U = !0, G = !0;
|
|
202
|
+
for (; !W && !I; )
|
|
203
|
+
U && (o.push(l), I = a.indexOf(l) !== -1, U = l !== null, !I && U && (l = d.current[l].parentId)), G && !I && (a.push(f), W = o.indexOf(f) !== -1, G = f !== null, !W && G && (f = d.current[f].parentId));
|
|
204
|
+
const H = I ? l : f, be = ee(H), ft = o[o.indexOf(H) - 1], pt = a[a.indexOf(H) - 1];
|
|
205
|
+
return be.indexOf(ft) < be.indexOf(pt) ? [e, t] : [t, e];
|
|
206
|
+
}, qe = (e, t) => {
|
|
207
|
+
const [r, n] = $e(e, t), o = [r];
|
|
208
|
+
let a = r;
|
|
209
|
+
for (; a !== n; )
|
|
210
|
+
a = te(a), o.push(a);
|
|
211
|
+
return o;
|
|
212
|
+
}, M = (e, t) => {
|
|
213
|
+
t && (se(t), ue && ue(e, t));
|
|
214
|
+
}, me = (e, t) => M(e, te(t)), ze = (e, t) => M(e, oe(t)), We = (e) => M(e, ae()), Ge = (e) => M(e, ce()), He = (e, t, r) => {
|
|
215
|
+
let n, o;
|
|
216
|
+
const a = r.toLowerCase(), l = [], f = [];
|
|
217
|
+
Object.keys(q.current).forEach((I) => {
|
|
218
|
+
const W = q.current[I], U = d.current[I], G = U.parentId ? F(U.parentId) : !0, H = w ? !1 : C(I);
|
|
219
|
+
G && !H && (l.push(I), f.push(W));
|
|
220
|
+
}), n = l.indexOf(t) + 1, n >= l.length && (n = 0), o = Ie(f, n, a), o === -1 && (o = Ie(f, 0, a)), o > -1 && M(e, l[o]);
|
|
221
|
+
}, re = (e, t = c) => {
|
|
159
222
|
let r;
|
|
160
|
-
|
|
161
|
-
},
|
|
162
|
-
const r =
|
|
163
|
-
|
|
164
|
-
},
|
|
165
|
-
let r =
|
|
223
|
+
A.indexOf(t) !== -1 ? r = A.filter((n) => n !== t) : r = [t].concat(A), Y && Y(e, r), he(r);
|
|
224
|
+
}, Je = (e, t) => {
|
|
225
|
+
const r = d.current[t], o = ee(r.parentId).filter((l) => v(l) && !F(l)), a = A.concat(o);
|
|
226
|
+
o.length > 0 && (he(a), Y && Y(e, a));
|
|
227
|
+
}, _ = u.useRef(null), B = u.useRef(!1), R = u.useRef([]), Qe = (e, t) => {
|
|
228
|
+
let r = y.slice();
|
|
166
229
|
const {
|
|
167
230
|
start: n,
|
|
168
|
-
next:
|
|
169
|
-
current:
|
|
231
|
+
next: o,
|
|
232
|
+
current: a
|
|
170
233
|
} = t;
|
|
171
|
-
!
|
|
172
|
-
},
|
|
173
|
-
let r =
|
|
234
|
+
!o || !a || (R.current.indexOf(a) === -1 && (R.current = []), B.current ? R.current.indexOf(o) !== -1 ? (r = r.filter((l) => l === n || l !== a), R.current = R.current.filter((l) => l === n || l !== a)) : (r.push(o), R.current.push(o)) : (r.push(o), R.current.push(a, o)), k && k(e, r), Z(r));
|
|
235
|
+
}, Xe = (e, t) => {
|
|
236
|
+
let r = y.slice();
|
|
174
237
|
const {
|
|
175
238
|
start: n,
|
|
176
|
-
end:
|
|
239
|
+
end: o
|
|
177
240
|
} = t;
|
|
178
|
-
|
|
179
|
-
let
|
|
180
|
-
|
|
181
|
-
let l = r.concat(
|
|
182
|
-
l = l.filter((
|
|
183
|
-
},
|
|
241
|
+
B.current && (r = r.filter((f) => R.current.indexOf(f) === -1));
|
|
242
|
+
let a = qe(n, o);
|
|
243
|
+
a = a.filter((f) => !C(f)), R.current = a;
|
|
244
|
+
let l = r.concat(a);
|
|
245
|
+
l = l.filter((f, I) => l.indexOf(f) === I), k && k(e, l), Z(l);
|
|
246
|
+
}, Ye = (e, t) => {
|
|
184
247
|
let r;
|
|
185
|
-
|
|
186
|
-
},
|
|
187
|
-
const r =
|
|
188
|
-
|
|
189
|
-
},
|
|
248
|
+
y.indexOf(t) !== -1 ? r = y.filter((n) => n !== t) : r = [t].concat(y), k && k(e, r), Z(r);
|
|
249
|
+
}, Ze = (e, t) => {
|
|
250
|
+
const r = g ? [t] : t;
|
|
251
|
+
k && k(e, r), Z(r);
|
|
252
|
+
}, z = (e, t, r = !1) => t ? (r ? Ye(e, t) : Ze(e, t), _.current = t, B.current = !1, R.current = [], !0) : !1, V = (e, t, r = !1) => {
|
|
190
253
|
const {
|
|
191
|
-
start: n =
|
|
192
|
-
end:
|
|
193
|
-
current:
|
|
254
|
+
start: n = _.current,
|
|
255
|
+
end: o,
|
|
256
|
+
current: a
|
|
194
257
|
} = t;
|
|
195
|
-
r ?
|
|
258
|
+
r ? Qe(e, {
|
|
196
259
|
start: n,
|
|
197
|
-
next:
|
|
198
|
-
current:
|
|
199
|
-
}) : n != null &&
|
|
260
|
+
next: o,
|
|
261
|
+
current: a
|
|
262
|
+
}) : n != null && o != null && Xe(e, {
|
|
200
263
|
start: n,
|
|
201
|
-
end:
|
|
202
|
-
}),
|
|
203
|
-
},
|
|
204
|
-
|
|
205
|
-
const r =
|
|
206
|
-
|
|
264
|
+
end: o
|
|
265
|
+
}), B.current = !0;
|
|
266
|
+
}, ve = (e, t) => {
|
|
267
|
+
_.current || (_.current = t);
|
|
268
|
+
const r = B.current ? _.current : t;
|
|
269
|
+
V(e, {
|
|
207
270
|
start: r,
|
|
208
271
|
end: ae()
|
|
209
272
|
});
|
|
210
|
-
},
|
|
211
|
-
|
|
212
|
-
const r =
|
|
213
|
-
|
|
273
|
+
}, et = (e, t) => {
|
|
274
|
+
_.current || (_.current = t);
|
|
275
|
+
const r = B.current ? _.current : t;
|
|
276
|
+
V(e, {
|
|
214
277
|
start: r,
|
|
215
|
-
end:
|
|
278
|
+
end: ce()
|
|
216
279
|
});
|
|
217
|
-
},
|
|
218
|
-
|
|
219
|
-
end:
|
|
280
|
+
}, tt = (e, t) => {
|
|
281
|
+
C(te(t)) || V(e, {
|
|
282
|
+
end: te(t),
|
|
220
283
|
current: t
|
|
221
284
|
}, !0);
|
|
222
|
-
},
|
|
223
|
-
|
|
224
|
-
end:
|
|
285
|
+
}, rt = (e, t) => {
|
|
286
|
+
C(oe(t)) || V(e, {
|
|
287
|
+
end: oe(t),
|
|
225
288
|
current: t
|
|
226
289
|
}, !0);
|
|
227
|
-
},
|
|
228
|
-
|
|
290
|
+
}, nt = (e) => {
|
|
291
|
+
V(e, {
|
|
229
292
|
start: ae(),
|
|
230
|
-
end:
|
|
293
|
+
end: ce()
|
|
231
294
|
});
|
|
232
|
-
},
|
|
295
|
+
}, st = u.useCallback((e) => {
|
|
233
296
|
const {
|
|
234
297
|
id: t,
|
|
235
298
|
index: r,
|
|
236
299
|
parentId: n,
|
|
237
|
-
expandable:
|
|
238
|
-
idAttribute:
|
|
300
|
+
expandable: o,
|
|
301
|
+
idAttribute: a,
|
|
239
302
|
disabled: l
|
|
240
303
|
} = e;
|
|
241
|
-
|
|
304
|
+
d.current[t] = {
|
|
242
305
|
id: t,
|
|
243
306
|
index: r,
|
|
244
307
|
parentId: n,
|
|
245
|
-
expandable:
|
|
246
|
-
idAttribute:
|
|
308
|
+
expandable: o,
|
|
309
|
+
idAttribute: a,
|
|
247
310
|
disabled: l
|
|
248
311
|
};
|
|
249
|
-
}, []),
|
|
312
|
+
}, []), ot = u.useCallback((e) => {
|
|
250
313
|
const t = {
|
|
251
|
-
...
|
|
314
|
+
...d.current
|
|
252
315
|
};
|
|
253
|
-
delete t[e],
|
|
254
|
-
}, []),
|
|
255
|
-
|
|
256
|
-
}, []),
|
|
316
|
+
delete t[e], d.current = t, se((r) => r === e && ne.current === Rt(ne.current).activeElement ? ee(null)[0] : r);
|
|
317
|
+
}, []), ct = u.useCallback((e, t) => {
|
|
318
|
+
q.current[e] = t;
|
|
319
|
+
}, []), at = u.useCallback((e) => {
|
|
257
320
|
const t = {
|
|
258
|
-
...
|
|
321
|
+
...q.current
|
|
259
322
|
};
|
|
260
|
-
delete t[e],
|
|
261
|
-
}, []), xe = (e) => (
|
|
262
|
-
if (
|
|
263
|
-
return
|
|
264
|
-
const t =
|
|
265
|
-
return t ? (
|
|
266
|
-
},
|
|
323
|
+
delete t[e], q.current = t;
|
|
324
|
+
}, []), xe = (e) => (v(c) && (F(c) ? me(e, c) : C(c) || re(e)), !0), ge = (e) => {
|
|
325
|
+
if (F(c) && !C(c))
|
|
326
|
+
return re(e, c), !0;
|
|
327
|
+
const t = Ue(c);
|
|
328
|
+
return t ? (M(e, t), !0) : !1;
|
|
329
|
+
}, lt = (e) => {
|
|
267
330
|
let t = !1;
|
|
268
331
|
const r = e.key;
|
|
269
|
-
if (e.altKey || e.currentTarget !== e.target || !
|
|
332
|
+
if (e.altKey || e.currentTarget !== e.target || !c)
|
|
270
333
|
return;
|
|
271
334
|
const n = e.ctrlKey || e.metaKey;
|
|
272
335
|
switch (r) {
|
|
273
336
|
case " ":
|
|
274
|
-
!
|
|
275
|
-
end:
|
|
276
|
-
}), t = !0) :
|
|
337
|
+
!x && !C(c) && (g && e.shiftKey ? (V(e, {
|
|
338
|
+
end: c
|
|
339
|
+
}), t = !0) : g ? t = z(e, c, !0) : t = z(e, c)), e.stopPropagation();
|
|
277
340
|
break;
|
|
278
341
|
case "Enter":
|
|
279
|
-
|
|
342
|
+
C(c) || (v(c) ? (re(e), t = !0) : g ? t = z(e, c, !0) : t = z(e, c)), e.stopPropagation();
|
|
280
343
|
break;
|
|
281
344
|
case "ArrowDown":
|
|
282
|
-
|
|
345
|
+
g && e.shiftKey && !x && tt(e, c), me(e, c), t = !0;
|
|
283
346
|
break;
|
|
284
347
|
case "ArrowUp":
|
|
285
|
-
|
|
348
|
+
g && e.shiftKey && !x && rt(e, c), ze(e, c), t = !0;
|
|
286
349
|
break;
|
|
287
350
|
case "ArrowRight":
|
|
288
351
|
de ? t = ge(e) : t = xe(e);
|
|
@@ -291,71 +354,71 @@ const Pt = [], At = [], Re = /* @__PURE__ */ f.forwardRef(function(b, E) {
|
|
|
291
354
|
de ? t = xe(e) : t = ge(e);
|
|
292
355
|
break;
|
|
293
356
|
case "Home":
|
|
294
|
-
|
|
357
|
+
g && n && e.shiftKey && !x && !C(c) && ve(e, c), We(e), t = !0;
|
|
295
358
|
break;
|
|
296
359
|
case "End":
|
|
297
|
-
|
|
360
|
+
g && n && e.shiftKey && !x && !C(c) && et(e, c), Ge(e), t = !0;
|
|
298
361
|
break;
|
|
299
362
|
default:
|
|
300
|
-
r === "*" ? (
|
|
363
|
+
r === "*" ? (Je(e, c), t = !0) : g && n && r.toLowerCase() === "a" && !x ? (nt(e), t = !0) : !n && !e.shiftKey && Mt(r) && (He(e, c, r), t = !0);
|
|
301
364
|
}
|
|
302
|
-
t && (e.preventDefault(), e.stopPropagation()),
|
|
303
|
-
},
|
|
365
|
+
t && (e.preventDefault(), e.stopPropagation()), X && X(e);
|
|
366
|
+
}, it = (e) => {
|
|
304
367
|
if (e.target === e.currentTarget) {
|
|
305
|
-
const t = Array.isArray(
|
|
306
|
-
|
|
368
|
+
const t = Array.isArray(y) ? y[0] : y;
|
|
369
|
+
M(e, t || E(null)[0]);
|
|
307
370
|
}
|
|
308
|
-
|
|
309
|
-
},
|
|
310
|
-
|
|
311
|
-
},
|
|
312
|
-
return /* @__PURE__ */
|
|
371
|
+
Q && Q(e);
|
|
372
|
+
}, ut = (e) => {
|
|
373
|
+
se(null), L && L(e);
|
|
374
|
+
}, dt = d.current[c] ? d.current[c].idAttribute : null;
|
|
375
|
+
return /* @__PURE__ */ O(De.Provider, {
|
|
313
376
|
// TODO: fix this lint error
|
|
314
377
|
// eslint-disable-next-line react/jsx-no-constructed-context-values
|
|
315
378
|
value: {
|
|
316
379
|
icons: {
|
|
317
|
-
defaultCollapseIcon:
|
|
318
|
-
defaultExpandIcon:
|
|
319
|
-
defaultParentIcon:
|
|
320
|
-
defaultEndIcon:
|
|
380
|
+
defaultCollapseIcon: K,
|
|
381
|
+
defaultExpandIcon: P,
|
|
382
|
+
defaultParentIcon: N,
|
|
383
|
+
defaultEndIcon: $
|
|
321
384
|
},
|
|
322
|
-
focus:
|
|
323
|
-
toggleExpansion:
|
|
324
|
-
isExpanded:
|
|
325
|
-
isExpandable:
|
|
326
|
-
isFocused:
|
|
327
|
-
isSelected:
|
|
328
|
-
isDisabled:
|
|
329
|
-
selectNode:
|
|
330
|
-
selectRange:
|
|
331
|
-
multiSelect:
|
|
332
|
-
disabledItemsFocusable:
|
|
333
|
-
mapFirstChar:
|
|
334
|
-
unMapFirstChar:
|
|
335
|
-
registerNode:
|
|
336
|
-
unregisterNode:
|
|
385
|
+
focus: M,
|
|
386
|
+
toggleExpansion: re,
|
|
387
|
+
isExpanded: F,
|
|
388
|
+
isExpandable: v,
|
|
389
|
+
isFocused: Be,
|
|
390
|
+
isSelected: Le,
|
|
391
|
+
isDisabled: C,
|
|
392
|
+
selectNode: x ? Oe : z,
|
|
393
|
+
selectRange: x ? Oe : V,
|
|
394
|
+
multiSelect: g,
|
|
395
|
+
disabledItemsFocusable: w,
|
|
396
|
+
mapFirstChar: ct,
|
|
397
|
+
unMapFirstChar: at,
|
|
398
|
+
registerNode: st,
|
|
399
|
+
unregisterNode: ot,
|
|
337
400
|
treeId: pe
|
|
338
401
|
},
|
|
339
|
-
children: /* @__PURE__ */
|
|
340
|
-
children: /* @__PURE__ */
|
|
402
|
+
children: /* @__PURE__ */ O(ke, {
|
|
403
|
+
children: /* @__PURE__ */ O(Ft, {
|
|
341
404
|
role: "tree",
|
|
342
405
|
id: pe,
|
|
343
|
-
"aria-activedescendant":
|
|
344
|
-
"aria-multiselectable":
|
|
345
|
-
className:
|
|
346
|
-
ref:
|
|
406
|
+
"aria-activedescendant": dt,
|
|
407
|
+
"aria-multiselectable": g,
|
|
408
|
+
className: Nt(je.root, j),
|
|
409
|
+
ref: Ke,
|
|
347
410
|
tabIndex: 0,
|
|
348
|
-
onKeyDown:
|
|
349
|
-
onFocus:
|
|
350
|
-
onBlur:
|
|
411
|
+
onKeyDown: lt,
|
|
412
|
+
onFocus: it,
|
|
413
|
+
onBlur: ut,
|
|
351
414
|
ownerState: fe,
|
|
352
|
-
...
|
|
353
|
-
children:
|
|
415
|
+
...Ve,
|
|
416
|
+
children: b
|
|
354
417
|
})
|
|
355
418
|
})
|
|
356
419
|
});
|
|
357
420
|
});
|
|
358
|
-
process.env.NODE_ENV !== "production" && (
|
|
421
|
+
process.env.NODE_ENV !== "production" && (Fe.propTypes = {
|
|
359
422
|
// ----------------------------- Warning --------------------------------
|
|
360
423
|
// | These PropTypes are generated from the TypeScript type definitions |
|
|
361
424
|
// | To update them edit the d.ts file and run "yarn proptypes" |
|
|
@@ -363,87 +426,87 @@ process.env.NODE_ENV !== "production" && (Re.propTypes = {
|
|
|
363
426
|
/**
|
|
364
427
|
* The content of the component.
|
|
365
428
|
*/
|
|
366
|
-
children:
|
|
429
|
+
children: s.node,
|
|
367
430
|
/**
|
|
368
431
|
* Override or extend the styles applied to the component.
|
|
369
432
|
*/
|
|
370
|
-
classes:
|
|
433
|
+
classes: s.object,
|
|
371
434
|
/**
|
|
372
435
|
* @ignore
|
|
373
436
|
*/
|
|
374
|
-
className:
|
|
437
|
+
className: s.string,
|
|
375
438
|
/**
|
|
376
439
|
* The default icon used to collapse the node.
|
|
377
440
|
*/
|
|
378
|
-
defaultCollapseIcon:
|
|
441
|
+
defaultCollapseIcon: s.node,
|
|
379
442
|
/**
|
|
380
443
|
* The default icon displayed next to a end node. This is applied to all
|
|
381
444
|
* tree nodes and can be overridden by the TreeItem `icon` prop.
|
|
382
445
|
*/
|
|
383
|
-
defaultEndIcon:
|
|
446
|
+
defaultEndIcon: s.node,
|
|
384
447
|
/**
|
|
385
448
|
* Expanded node ids. (Uncontrolled)
|
|
386
449
|
* @default []
|
|
387
450
|
*/
|
|
388
|
-
defaultExpanded:
|
|
451
|
+
defaultExpanded: s.arrayOf(s.string),
|
|
389
452
|
/**
|
|
390
453
|
* The default icon used to expand the node.
|
|
391
454
|
*/
|
|
392
|
-
defaultExpandIcon:
|
|
455
|
+
defaultExpandIcon: s.node,
|
|
393
456
|
/**
|
|
394
457
|
* The default icon displayed next to a parent node. This is applied to all
|
|
395
458
|
* parent nodes and can be overridden by the TreeItem `icon` prop.
|
|
396
459
|
*/
|
|
397
|
-
defaultParentIcon:
|
|
460
|
+
defaultParentIcon: s.node,
|
|
398
461
|
/**
|
|
399
462
|
* Selected node ids. (Uncontrolled)
|
|
400
463
|
* When `multiSelect` is true this takes an array of strings; when false (default) a string.
|
|
401
464
|
* @default []
|
|
402
465
|
*/
|
|
403
|
-
defaultSelected:
|
|
466
|
+
defaultSelected: s.oneOfType([s.arrayOf(s.string), s.string]),
|
|
404
467
|
/**
|
|
405
468
|
* If `true`, will allow focus on disabled items.
|
|
406
469
|
* @default false
|
|
407
470
|
*/
|
|
408
|
-
disabledItemsFocusable:
|
|
471
|
+
disabledItemsFocusable: s.bool,
|
|
409
472
|
/**
|
|
410
473
|
* If `true` selection is disabled.
|
|
411
474
|
* @default false
|
|
412
475
|
*/
|
|
413
|
-
disableSelection:
|
|
476
|
+
disableSelection: s.bool,
|
|
414
477
|
/**
|
|
415
478
|
* Expanded node ids. (Controlled)
|
|
416
479
|
*/
|
|
417
|
-
expanded:
|
|
480
|
+
expanded: s.arrayOf(s.string),
|
|
418
481
|
/**
|
|
419
482
|
* This prop is used to help implement the accessibility logic.
|
|
420
483
|
* If you don't provide this prop. It falls back to a randomly generated id.
|
|
421
484
|
*/
|
|
422
|
-
id:
|
|
485
|
+
id: s.string,
|
|
423
486
|
/**
|
|
424
487
|
* If true `ctrl` and `shift` will trigger multiselect.
|
|
425
488
|
* @default false
|
|
426
489
|
*/
|
|
427
|
-
multiSelect:
|
|
490
|
+
multiSelect: s.bool,
|
|
428
491
|
/**
|
|
429
492
|
* @ignore
|
|
430
493
|
*/
|
|
431
|
-
onBlur:
|
|
494
|
+
onBlur: s.func,
|
|
432
495
|
/**
|
|
433
496
|
* @ignore
|
|
434
497
|
*/
|
|
435
|
-
onFocus:
|
|
498
|
+
onFocus: s.func,
|
|
436
499
|
/**
|
|
437
500
|
* @ignore
|
|
438
501
|
*/
|
|
439
|
-
onKeyDown:
|
|
502
|
+
onKeyDown: s.func,
|
|
440
503
|
/**
|
|
441
504
|
* Callback fired when tree items are focused.
|
|
442
505
|
*
|
|
443
506
|
* @param {React.SyntheticEvent} event The event source of the callback **Warning**: This is a generic event not a focus event.
|
|
444
507
|
* @param {string} value of the focused node.
|
|
445
508
|
*/
|
|
446
|
-
onNodeFocus:
|
|
509
|
+
onNodeFocus: s.func,
|
|
447
510
|
/**
|
|
448
511
|
* Callback fired when tree items are selected/unselected.
|
|
449
512
|
*
|
|
@@ -451,99 +514,102 @@ process.env.NODE_ENV !== "production" && (Re.propTypes = {
|
|
|
451
514
|
* @param {string[] | string} nodeIds Ids of the selected nodes. When `multiSelect` is true
|
|
452
515
|
* this is an array of strings; when false (default) a string.
|
|
453
516
|
*/
|
|
454
|
-
onNodeSelect:
|
|
517
|
+
onNodeSelect: s.func,
|
|
455
518
|
/**
|
|
456
519
|
* Callback fired when tree items are expanded/collapsed.
|
|
457
520
|
*
|
|
458
521
|
* @param {React.SyntheticEvent} event The event source of the callback.
|
|
459
522
|
* @param {array} nodeIds The ids of the expanded nodes.
|
|
460
523
|
*/
|
|
461
|
-
onNodeToggle:
|
|
524
|
+
onNodeToggle: s.func,
|
|
462
525
|
/**
|
|
463
526
|
* Selected node ids. (Controlled)
|
|
464
527
|
* When `multiSelect` is true this takes an array of strings; when false (default) a string.
|
|
465
528
|
*/
|
|
466
|
-
selected:
|
|
529
|
+
selected: s.oneOfType([s.arrayOf(s.string), s.string]),
|
|
467
530
|
/**
|
|
468
531
|
* The system prop that allows defining system overrides as well as additional CSS styles.
|
|
469
532
|
*/
|
|
470
|
-
sx:
|
|
533
|
+
sx: s.oneOfType([s.arrayOf(s.oneOfType([s.func, s.object, s.bool])), s.func, s.object])
|
|
471
534
|
});
|
|
472
|
-
var
|
|
473
|
-
Object.defineProperty(
|
|
535
|
+
var le = {}, Vt = Re;
|
|
536
|
+
Object.defineProperty(le, "__esModule", {
|
|
474
537
|
value: !0
|
|
475
538
|
});
|
|
476
|
-
var
|
|
477
|
-
|
|
539
|
+
var Me = le.default = void 0, jt = Vt(Ee()), Kt = Te;
|
|
540
|
+
Me = le.default = (0, jt.default)(/* @__PURE__ */ (0, Kt.jsx)("path", {
|
|
478
541
|
d: "M16.59 8.59 12 13.17 7.41 8.59 6 10l6 6 6-6z"
|
|
479
542
|
}), "ExpandMore");
|
|
480
|
-
var
|
|
481
|
-
Object.defineProperty(
|
|
543
|
+
var ie = {}, Lt = Re;
|
|
544
|
+
Object.defineProperty(ie, "__esModule", {
|
|
482
545
|
value: !0
|
|
483
546
|
});
|
|
484
|
-
var
|
|
485
|
-
|
|
547
|
+
var _e = ie.default = void 0, Bt = Lt(Ee()), Ut = Te;
|
|
548
|
+
_e = ie.default = (0, Bt.default)(/* @__PURE__ */ (0, Ut.jsx)("path", {
|
|
486
549
|
d: "M10 6 8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z"
|
|
487
550
|
}), "ChevronRight");
|
|
488
|
-
const
|
|
489
|
-
data:
|
|
490
|
-
idKey:
|
|
491
|
-
selected:
|
|
492
|
-
expanded:
|
|
493
|
-
disabled:
|
|
494
|
-
disableSearch:
|
|
495
|
-
onChange:
|
|
496
|
-
onToggle:
|
|
551
|
+
const cr = ({
|
|
552
|
+
data: i,
|
|
553
|
+
idKey: h = "id",
|
|
554
|
+
selected: m,
|
|
555
|
+
expanded: p,
|
|
556
|
+
disabled: b,
|
|
557
|
+
disableSearch: j,
|
|
558
|
+
onChange: K,
|
|
559
|
+
onToggle: $
|
|
497
560
|
}) => {
|
|
498
|
-
const [
|
|
499
|
-
(
|
|
500
|
-
) :
|
|
501
|
-
let
|
|
502
|
-
const
|
|
503
|
-
return /* @__PURE__ */
|
|
504
|
-
!
|
|
505
|
-
mt,
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
561
|
+
const [S, P] = Ne.useState(""), N = bt(i), T = Ne.useMemo(() => S.length > 0 ? N.filter(
|
|
562
|
+
(D) => D.name.toLowerCase().includes(S)
|
|
563
|
+
) : i, [S, i]);
|
|
564
|
+
let w = null;
|
|
565
|
+
const x = 500;
|
|
566
|
+
return /* @__PURE__ */ Se(we, { children: [
|
|
567
|
+
!j && /* @__PURE__ */ Se(we, { children: [
|
|
568
|
+
/* @__PURE__ */ O(mt, { px: 1, pt: 0.75, children: /* @__PURE__ */ O(
|
|
569
|
+
gt,
|
|
570
|
+
{
|
|
571
|
+
fullWidth: !0,
|
|
572
|
+
disableLabel: !0,
|
|
573
|
+
placeholder: "Filter",
|
|
574
|
+
sx: {
|
|
575
|
+
"& .MuiInputBase-input": {
|
|
576
|
+
p: "8px 0px 8px 12px",
|
|
577
|
+
fontSize: "small"
|
|
578
|
+
}
|
|
579
|
+
},
|
|
580
|
+
iconSize: "small",
|
|
581
|
+
onChange: (D) => {
|
|
582
|
+
w && clearTimeout(w), w = setTimeout(() => P(D.toLowerCase()), x);
|
|
514
583
|
}
|
|
515
|
-
},
|
|
516
|
-
iconSize: "small",
|
|
517
|
-
onChange: (I) => {
|
|
518
|
-
N && clearTimeout(N), N = setTimeout(() => ee(I.toLowerCase()), g);
|
|
519
584
|
}
|
|
520
|
-
}
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
585
|
+
) }),
|
|
586
|
+
/* @__PURE__ */ O(xt, { sx: { mt: 1.75 } })
|
|
587
|
+
] }),
|
|
588
|
+
/* @__PURE__ */ O(
|
|
589
|
+
Fe,
|
|
524
590
|
{
|
|
525
591
|
"aria-label": "tree view filter",
|
|
526
|
-
defaultCollapseIcon: /* @__PURE__ */
|
|
527
|
-
defaultExpandIcon: /* @__PURE__ */
|
|
592
|
+
defaultCollapseIcon: /* @__PURE__ */ O(Me, {}),
|
|
593
|
+
defaultExpandIcon: /* @__PURE__ */ O(_e, {}),
|
|
528
594
|
disableSelection: !0,
|
|
529
|
-
expanded:
|
|
530
|
-
onNodeToggle:
|
|
531
|
-
children:
|
|
532
|
-
const
|
|
533
|
-
return /* @__PURE__ */
|
|
534
|
-
|
|
595
|
+
expanded: p,
|
|
596
|
+
onNodeToggle: $,
|
|
597
|
+
children: T.map((D, g) => {
|
|
598
|
+
const L = String(D[h]), Q = ye.includes(m, L), X = ye.includes(b, L);
|
|
599
|
+
return /* @__PURE__ */ O(
|
|
600
|
+
ht,
|
|
535
601
|
{
|
|
536
|
-
id:
|
|
537
|
-
idKey:
|
|
538
|
-
name:
|
|
539
|
-
checked:
|
|
540
|
-
disabled:
|
|
541
|
-
disabledIds:
|
|
542
|
-
children:
|
|
543
|
-
onChange:
|
|
544
|
-
defaultSelected:
|
|
602
|
+
id: L,
|
|
603
|
+
idKey: h,
|
|
604
|
+
name: D.name,
|
|
605
|
+
checked: Q,
|
|
606
|
+
disabled: X,
|
|
607
|
+
disabledIds: b,
|
|
608
|
+
children: D.children,
|
|
609
|
+
onChange: K,
|
|
610
|
+
defaultSelected: m
|
|
545
611
|
},
|
|
546
|
-
|
|
612
|
+
g
|
|
547
613
|
);
|
|
548
614
|
})
|
|
549
615
|
}
|
|
@@ -551,5 +617,5 @@ const rr = ({
|
|
|
551
617
|
] });
|
|
552
618
|
};
|
|
553
619
|
export {
|
|
554
|
-
|
|
620
|
+
cr as TreeViewFilter
|
|
555
621
|
};
|