@thebuoyant-tsdev/mui-ts-library 3.29.1 → 3.30.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (53) hide show
  1. package/README.de.md +59 -1
  2. package/README.md +59 -1
  3. package/dist/components/chord-chart/ChordChart.js +112 -112
  4. package/dist/components/circle-packing-chart/CirclePackingChart.js +135 -135
  5. package/dist/components/color-picker/ColorPicker.js +217 -217
  6. package/dist/components/color-picker/PopoverColorPicker.js +7 -7
  7. package/dist/components/date-range-picker/DateRangePicker.js +9 -9
  8. package/dist/components/gantt-chart/GanttChart.js +18 -18
  9. package/dist/components/gantt-chart/GanttTaskDialog.js +43 -43
  10. package/dist/components/gantt-chart/GanttTaskPanel.js +128 -128
  11. package/dist/components/gantt-chart/GanttTimeline.js +16 -16
  12. package/dist/components/gantt-chart/GanttToolbar.js +24 -24
  13. package/dist/components/horizontal-tree-chart/HorizontalTreeChart.js +244 -244
  14. package/dist/components/json-editor/JsonEditor.js +9 -9
  15. package/dist/components/json-editor/JsonEditorContent.js +54 -54
  16. package/dist/components/json-editor/JsonEditorToolbar.js +12 -12
  17. package/dist/components/kanban-board/KanbanBoard.d.ts +2 -0
  18. package/dist/components/kanban-board/KanbanBoard.js +129 -0
  19. package/dist/components/kanban-board/KanbanBoard.types.d.ts +84 -0
  20. package/dist/components/kanban-board/KanbanBoard.types.js +19 -0
  21. package/dist/components/kanban-board/KanbanBoardCard.d.ts +13 -0
  22. package/dist/components/kanban-board/KanbanBoardCard.js +104 -0
  23. package/dist/components/kanban-board/KanbanBoardCardDialog.d.ts +23 -0
  24. package/dist/components/kanban-board/KanbanBoardCardDialog.js +120 -0
  25. package/dist/components/kanban-board/KanbanBoardColumn.d.ts +14 -0
  26. package/dist/components/kanban-board/KanbanBoardColumn.js +129 -0
  27. package/dist/components/kanban-board/kanbanBoardClasses.d.ts +47 -0
  28. package/dist/components/kanban-board/kanbanBoardClasses.js +18 -0
  29. package/dist/components/password-strength-meter/PasswordStrengthMeter.js +27 -27
  30. package/dist/components/radial-stacked-bar-chart/RadialStackedBarChart.js +48 -48
  31. package/dist/components/radial-tree-chart/RadialTreeChart.js +173 -173
  32. package/dist/components/rich-text-editor/RichTextEditor.js +32 -32
  33. package/dist/components/rich-text-editor/RichTextEditorColorPicker.js +20 -20
  34. package/dist/components/rich-text-editor/RichTextEditorEmojiPicker.js +12 -12
  35. package/dist/components/rich-text-editor/RichTextEditorImageDialog.js +11 -11
  36. package/dist/components/rich-text-editor/RichTextEditorLinkDialog.js +11 -11
  37. package/dist/components/rich-text-editor/RichTextEditorMarkdownDialog.js +14 -14
  38. package/dist/components/rich-text-editor/RichTextEditorMentionList.js +14 -14
  39. package/dist/components/rich-text-editor/RichTextEditorTableMenu.js +28 -28
  40. package/dist/components/rich-text-editor/RichTextEditorToolbar.js +35 -35
  41. package/dist/components/sql-editor/SqlEditor.js +24 -24
  42. package/dist/components/sql-editor/SqlEditorContent.js +16 -16
  43. package/dist/components/sql-editor/SqlEditorHistoryMenu.js +15 -15
  44. package/dist/components/sql-editor/SqlEditorToolbar.js +21 -21
  45. package/dist/components/sunburst-chart/SunburstChart.js +126 -126
  46. package/dist/components/tag-selection/TagSelection.js +18 -18
  47. package/dist/components/tag-selection/TagSelectionAutocomplete.js +120 -120
  48. package/dist/components/tag-selection/TagSelectionSelectedTags.js +10 -10
  49. package/dist/index.cjs +2 -2
  50. package/dist/index.d.cts +3 -0
  51. package/dist/index.d.ts +3 -0
  52. package/dist/index.js +38 -35
  53. 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 { useCallback as t, useLayoutEffect as n, useMemo as r, useRef as i, useState as a } from "react";
