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