@hybridcore/ui 1.3.3 → 1.3.5
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/{ButtonBase-DE8d_U2E.js → ButtonBase-D6qhsxB0.js} +201 -210
- package/dist/{CardContent-Du2i427Y.js → CardContent-B8hqgH-I.js} +15 -15
- package/dist/{Checkbox-BGNAqLl0.js → Checkbox-BFWhj3s-.js} +154 -144
- package/dist/{Collapse-FRd0_2Pt.js → Collapse-D_TjnyE5.js} +96 -87
- package/dist/DialogContent-BCYm_d1s.js +864 -0
- package/dist/{FormControl-ChTmxscy.js → FormControl-BMRUQKHh.js} +479 -449
- package/dist/FormControlLabel-DENNVXWL.js +639 -0
- package/dist/{IconButton-Cu_XEJB2.js → IconButton-D8bwME9t.js} +22 -22
- package/dist/{Input-DU22-Zbo.js → Input-Dxzguyp5.js} +34 -34
- package/dist/{InputAdornment-6aeADcPO.js → InputAdornment-B8ERE7Zv.js} +12 -12
- package/dist/{List-nOXr-cFJ.js → List-DEWyK9IO.js} +12 -12
- package/dist/{MenuItem-DF45rx2m.js → MenuItem-DstAFfik.js} +26 -26
- package/dist/Modal-DNGEQJ1M.js +1267 -0
- package/dist/{OutlinedInput-DJCHjkR3.js → OutlinedInput-w2Cj9STF.js} +75 -78
- package/dist/{Paper-CD_ma6NJ.js → Paper-BseeergJ.js} +15 -15
- package/dist/Select-NDq3WyLt.js +2175 -0
- package/dist/Typography-Dg-ROiTA.js +201 -0
- package/dist/components/card/index.js +17 -17
- package/dist/components/card/styled.js +1 -1
- package/dist/components/collapsible-card/style.js +222 -302
- package/dist/components/confirm/dialog.js +13 -13
- package/dist/components/container/index.js +19 -19
- package/dist/components/context-menu/index.js +616 -203
- package/dist/components/data-management/instance-form/components/composite-list/index.js +1 -1
- package/dist/components/data-management/instance-form/components/variable/index.js +6 -6
- package/dist/components/data-management/instance-form/components/variables/index.js +1 -1
- package/dist/components/geometry-picker/index.js +3 -3
- package/dist/components/icon-button/index.js +1 -1
- package/dist/components/map/styled.js +14 -14
- package/dist/components/search-input/index.js +4 -4
- package/dist/components/template-property-filters/index.js +1 -1
- package/dist/components/template-property-filters/property.js +209 -10
- package/dist/components/tree-select/index.js +4 -4
- package/dist/components/treeview-filter/index.js +29 -30
- package/dist/components/treeview-filter/item/index.js +1 -1
- package/dist/components/treeview-filter/item-label/index.js +2 -2
- package/dist/createStyled-B96gjom1.js +1887 -0
- package/dist/createSvgIcon-B2WT0K4k.js +87 -0
- package/dist/{createSvgIcon-DPZ7UbxM.js → createSvgIcon-BNrb7rDY.js} +82 -85
- package/dist/{exactProp--3vlJ9a9.js → exactProp-CI_rjX83.js} +2 -2
- package/dist/{index-CtuBGOmk.js → index-B3Oj04nl.js} +5 -5
- package/dist/{index-DzFccwzL.js → index-CSfSVkKj.js} +204 -218
- package/dist/{listItemTextClasses-2BAu-hye.js → listItemTextClasses-CFiI_U7B.js} +2 -2
- package/dist/main.js +150 -144
- package/dist/styled-cPJbqF0E.js +677 -0
- package/dist/useTheme-C-T6Qisa.js +10 -0
- package/dist/useThemeProps-DeftUmqJ.js +107 -0
- package/dist/{utils-qcu0RzdN.js → utils-CCkxV0lZ.js} +15 -15
- package/package.json +3 -3
- package/dist/DialogContent-CKeAZ3Ts.js +0 -1982
- package/dist/FormControlLabel-Df7csguX.js +0 -827
- package/dist/ListItem-RJvRMwkZ.js +0 -428
- package/dist/Select-C1jD_gBQ.js +0 -2305
- package/dist/Typography-C2BkMNk-.js +0 -178
- package/dist/chainPropTypes-GRMJ22CO.js +0 -96
- package/dist/createSvgIcon-6wv0RQr3.js +0 -63
- package/dist/createTheme-C3DKplhE.js +0 -2395
- package/dist/property-BSufYw1E.js +0 -6888
- package/dist/requirePropFactory-BItwGLRQ.js +0 -18
- package/dist/resolveComponentProps-DozbaB8e.js +0 -54
- package/dist/styled-CVWGE9ik.js +0 -142
- package/dist/styled-iyoioZCr.js +0 -1033
- package/dist/unsupportedProp-BuVD30Gh.js +0 -9
- package/dist/useTheme--x3BjP9A.js +0 -17
- package/dist/useTheme-pWltVFb2.js +0 -10
- package/dist/useThemeProps-C90JF0Qc.js +0 -62
- package/dist/useThemeProps-DNZoozBw.js +0 -26
|
@@ -1,84 +1,71 @@
|
|
|
1
|
-
import { jsx as T, jsxs as
|
|
2
|
-
import
|
|
1
|
+
import { jsx as T, jsxs as re } from "react/jsx-runtime";
|
|
2
|
+
import ye from "./components/treeview-filter/item-label/index.js";
|
|
3
3
|
import se from "lodash";
|
|
4
4
|
import * as l from "react";
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import { g as
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import { u as Oe } from "./unsupportedProp-BuVD30Gh.js";
|
|
12
|
-
import { o as Se } from "./ownerDocument-CUrv0DIK.js";
|
|
13
|
-
function ce(e) {
|
|
14
|
-
var n, s, t = "";
|
|
15
|
-
if (typeof e == "string" || typeof e == "number") t += e;
|
|
16
|
-
else if (typeof e == "object") if (Array.isArray(e)) for (n = 0; n < e.length; n++) e[n] && (s = ce(e[n])) && (t && (t += " "), t += s);
|
|
17
|
-
else for (n in e) e[n] && (t && (t += " "), t += n);
|
|
18
|
-
return t;
|
|
19
|
-
}
|
|
20
|
-
function le() {
|
|
21
|
-
for (var e, n, s = 0, t = ""; s < arguments.length; ) (e = arguments[s++]) && (n = ce(e)) && (t && (t += " "), t += n);
|
|
22
|
-
return t;
|
|
23
|
-
}
|
|
5
|
+
import { c as ie, g as xe, u as Ie, a as Te } from "./useThemeProps-DeftUmqJ.js";
|
|
6
|
+
import { P as n } from "./createStyled-B96gjom1.js";
|
|
7
|
+
import { u as Ee, a as he, e as De } from "./ButtonBase-D6qhsxB0.js";
|
|
8
|
+
import { g as ve, s as W, a as $ } from "./styled-cPJbqF0E.js";
|
|
9
|
+
import { C as ce, u as Ne } from "./Collapse-D_TjnyE5.js";
|
|
10
|
+
import { o as Oe } from "./ownerDocument-CUrv0DIK.js";
|
|
24
11
|
const z = /* @__PURE__ */ l.createContext({});
|
|
25
12
|
process.env.NODE_ENV !== "production" && (z.displayName = "TreeViewContext");
|
|
26
|
-
function
|
|
27
|
-
for (let
|
|
28
|
-
if (
|
|
29
|
-
return
|
|
13
|
+
function Se(e, t) {
|
|
14
|
+
for (let o = 0; o < e.length; o += 1)
|
|
15
|
+
if (t(e[o]))
|
|
16
|
+
return o;
|
|
30
17
|
return -1;
|
|
31
18
|
}
|
|
32
|
-
function
|
|
33
|
-
let
|
|
34
|
-
for (;
|
|
35
|
-
const
|
|
36
|
-
if (e[
|
|
37
|
-
return
|
|
38
|
-
e[
|
|
19
|
+
function ke(e, t) {
|
|
20
|
+
let o = 0, s = e.length - 1;
|
|
21
|
+
for (; o <= s; ) {
|
|
22
|
+
const a = Math.floor((o + s) / 2);
|
|
23
|
+
if (e[a].element === t)
|
|
24
|
+
return a;
|
|
25
|
+
e[a].element.compareDocumentPosition(t) & Node.DOCUMENT_POSITION_PRECEDING ? s = a - 1 : o = a + 1;
|
|
39
26
|
}
|
|
40
|
-
return
|
|
27
|
+
return o;
|
|
41
28
|
}
|
|
42
29
|
const J = /* @__PURE__ */ l.createContext({});
|
|
43
30
|
process.env.NODE_ENV !== "production" && (J.displayName = "DescendantContext");
|
|
44
|
-
function
|
|
45
|
-
const
|
|
31
|
+
function we(e) {
|
|
32
|
+
const t = l.useRef(null);
|
|
46
33
|
return l.useEffect(() => {
|
|
47
|
-
|
|
48
|
-
}, [e]),
|
|
34
|
+
t.current = e;
|
|
35
|
+
}, [e]), t.current;
|
|
49
36
|
}
|
|
50
|
-
const
|
|
37
|
+
const ae = () => {
|
|
51
38
|
};
|
|
52
|
-
function
|
|
53
|
-
const [,
|
|
54
|
-
registerDescendant:
|
|
55
|
-
unregisterDescendant:
|
|
56
|
-
descendants:
|
|
57
|
-
parentId:
|
|
58
|
-
} = l.useContext(J), f =
|
|
59
|
-
return
|
|
39
|
+
function Re(e) {
|
|
40
|
+
const [, t] = l.useState(), {
|
|
41
|
+
registerDescendant: o = ae,
|
|
42
|
+
unregisterDescendant: s = ae,
|
|
43
|
+
descendants: a = [],
|
|
44
|
+
parentId: b = null
|
|
45
|
+
} = l.useContext(J), f = Se(a, (p) => p.element === e.element), m = we(a), d = a.some((p, c) => m && m[c] && m[c].element !== p.element);
|
|
46
|
+
return Ee(() => {
|
|
60
47
|
if (e.element)
|
|
61
|
-
return
|
|
48
|
+
return o({
|
|
62
49
|
...e,
|
|
63
50
|
index: f
|
|
64
51
|
}), () => {
|
|
65
|
-
|
|
52
|
+
s(e.element);
|
|
66
53
|
};
|
|
67
|
-
|
|
68
|
-
}, [
|
|
69
|
-
parentId:
|
|
54
|
+
t({});
|
|
55
|
+
}, [o, s, f, d, e]), {
|
|
56
|
+
parentId: b,
|
|
70
57
|
index: f
|
|
71
58
|
};
|
|
72
59
|
}
|
|
73
|
-
function
|
|
60
|
+
function le(e) {
|
|
74
61
|
const {
|
|
75
|
-
children:
|
|
76
|
-
id:
|
|
77
|
-
} = e, [
|
|
62
|
+
children: t,
|
|
63
|
+
id: o
|
|
64
|
+
} = e, [s, a] = l.useState([]), b = l.useCallback(({
|
|
78
65
|
element: d,
|
|
79
66
|
...p
|
|
80
67
|
}) => {
|
|
81
|
-
|
|
68
|
+
a((c) => {
|
|
82
69
|
let u;
|
|
83
70
|
if (c.length === 0)
|
|
84
71
|
return [{
|
|
@@ -86,78 +73,78 @@ function de(e) {
|
|
|
86
73
|
element: d,
|
|
87
74
|
index: 0
|
|
88
75
|
}];
|
|
89
|
-
const C =
|
|
76
|
+
const C = ke(c, d);
|
|
90
77
|
if (c[C] && c[C].element === d)
|
|
91
78
|
u = c;
|
|
92
79
|
else {
|
|
93
|
-
const
|
|
80
|
+
const g = {
|
|
94
81
|
...p,
|
|
95
82
|
element: d,
|
|
96
83
|
index: C
|
|
97
84
|
};
|
|
98
|
-
u = c.slice(), u.splice(C, 0,
|
|
85
|
+
u = c.slice(), u.splice(C, 0, g);
|
|
99
86
|
}
|
|
100
|
-
return u.forEach((
|
|
101
|
-
|
|
87
|
+
return u.forEach((g, y) => {
|
|
88
|
+
g.index = y;
|
|
102
89
|
}), u;
|
|
103
90
|
});
|
|
104
91
|
}, []), f = l.useCallback((d) => {
|
|
105
|
-
|
|
92
|
+
a((p) => p.filter((c) => d !== c.element));
|
|
106
93
|
}, []), m = l.useMemo(() => ({
|
|
107
|
-
descendants:
|
|
108
|
-
registerDescendant:
|
|
94
|
+
descendants: s,
|
|
95
|
+
registerDescendant: b,
|
|
109
96
|
unregisterDescendant: f,
|
|
110
|
-
parentId:
|
|
111
|
-
}), [
|
|
97
|
+
parentId: o
|
|
98
|
+
}), [s, b, f, o]);
|
|
112
99
|
return /* @__PURE__ */ T(J.Provider, {
|
|
113
100
|
value: m,
|
|
114
|
-
children:
|
|
101
|
+
children: t
|
|
115
102
|
});
|
|
116
103
|
}
|
|
117
|
-
process.env.NODE_ENV !== "production" && (
|
|
118
|
-
children:
|
|
119
|
-
id:
|
|
104
|
+
process.env.NODE_ENV !== "production" && (le.propTypes = {
|
|
105
|
+
children: n.node,
|
|
106
|
+
id: n.string
|
|
120
107
|
});
|
|
121
|
-
function
|
|
108
|
+
function $e(e) {
|
|
122
109
|
const {
|
|
123
|
-
focus:
|
|
124
|
-
isExpanded:
|
|
125
|
-
isExpandable:
|
|
126
|
-
isFocused:
|
|
127
|
-
isDisabled:
|
|
110
|
+
focus: t,
|
|
111
|
+
isExpanded: o,
|
|
112
|
+
isExpandable: s,
|
|
113
|
+
isFocused: a,
|
|
114
|
+
isDisabled: b,
|
|
128
115
|
isSelected: f,
|
|
129
116
|
multiSelect: m,
|
|
130
117
|
selectNode: d,
|
|
131
118
|
selectRange: p,
|
|
132
119
|
toggleExpansion: c
|
|
133
|
-
} = l.useContext(z), u =
|
|
120
|
+
} = l.useContext(z), u = s ? s(e) : !1, C = o ? o(e) : !1, g = a ? a(e) : !1, y = b ? b(e) : !1, i = f ? f(e) : !1;
|
|
134
121
|
return {
|
|
135
122
|
disabled: y,
|
|
136
123
|
expanded: C,
|
|
137
124
|
selected: i,
|
|
138
|
-
focused:
|
|
139
|
-
handleExpansion: (
|
|
125
|
+
focused: g,
|
|
126
|
+
handleExpansion: (r) => {
|
|
140
127
|
if (!y) {
|
|
141
|
-
|
|
142
|
-
const
|
|
143
|
-
u && !(
|
|
128
|
+
g || t(r, e);
|
|
129
|
+
const D = m && (r.shiftKey || r.ctrlKey || r.metaKey);
|
|
130
|
+
u && !(D && o(e)) && c(r, e);
|
|
144
131
|
}
|
|
145
132
|
},
|
|
146
|
-
handleSelection: (
|
|
147
|
-
y || (
|
|
133
|
+
handleSelection: (r) => {
|
|
134
|
+
y || (g || t(r, e), m && (r.shiftKey || r.ctrlKey || r.metaKey) ? r.shiftKey ? p(r, {
|
|
148
135
|
end: e
|
|
149
|
-
}) : d(
|
|
136
|
+
}) : d(r, e, !0) : d(r, e));
|
|
150
137
|
},
|
|
151
|
-
preventSelection: (
|
|
152
|
-
(
|
|
138
|
+
preventSelection: (r) => {
|
|
139
|
+
(r.shiftKey || r.ctrlKey || r.metaKey || y) && r.preventDefault();
|
|
153
140
|
}
|
|
154
141
|
};
|
|
155
142
|
}
|
|
156
|
-
const Q = /* @__PURE__ */ l.forwardRef(function(
|
|
143
|
+
const Q = /* @__PURE__ */ l.forwardRef(function(t, o) {
|
|
157
144
|
const {
|
|
158
|
-
classes:
|
|
159
|
-
className:
|
|
160
|
-
displayIcon:
|
|
145
|
+
classes: s,
|
|
146
|
+
className: a,
|
|
147
|
+
displayIcon: b,
|
|
161
148
|
expansionIcon: f,
|
|
162
149
|
icon: m,
|
|
163
150
|
label: d,
|
|
@@ -165,32 +152,32 @@ const Q = /* @__PURE__ */ l.forwardRef(function(n, s) {
|
|
|
165
152
|
onClick: c,
|
|
166
153
|
onMouseDown: u,
|
|
167
154
|
...C
|
|
168
|
-
} =
|
|
169
|
-
disabled:
|
|
155
|
+
} = t, {
|
|
156
|
+
disabled: g,
|
|
170
157
|
expanded: y,
|
|
171
158
|
selected: i,
|
|
172
159
|
focused: S,
|
|
173
160
|
handleExpansion: k,
|
|
174
161
|
handleSelection: w,
|
|
175
|
-
preventSelection:
|
|
176
|
-
} =
|
|
177
|
-
|
|
162
|
+
preventSelection: r
|
|
163
|
+
} = $e(p), D = m || f || b, v = (x) => {
|
|
164
|
+
r(x), u && u(x);
|
|
178
165
|
}, M = (x) => {
|
|
179
166
|
k(x), w(x), c && c(x);
|
|
180
167
|
};
|
|
181
168
|
return (
|
|
182
169
|
/* eslint-disable-next-line jsx-a11y/click-events-have-key-events,jsx-a11y/no-static-element-interactions -- Key event is handled by the TreeView */
|
|
183
|
-
/* @__PURE__ */
|
|
184
|
-
className:
|
|
170
|
+
/* @__PURE__ */ re("div", {
|
|
171
|
+
className: ie(a, s.root, y && s.expanded, i && s.selected, S && s.focused, g && s.disabled),
|
|
185
172
|
onClick: M,
|
|
186
|
-
onMouseDown:
|
|
187
|
-
ref:
|
|
173
|
+
onMouseDown: v,
|
|
174
|
+
ref: o,
|
|
188
175
|
...C,
|
|
189
176
|
children: [/* @__PURE__ */ T("div", {
|
|
190
|
-
className:
|
|
191
|
-
children:
|
|
177
|
+
className: s.iconContainer,
|
|
178
|
+
children: D
|
|
192
179
|
}), /* @__PURE__ */ T("div", {
|
|
193
|
-
className:
|
|
180
|
+
className: s.label,
|
|
194
181
|
children: d
|
|
195
182
|
})]
|
|
196
183
|
})
|
|
@@ -205,48 +192,48 @@ process.env.NODE_ENV !== "production" && (Q.propTypes = {
|
|
|
205
192
|
* Override or extend the styles applied to the component.
|
|
206
193
|
* See [CSS API](#css) below for more details.
|
|
207
194
|
*/
|
|
208
|
-
classes:
|
|
195
|
+
classes: n.object,
|
|
209
196
|
/**
|
|
210
197
|
* className applied to the root element.
|
|
211
198
|
*/
|
|
212
|
-
className:
|
|
199
|
+
className: n.string,
|
|
213
200
|
/**
|
|
214
201
|
* The icon to display next to the tree node's label. Either a parent or end icon.
|
|
215
202
|
*/
|
|
216
|
-
displayIcon:
|
|
203
|
+
displayIcon: n.node,
|
|
217
204
|
/**
|
|
218
205
|
* The icon to display next to the tree node's label. Either an expansion or collapse icon.
|
|
219
206
|
*/
|
|
220
|
-
expansionIcon:
|
|
207
|
+
expansionIcon: n.node,
|
|
221
208
|
/**
|
|
222
209
|
* The icon to display next to the tree node's label.
|
|
223
210
|
*/
|
|
224
|
-
icon:
|
|
211
|
+
icon: n.node,
|
|
225
212
|
/**
|
|
226
213
|
* The tree node label.
|
|
227
214
|
*/
|
|
228
|
-
label:
|
|
215
|
+
label: n.node,
|
|
229
216
|
/**
|
|
230
217
|
* The id of the node.
|
|
231
218
|
*/
|
|
232
|
-
nodeId:
|
|
219
|
+
nodeId: n.string.isRequired,
|
|
233
220
|
/**
|
|
234
221
|
* @ignore
|
|
235
222
|
*/
|
|
236
|
-
onClick:
|
|
223
|
+
onClick: n.func,
|
|
237
224
|
/**
|
|
238
225
|
* @ignore
|
|
239
226
|
*/
|
|
240
|
-
onMouseDown:
|
|
227
|
+
onMouseDown: n.func
|
|
241
228
|
});
|
|
242
|
-
function
|
|
243
|
-
return
|
|
229
|
+
function Me(e) {
|
|
230
|
+
return ve("MuiTreeItem", e);
|
|
244
231
|
}
|
|
245
|
-
const
|
|
232
|
+
const h = xe("MuiTreeItem", ["root", "group", "content", "expanded", "selected", "focused", "disabled", "iconContainer", "label"]), Pe = (e) => {
|
|
246
233
|
const {
|
|
247
|
-
classes:
|
|
234
|
+
classes: t
|
|
248
235
|
} = e;
|
|
249
|
-
return
|
|
236
|
+
return Te({
|
|
250
237
|
root: ["root"],
|
|
251
238
|
content: ["content"],
|
|
252
239
|
expanded: ["expanded"],
|
|
@@ -256,23 +243,23 @@ const E = Ee("MuiTreeItem", ["root", "group", "content", "expanded", "selected",
|
|
|
256
243
|
iconContainer: ["iconContainer"],
|
|
257
244
|
label: ["label"],
|
|
258
245
|
group: ["group"]
|
|
259
|
-
},
|
|
246
|
+
}, Me, t);
|
|
260
247
|
}, Fe = W("li", {
|
|
261
248
|
name: "MuiTreeItem",
|
|
262
249
|
slot: "Root",
|
|
263
|
-
overridesResolver: (e,
|
|
250
|
+
overridesResolver: (e, t) => t.root
|
|
264
251
|
})({
|
|
265
252
|
listStyle: "none",
|
|
266
253
|
margin: 0,
|
|
267
254
|
padding: 0,
|
|
268
255
|
outline: 0
|
|
269
|
-
}),
|
|
256
|
+
}), je = W(Q, {
|
|
270
257
|
name: "MuiTreeItem",
|
|
271
258
|
slot: "Content",
|
|
272
|
-
overridesResolver: (e,
|
|
273
|
-
[`& .${
|
|
274
|
-
},
|
|
275
|
-
[`& .${
|
|
259
|
+
overridesResolver: (e, t) => [t.content, t.iconContainer && {
|
|
260
|
+
[`& .${h.iconContainer}`]: t.iconContainer
|
|
261
|
+
}, t.label && {
|
|
262
|
+
[`& .${h.label}`]: t.label
|
|
276
263
|
}]
|
|
277
264
|
})(({
|
|
278
265
|
theme: e
|
|
@@ -290,14 +277,14 @@ const E = Ee("MuiTreeItem", ["root", "group", "content", "expanded", "selected",
|
|
|
290
277
|
backgroundColor: "transparent"
|
|
291
278
|
}
|
|
292
279
|
},
|
|
293
|
-
[`&.${
|
|
280
|
+
[`&.${h.disabled}`]: {
|
|
294
281
|
opacity: (e.vars || e).palette.action.disabledOpacity,
|
|
295
282
|
backgroundColor: "transparent"
|
|
296
283
|
},
|
|
297
|
-
[`&.${
|
|
284
|
+
[`&.${h.focused}`]: {
|
|
298
285
|
backgroundColor: (e.vars || e).palette.action.focus
|
|
299
286
|
},
|
|
300
|
-
[`&.${
|
|
287
|
+
[`&.${h.selected}`]: {
|
|
301
288
|
backgroundColor: e.vars ? `rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.selectedOpacity})` : $(e.palette.primary.main, e.palette.action.selectedOpacity),
|
|
302
289
|
"&:hover": {
|
|
303
290
|
backgroundColor: e.vars ? `rgba(${e.vars.palette.primary.mainChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.hoverOpacity}))` : $(e.palette.primary.main, e.palette.action.selectedOpacity + e.palette.action.hoverOpacity),
|
|
@@ -306,11 +293,11 @@ const E = Ee("MuiTreeItem", ["root", "group", "content", "expanded", "selected",
|
|
|
306
293
|
backgroundColor: e.vars ? `rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.selectedOpacity})` : $(e.palette.primary.main, e.palette.action.selectedOpacity)
|
|
307
294
|
}
|
|
308
295
|
},
|
|
309
|
-
[`&.${
|
|
296
|
+
[`&.${h.focused}`]: {
|
|
310
297
|
backgroundColor: e.vars ? `rgba(${e.vars.palette.primary.mainChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.focusOpacity}))` : $(e.palette.primary.main, e.palette.action.selectedOpacity + e.palette.action.focusOpacity)
|
|
311
298
|
}
|
|
312
299
|
},
|
|
313
|
-
[`& .${
|
|
300
|
+
[`& .${h.iconContainer}`]: {
|
|
314
301
|
marginRight: 4,
|
|
315
302
|
width: 15,
|
|
316
303
|
display: "flex",
|
|
@@ -320,7 +307,7 @@ const E = Ee("MuiTreeItem", ["root", "group", "content", "expanded", "selected",
|
|
|
320
307
|
fontSize: 18
|
|
321
308
|
}
|
|
322
309
|
},
|
|
323
|
-
[`& .${
|
|
310
|
+
[`& .${h.label}`]: {
|
|
324
311
|
width: "100%",
|
|
325
312
|
// fixes overflow - see https://github.com/mui/material-ui/issues/27372
|
|
326
313
|
minWidth: 0,
|
|
@@ -328,21 +315,21 @@ const E = Ee("MuiTreeItem", ["root", "group", "content", "expanded", "selected",
|
|
|
328
315
|
position: "relative",
|
|
329
316
|
...e.typography.body1
|
|
330
317
|
}
|
|
331
|
-
})),
|
|
318
|
+
})), Ke = W(ce, {
|
|
332
319
|
name: "MuiTreeItem",
|
|
333
320
|
slot: "Group",
|
|
334
|
-
overridesResolver: (e,
|
|
321
|
+
overridesResolver: (e, t) => t.group
|
|
335
322
|
})({
|
|
336
323
|
margin: 0,
|
|
337
324
|
padding: 0,
|
|
338
325
|
marginLeft: 17
|
|
339
|
-
}),
|
|
340
|
-
const
|
|
341
|
-
props:
|
|
326
|
+
}), de = /* @__PURE__ */ l.forwardRef(function(t, o) {
|
|
327
|
+
const s = Ie({
|
|
328
|
+
props: t,
|
|
342
329
|
name: "MuiTreeItem"
|
|
343
330
|
}), {
|
|
344
|
-
children:
|
|
345
|
-
className:
|
|
331
|
+
children: a,
|
|
332
|
+
className: b,
|
|
346
333
|
collapseIcon: f,
|
|
347
334
|
ContentComponent: m = Q,
|
|
348
335
|
ContentProps: d,
|
|
@@ -350,48 +337,48 @@ const E = Ee("MuiTreeItem", ["root", "group", "content", "expanded", "selected",
|
|
|
350
337
|
expandIcon: c,
|
|
351
338
|
disabled: u,
|
|
352
339
|
icon: C,
|
|
353
|
-
id:
|
|
340
|
+
id: g,
|
|
354
341
|
label: y,
|
|
355
342
|
nodeId: i,
|
|
356
343
|
onClick: S,
|
|
357
344
|
onMouseDown: k,
|
|
358
|
-
TransitionComponent: w =
|
|
359
|
-
TransitionProps:
|
|
360
|
-
...
|
|
361
|
-
} =
|
|
362
|
-
icons:
|
|
345
|
+
TransitionComponent: w = ce,
|
|
346
|
+
TransitionProps: r,
|
|
347
|
+
...D
|
|
348
|
+
} = s, {
|
|
349
|
+
icons: v = {},
|
|
363
350
|
focus: M,
|
|
364
351
|
isExpanded: x,
|
|
365
352
|
isFocused: X,
|
|
366
353
|
isSelected: Y,
|
|
367
354
|
isDisabled: Z,
|
|
368
|
-
multiSelect:
|
|
369
|
-
disabledItemsFocusable:
|
|
355
|
+
multiSelect: pe,
|
|
356
|
+
disabledItemsFocusable: ue,
|
|
370
357
|
mapFirstChar: P,
|
|
371
|
-
unMapFirstChar:
|
|
372
|
-
registerNode:
|
|
358
|
+
unMapFirstChar: F,
|
|
359
|
+
registerNode: j,
|
|
373
360
|
unregisterNode: K,
|
|
374
361
|
treeId: _
|
|
375
362
|
} = l.useContext(z);
|
|
376
363
|
let N = null;
|
|
377
|
-
|
|
378
|
-
const [ee,
|
|
364
|
+
g != null ? N = g : _ && i && (N = `${_}-${i}`);
|
|
365
|
+
const [ee, fe] = l.useState(null), ne = l.useRef(null), me = he(fe, o), be = l.useMemo(() => ({
|
|
379
366
|
element: ee,
|
|
380
367
|
id: i
|
|
381
368
|
}), [i, ee]), {
|
|
382
369
|
index: V,
|
|
383
370
|
parentId: te
|
|
384
|
-
} =
|
|
385
|
-
...
|
|
371
|
+
} = Re(be), O = !!(Array.isArray(a) ? a.length : a), R = x ? x(i) : !1, oe = X ? X(i) : !1, U = Y ? Y(i) : !1, A = Z ? Z(i) : !1, L = {
|
|
372
|
+
...s,
|
|
386
373
|
expanded: R,
|
|
387
374
|
focused: oe,
|
|
388
|
-
selected:
|
|
389
|
-
disabled:
|
|
390
|
-
}, I =
|
|
375
|
+
selected: U,
|
|
376
|
+
disabled: A
|
|
377
|
+
}, I = Pe(L);
|
|
391
378
|
let G, q;
|
|
392
|
-
O && (R ? q = f ||
|
|
393
|
-
if (
|
|
394
|
-
return
|
|
379
|
+
O && (R ? q = f || v.defaultCollapseIcon : q = c || v.defaultExpandIcon), O ? G = v.defaultParentIcon : G = p || v.defaultEndIcon, l.useEffect(() => {
|
|
380
|
+
if (j && K && V !== -1)
|
|
381
|
+
return j({
|
|
395
382
|
id: i,
|
|
396
383
|
idAttribute: N,
|
|
397
384
|
index: V,
|
|
@@ -401,37 +388,37 @@ const E = Ee("MuiTreeItem", ["root", "group", "content", "expanded", "selected",
|
|
|
401
388
|
}), () => {
|
|
402
389
|
K(i);
|
|
403
390
|
};
|
|
404
|
-
}, [
|
|
405
|
-
if (P &&
|
|
391
|
+
}, [j, K, te, V, i, O, u, N]), l.useEffect(() => {
|
|
392
|
+
if (P && F && y)
|
|
406
393
|
return P(i, ne.current.textContent.substring(0, 1).toLowerCase()), () => {
|
|
407
|
-
|
|
394
|
+
F(i);
|
|
408
395
|
};
|
|
409
|
-
}, [P,
|
|
396
|
+
}, [P, F, i, y]);
|
|
410
397
|
let B;
|
|
411
|
-
|
|
412
|
-
function
|
|
413
|
-
if (
|
|
398
|
+
pe ? B = U : U && (B = !0);
|
|
399
|
+
function ge(E) {
|
|
400
|
+
if (E.target === E.currentTarget) {
|
|
414
401
|
let H;
|
|
415
|
-
typeof
|
|
402
|
+
typeof E.target.getRootNode == "function" ? H = E.target.getRootNode() : H = Oe(E.target), H.getElementById(_).focus({
|
|
416
403
|
preventScroll: !0
|
|
417
404
|
});
|
|
418
405
|
}
|
|
419
|
-
const
|
|
420
|
-
!oe &&
|
|
406
|
+
const Ce = !ue && A;
|
|
407
|
+
!oe && E.currentTarget === E.target && !Ce && M(E, i);
|
|
421
408
|
}
|
|
422
|
-
return /* @__PURE__ */
|
|
423
|
-
className:
|
|
409
|
+
return /* @__PURE__ */ re(Fe, {
|
|
410
|
+
className: ie(I.root, b),
|
|
424
411
|
role: "treeitem",
|
|
425
412
|
"aria-expanded": O ? R : null,
|
|
426
413
|
"aria-selected": B,
|
|
427
|
-
"aria-disabled":
|
|
428
|
-
ref:
|
|
414
|
+
"aria-disabled": A || null,
|
|
415
|
+
ref: me,
|
|
429
416
|
id: N,
|
|
430
417
|
tabIndex: -1,
|
|
431
|
-
...
|
|
418
|
+
...D,
|
|
432
419
|
ownerState: L,
|
|
433
|
-
onFocus:
|
|
434
|
-
children: [/* @__PURE__ */ T(
|
|
420
|
+
onFocus: ge,
|
|
421
|
+
children: [/* @__PURE__ */ T(je, {
|
|
435
422
|
as: m,
|
|
436
423
|
ref: ne,
|
|
437
424
|
classes: {
|
|
@@ -452,22 +439,22 @@ const E = Ee("MuiTreeItem", ["root", "group", "content", "expanded", "selected",
|
|
|
452
439
|
displayIcon: G,
|
|
453
440
|
ownerState: L,
|
|
454
441
|
...d
|
|
455
|
-
}),
|
|
442
|
+
}), a && /* @__PURE__ */ T(le, {
|
|
456
443
|
id: i,
|
|
457
|
-
children: /* @__PURE__ */ T(
|
|
444
|
+
children: /* @__PURE__ */ T(Ke, {
|
|
458
445
|
as: w,
|
|
459
446
|
unmountOnExit: !0,
|
|
460
447
|
className: I.group,
|
|
461
448
|
in: R,
|
|
462
449
|
component: "ul",
|
|
463
450
|
role: "group",
|
|
464
|
-
...
|
|
465
|
-
children:
|
|
451
|
+
...r,
|
|
452
|
+
children: a
|
|
466
453
|
})
|
|
467
454
|
})]
|
|
468
455
|
});
|
|
469
456
|
});
|
|
470
|
-
process.env.NODE_ENV !== "production" && (
|
|
457
|
+
process.env.NODE_ENV !== "production" && (de.propTypes = {
|
|
471
458
|
// ----------------------------- Warning --------------------------------
|
|
472
459
|
// | These PropTypes are generated from the TypeScript type definitions |
|
|
473
460
|
// | To update them edit the d.ts file and run "yarn proptypes" |
|
|
@@ -475,122 +462,122 @@ process.env.NODE_ENV !== "production" && (pe.propTypes = {
|
|
|
475
462
|
/**
|
|
476
463
|
* The content of the component.
|
|
477
464
|
*/
|
|
478
|
-
children:
|
|
465
|
+
children: n.node,
|
|
479
466
|
/**
|
|
480
467
|
* Override or extend the styles applied to the component.
|
|
481
468
|
*/
|
|
482
|
-
classes:
|
|
469
|
+
classes: n.object,
|
|
483
470
|
/**
|
|
484
471
|
* @ignore
|
|
485
472
|
*/
|
|
486
|
-
className:
|
|
473
|
+
className: n.string,
|
|
487
474
|
/**
|
|
488
475
|
* The icon used to collapse the node.
|
|
489
476
|
*/
|
|
490
|
-
collapseIcon:
|
|
477
|
+
collapseIcon: n.node,
|
|
491
478
|
/**
|
|
492
479
|
* The component used for the content node.
|
|
493
480
|
* @default TreeItemContent
|
|
494
481
|
*/
|
|
495
|
-
ContentComponent:
|
|
482
|
+
ContentComponent: De,
|
|
496
483
|
/**
|
|
497
484
|
* Props applied to ContentComponent
|
|
498
485
|
*/
|
|
499
|
-
ContentProps:
|
|
486
|
+
ContentProps: n.object,
|
|
500
487
|
/**
|
|
501
488
|
* If `true`, the node is disabled.
|
|
502
489
|
* @default false
|
|
503
490
|
*/
|
|
504
|
-
disabled:
|
|
491
|
+
disabled: n.bool,
|
|
505
492
|
/**
|
|
506
493
|
* The icon displayed next to a end node.
|
|
507
494
|
*/
|
|
508
|
-
endIcon:
|
|
495
|
+
endIcon: n.node,
|
|
509
496
|
/**
|
|
510
497
|
* The icon used to expand the node.
|
|
511
498
|
*/
|
|
512
|
-
expandIcon:
|
|
499
|
+
expandIcon: n.node,
|
|
513
500
|
/**
|
|
514
501
|
* The icon to display next to the tree node's label.
|
|
515
502
|
*/
|
|
516
|
-
icon:
|
|
503
|
+
icon: n.node,
|
|
517
504
|
/**
|
|
518
505
|
* @ignore
|
|
519
506
|
*/
|
|
520
|
-
id:
|
|
507
|
+
id: n.string,
|
|
521
508
|
/**
|
|
522
509
|
* The tree node label.
|
|
523
510
|
*/
|
|
524
|
-
label:
|
|
511
|
+
label: n.node,
|
|
525
512
|
/**
|
|
526
513
|
* The id of the node.
|
|
527
514
|
*/
|
|
528
|
-
nodeId:
|
|
515
|
+
nodeId: n.string.isRequired,
|
|
529
516
|
/**
|
|
530
517
|
* @ignore
|
|
531
518
|
*/
|
|
532
|
-
onClick:
|
|
519
|
+
onClick: n.func,
|
|
533
520
|
/**
|
|
534
521
|
* This prop isn't supported.
|
|
535
522
|
* Use the `onNodeFocus` callback on the tree if you need to monitor a node's focus.
|
|
536
523
|
*/
|
|
537
|
-
onFocus:
|
|
524
|
+
onFocus: Ne,
|
|
538
525
|
/**
|
|
539
526
|
* @ignore
|
|
540
527
|
*/
|
|
541
|
-
onMouseDown:
|
|
528
|
+
onMouseDown: n.func,
|
|
542
529
|
/**
|
|
543
530
|
* The system prop that allows defining system overrides as well as additional CSS styles.
|
|
544
531
|
*/
|
|
545
|
-
sx:
|
|
532
|
+
sx: n.oneOfType([n.arrayOf(n.oneOfType([n.func, n.object, n.bool])), n.func, n.object]),
|
|
546
533
|
/**
|
|
547
534
|
* The component used for the transition.
|
|
548
535
|
* [Follow this guide](/material-ui/transitions/#transitioncomponent-prop) to learn more about the requirements for this component.
|
|
549
536
|
* @default Collapse
|
|
550
537
|
*/
|
|
551
|
-
TransitionComponent:
|
|
538
|
+
TransitionComponent: n.elementType,
|
|
552
539
|
/**
|
|
553
540
|
* Props applied to the transition element.
|
|
554
541
|
* By default, the element is based on this [`Transition`](http://reactcommunity.org/react-transition-group/transition/) component.
|
|
555
542
|
*/
|
|
556
|
-
TransitionProps:
|
|
543
|
+
TransitionProps: n.object
|
|
557
544
|
});
|
|
558
|
-
function
|
|
545
|
+
function _e({
|
|
559
546
|
id: e,
|
|
560
|
-
idKey:
|
|
561
|
-
name:
|
|
562
|
-
checked:
|
|
563
|
-
disabled:
|
|
564
|
-
disabledIds:
|
|
547
|
+
idKey: t,
|
|
548
|
+
name: o,
|
|
549
|
+
checked: s,
|
|
550
|
+
disabled: a,
|
|
551
|
+
disabledIds: b,
|
|
565
552
|
onChange: f,
|
|
566
553
|
children: m,
|
|
567
554
|
defaultSelected: d
|
|
568
555
|
}) {
|
|
569
556
|
return /* @__PURE__ */ T(
|
|
570
|
-
|
|
557
|
+
de,
|
|
571
558
|
{
|
|
572
559
|
nodeId: String(e),
|
|
573
560
|
label: /* @__PURE__ */ T(
|
|
574
|
-
|
|
561
|
+
ye,
|
|
575
562
|
{
|
|
576
563
|
id: e,
|
|
577
|
-
name:
|
|
578
|
-
checked:
|
|
579
|
-
disabled:
|
|
564
|
+
name: o,
|
|
565
|
+
checked: s,
|
|
566
|
+
disabled: a,
|
|
580
567
|
onChange: f
|
|
581
568
|
}
|
|
582
569
|
),
|
|
583
570
|
children: m && m.map((p, c) => {
|
|
584
|
-
const u = String(p[
|
|
571
|
+
const u = String(p[t]), C = se.includes(d, u), g = se.includes(b, u);
|
|
585
572
|
return /* @__PURE__ */ T(
|
|
586
|
-
|
|
573
|
+
_e,
|
|
587
574
|
{
|
|
588
575
|
id: u,
|
|
589
|
-
idKey:
|
|
576
|
+
idKey: t,
|
|
590
577
|
name: p.name,
|
|
591
578
|
checked: C,
|
|
592
|
-
disabled:
|
|
593
|
-
disabledIds:
|
|
579
|
+
disabled: g,
|
|
580
|
+
disabledIds: b,
|
|
594
581
|
children: p.children,
|
|
595
582
|
onChange: f,
|
|
596
583
|
defaultSelected: d
|
|
@@ -602,8 +589,7 @@ function Ve({
|
|
|
602
589
|
);
|
|
603
590
|
}
|
|
604
591
|
export {
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
z as T
|
|
608
|
-
le as c
|
|
592
|
+
le as D,
|
|
593
|
+
_e as I,
|
|
594
|
+
z as T
|
|
609
595
|
};
|