@divami-artefacts/ai-design-system 1.0.36 → 1.0.38
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/dist/index.cjs +1 -1
- package/dist/index.js +325 -309
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -511,41 +511,41 @@ function ue(e, t, n) {
|
|
|
511
511
|
return r + "…";
|
|
512
512
|
}
|
|
513
513
|
function de({ items: e = [], "data-testid": t }) {
|
|
514
|
-
let r = a(null), l = a(0), d = a(/* @__PURE__ */ new Map()), [m, g] = o(!1), _ = i(() => e.filter((e) => typeof e == "object" && !!e), [e]), S = i(() => [..._].sort((e, t) => (t.percentage ?? 0) - (e.percentage ?? 0)), [_]),
|
|
514
|
+
let r = a(null), l = a(0), d = a(/* @__PURE__ */ new Map()), [m, g] = o(!1), _ = i(() => e.filter((e) => typeof e == "object" && !!e), [e]), S = i(() => [..._].sort((e, t) => (t.percentage ?? 0) - (e.percentage ?? 0)), [_]), O = i(() => m ? S : S.slice(0, ce), [S, m]), k = O.length, A = oe + se + k * z + Math.max(0, k - 1) * ae, { hoveredRef: j, tooltip: M, hitZonesRef: N } = w(r, {
|
|
515
515
|
width: R,
|
|
516
|
-
height:
|
|
516
|
+
height: A
|
|
517
517
|
});
|
|
518
518
|
return n(() => {
|
|
519
519
|
let e = r.current;
|
|
520
520
|
if (!e) return;
|
|
521
|
-
let t = v(e, R,
|
|
521
|
+
let t = v(e, R, A);
|
|
522
522
|
l.current = 0;
|
|
523
|
-
let n = R * .
|
|
523
|
+
let n = R * .08, i = R - 150 - n, a, o = () => {
|
|
524
524
|
l.current++;
|
|
525
525
|
let e = l.current;
|
|
526
|
-
t.clearRect(0, 0, R,
|
|
527
|
-
let n = t ===
|
|
526
|
+
t.clearRect(0, 0, R, A), t.letterSpacing = f.letterSpacing, N.current = [], d.current.forEach((e, t) => {
|
|
527
|
+
let n = t === j.current ? 1 : 0, r = e + (n - e) * .12;
|
|
528
528
|
Math.abs(r - n) < .005 ? n === 0 ? d.current.delete(t) : d.current.set(t, 1) : d.current.set(t, r);
|
|
529
|
-
}),
|
|
530
|
-
let
|
|
531
|
-
t.fillStyle = h(
|
|
532
|
-
let
|
|
533
|
-
if (
|
|
534
|
-
let e = t.createLinearGradient(
|
|
535
|
-
e.addColorStop(0, h(
|
|
529
|
+
}), j.current && !d.current.has(j.current) && d.current.set(j.current, 0), b(t, R, A, e, 40, h(u.blue, .04)), O.forEach((n, r) => {
|
|
530
|
+
let a = le[r % le.length], o = d.current.get(n.id) ?? 0, s = oe + r * (z + ae);
|
|
531
|
+
t.fillStyle = h(a, .04 + o * .04), t.beginPath(), t.roundRect(150, s, i, z, 3), t.fill(), t.strokeStyle = h(a, .08), t.lineWidth = 1, t.setLineDash([4, 4]), t.beginPath(), t.moveTo(150, s + z / 2), t.lineTo(150 + i, s + z / 2), t.stroke(), t.setLineDash([]);
|
|
532
|
+
let c = (n.percentage ?? 0) / 100, l = 150 + i * Math.min(c, c * D(Math.min(1, e * .005)));
|
|
533
|
+
if (l > 154) {
|
|
534
|
+
let e = t.createLinearGradient(150, 0, l, 0);
|
|
535
|
+
e.addColorStop(0, h(a, .02)), e.addColorStop(1, h(a, .25 + o * .15)), t.fillStyle = e, t.beginPath(), t.roundRect(150, s + 2, l - 150, z - 4, 2), t.fill();
|
|
536
536
|
}
|
|
537
|
-
y(t,
|
|
538
|
-
let
|
|
539
|
-
label:
|
|
540
|
-
value: `${
|
|
541
|
-
sublabel:
|
|
542
|
-
color:
|
|
537
|
+
y(t, l, s + z / 2, 18 + o * 8, a, .3 + o * .2), t.beginPath(), t.arc(l, s + z / 2, 5 + o * 2, 0, Math.PI * 2), t.fillStyle = h(a, .9), t.fill();
|
|
538
|
+
let u = {
|
|
539
|
+
label: n.name,
|
|
540
|
+
value: `${n.percentage ?? 0}%`,
|
|
541
|
+
sublabel: `${n.baseLabel ?? String(n.base ?? 0)} · ${n.variationLabel ?? String(n.variation ?? 0)}`,
|
|
542
|
+
color: a
|
|
543
543
|
};
|
|
544
|
-
|
|
545
|
-
}), t.strokeStyle = h(u.t3, .3), t.lineWidth = 1, t.setLineDash([]), t.beginPath(), t.moveTo(
|
|
544
|
+
E(N.current, n.id, 0, s, 150 + i, z, u), T(N.current, n.id, l, s + z / 2, 14, u), t.font = p.font, t.fillStyle = h(a, .9 + o * .1), t.textAlign = "left", t.textBaseline = "middle", t.fillText(`${n.percentage ?? 0}%`, l + 10, s + z / 2), t.font = `${o > 0 ? "bold " : ""}` + f.font, t.fillStyle = o > 0 ? a : f.color, t.textAlign = "right", t.fillText(ue(t, n.abbreviation ?? n.name ?? "", 134), 142, s + z / 2);
|
|
545
|
+
}), t.strokeStyle = h(u.t3, .3), t.lineWidth = 1, t.setLineDash([]), t.beginPath(), t.moveTo(150 + i, oe), t.lineTo(150 + i, oe + (k - 1) * (z + ae) + z), t.stroke(), x(t, R, A, e, .015), a = requestAnimationFrame(o);
|
|
546
546
|
};
|
|
547
|
-
return
|
|
548
|
-
}, [
|
|
547
|
+
return o(), () => cancelAnimationFrame(a);
|
|
548
|
+
}, [O, A]), S.length === 0 ? /* @__PURE__ */ s(L, {
|
|
549
549
|
width: R,
|
|
550
550
|
height: 160,
|
|
551
551
|
"data-testid": t
|
|
@@ -560,14 +560,14 @@ function de({ items: e = [], "data-testid": t }) {
|
|
|
560
560
|
"aria-label": "Commitment race — contractors ranked by commitment percentage",
|
|
561
561
|
style: {
|
|
562
562
|
width: R,
|
|
563
|
-
height:
|
|
563
|
+
height: A,
|
|
564
564
|
display: "block",
|
|
565
565
|
borderRadius: 8
|
|
566
566
|
}
|
|
567
567
|
}), /* @__PURE__ */ s(C, {
|
|
568
|
-
...
|
|
568
|
+
...M,
|
|
569
569
|
parentW: R,
|
|
570
|
-
parentH:
|
|
570
|
+
parentH: A
|
|
571
571
|
})]
|
|
572
572
|
}), _.length > ce && /* @__PURE__ */ s("div", {
|
|
573
573
|
style: { marginTop: 8 },
|
|
@@ -817,15 +817,20 @@ function Ae({ data: e, "data-testid": t }) {
|
|
|
817
817
|
return he(n, Ce, D, (e, t) => {
|
|
818
818
|
N(r.current, j.current), F.current = [], b.forEach((n, i) => {
|
|
819
819
|
let a = Ee[i % Ee.length], o = M(t, i, x, O), s = V.top + i * (H + 8), c = V.left + De, l = r.current.get(n.id) ?? 0, d = Math.max(n.base ?? 0, 0), m = Math.max(n.total ?? 0, 0), g = d / S * k * o, _ = m / S * k * o, v = _ - g;
|
|
820
|
-
e.font = f.font, e.fillStyle = l > 0 ? a : f.color, e.textAlign = "right", e.textBaseline = "middle", e.fillText(Oe(e, n.name ?? "", De - 16), c - 8, s + H / 2),
|
|
820
|
+
e.font = f.font, e.fillStyle = l > 0 ? a : f.color, e.textAlign = "right", e.textBaseline = "middle", e.fillText(Oe(e, n.name ?? "", De - 16), c - 8, s + H / 2), E(F.current, n.id, 0, s, c, H, {
|
|
821
|
+
label: n.name,
|
|
822
|
+
value: `${n.totalLabel ?? ke(n.total ?? 0)} total`,
|
|
823
|
+
sublabel: `Base ${n.baseLabel ?? ke(n.base ?? 0)} + Var ${n.variationLabel ?? ke(n.variation ?? 0)} · ${n.percentage ?? 0}% committed`,
|
|
824
|
+
color: a
|
|
825
|
+
}), e.fillStyle = h(u.bd, .25), e.beginPath(), e.roundRect(c, s, k, H, 4), e.fill(), g > 0 && (l > 0 && y(e, c + g / 2, s + H / 2, g * .3, a, .1 * l), e.fillStyle = h(a, .5 + l * .15), e.beginPath(), e.roundRect(c, s, g, H, 4), e.fill()), v > 2 && (e.fillStyle = h(a, .22 + l * .08), e.beginPath(), e.roundRect(c + g, s, v, H, [
|
|
821
826
|
0,
|
|
822
827
|
4,
|
|
823
828
|
4,
|
|
824
829
|
0
|
|
825
830
|
]), e.fill(), e.setLineDash([2, 3]), e.strokeStyle = h(a, .55), e.lineWidth = 1, e.beginPath(), e.moveTo(c + g, s + 3), e.lineTo(c + g, s + H - 3), e.stroke(), e.setLineDash([])), l > 0 && _ > 0 && (e.strokeStyle = h(a, .5 * l), e.lineWidth = 1, e.setLineDash([]), e.beginPath(), e.roundRect(c, s, _, H, 4), e.stroke()), o > .35 && (e.globalAlpha = Math.min(1, (o - .35) / .4), e.font = p.font, e.fillStyle = l > 0 ? a : p.color, e.textAlign = "left", e.textBaseline = "middle", e.fillText(n.totalLabel ?? ke(n.total ?? 0), c + _ + 6, s + H / 2), e.globalAlpha = 1), E(F.current, n.id, c, s, Math.max(_, 1), H, {
|
|
826
831
|
label: n.name,
|
|
827
|
-
value:
|
|
828
|
-
sublabel:
|
|
832
|
+
value: n.totalLabel ?? ke(n.total ?? 0),
|
|
833
|
+
sublabel: `${n.baseLabel ?? ke(n.base ?? 0)} + ${n.variationLabel ?? ke(n.variation ?? 0)} · ${n.percentage ?? 0}%`,
|
|
829
834
|
color: a
|
|
830
835
|
});
|
|
831
836
|
});
|
|
@@ -899,14 +904,8 @@ function U(e, t = 1) {
|
|
|
899
904
|
}
|
|
900
905
|
//#endregion
|
|
901
906
|
//#region src/components/rankedCardLeaderboard/RankedCardLeaderboard.tsx
|
|
902
|
-
var Me = 780, W = 240, Ne = 12, Pe = 10, Fe = 5, Ie = (Me - 2 * Ne - (Fe - 1) * Pe) / Fe
|
|
903
|
-
|
|
904
|
-
"Elevated risk",
|
|
905
|
-
"Moderate exposure",
|
|
906
|
-
"Moderate exposure",
|
|
907
|
-
"Low exposure"
|
|
908
|
-
];
|
|
909
|
-
function Re({ items: e = [], "data-testid": t }) {
|
|
907
|
+
var Me = 780, W = 240, Ne = 12, Pe = 10, Fe = 5, Ie = (Me - 2 * Ne - (Fe - 1) * Pe) / Fe;
|
|
908
|
+
function Le({ items: e = [], "data-testid": t }) {
|
|
910
909
|
let r = a(null), o = a(0), l = a(/* @__PURE__ */ new Map()), m = [...i(() => e.filter((e) => typeof e == "object" && !!e), [e])].sort((e, t) => (t.count ?? 0) - (e.count ?? 0)).slice(0, 5), g = m.reduce((e, t) => e + (t.count ?? 0), 0), _ = Math.min(Fe, m.length), b = _ > 0 ? 2 * Ne + _ * Ie + (_ - 1) * Pe : Me, { hoveredRef: S, tooltip: T, hitZonesRef: D } = w(r, {
|
|
911
910
|
width: b,
|
|
912
911
|
height: W
|
|
@@ -935,11 +934,11 @@ function Re({ items: e = [], "data-testid": t }) {
|
|
|
935
934
|
let F = x - 16, I = P;
|
|
936
935
|
for (; t.measureText(I).width > F && I.length > 1;) I = I.slice(0, -1);
|
|
937
936
|
I !== P && (I = I.slice(0, -1) + "…"), t.fillText(I, w, a + i * .74);
|
|
938
|
-
let ee = Math.round((r.count ?? 0) / (g || 1) * 100)
|
|
937
|
+
let ee = Math.round((r.count ?? 0) / (g || 1) * 100);
|
|
939
938
|
E(D.current, r.id, m, a, n, i, {
|
|
940
939
|
label: r.name,
|
|
941
|
-
value: `${P}
|
|
942
|
-
sublabel: `Rank #${o + 1}
|
|
940
|
+
value: `${P} · ${ee}% of total`,
|
|
941
|
+
sublabel: `Rank #${o + 1}`,
|
|
943
942
|
color: f
|
|
944
943
|
});
|
|
945
944
|
}), x(t, b, W, e, .015), c = requestAnimationFrame(_);
|
|
@@ -980,7 +979,7 @@ function Re({ items: e = [], "data-testid": t }) {
|
|
|
980
979
|
//#endregion
|
|
981
980
|
//#region src/components/dotMatrixChart/DotMatrixChart.tsx
|
|
982
981
|
var G = 680, K = 260;
|
|
983
|
-
function
|
|
982
|
+
function Re({ items: e = [], "data-testid": t }) {
|
|
984
983
|
let r = a(null), o = a(0), l = a(/* @__PURE__ */ new Map()), { hoveredRef: d, tooltip: p, hitZonesRef: m } = w(r, {
|
|
985
984
|
width: G,
|
|
986
985
|
height: K
|
|
@@ -1047,7 +1046,7 @@ function ze({ items: e = [], "data-testid": t }) {
|
|
|
1047
1046
|
}
|
|
1048
1047
|
//#endregion
|
|
1049
1048
|
//#region src/components/lineChart/LineChart.tsx
|
|
1050
|
-
function
|
|
1049
|
+
function ze({ rows: e = [], className: t, colors: n }) {
|
|
1051
1050
|
return /* @__PURE__ */ s(I, {
|
|
1052
1051
|
rows: e,
|
|
1053
1052
|
variant: "line",
|
|
@@ -1057,7 +1056,7 @@ function Be({ rows: e = [], className: t, colors: n }) {
|
|
|
1057
1056
|
}
|
|
1058
1057
|
//#endregion
|
|
1059
1058
|
//#region src/components/constants.ts
|
|
1060
|
-
var
|
|
1059
|
+
var Be = [
|
|
1061
1060
|
"#4C93D9",
|
|
1062
1061
|
"#5DA537",
|
|
1063
1062
|
"#F3862C",
|
|
@@ -1065,7 +1064,7 @@ var Ve = [
|
|
|
1065
1064
|
"#A0B724",
|
|
1066
1065
|
"#EEBF3B",
|
|
1067
1066
|
"#3C45D1"
|
|
1068
|
-
],
|
|
1067
|
+
], Ve = {
|
|
1069
1068
|
nodes: [
|
|
1070
1069
|
{
|
|
1071
1070
|
id: "supplier-x",
|
|
@@ -1108,8 +1107,8 @@ var Ve = [
|
|
|
1108
1107
|
};
|
|
1109
1108
|
//#endregion
|
|
1110
1109
|
//#region src/components/miniBars/MiniBars.tsx
|
|
1111
|
-
function
|
|
1112
|
-
let r = n?.slices ??
|
|
1110
|
+
function He({ rows: e = [], className: t, colors: n }) {
|
|
1111
|
+
let r = n?.slices ?? Be;
|
|
1113
1112
|
return /* @__PURE__ */ s("div", {
|
|
1114
1113
|
className: ["d3-mini-bars", t].filter(Boolean).join(" "),
|
|
1115
1114
|
children: e.map(([e, t, n], i) => /* @__PURE__ */ c("div", {
|
|
@@ -1135,7 +1134,7 @@ function Ue({ rows: e = [], className: t, colors: n }) {
|
|
|
1135
1134
|
width: Math.max(0, Math.min(100, t)),
|
|
1136
1135
|
height: "12",
|
|
1137
1136
|
rx: "6",
|
|
1138
|
-
className: `d3-mini-fill tone-${i %
|
|
1137
|
+
className: `d3-mini-fill tone-${i % Be.length}`,
|
|
1139
1138
|
fill: r[i % r.length]
|
|
1140
1139
|
})]
|
|
1141
1140
|
})
|
|
@@ -1147,9 +1146,9 @@ function Ue({ rows: e = [], className: t, colors: n }) {
|
|
|
1147
1146
|
}
|
|
1148
1147
|
//#endregion
|
|
1149
1148
|
//#region src/components/radialFanTreeChart/RadialFanTreeChart.tsx
|
|
1150
|
-
var
|
|
1151
|
-
function
|
|
1152
|
-
let m = a(null), g = a(/* @__PURE__ */ new Map()), _ = a(0), b = i(() => r.filter((e) => typeof e == "object" && !!e), [r]), x = i(() => Math.max(
|
|
1149
|
+
var Ue = 770, We = 320, Ge = 60, Ke = 28;
|
|
1150
|
+
function qe({ total: e = 0, totalLabel: t, items: r = [], width: o = Ue, "data-testid": l }) {
|
|
1151
|
+
let m = a(null), g = a(/* @__PURE__ */ new Map()), _ = a(0), b = i(() => r.filter((e) => typeof e == "object" && !!e), [r]), x = i(() => Math.max(We, Ge + Math.max(0, b.length - 1) * Ke), [b.length]), { hoveredRef: S, tooltip: E, hitZonesRef: O } = w(m, {
|
|
1153
1152
|
width: o,
|
|
1154
1153
|
height: x
|
|
1155
1154
|
});
|
|
@@ -1181,8 +1180,8 @@ function Je({ total: e = 0, totalLabel: t, items: r = [], width: o = We, "data-t
|
|
|
1181
1180
|
let a = U(t.count ?? 0);
|
|
1182
1181
|
T(O.current, t.id, _.x, _.y, i + 8, {
|
|
1183
1182
|
label: t.name,
|
|
1184
|
-
value:
|
|
1185
|
-
sublabel: `${Math.round((t.count ?? 0) / (e || 1) * 100)}% of
|
|
1183
|
+
value: a,
|
|
1184
|
+
sublabel: `${Math.round((t.count ?? 0) / (e || 1) * 100)}% of total`,
|
|
1186
1185
|
color: o
|
|
1187
1186
|
}), r.globalAlpha = n, r.font = f.font, r.textAlign = "left";
|
|
1188
1187
|
let c = t.abbreviation ?? t.name?.slice(0, 6) ?? "", l = ` ${U(t.count ?? 0)}`, d = _.x + i + 6, g = _.y + 4;
|
|
@@ -1199,9 +1198,9 @@ function Je({ total: e = 0, totalLabel: t, items: r = [], width: o = We, "data-t
|
|
|
1199
1198
|
a !== n && (a = a.slice(0, -1) + "…"), r.fillStyle = u.t1, r.textAlign = "center", r.textBaseline = "middle", r.fillText(a, 88, i), r.globalAlpha = 1;
|
|
1200
1199
|
}
|
|
1201
1200
|
T(O.current, "__root__", 88, i, 32, {
|
|
1202
|
-
label: "Total
|
|
1203
|
-
value:
|
|
1204
|
-
sublabel:
|
|
1201
|
+
label: t ?? "Total",
|
|
1202
|
+
value: U(e, 0),
|
|
1203
|
+
sublabel: `${b.length} items`,
|
|
1205
1204
|
color: u.blue
|
|
1206
1205
|
}), C = requestAnimationFrame(w);
|
|
1207
1206
|
};
|
|
@@ -1214,7 +1213,7 @@ function Je({ total: e = 0, totalLabel: t, items: r = [], width: o = We, "data-t
|
|
|
1214
1213
|
o
|
|
1215
1214
|
]), b.length === 0 ? /* @__PURE__ */ s(L, {
|
|
1216
1215
|
width: o,
|
|
1217
|
-
height:
|
|
1216
|
+
height: We,
|
|
1218
1217
|
"data-testid": l
|
|
1219
1218
|
}) : /* @__PURE__ */ c("div", {
|
|
1220
1219
|
"data-testid": l,
|
|
@@ -1241,21 +1240,21 @@ function Je({ total: e = 0, totalLabel: t, items: r = [], width: o = We, "data-t
|
|
|
1241
1240
|
}
|
|
1242
1241
|
//#endregion
|
|
1243
1242
|
//#region src/components/pieChart/PieChart.tsx
|
|
1244
|
-
var
|
|
1245
|
-
function
|
|
1243
|
+
var Je = 192, Ye = Je, Xe = Je + 80;
|
|
1244
|
+
function Ze({ rows: e = [], variant: t, className: r, colors: i }) {
|
|
1246
1245
|
let o = a(null), f = a(/* @__PURE__ */ new Map()), p = a(0), m = i?.slices ?? d, { hoveredRef: g, tooltip: b, hitZonesRef: x } = w(o, {
|
|
1247
|
-
width:
|
|
1248
|
-
height:
|
|
1246
|
+
width: Ye,
|
|
1247
|
+
height: Xe
|
|
1249
1248
|
});
|
|
1250
1249
|
return n(() => {
|
|
1251
1250
|
let n = o.current;
|
|
1252
1251
|
if (!n) return;
|
|
1253
|
-
let r = v(n,
|
|
1252
|
+
let r = v(n, Ye, Xe);
|
|
1254
1253
|
p.current = 0;
|
|
1255
|
-
let i =
|
|
1254
|
+
let i = Ye / 2, a = Je / 2, s = Je * .4, c = t === "donut" ? Je * .21 : 0, l = e.reduce((e, t) => e + (t.pricing ?? 0), 0) || 1, d, b = () => {
|
|
1256
1255
|
p.current++;
|
|
1257
1256
|
let n = p.current;
|
|
1258
|
-
r.clearRect(0, 0,
|
|
1257
|
+
r.clearRect(0, 0, Ye, Xe);
|
|
1259
1258
|
let o = 1 - (1 - Math.min(n / 48, 1)) ** 3;
|
|
1260
1259
|
N(f.current, g.current), x.current = [];
|
|
1261
1260
|
let v = -Math.PI / 2;
|
|
@@ -1269,10 +1268,10 @@ function Qe({ rows: e = [], variant: t, className: r, colors: i }) {
|
|
|
1269
1268
|
let O = j(n, .03, 3e-4), k = s + b * 6 + (b > 0 ? O * 2 : 0);
|
|
1270
1269
|
r.beginPath(), r.moveTo(i + Math.cos(v) * c, a + Math.sin(v) * c), r.arc(i, a, k, v, g), c > 0 ? r.arc(i, a, c, g, v, !0) : r.lineTo(i, a), r.closePath(), r.fillStyle = h(_, .7 + b * .2), r.fill(), r.strokeStyle = h(u.bg, .8), r.lineWidth = 1.5, r.stroke(), v = g;
|
|
1271
1270
|
}), t === "donut" && e.length > 0 && y(r, i, a, c * .8, u.blue, .06);
|
|
1272
|
-
let S =
|
|
1271
|
+
let S = Je + 12;
|
|
1273
1272
|
e.forEach((e, t) => {
|
|
1274
1273
|
let n = m[t % m.length], i = (e.pricing ?? 0) / l, a = f.current.get(e.id ?? `sl-${t}`) ?? 0, o = S + t * 18;
|
|
1275
|
-
r.beginPath(), r.arc(8, o, 4, 0, Math.PI * 2), r.fillStyle = h(n, .8 + a * .2), r.fill(), r.font = "9px 'JetBrains Mono', monospace", r.fillStyle = h(u.t2, .7 + a * .2), r.textAlign = "left", r.fillText(e.vendor, 18, o + 3.5), r.font = "bold 9px 'JetBrains Mono', monospace", r.fillStyle = _(u.t3, n, a), r.textAlign = "right", r.fillText(`${e.pricing ?? 0} (${Math.round(i * 100)}%)`,
|
|
1274
|
+
r.beginPath(), r.arc(8, o, 4, 0, Math.PI * 2), r.fillStyle = h(n, .8 + a * .2), r.fill(), r.font = "9px 'JetBrains Mono', monospace", r.fillStyle = h(u.t2, .7 + a * .2), r.textAlign = "left", r.fillText(e.vendor, 18, o + 3.5), r.font = "bold 9px 'JetBrains Mono', monospace", r.fillStyle = _(u.t3, n, a), r.textAlign = "right", r.fillText(`${e.pricing ?? 0} (${Math.round(i * 100)}%)`, Ye - 4, o + 3.5);
|
|
1276
1275
|
}), d = requestAnimationFrame(b);
|
|
1277
1276
|
};
|
|
1278
1277
|
return b(), () => cancelAnimationFrame(d);
|
|
@@ -1286,30 +1285,30 @@ function Qe({ rows: e = [], variant: t, className: r, colors: i }) {
|
|
|
1286
1285
|
children: /* @__PURE__ */ c("div", {
|
|
1287
1286
|
style: {
|
|
1288
1287
|
position: "relative",
|
|
1289
|
-
width:
|
|
1290
|
-
height:
|
|
1288
|
+
width: Ye,
|
|
1289
|
+
height: Xe
|
|
1291
1290
|
},
|
|
1292
1291
|
children: [/* @__PURE__ */ s("canvas", {
|
|
1293
1292
|
ref: o,
|
|
1294
1293
|
role: "img",
|
|
1295
1294
|
"aria-label": `${t} chart`,
|
|
1296
1295
|
style: {
|
|
1297
|
-
width:
|
|
1298
|
-
height:
|
|
1296
|
+
width: Ye,
|
|
1297
|
+
height: Xe,
|
|
1299
1298
|
display: "block",
|
|
1300
1299
|
borderRadius: 8
|
|
1301
1300
|
}
|
|
1302
1301
|
}), /* @__PURE__ */ s(C, {
|
|
1303
1302
|
...b,
|
|
1304
|
-
parentW:
|
|
1305
|
-
parentH:
|
|
1303
|
+
parentW: Ye,
|
|
1304
|
+
parentH: Xe
|
|
1306
1305
|
})]
|
|
1307
1306
|
})
|
|
1308
1307
|
});
|
|
1309
1308
|
}
|
|
1310
1309
|
//#endregion
|
|
1311
1310
|
//#region src/components/sankey/SankeySvg.tsx
|
|
1312
|
-
function
|
|
1311
|
+
function Qe(e, t, n, r) {
|
|
1313
1312
|
let i = new Set(t.map((e) => e.source)), a = new Set(t.map((e) => e.target)), o = /* @__PURE__ */ new Map(), s = [];
|
|
1314
1313
|
for (e.forEach((e) => {
|
|
1315
1314
|
i.has(e.id) && !a.has(e.id) && s.push({
|
|
@@ -1354,8 +1353,8 @@ function $e(e, t, n, r) {
|
|
|
1354
1353
|
});
|
|
1355
1354
|
}), f;
|
|
1356
1355
|
}
|
|
1357
|
-
function
|
|
1358
|
-
let _ = a(null), b = a(/* @__PURE__ */ new Map()), S = a(0), D = a([]), O = g?.nodes ?? d, k = g?.links ?? u.bd, A = g?.activeLinks ?? u.blue, M = g?.activeNodes ?? u.blue, P = i(() =>
|
|
1356
|
+
function $e({ nodes: e, links: t, width: r = 960, height: o = 280, ariaLabel: f, selectedEntity: p, className: m, colors: g }) {
|
|
1357
|
+
let _ = a(null), b = a(/* @__PURE__ */ new Map()), S = a(0), D = a([]), O = g?.nodes ?? d, k = g?.links ?? u.bd, A = g?.activeLinks ?? u.blue, M = g?.activeNodes ?? u.blue, P = i(() => Qe(e, t, r, o), [
|
|
1359
1358
|
e,
|
|
1360
1359
|
t,
|
|
1361
1360
|
r,
|
|
@@ -1455,7 +1454,7 @@ function et({ nodes: e, links: t, width: r = 960, height: o = 280, ariaLabel: f,
|
|
|
1455
1454
|
}
|
|
1456
1455
|
//#endregion
|
|
1457
1456
|
//#region src/canvas/CausalFlowCanvas.tsx
|
|
1458
|
-
var
|
|
1457
|
+
var et = [
|
|
1459
1458
|
{
|
|
1460
1459
|
x: .13,
|
|
1461
1460
|
y: .48
|
|
@@ -1488,7 +1487,7 @@ var tt = [
|
|
|
1488
1487
|
x: .92,
|
|
1489
1488
|
y: .22
|
|
1490
1489
|
}
|
|
1491
|
-
],
|
|
1490
|
+
], tt = [
|
|
1492
1491
|
u.blue,
|
|
1493
1492
|
u.orange,
|
|
1494
1493
|
u.red,
|
|
@@ -1496,7 +1495,7 @@ var tt = [
|
|
|
1496
1495
|
u.green,
|
|
1497
1496
|
u.amber,
|
|
1498
1497
|
u.t2
|
|
1499
|
-
],
|
|
1498
|
+
], nt = [
|
|
1500
1499
|
26,
|
|
1501
1500
|
24,
|
|
1502
1501
|
24,
|
|
@@ -1506,21 +1505,21 @@ var tt = [
|
|
|
1506
1505
|
22,
|
|
1507
1506
|
22
|
|
1508
1507
|
];
|
|
1509
|
-
function
|
|
1508
|
+
function rt(e, t) {
|
|
1510
1509
|
let n = 1 - t;
|
|
1511
1510
|
return {
|
|
1512
1511
|
x: n * n * n * e.p0.x + 3 * n * n * t * e.p1.x + 3 * n * t * t * e.p2.x + t * t * t * e.p3.x,
|
|
1513
1512
|
y: n * n * n * e.p0.y + 3 * n * n * t * e.p1.y + 3 * n * t * t * e.p2.y + t * t * t * e.p3.y
|
|
1514
1513
|
};
|
|
1515
1514
|
}
|
|
1516
|
-
function
|
|
1515
|
+
function it(e, t) {
|
|
1517
1516
|
let n = 1 - t, r = 3 * n * n * (e.p1.x - e.p0.x) + 6 * n * t * (e.p2.x - e.p1.x) + 3 * t * t * (e.p3.x - e.p2.x), i = 3 * n * n * (e.p1.y - e.p0.y) + 6 * n * t * (e.p2.y - e.p1.y) + 3 * t * t * (e.p3.y - e.p2.y), a = Math.sqrt(r * r + i * i) || 1;
|
|
1518
1517
|
return {
|
|
1519
1518
|
x: -i / a,
|
|
1520
1519
|
y: r / a
|
|
1521
1520
|
};
|
|
1522
1521
|
}
|
|
1523
|
-
function
|
|
1522
|
+
function at(e, t) {
|
|
1524
1523
|
let n = t.x - e.x, r = t.y - e.y;
|
|
1525
1524
|
return {
|
|
1526
1525
|
p0: {
|
|
@@ -1541,7 +1540,7 @@ function ot(e, t) {
|
|
|
1541
1540
|
}
|
|
1542
1541
|
};
|
|
1543
1542
|
}
|
|
1544
|
-
function
|
|
1543
|
+
function ot({ nodes: e, links: t, width: r = 960, height: o = 280, selectedEntity: l }) {
|
|
1545
1544
|
let d = a(null), f = a(0), p = a([]), { hoveredRef: m, tooltip: g, hitZonesRef: S } = w(d, {
|
|
1546
1545
|
width: r,
|
|
1547
1546
|
height: o
|
|
@@ -1549,15 +1548,15 @@ function st({ nodes: e, links: t, width: r = 960, height: o = 280, selectedEntit
|
|
|
1549
1548
|
let t = /* @__PURE__ */ new Map();
|
|
1550
1549
|
return e.forEach((e, n) => t.set(e.id, n)), t;
|
|
1551
1550
|
}, [e]), O = i(() => t.length > 0 ? Math.max(...t.map((e) => e.value)) : 100, [t]), k = (e) => O > 1 ? e / 100 : e, A = i(() => e.map((e, t) => {
|
|
1552
|
-
let n =
|
|
1551
|
+
let n = et[t % et.length];
|
|
1553
1552
|
return {
|
|
1554
1553
|
id: e.id,
|
|
1555
1554
|
label: e.name,
|
|
1556
1555
|
sub: e.valueLabel ?? "",
|
|
1557
1556
|
x: n.x * r,
|
|
1558
1557
|
y: n.y * o,
|
|
1559
|
-
r:
|
|
1560
|
-
color:
|
|
1558
|
+
r: nt[t % nt.length],
|
|
1559
|
+
color: tt[t % tt.length]
|
|
1561
1560
|
};
|
|
1562
1561
|
}), [
|
|
1563
1562
|
e,
|
|
@@ -1579,7 +1578,7 @@ function st({ nodes: e, links: t, width: r = 960, height: o = 280, selectedEntit
|
|
|
1579
1578
|
if (t.clearRect(0, 0, r, o), S.current = [], b(t, r, o, e, 50, h(u.blue, .05)), M.forEach((e, n) => {
|
|
1580
1579
|
let r = A[e.fromIdx], i = A[e.toIdx];
|
|
1581
1580
|
if (!r || !i) return;
|
|
1582
|
-
let a = !!l && (r.id === l || i.id === l), o = _(r.color, i.color, .5), s = a ? .18 : .05, c = a ? .25 : .1, d =
|
|
1581
|
+
let a = !!l && (r.id === l || i.id === l), o = _(r.color, i.color, .5), s = a ? .18 : .05, c = a ? .25 : .1, d = at(r, i);
|
|
1583
1582
|
t.beginPath(), t.moveTo(d.p0.x, d.p0.y), t.bezierCurveTo(d.p1.x, d.p1.y, d.p2.x, d.p2.y, d.p3.x, d.p3.y), t.strokeStyle = h(o, s), t.lineWidth = 16, t.lineCap = "round", t.stroke(), t.strokeStyle = h(o, c), t.lineWidth = 1.5, t.stroke();
|
|
1584
1583
|
for (let t = 0; t < e.conf * 2.5; t++) Math.random() < .45 && p.current.push({
|
|
1585
1584
|
edgeIdx: n,
|
|
@@ -1588,7 +1587,7 @@ function st({ nodes: e, links: t, width: r = 960, height: o = 280, selectedEntit
|
|
|
1588
1587
|
off: (Math.random() - .5) * 13,
|
|
1589
1588
|
sz: .7 + Math.random() * 2
|
|
1590
1589
|
});
|
|
1591
|
-
let f =
|
|
1590
|
+
let f = rt(d, .5), m = `${Math.round(e.conf * 100)}%`;
|
|
1592
1591
|
t.font = "bold 12px 'JetBrains Mono', monospace", t.textBaseline = "middle";
|
|
1593
1592
|
let g = t.measureText(m).width + 14;
|
|
1594
1593
|
t.fillStyle = "rgba(10,16,24,0.88)", t.beginPath(), t.roundRect(f.x - g / 2, f.y - 11, g, 22, 6), t.fill(), t.strokeStyle = h(u.blue, .25), t.lineWidth = 1, t.stroke(), t.fillStyle = h(u.blue, .9), t.textAlign = "center", t.fillText(m, f.x, f.y);
|
|
@@ -1598,7 +1597,7 @@ function st({ nodes: e, links: t, width: r = 960, height: o = 280, selectedEntit
|
|
|
1598
1597
|
if (!n) return !1;
|
|
1599
1598
|
let r = A[n.fromIdx], i = A[n.toIdx];
|
|
1600
1599
|
if (!r || !i) return !1;
|
|
1601
|
-
let a =
|
|
1600
|
+
let a = at(r, i), o = rt(a, e.t), s = it(a, e.t), c = o.x + s.x * e.off, l = o.y + s.y * e.off, u = Math.sin(e.t * Math.PI) * .7, d = _(r.color, i.color, e.t);
|
|
1602
1601
|
return y(t, c, l, e.sz * 3, d, u * .1), t.beginPath(), t.arc(c, l, e.sz, 0, Math.PI * 2), t.fillStyle = h(d, u), t.fill(), !0;
|
|
1603
1602
|
}), p.current.length > 350 && (p.current = p.current.slice(-350)), A.forEach((n, r) => {
|
|
1604
1603
|
let i = l === n.id, a = m.current === `node-${r}`, o = j(e, .03, 3e-4) * .1 + 1, s = n.r * o * (i ? 1.15 : 1);
|
|
@@ -1655,10 +1654,10 @@ function st({ nodes: e, links: t, width: r = 960, height: o = 280, selectedEntit
|
|
|
1655
1654
|
}
|
|
1656
1655
|
//#endregion
|
|
1657
1656
|
//#region src/components/sankey/ProcessSankey.tsx
|
|
1658
|
-
function
|
|
1659
|
-
return /* @__PURE__ */ s(
|
|
1660
|
-
nodes:
|
|
1661
|
-
links:
|
|
1657
|
+
function st({ selectedEntity: e, colors: t }) {
|
|
1658
|
+
return /* @__PURE__ */ s(ot, {
|
|
1659
|
+
nodes: Ve.nodes,
|
|
1660
|
+
links: Ve.links,
|
|
1662
1661
|
width: 960,
|
|
1663
1662
|
height: 280,
|
|
1664
1663
|
selectedEntity: e
|
|
@@ -1666,7 +1665,7 @@ function ct({ selectedEntity: e, colors: t }) {
|
|
|
1666
1665
|
}
|
|
1667
1666
|
//#endregion
|
|
1668
1667
|
//#region src/components/sankey/RankingSankey.tsx
|
|
1669
|
-
function
|
|
1668
|
+
function ct({ rows: e = [], className: t, colors: n }) {
|
|
1670
1669
|
let { nodes: r, links: a } = i(() => {
|
|
1671
1670
|
let t = e.slice(0, 5);
|
|
1672
1671
|
return {
|
|
@@ -1684,7 +1683,7 @@ function lt({ rows: e = [], className: t, colors: n }) {
|
|
|
1684
1683
|
}))
|
|
1685
1684
|
};
|
|
1686
1685
|
}, [e]);
|
|
1687
|
-
return /* @__PURE__ */ s(
|
|
1686
|
+
return /* @__PURE__ */ s($e, {
|
|
1688
1687
|
nodes: r,
|
|
1689
1688
|
links: a,
|
|
1690
1689
|
width: 760,
|
|
@@ -1696,18 +1695,18 @@ function lt({ rows: e = [], className: t, colors: n }) {
|
|
|
1696
1695
|
}
|
|
1697
1696
|
//#endregion
|
|
1698
1697
|
//#region src/components/balanceScaleChart/BalanceScaleChart.tsx
|
|
1699
|
-
var
|
|
1700
|
-
function
|
|
1698
|
+
var lt = 500, ut = 210;
|
|
1699
|
+
function dt({ left: e, right: t, "data-testid": r }) {
|
|
1701
1700
|
let i = a(null), o = a(0);
|
|
1702
1701
|
return n(() => {
|
|
1703
1702
|
let n = i.current;
|
|
1704
1703
|
if (!n) return;
|
|
1705
|
-
let r = v(n,
|
|
1704
|
+
let r = v(n, lt, ut);
|
|
1706
1705
|
o.current = 0;
|
|
1707
|
-
let a =
|
|
1706
|
+
let a = lt / 2, s = Math.max(e.value ?? 0, t.value ?? 0, 1), c = (e.value - t.value) / s * 14, l, d = () => {
|
|
1708
1707
|
o.current++;
|
|
1709
1708
|
let n = o.current;
|
|
1710
|
-
r.clearRect(0, 0,
|
|
1709
|
+
r.clearRect(0, 0, lt, ut), r.letterSpacing = f.letterSpacing;
|
|
1711
1710
|
let i = D(Math.min(n / 80, 1)), m = c * A(Math.min(n / 80, 1)) * Math.PI / 180;
|
|
1712
1711
|
r.strokeStyle = h(u.bd, .5 * i), r.lineWidth = 2, r.beginPath(), r.moveTo(a, 20), r.lineTo(a, 150), r.stroke(), r.beginPath(), r.arc(a, 20, 5 * i, 0, Math.PI * 2), r.fillStyle = u.t2, r.fill();
|
|
1713
1712
|
let g = {
|
|
@@ -1742,16 +1741,16 @@ function ft({ left: e, right: t, "data-testid": r }) {
|
|
|
1742
1741
|
"data-testid": r,
|
|
1743
1742
|
style: {
|
|
1744
1743
|
position: "relative",
|
|
1745
|
-
width:
|
|
1746
|
-
height:
|
|
1744
|
+
width: lt,
|
|
1745
|
+
height: ut
|
|
1747
1746
|
},
|
|
1748
1747
|
children: /* @__PURE__ */ s("canvas", {
|
|
1749
1748
|
ref: i,
|
|
1750
1749
|
role: "img",
|
|
1751
1750
|
"aria-label": "Quotation balance — accepted vs submitted quotation value",
|
|
1752
1751
|
style: {
|
|
1753
|
-
width:
|
|
1754
|
-
height:
|
|
1752
|
+
width: lt,
|
|
1753
|
+
height: ut,
|
|
1755
1754
|
display: "block"
|
|
1756
1755
|
}
|
|
1757
1756
|
})
|
|
@@ -1759,25 +1758,25 @@ function ft({ left: e, right: t, "data-testid": r }) {
|
|
|
1759
1758
|
}
|
|
1760
1759
|
//#endregion
|
|
1761
1760
|
//#region src/components/areaLineChart/AreaLineChart.tsx
|
|
1762
|
-
var
|
|
1763
|
-
function
|
|
1761
|
+
var ft = 680, q = 280;
|
|
1762
|
+
function pt({ points: e = [], "data-testid": t }) {
|
|
1764
1763
|
let r = a(null), o = a(/* @__PURE__ */ new Map()), l = a(0), { hoveredRef: d, tooltip: p, hitZonesRef: m } = w(r, {
|
|
1765
|
-
width:
|
|
1764
|
+
width: ft,
|
|
1766
1765
|
height: q
|
|
1767
1766
|
}), g = i(() => e.filter((e) => typeof e == "object" && !!e), [e]);
|
|
1768
1767
|
return n(() => {
|
|
1769
1768
|
let e = r.current;
|
|
1770
1769
|
if (!e) return;
|
|
1771
|
-
let t = v(e,
|
|
1770
|
+
let t = v(e, ft, q);
|
|
1772
1771
|
l.current = 0;
|
|
1773
|
-
let n =
|
|
1772
|
+
let n = ft - 54 - 28, i = q - 30 - 54, a = Math.max(...g.map((e) => e.count), 1), s = g.length, c = s > 1 ? n / (s - 1) : n, p = g.map((e, t) => ({
|
|
1774
1773
|
x: 54 + t * c,
|
|
1775
1774
|
y: 30 + i - e.count / a * i,
|
|
1776
1775
|
point: e
|
|
1777
1776
|
})), _, b = () => {
|
|
1778
1777
|
l.current++;
|
|
1779
1778
|
let e = l.current;
|
|
1780
|
-
t.clearRect(0, 0,
|
|
1779
|
+
t.clearRect(0, 0, ft, q), t.letterSpacing = f.letterSpacing;
|
|
1781
1780
|
let r = D(Math.min(e / 72, 1));
|
|
1782
1781
|
N(o.current, d.current), m.current = [], [
|
|
1783
1782
|
.25,
|
|
@@ -1810,8 +1809,8 @@ function mt({ points: e = [], "data-testid": t }) {
|
|
|
1810
1809
|
let r = `pt-${n}`, s = o.current.get(r) ?? 0;
|
|
1811
1810
|
T(m.current, r, e.x, e.y, 10, {
|
|
1812
1811
|
label: e.point.week,
|
|
1813
|
-
value:
|
|
1814
|
-
sublabel:
|
|
1812
|
+
value: String(e.point.count),
|
|
1813
|
+
sublabel: String(e.point.value),
|
|
1815
1814
|
color: u.blue
|
|
1816
1815
|
}), s > 0 && S(t, e.x, 30, 30 + i, h(u.blue, .15 * s));
|
|
1817
1816
|
let c = e.point.count === a;
|
|
@@ -1820,7 +1819,7 @@ function mt({ points: e = [], "data-testid": t }) {
|
|
|
1820
1819
|
};
|
|
1821
1820
|
return b(), () => cancelAnimationFrame(_);
|
|
1822
1821
|
}, [g]), g.length < 2 ? /* @__PURE__ */ s(L, {
|
|
1823
|
-
width:
|
|
1822
|
+
width: ft,
|
|
1824
1823
|
height: q,
|
|
1825
1824
|
"data-testid": t
|
|
1826
1825
|
}) : /* @__PURE__ */ s("div", {
|
|
@@ -1833,7 +1832,7 @@ function mt({ points: e = [], "data-testid": t }) {
|
|
|
1833
1832
|
children: /* @__PURE__ */ c("div", {
|
|
1834
1833
|
style: {
|
|
1835
1834
|
position: "relative",
|
|
1836
|
-
width:
|
|
1835
|
+
width: ft,
|
|
1837
1836
|
height: q
|
|
1838
1837
|
},
|
|
1839
1838
|
children: [/* @__PURE__ */ s("canvas", {
|
|
@@ -1841,13 +1840,13 @@ function mt({ points: e = [], "data-testid": t }) {
|
|
|
1841
1840
|
role: "img",
|
|
1842
1841
|
"aria-label": "Trend chart — count over time",
|
|
1843
1842
|
style: {
|
|
1844
|
-
width:
|
|
1843
|
+
width: ft,
|
|
1845
1844
|
height: q,
|
|
1846
1845
|
display: "block"
|
|
1847
1846
|
}
|
|
1848
1847
|
}), /* @__PURE__ */ s(C, {
|
|
1849
1848
|
...p,
|
|
1850
|
-
parentW:
|
|
1849
|
+
parentW: ft,
|
|
1851
1850
|
parentH: q
|
|
1852
1851
|
})]
|
|
1853
1852
|
})
|
|
@@ -1855,31 +1854,31 @@ function mt({ points: e = [], "data-testid": t }) {
|
|
|
1855
1854
|
}
|
|
1856
1855
|
//#endregion
|
|
1857
1856
|
//#region src/components/trend/Trend.tsx
|
|
1858
|
-
var
|
|
1859
|
-
function
|
|
1857
|
+
var mt = 680, J = 280, ht = 54, gt = 48, _t = 64, vt = f.font, yt = 12, bt = Math.PI * 2, xt = 72, St = 20, Ct = 5e3;
|
|
1858
|
+
function wt({ points: e = [], "data-testid": t }) {
|
|
1860
1859
|
let r = a(null), o = a(null), l = a(0), d = i(() => e.filter((e) => typeof e == "object" && !!e), [e]), p = i(() => {
|
|
1861
|
-
if (d.length <= 1) return
|
|
1860
|
+
if (d.length <= 1) return _t;
|
|
1862
1861
|
let e = document.createElement("canvas").getContext("2d");
|
|
1863
|
-
if (!e) return
|
|
1864
|
-
e.font =
|
|
1865
|
-
let t = Math.max(1, Math.ceil(d.length /
|
|
1866
|
-
return Math.max(
|
|
1867
|
-
}, [d]), m = Math.round(p / 2), g =
|
|
1862
|
+
if (!e) return _t;
|
|
1863
|
+
e.font = vt;
|
|
1864
|
+
let t = Math.max(1, Math.ceil(d.length / St)), n = Math.max(...d.filter((e, n) => n % t === 0).map((t) => e.measureText(t.week).width));
|
|
1865
|
+
return Math.max(_t, n + yt);
|
|
1866
|
+
}, [d]), m = Math.round(p / 2), g = gt + m + Math.max(0, d.length - 1) * p, _ = Math.max(mt - ht, Math.min(g, Ct)), { tooltip: y, hitZonesRef: b } = w(r, {
|
|
1868
1867
|
width: _,
|
|
1869
1868
|
height: J
|
|
1870
1869
|
});
|
|
1871
1870
|
return n(() => {
|
|
1872
1871
|
let e = r.current;
|
|
1873
1872
|
if (!e) return;
|
|
1874
|
-
let t = v(e, _, J), n = o.current ? v(o.current,
|
|
1873
|
+
let t = v(e, _, J), n = o.current ? v(o.current, ht, J) : null;
|
|
1875
1874
|
l.current = 0;
|
|
1876
|
-
let i = d.length <=
|
|
1875
|
+
let i = d.length <= xt ? xt : Math.max(24, Math.round(xt * (xt / d.length))), a = _ - gt, s = J - 42 - 54, c = d.length > 0 ? d.map((e) => e.count) : [0], g = Math.min(...c), y = Math.max(...c), x = y - g || 1, S = d.length, C = S > 1 ? (a - m) / (S - 1) : a - m, w = Math.max(1, Math.ceil(p / C)), E = g < 0, O = E ? 42 + s - -g / x * s : 42 + s, k = d.map((e, t) => ({
|
|
1877
1876
|
x: m + t * C,
|
|
1878
1877
|
y: 42 + s - (e.count - g) / x * s,
|
|
1879
1878
|
point: e
|
|
1880
1879
|
}));
|
|
1881
1880
|
if (n) {
|
|
1882
|
-
n.clearRect(0, 0,
|
|
1881
|
+
n.clearRect(0, 0, ht, J), n.letterSpacing = f.letterSpacing;
|
|
1883
1882
|
let e = E ? [
|
|
1884
1883
|
g,
|
|
1885
1884
|
g + x * .25,
|
|
@@ -1895,13 +1894,13 @@ function Tt({ points: e = [], "data-testid": t }) {
|
|
|
1895
1894
|
];
|
|
1896
1895
|
e.forEach((t, r) => {
|
|
1897
1896
|
let i = r / (e.length - 1), a = 42 + s - i * s;
|
|
1898
|
-
n.font = f.font, n.fillStyle = f.color, n.textAlign = "right", n.fillText(U(t),
|
|
1897
|
+
n.font = f.font, n.fillStyle = f.color, n.textAlign = "right", n.fillText(U(t), ht - 6, a + 3);
|
|
1899
1898
|
}), n.save(), n.translate(12, 42 + s / 2), n.rotate(-Math.PI / 2), n.font = f.font, n.fillStyle = f.color, n.textAlign = "center", n.fillText("Count", 0, 0), n.restore();
|
|
1900
1899
|
}
|
|
1901
1900
|
let A = t.createLinearGradient(0, 42, 0, 42 + s);
|
|
1902
1901
|
A.addColorStop(0, h(u.blue, .22)), A.addColorStop(1, h(u.blue, .02));
|
|
1903
1902
|
let j = 0, M, N = (e) => {
|
|
1904
|
-
t.font =
|
|
1903
|
+
t.font = vt, t.fillStyle = f.color, t.textAlign = "center";
|
|
1905
1904
|
for (let n = 0; n < e; n++) n % w === 0 && t.fillText(k[n].point.week, k[n].x, J - 54 + 14);
|
|
1906
1905
|
}, P = () => {
|
|
1907
1906
|
l.current++;
|
|
@@ -1937,13 +1936,13 @@ function Tt({ points: e = [], "data-testid": t }) {
|
|
|
1937
1936
|
e === 0 ? t.moveTo(i, a) : t.lineTo(i, a);
|
|
1938
1937
|
}
|
|
1939
1938
|
t.strokeStyle = h(u.blue, .85), t.lineWidth = 2, t.stroke(), t.fillStyle = h(u.blue, .8), t.beginPath();
|
|
1940
|
-
for (let e = 0; e < c; e++) t.moveTo(k[e].x + 3.5, k[e].y), t.arc(k[e].x, k[e].y, 3.5, 0,
|
|
1939
|
+
for (let e = 0; e < c; e++) t.moveTo(k[e].x + 3.5, k[e].y), t.arc(k[e].x, k[e].y, 3.5, 0, bt);
|
|
1941
1940
|
if (t.fill(), c > j) {
|
|
1942
1941
|
b.current = [];
|
|
1943
1942
|
for (let e = 0; e < c; e++) T(b.current, `pt-${e}`, k[e].x, k[e].y, 10, {
|
|
1944
1943
|
label: k[e].point.week,
|
|
1945
|
-
value:
|
|
1946
|
-
sublabel:
|
|
1944
|
+
value: String(k[e].point.count),
|
|
1945
|
+
sublabel: String(k[e].point.value),
|
|
1947
1946
|
color: u.blue
|
|
1948
1947
|
});
|
|
1949
1948
|
j = c;
|
|
@@ -1957,7 +1956,7 @@ function Tt({ points: e = [], "data-testid": t }) {
|
|
|
1957
1956
|
p,
|
|
1958
1957
|
b
|
|
1959
1958
|
]), d.length < 2 ? /* @__PURE__ */ s(L, {
|
|
1960
|
-
width:
|
|
1959
|
+
width: mt,
|
|
1961
1960
|
height: J,
|
|
1962
1961
|
"data-testid": t
|
|
1963
1962
|
}) : /* @__PURE__ */ c("div", {
|
|
@@ -1971,7 +1970,7 @@ function Tt({ points: e = [], "data-testid": t }) {
|
|
|
1971
1970
|
ref: o,
|
|
1972
1971
|
"aria-hidden": "true",
|
|
1973
1972
|
style: {
|
|
1974
|
-
width:
|
|
1973
|
+
width: ht,
|
|
1975
1974
|
height: J,
|
|
1976
1975
|
display: "block",
|
|
1977
1976
|
flexShrink: 0
|
|
@@ -1980,6 +1979,7 @@ function Tt({ points: e = [], "data-testid": t }) {
|
|
|
1980
1979
|
className: "trend-scroll",
|
|
1981
1980
|
style: {
|
|
1982
1981
|
flex: 1,
|
|
1982
|
+
minWidth: 0,
|
|
1983
1983
|
overflowX: "auto"
|
|
1984
1984
|
},
|
|
1985
1985
|
children: /* @__PURE__ */ c("div", {
|
|
@@ -2008,46 +2008,46 @@ function Tt({ points: e = [], "data-testid": t }) {
|
|
|
2008
2008
|
}
|
|
2009
2009
|
//#endregion
|
|
2010
2010
|
//#region src/components/proportionalBandChart/ProportionalBandChart.tsx
|
|
2011
|
-
var
|
|
2012
|
-
function
|
|
2011
|
+
var Tt = 680, Et = 240, Dt = 28, Ot = 156;
|
|
2012
|
+
function kt(e, t, n) {
|
|
2013
2013
|
if (e.measureText(t).width <= n) return t;
|
|
2014
2014
|
let r = t;
|
|
2015
2015
|
for (; r.length > 0 && e.measureText(`${r}…`).width > n;) r = r.slice(0, -1);
|
|
2016
2016
|
return `${r}…`;
|
|
2017
2017
|
}
|
|
2018
|
-
var
|
|
2018
|
+
var At = {
|
|
2019
2019
|
Critical: u.red,
|
|
2020
2020
|
High: u.orange,
|
|
2021
2021
|
Medium: u.amber,
|
|
2022
2022
|
Low: u.green
|
|
2023
2023
|
};
|
|
2024
|
-
function
|
|
2025
|
-
let r = a(null), o = a(/* @__PURE__ */ new Map()), l = a(0), d = i(() => e.filter((e) => typeof e == "object" && !!e), [e]), m = d.length > 0 ? Math.min(
|
|
2024
|
+
function jt({ severities: e = [], "data-testid": t }) {
|
|
2025
|
+
let r = a(null), o = a(/* @__PURE__ */ new Map()), l = a(0), d = i(() => e.filter((e) => typeof e == "object" && !!e), [e]), m = d.length > 0 ? Math.min(Tt, 2 * Dt + d.length * Ot) : Tt, { hoveredRef: g, tooltip: _, hitZonesRef: b } = w(r, {
|
|
2026
2026
|
width: m,
|
|
2027
|
-
height:
|
|
2027
|
+
height: Et
|
|
2028
2028
|
});
|
|
2029
2029
|
return n(() => {
|
|
2030
2030
|
let e = r.current;
|
|
2031
2031
|
if (!e) return;
|
|
2032
|
-
let t = v(e, m,
|
|
2032
|
+
let t = v(e, m, Et);
|
|
2033
2033
|
l.current = 0;
|
|
2034
|
-
let n = d.reduce((e, t) => e + (t.count ?? 0), 0), i =
|
|
2034
|
+
let n = d.reduce((e, t) => e + (t.count ?? 0), 0), i = Dt, a = Dt, s = m - i - a, c = Et - 50 - 52, _ = d.map((e) => (e.count ?? 0) / (n || 1) * s), x, S = () => {
|
|
2035
2035
|
l.current++;
|
|
2036
2036
|
let e = l.current;
|
|
2037
|
-
t.clearRect(0, 0, m,
|
|
2037
|
+
t.clearRect(0, 0, m, Et), t.letterSpacing = f.letterSpacing;
|
|
2038
2038
|
let r = O(Math.min(e / 60, 1));
|
|
2039
2039
|
N(o.current, g.current), b.current = [], t.strokeStyle = h(u.bd, .2), t.lineWidth = 1, t.beginPath(), t.rect(i, 50, s, c), t.stroke(), t.strokeStyle = h(u.t2, .15), t.lineWidth = 1, t.setLineDash([4, 4]), t.beginPath(), t.moveTo(m / 2, 50), t.lineTo(m / 2, 50 + c), t.stroke(), t.setLineDash([]);
|
|
2040
2040
|
let a = i;
|
|
2041
2041
|
d.forEach((e, i) => {
|
|
2042
|
-
let s =
|
|
2042
|
+
let s = At[e.severity] ?? u.blue, l = _[i], d = o.current.get(e.severity) ?? 0, m = a + l / 2, g = l * .85, v = l * r, x = g * r, S = m - x / 2;
|
|
2043
2043
|
if (v > 0 && (d > 0 && y(t, a + v / 2, 50 + c / 2, v * .4, s, .15 * d), t.beginPath(), t.moveTo(S, 50), t.lineTo(S + x, 50), t.lineTo(a + v, 50 + c), t.lineTo(a, 50 + c), t.closePath(), t.fillStyle = h(s, .45 + d * .25), t.fill(), t.strokeStyle = h(s, (.5 + d * .3) * r), t.lineWidth = d > 0 ? 2 : 1, t.beginPath(), t.moveTo(S, 50), t.lineTo(S + x, 50), t.stroke(), t.strokeStyle = h(s, (.3 + d * .3) * r), t.lineWidth = d > 0 ? 2 : 1, t.beginPath(), t.moveTo(a, 50 + c), t.lineTo(a + v, 50 + c), t.stroke()), E(b.current, e.severity, a, 50, l, c, {
|
|
2044
2044
|
label: e.severity,
|
|
2045
|
-
value:
|
|
2046
|
-
sublabel: `${Math.round((e.count ?? 0) / (n || 1) * 100)}
|
|
2045
|
+
value: U(e.count ?? 0),
|
|
2046
|
+
sublabel: `${Math.round((e.count ?? 0) / (n || 1) * 100)}%`,
|
|
2047
2047
|
color: s
|
|
2048
2048
|
}), r > .5) {
|
|
2049
2049
|
let i = Math.min(1, (r - .5) / .5), o = a + l / 2;
|
|
2050
|
-
t.globalAlpha = i, t.font = f.font, t.fillStyle = d > 0 ? s : h(s, .9), t.textAlign = "center", t.fillText(
|
|
2050
|
+
t.globalAlpha = i, t.font = f.font, t.fillStyle = d > 0 ? s : h(s, .9), t.textAlign = "center", t.fillText(kt(t, e.severity, l - 12), o, 38), t.font = p.font, t.fillStyle = d > 0 ? u.t1 : h(u.t1, .85), t.fillText(U(e.count ?? 0), o, 50 + c / 2 + 6), t.font = f.font, t.fillStyle = d > 0 ? s : f.color, t.fillText(`${Math.round((e.count ?? 0) / (n || 1) * 100)}%`, o, 50 + c + 18), t.globalAlpha = 1;
|
|
2051
2051
|
}
|
|
2052
2052
|
a += l;
|
|
2053
2053
|
});
|
|
@@ -2057,14 +2057,14 @@ function Mt({ severities: e = [], "data-testid": t }) {
|
|
|
2057
2057
|
return S(), () => cancelAnimationFrame(x);
|
|
2058
2058
|
}, [d, m]), d.length === 0 ? /* @__PURE__ */ s(L, {
|
|
2059
2059
|
width: m,
|
|
2060
|
-
height:
|
|
2060
|
+
height: Et,
|
|
2061
2061
|
"data-testid": t
|
|
2062
2062
|
}) : /* @__PURE__ */ c("div", {
|
|
2063
2063
|
"data-testid": t,
|
|
2064
2064
|
style: {
|
|
2065
2065
|
position: "relative",
|
|
2066
2066
|
width: m,
|
|
2067
|
-
height:
|
|
2067
|
+
height: Et
|
|
2068
2068
|
},
|
|
2069
2069
|
children: [/* @__PURE__ */ s("canvas", {
|
|
2070
2070
|
ref: r,
|
|
@@ -2072,24 +2072,25 @@ function Mt({ severities: e = [], "data-testid": t }) {
|
|
|
2072
2072
|
"aria-label": "Early Warning severity distribution — prism spectrum bands",
|
|
2073
2073
|
style: {
|
|
2074
2074
|
width: m,
|
|
2075
|
-
height:
|
|
2075
|
+
height: Et,
|
|
2076
2076
|
display: "block"
|
|
2077
2077
|
}
|
|
2078
2078
|
}), /* @__PURE__ */ s(C, {
|
|
2079
2079
|
..._,
|
|
2080
2080
|
parentW: m,
|
|
2081
|
-
parentH:
|
|
2081
|
+
parentH: Et,
|
|
2082
|
+
placement: "cursor-below"
|
|
2082
2083
|
})]
|
|
2083
2084
|
});
|
|
2084
2085
|
}
|
|
2085
2086
|
//#endregion
|
|
2086
2087
|
//#region src/components/hubAndSpokeRadialChart/HubAndSpokeRadialChart.tsx
|
|
2087
|
-
var Y = 300, X = 280,
|
|
2088
|
+
var Y = 300, X = 280, Mt = 100, Nt = {
|
|
2088
2089
|
Open: u.red,
|
|
2089
2090
|
Submitted: u.amber,
|
|
2090
2091
|
Closed: u.green
|
|
2091
2092
|
};
|
|
2092
|
-
function
|
|
2093
|
+
function Pt({ segments: e = [], title: t, unitLabel: r = "", "data-testid": o }) {
|
|
2093
2094
|
let l = a(null), d = a(0), m = a(/* @__PURE__ */ new Map()), { hoveredRef: g, tooltip: _, hitZonesRef: S } = w(l, {
|
|
2094
2095
|
width: Y,
|
|
2095
2096
|
height: X
|
|
@@ -2099,21 +2100,21 @@ function Ft({ segments: e = [], title: t, unitLabel: r = "", "data-testid": o })
|
|
|
2099
2100
|
if (!e) return;
|
|
2100
2101
|
let n = v(e, Y, X);
|
|
2101
2102
|
d.current = 0;
|
|
2102
|
-
let i = Y * .5, a = X * .56, o =
|
|
2103
|
+
let i = Y * .5, a = X * .56, o = Mt, s = E.reduce((e, t) => e + (t.count ?? 0), 0), c = Math.max(...E.map((e) => e.count ?? 0), 1), _, C = () => {
|
|
2103
2104
|
d.current++;
|
|
2104
2105
|
let e = d.current;
|
|
2105
2106
|
n.clearRect(0, 0, Y, X), n.letterSpacing = f.letterSpacing, S.current = [], m.current.forEach((e, t) => {
|
|
2106
2107
|
let n = t === g.current ? 1 : 0, r = e + (n - e) * .12;
|
|
2107
2108
|
Math.abs(r - n) < .005 ? n === 0 ? m.current.delete(t) : m.current.set(t, 1) : m.current.set(t, r);
|
|
2108
2109
|
}), g.current && !m.current.has(g.current) && m.current.set(g.current, 0), b(n, Y, X, e, 40, h(u.blue, .04)), E.forEach((t, r) => {
|
|
2109
|
-
let s = r / 3 * Math.PI * 2 - Math.PI / 2, l = i + Math.cos(s) * o, d = a + Math.sin(s) * o, f =
|
|
2110
|
+
let s = r / 3 * Math.PI * 2 - Math.PI / 2, l = i + Math.cos(s) * o, d = a + Math.sin(s) * o, f = Nt[t.status] ?? u.blue, m = 2 + t.count / c * 8;
|
|
2110
2111
|
n.beginPath(), n.moveTo(i, a), n.lineTo(l, d), n.strokeStyle = h(f, .08), n.lineWidth = m * 2, n.stroke(), n.beginPath(), n.moveTo(i, a), n.lineTo(l, d), n.strokeStyle = h(f, .25), n.lineWidth = 1, n.stroke();
|
|
2111
2112
|
let g = (e * .005 + r * .33) % 1, _ = i + (l - i) * g, v = a + (d - a) * g;
|
|
2112
2113
|
y(n, _, v, 6, f, .4), n.beginPath(), n.arc(_, v, 2, 0, Math.PI * 2), n.fillStyle = h(f, .8), n.fill();
|
|
2113
2114
|
let b = (i + l) / 2, x = (a + d) / 2;
|
|
2114
2115
|
n.font = p.font, n.textAlign = "center", n.textBaseline = "middle", n.fillStyle = h(f, .85), n.fillText(String(t.count), b, x);
|
|
2115
2116
|
}), E.forEach((e, t) => {
|
|
2116
|
-
let l = t / 3 * Math.PI * 2 - Math.PI / 2, d = i + Math.cos(l) * o, p = a + Math.sin(l) * o, g =
|
|
2117
|
+
let l = t / 3 * Math.PI * 2 - Math.PI / 2, d = i + Math.cos(l) * o, p = a + Math.sin(l) * o, g = Nt[e.status] ?? u.blue, _ = 10 + e.count / c * 18, v = m.current.get(e.status) ?? 0;
|
|
2117
2118
|
y(n, d, p, _ * 2.5, g, .2 + v * .15);
|
|
2118
2119
|
let b = n.createRadialGradient(d, p - _ * .2, 0, d, p, _);
|
|
2119
2120
|
b.addColorStop(0, h(g, .8 + v * .2)), b.addColorStop(1, h(g, .4 + v * .1)), n.beginPath(), n.arc(d, p, _, 0, Math.PI * 2), n.fillStyle = b, n.fill(), n.font = "bold " + f.font, n.textAlign = "center", n.textBaseline = "middle", n.fillStyle = h(u.t1, .9), n.fillText(e.status, d, p), T(S.current, e.status, d, p, _ + 6, {
|
|
@@ -2167,8 +2168,8 @@ function Ft({ segments: e = [], title: t, unitLabel: r = "", "data-testid": o })
|
|
|
2167
2168
|
}
|
|
2168
2169
|
//#endregion
|
|
2169
2170
|
//#region src/components/trendChart/TrendChart.tsx
|
|
2170
|
-
var
|
|
2171
|
-
function
|
|
2171
|
+
var Ft = 280, Z = 96;
|
|
2172
|
+
function It({ points: e = [], className: t, colors: r }) {
|
|
2172
2173
|
let o = a(null), d = a(/* @__PURE__ */ new Map()), f = a(0), p = i(() => e.filter(Array.isArray).map(([e, t]) => {
|
|
2173
2174
|
let n = String(t).match(/-?\d+(\.\d+)?/);
|
|
2174
2175
|
return {
|
|
@@ -2176,18 +2177,18 @@ function Lt({ points: e = [], className: t, colors: r }) {
|
|
|
2176
2177
|
value: n ? Number(n[0]) : 0
|
|
2177
2178
|
};
|
|
2178
2179
|
}), [e]), { mouseRef: m, hoveredRef: g, tooltip: _, hitZonesRef: b } = w(o, {
|
|
2179
|
-
width:
|
|
2180
|
+
width: Ft,
|
|
2180
2181
|
height: Z
|
|
2181
2182
|
});
|
|
2182
2183
|
return n(() => {
|
|
2183
2184
|
let e = o.current;
|
|
2184
2185
|
if (!e) return;
|
|
2185
|
-
let t = v(e,
|
|
2186
|
+
let t = v(e, Ft, Z);
|
|
2186
2187
|
f.current = 0;
|
|
2187
2188
|
let n = r?.line ?? u.blue, i = r?.point ?? u.blue, a = r?.axisLine ?? u.bd, s, c = () => {
|
|
2188
2189
|
f.current++;
|
|
2189
2190
|
let e = f.current;
|
|
2190
|
-
if (t.clearRect(0, 0,
|
|
2191
|
+
if (t.clearRect(0, 0, Ft, Z), p.length < 2) {
|
|
2191
2192
|
s = requestAnimationFrame(c);
|
|
2192
2193
|
return;
|
|
2193
2194
|
}
|
|
@@ -2196,8 +2197,8 @@ function Lt({ points: e = [], className: t, colors: r }) {
|
|
|
2196
2197
|
right: 12,
|
|
2197
2198
|
top: 16,
|
|
2198
2199
|
bottom: 20
|
|
2199
|
-
}, o =
|
|
2200
|
-
if (N(d.current, g.current), b.current = [], t.strokeStyle = h(a, .3), t.lineWidth = .5, t.setLineDash([]), t.beginPath(), t.moveTo(r.left, Z - r.bottom), t.lineTo(
|
|
2200
|
+
}, o = Ft - r.left - r.right, l = Z - r.top - r.bottom, _ = p.map((e) => e.value), v = Math.min(..._), x = Math.max(..._) - v || 1, C = (e) => r.left + e / (p.length - 1) * o, w = (e) => r.top + (1 - (e - v) / x) * l, E = 1 - (1 - Math.min(e / 48, 1)) ** 3, D = Math.max(2, Math.floor(E * p.length));
|
|
2201
|
+
if (N(d.current, g.current), b.current = [], t.strokeStyle = h(a, .3), t.lineWidth = .5, t.setLineDash([]), t.beginPath(), t.moveTo(r.left, Z - r.bottom), t.lineTo(Ft - r.right, Z - r.bottom), t.stroke(), t.font = "9px 'JetBrains Mono', monospace", t.fillStyle = h(u.t4, .9), t.textAlign = "center", p.forEach((e, n) => {
|
|
2201
2202
|
t.fillText(e.label.replace("Day ", "D"), C(n), Z - 4);
|
|
2202
2203
|
}), m.current.over && g.current) {
|
|
2203
2204
|
let e = parseInt(g.current.split("-")[1]);
|
|
@@ -2234,7 +2235,7 @@ function Lt({ points: e = [], className: t, colors: r }) {
|
|
|
2234
2235
|
children: /* @__PURE__ */ c("div", {
|
|
2235
2236
|
style: {
|
|
2236
2237
|
position: "relative",
|
|
2237
|
-
width:
|
|
2238
|
+
width: Ft,
|
|
2238
2239
|
height: Z
|
|
2239
2240
|
},
|
|
2240
2241
|
children: [/* @__PURE__ */ s("canvas", {
|
|
@@ -2242,14 +2243,14 @@ function Lt({ points: e = [], className: t, colors: r }) {
|
|
|
2242
2243
|
role: "img",
|
|
2243
2244
|
"aria-label": "trend chart",
|
|
2244
2245
|
style: {
|
|
2245
|
-
width:
|
|
2246
|
+
width: Ft,
|
|
2246
2247
|
height: Z,
|
|
2247
2248
|
display: "block",
|
|
2248
2249
|
borderRadius: 8
|
|
2249
2250
|
}
|
|
2250
2251
|
}), /* @__PURE__ */ s(C, {
|
|
2251
2252
|
..._,
|
|
2252
|
-
parentW:
|
|
2253
|
+
parentW: Ft,
|
|
2253
2254
|
parentH: Z
|
|
2254
2255
|
})]
|
|
2255
2256
|
})
|
|
@@ -2257,67 +2258,72 @@ function Lt({ points: e = [], className: t, colors: r }) {
|
|
|
2257
2258
|
}
|
|
2258
2259
|
//#endregion
|
|
2259
2260
|
//#region src/components/segmentedSplitBarChart/SegmentedSplitBarChart.tsx
|
|
2260
|
-
function
|
|
2261
|
+
function Lt(e, t, n) {
|
|
2261
2262
|
if (e.measureText(t).width <= n) return t;
|
|
2262
2263
|
let r = t;
|
|
2263
2264
|
for (; r.length > 0 && e.measureText(r + "…").width > n;) r = r.slice(0, -1);
|
|
2264
2265
|
return r + "…";
|
|
2265
2266
|
}
|
|
2266
|
-
var
|
|
2267
|
-
function
|
|
2268
|
-
let r = a(null), l = a(/* @__PURE__ */ new Map()), d = a(0), [g, _] = o(!1), b = i(() => e.filter((e) => typeof e == "object" && !!e), [e]), x = i(() => g ? b : b.slice(0,
|
|
2269
|
-
width:
|
|
2267
|
+
var Rt = 680, zt = 8, Bt = 26, Vt = 14, Ht = 16, Ut = 32;
|
|
2268
|
+
function Wt({ items: e = [], "data-testid": t }) {
|
|
2269
|
+
let r = a(null), l = a(/* @__PURE__ */ new Map()), d = a(0), [g, _] = o(!1), b = i(() => e.filter((e) => typeof e == "object" && !!e), [e]), x = i(() => g ? b : b.slice(0, zt), [b, g]), S = Ht + Ut + x.length * (Bt + Vt) - Vt, { hoveredRef: T, tooltip: D, hitZonesRef: k } = w(r, {
|
|
2270
|
+
width: Rt,
|
|
2270
2271
|
height: S
|
|
2271
2272
|
});
|
|
2272
2273
|
return n(() => {
|
|
2273
2274
|
let e = r.current;
|
|
2274
2275
|
if (!e) return;
|
|
2275
|
-
let t = v(e,
|
|
2276
|
+
let t = v(e, Rt, S);
|
|
2276
2277
|
d.current = 0;
|
|
2277
|
-
let n =
|
|
2278
|
+
let n = Ht, i = Ut, a = Bt, o = Vt, s = Rt - 150 - 28, c = Math.max(...x.map((e) => (e.implemented ?? 0) + (e.unimplemented ?? 0)), 1), g = x.length * (a + o) - o, _ = n + (S - n - i - g) / 2, b, C = () => {
|
|
2278
2279
|
d.current++;
|
|
2279
2280
|
let e = d.current;
|
|
2280
|
-
t.clearRect(0, 0,
|
|
2281
|
+
t.clearRect(0, 0, Rt, S);
|
|
2281
2282
|
let n = O(Math.min(e / 60, 1));
|
|
2282
2283
|
N(l.current, T.current), k.current = [], x.forEach((e, r) => {
|
|
2283
2284
|
let i = M(n, r, x.length, O), d = _ + r * (a + o), m = (e.implemented ?? 0) + (e.unimplemented ?? 0), g = (e.implemented ?? 0) / c * s * i, v = (e.unimplemented ?? 0) / c * s * i, b = `${e.id}-impl`, S = `${e.id}-un`, C = l.current.get(b) ?? 0, w = l.current.get(S) ?? 0;
|
|
2284
|
-
E(k.current, b,
|
|
2285
|
-
label:
|
|
2286
|
-
value:
|
|
2287
|
-
sublabel: `${Math.round((e.implemented ?? 0) / (m || 1) * 100)}
|
|
2285
|
+
E(k.current, b, 150, d, g || 1, a, {
|
|
2286
|
+
label: e.name,
|
|
2287
|
+
value: U(e.implemented ?? 0),
|
|
2288
|
+
sublabel: `${Math.round((e.implemented ?? 0) / (m || 1) * 100)}%`,
|
|
2288
2289
|
color: u.green
|
|
2289
|
-
}), E(k.current, S,
|
|
2290
|
-
label:
|
|
2291
|
-
value:
|
|
2292
|
-
sublabel: `${Math.round((e.unimplemented ?? 0) / (m || 1) * 100)}
|
|
2290
|
+
}), E(k.current, S, 150 + g, d, v || 1, a, {
|
|
2291
|
+
label: e.name,
|
|
2292
|
+
value: U(e.unimplemented ?? 0),
|
|
2293
|
+
sublabel: `${Math.round((e.unimplemented ?? 0) / (m || 1) * 100)}%`,
|
|
2293
2294
|
color: u.amber
|
|
2294
|
-
}), t.font = f.font, t.fillStyle = u.t2, t.textAlign = "right", t.fillText(
|
|
2295
|
+
}), t.font = f.font, t.fillStyle = u.t2, t.textAlign = "right", t.fillText(Lt(t, e.abbreviation ?? e.name ?? "", 134), 142, d + a / 2 + 4), E(k.current, b, 0, d, 150, a, {
|
|
2296
|
+
label: e.name ?? e.abbreviation ?? "",
|
|
2297
|
+
value: `${U((e.implemented ?? 0) + (e.unimplemented ?? 0))} total variations`,
|
|
2298
|
+
sublabel: `Implemented: ${U(e.implemented ?? 0)} · Pending: ${U(e.unimplemented ?? 0)}`,
|
|
2299
|
+
color: u.green
|
|
2300
|
+
}), t.fillStyle = h(u.bd, .15), t.beginPath(), t.roundRect(150, d, m / c * s, a, 4), t.fill(), g > 0 && (C > 0 && y(t, 150 + g / 2, d + a / 2, g * .3, u.green, .12 * C), t.fillStyle = h(u.green, .6 + C * .2), t.beginPath(), t.roundRect(150, d, g, a, [
|
|
2295
2301
|
4,
|
|
2296
2302
|
0,
|
|
2297
2303
|
0,
|
|
2298
2304
|
4
|
|
2299
|
-
]), t.fill(), g > 28 && i > .5 && (t.font = p.font, t.fillStyle = C > 0 ? u.green : u.t2, t.textAlign = "center", t.fillText(U(e.implemented ?? 0),
|
|
2305
|
+
]), t.fill(), g > 28 && i > .5 && (t.font = p.font, t.fillStyle = C > 0 ? u.green : u.t2, t.textAlign = "center", t.fillText(U(e.implemented ?? 0), 150 + g / 2, d + a / 2 + 4))), v > 0 && (w > 0 && y(t, 150 + g + v / 2, d + a / 2, v * .3, u.amber, .12 * w), t.fillStyle = h(u.amber, .18 + w * .18), t.strokeStyle = h(u.amber, .3 + w * .3), t.lineWidth = 1, t.beginPath(), t.roundRect(150 + g, d, v, a, [
|
|
2300
2306
|
0,
|
|
2301
2307
|
4,
|
|
2302
2308
|
4,
|
|
2303
2309
|
0
|
|
2304
|
-
]), t.fill(), t.stroke(), v > 28 && i > .5 && (t.font = p.font, t.fillStyle = w > 0 ? u.amber : u.t2, t.textAlign = "center", t.fillText(U(e.unimplemented ?? 0),
|
|
2310
|
+
]), t.fill(), t.stroke(), v > 28 && i > .5 && (t.font = p.font, t.fillStyle = w > 0 ? u.amber : u.t2, t.textAlign = "center", t.fillText(U(e.unimplemented ?? 0), 150 + g + v / 2, d + a / 2 + 4))), g > 0 && v > 0 && (t.strokeStyle = h(u.bg, .7), t.lineWidth = 2, t.beginPath(), t.moveTo(150 + g, d), t.lineTo(150 + g, d + a), t.stroke());
|
|
2305
2311
|
});
|
|
2306
|
-
let r = _ + g + 24, i =
|
|
2312
|
+
let r = _ + g + 24, i = 150 + s / 2;
|
|
2307
2313
|
t.font = m.font, t.textAlign = "right", t.fillStyle = u.green, t.fillText("■ Implemented", i - 10, r), t.textAlign = "left", t.fillStyle = m.color, t.fillText("■ Unimplemented", i + 10, r), b = requestAnimationFrame(C);
|
|
2308
2314
|
};
|
|
2309
2315
|
return C(), () => cancelAnimationFrame(b);
|
|
2310
2316
|
}, [x, S]), b.length === 0 ? /* @__PURE__ */ s(L, {
|
|
2311
|
-
width:
|
|
2317
|
+
width: Rt,
|
|
2312
2318
|
height: 160,
|
|
2313
2319
|
"data-testid": t
|
|
2314
2320
|
}) : /* @__PURE__ */ c("div", {
|
|
2315
2321
|
"data-testid": t,
|
|
2316
|
-
style: { width:
|
|
2322
|
+
style: { width: Rt },
|
|
2317
2323
|
children: [/* @__PURE__ */ c("div", {
|
|
2318
2324
|
style: {
|
|
2319
2325
|
position: "relative",
|
|
2320
|
-
width:
|
|
2326
|
+
width: Rt,
|
|
2321
2327
|
height: S
|
|
2322
2328
|
},
|
|
2323
2329
|
children: [/* @__PURE__ */ s("canvas", {
|
|
@@ -2325,16 +2331,16 @@ function Gt({ items: e = [], "data-testid": t }) {
|
|
|
2325
2331
|
role: "img",
|
|
2326
2332
|
"aria-label": "Implemented vs unimplemented variations per contractor — split bar",
|
|
2327
2333
|
style: {
|
|
2328
|
-
width:
|
|
2334
|
+
width: Rt,
|
|
2329
2335
|
height: S,
|
|
2330
2336
|
display: "block"
|
|
2331
2337
|
}
|
|
2332
2338
|
}), /* @__PURE__ */ s(C, {
|
|
2333
2339
|
...D,
|
|
2334
|
-
parentW:
|
|
2340
|
+
parentW: Rt,
|
|
2335
2341
|
parentH: S
|
|
2336
2342
|
})]
|
|
2337
|
-
}), b.length >
|
|
2343
|
+
}), b.length > zt && /* @__PURE__ */ s("div", {
|
|
2338
2344
|
style: { marginTop: 8 },
|
|
2339
2345
|
children: /* @__PURE__ */ s(ie, {
|
|
2340
2346
|
expanded: g,
|
|
@@ -2345,18 +2351,18 @@ function Gt({ items: e = [], "data-testid": t }) {
|
|
|
2345
2351
|
}
|
|
2346
2352
|
//#endregion
|
|
2347
2353
|
//#region src/components/weeklyFlow/WeeklyFlow.tsx
|
|
2348
|
-
var
|
|
2349
|
-
function
|
|
2354
|
+
var Gt = 800, Kt = 360;
|
|
2355
|
+
function qt({ items: e = [], "data-testid": t }) {
|
|
2350
2356
|
let r = a(null), i = a(/* @__PURE__ */ new Map()), o = a(0), { hoveredRef: l, tooltip: m, hitZonesRef: g } = w(r, {
|
|
2351
|
-
width:
|
|
2352
|
-
height:
|
|
2357
|
+
width: Gt,
|
|
2358
|
+
height: Kt
|
|
2353
2359
|
});
|
|
2354
2360
|
return n(() => {
|
|
2355
2361
|
let t = r.current;
|
|
2356
2362
|
if (!t) return;
|
|
2357
|
-
let n = v(t,
|
|
2363
|
+
let n = v(t, Gt, Kt);
|
|
2358
2364
|
o.current = 0;
|
|
2359
|
-
let a = e.reduce((e, t) => e + (t.base ?? 0), 0), s = e.reduce((e, t) => e + (t.variation ?? 0), 0), c = e.reduce((e, t) => e + (t.total ?? 0), 0), m =
|
|
2365
|
+
let a = e.reduce((e, t) => e + (t.base ?? 0), 0), s = e.reduce((e, t) => e + (t.variation ?? 0), 0), c = e.reduce((e, t) => e + (t.total ?? 0), 0), m = Kt - 20 - 26, _ = m - 6 * (e.length - 1), b = 20, x = e.map((e, t) => {
|
|
2360
2366
|
let n = Math.max(24, (e.total ?? 0) / (c || 1) * _), r = {
|
|
2361
2367
|
x: 100 - 110 / 2,
|
|
2362
2368
|
y: b,
|
|
@@ -2384,16 +2390,16 @@ function Jt({ items: e = [], "data-testid": t }) {
|
|
|
2384
2390
|
}, j, P = () => {
|
|
2385
2391
|
o.current++;
|
|
2386
2392
|
let t = o.current;
|
|
2387
|
-
n.clearRect(0, 0,
|
|
2393
|
+
n.clearRect(0, 0, Gt, Kt), n.letterSpacing = f.letterSpacing;
|
|
2388
2394
|
let r = D(Math.min(t / 80, 1));
|
|
2389
2395
|
if (N(i.current, l.current), g.current = [], e.forEach((t, o) => {
|
|
2390
2396
|
let c = x[o], l = M(r, o, e.length, D), u = i.current.get(t.id) ?? 0;
|
|
2391
2397
|
if (l < .01) return;
|
|
2392
2398
|
let d = (t.base ?? 0) / (t.total || 1), f = (t.variation ?? 0) / (t.total || 1), p = c.h * d, m = c.h * f, h = c.y + p / 2, g = c.y + p + m / 2, _ = Math.max(2, (t.base ?? 0) / a * C), v = Math.max(2, (t.variation ?? 0) / s * w), y = O.y + e.slice(0, o).reduce((e, t) => e + (t.base ?? 0) / a * C, 0) + _ / 2, b = k.y + e.slice(0, o).reduce((e, t) => e + (t.variation ?? 0) / s * w, 0) + v / 2, S = u * .2 + .18;
|
|
2393
|
-
|
|
2399
|
+
Jt(n, c.x + 110, h, 420 - 110 / 2, y, _ * l, c.color, S), Jt(n, c.x + 110, g, 420 - 110 / 2, b, v * l, c.color, S * .75);
|
|
2394
2400
|
}), r > .3) {
|
|
2395
2401
|
let e = Math.min(1, (r - .3) / .7), t = A.y + a / c * m / 2, i = A.y + m - s / c * m / 2;
|
|
2396
|
-
|
|
2402
|
+
Jt(n, 475, O.cy, 720 - 110 / 2, t, C * e, u.blue, .25 * e), Jt(n, 475, k.cy, 720 - 110 / 2, i, w * e, u.amber, .22 * e);
|
|
2397
2403
|
}
|
|
2398
2404
|
if ([
|
|
2399
2405
|
"Contractors",
|
|
@@ -2405,22 +2411,22 @@ function Jt({ items: e = [], "data-testid": t }) {
|
|
|
2405
2411
|
420,
|
|
2406
2412
|
720
|
|
2407
2413
|
][t];
|
|
2408
|
-
n.font = f.font, n.fillStyle = f.color, n.textAlign = "center", n.fillText(e, r,
|
|
2414
|
+
n.font = f.font, n.fillStyle = f.color, n.textAlign = "center", n.fillText(e, r, Kt - 8);
|
|
2409
2415
|
}), e.forEach((t, a) => {
|
|
2410
2416
|
let o = x[a], s = M(r, a, e.length, D), c = i.current.get(t.id) ?? 0;
|
|
2411
2417
|
E(g.current, t.id, o.x, o.y, 110, o.h, {
|
|
2412
2418
|
label: t.name,
|
|
2413
|
-
value:
|
|
2414
|
-
sublabel:
|
|
2419
|
+
value: t.totalLabel ?? String(t.total ?? 0),
|
|
2420
|
+
sublabel: `${t.baseLabel ?? String(t.base ?? 0)} + ${t.variationLabel ?? String(t.variation ?? 0)}`,
|
|
2415
2421
|
color: o.color
|
|
2416
2422
|
}), c > 0 && y(n, o.x + 110 / 2, o.cy, 110 * .6, o.color, .12 * c), n.fillStyle = h(o.color, (.3 + c * .15) * s), n.strokeStyle = h(o.color, (.55 + c * .25) * s), n.lineWidth = 1, n.beginPath(), n.roundRect(o.x, o.y, 110 * s, o.h, 4), n.fill(), n.stroke(), s > .6 && o.h >= 24 && (n.globalAlpha = Math.min(1, (s - .6) / .4), n.font = f.font, n.fillStyle = c > 0 ? o.color : h(u.t2, .9), n.textAlign = "center", n.textBaseline = "middle", n.fillText(t.abbreviation ?? t.name?.slice(0, 6) ?? "", o.x + 110 / 2, o.h >= 36 ? o.cy - 5 : o.cy), o.h >= 36 && (n.font = "400 12px 'Satoshi Variable', 'DM Sans', sans-serif", n.fillStyle = h(u.t3, .8), n.fillText(t.totalLabel ?? String(t.total ?? 0), o.x + 110 / 2, o.cy + 7)), n.globalAlpha = 1, n.textBaseline = "alphabetic");
|
|
2417
2423
|
}), r > .2) {
|
|
2418
2424
|
let e = Math.min(1, (r - .2) / .4);
|
|
2419
|
-
y(n, 420, O.cy, 30, u.blue, .1 * e), n.fillStyle = h(u.blue, .3 * e), n.strokeStyle = h(u.blue, .5 * e), n.lineWidth = 1, n.beginPath(), n.roundRect(O.x, O.y, 110, O.h * e, 4), n.fill(), n.stroke(), n.globalAlpha = e, n.textBaseline = "middle", n.font = f.font, n.fillStyle = u.blue, n.textAlign = "center", n.fillText("Base Value", 420, O.cy - 6), n.font = p.font, n.fillStyle = p.color, n.fillText(
|
|
2425
|
+
y(n, 420, O.cy, 30, u.blue, .1 * e), n.fillStyle = h(u.blue, .3 * e), n.strokeStyle = h(u.blue, .5 * e), n.lineWidth = 1, n.beginPath(), n.roundRect(O.x, O.y, 110, O.h * e, 4), n.fill(), n.stroke(), n.globalAlpha = e, n.textBaseline = "middle", n.font = f.font, n.fillStyle = u.blue, n.textAlign = "center", n.fillText("Base Value", 420, O.cy - 6), n.font = p.font, n.fillStyle = p.color, n.fillText(U(a), 420, O.cy + 8), n.globalAlpha = 1, n.textBaseline = "alphabetic", y(n, 420, k.cy, 24, u.amber, .1 * e), n.fillStyle = h(u.amber, .22 * e), n.strokeStyle = h(u.amber, .4 * e), n.beginPath(), n.roundRect(k.x, k.y, 110, k.h * e, 4), n.fill(), n.stroke(), n.globalAlpha = e, n.textBaseline = "middle", n.font = f.font, n.fillStyle = u.amber, n.textAlign = "center", n.fillText("Variations", 420, k.cy - 4), n.font = p.font, n.fillStyle = p.color, n.fillText(U(s), 420, k.cy + 8), n.globalAlpha = 1, n.textBaseline = "alphabetic";
|
|
2420
2426
|
}
|
|
2421
2427
|
if (r > .5) {
|
|
2422
2428
|
let e = Math.min(1, (r - .5) / .5);
|
|
2423
|
-
y(n, 720, A.cy, 44, u.blue, .2 * e), n.fillStyle = h(u.blue, .25 * e), n.strokeStyle = h(u.blue, .6 * e), n.lineWidth = 1.5, n.beginPath(), n.roundRect(A.x, A.y, 110, A.h * e, 6), n.fill(), n.stroke(), n.globalAlpha = e, n.textBaseline = "middle", n.font = f.font, n.fillStyle = u.t2, n.textAlign = "center", n.fillText("Total Commitment", 720, A.cy - 12), n.font = p.font, n.fillStyle = u.blue, n.fillText(
|
|
2429
|
+
y(n, 720, A.cy, 44, u.blue, .2 * e), n.fillStyle = h(u.blue, .25 * e), n.strokeStyle = h(u.blue, .6 * e), n.lineWidth = 1.5, n.beginPath(), n.roundRect(A.x, A.y, 110, A.h * e, 6), n.fill(), n.stroke(), n.globalAlpha = e, n.textBaseline = "middle", n.font = f.font, n.fillStyle = u.t2, n.textAlign = "center", n.fillText("Total Commitment", 720, A.cy - 12), n.font = p.font, n.fillStyle = u.blue, n.fillText(U(c), 720, A.cy + 6), n.globalAlpha = 1, n.textBaseline = "alphabetic";
|
|
2424
2430
|
}
|
|
2425
2431
|
j = requestAnimationFrame(P);
|
|
2426
2432
|
};
|
|
@@ -2429,33 +2435,33 @@ function Jt({ items: e = [], "data-testid": t }) {
|
|
|
2429
2435
|
"data-testid": t,
|
|
2430
2436
|
style: {
|
|
2431
2437
|
position: "relative",
|
|
2432
|
-
width:
|
|
2433
|
-
height:
|
|
2438
|
+
width: Gt,
|
|
2439
|
+
height: Kt
|
|
2434
2440
|
},
|
|
2435
2441
|
children: [/* @__PURE__ */ s("canvas", {
|
|
2436
2442
|
ref: r,
|
|
2437
2443
|
role: "img",
|
|
2438
2444
|
"aria-label": "Weekly report flow — base value and variations per contractor flowing to total commitment",
|
|
2439
2445
|
style: {
|
|
2440
|
-
width:
|
|
2441
|
-
height:
|
|
2446
|
+
width: Gt,
|
|
2447
|
+
height: Kt,
|
|
2442
2448
|
display: "block"
|
|
2443
2449
|
}
|
|
2444
2450
|
}), /* @__PURE__ */ s(C, {
|
|
2445
2451
|
...m,
|
|
2446
|
-
parentW:
|
|
2447
|
-
parentH:
|
|
2452
|
+
parentW: Gt,
|
|
2453
|
+
parentH: Kt
|
|
2448
2454
|
})]
|
|
2449
2455
|
});
|
|
2450
2456
|
}
|
|
2451
|
-
function
|
|
2457
|
+
function Jt(e, t, n, r, i, a, o, s) {
|
|
2452
2458
|
let c = (t + r) / 2;
|
|
2453
2459
|
e.beginPath(), e.moveTo(t, n - a / 2), e.bezierCurveTo(c, n - a / 2, c, i - a / 2, r, i - a / 2), e.lineTo(r, i + a / 2), e.bezierCurveTo(c, i + a / 2, c, n + a / 2, t, n + a / 2), e.closePath(), e.fillStyle = h(o, s), e.fill();
|
|
2454
2460
|
}
|
|
2455
2461
|
//#endregion
|
|
2456
2462
|
//#region src/components/visualizationRenderer/VisualizationRenderer.tsx
|
|
2457
|
-
function
|
|
2458
|
-
return e.type === "line" ? /* @__PURE__ */ s(
|
|
2463
|
+
function Yt({ config: e, className: t }) {
|
|
2464
|
+
return e.type === "line" ? /* @__PURE__ */ s(ze, {
|
|
2459
2465
|
rows: e.rows,
|
|
2460
2466
|
className: t
|
|
2461
2467
|
}) : e.type === "area" ? /* @__PURE__ */ s(ee, {
|
|
@@ -2464,31 +2470,31 @@ function Xt({ config: e, className: t }) {
|
|
|
2464
2470
|
}) : e.type === "bar" ? /* @__PURE__ */ s(re, {
|
|
2465
2471
|
rows: e.rows,
|
|
2466
2472
|
className: t
|
|
2467
|
-
}) : e.type === "pie" ? /* @__PURE__ */ s(
|
|
2473
|
+
}) : e.type === "pie" ? /* @__PURE__ */ s(Ze, {
|
|
2468
2474
|
rows: e.rows,
|
|
2469
2475
|
variant: "pie",
|
|
2470
2476
|
className: t
|
|
2471
|
-
}) : e.type === "donut" ? /* @__PURE__ */ s(
|
|
2477
|
+
}) : e.type === "donut" ? /* @__PURE__ */ s(Ze, {
|
|
2472
2478
|
rows: e.rows,
|
|
2473
2479
|
variant: "donut",
|
|
2474
2480
|
className: t
|
|
2475
|
-
}) : e.type === "sankey" ? /* @__PURE__ */ s(
|
|
2481
|
+
}) : e.type === "sankey" ? /* @__PURE__ */ s(ct, {
|
|
2476
2482
|
rows: e.rows,
|
|
2477
2483
|
className: t
|
|
2478
|
-
}) : e.type === "flow" ? /* @__PURE__ */ s(
|
|
2484
|
+
}) : e.type === "flow" ? /* @__PURE__ */ s(st, {
|
|
2479
2485
|
selectedEntity: e.selectedEntity,
|
|
2480
2486
|
className: t
|
|
2481
|
-
}) : e.type === "trend" ? /* @__PURE__ */ s(
|
|
2487
|
+
}) : e.type === "trend" ? /* @__PURE__ */ s(It, {
|
|
2482
2488
|
points: e.points,
|
|
2483
2489
|
className: t
|
|
2484
|
-
}) : e.type === "mini-bars" ? /* @__PURE__ */ s(
|
|
2490
|
+
}) : e.type === "mini-bars" ? /* @__PURE__ */ s(He, {
|
|
2485
2491
|
rows: e.rows,
|
|
2486
2492
|
className: t
|
|
2487
|
-
}) : e.type === "stacked-horizontal-bar-chart" ? /* @__PURE__ */ s(Ae, { data: e.data }) : e.type === "multi-metric-constellation-chart" ? /* @__PURE__ */ s(Se, { items: e.items }) : e.type === "progress-race-chart" ? /* @__PURE__ */ s(de, { items: e.items }) : e.type === "hub-and-spoke-radial-chart" ? /* @__PURE__ */ s(
|
|
2493
|
+
}) : e.type === "stacked-horizontal-bar-chart" ? /* @__PURE__ */ s(Ae, { data: e.data }) : e.type === "multi-metric-constellation-chart" ? /* @__PURE__ */ s(Se, { items: e.items }) : e.type === "progress-race-chart" ? /* @__PURE__ */ s(de, { items: e.items }) : e.type === "hub-and-spoke-radial-chart" ? /* @__PURE__ */ s(Pt, {
|
|
2488
2494
|
segments: e.segments,
|
|
2489
2495
|
title: e.title,
|
|
2490
2496
|
unitLabel: e.unitLabel
|
|
2491
|
-
}) : e.type === "dot-matrix-chart" ? /* @__PURE__ */ s(
|
|
2497
|
+
}) : e.type === "dot-matrix-chart" ? /* @__PURE__ */ s(Re, { items: e.items }) : e.type === "ranked-card-leaderboard" ? /* @__PURE__ */ s(Le, { items: e.items }) : e.type === "proportional-band-chart" ? /* @__PURE__ */ s(jt, { severities: e.severities }) : e.type === "radial-fan-tree-chart" ? /* @__PURE__ */ s(qe, {
|
|
2492
2498
|
total: e.total,
|
|
2493
2499
|
totalLabel: e.totalLabel,
|
|
2494
2500
|
items: e.items
|
|
@@ -2496,47 +2502,47 @@ function Xt({ config: e, className: t }) {
|
|
|
2496
2502
|
confirmed: e.confirmed,
|
|
2497
2503
|
total: e.total,
|
|
2498
2504
|
label: e.label
|
|
2499
|
-
}) : e.type === "segmented-split-bar-chart" ? /* @__PURE__ */ s(
|
|
2505
|
+
}) : e.type === "segmented-split-bar-chart" ? /* @__PURE__ */ s(Wt, { items: e.items }) : e.type === "balance-scale-chart" ? /* @__PURE__ */ s(dt, {
|
|
2500
2506
|
left: e.left,
|
|
2501
2507
|
right: e.right
|
|
2502
|
-
}) : e.type === "area-line-chart" ? /* @__PURE__ */ s(
|
|
2508
|
+
}) : e.type === "area-line-chart" ? /* @__PURE__ */ s(pt, { points: e.points }) : e.type === "trend-view" ? /* @__PURE__ */ s(wt, { points: e.points }) : e.type === "weekly-flow" ? /* @__PURE__ */ s(qt, { items: e.items }) : /* @__PURE__ */ s("div", {
|
|
2503
2509
|
className: "viz-empty",
|
|
2504
2510
|
children: "Visualization unavailable"
|
|
2505
2511
|
});
|
|
2506
2512
|
}
|
|
2507
2513
|
//#endregion
|
|
2508
2514
|
//#region src/utils/mounts.tsx
|
|
2509
|
-
var
|
|
2510
|
-
function
|
|
2515
|
+
var Xt = [];
|
|
2516
|
+
function Zt(e) {
|
|
2511
2517
|
try {
|
|
2512
2518
|
return JSON.parse(decodeURIComponent(e));
|
|
2513
2519
|
} catch {
|
|
2514
2520
|
return null;
|
|
2515
2521
|
}
|
|
2516
2522
|
}
|
|
2517
|
-
function
|
|
2518
|
-
for (;
|
|
2519
|
-
let e =
|
|
2523
|
+
function Qt() {
|
|
2524
|
+
for (; Xt.length;) {
|
|
2525
|
+
let e = Xt.pop();
|
|
2520
2526
|
e && e.unmount();
|
|
2521
2527
|
}
|
|
2522
2528
|
}
|
|
2523
|
-
function
|
|
2524
|
-
|
|
2529
|
+
function $t() {
|
|
2530
|
+
Qt(), document.querySelectorAll("[data-d3-viz]").forEach((t) => {
|
|
2525
2531
|
let n = t.dataset.d3Viz;
|
|
2526
2532
|
if (!n) return;
|
|
2527
|
-
let r =
|
|
2533
|
+
let r = Zt(n);
|
|
2528
2534
|
if (!r) return;
|
|
2529
2535
|
let i = e(t);
|
|
2530
|
-
|
|
2536
|
+
Xt.push(i), i.render(/* @__PURE__ */ s(Yt, { config: r }));
|
|
2531
2537
|
});
|
|
2532
2538
|
}
|
|
2533
|
-
function
|
|
2539
|
+
function en(e) {
|
|
2534
2540
|
return encodeURIComponent(JSON.stringify(e));
|
|
2535
2541
|
}
|
|
2536
2542
|
//#endregion
|
|
2537
2543
|
//#region src/components/donutChart/DonutChart.tsx
|
|
2538
|
-
function
|
|
2539
|
-
return /* @__PURE__ */ s(
|
|
2544
|
+
function tn({ rows: e = [], className: t, colors: n }) {
|
|
2545
|
+
return /* @__PURE__ */ s(Ze, {
|
|
2540
2546
|
rows: e,
|
|
2541
2547
|
variant: "donut",
|
|
2542
2548
|
className: t,
|
|
@@ -2555,26 +2561,27 @@ var Q = {
|
|
|
2555
2561
|
red: u.red,
|
|
2556
2562
|
amber: u.amber,
|
|
2557
2563
|
green: u.green
|
|
2558
|
-
}, $ = "'Satoshi Variable', 'DM Sans', sans-serif",
|
|
2564
|
+
}, $ = "'Satoshi Variable', 'DM Sans', sans-serif", nn = {
|
|
2559
2565
|
color: "#F7F7F7",
|
|
2560
2566
|
fontFamily: $,
|
|
2561
2567
|
fontSize: 24,
|
|
2562
2568
|
fontWeight: 500,
|
|
2563
2569
|
lineHeight: "32px"
|
|
2564
|
-
},
|
|
2570
|
+
}, rn = {
|
|
2565
2571
|
color: "#C2C2C2",
|
|
2566
2572
|
fontFamily: $,
|
|
2567
2573
|
fontSize: 18,
|
|
2568
2574
|
fontWeight: 400,
|
|
2569
2575
|
lineHeight: "20px"
|
|
2570
2576
|
};
|
|
2571
|
-
function
|
|
2572
|
-
|
|
2577
|
+
function an({ items: e = [] }) {
|
|
2578
|
+
let t = e.filter((e) => e.value);
|
|
2579
|
+
return t.length === 0 ? null : /* @__PURE__ */ s("div", {
|
|
2573
2580
|
style: {
|
|
2574
2581
|
display: "flex",
|
|
2575
2582
|
gap: 8
|
|
2576
2583
|
},
|
|
2577
|
-
children:
|
|
2584
|
+
children: t.map((e, t) => /* @__PURE__ */ c("div", {
|
|
2578
2585
|
style: {
|
|
2579
2586
|
display: "flex",
|
|
2580
2587
|
flexDirection: "column",
|
|
@@ -2591,25 +2598,26 @@ function on({ items: e = [] }) {
|
|
|
2591
2598
|
},
|
|
2592
2599
|
children: [/* @__PURE__ */ s("div", {
|
|
2593
2600
|
style: {
|
|
2594
|
-
...
|
|
2601
|
+
...nn,
|
|
2595
2602
|
color: Q.t1
|
|
2596
2603
|
},
|
|
2597
2604
|
children: e.value
|
|
2598
2605
|
}), /* @__PURE__ */ s("div", {
|
|
2599
|
-
style: { ...
|
|
2606
|
+
style: { ...rn },
|
|
2600
2607
|
children: e.label
|
|
2601
2608
|
})]
|
|
2602
2609
|
}, t))
|
|
2603
2610
|
});
|
|
2604
2611
|
}
|
|
2605
|
-
function
|
|
2606
|
-
|
|
2612
|
+
function on({ items: e = [] }) {
|
|
2613
|
+
let t = e.filter((e) => e.name ?? e.value);
|
|
2614
|
+
return t.length === 0 ? null : /* @__PURE__ */ s("div", {
|
|
2607
2615
|
style: {
|
|
2608
2616
|
display: "flex",
|
|
2609
2617
|
flexDirection: "column",
|
|
2610
2618
|
gap: 5
|
|
2611
2619
|
},
|
|
2612
|
-
children:
|
|
2620
|
+
children: t.map((e, t) => /* @__PURE__ */ c("div", {
|
|
2613
2621
|
style: {
|
|
2614
2622
|
display: "flex",
|
|
2615
2623
|
alignItems: "center",
|
|
@@ -2634,7 +2642,7 @@ function sn({ items: e = [] }) {
|
|
|
2634
2642
|
}),
|
|
2635
2643
|
/* @__PURE__ */ s("span", {
|
|
2636
2644
|
style: {
|
|
2637
|
-
...
|
|
2645
|
+
...nn,
|
|
2638
2646
|
fontSize: 18,
|
|
2639
2647
|
color: Q.t1,
|
|
2640
2648
|
minWidth: 70,
|
|
@@ -2644,7 +2652,7 @@ function sn({ items: e = [] }) {
|
|
|
2644
2652
|
}),
|
|
2645
2653
|
/* @__PURE__ */ s("span", {
|
|
2646
2654
|
style: {
|
|
2647
|
-
...
|
|
2655
|
+
...rn,
|
|
2648
2656
|
flex: 1
|
|
2649
2657
|
},
|
|
2650
2658
|
children: e.kpiLabel
|
|
@@ -2653,13 +2661,14 @@ function sn({ items: e = [] }) {
|
|
|
2653
2661
|
}, t))
|
|
2654
2662
|
});
|
|
2655
2663
|
}
|
|
2656
|
-
function
|
|
2657
|
-
|
|
2664
|
+
function sn({ items: e = [] }) {
|
|
2665
|
+
let t = e.filter((e) => e.value);
|
|
2666
|
+
return t.length === 0 ? null : /* @__PURE__ */ s("div", {
|
|
2658
2667
|
style: {
|
|
2659
2668
|
display: "flex",
|
|
2660
2669
|
gap: 8
|
|
2661
2670
|
},
|
|
2662
|
-
children:
|
|
2671
|
+
children: t.map((e, t) => /* @__PURE__ */ c("div", {
|
|
2663
2672
|
style: {
|
|
2664
2673
|
display: "flex",
|
|
2665
2674
|
flexDirection: "column",
|
|
@@ -2675,30 +2684,31 @@ function cn({ items: e = [] }) {
|
|
|
2675
2684
|
},
|
|
2676
2685
|
children: [/* @__PURE__ */ s("div", {
|
|
2677
2686
|
style: {
|
|
2678
|
-
...
|
|
2687
|
+
...nn,
|
|
2679
2688
|
color: Q.t1
|
|
2680
2689
|
},
|
|
2681
2690
|
children: e.value
|
|
2682
2691
|
}), /* @__PURE__ */ s("div", {
|
|
2683
|
-
style: { ...
|
|
2692
|
+
style: { ...rn },
|
|
2684
2693
|
children: e.label
|
|
2685
2694
|
})]
|
|
2686
2695
|
}, t))
|
|
2687
2696
|
});
|
|
2688
2697
|
}
|
|
2689
|
-
var
|
|
2698
|
+
var cn = {
|
|
2690
2699
|
red: Q.red,
|
|
2691
2700
|
amber: Q.amber,
|
|
2692
2701
|
green: Q.green
|
|
2693
2702
|
};
|
|
2694
|
-
function
|
|
2695
|
-
|
|
2703
|
+
function ln({ items: e = [] }) {
|
|
2704
|
+
let t = e.filter((e) => e.text);
|
|
2705
|
+
return t.length === 0 ? null : /* @__PURE__ */ s("div", {
|
|
2696
2706
|
style: {
|
|
2697
2707
|
display: "flex",
|
|
2698
2708
|
flexDirection: "column",
|
|
2699
2709
|
gap: 5
|
|
2700
2710
|
},
|
|
2701
|
-
children:
|
|
2711
|
+
children: t.map((e, t) => (cn[e.severity], /* @__PURE__ */ c("div", {
|
|
2702
2712
|
style: {
|
|
2703
2713
|
display: "flex",
|
|
2704
2714
|
alignItems: "flex-start",
|
|
@@ -2715,14 +2725,16 @@ function un({ items: e = [] }) {
|
|
|
2715
2725
|
flexShrink: 0,
|
|
2716
2726
|
marginTop: 5
|
|
2717
2727
|
} }), /* @__PURE__ */ s("span", {
|
|
2718
|
-
style: { ...
|
|
2728
|
+
style: { ...rn },
|
|
2719
2729
|
children: e.text
|
|
2720
2730
|
})]
|
|
2721
2731
|
}, t)))
|
|
2722
2732
|
});
|
|
2723
2733
|
}
|
|
2724
|
-
function
|
|
2725
|
-
let a =
|
|
2734
|
+
function un({ min: e, max: t, unit: n, dots: r = [], chips: i = [] }) {
|
|
2735
|
+
let a = r.filter((e) => e.name);
|
|
2736
|
+
if (a.length === 0) return null;
|
|
2737
|
+
let o = t - e;
|
|
2726
2738
|
return /* @__PURE__ */ c("div", { children: [/* @__PURE__ */ c("div", {
|
|
2727
2739
|
style: {
|
|
2728
2740
|
position: "relative",
|
|
@@ -2761,8 +2773,8 @@ function dn({ min: e, max: t, unit: n, dots: r = [], chips: i = [] }) {
|
|
|
2761
2773
|
},
|
|
2762
2774
|
children: [t, n]
|
|
2763
2775
|
}),
|
|
2764
|
-
|
|
2765
|
-
let i = (t.val - e) /
|
|
2776
|
+
a.map((t, r) => {
|
|
2777
|
+
let i = (t.val - e) / o * 100, a = t.color ?? u.blue, l = r % 2 == 0;
|
|
2766
2778
|
return /* @__PURE__ */ c("div", {
|
|
2767
2779
|
style: {
|
|
2768
2780
|
position: "absolute",
|
|
@@ -2779,7 +2791,7 @@ function dn({ min: e, max: t, unit: n, dots: r = [], chips: i = [] }) {
|
|
|
2779
2791
|
children: [/* @__PURE__ */ s("div", {
|
|
2780
2792
|
style: {
|
|
2781
2793
|
fontSize: 18,
|
|
2782
|
-
color:
|
|
2794
|
+
color: a,
|
|
2783
2795
|
fontFamily: $,
|
|
2784
2796
|
whiteSpace: "nowrap"
|
|
2785
2797
|
},
|
|
@@ -2788,7 +2800,7 @@ function dn({ min: e, max: t, unit: n, dots: r = [], chips: i = [] }) {
|
|
|
2788
2800
|
style: {
|
|
2789
2801
|
fontSize: 18,
|
|
2790
2802
|
fontWeight: 500,
|
|
2791
|
-
color:
|
|
2803
|
+
color: a,
|
|
2792
2804
|
fontFamily: $,
|
|
2793
2805
|
whiteSpace: "nowrap"
|
|
2794
2806
|
},
|
|
@@ -2799,8 +2811,8 @@ function dn({ min: e, max: t, unit: n, dots: r = [], chips: i = [] }) {
|
|
|
2799
2811
|
width: 10,
|
|
2800
2812
|
height: 10,
|
|
2801
2813
|
borderRadius: "50%",
|
|
2802
|
-
background:
|
|
2803
|
-
boxShadow: `0 0 8px ${
|
|
2814
|
+
background: a,
|
|
2815
|
+
boxShadow: `0 0 8px ${a}70`,
|
|
2804
2816
|
margin: l ? "0 auto" : "26px auto 0"
|
|
2805
2817
|
} }),
|
|
2806
2818
|
!l && /* @__PURE__ */ c("div", {
|
|
@@ -2811,7 +2823,7 @@ function dn({ min: e, max: t, unit: n, dots: r = [], chips: i = [] }) {
|
|
|
2811
2823
|
children: [/* @__PURE__ */ s("div", {
|
|
2812
2824
|
style: {
|
|
2813
2825
|
fontSize: 18,
|
|
2814
|
-
color:
|
|
2826
|
+
color: a,
|
|
2815
2827
|
fontFamily: $,
|
|
2816
2828
|
whiteSpace: "nowrap"
|
|
2817
2829
|
},
|
|
@@ -2820,7 +2832,7 @@ function dn({ min: e, max: t, unit: n, dots: r = [], chips: i = [] }) {
|
|
|
2820
2832
|
style: {
|
|
2821
2833
|
fontSize: 18,
|
|
2822
2834
|
fontWeight: 500,
|
|
2823
|
-
color:
|
|
2835
|
+
color: a,
|
|
2824
2836
|
fontFamily: $,
|
|
2825
2837
|
whiteSpace: "nowrap"
|
|
2826
2838
|
},
|
|
@@ -2831,9 +2843,10 @@ function dn({ min: e, max: t, unit: n, dots: r = [], chips: i = [] }) {
|
|
|
2831
2843
|
}, r);
|
|
2832
2844
|
})
|
|
2833
2845
|
]
|
|
2834
|
-
}), i && i.length > 0 && /* @__PURE__ */ s(
|
|
2846
|
+
}), i && i.length > 0 && /* @__PURE__ */ s(sn, { items: i })] });
|
|
2835
2847
|
}
|
|
2836
|
-
function
|
|
2848
|
+
function dn({ leftPct: e, leftLabel: t, leftValue: n, leftColor: r, rightPct: i, rightLabel: a, rightValue: o, rightColor: l, chips: d }) {
|
|
2849
|
+
if (!t && !a) return null;
|
|
2837
2850
|
let f = r ?? u.blue, p = l ?? u.blue;
|
|
2838
2851
|
return /* @__PURE__ */ c("div", { children: [
|
|
2839
2852
|
/* @__PURE__ */ c("div", {
|
|
@@ -2927,10 +2940,11 @@ function fn({ leftPct: e, leftLabel: t, leftValue: n, leftColor: r, rightPct: i,
|
|
|
2927
2940
|
})
|
|
2928
2941
|
})]
|
|
2929
2942
|
}),
|
|
2930
|
-
d && d.length > 0 && /* @__PURE__ */ s(
|
|
2943
|
+
d && d.length > 0 && /* @__PURE__ */ s(sn, { items: d })
|
|
2931
2944
|
] });
|
|
2932
2945
|
}
|
|
2933
|
-
function
|
|
2946
|
+
function fn({ pct: e, label: t, color: n, chips: r }) {
|
|
2947
|
+
if (e == null && !t) return null;
|
|
2934
2948
|
let i = n ?? u.blue, a = 2 * Math.PI * 30, o = a * (1 - e / 100);
|
|
2935
2949
|
return /* @__PURE__ */ c("div", {
|
|
2936
2950
|
style: {
|
|
@@ -2989,7 +3003,7 @@ function pn({ pct: e, label: t, color: n, chips: r }) {
|
|
|
2989
3003
|
style: { flex: 1 },
|
|
2990
3004
|
children: [/* @__PURE__ */ s("div", {
|
|
2991
3005
|
style: {
|
|
2992
|
-
...
|
|
3006
|
+
...rn,
|
|
2993
3007
|
padding: "10px 0px"
|
|
2994
3008
|
},
|
|
2995
3009
|
children: t
|
|
@@ -3012,14 +3026,14 @@ function pn({ pct: e, label: t, color: n, chips: r }) {
|
|
|
3012
3026
|
children: [
|
|
3013
3027
|
/* @__PURE__ */ s("span", {
|
|
3014
3028
|
style: {
|
|
3015
|
-
...
|
|
3029
|
+
...nn,
|
|
3016
3030
|
color: Q.t2
|
|
3017
3031
|
},
|
|
3018
3032
|
children: e.value
|
|
3019
3033
|
}),
|
|
3020
3034
|
/* @__PURE__ */ s("span", {
|
|
3021
3035
|
style: {
|
|
3022
|
-
...
|
|
3036
|
+
...nn,
|
|
3023
3037
|
color: Q.t2,
|
|
3024
3038
|
fontWeight: 400,
|
|
3025
3039
|
userSelect: "none"
|
|
@@ -3027,7 +3041,7 @@ function pn({ pct: e, label: t, color: n, chips: r }) {
|
|
|
3027
3041
|
children: "|"
|
|
3028
3042
|
}),
|
|
3029
3043
|
/* @__PURE__ */ s("span", {
|
|
3030
|
-
style: { ...
|
|
3044
|
+
style: { ...rn },
|
|
3031
3045
|
children: e.label
|
|
3032
3046
|
})
|
|
3033
3047
|
]
|
|
@@ -3036,23 +3050,24 @@ function pn({ pct: e, label: t, color: n, chips: r }) {
|
|
|
3036
3050
|
})]
|
|
3037
3051
|
});
|
|
3038
3052
|
}
|
|
3039
|
-
var
|
|
3053
|
+
var pn = {
|
|
3040
3054
|
green: "#34D39918",
|
|
3041
3055
|
amber: "#FBBF2418",
|
|
3042
3056
|
red: "#F0606018"
|
|
3043
|
-
},
|
|
3057
|
+
}, mn = {
|
|
3044
3058
|
green: "#34D399",
|
|
3045
3059
|
amber: "#FBBF24",
|
|
3046
3060
|
red: "#F06060"
|
|
3047
3061
|
};
|
|
3048
|
-
function
|
|
3049
|
-
|
|
3062
|
+
function hn({ items: e = [] }) {
|
|
3063
|
+
let t = e.filter((e) => e.name ?? e.value);
|
|
3064
|
+
return t.length === 0 ? null : /* @__PURE__ */ s("div", {
|
|
3050
3065
|
style: {
|
|
3051
3066
|
display: "flex",
|
|
3052
3067
|
flexDirection: "column",
|
|
3053
3068
|
gap: 5
|
|
3054
3069
|
},
|
|
3055
|
-
children:
|
|
3070
|
+
children: t.map((e, t) => /* @__PURE__ */ c("div", {
|
|
3056
3071
|
style: {
|
|
3057
3072
|
display: "flex",
|
|
3058
3073
|
alignItems: "center",
|
|
@@ -3109,8 +3124,8 @@ function gn({ items: e = [] }) {
|
|
|
3109
3124
|
style: {
|
|
3110
3125
|
fontSize: 18,
|
|
3111
3126
|
fontWeight: 500,
|
|
3112
|
-
color:
|
|
3113
|
-
background:
|
|
3127
|
+
color: mn[e.badgeSeverity],
|
|
3128
|
+
background: pn[e.badgeSeverity],
|
|
3114
3129
|
padding: "2px 7px",
|
|
3115
3130
|
borderRadius: 4,
|
|
3116
3131
|
fontFamily: $,
|
|
@@ -3122,7 +3137,7 @@ function gn({ items: e = [] }) {
|
|
|
3122
3137
|
}),
|
|
3123
3138
|
e.sublabel && /* @__PURE__ */ s("span", {
|
|
3124
3139
|
style: {
|
|
3125
|
-
...
|
|
3140
|
+
...rn,
|
|
3126
3141
|
flexShrink: 0,
|
|
3127
3142
|
minWidth: 80,
|
|
3128
3143
|
textAlign: "right"
|
|
@@ -3133,20 +3148,21 @@ function gn({ items: e = [] }) {
|
|
|
3133
3148
|
}, t))
|
|
3134
3149
|
});
|
|
3135
3150
|
}
|
|
3136
|
-
var
|
|
3151
|
+
var gn = {
|
|
3137
3152
|
red: Q.red,
|
|
3138
3153
|
amber: Q.amber,
|
|
3139
3154
|
green: Q.green
|
|
3140
3155
|
};
|
|
3141
|
-
function
|
|
3142
|
-
|
|
3156
|
+
function _n({ items: e = [] }) {
|
|
3157
|
+
let t = e.filter((e) => e.text);
|
|
3158
|
+
return t.length === 0 ? null : /* @__PURE__ */ s("div", {
|
|
3143
3159
|
style: {
|
|
3144
3160
|
display: "flex",
|
|
3145
3161
|
flexDirection: "column",
|
|
3146
3162
|
gap: 5
|
|
3147
3163
|
},
|
|
3148
|
-
children:
|
|
3149
|
-
let n =
|
|
3164
|
+
children: t.map((e, t) => {
|
|
3165
|
+
let n = gn[e.severity];
|
|
3150
3166
|
return /* @__PURE__ */ c("div", {
|
|
3151
3167
|
style: {
|
|
3152
3168
|
display: "flex",
|
|
@@ -3172,13 +3188,13 @@ function vn({ items: e = [] }) {
|
|
|
3172
3188
|
/* @__PURE__ */ s("span", {
|
|
3173
3189
|
style: {
|
|
3174
3190
|
flex: 1,
|
|
3175
|
-
...
|
|
3191
|
+
...rn
|
|
3176
3192
|
},
|
|
3177
3193
|
children: e.text
|
|
3178
3194
|
}),
|
|
3179
3195
|
/* @__PURE__ */ s("span", {
|
|
3180
3196
|
style: {
|
|
3181
|
-
...
|
|
3197
|
+
...rn,
|
|
3182
3198
|
flexShrink: 0,
|
|
3183
3199
|
marginTop: 1
|
|
3184
3200
|
},
|
|
@@ -3189,8 +3205,8 @@ function vn({ items: e = [] }) {
|
|
|
3189
3205
|
})
|
|
3190
3206
|
});
|
|
3191
3207
|
}
|
|
3192
|
-
function
|
|
3193
|
-
return /* @__PURE__ */ c("div", {
|
|
3208
|
+
function vn({ columns: e = [], rows: t = [] }) {
|
|
3209
|
+
return t.length === 0 ? null : /* @__PURE__ */ c("div", {
|
|
3194
3210
|
style: {
|
|
3195
3211
|
display: "flex",
|
|
3196
3212
|
flexDirection: "column",
|
|
@@ -3252,21 +3268,21 @@ function yn({ columns: e = [], rows: t = [] }) {
|
|
|
3252
3268
|
}, t))]
|
|
3253
3269
|
});
|
|
3254
3270
|
}
|
|
3255
|
-
function
|
|
3271
|
+
function yn({ block: e }) {
|
|
3256
3272
|
if (!e) return null;
|
|
3257
3273
|
switch (e.type) {
|
|
3258
|
-
case "stats": return /* @__PURE__ */ s(
|
|
3259
|
-
case "ranked": return /* @__PURE__ */ s(
|
|
3260
|
-
case "chips": return /* @__PURE__ */ s(
|
|
3261
|
-
case "badges": return /* @__PURE__ */ s(
|
|
3262
|
-
case "dot-strip": return /* @__PURE__ */ s(
|
|
3274
|
+
case "stats": return /* @__PURE__ */ s(an, { items: e.items });
|
|
3275
|
+
case "ranked": return /* @__PURE__ */ s(on, { items: e.items });
|
|
3276
|
+
case "chips": return /* @__PURE__ */ s(sn, { items: e.items });
|
|
3277
|
+
case "badges": return /* @__PURE__ */ s(ln, { items: e.items });
|
|
3278
|
+
case "dot-strip": return /* @__PURE__ */ s(un, {
|
|
3263
3279
|
min: e.min,
|
|
3264
3280
|
max: e.max,
|
|
3265
3281
|
unit: e.unit,
|
|
3266
3282
|
dots: e.dots,
|
|
3267
3283
|
chips: e.chips
|
|
3268
3284
|
});
|
|
3269
|
-
case "proportion": return /* @__PURE__ */ s(
|
|
3285
|
+
case "proportion": return /* @__PURE__ */ s(dn, {
|
|
3270
3286
|
leftPct: e.leftPct,
|
|
3271
3287
|
leftLabel: e.leftLabel,
|
|
3272
3288
|
leftValue: e.leftValue,
|
|
@@ -3277,15 +3293,15 @@ function bn({ block: e }) {
|
|
|
3277
3293
|
rightColor: e.rightColor,
|
|
3278
3294
|
chips: e.chips
|
|
3279
3295
|
});
|
|
3280
|
-
case "ring": return /* @__PURE__ */ s(
|
|
3296
|
+
case "ring": return /* @__PURE__ */ s(fn, {
|
|
3281
3297
|
pct: e.pct,
|
|
3282
3298
|
label: e.label,
|
|
3283
3299
|
color: e.color,
|
|
3284
3300
|
chips: e.chips
|
|
3285
3301
|
});
|
|
3286
|
-
case "scorecard-rows": return /* @__PURE__ */ s(
|
|
3287
|
-
case "flags-list": return /* @__PURE__ */ s(
|
|
3288
|
-
case "comparison-rows": return /* @__PURE__ */ s(
|
|
3302
|
+
case "scorecard-rows": return /* @__PURE__ */ s(hn, { items: e.items });
|
|
3303
|
+
case "flags-list": return /* @__PURE__ */ s(_n, { items: e.items });
|
|
3304
|
+
case "comparison-rows": return /* @__PURE__ */ s(vn, {
|
|
3289
3305
|
columns: e.columns,
|
|
3290
3306
|
rows: e.rows
|
|
3291
3307
|
});
|
|
@@ -3294,14 +3310,14 @@ function bn({ block: e }) {
|
|
|
3294
3310
|
}
|
|
3295
3311
|
//#endregion
|
|
3296
3312
|
//#region src/components/keyHighlights/Takeaway.tsx
|
|
3297
|
-
var
|
|
3313
|
+
var bn = "'Satoshi Variable', 'DM Sans', sans-serif", xn = {
|
|
3298
3314
|
color: "#C2C2C2",
|
|
3299
|
-
fontFamily:
|
|
3315
|
+
fontFamily: bn,
|
|
3300
3316
|
fontSize: 18,
|
|
3301
3317
|
fontWeight: 400,
|
|
3302
3318
|
lineHeight: 1.65
|
|
3303
3319
|
};
|
|
3304
|
-
function
|
|
3320
|
+
function Sn({ text: e }) {
|
|
3305
3321
|
return /* @__PURE__ */ c("div", {
|
|
3306
3322
|
style: {
|
|
3307
3323
|
padding: "8px 0px",
|
|
@@ -3314,16 +3330,16 @@ function Cn({ text: e }) {
|
|
|
3314
3330
|
fontSize: 18,
|
|
3315
3331
|
fontWeight: 500,
|
|
3316
3332
|
color: u.t1,
|
|
3317
|
-
fontFamily:
|
|
3333
|
+
fontFamily: bn,
|
|
3318
3334
|
lineHeight: 1.65,
|
|
3319
3335
|
marginRight: 8
|
|
3320
3336
|
},
|
|
3321
3337
|
children: "Takeaway"
|
|
3322
3338
|
}), /* @__PURE__ */ s("span", {
|
|
3323
|
-
style: { ...
|
|
3339
|
+
style: { ...xn },
|
|
3324
3340
|
children: e
|
|
3325
3341
|
})]
|
|
3326
3342
|
});
|
|
3327
3343
|
}
|
|
3328
3344
|
//#endregion
|
|
3329
|
-
export { ee as AreaChart, re as BarChart, l as ChartFrame,
|
|
3345
|
+
export { ee as AreaChart, re as BarChart, l as ChartFrame, tn as DonutChart, yn as KeyHighlights, ze as LineChart, He as MiniBars, Ze as PieChart, st as ProcessSankey, ct as RankingSankey, $e as SankeySvg, I as SeriesChart, Sn as Takeaway, wt as Trend, It as TrendChart, Yt as VisualizationRenderer, Qt as cleanupVisualizationMounts, $t as hydrateVisualizationMounts, en as serializeVisualizationConfig };
|