@thebuoyant-tsdev/mui-ts-library 3.29.2 → 3.31.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 +49 -1
- package/README.md +49 -1
- package/dist/components/chord-chart/ChordChart.js +112 -112
- package/dist/components/circle-packing-chart/CirclePackingChart.js +135 -135
- package/dist/components/color-picker/ColorPicker.js +217 -217
- package/dist/components/color-picker/PopoverColorPicker.js +7 -7
- package/dist/components/date-range-picker/DateRangePicker.js +9 -9
- package/dist/components/gantt-chart/GanttChart.js +18 -18
- package/dist/components/gantt-chart/GanttTaskDialog.js +43 -43
- package/dist/components/gantt-chart/GanttTaskPanel.js +128 -128
- package/dist/components/gantt-chart/GanttTimeline.js +16 -16
- package/dist/components/gantt-chart/GanttToolbar.js +24 -24
- package/dist/components/horizontal-tree-chart/HorizontalTreeChart.js +244 -244
- package/dist/components/json-editor/JsonEditor.js +9 -9
- package/dist/components/json-editor/JsonEditorContent.js +54 -54
- package/dist/components/json-editor/JsonEditorToolbar.js +12 -12
- package/dist/components/kanban-board/KanbanBoard.d.ts +2 -0
- package/dist/components/kanban-board/KanbanBoard.js +132 -0
- package/dist/components/kanban-board/KanbanBoard.types.d.ts +93 -0
- package/dist/components/kanban-board/KanbanBoard.types.js +19 -0
- package/dist/components/kanban-board/KanbanBoardCard.d.ts +14 -0
- package/dist/components/kanban-board/KanbanBoardCard.js +118 -0
- package/dist/components/kanban-board/KanbanBoardCardDialog.d.ts +23 -0
- package/dist/components/kanban-board/KanbanBoardCardDialog.js +120 -0
- package/dist/components/kanban-board/KanbanBoardColumn.d.ts +15 -0
- package/dist/components/kanban-board/KanbanBoardColumn.js +132 -0
- package/dist/components/kanban-board/kanbanBoardClasses.d.ts +47 -0
- package/dist/components/kanban-board/kanbanBoardClasses.js +18 -0
- package/dist/components/password-strength-meter/PasswordStrengthMeter.js +27 -27
- package/dist/components/radial-stacked-bar-chart/RadialStackedBarChart.js +48 -48
- package/dist/components/radial-tree-chart/RadialTreeChart.js +173 -173
- package/dist/components/rich-text-editor/RichTextEditor.js +32 -32
- package/dist/components/rich-text-editor/RichTextEditorColorPicker.js +20 -20
- package/dist/components/rich-text-editor/RichTextEditorEmojiPicker.js +12 -12
- package/dist/components/rich-text-editor/RichTextEditorImageDialog.js +11 -11
- package/dist/components/rich-text-editor/RichTextEditorLinkDialog.js +11 -11
- package/dist/components/rich-text-editor/RichTextEditorMarkdownDialog.js +14 -14
- package/dist/components/rich-text-editor/RichTextEditorMentionList.js +14 -14
- package/dist/components/rich-text-editor/RichTextEditorTableMenu.js +28 -28
- package/dist/components/rich-text-editor/RichTextEditorToolbar.js +35 -35
- package/dist/components/sql-editor/SqlEditor.js +24 -24
- package/dist/components/sql-editor/SqlEditorContent.js +16 -16
- package/dist/components/sql-editor/SqlEditorHistoryMenu.js +15 -15
- package/dist/components/sql-editor/SqlEditorToolbar.js +21 -21
- package/dist/components/sunburst-chart/SunburstChart.js +126 -126
- package/dist/components/tag-selection/TagSelection.js +18 -18
- package/dist/components/tag-selection/TagSelectionAutocomplete.js +120 -120
- package/dist/components/tag-selection/TagSelectionSelectedTags.js +10 -10
- package/dist/index.cjs +2 -2
- package/dist/index.d.cts +3 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.js +38 -35
- package/package.json +9 -2
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { DEFAULT_RADIAL_STACKED_BAR_CHART_TRANSLATION as e } from "./RadialStackedBarChart.types.js";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
2
|
+
import { Box as t, Tooltip as n, Typography as r, useTheme as i } from "@mui/material";
|
|
3
|
+
import { useCallback as a, useLayoutEffect as o, useMemo as s, useRef as c, useState as l } from "react";
|
|
4
4
|
import { Fragment as u, jsx as d, jsxs as f } from "react/jsx-runtime";
|
|
5
5
|
import * as p from "d3";
|
|
6
6
|
//#region src/components/radial-stacked-bar-chart/RadialStackedBarChart.tsx
|
|
@@ -17,12 +17,12 @@ function g(e) {
|
|
|
17
17
|
label: e
|
|
18
18
|
} : e);
|
|
19
19
|
}
|
|
20
|
-
function ee({ barData: e, seriesKey:
|
|
21
|
-
let l = e.values[
|
|
22
|
-
return /* @__PURE__ */ f(
|
|
20
|
+
function ee({ barData: e, seriesKey: n, seriesLabel: i, decimals: a, decimalSep: o, thousandSep: s, valueFormatter: c }) {
|
|
21
|
+
let l = e.values[n] ?? 0, u = p.sum(Object.values(e.values)), h = u > 0 ? Math.round(l / u * 1e3) / 10 : 0, g = (e, t) => c ? c(e, t) : m(e, a, o, s);
|
|
22
|
+
return /* @__PURE__ */ f(t, {
|
|
23
23
|
sx: { py: .25 },
|
|
24
24
|
children: [
|
|
25
|
-
/* @__PURE__ */ d(
|
|
25
|
+
/* @__PURE__ */ d(r, {
|
|
26
26
|
variant: "caption",
|
|
27
27
|
sx: {
|
|
28
28
|
fontWeight: "bold",
|
|
@@ -30,19 +30,19 @@ function ee({ barData: e, seriesKey: t, seriesLabel: n, decimals: r, decimalSep:
|
|
|
30
30
|
},
|
|
31
31
|
children: e.label
|
|
32
32
|
}),
|
|
33
|
-
/* @__PURE__ */ f(
|
|
33
|
+
/* @__PURE__ */ f(r, {
|
|
34
34
|
variant: "caption",
|
|
35
35
|
sx: {
|
|
36
36
|
display: "block",
|
|
37
37
|
opacity: .85
|
|
38
38
|
},
|
|
39
39
|
children: [
|
|
40
|
-
|
|
40
|
+
i,
|
|
41
41
|
": ",
|
|
42
|
-
g(l,
|
|
42
|
+
g(l, n)
|
|
43
43
|
]
|
|
44
44
|
}),
|
|
45
|
-
/* @__PURE__ */ f(
|
|
45
|
+
/* @__PURE__ */ f(r, {
|
|
46
46
|
variant: "caption",
|
|
47
47
|
sx: {
|
|
48
48
|
display: "block",
|
|
@@ -58,11 +58,11 @@ function ee({ barData: e, seriesKey: t, seriesLabel: n, decimals: r, decimalSep:
|
|
|
58
58
|
]
|
|
59
59
|
});
|
|
60
60
|
}
|
|
61
|
-
function _({ data:
|
|
62
|
-
let A =
|
|
61
|
+
function _({ data: r, keys: m, size: _ = 500, innerRadius: v, barPadding: y = .12, chartColors: b, colorConfig: x, showLabels: S = !0, showGridLines: C = !0, gridLineCount: w = 3, showGridValues: te = !0, showLegend: ne = !0, sortBy: T = "none", valueDecimalCount: re = 0, valueDecimalSeparator: ie = ".", valueThousandsSeparator: ae = ",", valueFormatter: oe, gridValueFormatter: se, zoomable: E = !1, onBarClick: ce, onBarHover: D, disabled: O = !1, translation: k }) {
|
|
62
|
+
let A = i(), le = {
|
|
63
63
|
...e,
|
|
64
64
|
...k
|
|
65
|
-
}, j =
|
|
65
|
+
}, j = s(() => g(m), [m]), M = s(() => j.map((e) => e.key), [j]), N = r.length === 0 || j.length === 0, ue = S ? 63 : 16, P = _ / 2 - ue, F = v == null ? Math.round(_ * .18) : Math.max(0, Math.min(v, P - 1)), de = [
|
|
66
66
|
A.palette.primary.main,
|
|
67
67
|
A.palette.secondary.main,
|
|
68
68
|
A.palette.success.main,
|
|
@@ -73,30 +73,30 @@ function _({ data: c, keys: m, size: _ = 500, innerRadius: v, barPadding: y = .1
|
|
|
73
73
|
"#00897b",
|
|
74
74
|
"#f06292",
|
|
75
75
|
"#a1887f"
|
|
76
|
-
], I = b && b.length > 0 ? b : de, L =
|
|
76
|
+
], I = b && b.length > 0 ? b : de, L = a((e, t) => {
|
|
77
77
|
let n = x?.[e];
|
|
78
78
|
return n?.fill ? n.fill : I[t % I.length];
|
|
79
|
-
}, [x, I]), R =
|
|
79
|
+
}, [x, I]), R = s(() => T === "value" ? [...r].sort((e, t) => p.sum(M, (e) => t.values[e] ?? 0) - p.sum(M, (t) => e.values[t] ?? 0)) : T === "label" ? [...r].sort((e, t) => e.label.localeCompare(t.label, void 0, {
|
|
80
80
|
numeric: !0,
|
|
81
81
|
sensitivity: "base"
|
|
82
|
-
})) :
|
|
83
|
-
|
|
82
|
+
})) : r, [
|
|
83
|
+
r,
|
|
84
84
|
T,
|
|
85
85
|
M
|
|
86
|
-
]), z =
|
|
86
|
+
]), z = s(() => p.max(R, (e) => p.sum(M, (t) => e.values[t] ?? 0)) ?? 0, [R, M]), B = s(() => p.scaleBand().domain(R.map((e) => e.id)).range([0, 2 * Math.PI]).padding(y), [R, y]), V = s(() => p.scaleLinear().domain([0, z]).range([F, P]), [
|
|
87
87
|
F,
|
|
88
88
|
P,
|
|
89
89
|
z
|
|
90
|
-
]), fe =
|
|
90
|
+
]), fe = s(() => N ? [] : p.stack().keys(M).value((e, t) => e.values[t] ?? 0).order(p.stackOrderNone).offset(p.stackOffsetNone)(R), [
|
|
91
91
|
N,
|
|
92
92
|
R,
|
|
93
93
|
M
|
|
94
|
-
]), pe =
|
|
94
|
+
]), pe = s(() => p.arc().startAngle((e) => e.x0).endAngle((e) => e.x1).innerRadius((e) => e.y0).outerRadius((e) => e.y1).padAngle(.008).padRadius(F + 10), [F]), H = s(() => z > 0 ? p.ticks(0, z, w).filter((e) => e > 0) : [], [z, w]), me = se ?? h, [U, W] = l(1), G = c(null), [K, q] = l(`-${_ / 2} -${_ / 2} ${_} ${_}`), he = s(() => {
|
|
95
95
|
if (U === 1) return K;
|
|
96
96
|
let [e, t, n, r] = K.split(" ").map(Number), i = n / U, a = r / U;
|
|
97
97
|
return `${e + (n - i) / 2} ${t + (r - a) / 2} ${i} ${a}`;
|
|
98
98
|
}, [K, U]);
|
|
99
|
-
|
|
99
|
+
o(() => {
|
|
100
100
|
let e = G.current;
|
|
101
101
|
if (!e) return;
|
|
102
102
|
let t = requestAnimationFrame(() => {
|
|
@@ -110,20 +110,20 @@ function _({ data: c, keys: m, size: _ = 500, innerRadius: v, barPadding: y = .1
|
|
|
110
110
|
return () => cancelAnimationFrame(t);
|
|
111
111
|
}, [
|
|
112
112
|
_,
|
|
113
|
-
|
|
113
|
+
r,
|
|
114
114
|
m,
|
|
115
115
|
F,
|
|
116
116
|
P,
|
|
117
117
|
S,
|
|
118
118
|
C
|
|
119
|
-
]),
|
|
119
|
+
]), o(() => {
|
|
120
120
|
if (O) return;
|
|
121
121
|
let e = (e) => {
|
|
122
122
|
e.key === "Escape" && W(1);
|
|
123
123
|
};
|
|
124
124
|
return window.addEventListener("keydown", e), () => window.removeEventListener("keydown", e);
|
|
125
125
|
}, [O]);
|
|
126
|
-
let ge =
|
|
126
|
+
let ge = a((e) => {
|
|
127
127
|
if (!E || O || !e.ctrlKey) return;
|
|
128
128
|
e.preventDefault();
|
|
129
129
|
let t = e.deltaY < 0 ? 1.15 : 1 / 1.15;
|
|
@@ -135,7 +135,7 @@ function _({ data: c, keys: m, size: _ = 500, innerRadius: v, barPadding: y = .1
|
|
|
135
135
|
disableHoverListener: O,
|
|
136
136
|
slotProps: { tooltip: { sx: { maxWidth: 240 } } }
|
|
137
137
|
}, Q = A.palette.text.primary, $ = A.palette.divider, xe = A.typography.fontFamily;
|
|
138
|
-
return /* @__PURE__ */ d(
|
|
138
|
+
return /* @__PURE__ */ d(t, {
|
|
139
139
|
style: { opacity: O ? .5 : 1 },
|
|
140
140
|
sx: {
|
|
141
141
|
display: "inline-flex",
|
|
@@ -186,23 +186,23 @@ function _({ data: c, keys: m, size: _ = 500, innerRadius: v, barPadding: y = .1
|
|
|
186
186
|
children: me(e)
|
|
187
187
|
}, `gv-${e}`)),
|
|
188
188
|
fe.map((e, t) => {
|
|
189
|
-
let
|
|
189
|
+
let r = e.key, i = j[t]?.label ?? r, a = L(r, t);
|
|
190
190
|
return e.map((e, t) => {
|
|
191
|
-
let
|
|
191
|
+
let o = e.data, s = B(o.id) ?? 0, c = s + B.bandwidth(), l = V(e[0]), u = V(e[1]);
|
|
192
192
|
if (u - l < .5) return null;
|
|
193
193
|
let f = pe({
|
|
194
|
-
x0:
|
|
194
|
+
x0: s,
|
|
195
195
|
x1: c,
|
|
196
196
|
y0: l,
|
|
197
197
|
y1: u
|
|
198
198
|
}) ?? "";
|
|
199
|
-
return /* @__PURE__ */ d(
|
|
199
|
+
return /* @__PURE__ */ d(n, {
|
|
200
200
|
...be,
|
|
201
201
|
placement: "top",
|
|
202
202
|
title: /* @__PURE__ */ d(ee, {
|
|
203
|
-
barData:
|
|
204
|
-
seriesKey:
|
|
205
|
-
seriesLabel:
|
|
203
|
+
barData: o,
|
|
204
|
+
seriesKey: r,
|
|
205
|
+
seriesLabel: i,
|
|
206
206
|
decimals: re,
|
|
207
207
|
decimalSep: ie,
|
|
208
208
|
thousandSep: ae,
|
|
@@ -210,7 +210,7 @@ function _({ data: c, keys: m, size: _ = 500, innerRadius: v, barPadding: y = .1
|
|
|
210
210
|
}),
|
|
211
211
|
children: /* @__PURE__ */ d("path", {
|
|
212
212
|
d: f,
|
|
213
|
-
fill:
|
|
213
|
+
fill: a,
|
|
214
214
|
style: {
|
|
215
215
|
cursor: O ? "not-allowed" : "pointer",
|
|
216
216
|
transition: "opacity 0.15s"
|
|
@@ -218,33 +218,33 @@ function _({ data: c, keys: m, size: _ = 500, innerRadius: v, barPadding: y = .1
|
|
|
218
218
|
onMouseEnter: (e) => {
|
|
219
219
|
if (O) return;
|
|
220
220
|
e.currentTarget.style.opacity = "0.75";
|
|
221
|
-
let t = p.sum(M, (e) =>
|
|
222
|
-
id:
|
|
223
|
-
label:
|
|
224
|
-
seriesKey:
|
|
225
|
-
value:
|
|
221
|
+
let t = p.sum(M, (e) => o.values[e] ?? 0), n = {
|
|
222
|
+
id: o.id,
|
|
223
|
+
label: o.label,
|
|
224
|
+
seriesKey: r,
|
|
225
|
+
value: o.values[r] ?? 0,
|
|
226
226
|
total: t,
|
|
227
|
-
values:
|
|
227
|
+
values: o.values
|
|
228
228
|
};
|
|
229
|
-
D?.(
|
|
229
|
+
D?.(n, e);
|
|
230
230
|
},
|
|
231
231
|
onMouseLeave: (e) => {
|
|
232
232
|
e.currentTarget.style.opacity = "1", D?.(null, e);
|
|
233
233
|
},
|
|
234
234
|
onClick: (e) => {
|
|
235
235
|
if (O) return;
|
|
236
|
-
let t = p.sum(M, (e) =>
|
|
237
|
-
id:
|
|
238
|
-
label:
|
|
239
|
-
seriesKey:
|
|
240
|
-
value:
|
|
236
|
+
let t = p.sum(M, (e) => o.values[e] ?? 0), n = {
|
|
237
|
+
id: o.id,
|
|
238
|
+
label: o.label,
|
|
239
|
+
seriesKey: r,
|
|
240
|
+
value: o.values[r] ?? 0,
|
|
241
241
|
total: t,
|
|
242
|
-
values:
|
|
242
|
+
values: o.values
|
|
243
243
|
};
|
|
244
|
-
ce?.(
|
|
244
|
+
ce?.(n, e);
|
|
245
245
|
}
|
|
246
246
|
})
|
|
247
|
-
}, `${
|
|
247
|
+
}, `${r}-${t}`);
|
|
248
248
|
});
|
|
249
249
|
}),
|
|
250
250
|
S && R.map((e) => {
|