@hybridcore/ui 1.1.2 → 1.2.0

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.
Files changed (72) hide show
  1. package/dist/{ButtonBase-BYmh3G5j.js → ButtonBase-C7CHOX3y.js} +8 -7
  2. package/dist/{CardContent-C8PxkJz4.js → CardContent-DDFwwGfd.js} +3 -3
  3. package/dist/Checkbox-DP6_qp1v.js +469 -0
  4. package/dist/Collapse-9egEADkh.js +296 -0
  5. package/dist/{DialogContent-2aPOjKE7.js → DialogContent-MMUsECN2.js} +746 -789
  6. package/dist/{FormControl-BiAFm76F.js → FormControl-Cj5nc-Nv.js} +151 -163
  7. package/dist/FormControlLabel-j_atSYQA.js +827 -0
  8. package/dist/{IconButton-CQJ8wZE8.js → IconButton-2FRFauye.js} +4 -4
  9. package/dist/{Input-Bf5G3tFN.js → Input-BY_yKOrF.js} +5 -5
  10. package/dist/{listItemTextClasses-BvXFz-Oc.js → List-CgBXAAKA.js} +50 -62
  11. package/dist/ListItem-BFDUUjHt.js +428 -0
  12. package/dist/MenuItem-BejUFNIP.js +233 -0
  13. package/dist/{OutlinedInput-BEVE8VZQ.js → OutlinedInput-CnzESIDi.js} +5 -5
  14. package/dist/{Paper-CaiWdndQ.js → Paper-k37cShvn.js} +4 -4
  15. package/dist/{Select-DxpxZbJp.js → Select-BGt6e73I.js} +804 -1025
  16. package/dist/{Typography-XIiVCSto.js → Typography-Bjo-B13o.js} +3 -3
  17. package/dist/{chainPropTypes-DtBfUj5o.js → chainPropTypes-BmidnkZm.js} +2 -2
  18. package/dist/components/card/index.js +5 -5
  19. package/dist/components/card/styled.js +1 -1
  20. package/dist/components/collapsible-card/index.js +34 -0
  21. package/dist/components/collapsible-card/style.js +575 -0
  22. package/dist/components/confirm/dialog.js +5 -5
  23. package/dist/components/container/index.js +6 -6
  24. package/dist/components/context-menu/index.js +191 -603
  25. package/dist/components/data-management/instance-form/components/composite-list/index.js +1 -1
  26. package/dist/components/data-management/instance-form/components/variable/index.js +7 -5
  27. package/dist/components/data-management/instance-form/components/variables/index.js +1 -1
  28. package/dist/components/geometry-picker/coordinate/index.js +1 -1
  29. package/dist/components/geometry-picker/edit/index.js +1 -1
  30. package/dist/components/geometry-picker/geometry/index.js +1 -1
  31. package/dist/components/geometry-picker/index.js +2 -2
  32. package/dist/components/geometry-picker/kml/index.js +1 -1
  33. package/dist/components/geometry-picker/map/index.js +1 -1
  34. package/dist/components/geometry-picker/map/logic.js +1 -1
  35. package/dist/components/icon-button/index.js +1 -1
  36. package/dist/components/map/helpers/ol.js +2 -2
  37. package/dist/components/map/index.js +2 -2
  38. package/dist/components/map/logic.js +1 -1
  39. package/dist/components/map/styled.js +89 -6
  40. package/dist/components/search-input/index.js +119 -48
  41. package/dist/components/template-property-filters/index.js +78 -0
  42. package/dist/components/template-property-filters/property.js +7019 -0
  43. package/dist/components/tree-select/index.js +14 -13
  44. package/dist/components/treeview-filter/index.js +263 -328
  45. package/dist/components/treeview-filter/item/index.js +1 -1
  46. package/dist/components/treeview-filter/item-label/index.js +2 -2
  47. package/dist/createSvgIcon-DAR6Hwv8.js +77 -0
  48. package/dist/createSvgIcon-R_PakhKf.js +213 -0
  49. package/dist/{createTheme-agWfFD64.js → createTheme-oOCi1S_n.js} +5 -5
  50. package/dist/debounce-46wSf_lW.js +15 -0
  51. package/dist/{exactProp-CI8dagM-.js → exactProp-DhXxfU8X.js} +2 -2
  52. package/dist/index-C7W2wuUG.js +609 -0
  53. package/dist/index-DHnXB0CB.js +287 -0
  54. package/dist/{index-IvOfmM1F.js → index-JrtqxUdI.js} +6 -6
  55. package/dist/listItemTextClasses-CaI8l2PD.js +16 -0
  56. package/dist/main.d.ts +140 -0
  57. package/dist/main.js +1 -1
  58. package/dist/{ol-DXmSLlWv.js → ol-q6vTiF_t.js} +1 -1
  59. package/dist/resolveComponentProps-BwtY1IP3.js +54 -0
  60. package/dist/styled-CHMAYxVs.js +142 -0
  61. package/dist/{styled-Iq9jsO4F.js → styled-Wx2vv4j8.js} +1 -1
  62. package/dist/unsupportedProp-BuVD30Gh.js +9 -0
  63. package/dist/{useTheme-C0Dky5rV.js → useTheme-BI40KZ7w.js} +2 -1
  64. package/dist/{useTheme-CeyGVuQP.js → useTheme-CD5DEi5n.js} +2 -2
  65. package/dist/useThemeProps-D4or2IlT.js +62 -0
  66. package/dist/{useThemeProps-CzAjOL6F.js → useThemeProps-DT5EdhcP.js} +5 -4
  67. package/dist/{utils-DLpkeyhZ.js → utils-BEaBPoDF.js} +10 -10
  68. package/package.json +1 -1
  69. package/dist/Checkbox-DostZSwR.js +0 -673
  70. package/dist/index-Bw_m9ult.js +0 -1105
  71. package/dist/index-wW2D1aTG.js +0 -957
  72. package/dist/styled-C43K9x7T.js +0 -229
