@thebuoyant-tsdev/mui-ts-library 3.1.1 → 3.2.1
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/README.de.md +18 -0
- package/README.md +18 -0
- package/dist/index.cjs +2 -2
- package/dist/index.js +172 -172
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { createContext as e, useCallback as t, useContext as n, useEffect as r, useId as i, useLayoutEffect as a, useMemo as o, useRef as s, useState as c } from "react";
|
|
2
2
|
import { Autocomplete as l, Avatar as u, Box as d, Button as f, Checkbox as p, Chip as m, Dialog as h, DialogActions as g, DialogContent as _, DialogContentText as v, DialogTitle as y, Divider as b, FormControl as x, FormControlLabel as S, FormHelperText as C, IconButton as w, InputAdornment as T, InputLabel as E, ListItemIcon as D, ListItemText as O, Menu as k, MenuItem as A, OutlinedInput as j, Paper as M, Popover as N, Select as P, Stack as F, Switch as I, TextField as L, ToggleButton as R, ToggleButtonGroup as z, Tooltip as B, Typography as V, useTheme as H } from "@mui/material";
|
|
3
3
|
import { EditorView as U, highlightActiveLine as W, highlightActiveLineGutter as ee, keymap as te, lineNumbers as G, placeholder as ne } from "@codemirror/view";
|
|
4
|
-
import { Compartment as
|
|
5
|
-
import { json as
|
|
6
|
-
import { defaultKeymap as
|
|
4
|
+
import { Compartment as K, EditorState as q } from "@codemirror/state";
|
|
5
|
+
import { json as re, jsonParseLinter as ie } from "@codemirror/lang-json";
|
|
6
|
+
import { defaultKeymap as ae, history as oe, historyKeymap as se, redo as ce, undo as le } from "@codemirror/commands";
|
|
7
7
|
import { HighlightStyle as ue, syntaxHighlighting as de } from "@codemirror/language";
|
|
8
8
|
import { lintGutter as fe, linter as pe } from "@codemirror/lint";
|
|
9
9
|
import { tags as J } from "@lezer/highlight";
|
|
@@ -92,7 +92,7 @@ var kt = {
|
|
|
92
92
|
//#endregion
|
|
93
93
|
//#region src/components/json-editor/JsonEditorContent.tsx
|
|
94
94
|
function jt({ value: e, onChange: t, placeholder: n, disabled: i = !1, readonly: a = !1, showLineNumbers: o = !0, showMinimap: c = !1, highlightColors: l, onViewReady: u, onCursorChange: f, onBlur: p, onFocus: m }) {
|
|
95
|
-
let h = s(null), g = s(null), _ = s(t), v = s(f), y = s(p), b = s(m), x = s(u), S = s(new
|
|
95
|
+
let h = s(null), g = s(null), _ = s(t), v = s(f), y = s(p), b = s(m), x = s(u), S = s(new K()), C = s(new K()), w = H(), T = w.palette.mode === "dark", E = l?.propertyName ?? w.palette.primary.main, D = l?.string ?? w.palette.success.main, O = l?.number ?? w.palette.warning.main, k = l?.boolean ?? w.palette.info.main, A = l?.null ?? w.palette.text.secondary;
|
|
96
96
|
return r(() => {
|
|
97
97
|
_.current = t;
|
|
98
98
|
}, [t]), r(() => {
|
|
@@ -192,13 +192,13 @@ function jt({ value: e, onChange: t, placeholder: n, disabled: i = !1, readonly:
|
|
|
192
192
|
})] : [], u = [
|
|
193
193
|
s,
|
|
194
194
|
de(r),
|
|
195
|
-
|
|
195
|
+
re(),
|
|
196
196
|
fe(),
|
|
197
|
-
pe(
|
|
197
|
+
pe(ie()),
|
|
198
198
|
oe(),
|
|
199
|
-
te.of([...
|
|
199
|
+
te.of([...ae, ...se]),
|
|
200
200
|
S.current.of(U.editable.of(!i && !a)),
|
|
201
|
-
C.current.of(
|
|
201
|
+
C.current.of(q.readOnly.of(a)),
|
|
202
202
|
W(),
|
|
203
203
|
...o ? [G(), ee()] : [],
|
|
204
204
|
...n ? [ne(n)] : [],
|
|
@@ -217,7 +217,7 @@ function jt({ value: e, onChange: t, placeholder: n, disabled: i = !1, readonly:
|
|
|
217
217
|
}
|
|
218
218
|
})
|
|
219
219
|
], d = new U({
|
|
220
|
-
state:
|
|
220
|
+
state: q.create({
|
|
221
221
|
doc: t,
|
|
222
222
|
extensions: u
|
|
223
223
|
}),
|
|
@@ -244,7 +244,7 @@ function jt({ value: e, onChange: t, placeholder: n, disabled: i = !1, readonly:
|
|
|
244
244
|
insert: e ?? ""
|
|
245
245
|
} });
|
|
246
246
|
}, [e]), r(() => {
|
|
247
|
-
g.current?.dispatch({ effects: [S.current.reconfigure(U.editable.of(!i && !a)), C.current.reconfigure(
|
|
247
|
+
g.current?.dispatch({ effects: [S.current.reconfigure(U.editable.of(!i && !a)), C.current.reconfigure(q.readOnly.of(a))] });
|
|
248
248
|
}, [i, a]), /* @__PURE__ */ Y(d, {
|
|
249
249
|
ref: h,
|
|
250
250
|
sx: {
|
|
@@ -2219,16 +2219,16 @@ function An({ scrollRef: e, onScroll: t, onTaskClick: n, onMilestoneClick: a, dr
|
|
|
2219
2219
|
let t = e.current.clientWidth;
|
|
2220
2220
|
e.current.scrollLeft = Math.max(0, z - t / 2);
|
|
2221
2221
|
}, []);
|
|
2222
|
-
let U = C === "days" ? 20 : C === "weeks" ? 40 : C === "quarters" ? 360 : 120, W = P ? 80 : 40, { activeDrag: ee, suppressClickRef: te, handleBarMouseDown: G, handleProgressMouseDown: ne, formatDragDate:
|
|
2222
|
+
let U = C === "days" ? 20 : C === "weeks" ? 40 : C === "quarters" ? 360 : 120, W = P ? 80 : 40, { activeDrag: ee, suppressClickRef: te, handleBarMouseDown: G, handleProgressMouseDown: ne, formatDragDate: K } = yn({
|
|
2223
2223
|
totalWidth: N,
|
|
2224
2224
|
displayRange: j,
|
|
2225
2225
|
onTaskMoved: h,
|
|
2226
2226
|
onTaskResized: g,
|
|
2227
2227
|
onTasksChange: _
|
|
2228
|
-
}), [
|
|
2229
|
-
|
|
2230
|
-
let
|
|
2231
|
-
return
|
|
2228
|
+
}), [q, re] = c(null), ie = s(v);
|
|
2229
|
+
ie.current = v;
|
|
2230
|
+
let ae = s(_);
|
|
2231
|
+
return ae.current = _, /* @__PURE__ */ Y(d, {
|
|
2232
2232
|
ref: e,
|
|
2233
2233
|
onScroll: t,
|
|
2234
2234
|
"data-testid": "gantt-timeline-scroll",
|
|
@@ -2274,7 +2274,7 @@ function An({ scrollRef: e, onScroll: t, onTaskClick: n, onMilestoneClick: a, dr
|
|
|
2274
2274
|
progressDraggable: f,
|
|
2275
2275
|
onTaskClick: n,
|
|
2276
2276
|
onMilestoneClick: a,
|
|
2277
|
-
onContextMenu: (e, t, n) =>
|
|
2277
|
+
onContextMenu: (e, t, n) => re({
|
|
2278
2278
|
task: e,
|
|
2279
2279
|
mouseX: t,
|
|
2280
2280
|
mouseY: n
|
|
@@ -2282,7 +2282,7 @@ function An({ scrollRef: e, onScroll: t, onTaskClick: n, onMilestoneClick: a, dr
|
|
|
2282
2282
|
suppressClickRef: te,
|
|
2283
2283
|
handleBarMouseDown: G,
|
|
2284
2284
|
handleProgressMouseDown: ne,
|
|
2285
|
-
formatDragDate:
|
|
2285
|
+
formatDragDate: K
|
|
2286
2286
|
}, e.key))
|
|
2287
2287
|
}) : /* @__PURE__ */ Y(he, { children: A.map((e) => /* @__PURE__ */ Y(Sn, {
|
|
2288
2288
|
task: e,
|
|
@@ -2296,7 +2296,7 @@ function An({ scrollRef: e, onScroll: t, onTaskClick: n, onMilestoneClick: a, dr
|
|
|
2296
2296
|
progressDraggable: f,
|
|
2297
2297
|
onTaskClick: n,
|
|
2298
2298
|
onMilestoneClick: a,
|
|
2299
|
-
onContextMenu: (e, t, n) =>
|
|
2299
|
+
onContextMenu: (e, t, n) => re({
|
|
2300
2300
|
task: e,
|
|
2301
2301
|
mouseX: t,
|
|
2302
2302
|
mouseY: n
|
|
@@ -2304,17 +2304,17 @@ function An({ scrollRef: e, onScroll: t, onTaskClick: n, onMilestoneClick: a, dr
|
|
|
2304
2304
|
suppressClickRef: te,
|
|
2305
2305
|
handleBarMouseDown: G,
|
|
2306
2306
|
handleProgressMouseDown: ne,
|
|
2307
|
-
formatDragDate:
|
|
2307
|
+
formatDragDate: K
|
|
2308
2308
|
}, e.id)) }),
|
|
2309
2309
|
/* @__PURE__ */ Y(Dn, {
|
|
2310
|
-
contextMenu:
|
|
2311
|
-
onClose: () =>
|
|
2310
|
+
contextMenu: q,
|
|
2311
|
+
onClose: () => re(null),
|
|
2312
2312
|
onSelect: (e, t) => {
|
|
2313
2313
|
let n = T.getState().tasks.find((t) => t.id === e.id) ?? e;
|
|
2314
2314
|
w({
|
|
2315
2315
|
...n,
|
|
2316
2316
|
status: t
|
|
2317
|
-
}),
|
|
2317
|
+
}), ie.current?.(n, t), ae.current?.(T.getState().tasks), re(null);
|
|
2318
2318
|
}
|
|
2319
2319
|
}),
|
|
2320
2320
|
/* @__PURE__ */ Y(On, {
|
|
@@ -2550,11 +2550,11 @@ function Un({ tasks: e, onTaskClick: n, onMilestoneClick: i, onAddTask: a, onEdi
|
|
|
2550
2550
|
r(() => {
|
|
2551
2551
|
R(e);
|
|
2552
2552
|
}, [e, R]);
|
|
2553
|
-
let
|
|
2553
|
+
let K = () => {
|
|
2554
2554
|
W.current ||= (W.current = !0, U.current && H.current && (U.current.scrollTop = H.current.scrollTop), !1);
|
|
2555
|
-
},
|
|
2555
|
+
}, q = () => {
|
|
2556
2556
|
W.current ||= (W.current = !0, H.current && U.current && (H.current.scrollTop = U.current.scrollTop), !1);
|
|
2557
|
-
},
|
|
2557
|
+
}, re = t(() => {
|
|
2558
2558
|
if (!U.current) return;
|
|
2559
2559
|
let e = Rt(V, z), t = Date.now(), n = e.start.getTime(), r = e.end.getTime(), i = (t - n) / (r - n) * U.current.scrollWidth;
|
|
2560
2560
|
U.current.scrollLeft = Math.max(0, i - U.current.clientWidth / 2);
|
|
@@ -2573,7 +2573,7 @@ function Un({ tasks: e, onTaskClick: n, onMilestoneClick: i, onAddTask: a, onEdi
|
|
|
2573
2573
|
z,
|
|
2574
2574
|
B
|
|
2575
2575
|
]);
|
|
2576
|
-
let
|
|
2576
|
+
let ie = t((e) => {
|
|
2577
2577
|
e.preventDefault();
|
|
2578
2578
|
let t = e.clientX, n = ee, r = (e) => {
|
|
2579
2579
|
let r = e.clientX - t;
|
|
@@ -2599,7 +2599,7 @@ function Un({ tasks: e, onTaskClick: n, onMilestoneClick: i, onAddTask: a, onEdi
|
|
|
2599
2599
|
overflow: "hidden"
|
|
2600
2600
|
},
|
|
2601
2601
|
children: [v && /* @__PURE__ */ Y(Nn, {
|
|
2602
|
-
onScrollToToday:
|
|
2602
|
+
onScrollToToday: re,
|
|
2603
2603
|
config: I,
|
|
2604
2604
|
onExportCSV: I.showExportCSV ? ne : void 0
|
|
2605
2605
|
}), /* @__PURE__ */ X(d, {
|
|
@@ -2611,7 +2611,7 @@ function Un({ tasks: e, onTaskClick: n, onMilestoneClick: i, onAddTask: a, onEdi
|
|
|
2611
2611
|
children: [
|
|
2612
2612
|
/* @__PURE__ */ Y(_n, {
|
|
2613
2613
|
scrollRef: H,
|
|
2614
|
-
onScroll:
|
|
2614
|
+
onScroll: K,
|
|
2615
2615
|
panelWidth: ee,
|
|
2616
2616
|
onTaskClick: n,
|
|
2617
2617
|
onAddTask: a,
|
|
@@ -2636,11 +2636,11 @@ function Un({ tasks: e, onTaskClick: n, onMilestoneClick: i, onAddTask: a, onEdi
|
|
|
2636
2636
|
cursor: "col-resize",
|
|
2637
2637
|
"&:hover": { bgcolor: "action.hover" }
|
|
2638
2638
|
},
|
|
2639
|
-
onMouseDown:
|
|
2639
|
+
onMouseDown: ie
|
|
2640
2640
|
}),
|
|
2641
2641
|
/* @__PURE__ */ Y(An, {
|
|
2642
2642
|
scrollRef: U,
|
|
2643
|
-
onScroll:
|
|
2643
|
+
onScroll: q,
|
|
2644
2644
|
onTaskClick: n,
|
|
2645
2645
|
onMilestoneClick: i,
|
|
2646
2646
|
draggable: T,
|
|
@@ -2890,7 +2890,7 @@ function $n({ value: e, confirmValue: t, name: n, inputRef: r, disabled: a = !1,
|
|
|
2890
2890
|
}, L = {
|
|
2891
2891
|
...Yn,
|
|
2892
2892
|
...O
|
|
2893
|
-
}, R = i(), z = `${R}-password`, [H, U] = c(!1), [W, ee] = c(!1), [te, G] = c(""), [ne,
|
|
2893
|
+
}, R = i(), z = `${R}-password`, [H, U] = c(!1), [W, ee] = c(!1), [te, G] = c(""), [ne, K] = c(""), q = e === void 0 ? te : e, re = t === void 0 ? ne : t, ie = h && re.length > 0, ae = ie && q === re, oe = o(() => Kn(q, k), [q, k]);
|
|
2894
2894
|
return /* @__PURE__ */ X(F, { children: [
|
|
2895
2895
|
/* @__PURE__ */ X(x, {
|
|
2896
2896
|
variant: "outlined",
|
|
@@ -2907,7 +2907,7 @@ function $n({ value: e, confirmValue: t, name: n, inputRef: r, disabled: a = !1,
|
|
|
2907
2907
|
type: H ? "text" : "password",
|
|
2908
2908
|
fullWidth: !0,
|
|
2909
2909
|
size: S,
|
|
2910
|
-
value:
|
|
2910
|
+
value: q,
|
|
2911
2911
|
onChange: (t) => {
|
|
2912
2912
|
let n = t.target.value;
|
|
2913
2913
|
e === void 0 && G(n), M && M(n, Kn(n, k));
|
|
@@ -2960,7 +2960,7 @@ function $n({ value: e, confirmValue: t, name: n, inputRef: r, disabled: a = !1,
|
|
|
2960
2960
|
numbers: m?.numbers ?? !0,
|
|
2961
2961
|
symbols: m?.symbols ?? !0
|
|
2962
2962
|
});
|
|
2963
|
-
e === void 0 && G(n), t === void 0 &&
|
|
2963
|
+
e === void 0 && G(n), t === void 0 && K(""), M?.(n, Kn(n, k)), P?.(n), U(!0);
|
|
2964
2964
|
},
|
|
2965
2965
|
sx: {
|
|
2966
2966
|
mt: .5,
|
|
@@ -2973,7 +2973,7 @@ function $n({ value: e, confirmValue: t, name: n, inputRef: r, disabled: a = !1,
|
|
|
2973
2973
|
h && /* @__PURE__ */ X(x, {
|
|
2974
2974
|
variant: "outlined",
|
|
2975
2975
|
fullWidth: !0,
|
|
2976
|
-
error:
|
|
2976
|
+
error: ie && !ae,
|
|
2977
2977
|
sx: { mt: 1 },
|
|
2978
2978
|
children: [
|
|
2979
2979
|
/* @__PURE__ */ Y(E, {
|
|
@@ -2986,16 +2986,16 @@ function $n({ value: e, confirmValue: t, name: n, inputRef: r, disabled: a = !1,
|
|
|
2986
2986
|
type: W ? "text" : "password",
|
|
2987
2987
|
fullWidth: !0,
|
|
2988
2988
|
size: S,
|
|
2989
|
-
value:
|
|
2989
|
+
value: re,
|
|
2990
2990
|
onChange: (e) => {
|
|
2991
2991
|
let n = e.target.value;
|
|
2992
|
-
t === void 0 &&
|
|
2992
|
+
t === void 0 && K(n), N?.(n, n === q);
|
|
2993
2993
|
},
|
|
2994
2994
|
disabled: a,
|
|
2995
2995
|
inputProps: { "data-testid": "psm-confirm-input" },
|
|
2996
2996
|
endAdornment: /* @__PURE__ */ X(T, {
|
|
2997
2997
|
position: "end",
|
|
2998
|
-
children: [
|
|
2998
|
+
children: [ie && (ae ? /* @__PURE__ */ Y(Ie, {
|
|
2999
2999
|
"data-testid": "psm-confirm-match",
|
|
3000
3000
|
sx: {
|
|
3001
3001
|
color: A.success,
|
|
@@ -3021,9 +3021,9 @@ function $n({ value: e, confirmValue: t, name: n, inputRef: r, disabled: a = !1,
|
|
|
3021
3021
|
}),
|
|
3022
3022
|
label: I.confirmLabel
|
|
3023
3023
|
}),
|
|
3024
|
-
|
|
3025
|
-
sx: { color:
|
|
3026
|
-
children:
|
|
3024
|
+
ie && /* @__PURE__ */ Y(C, {
|
|
3025
|
+
sx: { color: ae ? A.success : A.failure },
|
|
3026
|
+
children: ae ? I.confirmMatchLabel : I.confirmMismatchLabel
|
|
3027
3027
|
})
|
|
3028
3028
|
]
|
|
3029
3029
|
}),
|
|
@@ -3092,7 +3092,7 @@ function $n({ value: e, confirmValue: t, name: n, inputRef: r, disabled: a = !1,
|
|
|
3092
3092
|
}),
|
|
3093
3093
|
p?.map((e, t) => /* @__PURE__ */ Y(Qn, {
|
|
3094
3094
|
label: e.label,
|
|
3095
|
-
fulfilled: typeof e.fulfilled == "function" ? e.fulfilled(
|
|
3095
|
+
fulfilled: typeof e.fulfilled == "function" ? e.fulfilled(q) : e.fulfilled,
|
|
3096
3096
|
checkColors: A
|
|
3097
3097
|
}, t))
|
|
3098
3098
|
]
|
|
@@ -3263,17 +3263,17 @@ function cr({ availableTags: e, searchValue: t, translation: n, onSearchChange:
|
|
|
3263
3263
|
b(e), j(e), v("default");
|
|
3264
3264
|
}, ne = (e) => {
|
|
3265
3265
|
j(e), rr(e) && (b(e), v("default"));
|
|
3266
|
-
}, re = (e) => {
|
|
3267
|
-
S(e), N(e);
|
|
3268
3266
|
}, K = (e) => {
|
|
3267
|
+
S(e), N(e);
|
|
3268
|
+
}, q = (e) => {
|
|
3269
3269
|
N(e), rr(e) && S(e);
|
|
3270
|
-
},
|
|
3270
|
+
}, re = (e) => {
|
|
3271
3271
|
if (T(e), e) S(null);
|
|
3272
3272
|
else if (y) {
|
|
3273
3273
|
let e = ir(y);
|
|
3274
3274
|
S(e), N(e);
|
|
3275
3275
|
}
|
|
3276
|
-
},
|
|
3276
|
+
}, ie = (e) => e.preventDefault();
|
|
3277
3277
|
return /* @__PURE__ */ X(d, {
|
|
3278
3278
|
sx: { mb: 2 },
|
|
3279
3279
|
children: [/* @__PURE__ */ Y(l, {
|
|
@@ -3318,12 +3318,12 @@ function cr({ availableTags: e, searchValue: t, translation: n, onSearchChange:
|
|
|
3318
3318
|
endAdornment: /* @__PURE__ */ X(he, { children: [H && /* @__PURE__ */ X(he, { children: [/* @__PURE__ */ Y(w, {
|
|
3319
3319
|
size: "small",
|
|
3320
3320
|
sx: { color: "success.main" },
|
|
3321
|
-
onMouseDown:
|
|
3321
|
+
onMouseDown: ie,
|
|
3322
3322
|
onClick: ee,
|
|
3323
3323
|
children: /* @__PURE__ */ Y(_e, { fontSize: "small" })
|
|
3324
3324
|
}), /* @__PURE__ */ Y(w, {
|
|
3325
3325
|
size: "small",
|
|
3326
|
-
onMouseDown:
|
|
3326
|
+
onMouseDown: ie,
|
|
3327
3327
|
onClick: te,
|
|
3328
3328
|
children: /* @__PURE__ */ Y(Be, { fontSize: "small" })
|
|
3329
3329
|
})] }), e.slotProps?.input?.endAdornment] })
|
|
@@ -3355,7 +3355,7 @@ function cr({ availableTags: e, searchValue: t, translation: n, onSearchChange:
|
|
|
3355
3355
|
loadingText: n.loadingText
|
|
3356
3356
|
}), H && /* @__PURE__ */ X(d, {
|
|
3357
3357
|
sx: { position: "relative" },
|
|
3358
|
-
onMouseDown:
|
|
3358
|
+
onMouseDown: ie,
|
|
3359
3359
|
children: [/* @__PURE__ */ X(F, {
|
|
3360
3360
|
direction: "row",
|
|
3361
3361
|
sx: {
|
|
@@ -3475,7 +3475,7 @@ function cr({ availableTags: e, searchValue: t, translation: n, onSearchChange:
|
|
|
3475
3475
|
children: [nr.map((e) => /* @__PURE__ */ Y(or, {
|
|
3476
3476
|
color: e,
|
|
3477
3477
|
selected: x === e,
|
|
3478
|
-
onClick: () =>
|
|
3478
|
+
onClick: () => K(e)
|
|
3479
3479
|
}, e)), /* @__PURE__ */ Y(d, {
|
|
3480
3480
|
sx: {
|
|
3481
3481
|
gridColumn: "span 5",
|
|
@@ -3483,7 +3483,7 @@ function cr({ availableTags: e, searchValue: t, translation: n, onSearchChange:
|
|
|
3483
3483
|
},
|
|
3484
3484
|
children: /* @__PURE__ */ Y(sr, {
|
|
3485
3485
|
value: C ? W ?? "#000000" : M,
|
|
3486
|
-
onChange:
|
|
3486
|
+
onChange: q,
|
|
3487
3487
|
disabled: C
|
|
3488
3488
|
})
|
|
3489
3489
|
})]
|
|
@@ -3504,7 +3504,7 @@ function cr({ availableTags: e, searchValue: t, translation: n, onSearchChange:
|
|
|
3504
3504
|
}), /* @__PURE__ */ Y(I, {
|
|
3505
3505
|
size: "small",
|
|
3506
3506
|
checked: C,
|
|
3507
|
-
onChange: (e) =>
|
|
3507
|
+
onChange: (e) => re(e.target.checked)
|
|
3508
3508
|
})]
|
|
3509
3509
|
})
|
|
3510
3510
|
] })]
|
|
@@ -5659,7 +5659,7 @@ var Nr = {
|
|
|
5659
5659
|
mssql: vt
|
|
5660
5660
|
};
|
|
5661
5661
|
function Ir({ value: e, onChange: t, placeholder: n, disabled: i = !1, readonly: a = !1, showLineNumbers: o = !0, dialect: c = "standard", keywordColor: l, stringColor: u, identifierColor: f, schema: p, onExecute: m, onLint: h, onDiagnosticsChange: g, onViewReady: _, onCursorChange: v, onBlur: y, onFocus: b }) {
|
|
5662
|
-
let x = s(null), S = s(null), C = s(t), w = s(v), T = s(y), E = s(b), D = s(_), O = s(m), k = s(h), A = s(g), j = s(new
|
|
5662
|
+
let x = s(null), S = s(null), C = s(t), w = s(v), T = s(y), E = s(b), D = s(_), O = s(m), k = s(h), A = s(g), j = s(new K()), M = s(new K()), N = H(), P = N.palette.mode === "dark", F = !!h, I = JSON.stringify(p);
|
|
5663
5663
|
return r(() => {
|
|
5664
5664
|
C.current = t;
|
|
5665
5665
|
}, [t]), r(() => {
|
|
@@ -5816,12 +5816,12 @@ function Ir({ value: e, onChange: t, placeholder: n, disabled: i = !1, readonly:
|
|
|
5816
5816
|
wt(),
|
|
5817
5817
|
v,
|
|
5818
5818
|
te.of([
|
|
5819
|
-
...
|
|
5819
|
+
...ae,
|
|
5820
5820
|
...se,
|
|
5821
5821
|
...Tt
|
|
5822
5822
|
]),
|
|
5823
5823
|
j.current.of(U.editable.of(!i && !a)),
|
|
5824
|
-
M.current.of(
|
|
5824
|
+
M.current.of(q.readOnly.of(a)),
|
|
5825
5825
|
W(),
|
|
5826
5826
|
...o ? [G(), ee()] : [],
|
|
5827
5827
|
...n ? [ne(n)] : [],
|
|
@@ -5840,7 +5840,7 @@ function Ir({ value: e, onChange: t, placeholder: n, disabled: i = !1, readonly:
|
|
|
5840
5840
|
}
|
|
5841
5841
|
})
|
|
5842
5842
|
], b = new U({
|
|
5843
|
-
state:
|
|
5843
|
+
state: q.create({
|
|
5844
5844
|
doc: t,
|
|
5845
5845
|
extensions: y
|
|
5846
5846
|
}),
|
|
@@ -5867,7 +5867,7 @@ function Ir({ value: e, onChange: t, placeholder: n, disabled: i = !1, readonly:
|
|
|
5867
5867
|
insert: e ?? ""
|
|
5868
5868
|
} });
|
|
5869
5869
|
}, [e]), r(() => {
|
|
5870
|
-
S.current?.dispatch({ effects: [j.current.reconfigure(U.editable.of(!i && !a)), M.current.reconfigure(
|
|
5870
|
+
S.current?.dispatch({ effects: [j.current.reconfigure(U.editable.of(!i && !a)), M.current.reconfigure(q.readOnly.of(a))] });
|
|
5871
5871
|
}, [i, a]), /* @__PURE__ */ Y(d, {
|
|
5872
5872
|
ref: x,
|
|
5873
5873
|
sx: {
|
|
@@ -6246,7 +6246,7 @@ function Jr({ data: e, size: n = 500, showSegmentLabels: r = !0, innerRadius: i
|
|
|
6246
6246
|
}, [P, N]), ee = (e) => e.x1 > e.x0 && e.y1 > e.y0, te = (e) => (O + (e.y0 + e.y1) / 2) * (e.x1 - e.x0) > 12, G = (e) => {
|
|
6247
6247
|
let t = (e.x0 + e.x1) / 2 * 180 / Math.PI, n = O + (e.y0 + e.y1) / 2, r = t < 180 ? 0 : 180;
|
|
6248
6248
|
return `rotate(${t - 90}) translate(${n},0) rotate(${r})`;
|
|
6249
|
-
}, ne = t((e) => e.ancestors().includes(P), [P]),
|
|
6249
|
+
}, ne = t((e) => e.ancestors().includes(P), [P]), K = t((e) => {
|
|
6250
6250
|
let t = e.ancestors().reverse(), n = e.value ?? 0, r = M.value ?? 0;
|
|
6251
6251
|
return {
|
|
6252
6252
|
id: e.data.id,
|
|
@@ -6259,14 +6259,14 @@ function Jr({ data: e, size: n = 500, showSegmentLabels: r = !0, innerRadius: i
|
|
|
6259
6259
|
childrenCount: e.children?.length ?? 0,
|
|
6260
6260
|
data: e.data
|
|
6261
6261
|
};
|
|
6262
|
-
}, [M]),
|
|
6262
|
+
}, [M]), q = t((e) => {
|
|
6263
6263
|
F(e), m && m({
|
|
6264
|
-
focusNode:
|
|
6264
|
+
focusNode: K(e),
|
|
6265
6265
|
isRoot: e === M
|
|
6266
6266
|
});
|
|
6267
6267
|
}, [
|
|
6268
6268
|
M,
|
|
6269
|
-
|
|
6269
|
+
K,
|
|
6270
6270
|
m
|
|
6271
6271
|
]);
|
|
6272
6272
|
a(() => {
|
|
@@ -6289,23 +6289,23 @@ function Jr({ data: e, size: n = 500, showSegmentLabels: r = !0, innerRadius: i
|
|
|
6289
6289
|
N,
|
|
6290
6290
|
f
|
|
6291
6291
|
]);
|
|
6292
|
-
let
|
|
6293
|
-
|
|
6294
|
-
e(),
|
|
6292
|
+
let re = s(null), ie = (e) => {
|
|
6293
|
+
re.current &&= (clearTimeout(re.current), null), re.current = setTimeout(() => {
|
|
6294
|
+
e(), re.current = null;
|
|
6295
6295
|
}, 250);
|
|
6296
|
-
},
|
|
6297
|
-
|
|
6296
|
+
}, ae = () => {
|
|
6297
|
+
re.current &&= (clearTimeout(re.current), null);
|
|
6298
6298
|
};
|
|
6299
6299
|
a(() => {
|
|
6300
6300
|
if (y) return;
|
|
6301
6301
|
let e = (e) => {
|
|
6302
|
-
e.key === "Escape" && (
|
|
6302
|
+
e.key === "Escape" && (ae(), q(M), T(1));
|
|
6303
6303
|
};
|
|
6304
6304
|
return window.addEventListener("keydown", e), () => window.removeEventListener("keydown", e);
|
|
6305
6305
|
}, [
|
|
6306
6306
|
y,
|
|
6307
6307
|
M,
|
|
6308
|
-
|
|
6308
|
+
q
|
|
6309
6309
|
]);
|
|
6310
6310
|
let oe = t((e) => {
|
|
6311
6311
|
if (!v || y || !e.ctrlKey) return;
|
|
@@ -6317,20 +6317,20 @@ function Jr({ data: e, size: n = 500, showSegmentLabels: r = !0, innerRadius: i
|
|
|
6317
6317
|
let t = se[Number(e.currentTarget.getAttribute("data-idx"))];
|
|
6318
6318
|
if (t) {
|
|
6319
6319
|
if (e.ctrlKey || e.metaKey) {
|
|
6320
|
-
t.children &&
|
|
6320
|
+
t.children && ie(() => q(t));
|
|
6321
6321
|
return;
|
|
6322
6322
|
}
|
|
6323
|
-
p?.(
|
|
6323
|
+
p?.(K(t), e);
|
|
6324
6324
|
}
|
|
6325
6325
|
}, le = (e) => {
|
|
6326
|
-
y || (e.ctrlKey || e.metaKey) && (
|
|
6326
|
+
y || (e.ctrlKey || e.metaKey) && (ae(), q(P.parent ?? M));
|
|
6327
6327
|
}, ue = (e) => {
|
|
6328
6328
|
if (!y) {
|
|
6329
6329
|
if (e.ctrlKey || e.metaKey) {
|
|
6330
|
-
|
|
6330
|
+
ae(), q(P.parent ?? M);
|
|
6331
6331
|
return;
|
|
6332
6332
|
}
|
|
6333
|
-
p?.(
|
|
6333
|
+
p?.(K(P.parent ?? M), e);
|
|
6334
6334
|
}
|
|
6335
6335
|
}, de = {
|
|
6336
6336
|
followCursor: !0,
|
|
@@ -6524,19 +6524,19 @@ function Qr({ sourceName: e, targetName: t, sourceValue: n, targetValue: r, dire
|
|
|
6524
6524
|
]
|
|
6525
6525
|
});
|
|
6526
6526
|
}
|
|
6527
|
-
function $r({ data: e, size: n = 500, innerRadius: r, ringThickness: i = 20, padAngle: l, ribbonPadAngle: u, sortSubgroups: f = "descending", sortChords: p = "descending", chartColors: m, groupColorConfigs: h, showGroupLabels: g = !0, labelOffset: _ = 8, ribbonOpacity: v = .75, ribbonBlendMode: y
|
|
6528
|
-
let O = H(), k = [
|
|
6527
|
+
function $r({ data: e, size: n = 500, innerRadius: r, ringThickness: i = 20, padAngle: l, ribbonPadAngle: u, sortSubgroups: f = "descending", sortChords: p = "descending", chartColors: m, groupColorConfigs: h, showGroupLabels: g = !0, labelOffset: _ = 8, ribbonOpacity: v = .75, ribbonBlendMode: y, directed: b = !0, valueDecimalCount: x = 0, valueDecimalSeparator: S = ".", valueThousandsSeparator: C = ",", onGroupClick: w, onChordClick: T, zoomable: E = !1, disabled: D = !1 }) {
|
|
6528
|
+
let O = H(), k = y ?? (O.palette.mode === "dark" ? "normal" : "multiply"), A = [
|
|
6529
6529
|
O.palette.primary.main,
|
|
6530
6530
|
O.palette.secondary.main,
|
|
6531
6531
|
O.palette.error.main,
|
|
6532
6532
|
O.palette.warning.main,
|
|
6533
6533
|
O.palette.success.main,
|
|
6534
6534
|
O.palette.info.main
|
|
6535
|
-
],
|
|
6535
|
+
], j = m && m.length > 0 ? m : A, M = r ?? Math.min(n, n) * .5 - 90, N = Math.max(10, M), P = N + Math.max(1, i), F = l ?? 10 / N, I = u ?? 1 / N, L = t((e) => Xr(e, x, S, C), [
|
|
6536
6536
|
x,
|
|
6537
6537
|
S,
|
|
6538
6538
|
C
|
|
6539
|
-
]), { names:
|
|
6539
|
+
]), { names: R, matrix: z } = o(() => {
|
|
6540
6540
|
let t = Z.sort(Z.union(e.map((e) => e.source), e.map((e) => e.target))), n = new Map(t.map((e, t) => [e, t])), r = Array.from({ length: t.length }, () => Array(t.length).fill(0));
|
|
6541
6541
|
for (let { source: t, target: i, value: a } of e) {
|
|
6542
6542
|
let e = n.get(t), o = n.get(i);
|
|
@@ -6546,78 +6546,78 @@ function $r({ data: e, size: n = 500, innerRadius: r, ringThickness: i = 20, pad
|
|
|
6546
6546
|
names: t,
|
|
6547
6547
|
matrix: r
|
|
6548
6548
|
};
|
|
6549
|
-
}, [e]),
|
|
6550
|
-
let e = (b ? Z.chordDirected() : Z.chord()).padAngle(
|
|
6551
|
-
return f === "ascending" && (e = e.sortSubgroups(Z.ascending)), f === "descending" && (e = e.sortSubgroups(Z.descending)), p === "ascending" && (e = e.sortChords(Z.ascending)), p === "descending" && (e = e.sortChords(Z.descending)), e(
|
|
6549
|
+
}, [e]), V = o(() => {
|
|
6550
|
+
let e = (b ? Z.chordDirected() : Z.chord()).padAngle(F);
|
|
6551
|
+
return f === "ascending" && (e = e.sortSubgroups(Z.ascending)), f === "descending" && (e = e.sortSubgroups(Z.descending)), p === "ascending" && (e = e.sortChords(Z.ascending)), p === "descending" && (e = e.sortChords(Z.descending)), e(z);
|
|
6552
6552
|
}, [
|
|
6553
|
-
|
|
6554
|
-
|
|
6553
|
+
z,
|
|
6554
|
+
F,
|
|
6555
6555
|
b,
|
|
6556
6556
|
f,
|
|
6557
6557
|
p
|
|
6558
|
-
]),
|
|
6559
|
-
|
|
6560
|
-
|
|
6558
|
+
]), U = o(() => Z.arc().innerRadius(N).outerRadius(P), [N, P]), W = o(() => (b ? Z.ribbonArrow() : Z.ribbon()).radius(N - 1).padAngle(I), [
|
|
6559
|
+
N,
|
|
6560
|
+
I,
|
|
6561
6561
|
b
|
|
6562
|
-
]),
|
|
6562
|
+
]), ee = t((e) => W({
|
|
6563
6563
|
source: {
|
|
6564
6564
|
startAngle: e.source.startAngle,
|
|
6565
6565
|
endAngle: e.source.endAngle,
|
|
6566
|
-
radius:
|
|
6566
|
+
radius: N - 1
|
|
6567
6567
|
},
|
|
6568
6568
|
target: {
|
|
6569
6569
|
startAngle: e.target.startAngle,
|
|
6570
6570
|
endAngle: e.target.endAngle,
|
|
6571
|
-
radius:
|
|
6571
|
+
radius: N - 1
|
|
6572
6572
|
}
|
|
6573
|
-
}) ?? "", [
|
|
6573
|
+
}) ?? "", [W, N]), te = o(() => Z.scaleOrdinal().domain(Z.range(R.length)).range(j.length >= R.length ? j : [...Array(Math.ceil(R.length / j.length))].flatMap(() => j).slice(0, R.length)), [j, R.length]), G = t((e) => h?.[R[e]]?.fill ?? te(e), [
|
|
6574
6574
|
h,
|
|
6575
|
-
|
|
6576
|
-
|
|
6577
|
-
]),
|
|
6578
|
-
if (
|
|
6579
|
-
let [e, t, n, r] =
|
|
6575
|
+
R,
|
|
6576
|
+
te
|
|
6577
|
+
]), ne = s(null), [K, q] = c(`-${n / 2} -${n / 2} ${n} ${n}`), [re, ie] = c(1), ae = o(() => {
|
|
6578
|
+
if (re === 1) return K;
|
|
6579
|
+
let [e, t, n, r] = K.split(" ").map(Number), i = n / re, a = r / re;
|
|
6580
6580
|
return `${e + (n - i) / 2} ${t + (r - a) / 2} ${i} ${a}`;
|
|
6581
|
-
}, [
|
|
6581
|
+
}, [K, re]);
|
|
6582
6582
|
a(() => {
|
|
6583
|
-
let e =
|
|
6583
|
+
let e = ne.current;
|
|
6584
6584
|
if (!e) return;
|
|
6585
6585
|
let t = requestAnimationFrame(() => {
|
|
6586
6586
|
try {
|
|
6587
6587
|
let t = e.getBBox();
|
|
6588
|
-
|
|
6588
|
+
q(`${t.x - 8} ${t.y - 8} ${t.width + 16} ${t.height + 16}`);
|
|
6589
6589
|
} catch {
|
|
6590
|
-
|
|
6590
|
+
q(`-${n / 2} -${n / 2} ${n} ${n}`);
|
|
6591
6591
|
}
|
|
6592
6592
|
});
|
|
6593
6593
|
return () => cancelAnimationFrame(t);
|
|
6594
6594
|
}, [
|
|
6595
6595
|
n,
|
|
6596
|
-
M,
|
|
6597
6596
|
N,
|
|
6598
|
-
|
|
6599
|
-
|
|
6597
|
+
P,
|
|
6598
|
+
R.length,
|
|
6599
|
+
V
|
|
6600
6600
|
]);
|
|
6601
|
-
let [
|
|
6602
|
-
name:
|
|
6601
|
+
let [oe, se] = c(null), ce = t((e) => ({
|
|
6602
|
+
name: R[e.index],
|
|
6603
6603
|
index: e.index,
|
|
6604
|
-
valueOut: Z.sum(
|
|
6605
|
-
valueIn: Z.sum(
|
|
6606
|
-
}), [
|
|
6604
|
+
valueOut: Z.sum(V, (t) => t.source.index === e.index ? t.source.value : 0),
|
|
6605
|
+
valueIn: Z.sum(V, (t) => t.target.index === e.index ? t.source.value : 0)
|
|
6606
|
+
}), [R, V]), le = t((e) => ({
|
|
6607
6607
|
source: {
|
|
6608
|
-
name:
|
|
6608
|
+
name: R[e.source.index],
|
|
6609
6609
|
index: e.source.index,
|
|
6610
6610
|
value: e.source.value
|
|
6611
6611
|
},
|
|
6612
6612
|
target: {
|
|
6613
|
-
name:
|
|
6613
|
+
name: R[e.target.index],
|
|
6614
6614
|
index: e.target.index,
|
|
6615
6615
|
value: e.target.value
|
|
6616
6616
|
}
|
|
6617
|
-
}), [
|
|
6617
|
+
}), [R]), ue = (e) => {
|
|
6618
6618
|
let t = (e.startAngle + e.endAngle) / 2, n = t * 180 / Math.PI - 90, r = t > Math.PI ? " rotate(180)" : "";
|
|
6619
|
-
return `rotate(${n}) translate(${
|
|
6620
|
-
},
|
|
6619
|
+
return `rotate(${n}) translate(${P + _})${r}`;
|
|
6620
|
+
}, de = (e) => (e.startAngle + e.endAngle) / 2 > Math.PI ? "end" : "start", fe = t((e) => {
|
|
6621
6621
|
if (!E || D || !e.ctrlKey) return;
|
|
6622
6622
|
e.preventDefault();
|
|
6623
6623
|
let t = e.deltaY < 0 ? 1.15 : 1 / 1.15;
|
|
@@ -6630,13 +6630,13 @@ function $r({ data: e, size: n = 500, innerRadius: r, ringThickness: i = 20, pad
|
|
|
6630
6630
|
};
|
|
6631
6631
|
return window.addEventListener("keydown", e), () => window.removeEventListener("keydown", e);
|
|
6632
6632
|
}, [E]);
|
|
6633
|
-
let
|
|
6633
|
+
let pe = {
|
|
6634
6634
|
followCursor: !0,
|
|
6635
6635
|
enterDelay: 50,
|
|
6636
6636
|
enterNextDelay: 0,
|
|
6637
6637
|
disableHoverListener: D,
|
|
6638
6638
|
slotProps: { tooltip: { sx: { maxWidth: 240 } } }
|
|
6639
|
-
},
|
|
6639
|
+
}, J = O.palette.text.primary, me = O.typography.fontFamily;
|
|
6640
6640
|
return /* @__PURE__ */ Y(d, {
|
|
6641
6641
|
sx: {
|
|
6642
6642
|
display: "inline-flex",
|
|
@@ -6648,65 +6648,65 @@ function $r({ data: e, size: n = 500, innerRadius: r, ringThickness: i = 20, pad
|
|
|
6648
6648
|
width: n,
|
|
6649
6649
|
height: n,
|
|
6650
6650
|
viewBox: ae,
|
|
6651
|
-
onWheel:
|
|
6651
|
+
onWheel: fe,
|
|
6652
6652
|
style: {
|
|
6653
|
-
fontFamily:
|
|
6654
|
-
overflow: E &&
|
|
6653
|
+
fontFamily: me ?? "sans-serif",
|
|
6654
|
+
overflow: E && re > 1 ? "hidden" : "visible"
|
|
6655
6655
|
},
|
|
6656
6656
|
role: "img",
|
|
6657
6657
|
"aria-label": "Chord chart",
|
|
6658
6658
|
children: /* @__PURE__ */ X("g", {
|
|
6659
|
-
ref:
|
|
6660
|
-
children: [/* @__PURE__ */ Y("g", { children:
|
|
6661
|
-
let t =
|
|
6659
|
+
ref: ne,
|
|
6660
|
+
children: [/* @__PURE__ */ Y("g", { children: V.groups.map((e) => {
|
|
6661
|
+
let t = ce(e), n = oe === e.index, r = oe !== null && !n;
|
|
6662
6662
|
return /* @__PURE__ */ Y(B, {
|
|
6663
|
-
...
|
|
6663
|
+
...pe,
|
|
6664
6664
|
title: /* @__PURE__ */ Y(Zr, {
|
|
6665
6665
|
name: t.name,
|
|
6666
6666
|
valueOut: t.valueOut,
|
|
6667
6667
|
valueIn: t.valueIn,
|
|
6668
|
-
fmt:
|
|
6668
|
+
fmt: L
|
|
6669
6669
|
}),
|
|
6670
6670
|
children: /* @__PURE__ */ X("g", {
|
|
6671
6671
|
style: { cursor: D ? "not-allowed" : "pointer" },
|
|
6672
|
-
onMouseEnter: () => !D &&
|
|
6673
|
-
onMouseLeave: () =>
|
|
6672
|
+
onMouseEnter: () => !D && se(e.index),
|
|
6673
|
+
onMouseLeave: () => se(null),
|
|
6674
6674
|
onClick: (e) => !D && w?.(t, e),
|
|
6675
6675
|
children: [/* @__PURE__ */ Y("path", {
|
|
6676
|
-
d:
|
|
6677
|
-
fill:
|
|
6676
|
+
d: U(e) || "",
|
|
6677
|
+
fill: G(e.index),
|
|
6678
6678
|
stroke: O.palette.divider,
|
|
6679
6679
|
opacity: r ? .35 : 1,
|
|
6680
6680
|
style: { transition: "opacity 0.15s" }
|
|
6681
6681
|
}), g && /* @__PURE__ */ Y("text", {
|
|
6682
6682
|
dy: "0.35em",
|
|
6683
6683
|
fontSize: 11,
|
|
6684
|
-
fill:
|
|
6685
|
-
transform:
|
|
6686
|
-
textAnchor:
|
|
6684
|
+
fill: J,
|
|
6685
|
+
transform: ue(e),
|
|
6686
|
+
textAnchor: de(e),
|
|
6687
6687
|
pointerEvents: "none",
|
|
6688
|
-
children:
|
|
6688
|
+
children: R[e.index]
|
|
6689
6689
|
})]
|
|
6690
6690
|
})
|
|
6691
6691
|
}, `grp-tt-${e.index}`);
|
|
6692
6692
|
}) }), /* @__PURE__ */ Y("g", {
|
|
6693
6693
|
fillOpacity: v,
|
|
6694
|
-
style: { mixBlendMode:
|
|
6695
|
-
children:
|
|
6696
|
-
let n =
|
|
6694
|
+
style: { mixBlendMode: k },
|
|
6695
|
+
children: V.map((e, t) => {
|
|
6696
|
+
let n = le(e), r = oe === null || e.source.index === oe || e.target.index === oe;
|
|
6697
6697
|
return /* @__PURE__ */ Y(B, {
|
|
6698
|
-
...
|
|
6698
|
+
...pe,
|
|
6699
6699
|
title: /* @__PURE__ */ Y(Qr, {
|
|
6700
6700
|
sourceName: n.source.name,
|
|
6701
6701
|
targetName: n.target.name,
|
|
6702
6702
|
sourceValue: n.source.value,
|
|
6703
6703
|
targetValue: n.target.value,
|
|
6704
6704
|
directed: b,
|
|
6705
|
-
fmt:
|
|
6705
|
+
fmt: L
|
|
6706
6706
|
}),
|
|
6707
6707
|
children: /* @__PURE__ */ Y("path", {
|
|
6708
|
-
d:
|
|
6709
|
-
fill:
|
|
6708
|
+
d: ee(e),
|
|
6709
|
+
fill: G(e.target.index),
|
|
6710
6710
|
stroke: "none",
|
|
6711
6711
|
opacity: r ? 1 : .12,
|
|
6712
6712
|
style: {
|
|
@@ -6840,7 +6840,7 @@ function ai({ data: e, size: n = 600, autoFit: r = !0, sortBy: i = "name", showL
|
|
|
6840
6840
|
te,
|
|
6841
6841
|
x,
|
|
6842
6842
|
S
|
|
6843
|
-
]), ne = G.links(),
|
|
6843
|
+
]), ne = G.links(), K = G.descendants(), q = o(() => Z.linkRadial().angle((e) => e.x).radius((e) => e.y), []), re = t((e) => ({
|
|
6844
6844
|
id: e.data.id,
|
|
6845
6845
|
name: e.data.name,
|
|
6846
6846
|
subname: e.data.subname ?? null,
|
|
@@ -6851,9 +6851,9 @@ function ai({ data: e, size: n = 600, autoFit: r = !0, sortBy: i = "name", showL
|
|
|
6851
6851
|
path: e.ancestors().map((e) => e.data.name).reverse(),
|
|
6852
6852
|
childrenCount: e.children?.length ?? 0,
|
|
6853
6853
|
data: e.data
|
|
6854
|
-
}), []),
|
|
6854
|
+
}), []), ie = s(null), [ae, oe] = c(`-${n / 2} -${n / 2} ${n} ${n}`), [se, ce] = c(1);
|
|
6855
6855
|
a(() => {
|
|
6856
|
-
let e =
|
|
6856
|
+
let e = ie.current;
|
|
6857
6857
|
if (!e) return;
|
|
6858
6858
|
let t = requestAnimationFrame(() => {
|
|
6859
6859
|
try {
|
|
@@ -6871,10 +6871,10 @@ function ai({ data: e, size: n = 600, autoFit: r = !0, sortBy: i = "name", showL
|
|
|
6871
6871
|
r
|
|
6872
6872
|
]);
|
|
6873
6873
|
let le = o(() => {
|
|
6874
|
-
if (se === 1) return
|
|
6875
|
-
let [e, t, n, r] =
|
|
6874
|
+
if (se === 1) return ae;
|
|
6875
|
+
let [e, t, n, r] = ae.split(" ").map(Number), i = n / se, a = r / se;
|
|
6876
6876
|
return `${e + (n - i) / 2} ${t + (r - a) / 2} ${i} ${a}`;
|
|
6877
|
-
}, [
|
|
6877
|
+
}, [ae, se]), ue = t((e) => {
|
|
6878
6878
|
if (!C || k || !e.ctrlKey) return;
|
|
6879
6879
|
e.preventDefault();
|
|
6880
6880
|
let t = e.deltaY < 0 ? 1.15 : 1 / 1.15;
|
|
@@ -6922,9 +6922,9 @@ function ai({ data: e, size: n = 600, autoFit: r = !0, sortBy: i = "name", showL
|
|
|
6922
6922
|
k || !w || (e.ctrlKey || e.metaKey) && (pe(), Te());
|
|
6923
6923
|
}, De = (e) => {
|
|
6924
6924
|
if (k) return;
|
|
6925
|
-
let t =
|
|
6925
|
+
let t = K[Number(e.currentTarget.getAttribute("data-idx"))];
|
|
6926
6926
|
if (!t) return;
|
|
6927
|
-
let n =
|
|
6927
|
+
let n = re(t);
|
|
6928
6928
|
if ((e.ctrlKey || e.metaKey) && w && t.children) {
|
|
6929
6929
|
fe(() => {
|
|
6930
6930
|
z((e) => [...e, t.data]), T?.(n);
|
|
@@ -6997,17 +6997,17 @@ function ai({ data: e, size: n = 600, autoFit: r = !0, sortBy: i = "name", showL
|
|
|
6997
6997
|
role: "img",
|
|
6998
6998
|
"aria-label": e.name,
|
|
6999
6999
|
children: /* @__PURE__ */ X("g", {
|
|
7000
|
-
ref:
|
|
7000
|
+
ref: ie,
|
|
7001
7001
|
children: [
|
|
7002
7002
|
/* @__PURE__ */ Y("g", {
|
|
7003
7003
|
fill: "none",
|
|
7004
7004
|
stroke: ke,
|
|
7005
7005
|
strokeOpacity: _,
|
|
7006
7006
|
strokeWidth: v,
|
|
7007
|
-
children: ne.map((e, t) => /* @__PURE__ */ Y("path", { d:
|
|
7007
|
+
children: ne.map((e, t) => /* @__PURE__ */ Y("path", { d: q(e) }, `link-${t}`))
|
|
7008
7008
|
}),
|
|
7009
|
-
/* @__PURE__ */ Y("g", { children:
|
|
7010
|
-
let n = I(e), r = L(e), i =
|
|
7009
|
+
/* @__PURE__ */ Y("g", { children: K.map((e, t) => {
|
|
7010
|
+
let n = I(e), r = L(e), i = re(e), a = J === t, o = e.children ? ni.folder : ni.person, s = Math.round(n * 1.3);
|
|
7011
7011
|
return /* @__PURE__ */ Y(B, {
|
|
7012
7012
|
title: /* @__PURE__ */ X(d, {
|
|
7013
7013
|
sx: {
|
|
@@ -7125,7 +7125,7 @@ function ai({ data: e, size: n = 600, autoFit: r = !0, sortBy: i = "name", showL
|
|
|
7125
7125
|
})
|
|
7126
7126
|
}, `node-${e.data.id}-${t}`);
|
|
7127
7127
|
}) }),
|
|
7128
|
-
l && /* @__PURE__ */ Y("g", { children:
|
|
7128
|
+
l && /* @__PURE__ */ Y("g", { children: K.map((e, t) => {
|
|
7129
7129
|
let n = I(e), r = e.x < Math.PI == !e.children, i = n + 6, a = r ? i : -i, o = r ? "start" : "end";
|
|
7130
7130
|
return /* @__PURE__ */ Y("text", {
|
|
7131
7131
|
transform: `rotate(${e.x * 180 / Math.PI - 90}) translate(${e.y},0) rotate(${e.x >= Math.PI ? 180 : 0})`,
|
|
@@ -7237,11 +7237,11 @@ function ci({ data: e, size: n = 600, padding: r = 3, sortBy: i = "value", showL
|
|
|
7237
7237
|
k.x,
|
|
7238
7238
|
k.y,
|
|
7239
7239
|
k.r * 2
|
|
7240
|
-
]), te = s(k), [G, ne] = c(k),
|
|
7240
|
+
]), te = s(k), [G, ne] = c(k), K = t((e) => {
|
|
7241
7241
|
te.current = e, ne(e);
|
|
7242
|
-
}, []), [
|
|
7243
|
-
|
|
7244
|
-
let
|
|
7242
|
+
}, []), [q, re] = c(e);
|
|
7243
|
+
q !== e && (re(e), K(k), te.current = k);
|
|
7244
|
+
let ie = t((e) => {
|
|
7245
7245
|
let t = W.current;
|
|
7246
7246
|
if (!t) return;
|
|
7247
7247
|
ee.current = e;
|
|
@@ -7280,7 +7280,7 @@ function ci({ data: e, size: n = 600, padding: r = 3, sortBy: i = "value", showL
|
|
|
7280
7280
|
k
|
|
7281
7281
|
]);
|
|
7282
7282
|
a(() => {
|
|
7283
|
-
|
|
7283
|
+
ie([
|
|
7284
7284
|
G.x,
|
|
7285
7285
|
G.y,
|
|
7286
7286
|
G.r * 2
|
|
@@ -7289,9 +7289,9 @@ function ci({ data: e, size: n = 600, padding: r = 3, sortBy: i = "value", showL
|
|
|
7289
7289
|
k,
|
|
7290
7290
|
n,
|
|
7291
7291
|
G,
|
|
7292
|
-
|
|
7292
|
+
ie
|
|
7293
7293
|
]);
|
|
7294
|
-
let
|
|
7294
|
+
let ae = t((e, t) => {
|
|
7295
7295
|
let n = W.current;
|
|
7296
7296
|
if (!n) return;
|
|
7297
7297
|
let r = G, i = ee.current, a = [
|
|
@@ -7299,9 +7299,9 @@ function ci({ data: e, size: n = 600, padding: r = 3, sortBy: i = "value", showL
|
|
|
7299
7299
|
e.y,
|
|
7300
7300
|
e.r * 2
|
|
7301
7301
|
];
|
|
7302
|
-
|
|
7302
|
+
K(e), Z.select(n).transition().duration(t).ease(Z.easeCubic).tween("zoom", () => {
|
|
7303
7303
|
let e = Z.interpolateZoom(i, a);
|
|
7304
|
-
return (t) =>
|
|
7304
|
+
return (t) => ie(e(t));
|
|
7305
7305
|
});
|
|
7306
7306
|
let o = n.querySelectorAll("g[data-role='labels'] > text");
|
|
7307
7307
|
Z.selectAll(o).transition().duration(t).ease(Z.easeCubic).style("fill-opacity", (t, n) => +(A[n].parent === e)).on("start", function(t, n) {
|
|
@@ -7318,9 +7318,9 @@ function ci({ data: e, size: n = 600, padding: r = 3, sortBy: i = "value", showL
|
|
|
7318
7318
|
G,
|
|
7319
7319
|
A,
|
|
7320
7320
|
k,
|
|
7321
|
-
|
|
7321
|
+
ie,
|
|
7322
7322
|
C,
|
|
7323
|
-
|
|
7323
|
+
K
|
|
7324
7324
|
]), oe = s(null), se = (e) => {
|
|
7325
7325
|
oe.current &&= (clearTimeout(oe.current), null), oe.current = setTimeout(() => {
|
|
7326
7326
|
e(), oe.current = null;
|
|
@@ -7331,7 +7331,7 @@ function ci({ data: e, size: n = 600, padding: r = 3, sortBy: i = "value", showL
|
|
|
7331
7331
|
a(() => {
|
|
7332
7332
|
if (x) return;
|
|
7333
7333
|
let e = (e) => {
|
|
7334
|
-
e.key === "Escape" && (ce(),
|
|
7334
|
+
e.key === "Escape" && (ce(), ae(k, y));
|
|
7335
7335
|
};
|
|
7336
7336
|
return window.addEventListener("keydown", e), () => window.removeEventListener("keydown", e);
|
|
7337
7337
|
}, [
|
|
@@ -7343,7 +7343,7 @@ function ci({ data: e, size: n = 600, padding: r = 3, sortBy: i = "value", showL
|
|
|
7343
7343
|
if (x || !(e.ctrlKey || e.metaKey)) return;
|
|
7344
7344
|
ce(), e.preventDefault();
|
|
7345
7345
|
let t = G.parent ?? k;
|
|
7346
|
-
t !== G &&
|
|
7346
|
+
t !== G && ae(t, e.altKey ? Math.max(250, y * 10) : y);
|
|
7347
7347
|
}, ue = {
|
|
7348
7348
|
followCursor: !0,
|
|
7349
7349
|
enterDelay: 50,
|
|
@@ -7471,7 +7471,7 @@ function ci({ data: e, size: n = 600, padding: r = 3, sortBy: i = "value", showL
|
|
|
7471
7471
|
if (t.ctrlKey || t.metaKey) {
|
|
7472
7472
|
if (e.children) {
|
|
7473
7473
|
let n = t.altKey ? Math.max(250, y * 10) : y;
|
|
7474
|
-
se(() =>
|
|
7474
|
+
se(() => ae(e, n));
|
|
7475
7475
|
}
|
|
7476
7476
|
return;
|
|
7477
7477
|
}
|
|
@@ -7482,7 +7482,7 @@ function ci({ data: e, size: n = 600, padding: r = 3, sortBy: i = "value", showL
|
|
|
7482
7482
|
if (!x && (e.ctrlKey || e.metaKey)) {
|
|
7483
7483
|
ce(), e.preventDefault(), e.stopPropagation();
|
|
7484
7484
|
let t = G.parent ?? k;
|
|
7485
|
-
t !== G &&
|
|
7485
|
+
t !== G && ae(t, e.altKey ? Math.max(250, y * 10) : y);
|
|
7486
7486
|
}
|
|
7487
7487
|
}
|
|
7488
7488
|
})
|
|
@@ -7636,7 +7636,7 @@ function pi({ info: e, labelA: t, labelB: n }) {
|
|
|
7636
7636
|
] })]
|
|
7637
7637
|
});
|
|
7638
7638
|
}
|
|
7639
|
-
function mi({ data: e, orientation: n = "LR", width: r = 800, height: i = 500, levelSpacing: l = 200, nodeRadius: u = 10, sortBy: f = "name", showLabels: p = !0, labelFontSize: m = 12, labelColor: h, showIcons: g = !0, chartColors: _, linkStrokeOpacity: v =
|
|
7639
|
+
function mi({ data: e, orientation: n = "LR", width: r = 800, height: i = 500, levelSpacing: l = 200, nodeRadius: u = 10, sortBy: f = "name", showLabels: p = !0, labelFontSize: m = 12, labelColor: h, showIcons: g = !0, chartColors: _, linkStrokeOpacity: v = 1, linkStrokeWidth: y = 1.5, linkColor: b, zoomable: x = !1, drillable: S = !1, onFocusChange: C, showNodePopover: w = !1, renderNodePopoverContent: T, onNodeClick: E, disabled: D = !1, translation: O }) {
|
|
7640
7640
|
let k = H(), A = {
|
|
7641
7641
|
...ui,
|
|
7642
7642
|
...O
|
|
@@ -7649,7 +7649,7 @@ function mi({ data: e, orientation: n = "LR", width: r = 800, height: i = 500, l
|
|
|
7649
7649
|
k.palette.info.main
|
|
7650
7650
|
], M = _ && _.length > 0 ? _ : j, P = h || k.palette.text.primary, F = b || k.palette.text.secondary, I = k.palette.background.paper, L = k.typography.fontFamily, R = n === "TB" || n === "BT", z = R ? i : r, U = R ? r : i, [W, ee] = c([e]), te = W[W.length - 1], [G, ne] = c(e);
|
|
7651
7651
|
G !== e && (ne(e), ee([e]));
|
|
7652
|
-
let
|
|
7652
|
+
let K = o(() => {
|
|
7653
7653
|
let e = Z.hierarchy(te);
|
|
7654
7654
|
f === "value" ? (e.sum((e) => e.value ?? 0), e.sort((e, t) => (t.value ?? 0) - (e.value ?? 0))) : e.sort((e, t) => Z.ascending(String(e.data.name), String(t.data.name)));
|
|
7655
7655
|
let t = Z.max(e.descendants(), (e) => e.depth) ?? 1;
|
|
@@ -7660,7 +7660,7 @@ function mi({ data: e, orientation: n = "LR", width: r = 800, height: i = 500, l
|
|
|
7660
7660
|
z,
|
|
7661
7661
|
U,
|
|
7662
7662
|
l
|
|
7663
|
-
]),
|
|
7663
|
+
]), q = K.descendants(), re = K.links(), ie = t((e) => e.data.colorConfig?.fill ?? M[e.depth % M.length], [M]), ae = t((e) => {
|
|
7664
7664
|
switch (n) {
|
|
7665
7665
|
case "LR": return {
|
|
7666
7666
|
x: e.y,
|
|
@@ -7684,14 +7684,14 @@ function mi({ data: e, orientation: n = "LR", width: r = 800, height: i = 500, l
|
|
|
7684
7684
|
z,
|
|
7685
7685
|
U
|
|
7686
7686
|
]), oe = t((e) => {
|
|
7687
|
-
let t =
|
|
7687
|
+
let t = ae(e.source), r = ae(e.target);
|
|
7688
7688
|
if (n === "LR" || n === "RL") {
|
|
7689
7689
|
let e = (t.x + r.x) / 2;
|
|
7690
7690
|
return `M${t.x},${t.y} C${e},${t.y} ${e},${r.y} ${r.x},${r.y}`;
|
|
7691
7691
|
}
|
|
7692
7692
|
let i = (t.y + r.y) / 2;
|
|
7693
7693
|
return `M${t.x},${t.y} C${t.x},${i} ${r.x},${i} ${r.x},${r.y}`;
|
|
7694
|
-
}, [
|
|
7694
|
+
}, [ae, n]), se = t((e) => ({
|
|
7695
7695
|
id: e.data.id ?? null,
|
|
7696
7696
|
name: e.data.name,
|
|
7697
7697
|
subname: e.data.subname ?? null,
|
|
@@ -7720,7 +7720,7 @@ function mi({ data: e, orientation: n = "LR", width: r = 800, height: i = 500, l
|
|
|
7720
7720
|
});
|
|
7721
7721
|
return () => cancelAnimationFrame(t);
|
|
7722
7722
|
}, [
|
|
7723
|
-
|
|
7723
|
+
K,
|
|
7724
7724
|
r,
|
|
7725
7725
|
i,
|
|
7726
7726
|
n
|
|
@@ -7881,9 +7881,9 @@ function mi({ data: e, orientation: n = "LR", width: r = 800, height: i = 500, l
|
|
|
7881
7881
|
stroke: F,
|
|
7882
7882
|
strokeOpacity: v,
|
|
7883
7883
|
strokeWidth: y,
|
|
7884
|
-
children:
|
|
7885
|
-
}),
|
|
7886
|
-
let r =
|
|
7884
|
+
children: re.map((e, t) => /* @__PURE__ */ Y("path", { d: oe(e) }, `link-${t}`))
|
|
7885
|
+
}), q.map((e, t) => {
|
|
7886
|
+
let r = ae(e), i = ie(e), a = se(e), o = e.children ? di.folder : di.person, s = n === "LR", c = n === "RL", l = s ? u + 6 : c ? -(u + 6) : 0, f = !s && !c ? n === "TB" ? u + 16 : -(u + 6) : 0, h = s ? "start" : c ? "end" : "middle", _ = /* @__PURE__ */ X(d, {
|
|
7887
7887
|
sx: {
|
|
7888
7888
|
py: .5,
|
|
7889
7889
|
minWidth: 140
|