@thebuoyant-tsdev/mui-ts-library 3.0.0 → 3.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.de.md +31 -0
- package/README.md +31 -0
- package/dist/index.cjs +1 -1
- package/dist/index.js +143 -133
- package/package.json +1 -8
package/dist/index.js
CHANGED
|
@@ -3178,7 +3178,17 @@ function ir(e) {
|
|
|
3178
3178
|
let t = parseInt(e.slice(1, 3), 16), n = parseInt(e.slice(3, 5), 16), r = parseInt(e.slice(5, 7), 16);
|
|
3179
3179
|
return (.299 * t + .587 * n + .114 * r) / 255 > .5 ? "#000000" : "#ffffff";
|
|
3180
3180
|
}
|
|
3181
|
-
function ar(
|
|
3181
|
+
function ar(e, t) {
|
|
3182
|
+
let n = t.trim();
|
|
3183
|
+
if (!n) return e;
|
|
3184
|
+
let r = e.toLowerCase().indexOf(n.toLowerCase());
|
|
3185
|
+
return r === -1 ? e : /* @__PURE__ */ X(he, { children: [
|
|
3186
|
+
e.slice(0, r),
|
|
3187
|
+
/* @__PURE__ */ Y("strong", { children: e.slice(r, r + n.length) }),
|
|
3188
|
+
e.slice(r + n.length)
|
|
3189
|
+
] });
|
|
3190
|
+
}
|
|
3191
|
+
function or({ color: e, selected: t, onClick: n }) {
|
|
3182
3192
|
return /* @__PURE__ */ Y(d, {
|
|
3183
3193
|
onClick: n,
|
|
3184
3194
|
sx: {
|
|
@@ -3201,7 +3211,7 @@ function ar({ color: e, selected: t, onClick: n }) {
|
|
|
3201
3211
|
}
|
|
3202
3212
|
});
|
|
3203
3213
|
}
|
|
3204
|
-
function
|
|
3214
|
+
function sr({ value: e, onChange: t, disabled: n = !1 }) {
|
|
3205
3215
|
return /* @__PURE__ */ Y(L, {
|
|
3206
3216
|
size: "small",
|
|
3207
3217
|
fullWidth: !0,
|
|
@@ -3231,7 +3241,7 @@ function or({ value: e, onChange: t, disabled: n = !1 }) {
|
|
|
3231
3241
|
} }) } }
|
|
3232
3242
|
});
|
|
3233
3243
|
}
|
|
3234
|
-
function
|
|
3244
|
+
function cr({ availableTags: e, searchValue: t, translation: n, onSearchChange: r, onTagSelect: i, onTagCreate: a, inputSize: o = "medium", chipSize: s = "medium", disabled: u = !1, loading: f = !1, isMaxReached: p = !1, allowCreate: h = !1, listboxMaxHeight: g }) {
|
|
3235
3245
|
let [_, v] = c("default"), [y, b] = c(null), [x, S] = c(null), [C, T] = c(!0), [E, D] = c(!1), [O, k] = c(!1), [A, j] = c("#1976d2"), [M, N] = c("#ffffff"), P = u || p, R = y !== null, z = e.filter((e) => e.label.toLowerCase().includes(t.trim().toLowerCase())), H = h && t.trim() !== "" && z.length === 0, U = O && !H, W = R ? C ? ir(y) : x ?? "#000000" : void 0, ee = () => {
|
|
3236
3246
|
let e = t.trim(), n = e.toLowerCase().replace(/\s+/g, "-");
|
|
3237
3247
|
a?.(R && y ? {
|
|
@@ -3320,10 +3330,10 @@ function sr({ availableTags: e, searchValue: t, translation: n, onSearchChange:
|
|
|
3320
3330
|
}
|
|
3321
3331
|
}
|
|
3322
3332
|
}),
|
|
3323
|
-
renderOption: ({ key: e, ...
|
|
3324
|
-
let
|
|
3333
|
+
renderOption: ({ key: e, ...n }, r) => {
|
|
3334
|
+
let i = !!(r.foregroundColor || r.backgroundColor);
|
|
3325
3335
|
return /* @__PURE__ */ Y("li", {
|
|
3326
|
-
...
|
|
3336
|
+
...n,
|
|
3327
3337
|
style: {
|
|
3328
3338
|
width: "auto",
|
|
3329
3339
|
padding: 0,
|
|
@@ -3331,11 +3341,11 @@ function sr({ availableTags: e, searchValue: t, translation: n, onSearchChange:
|
|
|
3331
3341
|
},
|
|
3332
3342
|
children: /* @__PURE__ */ Y(m, {
|
|
3333
3343
|
size: s,
|
|
3334
|
-
label:
|
|
3335
|
-
color:
|
|
3336
|
-
sx:
|
|
3337
|
-
color:
|
|
3338
|
-
backgroundColor:
|
|
3344
|
+
label: ar(r.label, t),
|
|
3345
|
+
color: i ? void 0 : r.color ?? "default",
|
|
3346
|
+
sx: i ? {
|
|
3347
|
+
color: r.foregroundColor ?? "inherit",
|
|
3348
|
+
backgroundColor: r.backgroundColor ?? "transparent"
|
|
3339
3349
|
} : void 0
|
|
3340
3350
|
})
|
|
3341
3351
|
}, e);
|
|
@@ -3428,7 +3438,7 @@ function sr({ availableTags: e, searchValue: t, translation: n, onSearchChange:
|
|
|
3428
3438
|
gridTemplateColumns: "repeat(5, 24px)",
|
|
3429
3439
|
gap: .5
|
|
3430
3440
|
},
|
|
3431
|
-
children: [nr.map((e) => /* @__PURE__ */ Y(
|
|
3441
|
+
children: [nr.map((e) => /* @__PURE__ */ Y(or, {
|
|
3432
3442
|
color: e,
|
|
3433
3443
|
selected: y === e,
|
|
3434
3444
|
onClick: () => G(e)
|
|
@@ -3437,7 +3447,7 @@ function sr({ availableTags: e, searchValue: t, translation: n, onSearchChange:
|
|
|
3437
3447
|
gridColumn: "span 5",
|
|
3438
3448
|
mt: .25
|
|
3439
3449
|
},
|
|
3440
|
-
children: /* @__PURE__ */ Y(
|
|
3450
|
+
children: /* @__PURE__ */ Y(sr, {
|
|
3441
3451
|
value: A,
|
|
3442
3452
|
onChange: ne
|
|
3443
3453
|
})
|
|
@@ -3462,7 +3472,7 @@ function sr({ availableTags: e, searchValue: t, translation: n, onSearchChange:
|
|
|
3462
3472
|
pointerEvents: C ? "none" : "auto",
|
|
3463
3473
|
transition: "opacity 0.15s"
|
|
3464
3474
|
},
|
|
3465
|
-
children: [nr.map((e) => /* @__PURE__ */ Y(
|
|
3475
|
+
children: [nr.map((e) => /* @__PURE__ */ Y(or, {
|
|
3466
3476
|
color: e,
|
|
3467
3477
|
selected: x === e,
|
|
3468
3478
|
onClick: () => re(e)
|
|
@@ -3471,7 +3481,7 @@ function sr({ availableTags: e, searchValue: t, translation: n, onSearchChange:
|
|
|
3471
3481
|
gridColumn: "span 5",
|
|
3472
3482
|
mt: .25
|
|
3473
3483
|
},
|
|
3474
|
-
children: /* @__PURE__ */ Y(
|
|
3484
|
+
children: /* @__PURE__ */ Y(sr, {
|
|
3475
3485
|
value: C ? W ?? "#000000" : M,
|
|
3476
3486
|
onChange: K,
|
|
3477
3487
|
disabled: C
|
|
@@ -3505,7 +3515,7 @@ function sr({ availableTags: e, searchValue: t, translation: n, onSearchChange:
|
|
|
3505
3515
|
}
|
|
3506
3516
|
//#endregion
|
|
3507
3517
|
//#region src/components/tag-selection/TagSelectionChip.tsx
|
|
3508
|
-
function
|
|
3518
|
+
function lr({ tag: e, onDelete: t, onClick: n, chipSize: r = "medium", disabled: i = !1 }) {
|
|
3509
3519
|
let a = !!(e.foregroundColor || e.backgroundColor);
|
|
3510
3520
|
return /* @__PURE__ */ Y(m, {
|
|
3511
3521
|
size: r,
|
|
@@ -3532,7 +3542,7 @@ function cr({ tag: e, onDelete: t, onClick: n, chipSize: r = "medium", disabled:
|
|
|
3532
3542
|
}
|
|
3533
3543
|
//#endregion
|
|
3534
3544
|
//#region src/components/tag-selection/TagSelectionSelectedTags.tsx
|
|
3535
|
-
function
|
|
3545
|
+
function ur({ selectedTags: e, translation: t, onTagDelete: n, showSelectedTagsLabel: r, chipSize: i = "medium", disabled: a = !1, maxVisibleChips: o, popoverPlacement: s = "bottom" }) {
|
|
3536
3546
|
let [l, u] = c(null), f = o === void 0 ? e : e.slice(0, o), p = o === void 0 ? [] : e.slice(o), h = !!l && p.length > 0, g = s === "top" ? {
|
|
3537
3547
|
vertical: "top",
|
|
3538
3548
|
horizontal: "left"
|
|
@@ -3562,7 +3572,7 @@ function lr({ selectedTags: e, translation: t, onTagDelete: n, showSelectedTagsL
|
|
|
3562
3572
|
flexWrap: "wrap",
|
|
3563
3573
|
gap: 1
|
|
3564
3574
|
},
|
|
3565
|
-
children: [f.map((e) => /* @__PURE__ */ Y(
|
|
3575
|
+
children: [f.map((e) => /* @__PURE__ */ Y(lr, {
|
|
3566
3576
|
tag: e,
|
|
3567
3577
|
onDelete: n,
|
|
3568
3578
|
chipSize: i,
|
|
@@ -3587,7 +3597,7 @@ function lr({ selectedTags: e, translation: t, onTagDelete: n, showSelectedTagsL
|
|
|
3587
3597
|
gap: .5,
|
|
3588
3598
|
maxWidth: 320
|
|
3589
3599
|
},
|
|
3590
|
-
children: p.map((e) => /* @__PURE__ */ Y(
|
|
3600
|
+
children: p.map((e) => /* @__PURE__ */ Y(lr, {
|
|
3591
3601
|
tag: e,
|
|
3592
3602
|
onDelete: a ? void 0 : n,
|
|
3593
3603
|
chipSize: i,
|
|
@@ -3600,7 +3610,7 @@ function lr({ selectedTags: e, translation: t, onTagDelete: n, showSelectedTagsL
|
|
|
3600
3610
|
}
|
|
3601
3611
|
//#endregion
|
|
3602
3612
|
//#region src/components/tag-selection/TagSelection.types.ts
|
|
3603
|
-
var
|
|
3613
|
+
var dr = {
|
|
3604
3614
|
selectedTagsLabel: "Selected tags",
|
|
3605
3615
|
autoCompleteLabel: "Search and add tags",
|
|
3606
3616
|
noSelectedTagsText: "No tags selected.",
|
|
@@ -3612,14 +3622,14 @@ var ur = {
|
|
|
3612
3622
|
backgroundColorLabel: "Background color",
|
|
3613
3623
|
textColorLabel: "Text color",
|
|
3614
3624
|
autoTextColorLabel: "Auto"
|
|
3615
|
-
},
|
|
3616
|
-
function
|
|
3617
|
-
let t = n(
|
|
3625
|
+
}, fr = e(null);
|
|
3626
|
+
function pr(e) {
|
|
3627
|
+
let t = n(fr);
|
|
3618
3628
|
if (!t) throw Error("TagSelectionStoreContext is missing.");
|
|
3619
3629
|
return Te(t, e);
|
|
3620
3630
|
}
|
|
3621
|
-
function
|
|
3622
|
-
let S =
|
|
3631
|
+
function mr({ tags: e, showSelectedTags: t = !0, showSelectedTagsLabel: n = !0, showAutoComplete: i = !0, inputSize: a = "medium", chipSize: s = "small", disabled: c = !1, loading: l = !1, maxTags: u, allowCreate: f = !1, maxVisibleChips: p, popoverPlacement: m = "bottom", listboxMaxHeight: h, translation: g, onTagSelect: _, onTagDelete: v, onTagsChange: y, onSearchChange: b, onTagCreate: x }) {
|
|
3632
|
+
let S = pr((e) => e.tags), C = pr((e) => e.searchValue), w = pr((e) => e.setTags), T = pr((e) => e.setSearchValue), E = pr((e) => e.selectTag), D = pr((e) => e.deleteTag), O = pr((e) => e.addTag);
|
|
3623
3633
|
r(() => {
|
|
3624
3634
|
w(e);
|
|
3625
3635
|
}, [e, w]);
|
|
@@ -3628,7 +3638,7 @@ function pr({ tags: e, showSelectedTags: t = !0, showSelectedTagsLabel: n = !0,
|
|
|
3628
3638
|
};
|
|
3629
3639
|
return /* @__PURE__ */ Y(d, {
|
|
3630
3640
|
sx: { width: "100%" },
|
|
3631
|
-
children: /* @__PURE__ */ X(F, { children: [t && /* @__PURE__ */ Y(
|
|
3641
|
+
children: /* @__PURE__ */ X(F, { children: [t && /* @__PURE__ */ Y(ur, {
|
|
3632
3642
|
selectedTags: k,
|
|
3633
3643
|
translation: g,
|
|
3634
3644
|
onTagDelete: (e) => {
|
|
@@ -3644,7 +3654,7 @@ function pr({ tags: e, showSelectedTags: t = !0, showSelectedTagsLabel: n = !0,
|
|
|
3644
3654
|
disabled: c,
|
|
3645
3655
|
maxVisibleChips: p,
|
|
3646
3656
|
popoverPlacement: m
|
|
3647
|
-
}), i && /* @__PURE__ */ Y(
|
|
3657
|
+
}), i && /* @__PURE__ */ Y(cr, {
|
|
3648
3658
|
availableTags: A,
|
|
3649
3659
|
searchValue: C,
|
|
3650
3660
|
translation: g,
|
|
@@ -3673,14 +3683,14 @@ function pr({ tags: e, showSelectedTags: t = !0, showSelectedTagsLabel: n = !0,
|
|
|
3673
3683
|
})] })
|
|
3674
3684
|
});
|
|
3675
3685
|
}
|
|
3676
|
-
function
|
|
3686
|
+
function hr({ 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 }) {
|
|
3677
3687
|
let b = {
|
|
3678
|
-
...
|
|
3688
|
+
...dr,
|
|
3679
3689
|
...i
|
|
3680
3690
|
}, [x] = c(() => er(e));
|
|
3681
|
-
return /* @__PURE__ */ Y(
|
|
3691
|
+
return /* @__PURE__ */ Y(fr.Provider, {
|
|
3682
3692
|
value: x,
|
|
3683
|
-
children: /* @__PURE__ */ Y(
|
|
3693
|
+
children: /* @__PURE__ */ Y(mr, {
|
|
3684
3694
|
tags: e,
|
|
3685
3695
|
showSelectedTags: t,
|
|
3686
3696
|
showSelectedTagsLabel: n,
|
|
@@ -3705,7 +3715,7 @@ function mr({ tags: e, showSelectedTags: t = !0, showSelectedTagsLabel: n = !0,
|
|
|
3705
3715
|
}
|
|
3706
3716
|
//#endregion
|
|
3707
3717
|
//#region src/components/rich-text-editor/RichTextEditor.types.ts
|
|
3708
|
-
var
|
|
3718
|
+
var gr = {
|
|
3709
3719
|
showBold: !0,
|
|
3710
3720
|
showItalic: !0,
|
|
3711
3721
|
showUnderline: !0,
|
|
@@ -3727,7 +3737,7 @@ var hr = {
|
|
|
3727
3737
|
showTableButton: !1,
|
|
3728
3738
|
showImageButton: !1,
|
|
3729
3739
|
showEmojiButton: !1
|
|
3730
|
-
},
|
|
3740
|
+
}, _r = {
|
|
3731
3741
|
bold: "Bold",
|
|
3732
3742
|
italic: "Italic",
|
|
3733
3743
|
underline: "Underline",
|
|
@@ -3778,7 +3788,7 @@ var hr = {
|
|
|
3778
3788
|
};
|
|
3779
3789
|
//#endregion
|
|
3780
3790
|
//#region src/components/rich-text-editor/RichTextEditorContent.tsx
|
|
3781
|
-
function
|
|
3791
|
+
function vr({ editor: e, error: t, disabled: n, readonly: r }) {
|
|
3782
3792
|
return /* @__PURE__ */ Y(d, {
|
|
3783
3793
|
sx: {
|
|
3784
3794
|
flex: 1,
|
|
@@ -3903,7 +3913,7 @@ function _r({ editor: e, error: t, disabled: n, readonly: r }) {
|
|
|
3903
3913
|
}
|
|
3904
3914
|
//#endregion
|
|
3905
3915
|
//#region src/components/rich-text-editor/RichTextEditorLinkDialog.tsx
|
|
3906
|
-
function
|
|
3916
|
+
function yr({ open: e, onClose: t, editor: n, translation: i }) {
|
|
3907
3917
|
let [a, o] = c("");
|
|
3908
3918
|
r(() => {
|
|
3909
3919
|
if (e) {
|
|
@@ -3969,7 +3979,7 @@ function vr({ open: e, onClose: t, editor: n, translation: i }) {
|
|
|
3969
3979
|
}
|
|
3970
3980
|
//#endregion
|
|
3971
3981
|
//#region src/components/rich-text-editor/RichTextEditorColorPicker.tsx
|
|
3972
|
-
var
|
|
3982
|
+
var br = [
|
|
3973
3983
|
"#000000",
|
|
3974
3984
|
"#434343",
|
|
3975
3985
|
"#666666",
|
|
@@ -3988,7 +3998,7 @@ var yr = [
|
|
|
3988
3998
|
"#8a2be2",
|
|
3989
3999
|
"#ff1493",
|
|
3990
4000
|
"#a52a2a"
|
|
3991
|
-
],
|
|
4001
|
+
], xr = [
|
|
3992
4002
|
"#ffff00",
|
|
3993
4003
|
"#ffd700",
|
|
3994
4004
|
"#ffa500",
|
|
@@ -4008,7 +4018,7 @@ var yr = [
|
|
|
4008
4018
|
"#ffffff",
|
|
4009
4019
|
"#000000"
|
|
4010
4020
|
];
|
|
4011
|
-
function
|
|
4021
|
+
function Sr({ color: e, active: t, onClick: n }) {
|
|
4012
4022
|
return /* @__PURE__ */ Y(B, {
|
|
4013
4023
|
title: e,
|
|
4014
4024
|
placement: "top",
|
|
@@ -4050,8 +4060,8 @@ function xr({ color: e, active: t, onClick: n }) {
|
|
|
4050
4060
|
})
|
|
4051
4061
|
});
|
|
4052
4062
|
}
|
|
4053
|
-
function
|
|
4054
|
-
let l = s(null), u = r === "highlight" ?
|
|
4063
|
+
function Cr({ anchorEl: e, open: t, onClose: n, mode: r, activeColor: i, onSelectColor: a, onRemoveColor: o, removeLabel: c }) {
|
|
4064
|
+
let l = s(null), u = r === "highlight" ? xr : br;
|
|
4055
4065
|
function f(e) {
|
|
4056
4066
|
a(e.target.value);
|
|
4057
4067
|
}
|
|
@@ -4075,7 +4085,7 @@ function Sr({ anchorEl: e, open: t, onClose: n, mode: r, activeColor: i, onSelec
|
|
|
4075
4085
|
gap: .5,
|
|
4076
4086
|
mb: 1
|
|
4077
4087
|
},
|
|
4078
|
-
children: u.map((e) => /* @__PURE__ */ Y(
|
|
4088
|
+
children: u.map((e) => /* @__PURE__ */ Y(Sr, {
|
|
4079
4089
|
color: e,
|
|
4080
4090
|
active: i?.toLowerCase() === e.toLowerCase(),
|
|
4081
4091
|
onClick: (e) => {
|
|
@@ -4145,7 +4155,7 @@ function Sr({ anchorEl: e, open: t, onClose: n, mode: r, activeColor: i, onSelec
|
|
|
4145
4155
|
}
|
|
4146
4156
|
//#endregion
|
|
4147
4157
|
//#region src/components/rich-text-editor/RichTextEditorTableMenu.tsx
|
|
4148
|
-
function
|
|
4158
|
+
function wr({ editor: e, translation: t, disabled: n }) {
|
|
4149
4159
|
let [r, i] = c(null), a = n || !e, o = e?.isActive("table") ?? !1;
|
|
4150
4160
|
function s() {
|
|
4151
4161
|
i(null);
|
|
@@ -4235,7 +4245,7 @@ function Cr({ editor: e, translation: t, disabled: n }) {
|
|
|
4235
4245
|
}
|
|
4236
4246
|
//#endregion
|
|
4237
4247
|
//#region src/components/rich-text-editor/RichTextEditorImageDialog.tsx
|
|
4238
|
-
function
|
|
4248
|
+
function Tr({ open: e, onClose: t, editor: n, translation: r }) {
|
|
4239
4249
|
let [i, a] = c(""), [o, s] = c("");
|
|
4240
4250
|
function l() {
|
|
4241
4251
|
let e = i.trim();
|
|
@@ -4305,7 +4315,7 @@ function wr({ open: e, onClose: t, editor: n, translation: r }) {
|
|
|
4305
4315
|
}
|
|
4306
4316
|
//#endregion
|
|
4307
4317
|
//#region src/components/rich-text-editor/util/emojis.ts
|
|
4308
|
-
var
|
|
4318
|
+
var Er = [
|
|
4309
4319
|
{
|
|
4310
4320
|
label: "Smileys",
|
|
4311
4321
|
emojis: [
|
|
@@ -5043,13 +5053,13 @@ var Tr = [
|
|
|
5043
5053
|
];
|
|
5044
5054
|
//#endregion
|
|
5045
5055
|
//#region src/components/rich-text-editor/RichTextEditorEmojiPicker.tsx
|
|
5046
|
-
function
|
|
5056
|
+
function Dr({ anchorEl: e, open: t, onClose: n, onSelect: r, translation: i }) {
|
|
5047
5057
|
let [a, s] = c(""), l = o(() => {
|
|
5048
5058
|
let e = a.trim().toLowerCase();
|
|
5049
|
-
return e ?
|
|
5059
|
+
return e ? Er.map((t) => ({
|
|
5050
5060
|
...t,
|
|
5051
5061
|
emojis: t.emojis.filter((t) => t.name.includes(e) || t.emoji === e)
|
|
5052
|
-
})).filter((e) => e.emojis.length > 0) :
|
|
5062
|
+
})).filter((e) => e.emojis.length > 0) : Er;
|
|
5053
5063
|
}, [a]);
|
|
5054
5064
|
function u(e) {
|
|
5055
5065
|
r(e), n(), s("");
|
|
@@ -5146,7 +5156,7 @@ function Er({ anchorEl: e, open: t, onClose: n, onSelect: r, translation: i }) {
|
|
|
5146
5156
|
}
|
|
5147
5157
|
//#endregion
|
|
5148
5158
|
//#region src/components/rich-text-editor/RichTextEditorToolbar.tsx
|
|
5149
|
-
function
|
|
5159
|
+
function Or({ label: e, icon: t, activeColor: n, disabled: r, onClick: i }) {
|
|
5150
5160
|
return /* @__PURE__ */ Y(B, {
|
|
5151
5161
|
title: e,
|
|
5152
5162
|
arrow: !0,
|
|
@@ -5178,7 +5188,7 @@ function Dr({ label: e, icon: t, activeColor: n, disabled: r, onClick: i }) {
|
|
|
5178
5188
|
}) })
|
|
5179
5189
|
});
|
|
5180
5190
|
}
|
|
5181
|
-
function
|
|
5191
|
+
function kr({ level: e }) {
|
|
5182
5192
|
return /* @__PURE__ */ X(d, {
|
|
5183
5193
|
component: "span",
|
|
5184
5194
|
sx: {
|
|
@@ -5189,7 +5199,7 @@ function Or({ level: e }) {
|
|
|
5189
5199
|
children: ["H", e]
|
|
5190
5200
|
});
|
|
5191
5201
|
}
|
|
5192
|
-
function
|
|
5202
|
+
function Ar({ editor: e, toolbarConfig: t, translation: n, disabled: r, isFullscreen: i, onToggleFullscreen: a }) {
|
|
5193
5203
|
let [o, s] = c(!1), [l, u] = c(!1), [f, p] = c(null), [m, h] = c(null), [g, _] = c(null), v = r || !e, y = e?.getAttributes("textStyle")?.color, x = e?.getAttributes("highlight")?.color, S = t.showBold || t.showItalic || t.showUnderline || t.showStrike, C = 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 = [
|
|
5194
5204
|
S,
|
|
5195
5205
|
C,
|
|
@@ -5264,21 +5274,21 @@ function kr({ editor: e, toolbarConfig: t, translation: n, disabled: r, isFullsc
|
|
|
5264
5274
|
children: [
|
|
5265
5275
|
t.showHeading1 && /* @__PURE__ */ Y(Q, {
|
|
5266
5276
|
label: n.heading1,
|
|
5267
|
-
icon: /* @__PURE__ */ Y(
|
|
5277
|
+
icon: /* @__PURE__ */ Y(kr, { level: 1 }),
|
|
5268
5278
|
onClick: () => e?.chain().focus().toggleHeading({ level: 1 }).run(),
|
|
5269
5279
|
active: e?.isActive("heading", { level: 1 }),
|
|
5270
5280
|
disabled: v
|
|
5271
5281
|
}),
|
|
5272
5282
|
t.showHeading2 && /* @__PURE__ */ Y(Q, {
|
|
5273
5283
|
label: n.heading2,
|
|
5274
|
-
icon: /* @__PURE__ */ Y(
|
|
5284
|
+
icon: /* @__PURE__ */ Y(kr, { level: 2 }),
|
|
5275
5285
|
onClick: () => e?.chain().focus().toggleHeading({ level: 2 }).run(),
|
|
5276
5286
|
active: e?.isActive("heading", { level: 2 }),
|
|
5277
5287
|
disabled: v
|
|
5278
5288
|
}),
|
|
5279
5289
|
t.showHeading3 && /* @__PURE__ */ Y(Q, {
|
|
5280
5290
|
label: n.heading3,
|
|
5281
|
-
icon: /* @__PURE__ */ Y(
|
|
5291
|
+
icon: /* @__PURE__ */ Y(kr, { level: 3 }),
|
|
5282
5292
|
onClick: () => e?.chain().focus().toggleHeading({ level: 3 }).run(),
|
|
5283
5293
|
active: e?.isActive("heading", { level: 3 }),
|
|
5284
5294
|
disabled: v
|
|
@@ -5347,13 +5357,13 @@ function kr({ editor: e, toolbarConfig: t, translation: n, disabled: r, isFullsc
|
|
|
5347
5357
|
display: "flex",
|
|
5348
5358
|
gap: .25
|
|
5349
5359
|
},
|
|
5350
|
-
children: [t.showTextColor && /* @__PURE__ */ Y(
|
|
5360
|
+
children: [t.showTextColor && /* @__PURE__ */ Y(Or, {
|
|
5351
5361
|
label: n.textColor,
|
|
5352
5362
|
icon: /* @__PURE__ */ Y(ft, { fontSize: "small" }),
|
|
5353
5363
|
activeColor: y,
|
|
5354
5364
|
disabled: v,
|
|
5355
5365
|
onClick: (e) => h(e.currentTarget)
|
|
5356
|
-
}), t.showHighlight && /* @__PURE__ */ Y(
|
|
5366
|
+
}), t.showHighlight && /* @__PURE__ */ Y(Or, {
|
|
5357
5367
|
label: n.highlight,
|
|
5358
5368
|
icon: /* @__PURE__ */ Y(pt, { fontSize: "small" }),
|
|
5359
5369
|
activeColor: x,
|
|
@@ -5391,7 +5401,7 @@ function kr({ editor: e, toolbarConfig: t, translation: n, disabled: r, isFullsc
|
|
|
5391
5401
|
gap: .25
|
|
5392
5402
|
},
|
|
5393
5403
|
children: [
|
|
5394
|
-
t.showTableButton && /* @__PURE__ */ Y(
|
|
5404
|
+
t.showTableButton && /* @__PURE__ */ Y(wr, {
|
|
5395
5405
|
editor: e,
|
|
5396
5406
|
translation: n,
|
|
5397
5407
|
disabled: v
|
|
@@ -5436,13 +5446,13 @@ function kr({ editor: e, toolbarConfig: t, translation: n, disabled: r, isFullsc
|
|
|
5436
5446
|
})
|
|
5437
5447
|
]
|
|
5438
5448
|
}),
|
|
5439
|
-
t.showLink && e && /* @__PURE__ */ Y(
|
|
5449
|
+
t.showLink && e && /* @__PURE__ */ Y(yr, {
|
|
5440
5450
|
open: o,
|
|
5441
5451
|
onClose: () => s(!1),
|
|
5442
5452
|
editor: e,
|
|
5443
5453
|
translation: n
|
|
5444
5454
|
}),
|
|
5445
|
-
t.showTextColor && /* @__PURE__ */ Y(
|
|
5455
|
+
t.showTextColor && /* @__PURE__ */ Y(Cr, {
|
|
5446
5456
|
anchorEl: m,
|
|
5447
5457
|
open: !!m,
|
|
5448
5458
|
onClose: () => h(null),
|
|
@@ -5452,7 +5462,7 @@ function kr({ editor: e, toolbarConfig: t, translation: n, disabled: r, isFullsc
|
|
|
5452
5462
|
onRemoveColor: () => e?.chain().focus().unsetColor().run(),
|
|
5453
5463
|
removeLabel: n.removeTextColor
|
|
5454
5464
|
}),
|
|
5455
|
-
t.showHighlight && /* @__PURE__ */ Y(
|
|
5465
|
+
t.showHighlight && /* @__PURE__ */ Y(Cr, {
|
|
5456
5466
|
anchorEl: g,
|
|
5457
5467
|
open: !!g,
|
|
5458
5468
|
onClose: () => _(null),
|
|
@@ -5462,13 +5472,13 @@ function kr({ editor: e, toolbarConfig: t, translation: n, disabled: r, isFullsc
|
|
|
5462
5472
|
onRemoveColor: () => e?.chain().focus().unsetHighlight().run(),
|
|
5463
5473
|
removeLabel: n.removeHighlight
|
|
5464
5474
|
}),
|
|
5465
|
-
t.showImageButton && e && /* @__PURE__ */ Y(
|
|
5475
|
+
t.showImageButton && e && /* @__PURE__ */ Y(Tr, {
|
|
5466
5476
|
open: l,
|
|
5467
5477
|
onClose: () => u(!1),
|
|
5468
5478
|
editor: e,
|
|
5469
5479
|
translation: n
|
|
5470
5480
|
}),
|
|
5471
|
-
t.showEmojiButton && /* @__PURE__ */ Y(
|
|
5481
|
+
t.showEmojiButton && /* @__PURE__ */ Y(Dr, {
|
|
5472
5482
|
anchorEl: f,
|
|
5473
5483
|
open: !!f,
|
|
5474
5484
|
onClose: () => p(null),
|
|
@@ -5479,7 +5489,7 @@ function kr({ editor: e, toolbarConfig: t, translation: n, disabled: r, isFullsc
|
|
|
5479
5489
|
}
|
|
5480
5490
|
//#endregion
|
|
5481
5491
|
//#region src/components/rich-text-editor/RichTextEditorFooter.tsx
|
|
5482
|
-
function
|
|
5492
|
+
function jr({ helperText: e, error: t, showCharacterCount: n, charCount: r, maxCharacters: i, showWordCount: a, wordCount: o, translation: s }) {
|
|
5483
5493
|
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", u = s.wordCount.replace("{count}", String(o));
|
|
5484
5494
|
return /* @__PURE__ */ X(d, {
|
|
5485
5495
|
sx: {
|
|
@@ -5509,12 +5519,12 @@ function Ar({ helperText: e, error: t, showCharacterCount: n, charCount: r, maxC
|
|
|
5509
5519
|
}
|
|
5510
5520
|
//#endregion
|
|
5511
5521
|
//#region src/components/rich-text-editor/RichTextEditor.tsx
|
|
5512
|
-
function
|
|
5522
|
+
function Mr({ disabled: e = !1, error: t = !1, height: n, helperText: i, maxCharacters: a, name: o, placeholder: s, readonly: l = !1, showCharacterCount: u = !1, showToolbar: f = !0, showWordCount: p = !1, toolbarConfig: m, translation: h, value: g, width: _, onBlur: v, onChange: y, onFocus: x }) {
|
|
5513
5523
|
let S = {
|
|
5514
|
-
...
|
|
5524
|
+
..._r,
|
|
5515
5525
|
...h
|
|
5516
5526
|
}, C = {
|
|
5517
|
-
...
|
|
5527
|
+
...gr,
|
|
5518
5528
|
...m
|
|
5519
5529
|
}, [w, T] = c(!1), E = Pt(n), D = Pt(_), O = E === "auto", k = O ? void 0 : E ?? 200, A = a !== void 0 && a > 0 || u || p, j = He({
|
|
5520
5530
|
shouldRerenderOnTransaction: !0,
|
|
@@ -5591,21 +5601,21 @@ function jr({ disabled: e = !1, error: t = !1, height: n, helperText: i, maxChar
|
|
|
5591
5601
|
borderWidth: 2
|
|
5592
5602
|
}
|
|
5593
5603
|
},
|
|
5594
|
-
children: [f && !l && /* @__PURE__ */ X(he, { children: [/* @__PURE__ */ Y(
|
|
5604
|
+
children: [f && !l && /* @__PURE__ */ X(he, { children: [/* @__PURE__ */ Y(Ar, {
|
|
5595
5605
|
editor: j,
|
|
5596
5606
|
toolbarConfig: C,
|
|
5597
5607
|
translation: S,
|
|
5598
5608
|
disabled: e,
|
|
5599
5609
|
isFullscreen: w,
|
|
5600
5610
|
onToggleFullscreen: () => T((e) => !e)
|
|
5601
|
-
}), /* @__PURE__ */ Y(b, {})] }), /* @__PURE__ */ Y(
|
|
5611
|
+
}), /* @__PURE__ */ Y(b, {})] }), /* @__PURE__ */ Y(vr, {
|
|
5602
5612
|
editor: j,
|
|
5603
5613
|
error: t,
|
|
5604
5614
|
disabled: e,
|
|
5605
5615
|
readonly: l
|
|
5606
5616
|
})]
|
|
5607
5617
|
}),
|
|
5608
|
-
F && /* @__PURE__ */ Y(
|
|
5618
|
+
F && /* @__PURE__ */ Y(jr, {
|
|
5609
5619
|
helperText: i,
|
|
5610
5620
|
error: t,
|
|
5611
5621
|
showCharacterCount: u || a !== void 0 && a > 0,
|
|
@@ -5625,13 +5635,13 @@ function jr({ disabled: e = !1, error: t = !1, height: n, helperText: i, maxChar
|
|
|
5625
5635
|
}
|
|
5626
5636
|
//#endregion
|
|
5627
5637
|
//#region src/components/sql-editor/SqlEditor.types.ts
|
|
5628
|
-
var
|
|
5638
|
+
var Nr = {
|
|
5629
5639
|
showFormat: !0,
|
|
5630
5640
|
showCopy: !0,
|
|
5631
5641
|
showClear: !0,
|
|
5632
5642
|
showExecute: !1,
|
|
5633
5643
|
showUndoRedo: !0
|
|
5634
|
-
},
|
|
5644
|
+
}, Pr = {
|
|
5635
5645
|
format: "Format SQL",
|
|
5636
5646
|
copy: "Copy",
|
|
5637
5647
|
copySuccess: "Copied!",
|
|
@@ -5641,14 +5651,14 @@ var Mr = {
|
|
|
5641
5651
|
redo: "Redo",
|
|
5642
5652
|
lineColumn: "Ln {line}, Col {col}",
|
|
5643
5653
|
errorCount: "{count} error(s)"
|
|
5644
|
-
},
|
|
5654
|
+
}, Fr = {
|
|
5645
5655
|
standard: St,
|
|
5646
5656
|
mysql: yt,
|
|
5647
5657
|
postgresql: bt,
|
|
5648
5658
|
sqlite: xt,
|
|
5649
5659
|
mssql: vt
|
|
5650
5660
|
};
|
|
5651
|
-
function
|
|
5661
|
+
function Ir({ value: e, onChange: t, placeholder: n, disabled: i = !1, readonly: a = !1, showLineNumbers: o = !0, dialect: c = "standard", keywordColor: l, stringColor: u, identifierColor: f, schema: p, onExecute: m, onLint: h, onDiagnosticsChange: g, onViewReady: _, onCursorChange: v, onBlur: y, onFocus: b }) {
|
|
5652
5662
|
let x = s(null), S = s(null), C = s(t), w = s(v), T = s(y), E = s(b), D = s(_), O = s(m), k = s(h), A = s(g), j = s(new re()), M = s(new re()), N = H(), P = N.palette.mode === "dark", F = !!h, I = JSON.stringify(p);
|
|
5653
5663
|
return r(() => {
|
|
5654
5664
|
C.current = t;
|
|
@@ -5799,7 +5809,7 @@ function Fr({ value: e, onChange: t, placeholder: n, disabled: i = !1, readonly:
|
|
|
5799
5809
|
h,
|
|
5800
5810
|
de(m),
|
|
5801
5811
|
Ct({
|
|
5802
|
-
dialect:
|
|
5812
|
+
dialect: Fr[c],
|
|
5803
5813
|
schema: g
|
|
5804
5814
|
}),
|
|
5805
5815
|
oe(),
|
|
@@ -5877,14 +5887,14 @@ function Fr({ value: e, onChange: t, placeholder: n, disabled: i = !1, readonly:
|
|
|
5877
5887
|
}
|
|
5878
5888
|
//#endregion
|
|
5879
5889
|
//#region src/components/sql-editor/SqlEditorToolbar.tsx
|
|
5880
|
-
var
|
|
5890
|
+
var Lr = {
|
|
5881
5891
|
standard: "sql",
|
|
5882
5892
|
mysql: "mysql",
|
|
5883
5893
|
postgresql: "postgresql",
|
|
5884
5894
|
sqlite: "sqlite",
|
|
5885
5895
|
mssql: "tsql"
|
|
5886
5896
|
};
|
|
5887
|
-
function
|
|
5897
|
+
function Rr({ editorView: e, toolbarConfig: t, translation: n, dialect: r, disabled: i, onExecute: a }) {
|
|
5888
5898
|
let [o, s] = c(!1), l = i || !e;
|
|
5889
5899
|
function u() {
|
|
5890
5900
|
let t = e?.state.doc.toString() ?? "";
|
|
@@ -5913,7 +5923,7 @@ function Lr({ editorView: e, toolbarConfig: t, translation: n, dialect: r, disab
|
|
|
5913
5923
|
if (!t) return;
|
|
5914
5924
|
let n = t.state.doc.toString();
|
|
5915
5925
|
try {
|
|
5916
|
-
let e = Dt(n, { language:
|
|
5926
|
+
let e = Dt(n, { language: Lr[r] });
|
|
5917
5927
|
t.dispatch({ changes: {
|
|
5918
5928
|
from: 0,
|
|
5919
5929
|
to: t.state.doc.length,
|
|
@@ -6014,7 +6024,7 @@ function Lr({ editorView: e, toolbarConfig: t, translation: n, dialect: r, disab
|
|
|
6014
6024
|
}
|
|
6015
6025
|
//#endregion
|
|
6016
6026
|
//#region src/components/sql-editor/SqlEditorFooter.tsx
|
|
6017
|
-
function
|
|
6027
|
+
function zr({ helperText: e, error: t, showLineColumn: n, showErrorCount: r, diagnosticsCount: i, cursorLine: a, cursorCol: o, translation: s }) {
|
|
6018
6028
|
let c = s.lineColumn.replace("{line}", String(a)).replace("{col}", String(o)), l = s.errorCount.replace("{count}", String(i));
|
|
6019
6029
|
return /* @__PURE__ */ X(d, {
|
|
6020
6030
|
sx: {
|
|
@@ -6055,12 +6065,12 @@ function Rr({ helperText: e, error: t, showLineColumn: n, showErrorCount: r, dia
|
|
|
6055
6065
|
}
|
|
6056
6066
|
//#endregion
|
|
6057
6067
|
//#region src/components/sql-editor/SqlEditor.tsx
|
|
6058
|
-
function
|
|
6068
|
+
function Br({ value: e, onChange: n, placeholder: r, height: i, width: a, disabled: o = !1, readonly: l = !1, error: u = !1, helperText: f, name: p, dialect: m = "standard", showLineNumbers: h = !0, showLineColumn: g = !0, showErrorCount: _ = !1, toolbarConfig: v, translation: y, highlightColors: x, schema: S, onExecute: C, onLint: w, onBlur: T, onFocus: E }) {
|
|
6059
6069
|
let D = {
|
|
6060
|
-
...
|
|
6070
|
+
...Pr,
|
|
6061
6071
|
...y
|
|
6062
6072
|
}, O = {
|
|
6063
|
-
...
|
|
6073
|
+
...Nr,
|
|
6064
6074
|
...v
|
|
6065
6075
|
}, k = Pt(i), A = Pt(a), j = k === "auto", N = j ? void 0 : k ?? 300, P = s(null), [F, I] = c(null), [L, R] = c({
|
|
6066
6076
|
line: 1,
|
|
@@ -6098,14 +6108,14 @@ function zr({ value: e, onChange: n, placeholder: r, height: i, width: a, disabl
|
|
|
6098
6108
|
borderWidth: 2
|
|
6099
6109
|
}
|
|
6100
6110
|
},
|
|
6101
|
-
children: [!l && /* @__PURE__ */ X(he, { children: [/* @__PURE__ */ Y(
|
|
6111
|
+
children: [!l && /* @__PURE__ */ X(he, { children: [/* @__PURE__ */ Y(Rr, {
|
|
6102
6112
|
editorView: F,
|
|
6103
6113
|
toolbarConfig: O,
|
|
6104
6114
|
translation: D,
|
|
6105
6115
|
dialect: m,
|
|
6106
6116
|
disabled: o,
|
|
6107
6117
|
onExecute: C
|
|
6108
|
-
}), /* @__PURE__ */ Y(b, {})] }), /* @__PURE__ */ Y(
|
|
6118
|
+
}), /* @__PURE__ */ Y(b, {})] }), /* @__PURE__ */ Y(Ir, {
|
|
6109
6119
|
value: e,
|
|
6110
6120
|
onChange: n,
|
|
6111
6121
|
placeholder: r,
|
|
@@ -6126,7 +6136,7 @@ function zr({ value: e, onChange: n, placeholder: r, height: i, width: a, disabl
|
|
|
6126
6136
|
onFocus: E
|
|
6127
6137
|
})]
|
|
6128
6138
|
}),
|
|
6129
|
-
W && /* @__PURE__ */ Y(
|
|
6139
|
+
W && /* @__PURE__ */ Y(zr, {
|
|
6130
6140
|
helperText: f,
|
|
6131
6141
|
error: u,
|
|
6132
6142
|
showLineColumn: g,
|
|
@@ -6146,17 +6156,17 @@ function zr({ value: e, onChange: n, placeholder: r, height: i, width: a, disabl
|
|
|
6146
6156
|
}
|
|
6147
6157
|
//#endregion
|
|
6148
6158
|
//#region src/components/sunburst-chart/SunburstChart.tsx
|
|
6149
|
-
var
|
|
6150
|
-
function
|
|
6159
|
+
var Vr = 2 * Math.PI, Hr = 11, Ur = Hr * .5, Wr = 5;
|
|
6160
|
+
function Gr(e, t = 0, n = ".", r = ",") {
|
|
6151
6161
|
if (e == null || !isFinite(e)) return "0";
|
|
6152
6162
|
let [i, a] = e.toFixed(Math.max(0, t)).split("."), o = i.replace(/\B(?=(\d{3})+(?!\d))/g, r);
|
|
6153
6163
|
return a ? `${o}${n}${a}` : o;
|
|
6154
6164
|
}
|
|
6155
|
-
function
|
|
6156
|
-
let n = Math.floor(t /
|
|
6157
|
-
return n <= 0 ? "" : e.length <= n ? e : n <
|
|
6165
|
+
function Kr(e, t) {
|
|
6166
|
+
let n = Math.floor(t / Ur);
|
|
6167
|
+
return n <= 0 ? "" : e.length <= n ? e : n < Wr ? "" : e.slice(0, n - 1) + "…";
|
|
6158
6168
|
}
|
|
6159
|
-
function
|
|
6169
|
+
function qr({ node: e, valueDecimalCount: t, valueDecimalSep: n, valueThousandsSep: r }) {
|
|
6160
6170
|
let i = (e.value ?? 0) > 0, a = e.ancestors().map((e) => e.data.name).reverse().join(" › ");
|
|
6161
6171
|
return /* @__PURE__ */ X(d, {
|
|
6162
6172
|
sx: { py: .25 },
|
|
@@ -6175,7 +6185,7 @@ function Kr({ node: e, valueDecimalCount: t, valueDecimalSep: n, valueThousandsS
|
|
|
6175
6185
|
display: "block",
|
|
6176
6186
|
opacity: .85
|
|
6177
6187
|
},
|
|
6178
|
-
children:
|
|
6188
|
+
children: Gr(e.value ?? 0, t, n, r)
|
|
6179
6189
|
}),
|
|
6180
6190
|
e.depth > 0 && /* @__PURE__ */ Y(V, {
|
|
6181
6191
|
variant: "caption",
|
|
@@ -6189,7 +6199,7 @@ function Kr({ node: e, valueDecimalCount: t, valueDecimalSep: n, valueThousandsS
|
|
|
6189
6199
|
]
|
|
6190
6200
|
});
|
|
6191
6201
|
}
|
|
6192
|
-
function
|
|
6202
|
+
function Jr({ data: e, size: n = 500, showSegmentLabels: r = !0, innerRadius: i = 0, sortBy: l = "value", chartColors: u, showRootLabel: f = !0, onSegmentClick: p, onZoomChange: m, valueDecimalCount: h = 0, valueDecimalSeparator: g = ".", valueThousandsSeparator: _ = ",", zoomable: v = !1, disabled: y = !1 }) {
|
|
6193
6203
|
let b = H(), x = s(null), [S, C] = c(`-${n / 2} -${n / 2} ${n} ${n}`), [w, T] = c(1), E = o(() => {
|
|
6194
6204
|
if (w === 1) return S;
|
|
6195
6205
|
let [e, t, n, r] = S.split(" ").map(Number), i = n / w, a = r / w;
|
|
@@ -6207,7 +6217,7 @@ function qr({ data: e, size: n = 500, showSegmentLabels: r = !0, innerRadius: i
|
|
|
6207
6217
|
numeric: !0,
|
|
6208
6218
|
sensitivity: "base"
|
|
6209
6219
|
}));
|
|
6210
|
-
let n = Z.partition().size([
|
|
6220
|
+
let n = Z.partition().size([Vr, k])(t), r = Z.max(n.descendants(), (e) => e.depth) ?? 0, i = r > 0 ? k / r : k;
|
|
6211
6221
|
return r > 0 && n.descendants().forEach((e) => {
|
|
6212
6222
|
e.depth === 0 ? (e.y0 = 0, e.y1 = 0) : (e.y0 = (e.depth - 1) * i, e.y1 = e.depth * i);
|
|
6213
6223
|
}), {
|
|
@@ -6226,7 +6236,7 @@ function qr({ data: e, size: n = 500, showSegmentLabels: r = !0, innerRadius: i
|
|
|
6226
6236
|
for (; t.depth > 1;) t = t.parent;
|
|
6227
6237
|
return z(t.data.name);
|
|
6228
6238
|
}, U = o(() => Z.arc().startAngle((e) => e.x0).endAngle((e) => e.x1).padAngle((e) => Math.min((e.x1 - e.x0) / 2, .005)).padRadius(D / 2).innerRadius((e) => O + e.y0).outerRadius((e) => O + e.y1 - 1), [D, O]), W = t((e) => {
|
|
6229
|
-
let t =
|
|
6239
|
+
let t = Vr / (P.x1 - P.x0), n = Math.max(0, Math.min(Vr, (e.x0 - P.x0) * t)), r = Math.max(0, Math.min(Vr, (e.x1 - P.x0) * t)), i = P.depth === 0 ? 0 : (P.depth - 1) * N;
|
|
6230
6240
|
return {
|
|
6231
6241
|
x0: n,
|
|
6232
6242
|
x1: r,
|
|
@@ -6369,7 +6379,7 @@ function qr({ data: e, size: n = 500, showSegmentLabels: r = !0, innerRadius: i
|
|
|
6369
6379
|
return /* @__PURE__ */ Y(B, {
|
|
6370
6380
|
...de,
|
|
6371
6381
|
placement: "top",
|
|
6372
|
-
title: r ? /* @__PURE__ */ Y(
|
|
6382
|
+
title: r ? /* @__PURE__ */ Y(qr, {
|
|
6373
6383
|
node: e,
|
|
6374
6384
|
valueDecimalCount: h,
|
|
6375
6385
|
valueDecimalSep: g,
|
|
@@ -6398,11 +6408,11 @@ function qr({ data: e, size: n = 500, showSegmentLabels: r = !0, innerRadius: i
|
|
|
6398
6408
|
if (!ne(e)) return null;
|
|
6399
6409
|
let n = W(e);
|
|
6400
6410
|
if (!te(n)) return null;
|
|
6401
|
-
let r = (O + (n.y0 + n.y1) / 2) * (n.x1 - n.x0) * .88, i =
|
|
6411
|
+
let r = (O + (n.y0 + n.y1) / 2) * (n.x1 - n.x0) * .88, i = Kr(e.data.name, r);
|
|
6402
6412
|
return i ? /* @__PURE__ */ Y("text", {
|
|
6403
6413
|
transform: G(n),
|
|
6404
6414
|
dy: "0.35em",
|
|
6405
|
-
fontSize:
|
|
6415
|
+
fontSize: Hr,
|
|
6406
6416
|
children: i
|
|
6407
6417
|
}, `lbl-${e.data.id}-${t}`) : null;
|
|
6408
6418
|
})
|
|
@@ -6430,18 +6440,18 @@ function qr({ data: e, size: n = 500, showSegmentLabels: r = !0, innerRadius: i
|
|
|
6430
6440
|
})
|
|
6431
6441
|
});
|
|
6432
6442
|
}
|
|
6433
|
-
|
|
6443
|
+
Jr.displayName = "SunburstChart";
|
|
6434
6444
|
//#endregion
|
|
6435
6445
|
//#region src/components/sunburst-chart/SunburstChart.types.ts
|
|
6436
|
-
var
|
|
6446
|
+
var Yr = { noData: "No data" };
|
|
6437
6447
|
//#endregion
|
|
6438
6448
|
//#region src/components/chord-chart/ChordChart.tsx
|
|
6439
|
-
function
|
|
6449
|
+
function Xr(e, t = 0, n = ".", r = ",") {
|
|
6440
6450
|
if (!isFinite(e)) return String(e);
|
|
6441
6451
|
let [i, a] = e.toFixed(Math.max(0, t)).split("."), o = i.replace(/\B(?=(\d{3})+(?!\d))/g, r);
|
|
6442
6452
|
return a ? `${o}${n}${a}` : o;
|
|
6443
6453
|
}
|
|
6444
|
-
function
|
|
6454
|
+
function Zr({ name: e, valueOut: t, valueIn: n, fmt: r }) {
|
|
6445
6455
|
return /* @__PURE__ */ X(d, {
|
|
6446
6456
|
sx: { py: .25 },
|
|
6447
6457
|
children: [
|
|
@@ -6472,7 +6482,7 @@ function Xr({ name: e, valueOut: t, valueIn: n, fmt: r }) {
|
|
|
6472
6482
|
]
|
|
6473
6483
|
});
|
|
6474
6484
|
}
|
|
6475
|
-
function
|
|
6485
|
+
function Qr({ sourceName: e, targetName: t, sourceValue: n, targetValue: r, directed: i, fmt: a }) {
|
|
6476
6486
|
return /* @__PURE__ */ X(d, {
|
|
6477
6487
|
sx: { py: .25 },
|
|
6478
6488
|
children: [
|
|
@@ -6514,7 +6524,7 @@ function Zr({ sourceName: e, targetName: t, sourceValue: n, targetValue: r, dire
|
|
|
6514
6524
|
]
|
|
6515
6525
|
});
|
|
6516
6526
|
}
|
|
6517
|
-
function
|
|
6527
|
+
function $r({ data: e, size: n = 500, innerRadius: r, ringThickness: i = 20, padAngle: l, ribbonPadAngle: u, sortSubgroups: f = "descending", sortChords: p = "descending", chartColors: m, groupColorConfigs: h, showGroupLabels: g = !0, labelOffset: _ = 8, ribbonOpacity: v = .75, ribbonBlendMode: y = "multiply", directed: b = !0, valueDecimalCount: x = 0, valueDecimalSeparator: S = ".", valueThousandsSeparator: C = ",", onGroupClick: w, onChordClick: T, zoomable: E = !1, disabled: D = !1 }) {
|
|
6518
6528
|
let O = H(), k = [
|
|
6519
6529
|
O.palette.primary.main,
|
|
6520
6530
|
O.palette.secondary.main,
|
|
@@ -6522,7 +6532,7 @@ function Qr({ data: e, size: n = 500, innerRadius: r, ringThickness: i = 20, pad
|
|
|
6522
6532
|
O.palette.warning.main,
|
|
6523
6533
|
O.palette.success.main,
|
|
6524
6534
|
O.palette.info.main
|
|
6525
|
-
], A = m && m.length > 0 ? m : k, j = r ?? Math.min(n, n) * .5 - 90, M = Math.max(10, j), N = M + Math.max(1, i), P = l ?? 10 / M, F = u ?? 1 / M, I = t((e) =>
|
|
6535
|
+
], A = m && m.length > 0 ? m : k, j = r ?? Math.min(n, n) * .5 - 90, M = Math.max(10, j), N = M + Math.max(1, i), P = l ?? 10 / M, F = u ?? 1 / M, I = t((e) => Xr(e, x, S, C), [
|
|
6526
6536
|
x,
|
|
6527
6537
|
S,
|
|
6528
6538
|
C
|
|
@@ -6651,7 +6661,7 @@ function Qr({ data: e, size: n = 500, innerRadius: r, ringThickness: i = 20, pad
|
|
|
6651
6661
|
let t = se(e), n = q === e.index, r = q !== null && !n;
|
|
6652
6662
|
return /* @__PURE__ */ Y(B, {
|
|
6653
6663
|
...fe,
|
|
6654
|
-
title: /* @__PURE__ */ Y(
|
|
6664
|
+
title: /* @__PURE__ */ Y(Zr, {
|
|
6655
6665
|
name: t.name,
|
|
6656
6666
|
valueOut: t.valueOut,
|
|
6657
6667
|
valueIn: t.valueIn,
|
|
@@ -6686,7 +6696,7 @@ function Qr({ data: e, size: n = 500, innerRadius: r, ringThickness: i = 20, pad
|
|
|
6686
6696
|
let n = ce(e), r = q === null || e.source.index === q || e.target.index === q;
|
|
6687
6697
|
return /* @__PURE__ */ Y(B, {
|
|
6688
6698
|
...fe,
|
|
6689
|
-
title: /* @__PURE__ */ Y(
|
|
6699
|
+
title: /* @__PURE__ */ Y(Qr, {
|
|
6690
6700
|
sourceName: n.source.name,
|
|
6691
6701
|
targetName: n.target.name,
|
|
6692
6702
|
sourceValue: n.source.value,
|
|
@@ -6712,18 +6722,18 @@ function Qr({ data: e, size: n = 500, innerRadius: r, ringThickness: i = 20, pad
|
|
|
6712
6722
|
})
|
|
6713
6723
|
});
|
|
6714
6724
|
}
|
|
6715
|
-
|
|
6725
|
+
$r.displayName = "ChordChart";
|
|
6716
6726
|
//#endregion
|
|
6717
6727
|
//#region src/components/chord-chart/ChordChart.types.ts
|
|
6718
|
-
var
|
|
6728
|
+
var ei = { noData: "No data" }, ti = {
|
|
6719
6729
|
noData: "No data",
|
|
6720
6730
|
specialValueA: "Value A",
|
|
6721
6731
|
specialValueB: "Value B"
|
|
6722
|
-
},
|
|
6732
|
+
}, ni = {
|
|
6723
6733
|
folder: "M20 6h-8l-2-2H4c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V8c0-1.1-.9-2-2-2zm0 12H4V8h16v10z",
|
|
6724
6734
|
person: "M12 12c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm0 2c-2.67 0-8 1.34-8 4v2h16v-2c0-2.66-5.33-4-8-4z"
|
|
6725
6735
|
};
|
|
6726
|
-
function
|
|
6736
|
+
function ri({ path: e, size: t }) {
|
|
6727
6737
|
let n = t / 2;
|
|
6728
6738
|
return /* @__PURE__ */ Y("g", {
|
|
6729
6739
|
transform: `translate(${-n},${-n})`,
|
|
@@ -6740,7 +6750,7 @@ function ni({ path: e, size: t }) {
|
|
|
6740
6750
|
})
|
|
6741
6751
|
});
|
|
6742
6752
|
}
|
|
6743
|
-
function
|
|
6753
|
+
function ii({ info: e, labelA: t, labelB: n }) {
|
|
6744
6754
|
return /* @__PURE__ */ X(d, {
|
|
6745
6755
|
sx: {
|
|
6746
6756
|
p: 2,
|
|
@@ -6804,9 +6814,9 @@ function ri({ info: e, labelA: t, labelB: n }) {
|
|
|
6804
6814
|
] })]
|
|
6805
6815
|
});
|
|
6806
6816
|
}
|
|
6807
|
-
function
|
|
6817
|
+
function ai({ data: e, size: n = 600, autoFit: r = !0, sortBy: i = "name", showLabels: l = !0, showIcons: u = !0, chartColors: f, rootNodeRadius: p = 22, branchNodeRadius: m = 16, leafNodeRadius: h = 11, linkColor: g, linkStrokeOpacity: _ = 1, linkStrokeWidth: v = 1.5, labelFontSize: y = 12, labelColor: b, separationSibling: x = 1, separationCousin: S = 2, zoomable: C = !1, drillable: w = !1, onFocusChange: T, showNodePopover: E = !1, renderNodePopoverContent: D, onNodeClick: O, disabled: k = !1, translation: A }) {
|
|
6808
6818
|
let j = H(), M = {
|
|
6809
|
-
...
|
|
6819
|
+
...ti,
|
|
6810
6820
|
...A
|
|
6811
6821
|
}, P = [
|
|
6812
6822
|
j.palette.primary.main,
|
|
@@ -6997,7 +7007,7 @@ function ii({ data: e, size: n = 600, autoFit: r = !0, sortBy: i = "name", showL
|
|
|
6997
7007
|
children: ne.map((e, t) => /* @__PURE__ */ Y("path", { d: K(e) }, `link-${t}`))
|
|
6998
7008
|
}),
|
|
6999
7009
|
/* @__PURE__ */ Y("g", { children: re.map((e, t) => {
|
|
7000
|
-
let n = I(e), r = L(e), i = ie(e), a = J === t, o = e.children ?
|
|
7010
|
+
let n = I(e), r = L(e), i = ie(e), a = J === t, o = e.children ? ni.folder : ni.person, s = Math.round(n * 1.3);
|
|
7001
7011
|
return /* @__PURE__ */ Y(B, {
|
|
7002
7012
|
title: /* @__PURE__ */ X(d, {
|
|
7003
7013
|
sx: {
|
|
@@ -7107,7 +7117,7 @@ function ii({ data: e, size: n = 600, autoFit: r = !0, sortBy: i = "name", showL
|
|
|
7107
7117
|
fillOpacity: a ? .85 : 1,
|
|
7108
7118
|
style: { transition: "fill-opacity 0.15s" }
|
|
7109
7119
|
}),
|
|
7110
|
-
u && /* @__PURE__ */ Y(
|
|
7120
|
+
u && /* @__PURE__ */ Y(ri, {
|
|
7111
7121
|
path: o,
|
|
7112
7122
|
size: s
|
|
7113
7123
|
})
|
|
@@ -7148,7 +7158,7 @@ function ii({ data: e, size: n = 600, autoFit: r = !0, sortBy: i = "name", showL
|
|
|
7148
7158
|
horizontal: "left"
|
|
7149
7159
|
},
|
|
7150
7160
|
slotProps: { paper: { elevation: 4 } },
|
|
7151
|
-
children: Ce && (D ? D(Ce) : /* @__PURE__ */ Y(
|
|
7161
|
+
children: Ce && (D ? D(Ce) : /* @__PURE__ */ Y(ii, {
|
|
7152
7162
|
info: Ce,
|
|
7153
7163
|
labelA: M.specialValueA ?? "Value A",
|
|
7154
7164
|
labelB: M.specialValueB ?? "Value B"
|
|
@@ -7157,14 +7167,14 @@ function ii({ data: e, size: n = 600, autoFit: r = !0, sortBy: i = "name", showL
|
|
|
7157
7167
|
]
|
|
7158
7168
|
});
|
|
7159
7169
|
}
|
|
7160
|
-
|
|
7170
|
+
ai.displayName = "RadialTreeChart";
|
|
7161
7171
|
//#endregion
|
|
7162
7172
|
//#region src/components/circle-packing-chart/CirclePackingChart.tsx
|
|
7163
|
-
var
|
|
7164
|
-
function
|
|
7165
|
-
return e.length * n *
|
|
7173
|
+
var oi = .56;
|
|
7174
|
+
function si(e, t, n) {
|
|
7175
|
+
return e.length * n * oi <= t ? e : t >= 3 * n * oi + n * 2 ? "…" : "";
|
|
7166
7176
|
}
|
|
7167
|
-
function
|
|
7177
|
+
function ci({ data: e, size: n = 600, padding: r = 3, sortBy: i = "value", showLabels: l = !0, showAllLabels: u = !1, labelFontSize: f = 13, innerLabelFontSize: p = 9, labelColor: m, chartColors: h, depthColorStart: g, depthColorEnd: _, background: v, duration: y = 750, zoomable: b = !1, disabled: x = !1, onCircleClick: S, onZoomChange: C }) {
|
|
7168
7178
|
let w = H(), T = [
|
|
7169
7179
|
w.palette.primary.main,
|
|
7170
7180
|
w.palette.secondary.main,
|
|
@@ -7256,7 +7266,7 @@ function si({ data: e, size: n = 600, padding: r = 3, sortBy: i = "value", showL
|
|
|
7256
7266
|
if (!o) continue;
|
|
7257
7267
|
let s = a.r * r, c = s * 1.6, l = i === k ? a !== k : a.ancestors().includes(i), u = a.parent === i;
|
|
7258
7268
|
if (l && !u && s >= 14) {
|
|
7259
|
-
let t =
|
|
7269
|
+
let t = si(a.data.name, c, p);
|
|
7260
7270
|
t ? (o.textContent = t, o.setAttribute("transform", `translate(${(a.x - e[0]) * r},${(a.y - e[1]) * r})`), o.setAttribute("font-weight", a.children ? "bold" : "normal"), o.style.display = "inline") : o.style.display = "none";
|
|
7261
7271
|
} else o.style.display = "none";
|
|
7262
7272
|
}
|
|
@@ -7534,18 +7544,18 @@ function si({ data: e, size: n = 600, padding: r = 3, sortBy: i = "value", showL
|
|
|
7534
7544
|
})]
|
|
7535
7545
|
});
|
|
7536
7546
|
}
|
|
7537
|
-
|
|
7547
|
+
ci.displayName = "CirclePackingChart";
|
|
7538
7548
|
//#endregion
|
|
7539
7549
|
//#region src/components/circle-packing-chart/CirclePackingChart.types.ts
|
|
7540
|
-
var
|
|
7550
|
+
var li = { noData: "No data" }, ui = {
|
|
7541
7551
|
noData: "No data",
|
|
7542
7552
|
specialValueA: "Value A",
|
|
7543
7553
|
specialValueB: "Value B"
|
|
7544
|
-
},
|
|
7554
|
+
}, di = {
|
|
7545
7555
|
folder: "M20 6h-8l-2-2H4c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V8c0-1.1-.9-2-2-2zm0 12H4V8h16v10z",
|
|
7546
7556
|
person: "M12 12c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm0 2c-2.67 0-8 1.34-8 4v2h16v-2c0-2.66-5.33-4-8-4z"
|
|
7547
7557
|
};
|
|
7548
|
-
function
|
|
7558
|
+
function fi({ path: e, size: t }) {
|
|
7549
7559
|
let n = t / 2;
|
|
7550
7560
|
return /* @__PURE__ */ Y("g", {
|
|
7551
7561
|
transform: `translate(${-n},${-n})`,
|
|
@@ -7562,7 +7572,7 @@ function di({ path: e, size: t }) {
|
|
|
7562
7572
|
})
|
|
7563
7573
|
});
|
|
7564
7574
|
}
|
|
7565
|
-
function
|
|
7575
|
+
function pi({ info: e, labelA: t, labelB: n }) {
|
|
7566
7576
|
return /* @__PURE__ */ X(d, {
|
|
7567
7577
|
sx: {
|
|
7568
7578
|
p: 2,
|
|
@@ -7626,9 +7636,9 @@ function fi({ info: e, labelA: t, labelB: n }) {
|
|
|
7626
7636
|
] })]
|
|
7627
7637
|
});
|
|
7628
7638
|
}
|
|
7629
|
-
function
|
|
7639
|
+
function mi({ data: e, orientation: n = "LR", width: r = 800, height: i = 500, levelSpacing: l = 200, nodeRadius: u = 10, sortBy: f = "name", showLabels: p = !0, labelFontSize: m = 12, labelColor: h, showIcons: g = !0, chartColors: _, linkStrokeOpacity: v = .4, linkStrokeWidth: y = 1.5, linkColor: b, zoomable: x = !1, drillable: S = !1, onFocusChange: C, showNodePopover: w = !1, renderNodePopoverContent: T, onNodeClick: E, disabled: D = !1, translation: O }) {
|
|
7630
7640
|
let k = H(), A = {
|
|
7631
|
-
...
|
|
7641
|
+
...ui,
|
|
7632
7642
|
...O
|
|
7633
7643
|
}, j = [
|
|
7634
7644
|
k.palette.primary.main,
|
|
@@ -7873,7 +7883,7 @@ function pi({ data: e, orientation: n = "LR", width: r = 800, height: i = 500, l
|
|
|
7873
7883
|
strokeWidth: y,
|
|
7874
7884
|
children: ie.map((e, t) => /* @__PURE__ */ Y("path", { d: oe(e) }, `link-${t}`))
|
|
7875
7885
|
}), K.map((e, t) => {
|
|
7876
|
-
let r = q(e), i = ae(e), a = se(e), o = e.children ?
|
|
7886
|
+
let r = q(e), i = ae(e), a = se(e), o = e.children ? di.folder : di.person, s = n === "LR", c = n === "RL", l = s ? u + 6 : c ? -(u + 6) : 0, f = !s && !c ? n === "TB" ? u + 16 : -(u + 6) : 0, h = s ? "start" : c ? "end" : "middle", _ = /* @__PURE__ */ X(d, {
|
|
7877
7887
|
sx: {
|
|
7878
7888
|
py: .5,
|
|
7879
7889
|
minWidth: 140
|
|
@@ -7974,7 +7984,7 @@ function pi({ data: e, orientation: n = "LR", width: r = 800, height: i = 500, l
|
|
|
7974
7984
|
r: u,
|
|
7975
7985
|
fill: i
|
|
7976
7986
|
}),
|
|
7977
|
-
g && /* @__PURE__ */ Y(
|
|
7987
|
+
g && /* @__PURE__ */ Y(fi, {
|
|
7978
7988
|
path: o,
|
|
7979
7989
|
size: je
|
|
7980
7990
|
}),
|
|
@@ -8011,7 +8021,7 @@ function pi({ data: e, orientation: n = "LR", width: r = 800, height: i = 500, l
|
|
|
8011
8021
|
horizontal: "left"
|
|
8012
8022
|
},
|
|
8013
8023
|
slotProps: { paper: { elevation: 4 } },
|
|
8014
|
-
children: Ee && (T ? T(Ee) : /* @__PURE__ */ Y(
|
|
8024
|
+
children: Ee && (T ? T(Ee) : /* @__PURE__ */ Y(pi, {
|
|
8015
8025
|
info: Ee,
|
|
8016
8026
|
labelA: A.specialValueA ?? "Value A",
|
|
8017
8027
|
labelB: A.specialValueB ?? "Value B"
|
|
@@ -8020,6 +8030,6 @@ function pi({ data: e, orientation: n = "LR", width: r = 800, height: i = 500, l
|
|
|
8020
8030
|
]
|
|
8021
8031
|
});
|
|
8022
8032
|
}
|
|
8023
|
-
|
|
8033
|
+
mi.displayName = "HorizontalTreeChart";
|
|
8024
8034
|
//#endregion
|
|
8025
|
-
export {
|
|
8035
|
+
export { $r as ChordChart, ci as CirclePackingChart, Xn as DEFAULT_CHECK_COLORS, ei as DEFAULT_CHORD_CHART_TRANSLATION, li as DEFAULT_CIRCLE_PACKING_TRANSLATION, on as DEFAULT_GANTT_TRANSLATIONS, ui as DEFAULT_HORIZONTAL_TREE_TRANSLATION, kt as DEFAULT_JSON_EDITOR_TOOLBAR_CONFIG, At as DEFAULT_JSON_EDITOR_TRANSLATION, Yn as DEFAULT_METER_COLORS, Jn as DEFAULT_PASSWORD_TRANSLATIONS, ti as DEFAULT_RADIAL_TREE_CHART_TRANSLATION, gr as DEFAULT_RICH_TEXT_EDITOR_TOOLBAR_CONFIG, _r as DEFAULT_RICH_TEXT_EDITOR_TRANSLATION, Nr as DEFAULT_SQL_EDITOR_TOOLBAR_CONFIG, Pr as DEFAULT_SQL_EDITOR_TRANSLATION, Yr as DEFAULT_SUNBURST_CHART_TRANSLATION, dr as DEFAULT_TAG_SELECTION_TRANSLATION, Wn as GanttChart, mi as HorizontalTreeChart, It as JsonEditor, $n as PasswordStrengthMeter, ai as RadialTreeChart, Mr as RichTextEditor, Br as SqlEditor, Jr as SunburstChart, hr as TagSelection, $ as useGanttChartStore, zn as useGanttTheme, Ln as useGanttTranslations, Fn as useRawGanttChartStore };
|