3
- import { Box as o, Tooltip as s, Typography as c, useTheme as l } from "@mui/material";
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: t, seriesLabel: n, decimals: r, decimalSep: i, thousandSep: a, valueFormatter: s }) {
21
- let l = e.values[t] ?? 0, u = p.sum(Object.values(e.values)), h = u > 0 ? Math.round(l / u * 1e3) / 10 : 0, g = (e, t) => s ? s(e, t) : m(e, r, i, a);
22
- return /* @__PURE__ */ f(o, {
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(c, {
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(c, {
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
- n,
40
+ i,
41
41
  ": ",
42
- g(l, t)
42
+ g(l, n)
43
43
  ]
44
44
  }),
45
- /* @__PURE__ */ f(c, {
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: c, 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 = l(), le = {
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 = r(() => g(m), [m]), M = r(() => j.map((e) => e.key), [j]), N = c.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 = [
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 = t((e, t) => {
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 = r(() => T === "value" ? [...c].sort((e, t) => p.sum(M, (e) => t.values[e] ?? 0) - p.sum(M, (t) => e.values[t] ?? 0)) : T === "label" ? [...c].sort((e, t) => e.label.localeCompare(t.label, void 0, {
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
- })) : c, [
83
- c,
82
+ })) : r, [
83
+ r,
84
84
  T,
85
85
  M
86
- ]), z = r(() => p.max(R, (e) => p.sum(M, (t) => e.values[t] ?? 0)) ?? 0, [R, M]), B = r(() => p.scaleBand().domain(R.map((e) => e.id)).range([0, 2 * Math.PI]).padding(y), [R, y]), V = r(() => p.scaleLinear().domain([0, z]).range([F, P]), [
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 = r(() => N ? [] : p.stack().keys(M).value((e, t) => e.values[t] ?? 0).order(p.stackOrderNone).offset(p.stackOffsetNone)(R), [
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 = r(() => 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 = r(() => z > 0 ? p.ticks(0, z, w).filter((e) => e > 0) : [], [z, w]), me = se ?? h, [U, W] = a(1), G = i(null), [K, q] = a(`-${_ / 2} -${_ / 2} ${_} ${_}`), he = r(() => {
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
- n(() => {
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
- c,
113
+ r,
114
114
  m,
115
115
  F,
116
116
  P,
117
117
  S,
118
118
  C
119
- ]), n(() => {
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 = t((e) => {
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(o, {
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 n = e.key, r = j[t]?.label ?? n, i = L(n, t);
189
+ let r = e.key, i = j[t]?.label ?? r, a = L(r, t);
190
190
  return e.map((e, t) => {
191
- let a = e.data, o = B(a.id) ?? 0, c = o + B.bandwidth(), l = V(e[0]), u = V(e[1]);
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: o,
194
+ x0: s,
195
195
  x1: c,
196
196
  y0: l,
197
197
  y1: u
198
198
  }) ?? "";
199
- return /* @__PURE__ */ d(s, {
199
+ return /* @__PURE__ */ d(n, {
200
200
  ...be,
201
201
  placement: "top",
202
202
  title: /* @__PURE__ */ d(ee, {
203
- barData: a,
204
- seriesKey: n,
205
- seriesLabel: r,
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: i,
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) => a.values[e] ?? 0), r = {
222
- id: a.id,
223
- label: a.label,
224
- seriesKey: n,
225
- value: a.values[n] ?? 0,
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: a.values
227
+ values: o.values
228
228
  };
229
- D?.(r, e);
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) => a.values[e] ?? 0), r = {
237
- id: a.id,
238
- label: a.label,
239
- seriesKey: n,
240
- value: a.values[n] ?? 0,
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: a.values
242
+ values: o.values
243
243
  };
244
- ce?.(r, e);
244
+ ce?.(n, e);
245
245
  }
246
246
  })
247
- }, `${n}-${t}`);
247
+ }, `${r}-${t}`);
248
248
  });
249
249
  }),
250
250
  S && R.map((e) => {