@thebuoyant-tsdev/mui-ts-library 2.1.0 → 2.3.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.
- package/README.de.md +99 -10
- package/README.md +99 -10
- package/dist/components/chord-chart/ChordChart.d.ts +5 -0
- package/dist/components/chord-chart/ChordChart.types.d.ts +80 -0
- package/dist/components/sunburst-chart/SunburstChart.d.ts +5 -0
- package/dist/components/sunburst-chart/SunburstChart.types.d.ts +65 -0
- package/dist/index.cjs +1 -1
- package/dist/index.d.cts +4 -0
- package/dist/index.d.ts +4 -0
- package/dist/index.js +724 -184
- package/package.json +4 -2
package/dist/index.js
CHANGED
|
@@ -5,8 +5,8 @@ import H from "@mui/icons-material/WarningAmberOutlined";
|
|
|
5
5
|
import U from "@mui/icons-material/ErrorOutlined";
|
|
6
6
|
import W from "@mui/icons-material/CheckCircleOutlined";
|
|
7
7
|
import { Fragment as G, jsx as K, jsxs as q } from "react/jsx-runtime";
|
|
8
|
-
import { EditorView as J, highlightActiveLine as
|
|
9
|
-
import { Compartment as
|
|
8
|
+
import { EditorView as J, highlightActiveLine as Y, highlightActiveLineGutter as ee, keymap as te, lineNumbers as ne, placeholder as re } from "@codemirror/view";
|
|
9
|
+
import { Compartment as ie, EditorState as ae } from "@codemirror/state";
|
|
10
10
|
import { json as oe, jsonParseLinter as se } from "@codemirror/lang-json";
|
|
11
11
|
import { defaultKeymap as ce, history as le, historyKeymap as ue, redo as de, undo as fe } from "@codemirror/commands";
|
|
12
12
|
import { HighlightStyle as pe, syntaxHighlighting as me } from "@codemirror/language";
|
|
@@ -68,6 +68,7 @@ import { autocompletion as xt, completionKeymap as St } from "@codemirror/autoco
|
|
|
68
68
|
import Ct from "@mui/icons-material/PlayArrow";
|
|
69
69
|
import { format as wt } from "sql-formatter";
|
|
70
70
|
import Tt from "@mui/icons-material/WarningAmber";
|
|
71
|
+
import * as Z from "d3";
|
|
71
72
|
//#region src/components/confirm-dialog/ConfirmDialog.types.ts
|
|
72
73
|
var Et = {
|
|
73
74
|
confirmLabel: "Confirm",
|
|
@@ -220,7 +221,7 @@ var Nt = {
|
|
|
220
221
|
//#endregion
|
|
221
222
|
//#region src/components/json-editor/JsonEditorContent.tsx
|
|
222
223
|
function Ft({ value: e, onChange: t, placeholder: n, disabled: i = !1, readonly: a = !1, showLineNumbers: o = !0, showMinimap: c = !1, highlightColors: l, onViewReady: d, onCursorChange: f, onBlur: p, onFocus: m }) {
|
|
223
|
-
let h = s(null), g = s(null), _ = s(t), v = s(f), y = s(p), b = s(m), x = s(d), S = s(new
|
|
224
|
+
let h = s(null), g = s(null), _ = s(t), v = s(f), y = s(p), b = s(m), x = s(d), S = s(new ie()), C = s(new ie()), w = B(), 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;
|
|
224
225
|
return r(() => {
|
|
225
226
|
_.current = t;
|
|
226
227
|
}, [t]), r(() => {
|
|
@@ -324,12 +325,12 @@ function Ft({ value: e, onChange: t, placeholder: n, disabled: i = !1, readonly:
|
|
|
324
325
|
he(),
|
|
325
326
|
ge(se()),
|
|
326
327
|
le(),
|
|
327
|
-
|
|
328
|
+
te.of([...ce, ...ue]),
|
|
328
329
|
S.current.of(J.editable.of(!i && !a)),
|
|
329
330
|
C.current.of(ae.readOnly.of(a)),
|
|
330
|
-
|
|
331
|
-
...o ? [
|
|
332
|
-
...n ? [
|
|
331
|
+
Y(),
|
|
332
|
+
...o ? [ne(), ee()] : [],
|
|
333
|
+
...n ? [re(n)] : [],
|
|
333
334
|
...l,
|
|
334
335
|
J.updateListener.of((e) => {
|
|
335
336
|
e.docChanged && _.current?.(e.state.doc.toString());
|
|
@@ -392,7 +393,7 @@ function Ft({ value: e, onChange: t, placeholder: n, disabled: i = !1, readonly:
|
|
|
392
393
|
}
|
|
393
394
|
//#endregion
|
|
394
395
|
//#region src/components/shared/ToolbarButton.tsx
|
|
395
|
-
function
|
|
396
|
+
function Q({ label: e, icon: t, onClick: n, active: r, disabled: i }) {
|
|
396
397
|
return /* @__PURE__ */ K(R, {
|
|
397
398
|
title: e,
|
|
398
399
|
arrow: !0,
|
|
@@ -481,12 +482,12 @@ function It({ editorView: e, toolbarConfig: t, translation: n, indent: r, disabl
|
|
|
481
482
|
display: "flex",
|
|
482
483
|
gap: .25
|
|
483
484
|
},
|
|
484
|
-
children: [t.showFormat && /* @__PURE__ */ K(
|
|
485
|
+
children: [t.showFormat && /* @__PURE__ */ K(Q, {
|
|
485
486
|
label: n.format,
|
|
486
487
|
icon: /* @__PURE__ */ K(Ce, { fontSize: "small" }),
|
|
487
488
|
onClick: l,
|
|
488
489
|
disabled: s
|
|
489
|
-
}), t.showCompact && /* @__PURE__ */ K(
|
|
490
|
+
}), t.showCompact && /* @__PURE__ */ K(Q, {
|
|
490
491
|
label: n.compact,
|
|
491
492
|
icon: /* @__PURE__ */ K(we, { fontSize: "small" }),
|
|
492
493
|
onClick: d,
|
|
@@ -503,7 +504,7 @@ function It({ editorView: e, toolbarConfig: t, translation: n, indent: r, disabl
|
|
|
503
504
|
display: "flex",
|
|
504
505
|
gap: .25
|
|
505
506
|
},
|
|
506
|
-
children: [t.showCopy && /* @__PURE__ */ K(
|
|
507
|
+
children: [t.showCopy && /* @__PURE__ */ K(Q, {
|
|
507
508
|
label: a ? n.copySuccess : n.copy,
|
|
508
509
|
icon: a ? /* @__PURE__ */ K(ye, {
|
|
509
510
|
fontSize: "small",
|
|
@@ -511,7 +512,7 @@ function It({ editorView: e, toolbarConfig: t, translation: n, indent: r, disabl
|
|
|
511
512
|
}) : /* @__PURE__ */ K(ve, { fontSize: "small" }),
|
|
512
513
|
onClick: f,
|
|
513
514
|
disabled: s
|
|
514
|
-
}), t.showClear && /* @__PURE__ */ K(
|
|
515
|
+
}), t.showClear && /* @__PURE__ */ K(Q, {
|
|
515
516
|
label: n.clear,
|
|
516
517
|
icon: /* @__PURE__ */ K(be, { fontSize: "small" }),
|
|
517
518
|
onClick: p,
|
|
@@ -528,12 +529,12 @@ function It({ editorView: e, toolbarConfig: t, translation: n, indent: r, disabl
|
|
|
528
529
|
display: "flex",
|
|
529
530
|
gap: .25
|
|
530
531
|
},
|
|
531
|
-
children: [/* @__PURE__ */ K(
|
|
532
|
+
children: [/* @__PURE__ */ K(Q, {
|
|
532
533
|
label: n.undo,
|
|
533
534
|
icon: /* @__PURE__ */ K(xe, { fontSize: "small" }),
|
|
534
535
|
onClick: m,
|
|
535
536
|
disabled: s
|
|
536
|
-
}), /* @__PURE__ */ K(
|
|
537
|
+
}), /* @__PURE__ */ K(Q, {
|
|
537
538
|
label: n.redo,
|
|
538
539
|
icon: /* @__PURE__ */ K(Se, { fontSize: "small" }),
|
|
539
540
|
onClick: h,
|
|
@@ -1046,7 +1047,7 @@ function gn({ label: e }) {
|
|
|
1046
1047
|
});
|
|
1047
1048
|
}
|
|
1048
1049
|
function _n({ open: e, mode: t, initialTask: n, defaultParentId: i, onSave: a, onClose: s }) {
|
|
1049
|
-
let l =
|
|
1050
|
+
let l = Vn(), p = $((e) => e.taskTree), _ = $((e) => e.timelineRange), y = o(() => hn(p), [p]), S = o(() => {
|
|
1050
1051
|
if (t === "add" || !n) return /* @__PURE__ */ new Set();
|
|
1051
1052
|
let e = (t) => [t.id, ...t.children.flatMap(e)], r = y.find((e) => e.id === n.id);
|
|
1052
1053
|
return new Set(r ? e(r) : [n.id]);
|
|
@@ -1317,7 +1318,7 @@ function _n({ open: e, mode: t, initialTask: n, defaultParentId: i, onSave: a, o
|
|
|
1317
1318
|
//#endregion
|
|
1318
1319
|
//#region src/components/gantt-chart/GanttDeleteDialog.tsx
|
|
1319
1320
|
function vn({ open: e, task: t, onConfirm: n, onClose: r }) {
|
|
1320
|
-
let i =
|
|
1321
|
+
let i = Vn(), a = i.dialogDeleteConfirm.replace("{name}", t?.name ?? "");
|
|
1321
1322
|
return /* @__PURE__ */ q(m, {
|
|
1322
1323
|
open: e,
|
|
1323
1324
|
onClose: r,
|
|
@@ -1351,7 +1352,7 @@ function yn(e, t) {
|
|
|
1351
1352
|
}[e];
|
|
1352
1353
|
}
|
|
1353
1354
|
function bn({ task: e, expandedIds: t, toggleExpand: n, hasActionsColumn: r, onTaskClick: i, onAddTask: a, onEditTask: o, onDeleteTask: s, onStatusChange: l, inlineEdit: d, onInlineRename: f }) {
|
|
1354
|
-
let [m, h] = c(null), [g, _] = c(null), v =
|
|
1355
|
+
let [m, h] = c(null), [g, _] = c(null), v = Vn(), { statusColors: y } = Un(), b = () => {
|
|
1355
1356
|
g !== null && g.trim() && f?.(e, g.trim()), _(null);
|
|
1356
1357
|
};
|
|
1357
1358
|
return /* @__PURE__ */ q(u, {
|
|
@@ -1533,7 +1534,7 @@ function bn({ task: e, expandedIds: t, toggleExpand: n, hasActionsColumn: r, onT
|
|
|
1533
1534
|
});
|
|
1534
1535
|
}
|
|
1535
1536
|
function xn({ scrollRef: e, onScroll: t, panelWidth: n, onTaskClick: r, onAddTask: i, onEditTask: a, onDeleteTask: s, onStatusChange: l, onTasksChange: d, enableBuiltinDialogs: f, onTaskCreated: p, onTaskUpdated: m, onTaskDeleted: h, inlineEdit: g, virtualizeRows: _ = !1 }) {
|
|
1536
|
-
let v =
|
|
1537
|
+
let v = Vn(), y = zn(), b = $((e) => e.taskTree), x = $((e) => e.expandedIds), S = $((e) => e.toggleExpand), C = $((e) => e.timeScale), w = $((e) => e.addTask), T = $((e) => e.updateTask), E = $((e) => e.deleteTask), D = o(() => Kt(b, x), [b, x]), O = De({
|
|
1537
1538
|
count: D.length,
|
|
1538
1539
|
getScrollElement: () => e.current,
|
|
1539
1540
|
estimateSize: () => 40,
|
|
@@ -1711,7 +1712,7 @@ function xn({ scrollRef: e, onScroll: t, panelWidth: n, onTaskClick: r, onAddTas
|
|
|
1711
1712
|
//#region src/components/gantt-chart/hooks/useGanttDrag.ts
|
|
1712
1713
|
var Sn = 864e5;
|
|
1713
1714
|
function Cn({ totalWidth: e, displayRange: t, onTaskMoved: n, onTaskResized: r, onTasksChange: i }) {
|
|
1714
|
-
let o =
|
|
1715
|
+
let o = $((e) => e.updateTask), l = zn(), u = Vn(), d = s(1), f = s(n), p = s(r), m = s(i);
|
|
1715
1716
|
a(() => {
|
|
1716
1717
|
d.current = e > 0 ? e / ((t.end.getTime() - t.start.getTime()) / Sn) : 1, f.current = n, p.current = r, m.current = i;
|
|
1717
1718
|
});
|
|
@@ -1897,7 +1898,7 @@ function Tn({ columns: e, groups: t, todayX: n, todayLabel: r, todayTooltip: i,
|
|
|
1897
1898
|
//#endregion
|
|
1898
1899
|
//#region src/components/gantt-chart/GanttBarRow.tsx
|
|
1899
1900
|
function En({ task: e, virtualTop: t, activeDrag: n, displayRange: r, totalWidth: i, gridColumnWidth: a, criticalTaskIds: o, draggable: s = !1, resizable: c = !1, progressDraggable: l = !1, onTaskClick: d, onMilestoneClick: f, onContextMenu: p, suppressClickRef: m, handleBarMouseDown: h, handleProgressMouseDown: g, formatDragDate: _ }) {
|
|
1900
|
-
let v = B(), { statusColors: y, criticalPathColor: b, milestoneColor: x, barBorderRadius: S } =
|
|
1901
|
+
let v = B(), { statusColors: y, criticalPathColor: b, milestoneColor: x, barBorderRadius: S } = Un(), C = n?.taskId === e.id, w = e;
|
|
1901
1902
|
if (C && n) if (n.type === "move") w = {
|
|
1902
1903
|
...e,
|
|
1903
1904
|
startDate: Xt(e.startDate, n.deltaDays),
|
|
@@ -2093,7 +2094,7 @@ function kn({ left: e, children: t }) {
|
|
|
2093
2094
|
//#endregion
|
|
2094
2095
|
//#region src/components/gantt-chart/GanttWeekendStrips.tsx
|
|
2095
2096
|
function An({ strips: e, totalWidth: t, height: n, top: r }) {
|
|
2096
|
-
let { weekendColor: i } =
|
|
2097
|
+
let { weekendColor: i } = Un();
|
|
2097
2098
|
return e.length === 0 ? null : /* @__PURE__ */ K(u, {
|
|
2098
2099
|
"aria-hidden": !0,
|
|
2099
2100
|
"data-testid": "gantt-weekend-strips",
|
|
@@ -2118,7 +2119,7 @@ function An({ strips: e, totalWidth: t, height: n, top: r }) {
|
|
|
2118
2119
|
//#endregion
|
|
2119
2120
|
//#region src/components/gantt-chart/GanttStatusContextMenu.tsx
|
|
2120
2121
|
function jn({ contextMenu: e, onClose: t, onSelect: n }) {
|
|
2121
|
-
let r =
|
|
2122
|
+
let r = Vn(), i = {
|
|
2122
2123
|
planned: r.statusPlanned,
|
|
2123
2124
|
"in-progress": r.statusInProgress,
|
|
2124
2125
|
done: r.statusDone,
|
|
@@ -2150,7 +2151,7 @@ function jn({ contextMenu: e, onClose: t, onSelect: n }) {
|
|
|
2150
2151
|
//#endregion
|
|
2151
2152
|
//#region src/components/gantt-chart/GanttDependencyArrows.tsx
|
|
2152
2153
|
function Mn({ dependencyLines: e, todayX: t, totalWidth: n, height: r, top: i, arrowMarkerId: a }) {
|
|
2153
|
-
let o = B(), { todayLineColor: s } =
|
|
2154
|
+
let o = B(), { todayLineColor: s } = Un();
|
|
2154
2155
|
return e.length === 0 && t === null ? null : /* @__PURE__ */ q("svg", {
|
|
2155
2156
|
"data-testid": "gantt-dependency-arrows",
|
|
2156
2157
|
style: {
|
|
@@ -2218,7 +2219,7 @@ function Nn(e, t, n) {
|
|
|
2218
2219
|
return r;
|
|
2219
2220
|
}
|
|
2220
2221
|
function Pn({ scrollRef: e, onScroll: t, onTaskClick: n, onMilestoneClick: a, draggable: l = !1, resizable: d = !1, progressDraggable: f = !1, showCriticalPath: p = !1, virtualizeRows: m = !1, onTaskMoved: h, onTaskResized: g, onTasksChange: _, onStatusChange: v }) {
|
|
2221
|
-
let y =
|
|
2222
|
+
let y = $((e) => e.taskTree), b = $((e) => e.tasks), x = $((e) => e.expandedIds), S = $((e) => e.timelineRange), C = $((e) => e.timeScale), w = $((e) => e.updateTask), T = zn(), E = Vn(), D = B(), { todayLineColor: O } = Un(), k = `gantt-arrow-${i().replace(/:/g, "")}`, A = o(() => Kt(y, x), [y, x]), j = o(() => Ht(S, C), [S, C]), M = o(() => C === "days" ? nn(j).map((e) => ({
|
|
2222
2223
|
key: e.toISOString(),
|
|
2223
2224
|
label: String(e.getDate()),
|
|
2224
2225
|
width: 20,
|
|
@@ -2297,13 +2298,13 @@ function Pn({ scrollRef: e, onScroll: t, onTaskClick: n, onMilestoneClick: a, dr
|
|
|
2297
2298
|
let t = e.current.clientWidth;
|
|
2298
2299
|
e.current.scrollLeft = Math.max(0, z - t / 2);
|
|
2299
2300
|
}, []);
|
|
2300
|
-
let U = C === "days" ? 20 : C === "weeks" ? 40 : C === "quarters" ? 360 : 120, W = P ? 80 : 40, { activeDrag: J, suppressClickRef:
|
|
2301
|
+
let U = C === "days" ? 20 : C === "weeks" ? 40 : C === "quarters" ? 360 : 120, W = P ? 80 : 40, { activeDrag: J, suppressClickRef: Y, handleBarMouseDown: ee, handleProgressMouseDown: te, formatDragDate: ne } = Cn({
|
|
2301
2302
|
totalWidth: N,
|
|
2302
2303
|
displayRange: j,
|
|
2303
2304
|
onTaskMoved: h,
|
|
2304
2305
|
onTaskResized: g,
|
|
2305
2306
|
onTasksChange: _
|
|
2306
|
-
}), [
|
|
2307
|
+
}), [re, ie] = c(null), ae = s(v);
|
|
2307
2308
|
ae.current = v;
|
|
2308
2309
|
let oe = s(_);
|
|
2309
2310
|
return oe.current = _, /* @__PURE__ */ K(u, {
|
|
@@ -2352,15 +2353,15 @@ function Pn({ scrollRef: e, onScroll: t, onTaskClick: n, onMilestoneClick: a, dr
|
|
|
2352
2353
|
progressDraggable: f,
|
|
2353
2354
|
onTaskClick: n,
|
|
2354
2355
|
onMilestoneClick: a,
|
|
2355
|
-
onContextMenu: (e, t, n) =>
|
|
2356
|
+
onContextMenu: (e, t, n) => ie({
|
|
2356
2357
|
task: e,
|
|
2357
2358
|
mouseX: t,
|
|
2358
2359
|
mouseY: n
|
|
2359
2360
|
}),
|
|
2360
|
-
suppressClickRef:
|
|
2361
|
-
handleBarMouseDown:
|
|
2362
|
-
handleProgressMouseDown:
|
|
2363
|
-
formatDragDate:
|
|
2361
|
+
suppressClickRef: Y,
|
|
2362
|
+
handleBarMouseDown: ee,
|
|
2363
|
+
handleProgressMouseDown: te,
|
|
2364
|
+
formatDragDate: ne
|
|
2364
2365
|
}, e.key))
|
|
2365
2366
|
}) : /* @__PURE__ */ K(G, { children: A.map((e) => /* @__PURE__ */ K(En, {
|
|
2366
2367
|
task: e,
|
|
@@ -2374,25 +2375,25 @@ function Pn({ scrollRef: e, onScroll: t, onTaskClick: n, onMilestoneClick: a, dr
|
|
|
2374
2375
|
progressDraggable: f,
|
|
2375
2376
|
onTaskClick: n,
|
|
2376
2377
|
onMilestoneClick: a,
|
|
2377
|
-
onContextMenu: (e, t, n) =>
|
|
2378
|
+
onContextMenu: (e, t, n) => ie({
|
|
2378
2379
|
task: e,
|
|
2379
2380
|
mouseX: t,
|
|
2380
2381
|
mouseY: n
|
|
2381
2382
|
}),
|
|
2382
|
-
suppressClickRef:
|
|
2383
|
-
handleBarMouseDown:
|
|
2384
|
-
handleProgressMouseDown:
|
|
2385
|
-
formatDragDate:
|
|
2383
|
+
suppressClickRef: Y,
|
|
2384
|
+
handleBarMouseDown: ee,
|
|
2385
|
+
handleProgressMouseDown: te,
|
|
2386
|
+
formatDragDate: ne
|
|
2386
2387
|
}, e.id)) }),
|
|
2387
2388
|
/* @__PURE__ */ K(jn, {
|
|
2388
|
-
contextMenu:
|
|
2389
|
-
onClose: () =>
|
|
2389
|
+
contextMenu: re,
|
|
2390
|
+
onClose: () => ie(null),
|
|
2390
2391
|
onSelect: (e, t) => {
|
|
2391
2392
|
let n = T.getState().tasks.find((t) => t.id === e.id) ?? e;
|
|
2392
2393
|
w({
|
|
2393
2394
|
...n,
|
|
2394
2395
|
status: t
|
|
2395
|
-
}), ae.current?.(n, t), oe.current?.(T.getState().tasks),
|
|
2396
|
+
}), ae.current?.(n, t), oe.current?.(T.getState().tasks), ie(null);
|
|
2396
2397
|
}
|
|
2397
2398
|
}),
|
|
2398
2399
|
/* @__PURE__ */ K(Mn, {
|
|
@@ -2417,7 +2418,7 @@ function In(e) {
|
|
|
2417
2418
|
return !t || !n || !r ? null : new Date(t, n - 1, r, 0, 0, 0, 0);
|
|
2418
2419
|
}
|
|
2419
2420
|
function Ln({ onScrollToToday: e, config: t }) {
|
|
2420
|
-
let n =
|
|
2421
|
+
let n = Vn(), r = $((e) => e.timeScale), i = $((e) => e.defaultTimeScale), a = $((e) => e.setTimeScale), s = $((e) => e.timelineRange), c = $((e) => e.isRangeCustomized), l = $((e) => e.isExpandedCustomized), d = $((e) => e.setTimelineRange), f = $((e) => e.resetTimelineRange), p = $((e) => e.resetView), m = $((e) => e.tasks), h = $((e) => e.expandedIds), g = $((e) => e.expandAll), _ = $((e) => e.collapseAll), v = m.length > 0 && m.every((e) => h.has(e.id)), y = r !== i || c || l, b = o(() => Date.now(), []), x = b >= s.start.getTime() && b <= s.end.getTime(), S = {
|
|
2421
2422
|
days: n.scaleDays,
|
|
2422
2423
|
weeks: n.scaleWeeks,
|
|
2423
2424
|
months: n.scaleMonths,
|
|
@@ -2542,7 +2543,7 @@ function Ln({ onScrollToToday: e, config: t }) {
|
|
|
2542
2543
|
//#endregion
|
|
2543
2544
|
//#region src/components/gantt-chart/GanttChart.tsx
|
|
2544
2545
|
var Rn = e(null);
|
|
2545
|
-
function
|
|
2546
|
+
function $(e) {
|
|
2546
2547
|
let t = n(Rn);
|
|
2547
2548
|
if (!t) throw Error("GanttChartStoreContext is missing.");
|
|
2548
2549
|
return Te(t, e);
|
|
@@ -2553,22 +2554,22 @@ function zn() {
|
|
|
2553
2554
|
return e;
|
|
2554
2555
|
}
|
|
2555
2556
|
var Bn = e(un);
|
|
2556
|
-
function
|
|
2557
|
+
function Vn() {
|
|
2557
2558
|
return n(Bn);
|
|
2558
2559
|
}
|
|
2559
|
-
var
|
|
2560
|
-
function
|
|
2561
|
-
return n(
|
|
2560
|
+
var Hn = e({});
|
|
2561
|
+
function Un() {
|
|
2562
|
+
return n(Hn);
|
|
2562
2563
|
}
|
|
2563
|
-
function
|
|
2564
|
+
function Wn(e, t) {
|
|
2564
2565
|
return e === void 0 ? t : e === "auto" ? "100%" : typeof e == "string" && /^\d+$/.test(e) ? Number(e) : e;
|
|
2565
2566
|
}
|
|
2566
|
-
var
|
|
2567
|
+
var Gn = [
|
|
2567
2568
|
"days",
|
|
2568
2569
|
"weeks",
|
|
2569
2570
|
"months",
|
|
2570
2571
|
"quarters"
|
|
2571
|
-
],
|
|
2572
|
+
], Kn = {
|
|
2572
2573
|
showScaleDays: !0,
|
|
2573
2574
|
showScaleWeeks: !0,
|
|
2574
2575
|
showScaleMonths: !0,
|
|
@@ -2579,11 +2580,11 @@ var Wn = [
|
|
|
2579
2580
|
showRangeReset: !0,
|
|
2580
2581
|
showResetView: !0
|
|
2581
2582
|
};
|
|
2582
|
-
function
|
|
2583
|
-
let N =
|
|
2584
|
-
...
|
|
2583
|
+
function qn({ tasks: e, onTaskClick: n, onMilestoneClick: i, onAddTask: a, onEditTask: l, onDeleteTask: d, onStatusChange: f, onTasksChange: p, enableBuiltinDialogs: m = !0, onTaskCreated: h, onTaskUpdated: g, onTaskDeleted: _, showToolbar: v = !0, toolbarConfig: y, height: b, width: x, minPanelWidth: S = 200, maxPanelWidth: C = 600, zoomable: w = !1, draggable: T = !1, resizable: E = !1, inlineEdit: D = !1, progressDraggable: O = !1, showCriticalPath: k = !1, virtualizeRows: A = !1, onTaskMoved: j, onTaskResized: M }) {
|
|
2584
|
+
let N = Wn(b, 400), P = o(() => ({
|
|
2585
|
+
...Kn,
|
|
2585
2586
|
...y
|
|
2586
|
-
}), [y]), F =
|
|
2587
|
+
}), [y]), F = Wn(x, "100%"), I = $((e) => e.setTasks), L = $((e) => e.timeScale), R = $((e) => e.setTimeScale), z = $((e) => e.timelineRange), B = s(null), V = s(null), H = s(!1), [U, W] = c(320);
|
|
2587
2588
|
r(() => {
|
|
2588
2589
|
I(e);
|
|
2589
2590
|
}, [e, I]);
|
|
@@ -2591,7 +2592,7 @@ function Kn({ tasks: e, onTaskClick: n, onMilestoneClick: i, onAddTask: a, onEdi
|
|
|
2591
2592
|
H.current ||= (H.current = !0, V.current && B.current && (V.current.scrollTop = B.current.scrollTop), !1);
|
|
2592
2593
|
}, J = () => {
|
|
2593
2594
|
H.current ||= (H.current = !0, B.current && V.current && (B.current.scrollTop = V.current.scrollTop), !1);
|
|
2594
|
-
},
|
|
2595
|
+
}, Y = t(() => {
|
|
2595
2596
|
if (!V.current) return;
|
|
2596
2597
|
let e = Ht(z, L), t = Date.now(), n = e.start.getTime(), r = e.end.getTime(), i = (t - n) / (r - n) * V.current.scrollWidth;
|
|
2597
2598
|
V.current.scrollLeft = Math.max(0, i - V.current.clientWidth / 2);
|
|
@@ -2601,8 +2602,8 @@ function Kn({ tasks: e, onTaskClick: n, onMilestoneClick: i, onAddTask: a, onEdi
|
|
|
2601
2602
|
let e = V.current, t = (e) => {
|
|
2602
2603
|
if (!e.ctrlKey) return;
|
|
2603
2604
|
e.preventDefault();
|
|
2604
|
-
let t =
|
|
2605
|
-
e.deltaY < 0 && t > 0 ? R(
|
|
2605
|
+
let t = Gn.indexOf(L);
|
|
2606
|
+
e.deltaY < 0 && t > 0 ? R(Gn[t - 1]) : e.deltaY > 0 && t < Gn.length - 1 && R(Gn[t + 1]);
|
|
2606
2607
|
};
|
|
2607
2608
|
return e.addEventListener("wheel", t, { passive: !1 }), () => e.removeEventListener("wheel", t);
|
|
2608
2609
|
}, [
|
|
@@ -2610,7 +2611,7 @@ function Kn({ tasks: e, onTaskClick: n, onMilestoneClick: i, onAddTask: a, onEdi
|
|
|
2610
2611
|
L,
|
|
2611
2612
|
R
|
|
2612
2613
|
]);
|
|
2613
|
-
let
|
|
2614
|
+
let ee = t((e) => {
|
|
2614
2615
|
e.preventDefault();
|
|
2615
2616
|
let t = e.clientX, n = U, r = (e) => {
|
|
2616
2617
|
let r = e.clientX - t;
|
|
@@ -2636,7 +2637,7 @@ function Kn({ tasks: e, onTaskClick: n, onMilestoneClick: i, onAddTask: a, onEdi
|
|
|
2636
2637
|
overflow: "hidden"
|
|
2637
2638
|
},
|
|
2638
2639
|
children: [v && /* @__PURE__ */ K(Ln, {
|
|
2639
|
-
onScrollToToday:
|
|
2640
|
+
onScrollToToday: Y,
|
|
2640
2641
|
config: P
|
|
2641
2642
|
}), /* @__PURE__ */ q(u, {
|
|
2642
2643
|
sx: {
|
|
@@ -2671,7 +2672,7 @@ function Kn({ tasks: e, onTaskClick: n, onMilestoneClick: i, onAddTask: a, onEdi
|
|
|
2671
2672
|
cursor: "col-resize",
|
|
2672
2673
|
"&:hover": { bgcolor: "action.hover" }
|
|
2673
2674
|
},
|
|
2674
|
-
onMouseDown:
|
|
2675
|
+
onMouseDown: ee
|
|
2675
2676
|
}),
|
|
2676
2677
|
/* @__PURE__ */ K(Pn, {
|
|
2677
2678
|
scrollRef: V,
|
|
@@ -2692,7 +2693,7 @@ function Kn({ tasks: e, onTaskClick: n, onMilestoneClick: i, onAddTask: a, onEdi
|
|
|
2692
2693
|
})]
|
|
2693
2694
|
});
|
|
2694
2695
|
}
|
|
2695
|
-
function
|
|
2696
|
+
function Jn({ tasks: e, timeScale: t = "months", initialExpandAll: n = !1, showToolbar: r = !0, defaultRangeStart: i, defaultRangeEnd: a, translations: s, enableBuiltinDialogs: l = !0, toolbarConfig: u, zoomable: d = !1, draggable: f = !1, resizable: p = !1, inlineEdit: m = !1, progressDraggable: h = !1, showCriticalPath: g = !1, virtualizeRows: _ = !1, cascadeDependencies: v = !1, statusColors: y, ganttTheme: b, onTaskClick: x, onMilestoneClick: S, onAddTask: C, onEditTask: w, onDeleteTask: T, onStatusChange: E, onTasksChange: D, onTaskMoved: O, onTaskResized: k, onTaskCreated: A, onTaskUpdated: j, onTaskDeleted: M, height: N, width: P, minPanelWidth: F, maxPanelWidth: I }) {
|
|
2696
2697
|
let L = o(() => ({
|
|
2697
2698
|
...un,
|
|
2698
2699
|
...s
|
|
@@ -2712,11 +2713,11 @@ function qn({ tasks: e, timeScale: t = "months", initialExpandAll: n = !1, showT
|
|
|
2712
2713
|
}), [y, b]);
|
|
2713
2714
|
return /* @__PURE__ */ K(Bn.Provider, {
|
|
2714
2715
|
value: L,
|
|
2715
|
-
children: /* @__PURE__ */ K(
|
|
2716
|
+
children: /* @__PURE__ */ K(Hn.Provider, {
|
|
2716
2717
|
value: z,
|
|
2717
2718
|
children: /* @__PURE__ */ K(Rn.Provider, {
|
|
2718
2719
|
value: R,
|
|
2719
|
-
children: /* @__PURE__ */ K(
|
|
2720
|
+
children: /* @__PURE__ */ K(qn, {
|
|
2720
2721
|
tasks: e,
|
|
2721
2722
|
timeScale: t,
|
|
2722
2723
|
enableBuiltinDialogs: l,
|
|
@@ -2752,8 +2753,8 @@ function qn({ tasks: e, timeScale: t = "months", initialExpandAll: n = !1, showT
|
|
|
2752
2753
|
}
|
|
2753
2754
|
//#endregion
|
|
2754
2755
|
//#region src/components/password-strength-meter/util/password-strength.util.ts
|
|
2755
|
-
var
|
|
2756
|
-
function
|
|
2756
|
+
var Yn = (e) => Math.max(0, Math.min(4, Math.round(e)));
|
|
2757
|
+
function Xn(e, t) {
|
|
2757
2758
|
let n = e ?? "", r = n.length, i = /[a-z]/.test(n), a = /[A-Z]/.test(n), o = /\d/.test(n), s = /[^A-Za-z0-9]/.test(n), c = [
|
|
2758
2759
|
i,
|
|
2759
2760
|
a,
|
|
@@ -2775,7 +2776,7 @@ function Yn(e, t) {
|
|
|
2775
2776
|
}
|
|
2776
2777
|
let l = 0;
|
|
2777
2778
|
l += 1, r >= t + 4 && (l += 1), c >= 2 && (l += 1), c >= 3 && (l += 1), /^(.)\1+$/.test(n) && (l -= 2), /1234|abcd|qwer|password|passwort|admin/i.test(n) && (l -= 2);
|
|
2778
|
-
let u =
|
|
2779
|
+
let u = Yn(l), d = u <= 1 ? "weak" : u === 2 ? "ok" : u === 3 ? "good" : "very good";
|
|
2779
2780
|
return {
|
|
2780
2781
|
score: u,
|
|
2781
2782
|
percent: u * 25,
|
|
@@ -2789,7 +2790,7 @@ function Yn(e, t) {
|
|
|
2789
2790
|
}
|
|
2790
2791
|
//#endregion
|
|
2791
2792
|
//#region src/components/password-strength-meter/PasswordStrengthBar.tsx
|
|
2792
|
-
function
|
|
2793
|
+
function Zn({ percent: e, color: t, ariaLabel: n, segments: r = !1 }) {
|
|
2793
2794
|
if (r) {
|
|
2794
2795
|
let r = Math.round(e / 25);
|
|
2795
2796
|
return /* @__PURE__ */ K(u, {
|
|
@@ -2852,7 +2853,7 @@ function Xn({ percent: e, color: t, ariaLabel: n, segments: r = !1 }) {
|
|
|
2852
2853
|
}
|
|
2853
2854
|
//#endregion
|
|
2854
2855
|
//#region src/components/password-strength-meter/PasswordStrengthMeter.types.ts
|
|
2855
|
-
var
|
|
2856
|
+
var Qn = {
|
|
2856
2857
|
label: "Password",
|
|
2857
2858
|
summaryHeaderLabel: "Requirements for your password",
|
|
2858
2859
|
summaryMinChars: "At least {n} characters",
|
|
@@ -2863,18 +2864,18 @@ var Zn = {
|
|
|
2863
2864
|
showPasswordLabel: "Show password",
|
|
2864
2865
|
hidePasswordLabel: "Hide password",
|
|
2865
2866
|
meterAriaLabel: "Password strength"
|
|
2866
|
-
},
|
|
2867
|
+
}, $n = {
|
|
2867
2868
|
weak: "#cc0000",
|
|
2868
2869
|
ok: "#fdc010",
|
|
2869
2870
|
good: "#8bc34a",
|
|
2870
2871
|
veryGood: "#43a047"
|
|
2871
|
-
},
|
|
2872
|
+
}, er = {
|
|
2872
2873
|
failure: "#cc0000",
|
|
2873
2874
|
success: "#43a047"
|
|
2874
2875
|
};
|
|
2875
2876
|
//#endregion
|
|
2876
2877
|
//#region src/components/password-strength-meter/PasswordStrengthMeter.tsx
|
|
2877
|
-
function
|
|
2878
|
+
function tr({ label: e, fulfilled: t, checkColors: n }) {
|
|
2878
2879
|
return /* @__PURE__ */ q(P, {
|
|
2879
2880
|
direction: "row",
|
|
2880
2881
|
sx: {
|
|
@@ -2900,14 +2901,14 @@ function er({ label: e, fulfilled: t, checkColors: n }) {
|
|
|
2900
2901
|
})]
|
|
2901
2902
|
});
|
|
2902
2903
|
}
|
|
2903
|
-
function
|
|
2904
|
+
function nr({ value: e, name: t, inputRef: n, disabled: r = !1, error: a = !1, helperText: s, autoComplete: l, customRequirements: d, showPasswordAdornment: f = !0, showMeter: p = !0, showSegmentedBar: m = !1, showSummary: h = !0, inputSize: g = "medium", translation: _, meterColors: v, passwordMinLength: y = 8, checkColors: x = er, onPasswordChange: E }) {
|
|
2904
2905
|
let D = {
|
|
2905
|
-
...
|
|
2906
|
+
...Qn,
|
|
2906
2907
|
..._
|
|
2907
2908
|
}, O = {
|
|
2908
|
-
|
|
2909
|
+
...$n,
|
|
2909
2910
|
...v
|
|
2910
|
-
}, k = `${i()}-password`, [j, M] = c(!1), [N, F] = c(""), I = e === void 0 ? N : e, L = o(() =>
|
|
2911
|
+
}, k = `${i()}-password`, [j, M] = c(!1), [N, F] = c(""), I = e === void 0 ? N : e, L = o(() => Xn(I, y), [I, y]);
|
|
2911
2912
|
return /* @__PURE__ */ q(P, { children: [
|
|
2912
2913
|
/* @__PURE__ */ q(b, {
|
|
2913
2914
|
variant: "outlined",
|
|
@@ -2927,7 +2928,7 @@ function tr({ value: e, name: t, inputRef: n, disabled: r = !1, error: a = !1, h
|
|
|
2927
2928
|
value: I,
|
|
2928
2929
|
onChange: (t) => {
|
|
2929
2930
|
let n = t.target.value;
|
|
2930
|
-
e === void 0 && F(n), E && E(n,
|
|
2931
|
+
e === void 0 && F(n), E && E(n, Xn(n, y));
|
|
2931
2932
|
},
|
|
2932
2933
|
disabled: r,
|
|
2933
2934
|
inputRef: n,
|
|
@@ -2960,7 +2961,7 @@ function tr({ value: e, name: t, inputRef: n, disabled: r = !1, error: a = !1, h
|
|
|
2960
2961
|
s && /* @__PURE__ */ K(S, { children: s })
|
|
2961
2962
|
]
|
|
2962
2963
|
}),
|
|
2963
|
-
p && /* @__PURE__ */ K(
|
|
2964
|
+
p && /* @__PURE__ */ K(Zn, {
|
|
2964
2965
|
percent: L.percent,
|
|
2965
2966
|
color: ((e) => {
|
|
2966
2967
|
switch (e.meterStatus) {
|
|
@@ -2994,17 +2995,17 @@ function tr({ value: e, name: t, inputRef: n, disabled: r = !1, error: a = !1, h
|
|
|
2994
2995
|
children: [/* @__PURE__ */ q(P, {
|
|
2995
2996
|
direction: "column",
|
|
2996
2997
|
children: [
|
|
2997
|
-
/* @__PURE__ */ K(
|
|
2998
|
+
/* @__PURE__ */ K(tr, {
|
|
2998
2999
|
label: D.summaryMinChars.replace("{n}", String(y)),
|
|
2999
3000
|
fulfilled: L.length >= y,
|
|
3000
3001
|
checkColors: x
|
|
3001
3002
|
}),
|
|
3002
|
-
/* @__PURE__ */ K(
|
|
3003
|
+
/* @__PURE__ */ K(tr, {
|
|
3003
3004
|
label: D.summaryCapitalLetter,
|
|
3004
3005
|
fulfilled: L.hasUpper,
|
|
3005
3006
|
checkColors: x
|
|
3006
3007
|
}),
|
|
3007
|
-
/* @__PURE__ */ K(
|
|
3008
|
+
/* @__PURE__ */ K(tr, {
|
|
3008
3009
|
label: D.summaryLowerCaseLetter,
|
|
3009
3010
|
fulfilled: L.hasLower,
|
|
3010
3011
|
checkColors: x
|
|
@@ -3013,17 +3014,17 @@ function tr({ value: e, name: t, inputRef: n, disabled: r = !1, error: a = !1, h
|
|
|
3013
3014
|
}), /* @__PURE__ */ q(P, {
|
|
3014
3015
|
direction: "column",
|
|
3015
3016
|
children: [
|
|
3016
|
-
/* @__PURE__ */ K(
|
|
3017
|
+
/* @__PURE__ */ K(tr, {
|
|
3017
3018
|
label: D.summaryNumber,
|
|
3018
3019
|
fulfilled: L.hasDigit,
|
|
3019
3020
|
checkColors: x
|
|
3020
3021
|
}),
|
|
3021
|
-
/* @__PURE__ */ K(
|
|
3022
|
+
/* @__PURE__ */ K(tr, {
|
|
3022
3023
|
label: D.summarySpecialChar,
|
|
3023
3024
|
fulfilled: L.hasSymbol,
|
|
3024
3025
|
checkColors: x
|
|
3025
3026
|
}),
|
|
3026
|
-
d?.map((e, t) => /* @__PURE__ */ K(
|
|
3027
|
+
d?.map((e, t) => /* @__PURE__ */ K(tr, {
|
|
3027
3028
|
label: e.label,
|
|
3028
3029
|
fulfilled: typeof e.fulfilled == "function" ? e.fulfilled(I) : e.fulfilled,
|
|
3029
3030
|
checkColors: x
|
|
@@ -3036,7 +3037,7 @@ function tr({ value: e, name: t, inputRef: n, disabled: r = !1, error: a = !1, h
|
|
|
3036
3037
|
}
|
|
3037
3038
|
//#endregion
|
|
3038
3039
|
//#region src/components/tag-selection/TagSelection.store.ts
|
|
3039
|
-
function
|
|
3040
|
+
function rr(e) {
|
|
3040
3041
|
return Ee((t) => ({
|
|
3041
3042
|
tags: e,
|
|
3042
3043
|
searchValue: "",
|
|
@@ -3074,7 +3075,7 @@ function nr(e) {
|
|
|
3074
3075
|
}
|
|
3075
3076
|
//#endregion
|
|
3076
3077
|
//#region src/components/tag-selection/TagSelectionAutocomplete.tsx
|
|
3077
|
-
var
|
|
3078
|
+
var ir = [
|
|
3078
3079
|
"default",
|
|
3079
3080
|
"primary",
|
|
3080
3081
|
"secondary",
|
|
@@ -3083,7 +3084,7 @@ var rr = [
|
|
|
3083
3084
|
"success",
|
|
3084
3085
|
"warning"
|
|
3085
3086
|
];
|
|
3086
|
-
function
|
|
3087
|
+
function ar({ availableTags: e, searchValue: t, translation: n, onSearchChange: r, onTagSelect: i, onTagCreate: a, inputSize: o = "medium", chipSize: s = "medium", disabled: d = !1, loading: f = !1, isMaxReached: m = !1, allowCreate: h = !1, listboxMaxHeight: g }) {
|
|
3087
3088
|
let [_, v] = c("default"), [y, b] = c(!1), x = d || m, S = e.filter((e) => e.label.toLowerCase().includes(t.trim().toLowerCase())), w = h && t.trim() !== "" && S.length === 0, T = y && !w, E = () => {
|
|
3088
3089
|
a?.(t.trim(), _), v("default");
|
|
3089
3090
|
}, D = () => {
|
|
@@ -3182,7 +3183,7 @@ function ir({ availableTags: e, searchValue: t, translation: n, onSearchChange:
|
|
|
3182
3183
|
gap: .5,
|
|
3183
3184
|
alignItems: "center"
|
|
3184
3185
|
},
|
|
3185
|
-
children:
|
|
3186
|
+
children: ir.map((e) => /* @__PURE__ */ K(p, {
|
|
3186
3187
|
size: s,
|
|
3187
3188
|
color: e,
|
|
3188
3189
|
label: e,
|
|
@@ -3195,7 +3196,7 @@ function ir({ availableTags: e, searchValue: t, translation: n, onSearchChange:
|
|
|
3195
3196
|
}
|
|
3196
3197
|
//#endregion
|
|
3197
3198
|
//#region src/components/tag-selection/TagSelectionChip.tsx
|
|
3198
|
-
function
|
|
3199
|
+
function or({ tag: e, onDelete: t, onClick: n, chipSize: r = "medium", disabled: i = !1 }) {
|
|
3199
3200
|
let a = !!(e.foregroundColor || e.backgroundColor);
|
|
3200
3201
|
return /* @__PURE__ */ K(p, {
|
|
3201
3202
|
size: r,
|
|
@@ -3222,7 +3223,7 @@ function ar({ tag: e, onDelete: t, onClick: n, chipSize: r = "medium", disabled:
|
|
|
3222
3223
|
}
|
|
3223
3224
|
//#endregion
|
|
3224
3225
|
//#region src/components/tag-selection/TagSelectionSelectedTags.tsx
|
|
3225
|
-
function
|
|
3226
|
+
function sr({ selectedTags: e, translation: t, onTagDelete: n, showSelectedTagsLabel: r, chipSize: i = "medium", disabled: a = !1, maxVisibleChips: o, popoverPlacement: s = "bottom" }) {
|
|
3226
3227
|
let [l, d] = c(null), f = o === void 0 ? e : e.slice(0, o), m = o === void 0 ? [] : e.slice(o), h = !!l && m.length > 0, g = s === "top" ? {
|
|
3227
3228
|
vertical: "top",
|
|
3228
3229
|
horizontal: "left"
|
|
@@ -3252,7 +3253,7 @@ function or({ selectedTags: e, translation: t, onTagDelete: n, showSelectedTagsL
|
|
|
3252
3253
|
flexWrap: "wrap",
|
|
3253
3254
|
gap: 1
|
|
3254
3255
|
},
|
|
3255
|
-
children: [f.map((e) => /* @__PURE__ */ K(
|
|
3256
|
+
children: [f.map((e) => /* @__PURE__ */ K(or, {
|
|
3256
3257
|
tag: e,
|
|
3257
3258
|
onDelete: n,
|
|
3258
3259
|
chipSize: i,
|
|
@@ -3277,7 +3278,7 @@ function or({ selectedTags: e, translation: t, onTagDelete: n, showSelectedTagsL
|
|
|
3277
3278
|
gap: .5,
|
|
3278
3279
|
maxWidth: 320
|
|
3279
3280
|
},
|
|
3280
|
-
children: m.map((e) => /* @__PURE__ */ K(
|
|
3281
|
+
children: m.map((e) => /* @__PURE__ */ K(or, {
|
|
3281
3282
|
tag: e,
|
|
3282
3283
|
onDelete: a ? void 0 : n,
|
|
3283
3284
|
chipSize: i,
|
|
@@ -3290,7 +3291,7 @@ function or({ selectedTags: e, translation: t, onTagDelete: n, showSelectedTagsL
|
|
|
3290
3291
|
}
|
|
3291
3292
|
//#endregion
|
|
3292
3293
|
//#region src/components/tag-selection/TagSelection.types.ts
|
|
3293
|
-
var
|
|
3294
|
+
var cr = {
|
|
3294
3295
|
selectedTagsLabel: "Selected tags",
|
|
3295
3296
|
autoCompleteLabel: "Search and add tags",
|
|
3296
3297
|
noSelectedTagsText: "No tags selected.",
|
|
@@ -3298,14 +3299,14 @@ var sr = {
|
|
|
3298
3299
|
placeholder: "Type to search...",
|
|
3299
3300
|
loadingText: "Loading...",
|
|
3300
3301
|
maxTagsReachedText: "Maximum number of tags reached."
|
|
3301
|
-
},
|
|
3302
|
-
function
|
|
3303
|
-
let t = n(
|
|
3302
|
+
}, lr = e(null);
|
|
3303
|
+
function ur(e) {
|
|
3304
|
+
let t = n(lr);
|
|
3304
3305
|
if (!t) throw Error("TagSelectionStoreContext is missing.");
|
|
3305
3306
|
return Te(t, e);
|
|
3306
3307
|
}
|
|
3307
|
-
function
|
|
3308
|
-
let S =
|
|
3308
|
+
function dr({ tags: e, showSelectedTags: t = !0, showSelectedTagsLabel: n = !0, showAutoComplete: i = !0, inputSize: a = "medium", chipSize: s = "small", disabled: c = !1, loading: l = !1, maxTags: d, allowCreate: f = !1, maxVisibleChips: p, popoverPlacement: m = "bottom", listboxMaxHeight: h, translation: g, onTagSelect: _, onTagDelete: v, onTagsChange: y, onSearchChange: b, onTagCreate: x }) {
|
|
3309
|
+
let S = ur((e) => e.tags), C = ur((e) => e.searchValue), w = ur((e) => e.setTags), T = ur((e) => e.setSearchValue), E = ur((e) => e.selectTag), D = ur((e) => e.deleteTag), O = ur((e) => e.addTag);
|
|
3309
3310
|
r(() => {
|
|
3310
3311
|
w(e);
|
|
3311
3312
|
}, [e, w]);
|
|
@@ -3314,7 +3315,7 @@ function ur({ tags: e, showSelectedTags: t = !0, showSelectedTagsLabel: n = !0,
|
|
|
3314
3315
|
};
|
|
3315
3316
|
return /* @__PURE__ */ K(u, {
|
|
3316
3317
|
sx: { width: "100%" },
|
|
3317
|
-
children: /* @__PURE__ */ q(P, { children: [t && /* @__PURE__ */ K(
|
|
3318
|
+
children: /* @__PURE__ */ q(P, { children: [t && /* @__PURE__ */ K(sr, {
|
|
3318
3319
|
selectedTags: k,
|
|
3319
3320
|
translation: g,
|
|
3320
3321
|
onTagDelete: (e) => {
|
|
@@ -3330,7 +3331,7 @@ function ur({ tags: e, showSelectedTags: t = !0, showSelectedTagsLabel: n = !0,
|
|
|
3330
3331
|
disabled: c,
|
|
3331
3332
|
maxVisibleChips: p,
|
|
3332
3333
|
popoverPlacement: m
|
|
3333
|
-
}), i && /* @__PURE__ */ K(
|
|
3334
|
+
}), i && /* @__PURE__ */ K(ar, {
|
|
3334
3335
|
availableTags: A,
|
|
3335
3336
|
searchValue: C,
|
|
3336
3337
|
translation: g,
|
|
@@ -3367,14 +3368,14 @@ function ur({ tags: e, showSelectedTags: t = !0, showSelectedTagsLabel: n = !0,
|
|
|
3367
3368
|
})] })
|
|
3368
3369
|
});
|
|
3369
3370
|
}
|
|
3370
|
-
function
|
|
3371
|
+
function fr({ tags: e, showSelectedTags: t = !0, showSelectedTagsLabel: n = !0, showAutoComplete: r = !0, translation: i, inputSize: a = "medium", chipSize: o = "small", disabled: s = !1, loading: l = !1, maxTags: u, allowCreate: d = !1, maxVisibleChips: f, popoverPlacement: p = "bottom", listboxMaxHeight: m, onTagSelect: h, onTagDelete: g, onTagsChange: _, onSearchChange: v, onTagCreate: y }) {
|
|
3371
3372
|
let b = {
|
|
3372
|
-
...
|
|
3373
|
+
...cr,
|
|
3373
3374
|
...i
|
|
3374
|
-
}, [x] = c(() =>
|
|
3375
|
-
return /* @__PURE__ */ K(
|
|
3375
|
+
}, [x] = c(() => rr(e));
|
|
3376
|
+
return /* @__PURE__ */ K(lr.Provider, {
|
|
3376
3377
|
value: x,
|
|
3377
|
-
children: /* @__PURE__ */ K(
|
|
3378
|
+
children: /* @__PURE__ */ K(dr, {
|
|
3378
3379
|
tags: e,
|
|
3379
3380
|
showSelectedTags: t,
|
|
3380
3381
|
showSelectedTagsLabel: n,
|
|
@@ -3399,7 +3400,7 @@ function dr({ tags: e, showSelectedTags: t = !0, showSelectedTagsLabel: n = !0,
|
|
|
3399
3400
|
}
|
|
3400
3401
|
//#endregion
|
|
3401
3402
|
//#region src/components/rich-text-editor/RichTextEditor.types.ts
|
|
3402
|
-
var
|
|
3403
|
+
var pr = {
|
|
3403
3404
|
showBold: !0,
|
|
3404
3405
|
showItalic: !0,
|
|
3405
3406
|
showUnderline: !0,
|
|
@@ -3421,7 +3422,7 @@ var fr = {
|
|
|
3421
3422
|
showTableButton: !1,
|
|
3422
3423
|
showImageButton: !1,
|
|
3423
3424
|
showEmojiButton: !1
|
|
3424
|
-
},
|
|
3425
|
+
}, mr = {
|
|
3425
3426
|
bold: "Bold",
|
|
3426
3427
|
italic: "Italic",
|
|
3427
3428
|
underline: "Underline",
|
|
@@ -3472,7 +3473,7 @@ var fr = {
|
|
|
3472
3473
|
};
|
|
3473
3474
|
//#endregion
|
|
3474
3475
|
//#region src/components/rich-text-editor/RichTextEditorContent.tsx
|
|
3475
|
-
function
|
|
3476
|
+
function hr({ editor: e, error: t, disabled: n, readonly: r }) {
|
|
3476
3477
|
return /* @__PURE__ */ K(u, {
|
|
3477
3478
|
sx: {
|
|
3478
3479
|
flex: 1,
|
|
@@ -3597,7 +3598,7 @@ function mr({ editor: e, error: t, disabled: n, readonly: r }) {
|
|
|
3597
3598
|
}
|
|
3598
3599
|
//#endregion
|
|
3599
3600
|
//#region src/components/rich-text-editor/RichTextEditorLinkDialog.tsx
|
|
3600
|
-
function
|
|
3601
|
+
function gr({ open: e, onClose: t, editor: n, translation: i }) {
|
|
3601
3602
|
let [a, o] = c("");
|
|
3602
3603
|
r(() => {
|
|
3603
3604
|
if (e) {
|
|
@@ -3663,7 +3664,7 @@ function hr({ open: e, onClose: t, editor: n, translation: i }) {
|
|
|
3663
3664
|
}
|
|
3664
3665
|
//#endregion
|
|
3665
3666
|
//#region src/components/rich-text-editor/RichTextEditorColorPicker.tsx
|
|
3666
|
-
var
|
|
3667
|
+
var _r = [
|
|
3667
3668
|
"#000000",
|
|
3668
3669
|
"#434343",
|
|
3669
3670
|
"#666666",
|
|
@@ -3682,7 +3683,7 @@ var gr = [
|
|
|
3682
3683
|
"#8a2be2",
|
|
3683
3684
|
"#ff1493",
|
|
3684
3685
|
"#a52a2a"
|
|
3685
|
-
],
|
|
3686
|
+
], vr = [
|
|
3686
3687
|
"#ffff00",
|
|
3687
3688
|
"#ffd700",
|
|
3688
3689
|
"#ffa500",
|
|
@@ -3702,7 +3703,7 @@ var gr = [
|
|
|
3702
3703
|
"#ffffff",
|
|
3703
3704
|
"#000000"
|
|
3704
3705
|
];
|
|
3705
|
-
function
|
|
3706
|
+
function yr({ color: e, active: t, onClick: n }) {
|
|
3706
3707
|
return /* @__PURE__ */ K(R, {
|
|
3707
3708
|
title: e,
|
|
3708
3709
|
placement: "top",
|
|
@@ -3744,8 +3745,8 @@ function vr({ color: e, active: t, onClick: n }) {
|
|
|
3744
3745
|
})
|
|
3745
3746
|
});
|
|
3746
3747
|
}
|
|
3747
|
-
function
|
|
3748
|
-
let l = s(null), d = r === "highlight" ?
|
|
3748
|
+
function br({ anchorEl: e, open: t, onClose: n, mode: r, activeColor: i, onSelectColor: a, onRemoveColor: o, removeLabel: c }) {
|
|
3749
|
+
let l = s(null), d = r === "highlight" ? vr : _r;
|
|
3749
3750
|
function f(e) {
|
|
3750
3751
|
a(e.target.value);
|
|
3751
3752
|
}
|
|
@@ -3769,7 +3770,7 @@ function yr({ anchorEl: e, open: t, onClose: n, mode: r, activeColor: i, onSelec
|
|
|
3769
3770
|
gap: .5,
|
|
3770
3771
|
mb: 1
|
|
3771
3772
|
},
|
|
3772
|
-
children: d.map((e) => /* @__PURE__ */ K(
|
|
3773
|
+
children: d.map((e) => /* @__PURE__ */ K(yr, {
|
|
3773
3774
|
color: e,
|
|
3774
3775
|
active: i?.toLowerCase() === e.toLowerCase(),
|
|
3775
3776
|
onClick: (e) => {
|
|
@@ -3839,7 +3840,7 @@ function yr({ anchorEl: e, open: t, onClose: n, mode: r, activeColor: i, onSelec
|
|
|
3839
3840
|
}
|
|
3840
3841
|
//#endregion
|
|
3841
3842
|
//#region src/components/rich-text-editor/RichTextEditorTableMenu.tsx
|
|
3842
|
-
function
|
|
3843
|
+
function xr({ editor: e, translation: t, disabled: n }) {
|
|
3843
3844
|
let [r, i] = c(null), a = n || !e, o = e?.isActive("table") ?? !1;
|
|
3844
3845
|
function s() {
|
|
3845
3846
|
i(null);
|
|
@@ -3929,7 +3930,7 @@ function br({ editor: e, translation: t, disabled: n }) {
|
|
|
3929
3930
|
}
|
|
3930
3931
|
//#endregion
|
|
3931
3932
|
//#region src/components/rich-text-editor/RichTextEditorImageDialog.tsx
|
|
3932
|
-
function
|
|
3933
|
+
function Sr({ open: e, onClose: t, editor: n, translation: r }) {
|
|
3933
3934
|
let [i, a] = c(""), [o, s] = c("");
|
|
3934
3935
|
function l() {
|
|
3935
3936
|
let e = i.trim();
|
|
@@ -3999,7 +4000,7 @@ function xr({ open: e, onClose: t, editor: n, translation: r }) {
|
|
|
3999
4000
|
}
|
|
4000
4001
|
//#endregion
|
|
4001
4002
|
//#region src/components/rich-text-editor/util/emojis.ts
|
|
4002
|
-
var
|
|
4003
|
+
var Cr = [
|
|
4003
4004
|
{
|
|
4004
4005
|
label: "Smileys",
|
|
4005
4006
|
emojis: [
|
|
@@ -4737,13 +4738,13 @@ var Sr = [
|
|
|
4737
4738
|
];
|
|
4738
4739
|
//#endregion
|
|
4739
4740
|
//#region src/components/rich-text-editor/RichTextEditorEmojiPicker.tsx
|
|
4740
|
-
function
|
|
4741
|
+
function wr({ anchorEl: e, open: t, onClose: n, onSelect: r, translation: i }) {
|
|
4741
4742
|
let [a, s] = c(""), l = o(() => {
|
|
4742
4743
|
let e = a.trim().toLowerCase();
|
|
4743
|
-
return e ?
|
|
4744
|
+
return e ? Cr.map((t) => ({
|
|
4744
4745
|
...t,
|
|
4745
4746
|
emojis: t.emojis.filter((t) => t.name.includes(e) || t.emoji === e)
|
|
4746
|
-
})).filter((e) => e.emojis.length > 0) :
|
|
4747
|
+
})).filter((e) => e.emojis.length > 0) : Cr;
|
|
4747
4748
|
}, [a]);
|
|
4748
4749
|
function d(e) {
|
|
4749
4750
|
r(e), n(), s("");
|
|
@@ -4840,7 +4841,7 @@ function Cr({ anchorEl: e, open: t, onClose: n, onSelect: r, translation: i }) {
|
|
|
4840
4841
|
}
|
|
4841
4842
|
//#endregion
|
|
4842
4843
|
//#region src/components/rich-text-editor/RichTextEditorToolbar.tsx
|
|
4843
|
-
function
|
|
4844
|
+
function Tr({ label: e, icon: t, activeColor: n, disabled: r, onClick: i }) {
|
|
4844
4845
|
return /* @__PURE__ */ K(R, {
|
|
4845
4846
|
title: e,
|
|
4846
4847
|
arrow: !0,
|
|
@@ -4872,7 +4873,7 @@ function wr({ label: e, icon: t, activeColor: n, disabled: r, onClick: i }) {
|
|
|
4872
4873
|
}) })
|
|
4873
4874
|
});
|
|
4874
4875
|
}
|
|
4875
|
-
function
|
|
4876
|
+
function Er({ level: e }) {
|
|
4876
4877
|
return /* @__PURE__ */ q(u, {
|
|
4877
4878
|
component: "span",
|
|
4878
4879
|
sx: {
|
|
@@ -4883,7 +4884,7 @@ function Tr({ level: e }) {
|
|
|
4883
4884
|
children: ["H", e]
|
|
4884
4885
|
});
|
|
4885
4886
|
}
|
|
4886
|
-
function
|
|
4887
|
+
function Dr({ editor: e, toolbarConfig: t, translation: n, disabled: r, isFullscreen: i, onToggleFullscreen: a }) {
|
|
4887
4888
|
let [o, s] = c(!1), [l, d] = c(!1), [f, p] = c(null), [m, h] = c(null), [g, _] = c(null), v = r || !e, b = e?.getAttributes("textStyle")?.color, x = e?.getAttributes("highlight")?.color, S = t.showBold || t.showItalic || t.showUnderline || t.showStrike, w = t.showHeading1 || t.showHeading2 || t.showHeading3, T = t.showBulletList || t.showOrderedList, E = t.showBlockquote || t.showCodeBlock || t.showLink || t.showHorizontalRule, D = t.showTextColor || t.showHighlight, O = t.showUndoRedo || t.showClearFormat, k = t.showTableButton || t.showImageButton || t.showEmojiButton, A = [
|
|
4888
4889
|
S,
|
|
4889
4890
|
w,
|
|
@@ -4919,28 +4920,28 @@ function Er({ editor: e, toolbarConfig: t, translation: n, disabled: r, isFullsc
|
|
|
4919
4920
|
gap: .25
|
|
4920
4921
|
},
|
|
4921
4922
|
children: [
|
|
4922
|
-
t.showBold && /* @__PURE__ */ K(
|
|
4923
|
+
t.showBold && /* @__PURE__ */ K(Q, {
|
|
4923
4924
|
label: n.bold,
|
|
4924
4925
|
icon: /* @__PURE__ */ K($e, { fontSize: "small" }),
|
|
4925
4926
|
onClick: () => e?.chain().focus().toggleBold().run(),
|
|
4926
4927
|
active: e?.isActive("bold"),
|
|
4927
4928
|
disabled: v
|
|
4928
4929
|
}),
|
|
4929
|
-
t.showItalic && /* @__PURE__ */ K(
|
|
4930
|
+
t.showItalic && /* @__PURE__ */ K(Q, {
|
|
4930
4931
|
label: n.italic,
|
|
4931
4932
|
icon: /* @__PURE__ */ K(et, { fontSize: "small" }),
|
|
4932
4933
|
onClick: () => e?.chain().focus().toggleItalic().run(),
|
|
4933
4934
|
active: e?.isActive("italic"),
|
|
4934
4935
|
disabled: v
|
|
4935
4936
|
}),
|
|
4936
|
-
t.showUnderline && /* @__PURE__ */ K(
|
|
4937
|
+
t.showUnderline && /* @__PURE__ */ K(Q, {
|
|
4937
4938
|
label: n.underline,
|
|
4938
4939
|
icon: /* @__PURE__ */ K(tt, { fontSize: "small" }),
|
|
4939
4940
|
onClick: () => e?.chain().focus().toggleUnderline().run(),
|
|
4940
4941
|
active: e?.isActive("underline"),
|
|
4941
4942
|
disabled: v
|
|
4942
4943
|
}),
|
|
4943
|
-
t.showStrike && /* @__PURE__ */ K(
|
|
4944
|
+
t.showStrike && /* @__PURE__ */ K(Q, {
|
|
4944
4945
|
label: n.strike,
|
|
4945
4946
|
icon: /* @__PURE__ */ K(nt, { fontSize: "small" }),
|
|
4946
4947
|
onClick: () => e?.chain().focus().toggleStrike().run(),
|
|
@@ -4956,23 +4957,23 @@ function Er({ editor: e, toolbarConfig: t, translation: n, disabled: r, isFullsc
|
|
|
4956
4957
|
gap: .25
|
|
4957
4958
|
},
|
|
4958
4959
|
children: [
|
|
4959
|
-
t.showHeading1 && /* @__PURE__ */ K(
|
|
4960
|
+
t.showHeading1 && /* @__PURE__ */ K(Q, {
|
|
4960
4961
|
label: n.heading1,
|
|
4961
|
-
icon: /* @__PURE__ */ K(
|
|
4962
|
+
icon: /* @__PURE__ */ K(Er, { level: 1 }),
|
|
4962
4963
|
onClick: () => e?.chain().focus().toggleHeading({ level: 1 }).run(),
|
|
4963
4964
|
active: e?.isActive("heading", { level: 1 }),
|
|
4964
4965
|
disabled: v
|
|
4965
4966
|
}),
|
|
4966
|
-
t.showHeading2 && /* @__PURE__ */ K(
|
|
4967
|
+
t.showHeading2 && /* @__PURE__ */ K(Q, {
|
|
4967
4968
|
label: n.heading2,
|
|
4968
|
-
icon: /* @__PURE__ */ K(
|
|
4969
|
+
icon: /* @__PURE__ */ K(Er, { level: 2 }),
|
|
4969
4970
|
onClick: () => e?.chain().focus().toggleHeading({ level: 2 }).run(),
|
|
4970
4971
|
active: e?.isActive("heading", { level: 2 }),
|
|
4971
4972
|
disabled: v
|
|
4972
4973
|
}),
|
|
4973
|
-
t.showHeading3 && /* @__PURE__ */ K(
|
|
4974
|
+
t.showHeading3 && /* @__PURE__ */ K(Q, {
|
|
4974
4975
|
label: n.heading3,
|
|
4975
|
-
icon: /* @__PURE__ */ K(
|
|
4976
|
+
icon: /* @__PURE__ */ K(Er, { level: 3 }),
|
|
4976
4977
|
onClick: () => e?.chain().focus().toggleHeading({ level: 3 }).run(),
|
|
4977
4978
|
active: e?.isActive("heading", { level: 3 }),
|
|
4978
4979
|
disabled: v
|
|
@@ -4985,13 +4986,13 @@ function Er({ editor: e, toolbarConfig: t, translation: n, disabled: r, isFullsc
|
|
|
4985
4986
|
display: "flex",
|
|
4986
4987
|
gap: .25
|
|
4987
4988
|
},
|
|
4988
|
-
children: [t.showBulletList && /* @__PURE__ */ K(
|
|
4989
|
+
children: [t.showBulletList && /* @__PURE__ */ K(Q, {
|
|
4989
4990
|
label: n.bulletList,
|
|
4990
4991
|
icon: /* @__PURE__ */ K(rt, { fontSize: "small" }),
|
|
4991
4992
|
onClick: () => e?.chain().focus().toggleBulletList().run(),
|
|
4992
4993
|
active: e?.isActive("bulletList"),
|
|
4993
4994
|
disabled: v
|
|
4994
|
-
}), t.showOrderedList && /* @__PURE__ */ K(
|
|
4995
|
+
}), t.showOrderedList && /* @__PURE__ */ K(Q, {
|
|
4995
4996
|
label: n.orderedList,
|
|
4996
4997
|
icon: /* @__PURE__ */ K(it, { fontSize: "small" }),
|
|
4997
4998
|
onClick: () => e?.chain().focus().toggleOrderedList().run(),
|
|
@@ -5006,28 +5007,28 @@ function Er({ editor: e, toolbarConfig: t, translation: n, disabled: r, isFullsc
|
|
|
5006
5007
|
gap: .25
|
|
5007
5008
|
},
|
|
5008
5009
|
children: [
|
|
5009
|
-
t.showBlockquote && /* @__PURE__ */ K(
|
|
5010
|
+
t.showBlockquote && /* @__PURE__ */ K(Q, {
|
|
5010
5011
|
label: n.blockquote,
|
|
5011
5012
|
icon: /* @__PURE__ */ K(at, { fontSize: "small" }),
|
|
5012
5013
|
onClick: () => e?.chain().focus().toggleBlockquote().run(),
|
|
5013
5014
|
active: e?.isActive("blockquote"),
|
|
5014
5015
|
disabled: v
|
|
5015
5016
|
}),
|
|
5016
|
-
t.showCodeBlock && /* @__PURE__ */ K(
|
|
5017
|
+
t.showCodeBlock && /* @__PURE__ */ K(Q, {
|
|
5017
5018
|
label: n.codeBlock,
|
|
5018
5019
|
icon: /* @__PURE__ */ K(ot, { fontSize: "small" }),
|
|
5019
5020
|
onClick: () => e?.chain().focus().toggleCodeBlock().run(),
|
|
5020
5021
|
active: e?.isActive("codeBlock"),
|
|
5021
5022
|
disabled: v
|
|
5022
5023
|
}),
|
|
5023
|
-
t.showLink && /* @__PURE__ */ K(
|
|
5024
|
+
t.showLink && /* @__PURE__ */ K(Q, {
|
|
5024
5025
|
label: n.link,
|
|
5025
5026
|
icon: /* @__PURE__ */ K(st, { fontSize: "small" }),
|
|
5026
5027
|
onClick: () => s(!0),
|
|
5027
5028
|
active: e?.isActive("link"),
|
|
5028
5029
|
disabled: v
|
|
5029
5030
|
}),
|
|
5030
|
-
t.showHorizontalRule && /* @__PURE__ */ K(
|
|
5031
|
+
t.showHorizontalRule && /* @__PURE__ */ K(Q, {
|
|
5031
5032
|
label: n.horizontalRule,
|
|
5032
5033
|
icon: /* @__PURE__ */ K(ct, { fontSize: "small" }),
|
|
5033
5034
|
onClick: () => e?.chain().focus().setHorizontalRule().run(),
|
|
@@ -5041,13 +5042,13 @@ function Er({ editor: e, toolbarConfig: t, translation: n, disabled: r, isFullsc
|
|
|
5041
5042
|
display: "flex",
|
|
5042
5043
|
gap: .25
|
|
5043
5044
|
},
|
|
5044
|
-
children: [t.showTextColor && /* @__PURE__ */ K(
|
|
5045
|
+
children: [t.showTextColor && /* @__PURE__ */ K(Tr, {
|
|
5045
5046
|
label: n.textColor,
|
|
5046
5047
|
icon: /* @__PURE__ */ K(lt, { fontSize: "small" }),
|
|
5047
5048
|
activeColor: b,
|
|
5048
5049
|
disabled: v,
|
|
5049
5050
|
onClick: (e) => h(e.currentTarget)
|
|
5050
|
-
}), t.showHighlight && /* @__PURE__ */ K(
|
|
5051
|
+
}), t.showHighlight && /* @__PURE__ */ K(Tr, {
|
|
5051
5052
|
label: n.highlight,
|
|
5052
5053
|
icon: /* @__PURE__ */ K(ut, { fontSize: "small" }),
|
|
5053
5054
|
activeColor: x,
|
|
@@ -5061,17 +5062,17 @@ function Er({ editor: e, toolbarConfig: t, translation: n, disabled: r, isFullsc
|
|
|
5061
5062
|
display: "flex",
|
|
5062
5063
|
gap: .25
|
|
5063
5064
|
},
|
|
5064
|
-
children: [t.showUndoRedo && /* @__PURE__ */ q(G, { children: [/* @__PURE__ */ K(
|
|
5065
|
+
children: [t.showUndoRedo && /* @__PURE__ */ q(G, { children: [/* @__PURE__ */ K(Q, {
|
|
5065
5066
|
label: n.undo,
|
|
5066
5067
|
icon: /* @__PURE__ */ K(xe, { fontSize: "small" }),
|
|
5067
5068
|
onClick: () => e?.chain().focus().undo().run(),
|
|
5068
5069
|
disabled: v || !e?.can().undo()
|
|
5069
|
-
}), /* @__PURE__ */ K(
|
|
5070
|
+
}), /* @__PURE__ */ K(Q, {
|
|
5070
5071
|
label: n.redo,
|
|
5071
5072
|
icon: /* @__PURE__ */ K(Se, { fontSize: "small" }),
|
|
5072
5073
|
onClick: () => e?.chain().focus().redo().run(),
|
|
5073
5074
|
disabled: v || !e?.can().redo()
|
|
5074
|
-
})] }), t.showClearFormat && /* @__PURE__ */ K(
|
|
5075
|
+
})] }), t.showClearFormat && /* @__PURE__ */ K(Q, {
|
|
5075
5076
|
label: n.clearFormat,
|
|
5076
5077
|
icon: /* @__PURE__ */ K(dt, { fontSize: "small" }),
|
|
5077
5078
|
onClick: () => e?.chain().focus().clearNodes().unsetAllMarks().run(),
|
|
@@ -5085,12 +5086,12 @@ function Er({ editor: e, toolbarConfig: t, translation: n, disabled: r, isFullsc
|
|
|
5085
5086
|
gap: .25
|
|
5086
5087
|
},
|
|
5087
5088
|
children: [
|
|
5088
|
-
t.showTableButton && /* @__PURE__ */ K(
|
|
5089
|
+
t.showTableButton && /* @__PURE__ */ K(xr, {
|
|
5089
5090
|
editor: e,
|
|
5090
5091
|
translation: n,
|
|
5091
5092
|
disabled: v
|
|
5092
5093
|
}),
|
|
5093
|
-
t.showImageButton && /* @__PURE__ */ K(
|
|
5094
|
+
t.showImageButton && /* @__PURE__ */ K(Q, {
|
|
5094
5095
|
label: n.image,
|
|
5095
5096
|
icon: /* @__PURE__ */ K(Ze, { fontSize: "small" }),
|
|
5096
5097
|
onClick: () => d(!0),
|
|
@@ -5130,13 +5131,13 @@ function Er({ editor: e, toolbarConfig: t, translation: n, disabled: r, isFullsc
|
|
|
5130
5131
|
})
|
|
5131
5132
|
]
|
|
5132
5133
|
}),
|
|
5133
|
-
t.showLink && e && /* @__PURE__ */ K(
|
|
5134
|
+
t.showLink && e && /* @__PURE__ */ K(gr, {
|
|
5134
5135
|
open: o,
|
|
5135
5136
|
onClose: () => s(!1),
|
|
5136
5137
|
editor: e,
|
|
5137
5138
|
translation: n
|
|
5138
5139
|
}),
|
|
5139
|
-
t.showTextColor && /* @__PURE__ */ K(
|
|
5140
|
+
t.showTextColor && /* @__PURE__ */ K(br, {
|
|
5140
5141
|
anchorEl: m,
|
|
5141
5142
|
open: !!m,
|
|
5142
5143
|
onClose: () => h(null),
|
|
@@ -5146,7 +5147,7 @@ function Er({ editor: e, toolbarConfig: t, translation: n, disabled: r, isFullsc
|
|
|
5146
5147
|
onRemoveColor: () => e?.chain().focus().unsetColor().run(),
|
|
5147
5148
|
removeLabel: n.removeTextColor
|
|
5148
5149
|
}),
|
|
5149
|
-
t.showHighlight && /* @__PURE__ */ K(
|
|
5150
|
+
t.showHighlight && /* @__PURE__ */ K(br, {
|
|
5150
5151
|
anchorEl: g,
|
|
5151
5152
|
open: !!g,
|
|
5152
5153
|
onClose: () => _(null),
|
|
@@ -5156,13 +5157,13 @@ function Er({ editor: e, toolbarConfig: t, translation: n, disabled: r, isFullsc
|
|
|
5156
5157
|
onRemoveColor: () => e?.chain().focus().unsetHighlight().run(),
|
|
5157
5158
|
removeLabel: n.removeHighlight
|
|
5158
5159
|
}),
|
|
5159
|
-
t.showImageButton && e && /* @__PURE__ */ K(
|
|
5160
|
+
t.showImageButton && e && /* @__PURE__ */ K(Sr, {
|
|
5160
5161
|
open: l,
|
|
5161
5162
|
onClose: () => d(!1),
|
|
5162
5163
|
editor: e,
|
|
5163
5164
|
translation: n
|
|
5164
5165
|
}),
|
|
5165
|
-
t.showEmojiButton && /* @__PURE__ */ K(
|
|
5166
|
+
t.showEmojiButton && /* @__PURE__ */ K(wr, {
|
|
5166
5167
|
anchorEl: f,
|
|
5167
5168
|
open: !!f,
|
|
5168
5169
|
onClose: () => p(null),
|
|
@@ -5173,7 +5174,7 @@ function Er({ editor: e, toolbarConfig: t, translation: n, disabled: r, isFullsc
|
|
|
5173
5174
|
}
|
|
5174
5175
|
//#endregion
|
|
5175
5176
|
//#region src/components/rich-text-editor/RichTextEditorFooter.tsx
|
|
5176
|
-
function
|
|
5177
|
+
function Or({ helperText: e, error: t, showCharacterCount: n, charCount: r, maxCharacters: i, showWordCount: a, wordCount: o, translation: s }) {
|
|
5177
5178
|
let c = i === void 0 ? s.characterCount.replace("{count}", String(r)) : s.characterCountMax.replace("{count}", String(r)).replace("{max}", String(i)), l = i !== void 0 && r >= i ? "error" : "text.secondary", d = s.wordCount.replace("{count}", String(o));
|
|
5178
5179
|
return /* @__PURE__ */ q(u, {
|
|
5179
5180
|
sx: {
|
|
@@ -5203,12 +5204,12 @@ function Dr({ helperText: e, error: t, showCharacterCount: n, charCount: r, maxC
|
|
|
5203
5204
|
}
|
|
5204
5205
|
//#endregion
|
|
5205
5206
|
//#region src/components/rich-text-editor/RichTextEditor.tsx
|
|
5206
|
-
function
|
|
5207
|
+
function kr({ disabled: e = !1, error: t = !1, height: n, helperText: i, maxCharacters: a, name: o, placeholder: s, readonly: l = !1, showCharacterCount: d = !1, showToolbar: f = !0, showWordCount: p = !1, toolbarConfig: m, translation: h, value: g, width: _, onBlur: v, onChange: b, onFocus: x }) {
|
|
5207
5208
|
let S = {
|
|
5208
|
-
...
|
|
5209
|
+
...mr,
|
|
5209
5210
|
...h
|
|
5210
5211
|
}, C = {
|
|
5211
|
-
...
|
|
5212
|
+
...pr,
|
|
5212
5213
|
...m
|
|
5213
5214
|
}, [w, T] = c(!1), E = Rt(n), D = Rt(_), O = E === "auto", k = O ? void 0 : E ?? 200, A = a !== void 0 && a > 0 || d || p, M = ze({
|
|
5214
5215
|
shouldRerenderOnTransaction: !0,
|
|
@@ -5285,21 +5286,21 @@ function Or({ disabled: e = !1, error: t = !1, height: n, helperText: i, maxChar
|
|
|
5285
5286
|
borderWidth: 2
|
|
5286
5287
|
}
|
|
5287
5288
|
},
|
|
5288
|
-
children: [f && !l && /* @__PURE__ */ q(G, { children: [/* @__PURE__ */ K(
|
|
5289
|
+
children: [f && !l && /* @__PURE__ */ q(G, { children: [/* @__PURE__ */ K(Dr, {
|
|
5289
5290
|
editor: M,
|
|
5290
5291
|
toolbarConfig: C,
|
|
5291
5292
|
translation: S,
|
|
5292
5293
|
disabled: e,
|
|
5293
5294
|
isFullscreen: w,
|
|
5294
5295
|
onToggleFullscreen: () => T((e) => !e)
|
|
5295
|
-
}), /* @__PURE__ */ K(y, {})] }), /* @__PURE__ */ K(
|
|
5296
|
+
}), /* @__PURE__ */ K(y, {})] }), /* @__PURE__ */ K(hr, {
|
|
5296
5297
|
editor: M,
|
|
5297
5298
|
error: t,
|
|
5298
5299
|
disabled: e,
|
|
5299
5300
|
readonly: l
|
|
5300
5301
|
})]
|
|
5301
5302
|
}),
|
|
5302
|
-
F && /* @__PURE__ */ K(
|
|
5303
|
+
F && /* @__PURE__ */ K(Or, {
|
|
5303
5304
|
helperText: i,
|
|
5304
5305
|
error: t,
|
|
5305
5306
|
showCharacterCount: d || a !== void 0 && a > 0,
|
|
@@ -5319,13 +5320,13 @@ function Or({ disabled: e = !1, error: t = !1, height: n, helperText: i, maxChar
|
|
|
5319
5320
|
}
|
|
5320
5321
|
//#endregion
|
|
5321
5322
|
//#region src/components/sql-editor/SqlEditor.types.ts
|
|
5322
|
-
var
|
|
5323
|
+
var Ar = {
|
|
5323
5324
|
showFormat: !0,
|
|
5324
5325
|
showCopy: !0,
|
|
5325
5326
|
showClear: !0,
|
|
5326
5327
|
showExecute: !1,
|
|
5327
5328
|
showUndoRedo: !0
|
|
5328
|
-
},
|
|
5329
|
+
}, jr = {
|
|
5329
5330
|
format: "Format SQL",
|
|
5330
5331
|
copy: "Copy",
|
|
5331
5332
|
copySuccess: "Copied!",
|
|
@@ -5335,15 +5336,15 @@ var kr = {
|
|
|
5335
5336
|
redo: "Redo",
|
|
5336
5337
|
lineColumn: "Ln {line}, Col {col}",
|
|
5337
5338
|
errorCount: "{count} error(s)"
|
|
5338
|
-
},
|
|
5339
|
+
}, Mr = {
|
|
5339
5340
|
standard: yt,
|
|
5340
5341
|
mysql: gt,
|
|
5341
5342
|
postgresql: _t,
|
|
5342
5343
|
sqlite: vt,
|
|
5343
5344
|
mssql: ht
|
|
5344
5345
|
};
|
|
5345
|
-
function
|
|
5346
|
-
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
|
|
5346
|
+
function Nr({ value: e, onChange: t, placeholder: n, disabled: i = !1, readonly: a = !1, showLineNumbers: o = !0, dialect: c = "standard", keywordColor: l, stringColor: d, identifierColor: f, schema: p, onExecute: m, onLint: h, onDiagnosticsChange: g, onViewReady: _, onCursorChange: v, onBlur: y, onFocus: b }) {
|
|
5347
|
+
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 ie()), M = s(new ie()), N = B(), P = N.palette.mode === "dark", F = !!h, I = JSON.stringify(p);
|
|
5347
5348
|
return r(() => {
|
|
5348
5349
|
C.current = t;
|
|
5349
5350
|
}, [t]), r(() => {
|
|
@@ -5486,29 +5487,29 @@ function Mr({ value: e, onChange: t, placeholder: n, disabled: i = !1, readonly:
|
|
|
5486
5487
|
} catch {
|
|
5487
5488
|
return [];
|
|
5488
5489
|
}
|
|
5489
|
-
}, v =
|
|
5490
|
+
}, v = te.of([{
|
|
5490
5491
|
key: "Mod-Enter",
|
|
5491
5492
|
run: (e) => (O.current?.(e.state.doc.toString()), !0)
|
|
5492
5493
|
}]), y = [
|
|
5493
5494
|
h,
|
|
5494
5495
|
me(m),
|
|
5495
5496
|
bt({
|
|
5496
|
-
dialect:
|
|
5497
|
+
dialect: Mr[c],
|
|
5497
5498
|
schema: g
|
|
5498
5499
|
}),
|
|
5499
5500
|
le(),
|
|
5500
5501
|
xt(),
|
|
5501
5502
|
v,
|
|
5502
|
-
|
|
5503
|
+
te.of([
|
|
5503
5504
|
...ce,
|
|
5504
5505
|
...ue,
|
|
5505
5506
|
...St
|
|
5506
5507
|
]),
|
|
5507
5508
|
j.current.of(J.editable.of(!i && !a)),
|
|
5508
5509
|
M.current.of(ae.readOnly.of(a)),
|
|
5509
|
-
|
|
5510
|
-
...o ? [
|
|
5511
|
-
...n ? [
|
|
5510
|
+
Y(),
|
|
5511
|
+
...o ? [ne(), ee()] : [],
|
|
5512
|
+
...n ? [re(n)] : [],
|
|
5512
5513
|
...F ? [he(), ge(_, { delay: 600 })] : [],
|
|
5513
5514
|
J.updateListener.of((e) => {
|
|
5514
5515
|
e.docChanged && C.current?.(e.state.doc.toString());
|
|
@@ -5571,14 +5572,14 @@ function Mr({ value: e, onChange: t, placeholder: n, disabled: i = !1, readonly:
|
|
|
5571
5572
|
}
|
|
5572
5573
|
//#endregion
|
|
5573
5574
|
//#region src/components/sql-editor/SqlEditorToolbar.tsx
|
|
5574
|
-
var
|
|
5575
|
+
var Pr = {
|
|
5575
5576
|
standard: "sql",
|
|
5576
5577
|
mysql: "mysql",
|
|
5577
5578
|
postgresql: "postgresql",
|
|
5578
5579
|
sqlite: "sqlite",
|
|
5579
5580
|
mssql: "tsql"
|
|
5580
5581
|
};
|
|
5581
|
-
function
|
|
5582
|
+
function Fr({ editorView: e, toolbarConfig: t, translation: n, dialect: r, disabled: i, onExecute: a }) {
|
|
5582
5583
|
let [o, s] = c(!1), l = i || !e;
|
|
5583
5584
|
function d() {
|
|
5584
5585
|
let t = e?.state.doc.toString() ?? "";
|
|
@@ -5607,7 +5608,7 @@ function Pr({ editorView: e, toolbarConfig: t, translation: n, dialect: r, disab
|
|
|
5607
5608
|
if (!t) return;
|
|
5608
5609
|
let n = t.state.doc.toString();
|
|
5609
5610
|
try {
|
|
5610
|
-
let e = wt(n, { language:
|
|
5611
|
+
let e = wt(n, { language: Pr[r] });
|
|
5611
5612
|
t.dispatch({ changes: {
|
|
5612
5613
|
from: 0,
|
|
5613
5614
|
to: t.state.doc.length,
|
|
@@ -5638,7 +5639,7 @@ function Pr({ editorView: e, toolbarConfig: t, translation: n, dialect: r, disab
|
|
|
5638
5639
|
display: "flex",
|
|
5639
5640
|
gap: .25
|
|
5640
5641
|
},
|
|
5641
|
-
children: /* @__PURE__ */ K(
|
|
5642
|
+
children: /* @__PURE__ */ K(Q, {
|
|
5642
5643
|
label: n.format,
|
|
5643
5644
|
icon: /* @__PURE__ */ K(Ce, { fontSize: "small" }),
|
|
5644
5645
|
onClick: h,
|
|
@@ -5655,7 +5656,7 @@ function Pr({ editorView: e, toolbarConfig: t, translation: n, dialect: r, disab
|
|
|
5655
5656
|
display: "flex",
|
|
5656
5657
|
gap: .25
|
|
5657
5658
|
},
|
|
5658
|
-
children: [t.showCopy && /* @__PURE__ */ K(
|
|
5659
|
+
children: [t.showCopy && /* @__PURE__ */ K(Q, {
|
|
5659
5660
|
label: o ? n.copySuccess : n.copy,
|
|
5660
5661
|
icon: o ? /* @__PURE__ */ K(ye, {
|
|
5661
5662
|
fontSize: "small",
|
|
@@ -5663,7 +5664,7 @@ function Pr({ editorView: e, toolbarConfig: t, translation: n, dialect: r, disab
|
|
|
5663
5664
|
}) : /* @__PURE__ */ K(ve, { fontSize: "small" }),
|
|
5664
5665
|
onClick: d,
|
|
5665
5666
|
disabled: l
|
|
5666
|
-
}), t.showClear && /* @__PURE__ */ K(
|
|
5667
|
+
}), t.showClear && /* @__PURE__ */ K(Q, {
|
|
5667
5668
|
label: n.clear,
|
|
5668
5669
|
icon: /* @__PURE__ */ K(be, { fontSize: "small" }),
|
|
5669
5670
|
onClick: f,
|
|
@@ -5680,12 +5681,12 @@ function Pr({ editorView: e, toolbarConfig: t, translation: n, dialect: r, disab
|
|
|
5680
5681
|
display: "flex",
|
|
5681
5682
|
gap: .25
|
|
5682
5683
|
},
|
|
5683
|
-
children: [/* @__PURE__ */ K(
|
|
5684
|
+
children: [/* @__PURE__ */ K(Q, {
|
|
5684
5685
|
label: n.undo,
|
|
5685
5686
|
icon: /* @__PURE__ */ K(xe, { fontSize: "small" }),
|
|
5686
5687
|
onClick: p,
|
|
5687
5688
|
disabled: l
|
|
5688
|
-
}), /* @__PURE__ */ K(
|
|
5689
|
+
}), /* @__PURE__ */ K(Q, {
|
|
5689
5690
|
label: n.redo,
|
|
5690
5691
|
icon: /* @__PURE__ */ K(Se, { fontSize: "small" }),
|
|
5691
5692
|
onClick: m,
|
|
@@ -5696,7 +5697,7 @@ function Pr({ editorView: e, toolbarConfig: t, translation: n, dialect: r, disab
|
|
|
5696
5697
|
orientation: "vertical",
|
|
5697
5698
|
flexItem: !0,
|
|
5698
5699
|
sx: { mx: .5 }
|
|
5699
|
-
}), /* @__PURE__ */ K(
|
|
5700
|
+
}), /* @__PURE__ */ K(Q, {
|
|
5700
5701
|
label: n.execute,
|
|
5701
5702
|
icon: /* @__PURE__ */ K(Ct, { fontSize: "small" }),
|
|
5702
5703
|
onClick: g,
|
|
@@ -5708,7 +5709,7 @@ function Pr({ editorView: e, toolbarConfig: t, translation: n, dialect: r, disab
|
|
|
5708
5709
|
}
|
|
5709
5710
|
//#endregion
|
|
5710
5711
|
//#region src/components/sql-editor/SqlEditorFooter.tsx
|
|
5711
|
-
function
|
|
5712
|
+
function Ir({ helperText: e, error: t, showLineColumn: n, showErrorCount: r, diagnosticsCount: i, cursorLine: a, cursorCol: o, translation: s }) {
|
|
5712
5713
|
let c = s.lineColumn.replace("{line}", String(a)).replace("{col}", String(o)), l = s.errorCount.replace("{count}", String(i));
|
|
5713
5714
|
return /* @__PURE__ */ q(u, {
|
|
5714
5715
|
sx: {
|
|
@@ -5749,12 +5750,12 @@ function Fr({ helperText: e, error: t, showLineColumn: n, showErrorCount: r, dia
|
|
|
5749
5750
|
}
|
|
5750
5751
|
//#endregion
|
|
5751
5752
|
//#region src/components/sql-editor/SqlEditor.tsx
|
|
5752
|
-
function
|
|
5753
|
+
function Lr({ value: e, onChange: n, placeholder: r, height: i, width: a, disabled: o = !1, readonly: l = !1, error: d = !1, helperText: f, name: p, dialect: m = "standard", showLineNumbers: h = !0, showLineColumn: g = !0, showErrorCount: _ = !1, toolbarConfig: v, translation: b, highlightColors: x, schema: S, onExecute: C, onLint: w, onBlur: T, onFocus: E }) {
|
|
5753
5754
|
let D = {
|
|
5754
|
-
...
|
|
5755
|
+
...jr,
|
|
5755
5756
|
...b
|
|
5756
5757
|
}, O = {
|
|
5757
|
-
...
|
|
5758
|
+
...Ar,
|
|
5758
5759
|
...v
|
|
5759
5760
|
}, k = Rt(i), A = Rt(a), M = k === "auto", N = M ? void 0 : k ?? 300, P = s(null), [F, I] = c(null), [L, R] = c({
|
|
5760
5761
|
line: 1,
|
|
@@ -5792,14 +5793,14 @@ function Ir({ value: e, onChange: n, placeholder: r, height: i, width: a, disabl
|
|
|
5792
5793
|
borderWidth: 2
|
|
5793
5794
|
}
|
|
5794
5795
|
},
|
|
5795
|
-
children: [!l && /* @__PURE__ */ q(G, { children: [/* @__PURE__ */ K(
|
|
5796
|
+
children: [!l && /* @__PURE__ */ q(G, { children: [/* @__PURE__ */ K(Fr, {
|
|
5796
5797
|
editorView: F,
|
|
5797
5798
|
toolbarConfig: O,
|
|
5798
5799
|
translation: D,
|
|
5799
5800
|
dialect: m,
|
|
5800
5801
|
disabled: o,
|
|
5801
5802
|
onExecute: C
|
|
5802
|
-
}), /* @__PURE__ */ K(y, {})] }), /* @__PURE__ */ K(
|
|
5803
|
+
}), /* @__PURE__ */ K(y, {})] }), /* @__PURE__ */ K(Nr, {
|
|
5803
5804
|
value: e,
|
|
5804
5805
|
onChange: n,
|
|
5805
5806
|
placeholder: r,
|
|
@@ -5820,7 +5821,7 @@ function Ir({ value: e, onChange: n, placeholder: r, height: i, width: a, disabl
|
|
|
5820
5821
|
onFocus: E
|
|
5821
5822
|
})]
|
|
5822
5823
|
}),
|
|
5823
|
-
W && /* @__PURE__ */ K(
|
|
5824
|
+
W && /* @__PURE__ */ K(Ir, {
|
|
5824
5825
|
helperText: f,
|
|
5825
5826
|
error: d,
|
|
5826
5827
|
showLineColumn: g,
|
|
@@ -5839,4 +5840,543 @@ function Ir({ value: e, onChange: n, placeholder: r, height: i, width: a, disabl
|
|
|
5839
5840
|
});
|
|
5840
5841
|
}
|
|
5841
5842
|
//#endregion
|
|
5842
|
-
|
|
5843
|
+
//#region src/components/sunburst-chart/SunburstChart.tsx
|
|
5844
|
+
var Rr = 2 * Math.PI, zr = 11, Br = zr * .5, Vr = 5;
|
|
5845
|
+
function Hr(e, t = 0, n = ".", r = ",") {
|
|
5846
|
+
if (e == null || !isFinite(e)) return "0";
|
|
5847
|
+
let [i, a] = e.toFixed(Math.max(0, t)).split("."), o = i.replace(/\B(?=(\d{3})+(?!\d))/g, r);
|
|
5848
|
+
return a ? `${o}${n}${a}` : o;
|
|
5849
|
+
}
|
|
5850
|
+
function Ur(e, t) {
|
|
5851
|
+
let n = Math.floor(t / Br);
|
|
5852
|
+
return n <= 0 ? "" : e.length <= n ? e : n < Vr ? "" : e.slice(0, n - 1) + "…";
|
|
5853
|
+
}
|
|
5854
|
+
function Wr({ node: e, valueDecimalCount: t, valueDecimalSep: n, valueThousandsSep: r }) {
|
|
5855
|
+
let i = (e.value ?? 0) > 0, a = e.ancestors().map((e) => e.data.name).reverse().join(" › ");
|
|
5856
|
+
return /* @__PURE__ */ q(u, {
|
|
5857
|
+
sx: { py: .25 },
|
|
5858
|
+
children: [
|
|
5859
|
+
/* @__PURE__ */ K(z, {
|
|
5860
|
+
variant: "caption",
|
|
5861
|
+
sx: {
|
|
5862
|
+
fontWeight: "bold",
|
|
5863
|
+
display: "block"
|
|
5864
|
+
},
|
|
5865
|
+
children: e.data.name
|
|
5866
|
+
}),
|
|
5867
|
+
i && /* @__PURE__ */ K(z, {
|
|
5868
|
+
variant: "caption",
|
|
5869
|
+
sx: {
|
|
5870
|
+
display: "block",
|
|
5871
|
+
opacity: .85
|
|
5872
|
+
},
|
|
5873
|
+
children: Hr(e.value ?? 0, t, n, r)
|
|
5874
|
+
}),
|
|
5875
|
+
e.depth > 0 && /* @__PURE__ */ K(z, {
|
|
5876
|
+
variant: "caption",
|
|
5877
|
+
sx: {
|
|
5878
|
+
display: "block",
|
|
5879
|
+
opacity: .65,
|
|
5880
|
+
mt: .25
|
|
5881
|
+
},
|
|
5882
|
+
children: a
|
|
5883
|
+
})
|
|
5884
|
+
]
|
|
5885
|
+
});
|
|
5886
|
+
}
|
|
5887
|
+
function Gr({ data: e, size: n = 500, showSegmentLabels: r = !0, innerRadius: i = 0, sortBy: l = "value", chartColors: d, showRootLabel: f = !0, onSegmentClick: p, onZoomChange: m, valueDecimalCount: h = 0, valueDecimalSeparator: g = ".", valueThousandsSeparator: _ = ",", disabled: v = !1 }) {
|
|
5888
|
+
let y = B(), b = s(null), [x, S] = c(`-${n / 2} -${n / 2} ${n} ${n}`), C = n / 2, w = Math.max(0, Math.min(i, Math.max(0, C - 1))), T = Math.max(1, C - w), E = [
|
|
5889
|
+
y.palette.primary.main,
|
|
5890
|
+
y.palette.secondary.main,
|
|
5891
|
+
y.palette.error.main,
|
|
5892
|
+
y.palette.warning.main,
|
|
5893
|
+
y.palette.success.main,
|
|
5894
|
+
y.palette.info.main
|
|
5895
|
+
], D = d && d.length > 0 ? d : E, { root: O, ringThickness: k } = o(() => {
|
|
5896
|
+
let t = Z.hierarchy(e).sum((e) => e.value ?? 0);
|
|
5897
|
+
l === "value" ? t.sort((e, t) => (t.value ?? 0) - (e.value ?? 0)) : t.sort((e, t) => String(e.data.name).localeCompare(String(t.data.name), void 0, {
|
|
5898
|
+
numeric: !0,
|
|
5899
|
+
sensitivity: "base"
|
|
5900
|
+
}));
|
|
5901
|
+
let n = Z.partition().size([Rr, T])(t), r = Z.max(n.descendants(), (e) => e.depth) ?? 0, i = r > 0 ? T / r : T;
|
|
5902
|
+
return r > 0 && n.descendants().forEach((e) => {
|
|
5903
|
+
e.depth === 0 ? (e.y0 = 0, e.y1 = 0) : (e.y0 = (e.depth - 1) * i, e.y1 = e.depth * i);
|
|
5904
|
+
}), {
|
|
5905
|
+
root: n,
|
|
5906
|
+
ringThickness: i
|
|
5907
|
+
};
|
|
5908
|
+
}, [
|
|
5909
|
+
e,
|
|
5910
|
+
T,
|
|
5911
|
+
l
|
|
5912
|
+
]), [A, j] = c(O), [M, N] = c(O);
|
|
5913
|
+
M !== O && (N(O), j(O));
|
|
5914
|
+
let P = o(() => O.children?.map((e) => e.data.name) ?? [O.data.name], [O]), F = o(() => Z.scaleOrdinal().domain(P).range(D), [D, P]), I = (e) => {
|
|
5915
|
+
let t = e;
|
|
5916
|
+
for (; t.depth > 1;) t = t.parent;
|
|
5917
|
+
return F(t.data.name);
|
|
5918
|
+
}, L = o(() => Z.arc().startAngle((e) => e.x0).endAngle((e) => e.x1).padAngle((e) => Math.min((e.x1 - e.x0) / 2, .005)).padRadius(C / 2).innerRadius((e) => w + e.y0).outerRadius((e) => w + e.y1 - 1), [C, w]), z = t((e) => {
|
|
5919
|
+
let t = Rr / (A.x1 - A.x0), n = Math.max(0, Math.min(Rr, (e.x0 - A.x0) * t)), r = Math.max(0, Math.min(Rr, (e.x1 - A.x0) * t)), i = A.depth === 0 ? 0 : (A.depth - 1) * k;
|
|
5920
|
+
return {
|
|
5921
|
+
x0: n,
|
|
5922
|
+
x1: r,
|
|
5923
|
+
y0: Math.max(0, e.y0 - i),
|
|
5924
|
+
y1: Math.max(0, e.y1 - i)
|
|
5925
|
+
};
|
|
5926
|
+
}, [A, k]), V = (e) => e.x1 > e.x0 && e.y1 > e.y0, H = (e) => (w + (e.y0 + e.y1) / 2) * (e.x1 - e.x0) > 12, U = (e) => {
|
|
5927
|
+
let t = (e.x0 + e.x1) / 2 * 180 / Math.PI, n = w + (e.y0 + e.y1) / 2, r = t < 180 ? 0 : 180;
|
|
5928
|
+
return `rotate(${t - 90}) translate(${n},0) rotate(${r})`;
|
|
5929
|
+
}, W = t((e) => e.ancestors().includes(A), [A]), G = t((e) => {
|
|
5930
|
+
let t = e.ancestors().reverse(), n = e.value ?? 0, r = O.value ?? 0;
|
|
5931
|
+
return {
|
|
5932
|
+
id: e.data.id,
|
|
5933
|
+
name: e.data.name,
|
|
5934
|
+
value: n || null,
|
|
5935
|
+
percentage: r > 0 ? Math.round(n / r * 1e4) / 100 : 0,
|
|
5936
|
+
depth: e.depth,
|
|
5937
|
+
path: t.map((e) => e.data.name),
|
|
5938
|
+
pathIds: t.map((e) => e.data.id),
|
|
5939
|
+
childrenCount: e.children?.length ?? 0,
|
|
5940
|
+
data: e.data
|
|
5941
|
+
};
|
|
5942
|
+
}, [O]), J = t((e) => {
|
|
5943
|
+
j(e), m && m({
|
|
5944
|
+
focusNode: G(e),
|
|
5945
|
+
isRoot: e === O
|
|
5946
|
+
});
|
|
5947
|
+
}, [
|
|
5948
|
+
O,
|
|
5949
|
+
G,
|
|
5950
|
+
m
|
|
5951
|
+
]);
|
|
5952
|
+
a(() => {
|
|
5953
|
+
let e = b.current;
|
|
5954
|
+
if (!e) return;
|
|
5955
|
+
let t = requestAnimationFrame(() => {
|
|
5956
|
+
try {
|
|
5957
|
+
let t = e.getBBox();
|
|
5958
|
+
S(`${t.x - 8} ${t.y - 8} ${t.width + 16} ${t.height + 16}`);
|
|
5959
|
+
} catch {
|
|
5960
|
+
S(`-${n / 2} -${n / 2} ${n} ${n}`);
|
|
5961
|
+
}
|
|
5962
|
+
});
|
|
5963
|
+
return () => cancelAnimationFrame(t);
|
|
5964
|
+
}, [
|
|
5965
|
+
n,
|
|
5966
|
+
O,
|
|
5967
|
+
A,
|
|
5968
|
+
w,
|
|
5969
|
+
k,
|
|
5970
|
+
f
|
|
5971
|
+
]);
|
|
5972
|
+
let Y = s(null), ee = (e) => {
|
|
5973
|
+
Y.current &&= (clearTimeout(Y.current), null), Y.current = setTimeout(() => {
|
|
5974
|
+
e(), Y.current = null;
|
|
5975
|
+
}, 250);
|
|
5976
|
+
}, te = () => {
|
|
5977
|
+
Y.current &&= (clearTimeout(Y.current), null);
|
|
5978
|
+
};
|
|
5979
|
+
a(() => {
|
|
5980
|
+
if (v) return;
|
|
5981
|
+
let e = (e) => {
|
|
5982
|
+
e.key === "Escape" && (te(), J(O));
|
|
5983
|
+
};
|
|
5984
|
+
return window.addEventListener("keydown", e), () => window.removeEventListener("keydown", e);
|
|
5985
|
+
}, [
|
|
5986
|
+
v,
|
|
5987
|
+
O,
|
|
5988
|
+
J
|
|
5989
|
+
]);
|
|
5990
|
+
let ne = O.descendants().filter((e) => e.depth > 0), re = (e) => {
|
|
5991
|
+
if (v) return;
|
|
5992
|
+
let t = ne[Number(e.currentTarget.getAttribute("data-idx"))];
|
|
5993
|
+
if (t) {
|
|
5994
|
+
if (e.ctrlKey || e.metaKey) {
|
|
5995
|
+
t.children && ee(() => J(t));
|
|
5996
|
+
return;
|
|
5997
|
+
}
|
|
5998
|
+
p?.(G(t), e);
|
|
5999
|
+
}
|
|
6000
|
+
}, ie = (e) => {
|
|
6001
|
+
v || (e.ctrlKey || e.metaKey) && (te(), J(A.parent ?? O));
|
|
6002
|
+
}, ae = (e) => {
|
|
6003
|
+
if (!v) {
|
|
6004
|
+
if (e.ctrlKey || e.metaKey) {
|
|
6005
|
+
te(), J(A.parent ?? O);
|
|
6006
|
+
return;
|
|
6007
|
+
}
|
|
6008
|
+
p?.(G(A.parent ?? O), e);
|
|
6009
|
+
}
|
|
6010
|
+
}, oe = {
|
|
6011
|
+
followCursor: !0,
|
|
6012
|
+
enterDelay: 50,
|
|
6013
|
+
enterNextDelay: 0,
|
|
6014
|
+
disableHoverListener: v,
|
|
6015
|
+
slotProps: { tooltip: { sx: { maxWidth: 260 } } }
|
|
6016
|
+
}, se = y.palette.text.primary, ce = y.typography.fontFamily;
|
|
6017
|
+
return /* @__PURE__ */ K(u, {
|
|
6018
|
+
sx: {
|
|
6019
|
+
display: "inline-flex",
|
|
6020
|
+
opacity: v ? .5 : 1,
|
|
6021
|
+
cursor: v ? "not-allowed" : "default",
|
|
6022
|
+
userSelect: "none"
|
|
6023
|
+
},
|
|
6024
|
+
children: /* @__PURE__ */ K("svg", {
|
|
6025
|
+
width: n,
|
|
6026
|
+
height: n,
|
|
6027
|
+
viewBox: x,
|
|
6028
|
+
style: {
|
|
6029
|
+
fontFamily: ce ?? "sans-serif",
|
|
6030
|
+
overflow: "visible"
|
|
6031
|
+
},
|
|
6032
|
+
role: "img",
|
|
6033
|
+
"aria-label": e.name,
|
|
6034
|
+
children: /* @__PURE__ */ q("g", {
|
|
6035
|
+
ref: b,
|
|
6036
|
+
children: [
|
|
6037
|
+
w > 0 && /* @__PURE__ */ K(R, {
|
|
6038
|
+
...oe,
|
|
6039
|
+
title: A.data.name,
|
|
6040
|
+
placement: "top",
|
|
6041
|
+
children: /* @__PURE__ */ K("circle", {
|
|
6042
|
+
cx: 0,
|
|
6043
|
+
cy: 0,
|
|
6044
|
+
r: w,
|
|
6045
|
+
fill: "transparent",
|
|
6046
|
+
pointerEvents: v ? "none" : "auto",
|
|
6047
|
+
onClick: ae,
|
|
6048
|
+
style: { cursor: v ? "not-allowed" : "pointer" }
|
|
6049
|
+
})
|
|
6050
|
+
}),
|
|
6051
|
+
/* @__PURE__ */ K("g", { children: ne.map((e, t) => {
|
|
6052
|
+
let n = z(e), r = V(n), i = !!e.children;
|
|
6053
|
+
return /* @__PURE__ */ K(R, {
|
|
6054
|
+
...oe,
|
|
6055
|
+
placement: "top",
|
|
6056
|
+
title: r ? /* @__PURE__ */ K(Wr, {
|
|
6057
|
+
node: e,
|
|
6058
|
+
valueDecimalCount: h,
|
|
6059
|
+
valueDecimalSep: g,
|
|
6060
|
+
valueThousandsSep: _
|
|
6061
|
+
}) : "",
|
|
6062
|
+
children: /* @__PURE__ */ K("path", {
|
|
6063
|
+
"data-idx": t,
|
|
6064
|
+
d: L(n) || "",
|
|
6065
|
+
fill: I(e),
|
|
6066
|
+
fillOpacity: r ? i ? .75 : .5 : 0,
|
|
6067
|
+
style: {
|
|
6068
|
+
pointerEvents: r && !v ? "auto" : "none",
|
|
6069
|
+
cursor: i && !v ? "pointer" : "default",
|
|
6070
|
+
transition: "fill-opacity 0.15s"
|
|
6071
|
+
},
|
|
6072
|
+
onClick: re,
|
|
6073
|
+
onDoubleClick: ie
|
|
6074
|
+
})
|
|
6075
|
+
}, `tt-${e.data.id}-${t}`);
|
|
6076
|
+
}) }),
|
|
6077
|
+
r && /* @__PURE__ */ K("g", {
|
|
6078
|
+
pointerEvents: "none",
|
|
6079
|
+
textAnchor: "middle",
|
|
6080
|
+
fill: se,
|
|
6081
|
+
children: ne.map((e, t) => {
|
|
6082
|
+
if (!W(e)) return null;
|
|
6083
|
+
let n = z(e);
|
|
6084
|
+
if (!H(n)) return null;
|
|
6085
|
+
let r = (w + (n.y0 + n.y1) / 2) * (n.x1 - n.x0) * .88, i = Ur(e.data.name, r);
|
|
6086
|
+
return i ? /* @__PURE__ */ K("text", {
|
|
6087
|
+
transform: U(n),
|
|
6088
|
+
dy: "0.35em",
|
|
6089
|
+
fontSize: zr,
|
|
6090
|
+
children: i
|
|
6091
|
+
}, `lbl-${e.data.id}-${t}`) : null;
|
|
6092
|
+
})
|
|
6093
|
+
}),
|
|
6094
|
+
f && /* @__PURE__ */ K(R, {
|
|
6095
|
+
...oe,
|
|
6096
|
+
placement: "top",
|
|
6097
|
+
title: "",
|
|
6098
|
+
children: /* @__PURE__ */ K("g", {
|
|
6099
|
+
textAnchor: "middle",
|
|
6100
|
+
fill: se,
|
|
6101
|
+
pointerEvents: v ? "none" : "auto",
|
|
6102
|
+
onClick: ae,
|
|
6103
|
+
style: { cursor: A !== O && !v ? "pointer" : "default" },
|
|
6104
|
+
children: /* @__PURE__ */ K("text", {
|
|
6105
|
+
fontSize: 13,
|
|
6106
|
+
dy: "0.35em",
|
|
6107
|
+
fontWeight: "bold",
|
|
6108
|
+
children: A.data.name
|
|
6109
|
+
})
|
|
6110
|
+
})
|
|
6111
|
+
})
|
|
6112
|
+
]
|
|
6113
|
+
})
|
|
6114
|
+
})
|
|
6115
|
+
});
|
|
6116
|
+
}
|
|
6117
|
+
Gr.displayName = "SunburstChart";
|
|
6118
|
+
//#endregion
|
|
6119
|
+
//#region src/components/sunburst-chart/SunburstChart.types.ts
|
|
6120
|
+
var Kr = { noData: "No data" };
|
|
6121
|
+
//#endregion
|
|
6122
|
+
//#region src/components/chord-chart/ChordChart.tsx
|
|
6123
|
+
function qr(e, t = 0, n = ".", r = ",") {
|
|
6124
|
+
if (!isFinite(e)) return String(e);
|
|
6125
|
+
let [i, a] = e.toFixed(Math.max(0, t)).split("."), o = i.replace(/\B(?=(\d{3})+(?!\d))/g, r);
|
|
6126
|
+
return a ? `${o}${n}${a}` : o;
|
|
6127
|
+
}
|
|
6128
|
+
function Jr({ name: e, valueOut: t, valueIn: n, fmt: r }) {
|
|
6129
|
+
return /* @__PURE__ */ q(u, {
|
|
6130
|
+
sx: { py: .25 },
|
|
6131
|
+
children: [
|
|
6132
|
+
/* @__PURE__ */ K(z, {
|
|
6133
|
+
variant: "caption",
|
|
6134
|
+
sx: {
|
|
6135
|
+
fontWeight: "bold",
|
|
6136
|
+
display: "block"
|
|
6137
|
+
},
|
|
6138
|
+
children: e
|
|
6139
|
+
}),
|
|
6140
|
+
/* @__PURE__ */ q(z, {
|
|
6141
|
+
variant: "caption",
|
|
6142
|
+
sx: {
|
|
6143
|
+
display: "block",
|
|
6144
|
+
opacity: .85
|
|
6145
|
+
},
|
|
6146
|
+
children: [r(t), " outgoing →"]
|
|
6147
|
+
}),
|
|
6148
|
+
/* @__PURE__ */ q(z, {
|
|
6149
|
+
variant: "caption",
|
|
6150
|
+
sx: {
|
|
6151
|
+
display: "block",
|
|
6152
|
+
opacity: .85
|
|
6153
|
+
},
|
|
6154
|
+
children: [r(n), " incoming ←"]
|
|
6155
|
+
})
|
|
6156
|
+
]
|
|
6157
|
+
});
|
|
6158
|
+
}
|
|
6159
|
+
function Yr({ sourceName: e, targetName: t, sourceValue: n, targetValue: r, directed: i, fmt: a }) {
|
|
6160
|
+
return /* @__PURE__ */ q(u, {
|
|
6161
|
+
sx: { py: .25 },
|
|
6162
|
+
children: [
|
|
6163
|
+
/* @__PURE__ */ q(z, {
|
|
6164
|
+
variant: "caption",
|
|
6165
|
+
sx: {
|
|
6166
|
+
fontWeight: "bold",
|
|
6167
|
+
display: "block"
|
|
6168
|
+
},
|
|
6169
|
+
children: [
|
|
6170
|
+
e,
|
|
6171
|
+
" → ",
|
|
6172
|
+
t
|
|
6173
|
+
]
|
|
6174
|
+
}),
|
|
6175
|
+
/* @__PURE__ */ K(z, {
|
|
6176
|
+
variant: "caption",
|
|
6177
|
+
sx: {
|
|
6178
|
+
display: "block",
|
|
6179
|
+
opacity: .85
|
|
6180
|
+
},
|
|
6181
|
+
children: a(n)
|
|
6182
|
+
}),
|
|
6183
|
+
i && r > 0 && r !== n && /* @__PURE__ */ q(z, {
|
|
6184
|
+
variant: "caption",
|
|
6185
|
+
sx: {
|
|
6186
|
+
display: "block",
|
|
6187
|
+
opacity: .7,
|
|
6188
|
+
mt: .25
|
|
6189
|
+
},
|
|
6190
|
+
children: [
|
|
6191
|
+
t,
|
|
6192
|
+
" → ",
|
|
6193
|
+
e,
|
|
6194
|
+
": ",
|
|
6195
|
+
a(r)
|
|
6196
|
+
]
|
|
6197
|
+
})
|
|
6198
|
+
]
|
|
6199
|
+
});
|
|
6200
|
+
}
|
|
6201
|
+
function Xr({ data: e, size: n = 500, innerRadius: r, ringThickness: i = 20, padAngle: l, ribbonPadAngle: d, sortSubgroups: f = "descending", sortChords: p = "descending", chartColors: m, showGroupLabels: h = !0, labelOffset: g = 8, ribbonOpacity: _ = .75, ribbonBlendMode: v = "multiply", directed: y = !0, valueDecimalCount: b = 0, valueDecimalSeparator: x = ".", valueThousandsSeparator: S = ",", onGroupClick: C, onChordClick: w, disabled: T = !1 }) {
|
|
6202
|
+
let E = B(), D = [
|
|
6203
|
+
E.palette.primary.main,
|
|
6204
|
+
E.palette.secondary.main,
|
|
6205
|
+
E.palette.error.main,
|
|
6206
|
+
E.palette.warning.main,
|
|
6207
|
+
E.palette.success.main,
|
|
6208
|
+
E.palette.info.main
|
|
6209
|
+
], O = m && m.length > 0 ? m : D, k = r ?? Math.min(n, n) * .5 - 90, A = Math.max(10, k), j = A + Math.max(1, i), M = l ?? 10 / A, N = d ?? 1 / A, P = t((e) => qr(e, b, x, S), [
|
|
6210
|
+
b,
|
|
6211
|
+
x,
|
|
6212
|
+
S
|
|
6213
|
+
]), { names: F, matrix: I } = o(() => {
|
|
6214
|
+
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));
|
|
6215
|
+
for (let { source: t, target: i, value: a } of e) {
|
|
6216
|
+
let e = n.get(t), o = n.get(i);
|
|
6217
|
+
e == null || o == null || (r[e][o] += a);
|
|
6218
|
+
}
|
|
6219
|
+
return {
|
|
6220
|
+
names: t,
|
|
6221
|
+
matrix: r
|
|
6222
|
+
};
|
|
6223
|
+
}, [e]), L = o(() => {
|
|
6224
|
+
let e = (y ? Z.chordDirected() : Z.chord()).padAngle(M);
|
|
6225
|
+
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(I);
|
|
6226
|
+
}, [
|
|
6227
|
+
I,
|
|
6228
|
+
M,
|
|
6229
|
+
y,
|
|
6230
|
+
f,
|
|
6231
|
+
p
|
|
6232
|
+
]), z = o(() => Z.arc().innerRadius(A).outerRadius(j), [A, j]), V = o(() => (y ? Z.ribbonArrow() : Z.ribbon()).radius(A - 1).padAngle(N), [
|
|
6233
|
+
A,
|
|
6234
|
+
N,
|
|
6235
|
+
y
|
|
6236
|
+
]), H = t((e) => V({
|
|
6237
|
+
source: {
|
|
6238
|
+
startAngle: e.source.startAngle,
|
|
6239
|
+
endAngle: e.source.endAngle,
|
|
6240
|
+
radius: A - 1
|
|
6241
|
+
},
|
|
6242
|
+
target: {
|
|
6243
|
+
startAngle: e.target.startAngle,
|
|
6244
|
+
endAngle: e.target.endAngle,
|
|
6245
|
+
radius: A - 1
|
|
6246
|
+
}
|
|
6247
|
+
}) ?? "", [V, A]), U = o(() => Z.scaleOrdinal().domain(Z.range(F.length)).range(O.length >= F.length ? O : [...Array(Math.ceil(F.length / O.length))].flatMap(() => O).slice(0, F.length)), [O, F.length]), W = s(null), [G, J] = c(`-${n / 2} -${n / 2} ${n} ${n}`);
|
|
6248
|
+
a(() => {
|
|
6249
|
+
let e = W.current;
|
|
6250
|
+
if (!e) return;
|
|
6251
|
+
let t = requestAnimationFrame(() => {
|
|
6252
|
+
try {
|
|
6253
|
+
let t = e.getBBox();
|
|
6254
|
+
J(`${t.x - 8} ${t.y - 8} ${t.width + 16} ${t.height + 16}`);
|
|
6255
|
+
} catch {
|
|
6256
|
+
J(`-${n / 2} -${n / 2} ${n} ${n}`);
|
|
6257
|
+
}
|
|
6258
|
+
});
|
|
6259
|
+
return () => cancelAnimationFrame(t);
|
|
6260
|
+
}, [
|
|
6261
|
+
n,
|
|
6262
|
+
A,
|
|
6263
|
+
j,
|
|
6264
|
+
F.length,
|
|
6265
|
+
L
|
|
6266
|
+
]);
|
|
6267
|
+
let [Y, ee] = c(null), te = t((e) => ({
|
|
6268
|
+
name: F[e.index],
|
|
6269
|
+
index: e.index,
|
|
6270
|
+
valueOut: Z.sum(L, (t) => t.source.index === e.index ? t.source.value : 0),
|
|
6271
|
+
valueIn: Z.sum(L, (t) => t.target.index === e.index ? t.source.value : 0)
|
|
6272
|
+
}), [F, L]), ne = t((e) => ({
|
|
6273
|
+
source: {
|
|
6274
|
+
name: F[e.source.index],
|
|
6275
|
+
index: e.source.index,
|
|
6276
|
+
value: e.source.value
|
|
6277
|
+
},
|
|
6278
|
+
target: {
|
|
6279
|
+
name: F[e.target.index],
|
|
6280
|
+
index: e.target.index,
|
|
6281
|
+
value: e.target.value
|
|
6282
|
+
}
|
|
6283
|
+
}), [F]), re = (e) => {
|
|
6284
|
+
let t = (e.startAngle + e.endAngle) / 2, n = t * 180 / Math.PI - 90, r = t > Math.PI ? " rotate(180)" : "";
|
|
6285
|
+
return `rotate(${n}) translate(${j + g})${r}`;
|
|
6286
|
+
}, ie = (e) => (e.startAngle + e.endAngle) / 2 > Math.PI ? "end" : "start", ae = {
|
|
6287
|
+
followCursor: !0,
|
|
6288
|
+
enterDelay: 50,
|
|
6289
|
+
enterNextDelay: 0,
|
|
6290
|
+
disableHoverListener: T,
|
|
6291
|
+
slotProps: { tooltip: { sx: { maxWidth: 240 } } }
|
|
6292
|
+
}, oe = E.palette.text.primary, se = E.typography.fontFamily;
|
|
6293
|
+
return /* @__PURE__ */ K(u, {
|
|
6294
|
+
sx: {
|
|
6295
|
+
display: "inline-flex",
|
|
6296
|
+
opacity: T ? .5 : 1,
|
|
6297
|
+
cursor: T ? "not-allowed" : "default",
|
|
6298
|
+
userSelect: "none"
|
|
6299
|
+
},
|
|
6300
|
+
children: /* @__PURE__ */ K("svg", {
|
|
6301
|
+
width: n,
|
|
6302
|
+
height: n,
|
|
6303
|
+
viewBox: G,
|
|
6304
|
+
style: {
|
|
6305
|
+
fontFamily: se ?? "sans-serif",
|
|
6306
|
+
overflow: "visible"
|
|
6307
|
+
},
|
|
6308
|
+
role: "img",
|
|
6309
|
+
"aria-label": "Chord chart",
|
|
6310
|
+
children: /* @__PURE__ */ q("g", {
|
|
6311
|
+
ref: W,
|
|
6312
|
+
children: [/* @__PURE__ */ K("g", { children: L.groups.map((e) => {
|
|
6313
|
+
let t = te(e), n = Y === e.index, r = Y !== null && !n;
|
|
6314
|
+
return /* @__PURE__ */ K(R, {
|
|
6315
|
+
...ae,
|
|
6316
|
+
title: /* @__PURE__ */ K(Jr, {
|
|
6317
|
+
name: t.name,
|
|
6318
|
+
valueOut: t.valueOut,
|
|
6319
|
+
valueIn: t.valueIn,
|
|
6320
|
+
fmt: P
|
|
6321
|
+
}),
|
|
6322
|
+
children: /* @__PURE__ */ q("g", {
|
|
6323
|
+
style: { cursor: T ? "not-allowed" : "pointer" },
|
|
6324
|
+
onMouseEnter: () => !T && ee(e.index),
|
|
6325
|
+
onMouseLeave: () => ee(null),
|
|
6326
|
+
onClick: (e) => !T && C?.(t, e),
|
|
6327
|
+
children: [/* @__PURE__ */ K("path", {
|
|
6328
|
+
d: z(e) || "",
|
|
6329
|
+
fill: U(e.index),
|
|
6330
|
+
stroke: E.palette.divider,
|
|
6331
|
+
opacity: r ? .35 : 1,
|
|
6332
|
+
style: { transition: "opacity 0.15s" }
|
|
6333
|
+
}), h && /* @__PURE__ */ K("text", {
|
|
6334
|
+
dy: "0.35em",
|
|
6335
|
+
fontSize: 11,
|
|
6336
|
+
fill: oe,
|
|
6337
|
+
transform: re(e),
|
|
6338
|
+
textAnchor: ie(e),
|
|
6339
|
+
pointerEvents: "none",
|
|
6340
|
+
children: F[e.index]
|
|
6341
|
+
})]
|
|
6342
|
+
})
|
|
6343
|
+
}, `grp-tt-${e.index}`);
|
|
6344
|
+
}) }), /* @__PURE__ */ K("g", {
|
|
6345
|
+
fillOpacity: _,
|
|
6346
|
+
style: { mixBlendMode: v },
|
|
6347
|
+
children: L.map((e, t) => {
|
|
6348
|
+
let n = ne(e), r = Y === null || e.source.index === Y || e.target.index === Y;
|
|
6349
|
+
return /* @__PURE__ */ K(R, {
|
|
6350
|
+
...ae,
|
|
6351
|
+
title: /* @__PURE__ */ K(Yr, {
|
|
6352
|
+
sourceName: n.source.name,
|
|
6353
|
+
targetName: n.target.name,
|
|
6354
|
+
sourceValue: n.source.value,
|
|
6355
|
+
targetValue: n.target.value,
|
|
6356
|
+
directed: y,
|
|
6357
|
+
fmt: P
|
|
6358
|
+
}),
|
|
6359
|
+
children: /* @__PURE__ */ K("path", {
|
|
6360
|
+
d: H(e),
|
|
6361
|
+
fill: U(e.target.index),
|
|
6362
|
+
stroke: "none",
|
|
6363
|
+
opacity: r ? 1 : .12,
|
|
6364
|
+
style: {
|
|
6365
|
+
cursor: T ? "not-allowed" : "pointer",
|
|
6366
|
+
transition: "opacity 0.15s"
|
|
6367
|
+
},
|
|
6368
|
+
onClick: (e) => !T && w?.(n, e)
|
|
6369
|
+
})
|
|
6370
|
+
}, `chord-tt-${t}`);
|
|
6371
|
+
})
|
|
6372
|
+
})]
|
|
6373
|
+
})
|
|
6374
|
+
})
|
|
6375
|
+
});
|
|
6376
|
+
}
|
|
6377
|
+
Xr.displayName = "ChordChart";
|
|
6378
|
+
//#endregion
|
|
6379
|
+
//#region src/components/chord-chart/ChordChart.types.ts
|
|
6380
|
+
var Zr = { noData: "No data" };
|
|
6381
|
+
//#endregion
|
|
6382
|
+
export { Xr as ChordChart, jt as ConfirmDialogProvider, er as DEFAULT_CHECK_COLORS, Zr as DEFAULT_CHORD_CHART_TRANSLATION, Et as DEFAULT_CONFIRM_DIALOG_TRANSLATION, un as DEFAULT_GANTT_TRANSLATIONS, Nt as DEFAULT_JSON_EDITOR_TOOLBAR_CONFIG, Pt as DEFAULT_JSON_EDITOR_TRANSLATION, $n as DEFAULT_METER_COLORS, Qn as DEFAULT_PASSWORD_TRANSLATIONS, pr as DEFAULT_RICH_TEXT_EDITOR_TOOLBAR_CONFIG, mr as DEFAULT_RICH_TEXT_EDITOR_TRANSLATION, Ar as DEFAULT_SQL_EDITOR_TOOLBAR_CONFIG, jr as DEFAULT_SQL_EDITOR_TRANSLATION, Kr as DEFAULT_SUNBURST_CHART_TRANSLATION, cr as DEFAULT_TAG_SELECTION_TRANSLATION, Jn as GanttChart, Bt as JsonEditor, nr as PasswordStrengthMeter, kr as RichTextEditor, Lr as SqlEditor, Gr as SunburstChart, fr as TagSelection, Mt as useConfirm, $ as useGanttChartStore, Un as useGanttTheme, Vn as useGanttTranslations, zn as useRawGanttChartStore };
|