@@ -1,284 +1,236 @@
1
- import Oe, { jsx as _, jsxs as mt, Fragment as ht } from "react/jsx-runtime";
2
- import * as p from "react";
3
- import we from "react";
4
- import { C as gt, g as bt, s as xt, i as Ee } from "../../styled-Iq9jsO4F.js";
5
- import { c as St, P as o, k as yt } from "../../createTheme-agWfFD64.js";
6
- import { c as wt, u as le } from "../../Checkbox-DostZSwR.js";
7
- import { c as Nt, u as Re } from "../../useId-BHG98T5I.js";
8
- import { g as It } from "../../FormControl-BiAFm76F.js";
9
- import { o as Ct } from "../../ownerWindow-niciwP7I.js";
10
- import { a as Tt } from "../../extends-C3382pL0.js";
11
- import { s as Ot, u as Et, b as Rt, a as _e, c as _t } from "../../ButtonBase-BYmh3G5j.js";
12
- import { i as Pt } from "../../isMuiElement-CxT3_ACP.js";
13
- import { o as Pe } from "../../ownerDocument-CUrv0DIK.js";
14
- import { u as kt, a as Ft, T as Dt, D as Mt, c as At, I as jt } from "../../index-wW2D1aTG.js";
15
- import Ne from "lodash";
16
- import { Box as Vt } from "@mui/material";
17
- import { SearchInput as $t } from "../search-input/index.js";
18
- import { flattenNestedTemplates as Kt } from "../../utils/ontology.js";
19
- import { g as Lt, a as qt } from "../../chainPropTypes-DtBfUj5o.js";
20
- import { u as zt } from "../../useTheme-CeyGVuQP.js";
21
- function Bt(i, d) {
22
- return process.env.NODE_ENV === "production" ? () => null : (b, g, T, O, E) => {
23
- const M = T || "<<anonymous>>", N = E || g;
24
- return typeof b[g] < "u" ? new Error(`The ${O} \`${N}\` of \`${M}\` is deprecated. ${d}`) : null;
25
- };
1
+ import Ne, { jsx as C, jsxs as it, Fragment as ut } from "react/jsx-runtime";
2
+ import * as f from "react";
3
+ import Se from "react";
4
+ import { g as dt, s as ft, i as Oe } from "../../styled-Wx2vv4j8.js";
5
+ import { r as Te } from "../../createSvgIcon-DAR6Hwv8.js";
6
+ import { T as pt, D as ht, c as mt, I as xt } from "../../index-C7W2wuUG.js";
7
+ import we from "lodash";
8
+ import { Box as gt } from "@mui/material";
9
+ import { SearchInput as bt } from "../search-input/index.js";
10
+ import { flattenNestedTemplates as St } from "../../utils/ontology.js";
11
+ import { P as o } from "../../createTheme-oOCi1S_n.js";
12
+ import { g as wt, a as yt } from "../../chainPropTypes-BmidnkZm.js";
13
+ import { u as It } from "../../useThemeProps-D4or2IlT.js";
14
+ import { u as Ct } from "../../useTheme-CD5DEi5n.js";
15
+ import { u as Nt } from "../../useId-BHG98T5I.js";
16
+ import { a as Ot } from "../../ButtonBase-C7CHOX3y.js";
17
+ import { u as ye } from "../../createSvgIcon-R_PakhKf.js";
18
+ import { o as Tt } from "../../ownerDocument-CUrv0DIK.js";
19
+ function Rt(d) {
20
+ return dt("MuiTreeView", d);
26
21
  }
27
- function Ut(i, d) {
28
- if (process.env.NODE_ENV === "production")
29
- return () => null;
30
- const b = d ? Tt({}, d.propTypes) : null;
31
- return (T) => (O, E, M, N, $, ...z) => {
32
- const A = $ || E, w = b == null ? void 0 : b[A];
33
- if (w) {
34
- const m = w(O, E, M, N, $, ...z);
35
- if (m)
36
- return m;
37
- }
38
- return typeof O[E] < "u" && !O[T] ? new Error(`The prop \`${A}\` of \`${i}\` can only be used together with the \`${T}\` prop.`) : null;
39
- };
40
- }
41
- const vt = {
42
- configure: (i) => {
43
- process.env.NODE_ENV !== "production" && console.warn(["MUI: `ClassNameGenerator` import from `@mui/material/utils` is outdated and might cause unexpected issues.", "", "You should use `import { unstable_ClassNameGenerator } from '@mui/material/className'` instead", "", "The detail of the issue: https://github.com/mui/material-ui/issues/30011#issuecomment-1024993401", "", "The updated documentation: https://mui.com/guides/classname-generator/"].join(`
44
- `)), gt.configure(i);
45
- }
46
- }, Gt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
47
- __proto__: null,
48
- capitalize: St,
49
- createChainedFunction: Nt,
50
- createSvgIcon: wt,
51
- debounce: It,
52
- deprecatedPropType: Bt,
53
- isMuiElement: Pt,
54
- ownerDocument: Pe,
55
- ownerWindow: Ct,
56
- requirePropFactory: Ut,
57
- setRef: Ot,
58
- unstable_ClassNameGenerator: vt,
59
- unstable_useEnhancedEffect: Et,
60
- unstable_useId: Re,
61
- unsupportedProp: kt,
62
- useControlled: le,
63
- useEventCallback: Rt,
64
- useForkRef: _e,
65
- useIsFocusVisible: _t
66
- }, Symbol.toStringTag, { value: "Module" }));
67
- function Wt(i) {
68
- return bt("MuiTreeView", i);
69
- }
70
- Lt("MuiTreeView", ["root"]);
71
- const Ht = (i) => {
22
+ wt("MuiTreeView", ["root"]);
23
+ const kt = (d) => {
72
24
  const {
73
- classes: d
74
- } = i;
75
- return qt({
25
+ classes: b
26
+ } = d;
27
+ return yt({
76
28
  root: ["root"]
77
- }, Wt, d);
78
- }, Yt = xt("ul", {
29
+ }, Rt, b);
30
+ }, Et = ft("ul", {
79
31
  name: "MuiTreeView",
80
32
  slot: "Root",
81
- overridesResolver: (i, d) => d.root
33
+ overridesResolver: (d, b) => b.root
82
34
  })({
83
35
  padding: 0,
84
36
  margin: 0,
85
37
  listStyle: "none",
86
38
  outline: 0
87
39
  });
88
- function Jt(i) {
89
- return i && i.length === 1 && i.match(/\S/);
40
+ function Ft(d) {
41
+ return d && d.length === 1 && d.match(/\S/);
90
42
  }
91
- function Ie(i, d, b) {
92
- for (let g = d; g < i.length; g += 1)
93
- if (b === i[g])
94
- return g;
43
+ function Ie(d, b, E) {
44
+ for (let y = b; y < d.length; y += 1)
45
+ if (E === d[y])
46
+ return y;
95
47
  return -1;
96
48
  }
97
49
  function Ce() {
98
50
  return !1;
99
51
  }
100
- const Qt = [], Xt = [], ke = /* @__PURE__ */ p.forwardRef(function(d, b) {
101
- const g = Ft({
102
- props: d,
52
+ const Pt = [], At = [], Re = /* @__PURE__ */ f.forwardRef(function(b, E) {
53
+ const y = It({
54
+ props: b,
103
55
  name: "MuiTreeView"
104
56
  }), {
105
- children: T,
106
- className: O,
107
- defaultCollapseIcon: E,
108
- defaultEndIcon: M,
109
- defaultExpanded: N = Qt,
110
- defaultExpandIcon: $,
111
- defaultParentIcon: z,
112
- defaultSelected: A = Xt,
113
- disabledItemsFocusable: w = !1,
114
- disableSelection: m = !1,
115
- expanded: de,
116
- id: R,
117
- multiSelect: h = !1,
118
- onBlur: K,
119
- onFocus: H,
120
- onKeyDown: Y,
121
- onNodeFocus: fe,
122
- onNodeSelect: P,
123
- onNodeToggle: J,
124
- selected: Ae,
125
- ...je
126
- } = g, pe = zt().direction === "rtl", me = {
127
- ...g,
128
- defaultExpanded: N,
129
- defaultSelected: A,
130
- disabledItemsFocusable: w,
131
- disableSelection: m,
132
- multiSelect: h
133
- }, Ve = Ht(me), he = Re(R), re = p.useRef(null), $e = _e(re, b), [a, ne] = p.useState(null), u = p.useRef({}), B = p.useRef({}), [j, ge] = le({
134
- controlled: de,
135
- default: N,
57
+ children: $,
58
+ className: Y,
59
+ defaultCollapseIcon: Z,
60
+ defaultEndIcon: v,
61
+ defaultExpanded: A = Pt,
62
+ defaultExpandIcon: ee,
63
+ defaultParentIcon: te,
64
+ defaultSelected: q = At,
65
+ disabledItemsFocusable: N = !1,
66
+ disableSelection: g = !1,
67
+ expanded: ie,
68
+ id: I,
69
+ multiSelect: p = !1,
70
+ onBlur: D,
71
+ onFocus: U,
72
+ onKeyDown: z,
73
+ onNodeFocus: ue,
74
+ onNodeSelect: O,
75
+ onNodeToggle: W,
76
+ selected: Fe,
77
+ ...Pe
78
+ } = y, de = Ct().direction === "rtl", fe = {
79
+ ...y,
80
+ defaultExpanded: A,
81
+ defaultSelected: q,
82
+ disabledItemsFocusable: N,
83
+ disableSelection: g,
84
+ multiSelect: p
85
+ }, Ae = kt(fe), pe = Nt(I), re = f.useRef(null), De = Ot(re, E), [a, ne] = f.useState(null), i = f.useRef({}), j = f.useRef({}), [F, he] = ye({
86
+ controlled: ie,
87
+ default: A,
136
88
  name: "TreeView",
137
89
  state: "expanded"
138
- }), [x, Q] = le({
139
- controlled: Ae,
140
- default: A,
90
+ }), [h, H] = ye({
91
+ controlled: Fe,
92
+ default: q,
141
93
  name: "TreeView",
142
94
  state: "selected"
143
- }), k = p.useCallback((e) => Array.isArray(j) ? j.indexOf(e) !== -1 : !1, [j]), X = p.useCallback((e) => u.current[e] && u.current[e].expandable, []), Ke = p.useCallback((e) => Array.isArray(x) ? x.indexOf(e) !== -1 : x === e, [x]), S = p.useCallback((e) => {
144
- let t = u.current[e];
95
+ }), T = f.useCallback((e) => Array.isArray(F) ? F.indexOf(e) !== -1 : !1, [F]), G = f.useCallback((e) => i.current[e] && i.current[e].expandable, []), Me = f.useCallback((e) => Array.isArray(h) ? h.indexOf(e) !== -1 : h === e, [h]), m = f.useCallback((e) => {
96
+ let t = i.current[e];
145
97
  if (!t)
146
98
  return !1;
147
99
  if (t.disabled)
148
100
  return !0;
149
101
  for (; t.parentId != null; )
150
- if (t = u.current[t.parentId], t.disabled)
102
+ if (t = i.current[t.parentId], t.disabled)
151
103
  return !0;
152
104
  return !1;
153
- }, []), Le = (e) => a === e, Z = (e) => Object.keys(u.current).map((t) => u.current[t]).filter((t) => t.parentId === e).sort((t, r) => t.index - r.index).map((t) => t.id), I = (e) => {
154
- let t = Z(e);
155
- return w || (t = t.filter((r) => !S(r))), t;
156
- }, ee = (e) => {
157
- if (k(e) && I(e).length > 0)
158
- return I(e)[0];
159
- let t = u.current[e];
105
+ }, []), _e = (e) => a === e, J = (e) => Object.keys(i.current).map((t) => i.current[t]).filter((t) => t.parentId === e).sort((t, r) => t.index - r.index).map((t) => t.id), S = (e) => {
106
+ let t = J(e);
107
+ return N || (t = t.filter((r) => !m(r))), t;
108
+ }, Q = (e) => {
109
+ if (T(e) && S(e).length > 0)
110
+ return S(e)[0];
111
+ let t = i.current[e];
160
112
  for (; t != null; ) {
161
- const r = I(t.parentId), n = r[r.indexOf(t.id) + 1];
113
+ const r = S(t.parentId), n = r[r.indexOf(t.id) + 1];
162
114
  if (n)
163
115
  return n;
164
- t = u.current[t.parentId];
116
+ t = i.current[t.parentId];
165
117
  }
166
118
  return null;
167
119
  }, se = (e) => {
168
- const t = u.current[e], r = I(t.parentId), n = r.indexOf(e);
120
+ const t = i.current[e], r = S(t.parentId), n = r.indexOf(e);
169
121
  if (n === 0)
170
122
  return t.parentId;
171
123
  let s = r[n - 1];
172
- for (; k(s) && I(s).length > 0; )
173
- s = I(s).pop();
124
+ for (; T(s) && S(s).length > 0; )
125
+ s = S(s).pop();
174
126
  return s;
175
127
  }, oe = () => {
176
- let e = I(null).pop();
177
- for (; k(e); )
178
- e = I(e).pop();
128
+ let e = S(null).pop();
129
+ for (; T(e); )
130
+ e = S(e).pop();
179
131
  return e;
180
- }, ae = () => I(null)[0], qe = (e) => u.current[e].parentId, ze = (e, t) => {
132
+ }, ae = () => S(null)[0], je = (e) => i.current[e].parentId, Ve = (e, t) => {
181
133
  if (e === t)
182
134
  return [e, t];
183
- const r = u.current[e], n = u.current[t];
135
+ const r = i.current[e], n = i.current[t];
184
136
  if (r.parentId === n.id || n.parentId === r.id)
185
137
  return n.parentId === r.id ? [r.id, n.id] : [n.id, r.id];
186
138
  const s = [r.id], c = [n.id];
187
- let l = r.parentId, f = n.parentId, y = c.indexOf(l) !== -1, v = s.indexOf(f) !== -1, q = !0, G = !0;
188
- for (; !v && !y; )
189
- q && (s.push(l), y = c.indexOf(l) !== -1, q = l !== null, !y && q && (l = u.current[l].parentId)), G && !y && (c.push(f), v = s.indexOf(f) !== -1, G = f !== null, !v && G && (f = u.current[f].parentId));
190
- const W = y ? l : f, ye = Z(W), ft = s[s.indexOf(W) - 1], pt = c[c.indexOf(W) - 1];
191
- return ye.indexOf(ft) < ye.indexOf(pt) ? [e, t] : [t, e];
192
- }, Be = (e, t) => {
193
- const [r, n] = ze(e, t), s = [r];
139
+ let l = r.parentId, u = n.parentId, x = c.indexOf(l) !== -1, K = s.indexOf(u) !== -1, _ = !0, L = !0;
140
+ for (; !K && !x; )
141
+ _ && (s.push(l), x = c.indexOf(l) !== -1, _ = l !== null, !x && _ && (l = i.current[l].parentId)), L && !x && (c.push(u), K = s.indexOf(u) !== -1, L = u !== null, !K && L && (u = i.current[u].parentId));
142
+ const B = x ? l : u, be = J(B), ct = s[s.indexOf(B) - 1], lt = c[c.indexOf(B) - 1];
143
+ return be.indexOf(ct) < be.indexOf(lt) ? [e, t] : [t, e];
144
+ }, Ke = (e, t) => {
145
+ const [r, n] = Ve(e, t), s = [r];
194
146
  let c = r;
195
147
  for (; c !== n; )
196
- c = ee(c), s.push(c);
148
+ c = Q(c), s.push(c);
197
149
  return s;
198
- }, F = (e, t) => {
199
- t && (ne(t), fe && fe(e, t));
200
- }, be = (e, t) => F(e, ee(t)), Ue = (e, t) => F(e, se(t)), ve = (e) => F(e, ae()), Ge = (e) => F(e, oe()), We = (e, t, r) => {
150
+ }, R = (e, t) => {
151
+ t && (ne(t), ue && ue(e, t));
152
+ }, me = (e, t) => R(e, Q(t)), Le = (e, t) => R(e, se(t)), Be = (e) => R(e, ae()), $e = (e) => R(e, oe()), qe = (e, t, r) => {
201
153
  let n, s;
202
- const c = r.toLowerCase(), l = [], f = [];
203
- Object.keys(B.current).forEach((y) => {
204
- const v = B.current[y], q = u.current[y], G = q.parentId ? k(q.parentId) : !0, W = w ? !1 : S(y);
205
- G && !W && (l.push(y), f.push(v));
206
- }), n = l.indexOf(t) + 1, n >= l.length && (n = 0), s = Ie(f, n, c), s === -1 && (s = Ie(f, 0, c)), s > -1 && F(e, l[s]);
207
- }, te = (e, t = a) => {
154
+ const c = r.toLowerCase(), l = [], u = [];
155
+ Object.keys(j.current).forEach((x) => {
156
+ const K = j.current[x], _ = i.current[x], L = _.parentId ? T(_.parentId) : !0, B = N ? !1 : m(x);
157
+ L && !B && (l.push(x), u.push(K));
158
+ }), n = l.indexOf(t) + 1, n >= l.length && (n = 0), s = Ie(u, n, c), s === -1 && (s = Ie(u, 0, c)), s > -1 && R(e, l[s]);
159
+ }, X = (e, t = a) => {
208
160
  let r;
209
- j.indexOf(t) !== -1 ? r = j.filter((n) => n !== t) : r = [t].concat(j), J && J(e, r), ge(r);
210
- }, He = (e, t) => {
211
- const r = u.current[t], s = Z(r.parentId).filter((l) => X(l) && !k(l)), c = j.concat(s);
212
- s.length > 0 && (ge(c), J && J(e, c));
213
- }, D = p.useRef(null), L = p.useRef(!1), C = p.useRef([]), Ye = (e, t) => {
214
- let r = x.slice();
161
+ F.indexOf(t) !== -1 ? r = F.filter((n) => n !== t) : r = [t].concat(F), W && W(e, r), he(r);
162
+ }, Ue = (e, t) => {
163
+ const r = i.current[t], s = J(r.parentId).filter((l) => G(l) && !T(l)), c = F.concat(s);
164
+ s.length > 0 && (he(c), W && W(e, c));
165
+ }, k = f.useRef(null), M = f.useRef(!1), w = f.useRef([]), ze = (e, t) => {
166
+ let r = h.slice();
215
167
  const {
216
168
  start: n,
217
169
  next: s,
218
170
  current: c
219
171
  } = t;
220
- !s || !c || (C.current.indexOf(c) === -1 && (C.current = []), L.current ? C.current.indexOf(s) !== -1 ? (r = r.filter((l) => l === n || l !== c), C.current = C.current.filter((l) => l === n || l !== c)) : (r.push(s), C.current.push(s)) : (r.push(s), C.current.push(c, s)), P && P(e, r), Q(r));
221
- }, Je = (e, t) => {
222
- let r = x.slice();
172
+ !s || !c || (w.current.indexOf(c) === -1 && (w.current = []), M.current ? w.current.indexOf(s) !== -1 ? (r = r.filter((l) => l === n || l !== c), w.current = w.current.filter((l) => l === n || l !== c)) : (r.push(s), w.current.push(s)) : (r.push(s), w.current.push(c, s)), O && O(e, r), H(r));
173
+ }, We = (e, t) => {
174
+ let r = h.slice();
223
175
  const {
224
176
  start: n,
225
177
  end: s
226
178
  } = t;
227
- L.current && (r = r.filter((f) => C.current.indexOf(f) === -1));
228
- let c = Be(n, s);
229
- c = c.filter((f) => !S(f)), C.current = c;
179
+ M.current && (r = r.filter((u) => w.current.indexOf(u) === -1));
180
+ let c = Ke(n, s);
181
+ c = c.filter((u) => !m(u)), w.current = c;
230
182
  let l = r.concat(c);
231
- l = l.filter((f, y) => l.indexOf(f) === y), P && P(e, l), Q(l);
232
- }, Qe = (e, t) => {
183
+ l = l.filter((u, x) => l.indexOf(u) === x), O && O(e, l), H(l);
184
+ }, He = (e, t) => {
233
185
  let r;
234
- x.indexOf(t) !== -1 ? r = x.filter((n) => n !== t) : r = [t].concat(x), P && P(e, r), Q(r);
235
- }, Xe = (e, t) => {
236
- const r = h ? [t] : t;
237
- P && P(e, r), Q(r);
238
- }, U = (e, t, r = !1) => t ? (r ? Qe(e, t) : Xe(e, t), D.current = t, L.current = !1, C.current = [], !0) : !1, V = (e, t, r = !1) => {
186
+ h.indexOf(t) !== -1 ? r = h.filter((n) => n !== t) : r = [t].concat(h), O && O(e, r), H(r);
187
+ }, Ge = (e, t) => {
188
+ const r = p ? [t] : t;
189
+ O && O(e, r), H(r);
190
+ }, V = (e, t, r = !1) => t ? (r ? He(e, t) : Ge(e, t), k.current = t, M.current = !1, w.current = [], !0) : !1, P = (e, t, r = !1) => {
239
191
  const {
240
- start: n = D.current,
192
+ start: n = k.current,
241
193
  end: s,
242
194
  current: c
243
195
  } = t;
244
- r ? Ye(e, {
196
+ r ? ze(e, {
245
197
  start: n,
246
198
  next: s,
247
199
  current: c
248
- }) : n != null && s != null && Je(e, {
200
+ }) : n != null && s != null && We(e, {
249
201
  start: n,
250
202
  end: s
251
- }), L.current = !0;
252
- }, Ze = (e, t) => {
253
- D.current || (D.current = t);
254
- const r = L.current ? D.current : t;
255
- V(e, {
203
+ }), M.current = !0;
204
+ }, Je = (e, t) => {
205
+ k.current || (k.current = t);
206
+ const r = M.current ? k.current : t;
207
+ P(e, {
256
208
  start: r,
257
209
  end: ae()
258
210
  });
259
- }, et = (e, t) => {
260
- D.current || (D.current = t);
261
- const r = L.current ? D.current : t;
262
- V(e, {
211
+ }, Qe = (e, t) => {
212
+ k.current || (k.current = t);
213
+ const r = M.current ? k.current : t;
214
+ P(e, {
263
215
  start: r,
264
216
  end: oe()
265
217
  });
266
- }, tt = (e, t) => {
267
- S(ee(t)) || V(e, {
268
- end: ee(t),
218
+ }, Xe = (e, t) => {
219
+ m(Q(t)) || P(e, {
220
+ end: Q(t),
269
221
  current: t
270
222
  }, !0);
271
- }, rt = (e, t) => {
272
- S(se(t)) || V(e, {
223
+ }, Ye = (e, t) => {
224
+ m(se(t)) || P(e, {
273
225
  end: se(t),
274
226
  current: t
275
227
  }, !0);
276
- }, nt = (e) => {
277
- V(e, {
228
+ }, Ze = (e) => {
229
+ P(e, {
278
230
  start: ae(),
279
231
  end: oe()
280
232
  });
281
- }, st = p.useCallback((e) => {
233
+ }, ve = f.useCallback((e) => {
282
234
  const {
283
235
  id: t,
284
236
  index: r,
@@ -287,7 +239,7 @@ const Qt = [], Xt = [], ke = /* @__PURE__ */ p.forwardRef(function(d, b) {
287
239
  idAttribute: c,
288
240
  disabled: l
289
241
  } = e;
290
- u.current[t] = {
242
+ i.current[t] = {
291
243
  id: t,
292
244
  index: r,
293
245
  parentId: n,
@@ -295,24 +247,24 @@ const Qt = [], Xt = [], ke = /* @__PURE__ */ p.forwardRef(function(d, b) {
295
247
  idAttribute: c,
296
248
  disabled: l
297
249
  };
298
- }, []), ot = p.useCallback((e) => {
250
+ }, []), et = f.useCallback((e) => {
299
251
  const t = {
300
- ...u.current
252
+ ...i.current
301
253
  };
302
- delete t[e], u.current = t, ne((r) => r === e && re.current === Pe(re.current).activeElement ? Z(null)[0] : r);
303
- }, []), at = p.useCallback((e, t) => {
304
- B.current[e] = t;
305
- }, []), ct = p.useCallback((e) => {
254
+ delete t[e], i.current = t, ne((r) => r === e && re.current === Tt(re.current).activeElement ? J(null)[0] : r);
255
+ }, []), tt = f.useCallback((e, t) => {
256
+ j.current[e] = t;
257
+ }, []), rt = f.useCallback((e) => {
306
258
  const t = {
307
- ...B.current
259
+ ...j.current
308
260
  };
309
- delete t[e], B.current = t;
310
- }, []), xe = (e) => (X(a) && (k(a) ? be(e, a) : S(a) || te(e)), !0), Se = (e) => {
311
- if (k(a) && !S(a))
312
- return te(e, a), !0;
313
- const t = qe(a);
314
- return t ? (F(e, t), !0) : !1;
315
- }, lt = (e) => {
261
+ delete t[e], j.current = t;
262
+ }, []), xe = (e) => (G(a) && (T(a) ? me(e, a) : m(a) || X(e)), !0), ge = (e) => {
263
+ if (T(a) && !m(a))
264
+ return X(e, a), !0;
265
+ const t = je(a);
266
+ return t ? (R(e, t), !0) : !1;
267
+ }, nt = (e) => {
316
268
  let t = !1;
317
269
  const r = e.key;
318
270
  if (e.altKey || e.currentTarget !== e.target || !a)
@@ -320,91 +272,91 @@ const Qt = [], Xt = [], ke = /* @__PURE__ */ p.forwardRef(function(d, b) {
320
272
  const n = e.ctrlKey || e.metaKey;
321
273
  switch (r) {
322
274
  case " ":
323
- !m && !S(a) && (h && e.shiftKey ? (V(e, {
275
+ !g && !m(a) && (p && e.shiftKey ? (P(e, {
324
276
  end: a
325
- }), t = !0) : h ? t = U(e, a, !0) : t = U(e, a)), e.stopPropagation();
277
+ }), t = !0) : p ? t = V(e, a, !0) : t = V(e, a)), e.stopPropagation();
326
278
  break;
327
279
  case "Enter":
328
- S(a) || (X(a) ? (te(e), t = !0) : h ? t = U(e, a, !0) : t = U(e, a)), e.stopPropagation();
280
+ m(a) || (G(a) ? (X(e), t = !0) : p ? t = V(e, a, !0) : t = V(e, a)), e.stopPropagation();
329
281
  break;
330
282
  case "ArrowDown":
331
- h && e.shiftKey && !m && tt(e, a), be(e, a), t = !0;
283
+ p && e.shiftKey && !g && Xe(e, a), me(e, a), t = !0;
332
284
  break;
333
285
  case "ArrowUp":
334
- h && e.shiftKey && !m && rt(e, a), Ue(e, a), t = !0;
286
+ p && e.shiftKey && !g && Ye(e, a), Le(e, a), t = !0;
335
287
  break;
336
288
  case "ArrowRight":
337
- pe ? t = Se(e) : t = xe(e);
289
+ de ? t = ge(e) : t = xe(e);
338
290
  break;
339
291
  case "ArrowLeft":
340
- pe ? t = xe(e) : t = Se(e);
292
+ de ? t = xe(e) : t = ge(e);
341
293
  break;
342
294
  case "Home":
343
- h && n && e.shiftKey && !m && !S(a) && Ze(e, a), ve(e), t = !0;
295
+ p && n && e.shiftKey && !g && !m(a) && Je(e, a), Be(e), t = !0;
344
296
  break;
345
297
  case "End":
346
- h && n && e.shiftKey && !m && !S(a) && et(e, a), Ge(e), t = !0;
298
+ p && n && e.shiftKey && !g && !m(a) && Qe(e, a), $e(e), t = !0;
347
299
  break;
348
300
  default:
349
- r === "*" ? (He(e, a), t = !0) : h && n && r.toLowerCase() === "a" && !m ? (nt(e), t = !0) : !n && !e.shiftKey && Jt(r) && (We(e, a, r), t = !0);
301
+ r === "*" ? (Ue(e, a), t = !0) : p && n && r.toLowerCase() === "a" && !g ? (Ze(e), t = !0) : !n && !e.shiftKey && Ft(r) && (qe(e, a, r), t = !0);
350
302
  }
351
- t && (e.preventDefault(), e.stopPropagation()), Y && Y(e);
352
- }, it = (e) => {
303
+ t && (e.preventDefault(), e.stopPropagation()), z && z(e);
304
+ }, st = (e) => {
353
305
  if (e.target === e.currentTarget) {
354
- const t = Array.isArray(x) ? x[0] : x;
355
- F(e, t || I(null)[0]);
306
+ const t = Array.isArray(h) ? h[0] : h;
307
+ R(e, t || S(null)[0]);
356
308
  }
357
- H && H(e);
358
- }, ut = (e) => {
359
- ne(null), K && K(e);
360
- }, dt = u.current[a] ? u.current[a].idAttribute : null;
361
- return /* @__PURE__ */ _(Dt.Provider, {
309
+ U && U(e);
310
+ }, ot = (e) => {
311
+ ne(null), D && D(e);
312
+ }, at = i.current[a] ? i.current[a].idAttribute : null;
313
+ return /* @__PURE__ */ C(pt.Provider, {
362
314
  // TODO: fix this lint error
363
315
  // eslint-disable-next-line react/jsx-no-constructed-context-values
364
316
  value: {
365
317
  icons: {
366
- defaultCollapseIcon: E,
367
- defaultExpandIcon: $,
368
- defaultParentIcon: z,
369
- defaultEndIcon: M
318
+ defaultCollapseIcon: Z,
319
+ defaultExpandIcon: ee,
320
+ defaultParentIcon: te,
321
+ defaultEndIcon: v
370
322
  },
371
- focus: F,
372
- toggleExpansion: te,
373
- isExpanded: k,
374
- isExpandable: X,
375
- isFocused: Le,
376
- isSelected: Ke,
377
- isDisabled: S,
378
- selectNode: m ? Ce : U,
379
- selectRange: m ? Ce : V,
380
- multiSelect: h,
381
- disabledItemsFocusable: w,
382
- mapFirstChar: at,
383
- unMapFirstChar: ct,
384
- registerNode: st,
385
- unregisterNode: ot,
386
- treeId: he
323
+ focus: R,
324
+ toggleExpansion: X,
325
+ isExpanded: T,
326
+ isExpandable: G,
327
+ isFocused: _e,
328
+ isSelected: Me,
329
+ isDisabled: m,
330
+ selectNode: g ? Ce : V,
331
+ selectRange: g ? Ce : P,
332
+ multiSelect: p,
333
+ disabledItemsFocusable: N,
334
+ mapFirstChar: tt,
335
+ unMapFirstChar: rt,
336
+ registerNode: ve,
337
+ unregisterNode: et,
338
+ treeId: pe
387
339
  },
388
- children: /* @__PURE__ */ _(Mt, {
389
- children: /* @__PURE__ */ _(Yt, {
340
+ children: /* @__PURE__ */ C(ht, {
341
+ children: /* @__PURE__ */ C(Et, {
390
342
  role: "tree",
391
- id: he,
392
- "aria-activedescendant": dt,
393
- "aria-multiselectable": h,
394
- className: At(Ve.root, O),
395
- ref: $e,
343
+ id: pe,
344
+ "aria-activedescendant": at,
345
+ "aria-multiselectable": p,
346
+ className: mt(Ae.root, Y),
347
+ ref: De,
396
348
  tabIndex: 0,
397
- onKeyDown: lt,
398
- onFocus: it,
399
- onBlur: ut,
400
- ownerState: me,
401
- ...je,
402
- children: T
349
+ onKeyDown: nt,
350
+ onFocus: st,
351
+ onBlur: ot,
352
+ ownerState: fe,
353
+ ...Pe,
354
+ children: $
403
355
  })
404
356
  })
405
357
  });
406
358
  });
407
- process.env.NODE_ENV !== "production" && (ke.propTypes = {
359
+ process.env.NODE_ENV !== "production" && (Re.propTypes = {
408
360
  // ----------------------------- Warning --------------------------------
409
361
  // | These PropTypes are generated from the TypeScript type definitions |
410
362
  // | To update them edit the d.ts file and run "yarn proptypes" |
@@ -518,57 +470,40 @@ process.env.NODE_ENV !== "production" && (ke.propTypes = {
518
470
  */
519
471
  sx: o.oneOfType([o.arrayOf(o.oneOfType([o.func, o.object, o.bool])), o.func, o.object])
520
472
  });
521
- var ie = {}, ce = {};
522
- const Zt = /* @__PURE__ */ yt(Gt);
523
- var Te;
524
- function Fe() {
525
- return Te || (Te = 1, function(i) {
526
- "use client";
527
- Object.defineProperty(i, "__esModule", {
528
- value: !0
529
- }), Object.defineProperty(i, "default", {
530
- enumerable: !0,
531
- get: function() {
532
- return d.createSvgIcon;
533
- }
534
- });
535
- var d = Zt;
536
- }(ce)), ce;
537
- }
538
- var er = Ee;
539
- Object.defineProperty(ie, "__esModule", {
473
+ var ce = {}, Dt = Oe;
474
+ Object.defineProperty(ce, "__esModule", {
540
475
  value: !0
541
476
  });
542
- var De = ie.default = void 0, tr = er(Fe()), rr = Oe;
543
- De = ie.default = (0, tr.default)(/* @__PURE__ */ (0, rr.jsx)("path", {
477
+ var ke = ce.default = void 0, Mt = Dt(Te()), _t = Ne;
478
+ ke = ce.default = (0, Mt.default)(/* @__PURE__ */ (0, _t.jsx)("path", {
544
479
  d: "M16.59 8.59 12 13.17 7.41 8.59 6 10l6 6 6-6z"
545
480
  }), "ExpandMore");
546
- var ue = {}, nr = Ee;
547
- Object.defineProperty(ue, "__esModule", {
481
+ var le = {}, jt = Oe;
482
+ Object.defineProperty(le, "__esModule", {
548
483
  value: !0
549
484
  });
550
- var Me = ue.default = void 0, sr = nr(Fe()), or = Oe;
551
- Me = ue.default = (0, sr.default)(/* @__PURE__ */ (0, or.jsx)("path", {
485
+ var Ee = le.default = void 0, Vt = jt(Te()), Kt = Ne;
486
+ Ee = le.default = (0, Vt.default)(/* @__PURE__ */ (0, Kt.jsx)("path", {
552
487
  d: "M10 6 8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z"
553
488
  }), "ChevronRight");
554
- const Or = ({
555
- data: i,
556
- idKey: d = "id",
557
- selected: b,
558
- expanded: g,
559
- disabled: T,
560
- disableSearch: O,
561
- onChange: E,
562
- onToggle: M
489
+ const nr = ({
490
+ data: d,
491
+ idKey: b = "id",
492
+ selected: E,
493
+ expanded: y,
494
+ disabled: $,
495
+ disableSearch: Y,
496
+ onChange: Z,
497
+ onToggle: v
563
498
  }) => {
564
- const [N, $] = we.useState(""), z = Kt(i), A = we.useMemo(() => N.length > 0 ? z.filter(
565
- (R) => R.name.toLowerCase().includes(N)
566
- ) : i, [N, i]);
567
- let w = null;
568
- const m = 500;
569
- return /* @__PURE__ */ mt(ht, { children: [
570
- !O && /* @__PURE__ */ _(Vt, { px: 1, children: /* @__PURE__ */ _(
571
- $t,
499
+ const [A, ee] = Se.useState(""), te = St(d), q = Se.useMemo(() => A.length > 0 ? te.filter(
500
+ (I) => I.name.toLowerCase().includes(A)
501
+ ) : d, [A, d]);
502
+ let N = null;
503
+ const g = 500;
504
+ return /* @__PURE__ */ it(ut, { children: [
505
+ !Y && /* @__PURE__ */ C(gt, { px: 1, children: /* @__PURE__ */ C(
506
+ bt,
572
507
  {
573
508
  fullWidth: !0,
574
509
  disableLabel: !0,
@@ -580,36 +515,36 @@ const Or = ({
580
515
  }
581
516
  },
582
517
  iconSize: "small",
583
- onChange: (R) => {
584
- w && clearTimeout(w), w = setTimeout(() => $(R.toLowerCase()), m);
518
+ onChange: (I) => {
519
+ N && clearTimeout(N), N = setTimeout(() => ee(I.toLowerCase()), g);
585
520
  }
586
521
  }
587
522
  ) }),
588
- /* @__PURE__ */ _(
589
- ke,
523
+ /* @__PURE__ */ C(
524
+ Re,
590
525
  {
591
526
  "aria-label": "tree view filter",
592
- defaultCollapseIcon: /* @__PURE__ */ _(De, {}),
593
- defaultExpandIcon: /* @__PURE__ */ _(Me, {}),
527
+ defaultCollapseIcon: /* @__PURE__ */ C(ke, {}),
528
+ defaultExpandIcon: /* @__PURE__ */ C(Ee, {}),
594
529
  disableSelection: !0,
595
- expanded: g,
596
- onNodeToggle: M,
597
- children: A.map((R, h) => {
598
- const K = String(R[d]), H = Ne.includes(b, K), Y = Ne.includes(T, K);
599
- return /* @__PURE__ */ _(
600
- jt,
530
+ expanded: y,
531
+ onNodeToggle: v,
532
+ children: q.map((I, p) => {
533
+ const D = String(I[b]), U = we.includes(E, D), z = we.includes($, D);
534
+ return /* @__PURE__ */ C(
535
+ xt,
601
536
  {
602
- id: K,
603
- idKey: d,
604
- name: R.name,
605
- checked: H,
606
- disabled: Y,
607
- disabledIds: T,
608
- children: R.children,
609
- onChange: E,
610
- defaultSelected: b
537
+ id: D,
538
+ idKey: b,
539
+ name: I.name,
540
+ checked: U,
541
+ disabled: z,
542
+ disabledIds: $,
543
+ children: I.children,
544
+ onChange: Z,
545
+ defaultSelected: E
611
546
  },
612
- h
547
+ p
613
548
  );
614
549
  })
615
550
  }
@@ -617,5 +552,5 @@ const Or = ({
617
552
  ] });
618
553
  };
619
554
  export {
620
- Or as TreeViewFilter
555
+ nr as TreeViewFilter
621
556
  };