@divami-artefacts/ai-design-system 1.0.37 → 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 +324 -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
|
|
@@ -2009,46 +2008,46 @@ function Tt({ points: e = [], "data-testid": t }) {
|
|
|
2009
2008
|
}
|
|
2010
2009
|
//#endregion
|
|
2011
2010
|
//#region src/components/proportionalBandChart/ProportionalBandChart.tsx
|
|
2012
|
-
var
|
|
2013
|
-
function
|
|
2011
|
+
var Tt = 680, Et = 240, Dt = 28, Ot = 156;
|
|
2012
|
+
function kt(e, t, n) {
|
|
2014
2013
|
if (e.measureText(t).width <= n) return t;
|
|
2015
2014
|
let r = t;
|
|
2016
2015
|
for (; r.length > 0 && e.measureText(`${r}…`).width > n;) r = r.slice(0, -1);
|
|
2017
2016
|
return `${r}…`;
|
|
2018
2017
|
}
|
|
2019
|
-
var
|
|
2018
|
+
var At = {
|
|
2020
2019
|
Critical: u.red,
|
|
2021
2020
|
High: u.orange,
|
|
2022
2021
|
Medium: u.amber,
|
|
2023
2022
|
Low: u.green
|
|
2024
2023
|
};
|
|
2025
|
-
function
|
|
2026
|
-
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, {
|
|
2027
2026
|
width: m,
|
|
2028
|
-
height:
|
|
2027
|
+
height: Et
|
|
2029
2028
|
});
|
|
2030
2029
|
return n(() => {
|
|
2031
2030
|
let e = r.current;
|
|
2032
2031
|
if (!e) return;
|
|
2033
|
-
let t = v(e, m,
|
|
2032
|
+
let t = v(e, m, Et);
|
|
2034
2033
|
l.current = 0;
|
|
2035
|
-
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 = () => {
|
|
2036
2035
|
l.current++;
|
|
2037
2036
|
let e = l.current;
|
|
2038
|
-
t.clearRect(0, 0, m,
|
|
2037
|
+
t.clearRect(0, 0, m, Et), t.letterSpacing = f.letterSpacing;
|
|
2039
2038
|
let r = O(Math.min(e / 60, 1));
|
|
2040
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([]);
|
|
2041
2040
|
let a = i;
|
|
2042
2041
|
d.forEach((e, i) => {
|
|
2043
|
-
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;
|
|
2044
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, {
|
|
2045
2044
|
label: e.severity,
|
|
2046
|
-
value:
|
|
2047
|
-
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)}%`,
|
|
2048
2047
|
color: s
|
|
2049
2048
|
}), r > .5) {
|
|
2050
2049
|
let i = Math.min(1, (r - .5) / .5), o = a + l / 2;
|
|
2051
|
-
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;
|
|
2052
2051
|
}
|
|
2053
2052
|
a += l;
|
|
2054
2053
|
});
|
|
@@ -2058,14 +2057,14 @@ function Mt({ severities: e = [], "data-testid": t }) {
|
|
|
2058
2057
|
return S(), () => cancelAnimationFrame(x);
|
|
2059
2058
|
}, [d, m]), d.length === 0 ? /* @__PURE__ */ s(L, {
|
|
2060
2059
|
width: m,
|
|
2061
|
-
height:
|
|
2060
|
+
height: Et,
|
|
2062
2061
|
"data-testid": t
|
|
2063
2062
|
}) : /* @__PURE__ */ c("div", {
|
|
2064
2063
|
"data-testid": t,
|
|
2065
2064
|
style: {
|
|
2066
2065
|
position: "relative",
|
|
2067
2066
|
width: m,
|
|
2068
|
-
height:
|
|
2067
|
+
height: Et
|
|
2069
2068
|
},
|
|
2070
2069
|
children: [/* @__PURE__ */ s("canvas", {
|
|
2071
2070
|
ref: r,
|
|
@@ -2073,24 +2072,25 @@ function Mt({ severities: e = [], "data-testid": t }) {
|
|
|
2073
2072
|
"aria-label": "Early Warning severity distribution — prism spectrum bands",
|
|
2074
2073
|
style: {
|
|
2075
2074
|
width: m,
|
|
2076
|
-
height:
|
|
2075
|
+
height: Et,
|
|
2077
2076
|
display: "block"
|
|
2078
2077
|
}
|
|
2079
2078
|
}), /* @__PURE__ */ s(C, {
|
|
2080
2079
|
..._,
|
|
2081
2080
|
parentW: m,
|
|
2082
|
-
parentH:
|
|
2081
|
+
parentH: Et,
|
|
2082
|
+
placement: "cursor-below"
|
|
2083
2083
|
})]
|
|
2084
2084
|
});
|
|
2085
2085
|
}
|
|
2086
2086
|
//#endregion
|
|
2087
2087
|
//#region src/components/hubAndSpokeRadialChart/HubAndSpokeRadialChart.tsx
|
|
2088
|
-
var Y = 300, X = 280,
|
|
2088
|
+
var Y = 300, X = 280, Mt = 100, Nt = {
|
|
2089
2089
|
Open: u.red,
|
|
2090
2090
|
Submitted: u.amber,
|
|
2091
2091
|
Closed: u.green
|
|
2092
2092
|
};
|
|
2093
|
-
function
|
|
2093
|
+
function Pt({ segments: e = [], title: t, unitLabel: r = "", "data-testid": o }) {
|
|
2094
2094
|
let l = a(null), d = a(0), m = a(/* @__PURE__ */ new Map()), { hoveredRef: g, tooltip: _, hitZonesRef: S } = w(l, {
|
|
2095
2095
|
width: Y,
|
|
2096
2096
|
height: X
|
|
@@ -2100,21 +2100,21 @@ function Ft({ segments: e = [], title: t, unitLabel: r = "", "data-testid": o })
|
|
|
2100
2100
|
if (!e) return;
|
|
2101
2101
|
let n = v(e, Y, X);
|
|
2102
2102
|
d.current = 0;
|
|
2103
|
-
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 = () => {
|
|
2104
2104
|
d.current++;
|
|
2105
2105
|
let e = d.current;
|
|
2106
2106
|
n.clearRect(0, 0, Y, X), n.letterSpacing = f.letterSpacing, S.current = [], m.current.forEach((e, t) => {
|
|
2107
2107
|
let n = t === g.current ? 1 : 0, r = e + (n - e) * .12;
|
|
2108
2108
|
Math.abs(r - n) < .005 ? n === 0 ? m.current.delete(t) : m.current.set(t, 1) : m.current.set(t, r);
|
|
2109
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) => {
|
|
2110
|
-
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;
|
|
2111
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();
|
|
2112
2112
|
let g = (e * .005 + r * .33) % 1, _ = i + (l - i) * g, v = a + (d - a) * g;
|
|
2113
2113
|
y(n, _, v, 6, f, .4), n.beginPath(), n.arc(_, v, 2, 0, Math.PI * 2), n.fillStyle = h(f, .8), n.fill();
|
|
2114
2114
|
let b = (i + l) / 2, x = (a + d) / 2;
|
|
2115
2115
|
n.font = p.font, n.textAlign = "center", n.textBaseline = "middle", n.fillStyle = h(f, .85), n.fillText(String(t.count), b, x);
|
|
2116
2116
|
}), E.forEach((e, t) => {
|
|
2117
|
-
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;
|
|
2118
2118
|
y(n, d, p, _ * 2.5, g, .2 + v * .15);
|
|
2119
2119
|
let b = n.createRadialGradient(d, p - _ * .2, 0, d, p, _);
|
|
2120
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, {
|
|
@@ -2168,8 +2168,8 @@ function Ft({ segments: e = [], title: t, unitLabel: r = "", "data-testid": o })
|
|
|
2168
2168
|
}
|
|
2169
2169
|
//#endregion
|
|
2170
2170
|
//#region src/components/trendChart/TrendChart.tsx
|
|
2171
|
-
var
|
|
2172
|
-
function
|
|
2171
|
+
var Ft = 280, Z = 96;
|
|
2172
|
+
function It({ points: e = [], className: t, colors: r }) {
|
|
2173
2173
|
let o = a(null), d = a(/* @__PURE__ */ new Map()), f = a(0), p = i(() => e.filter(Array.isArray).map(([e, t]) => {
|
|
2174
2174
|
let n = String(t).match(/-?\d+(\.\d+)?/);
|
|
2175
2175
|
return {
|
|
@@ -2177,18 +2177,18 @@ function Lt({ points: e = [], className: t, colors: r }) {
|
|
|
2177
2177
|
value: n ? Number(n[0]) : 0
|
|
2178
2178
|
};
|
|
2179
2179
|
}), [e]), { mouseRef: m, hoveredRef: g, tooltip: _, hitZonesRef: b } = w(o, {
|
|
2180
|
-
width:
|
|
2180
|
+
width: Ft,
|
|
2181
2181
|
height: Z
|
|
2182
2182
|
});
|
|
2183
2183
|
return n(() => {
|
|
2184
2184
|
let e = o.current;
|
|
2185
2185
|
if (!e) return;
|
|
2186
|
-
let t = v(e,
|
|
2186
|
+
let t = v(e, Ft, Z);
|
|
2187
2187
|
f.current = 0;
|
|
2188
2188
|
let n = r?.line ?? u.blue, i = r?.point ?? u.blue, a = r?.axisLine ?? u.bd, s, c = () => {
|
|
2189
2189
|
f.current++;
|
|
2190
2190
|
let e = f.current;
|
|
2191
|
-
if (t.clearRect(0, 0,
|
|
2191
|
+
if (t.clearRect(0, 0, Ft, Z), p.length < 2) {
|
|
2192
2192
|
s = requestAnimationFrame(c);
|
|
2193
2193
|
return;
|
|
2194
2194
|
}
|
|
@@ -2197,8 +2197,8 @@ function Lt({ points: e = [], className: t, colors: r }) {
|
|
|
2197
2197
|
right: 12,
|
|
2198
2198
|
top: 16,
|
|
2199
2199
|
bottom: 20
|
|
2200
|
-
}, o =
|
|
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(
|
|
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) => {
|
|
2202
2202
|
t.fillText(e.label.replace("Day ", "D"), C(n), Z - 4);
|
|
2203
2203
|
}), m.current.over && g.current) {
|
|
2204
2204
|
let e = parseInt(g.current.split("-")[1]);
|
|
@@ -2235,7 +2235,7 @@ function Lt({ points: e = [], className: t, colors: r }) {
|
|
|
2235
2235
|
children: /* @__PURE__ */ c("div", {
|
|
2236
2236
|
style: {
|
|
2237
2237
|
position: "relative",
|
|
2238
|
-
width:
|
|
2238
|
+
width: Ft,
|
|
2239
2239
|
height: Z
|
|
2240
2240
|
},
|
|
2241
2241
|
children: [/* @__PURE__ */ s("canvas", {
|
|
@@ -2243,14 +2243,14 @@ function Lt({ points: e = [], className: t, colors: r }) {
|
|
|
2243
2243
|
role: "img",
|
|
2244
2244
|
"aria-label": "trend chart",
|
|
2245
2245
|
style: {
|
|
2246
|
-
width:
|
|
2246
|
+
width: Ft,
|
|
2247
2247
|
height: Z,
|
|
2248
2248
|
display: "block",
|
|
2249
2249
|
borderRadius: 8
|
|
2250
2250
|
}
|
|
2251
2251
|
}), /* @__PURE__ */ s(C, {
|
|
2252
2252
|
..._,
|
|
2253
|
-
parentW:
|
|
2253
|
+
parentW: Ft,
|
|
2254
2254
|
parentH: Z
|
|
2255
2255
|
})]
|
|
2256
2256
|
})
|
|
@@ -2258,67 +2258,72 @@ function Lt({ points: e = [], className: t, colors: r }) {
|
|
|
2258
2258
|
}
|
|
2259
2259
|
//#endregion
|
|
2260
2260
|
//#region src/components/segmentedSplitBarChart/SegmentedSplitBarChart.tsx
|
|
2261
|
-
function
|
|
2261
|
+
function Lt(e, t, n) {
|
|
2262
2262
|
if (e.measureText(t).width <= n) return t;
|
|
2263
2263
|
let r = t;
|
|
2264
2264
|
for (; r.length > 0 && e.measureText(r + "…").width > n;) r = r.slice(0, -1);
|
|
2265
2265
|
return r + "…";
|
|
2266
2266
|
}
|
|
2267
|
-
var
|
|
2268
|
-
function
|
|
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,
|
|
2270
|
-
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,
|
|
2271
2271
|
height: S
|
|
2272
2272
|
});
|
|
2273
2273
|
return n(() => {
|
|
2274
2274
|
let e = r.current;
|
|
2275
2275
|
if (!e) return;
|
|
2276
|
-
let t = v(e,
|
|
2276
|
+
let t = v(e, Rt, S);
|
|
2277
2277
|
d.current = 0;
|
|
2278
|
-
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 = () => {
|
|
2279
2279
|
d.current++;
|
|
2280
2280
|
let e = d.current;
|
|
2281
|
-
t.clearRect(0, 0,
|
|
2281
|
+
t.clearRect(0, 0, Rt, S);
|
|
2282
2282
|
let n = O(Math.min(e / 60, 1));
|
|
2283
2283
|
N(l.current, T.current), k.current = [], x.forEach((e, r) => {
|
|
2284
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;
|
|
2285
|
-
E(k.current, b,
|
|
2286
|
-
label:
|
|
2287
|
-
value:
|
|
2288
|
-
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)}%`,
|
|
2289
2289
|
color: u.green
|
|
2290
|
-
}), E(k.current, S,
|
|
2291
|
-
label:
|
|
2292
|
-
value:
|
|
2293
|
-
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)}%`,
|
|
2294
2294
|
color: u.amber
|
|
2295
|
-
}), 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, [
|
|
2296
2301
|
4,
|
|
2297
2302
|
0,
|
|
2298
2303
|
0,
|
|
2299
2304
|
4
|
|
2300
|
-
]), 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, [
|
|
2301
2306
|
0,
|
|
2302
2307
|
4,
|
|
2303
2308
|
4,
|
|
2304
2309
|
0
|
|
2305
|
-
]), 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());
|
|
2306
2311
|
});
|
|
2307
|
-
let r = _ + g + 24, i =
|
|
2312
|
+
let r = _ + g + 24, i = 150 + s / 2;
|
|
2308
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);
|
|
2309
2314
|
};
|
|
2310
2315
|
return C(), () => cancelAnimationFrame(b);
|
|
2311
2316
|
}, [x, S]), b.length === 0 ? /* @__PURE__ */ s(L, {
|
|
2312
|
-
width:
|
|
2317
|
+
width: Rt,
|
|
2313
2318
|
height: 160,
|
|
2314
2319
|
"data-testid": t
|
|
2315
2320
|
}) : /* @__PURE__ */ c("div", {
|
|
2316
2321
|
"data-testid": t,
|
|
2317
|
-
style: { width:
|
|
2322
|
+
style: { width: Rt },
|
|
2318
2323
|
children: [/* @__PURE__ */ c("div", {
|
|
2319
2324
|
style: {
|
|
2320
2325
|
position: "relative",
|
|
2321
|
-
width:
|
|
2326
|
+
width: Rt,
|
|
2322
2327
|
height: S
|
|
2323
2328
|
},
|
|
2324
2329
|
children: [/* @__PURE__ */ s("canvas", {
|
|
@@ -2326,16 +2331,16 @@ function Gt({ items: e = [], "data-testid": t }) {
|
|
|
2326
2331
|
role: "img",
|
|
2327
2332
|
"aria-label": "Implemented vs unimplemented variations per contractor — split bar",
|
|
2328
2333
|
style: {
|
|
2329
|
-
width:
|
|
2334
|
+
width: Rt,
|
|
2330
2335
|
height: S,
|
|
2331
2336
|
display: "block"
|
|
2332
2337
|
}
|
|
2333
2338
|
}), /* @__PURE__ */ s(C, {
|
|
2334
2339
|
...D,
|
|
2335
|
-
parentW:
|
|
2340
|
+
parentW: Rt,
|
|
2336
2341
|
parentH: S
|
|
2337
2342
|
})]
|
|
2338
|
-
}), b.length >
|
|
2343
|
+
}), b.length > zt && /* @__PURE__ */ s("div", {
|
|
2339
2344
|
style: { marginTop: 8 },
|
|
2340
2345
|
children: /* @__PURE__ */ s(ie, {
|
|
2341
2346
|
expanded: g,
|
|
@@ -2346,18 +2351,18 @@ function Gt({ items: e = [], "data-testid": t }) {
|
|
|
2346
2351
|
}
|
|
2347
2352
|
//#endregion
|
|
2348
2353
|
//#region src/components/weeklyFlow/WeeklyFlow.tsx
|
|
2349
|
-
var
|
|
2350
|
-
function
|
|
2354
|
+
var Gt = 800, Kt = 360;
|
|
2355
|
+
function qt({ items: e = [], "data-testid": t }) {
|
|
2351
2356
|
let r = a(null), i = a(/* @__PURE__ */ new Map()), o = a(0), { hoveredRef: l, tooltip: m, hitZonesRef: g } = w(r, {
|
|
2352
|
-
width:
|
|
2353
|
-
height:
|
|
2357
|
+
width: Gt,
|
|
2358
|
+
height: Kt
|
|
2354
2359
|
});
|
|
2355
2360
|
return n(() => {
|
|
2356
2361
|
let t = r.current;
|
|
2357
2362
|
if (!t) return;
|
|
2358
|
-
let n = v(t,
|
|
2363
|
+
let n = v(t, Gt, Kt);
|
|
2359
2364
|
o.current = 0;
|
|
2360
|
-
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) => {
|
|
2361
2366
|
let n = Math.max(24, (e.total ?? 0) / (c || 1) * _), r = {
|
|
2362
2367
|
x: 100 - 110 / 2,
|
|
2363
2368
|
y: b,
|
|
@@ -2385,16 +2390,16 @@ function Jt({ items: e = [], "data-testid": t }) {
|
|
|
2385
2390
|
}, j, P = () => {
|
|
2386
2391
|
o.current++;
|
|
2387
2392
|
let t = o.current;
|
|
2388
|
-
n.clearRect(0, 0,
|
|
2393
|
+
n.clearRect(0, 0, Gt, Kt), n.letterSpacing = f.letterSpacing;
|
|
2389
2394
|
let r = D(Math.min(t / 80, 1));
|
|
2390
2395
|
if (N(i.current, l.current), g.current = [], e.forEach((t, o) => {
|
|
2391
2396
|
let c = x[o], l = M(r, o, e.length, D), u = i.current.get(t.id) ?? 0;
|
|
2392
2397
|
if (l < .01) return;
|
|
2393
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;
|
|
2394
|
-
|
|
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);
|
|
2395
2400
|
}), r > .3) {
|
|
2396
2401
|
let e = Math.min(1, (r - .3) / .7), t = A.y + a / c * m / 2, i = A.y + m - s / c * m / 2;
|
|
2397
|
-
|
|
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);
|
|
2398
2403
|
}
|
|
2399
2404
|
if ([
|
|
2400
2405
|
"Contractors",
|
|
@@ -2406,22 +2411,22 @@ function Jt({ items: e = [], "data-testid": t }) {
|
|
|
2406
2411
|
420,
|
|
2407
2412
|
720
|
|
2408
2413
|
][t];
|
|
2409
|
-
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);
|
|
2410
2415
|
}), e.forEach((t, a) => {
|
|
2411
2416
|
let o = x[a], s = M(r, a, e.length, D), c = i.current.get(t.id) ?? 0;
|
|
2412
2417
|
E(g.current, t.id, o.x, o.y, 110, o.h, {
|
|
2413
2418
|
label: t.name,
|
|
2414
|
-
value:
|
|
2415
|
-
sublabel:
|
|
2419
|
+
value: t.totalLabel ?? String(t.total ?? 0),
|
|
2420
|
+
sublabel: `${t.baseLabel ?? String(t.base ?? 0)} + ${t.variationLabel ?? String(t.variation ?? 0)}`,
|
|
2416
2421
|
color: o.color
|
|
2417
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");
|
|
2418
2423
|
}), r > .2) {
|
|
2419
2424
|
let e = Math.min(1, (r - .2) / .4);
|
|
2420
|
-
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";
|
|
2421
2426
|
}
|
|
2422
2427
|
if (r > .5) {
|
|
2423
2428
|
let e = Math.min(1, (r - .5) / .5);
|
|
2424
|
-
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";
|
|
2425
2430
|
}
|
|
2426
2431
|
j = requestAnimationFrame(P);
|
|
2427
2432
|
};
|
|
@@ -2430,33 +2435,33 @@ function Jt({ items: e = [], "data-testid": t }) {
|
|
|
2430
2435
|
"data-testid": t,
|
|
2431
2436
|
style: {
|
|
2432
2437
|
position: "relative",
|
|
2433
|
-
width:
|
|
2434
|
-
height:
|
|
2438
|
+
width: Gt,
|
|
2439
|
+
height: Kt
|
|
2435
2440
|
},
|
|
2436
2441
|
children: [/* @__PURE__ */ s("canvas", {
|
|
2437
2442
|
ref: r,
|
|
2438
2443
|
role: "img",
|
|
2439
2444
|
"aria-label": "Weekly report flow — base value and variations per contractor flowing to total commitment",
|
|
2440
2445
|
style: {
|
|
2441
|
-
width:
|
|
2442
|
-
height:
|
|
2446
|
+
width: Gt,
|
|
2447
|
+
height: Kt,
|
|
2443
2448
|
display: "block"
|
|
2444
2449
|
}
|
|
2445
2450
|
}), /* @__PURE__ */ s(C, {
|
|
2446
2451
|
...m,
|
|
2447
|
-
parentW:
|
|
2448
|
-
parentH:
|
|
2452
|
+
parentW: Gt,
|
|
2453
|
+
parentH: Kt
|
|
2449
2454
|
})]
|
|
2450
2455
|
});
|
|
2451
2456
|
}
|
|
2452
|
-
function
|
|
2457
|
+
function Jt(e, t, n, r, i, a, o, s) {
|
|
2453
2458
|
let c = (t + r) / 2;
|
|
2454
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();
|
|
2455
2460
|
}
|
|
2456
2461
|
//#endregion
|
|
2457
2462
|
//#region src/components/visualizationRenderer/VisualizationRenderer.tsx
|
|
2458
|
-
function
|
|
2459
|
-
return e.type === "line" ? /* @__PURE__ */ s(
|
|
2463
|
+
function Yt({ config: e, className: t }) {
|
|
2464
|
+
return e.type === "line" ? /* @__PURE__ */ s(ze, {
|
|
2460
2465
|
rows: e.rows,
|
|
2461
2466
|
className: t
|
|
2462
2467
|
}) : e.type === "area" ? /* @__PURE__ */ s(ee, {
|
|
@@ -2465,31 +2470,31 @@ function Xt({ config: e, className: t }) {
|
|
|
2465
2470
|
}) : e.type === "bar" ? /* @__PURE__ */ s(re, {
|
|
2466
2471
|
rows: e.rows,
|
|
2467
2472
|
className: t
|
|
2468
|
-
}) : e.type === "pie" ? /* @__PURE__ */ s(
|
|
2473
|
+
}) : e.type === "pie" ? /* @__PURE__ */ s(Ze, {
|
|
2469
2474
|
rows: e.rows,
|
|
2470
2475
|
variant: "pie",
|
|
2471
2476
|
className: t
|
|
2472
|
-
}) : e.type === "donut" ? /* @__PURE__ */ s(
|
|
2477
|
+
}) : e.type === "donut" ? /* @__PURE__ */ s(Ze, {
|
|
2473
2478
|
rows: e.rows,
|
|
2474
2479
|
variant: "donut",
|
|
2475
2480
|
className: t
|
|
2476
|
-
}) : e.type === "sankey" ? /* @__PURE__ */ s(
|
|
2481
|
+
}) : e.type === "sankey" ? /* @__PURE__ */ s(ct, {
|
|
2477
2482
|
rows: e.rows,
|
|
2478
2483
|
className: t
|
|
2479
|
-
}) : e.type === "flow" ? /* @__PURE__ */ s(
|
|
2484
|
+
}) : e.type === "flow" ? /* @__PURE__ */ s(st, {
|
|
2480
2485
|
selectedEntity: e.selectedEntity,
|
|
2481
2486
|
className: t
|
|
2482
|
-
}) : e.type === "trend" ? /* @__PURE__ */ s(
|
|
2487
|
+
}) : e.type === "trend" ? /* @__PURE__ */ s(It, {
|
|
2483
2488
|
points: e.points,
|
|
2484
2489
|
className: t
|
|
2485
|
-
}) : e.type === "mini-bars" ? /* @__PURE__ */ s(
|
|
2490
|
+
}) : e.type === "mini-bars" ? /* @__PURE__ */ s(He, {
|
|
2486
2491
|
rows: e.rows,
|
|
2487
2492
|
className: t
|
|
2488
|
-
}) : 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, {
|
|
2489
2494
|
segments: e.segments,
|
|
2490
2495
|
title: e.title,
|
|
2491
2496
|
unitLabel: e.unitLabel
|
|
2492
|
-
}) : 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, {
|
|
2493
2498
|
total: e.total,
|
|
2494
2499
|
totalLabel: e.totalLabel,
|
|
2495
2500
|
items: e.items
|
|
@@ -2497,47 +2502,47 @@ function Xt({ config: e, className: t }) {
|
|
|
2497
2502
|
confirmed: e.confirmed,
|
|
2498
2503
|
total: e.total,
|
|
2499
2504
|
label: e.label
|
|
2500
|
-
}) : 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, {
|
|
2501
2506
|
left: e.left,
|
|
2502
2507
|
right: e.right
|
|
2503
|
-
}) : 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", {
|
|
2504
2509
|
className: "viz-empty",
|
|
2505
2510
|
children: "Visualization unavailable"
|
|
2506
2511
|
});
|
|
2507
2512
|
}
|
|
2508
2513
|
//#endregion
|
|
2509
2514
|
//#region src/utils/mounts.tsx
|
|
2510
|
-
var
|
|
2511
|
-
function
|
|
2515
|
+
var Xt = [];
|
|
2516
|
+
function Zt(e) {
|
|
2512
2517
|
try {
|
|
2513
2518
|
return JSON.parse(decodeURIComponent(e));
|
|
2514
2519
|
} catch {
|
|
2515
2520
|
return null;
|
|
2516
2521
|
}
|
|
2517
2522
|
}
|
|
2518
|
-
function
|
|
2519
|
-
for (;
|
|
2520
|
-
let e =
|
|
2523
|
+
function Qt() {
|
|
2524
|
+
for (; Xt.length;) {
|
|
2525
|
+
let e = Xt.pop();
|
|
2521
2526
|
e && e.unmount();
|
|
2522
2527
|
}
|
|
2523
2528
|
}
|
|
2524
|
-
function
|
|
2525
|
-
|
|
2529
|
+
function $t() {
|
|
2530
|
+
Qt(), document.querySelectorAll("[data-d3-viz]").forEach((t) => {
|
|
2526
2531
|
let n = t.dataset.d3Viz;
|
|
2527
2532
|
if (!n) return;
|
|
2528
|
-
let r =
|
|
2533
|
+
let r = Zt(n);
|
|
2529
2534
|
if (!r) return;
|
|
2530
2535
|
let i = e(t);
|
|
2531
|
-
|
|
2536
|
+
Xt.push(i), i.render(/* @__PURE__ */ s(Yt, { config: r }));
|
|
2532
2537
|
});
|
|
2533
2538
|
}
|
|
2534
|
-
function
|
|
2539
|
+
function en(e) {
|
|
2535
2540
|
return encodeURIComponent(JSON.stringify(e));
|
|
2536
2541
|
}
|
|
2537
2542
|
//#endregion
|
|
2538
2543
|
//#region src/components/donutChart/DonutChart.tsx
|
|
2539
|
-
function
|
|
2540
|
-
return /* @__PURE__ */ s(
|
|
2544
|
+
function tn({ rows: e = [], className: t, colors: n }) {
|
|
2545
|
+
return /* @__PURE__ */ s(Ze, {
|
|
2541
2546
|
rows: e,
|
|
2542
2547
|
variant: "donut",
|
|
2543
2548
|
className: t,
|
|
@@ -2556,26 +2561,27 @@ var Q = {
|
|
|
2556
2561
|
red: u.red,
|
|
2557
2562
|
amber: u.amber,
|
|
2558
2563
|
green: u.green
|
|
2559
|
-
}, $ = "'Satoshi Variable', 'DM Sans', sans-serif",
|
|
2564
|
+
}, $ = "'Satoshi Variable', 'DM Sans', sans-serif", nn = {
|
|
2560
2565
|
color: "#F7F7F7",
|
|
2561
2566
|
fontFamily: $,
|
|
2562
2567
|
fontSize: 24,
|
|
2563
2568
|
fontWeight: 500,
|
|
2564
2569
|
lineHeight: "32px"
|
|
2565
|
-
},
|
|
2570
|
+
}, rn = {
|
|
2566
2571
|
color: "#C2C2C2",
|
|
2567
2572
|
fontFamily: $,
|
|
2568
2573
|
fontSize: 18,
|
|
2569
2574
|
fontWeight: 400,
|
|
2570
2575
|
lineHeight: "20px"
|
|
2571
2576
|
};
|
|
2572
|
-
function
|
|
2573
|
-
|
|
2577
|
+
function an({ items: e = [] }) {
|
|
2578
|
+
let t = e.filter((e) => e.value);
|
|
2579
|
+
return t.length === 0 ? null : /* @__PURE__ */ s("div", {
|
|
2574
2580
|
style: {
|
|
2575
2581
|
display: "flex",
|
|
2576
2582
|
gap: 8
|
|
2577
2583
|
},
|
|
2578
|
-
children:
|
|
2584
|
+
children: t.map((e, t) => /* @__PURE__ */ c("div", {
|
|
2579
2585
|
style: {
|
|
2580
2586
|
display: "flex",
|
|
2581
2587
|
flexDirection: "column",
|
|
@@ -2592,25 +2598,26 @@ function on({ items: e = [] }) {
|
|
|
2592
2598
|
},
|
|
2593
2599
|
children: [/* @__PURE__ */ s("div", {
|
|
2594
2600
|
style: {
|
|
2595
|
-
...
|
|
2601
|
+
...nn,
|
|
2596
2602
|
color: Q.t1
|
|
2597
2603
|
},
|
|
2598
2604
|
children: e.value
|
|
2599
2605
|
}), /* @__PURE__ */ s("div", {
|
|
2600
|
-
style: { ...
|
|
2606
|
+
style: { ...rn },
|
|
2601
2607
|
children: e.label
|
|
2602
2608
|
})]
|
|
2603
2609
|
}, t))
|
|
2604
2610
|
});
|
|
2605
2611
|
}
|
|
2606
|
-
function
|
|
2607
|
-
|
|
2612
|
+
function on({ items: e = [] }) {
|
|
2613
|
+
let t = e.filter((e) => e.name ?? e.value);
|
|
2614
|
+
return t.length === 0 ? null : /* @__PURE__ */ s("div", {
|
|
2608
2615
|
style: {
|
|
2609
2616
|
display: "flex",
|
|
2610
2617
|
flexDirection: "column",
|
|
2611
2618
|
gap: 5
|
|
2612
2619
|
},
|
|
2613
|
-
children:
|
|
2620
|
+
children: t.map((e, t) => /* @__PURE__ */ c("div", {
|
|
2614
2621
|
style: {
|
|
2615
2622
|
display: "flex",
|
|
2616
2623
|
alignItems: "center",
|
|
@@ -2635,7 +2642,7 @@ function sn({ items: e = [] }) {
|
|
|
2635
2642
|
}),
|
|
2636
2643
|
/* @__PURE__ */ s("span", {
|
|
2637
2644
|
style: {
|
|
2638
|
-
...
|
|
2645
|
+
...nn,
|
|
2639
2646
|
fontSize: 18,
|
|
2640
2647
|
color: Q.t1,
|
|
2641
2648
|
minWidth: 70,
|
|
@@ -2645,7 +2652,7 @@ function sn({ items: e = [] }) {
|
|
|
2645
2652
|
}),
|
|
2646
2653
|
/* @__PURE__ */ s("span", {
|
|
2647
2654
|
style: {
|
|
2648
|
-
...
|
|
2655
|
+
...rn,
|
|
2649
2656
|
flex: 1
|
|
2650
2657
|
},
|
|
2651
2658
|
children: e.kpiLabel
|
|
@@ -2654,13 +2661,14 @@ function sn({ items: e = [] }) {
|
|
|
2654
2661
|
}, t))
|
|
2655
2662
|
});
|
|
2656
2663
|
}
|
|
2657
|
-
function
|
|
2658
|
-
|
|
2664
|
+
function sn({ items: e = [] }) {
|
|
2665
|
+
let t = e.filter((e) => e.value);
|
|
2666
|
+
return t.length === 0 ? null : /* @__PURE__ */ s("div", {
|
|
2659
2667
|
style: {
|
|
2660
2668
|
display: "flex",
|
|
2661
2669
|
gap: 8
|
|
2662
2670
|
},
|
|
2663
|
-
children:
|
|
2671
|
+
children: t.map((e, t) => /* @__PURE__ */ c("div", {
|
|
2664
2672
|
style: {
|
|
2665
2673
|
display: "flex",
|
|
2666
2674
|
flexDirection: "column",
|
|
@@ -2676,30 +2684,31 @@ function cn({ items: e = [] }) {
|
|
|
2676
2684
|
},
|
|
2677
2685
|
children: [/* @__PURE__ */ s("div", {
|
|
2678
2686
|
style: {
|
|
2679
|
-
...
|
|
2687
|
+
...nn,
|
|
2680
2688
|
color: Q.t1
|
|
2681
2689
|
},
|
|
2682
2690
|
children: e.value
|
|
2683
2691
|
}), /* @__PURE__ */ s("div", {
|
|
2684
|
-
style: { ...
|
|
2692
|
+
style: { ...rn },
|
|
2685
2693
|
children: e.label
|
|
2686
2694
|
})]
|
|
2687
2695
|
}, t))
|
|
2688
2696
|
});
|
|
2689
2697
|
}
|
|
2690
|
-
var
|
|
2698
|
+
var cn = {
|
|
2691
2699
|
red: Q.red,
|
|
2692
2700
|
amber: Q.amber,
|
|
2693
2701
|
green: Q.green
|
|
2694
2702
|
};
|
|
2695
|
-
function
|
|
2696
|
-
|
|
2703
|
+
function ln({ items: e = [] }) {
|
|
2704
|
+
let t = e.filter((e) => e.text);
|
|
2705
|
+
return t.length === 0 ? null : /* @__PURE__ */ s("div", {
|
|
2697
2706
|
style: {
|
|
2698
2707
|
display: "flex",
|
|
2699
2708
|
flexDirection: "column",
|
|
2700
2709
|
gap: 5
|
|
2701
2710
|
},
|
|
2702
|
-
children:
|
|
2711
|
+
children: t.map((e, t) => (cn[e.severity], /* @__PURE__ */ c("div", {
|
|
2703
2712
|
style: {
|
|
2704
2713
|
display: "flex",
|
|
2705
2714
|
alignItems: "flex-start",
|
|
@@ -2716,14 +2725,16 @@ function un({ items: e = [] }) {
|
|
|
2716
2725
|
flexShrink: 0,
|
|
2717
2726
|
marginTop: 5
|
|
2718
2727
|
} }), /* @__PURE__ */ s("span", {
|
|
2719
|
-
style: { ...
|
|
2728
|
+
style: { ...rn },
|
|
2720
2729
|
children: e.text
|
|
2721
2730
|
})]
|
|
2722
2731
|
}, t)))
|
|
2723
2732
|
});
|
|
2724
2733
|
}
|
|
2725
|
-
function
|
|
2726
|
-
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;
|
|
2727
2738
|
return /* @__PURE__ */ c("div", { children: [/* @__PURE__ */ c("div", {
|
|
2728
2739
|
style: {
|
|
2729
2740
|
position: "relative",
|
|
@@ -2762,8 +2773,8 @@ function dn({ min: e, max: t, unit: n, dots: r = [], chips: i = [] }) {
|
|
|
2762
2773
|
},
|
|
2763
2774
|
children: [t, n]
|
|
2764
2775
|
}),
|
|
2765
|
-
|
|
2766
|
-
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;
|
|
2767
2778
|
return /* @__PURE__ */ c("div", {
|
|
2768
2779
|
style: {
|
|
2769
2780
|
position: "absolute",
|
|
@@ -2780,7 +2791,7 @@ function dn({ min: e, max: t, unit: n, dots: r = [], chips: i = [] }) {
|
|
|
2780
2791
|
children: [/* @__PURE__ */ s("div", {
|
|
2781
2792
|
style: {
|
|
2782
2793
|
fontSize: 18,
|
|
2783
|
-
color:
|
|
2794
|
+
color: a,
|
|
2784
2795
|
fontFamily: $,
|
|
2785
2796
|
whiteSpace: "nowrap"
|
|
2786
2797
|
},
|
|
@@ -2789,7 +2800,7 @@ function dn({ min: e, max: t, unit: n, dots: r = [], chips: i = [] }) {
|
|
|
2789
2800
|
style: {
|
|
2790
2801
|
fontSize: 18,
|
|
2791
2802
|
fontWeight: 500,
|
|
2792
|
-
color:
|
|
2803
|
+
color: a,
|
|
2793
2804
|
fontFamily: $,
|
|
2794
2805
|
whiteSpace: "nowrap"
|
|
2795
2806
|
},
|
|
@@ -2800,8 +2811,8 @@ function dn({ min: e, max: t, unit: n, dots: r = [], chips: i = [] }) {
|
|
|
2800
2811
|
width: 10,
|
|
2801
2812
|
height: 10,
|
|
2802
2813
|
borderRadius: "50%",
|
|
2803
|
-
background:
|
|
2804
|
-
boxShadow: `0 0 8px ${
|
|
2814
|
+
background: a,
|
|
2815
|
+
boxShadow: `0 0 8px ${a}70`,
|
|
2805
2816
|
margin: l ? "0 auto" : "26px auto 0"
|
|
2806
2817
|
} }),
|
|
2807
2818
|
!l && /* @__PURE__ */ c("div", {
|
|
@@ -2812,7 +2823,7 @@ function dn({ min: e, max: t, unit: n, dots: r = [], chips: i = [] }) {
|
|
|
2812
2823
|
children: [/* @__PURE__ */ s("div", {
|
|
2813
2824
|
style: {
|
|
2814
2825
|
fontSize: 18,
|
|
2815
|
-
color:
|
|
2826
|
+
color: a,
|
|
2816
2827
|
fontFamily: $,
|
|
2817
2828
|
whiteSpace: "nowrap"
|
|
2818
2829
|
},
|
|
@@ -2821,7 +2832,7 @@ function dn({ min: e, max: t, unit: n, dots: r = [], chips: i = [] }) {
|
|
|
2821
2832
|
style: {
|
|
2822
2833
|
fontSize: 18,
|
|
2823
2834
|
fontWeight: 500,
|
|
2824
|
-
color:
|
|
2835
|
+
color: a,
|
|
2825
2836
|
fontFamily: $,
|
|
2826
2837
|
whiteSpace: "nowrap"
|
|
2827
2838
|
},
|
|
@@ -2832,9 +2843,10 @@ function dn({ min: e, max: t, unit: n, dots: r = [], chips: i = [] }) {
|
|
|
2832
2843
|
}, r);
|
|
2833
2844
|
})
|
|
2834
2845
|
]
|
|
2835
|
-
}), i && i.length > 0 && /* @__PURE__ */ s(
|
|
2846
|
+
}), i && i.length > 0 && /* @__PURE__ */ s(sn, { items: i })] });
|
|
2836
2847
|
}
|
|
2837
|
-
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;
|
|
2838
2850
|
let f = r ?? u.blue, p = l ?? u.blue;
|
|
2839
2851
|
return /* @__PURE__ */ c("div", { children: [
|
|
2840
2852
|
/* @__PURE__ */ c("div", {
|
|
@@ -2928,10 +2940,11 @@ function fn({ leftPct: e, leftLabel: t, leftValue: n, leftColor: r, rightPct: i,
|
|
|
2928
2940
|
})
|
|
2929
2941
|
})]
|
|
2930
2942
|
}),
|
|
2931
|
-
d && d.length > 0 && /* @__PURE__ */ s(
|
|
2943
|
+
d && d.length > 0 && /* @__PURE__ */ s(sn, { items: d })
|
|
2932
2944
|
] });
|
|
2933
2945
|
}
|
|
2934
|
-
function
|
|
2946
|
+
function fn({ pct: e, label: t, color: n, chips: r }) {
|
|
2947
|
+
if (e == null && !t) return null;
|
|
2935
2948
|
let i = n ?? u.blue, a = 2 * Math.PI * 30, o = a * (1 - e / 100);
|
|
2936
2949
|
return /* @__PURE__ */ c("div", {
|
|
2937
2950
|
style: {
|
|
@@ -2990,7 +3003,7 @@ function pn({ pct: e, label: t, color: n, chips: r }) {
|
|
|
2990
3003
|
style: { flex: 1 },
|
|
2991
3004
|
children: [/* @__PURE__ */ s("div", {
|
|
2992
3005
|
style: {
|
|
2993
|
-
...
|
|
3006
|
+
...rn,
|
|
2994
3007
|
padding: "10px 0px"
|
|
2995
3008
|
},
|
|
2996
3009
|
children: t
|
|
@@ -3013,14 +3026,14 @@ function pn({ pct: e, label: t, color: n, chips: r }) {
|
|
|
3013
3026
|
children: [
|
|
3014
3027
|
/* @__PURE__ */ s("span", {
|
|
3015
3028
|
style: {
|
|
3016
|
-
...
|
|
3029
|
+
...nn,
|
|
3017
3030
|
color: Q.t2
|
|
3018
3031
|
},
|
|
3019
3032
|
children: e.value
|
|
3020
3033
|
}),
|
|
3021
3034
|
/* @__PURE__ */ s("span", {
|
|
3022
3035
|
style: {
|
|
3023
|
-
...
|
|
3036
|
+
...nn,
|
|
3024
3037
|
color: Q.t2,
|
|
3025
3038
|
fontWeight: 400,
|
|
3026
3039
|
userSelect: "none"
|
|
@@ -3028,7 +3041,7 @@ function pn({ pct: e, label: t, color: n, chips: r }) {
|
|
|
3028
3041
|
children: "|"
|
|
3029
3042
|
}),
|
|
3030
3043
|
/* @__PURE__ */ s("span", {
|
|
3031
|
-
style: { ...
|
|
3044
|
+
style: { ...rn },
|
|
3032
3045
|
children: e.label
|
|
3033
3046
|
})
|
|
3034
3047
|
]
|
|
@@ -3037,23 +3050,24 @@ function pn({ pct: e, label: t, color: n, chips: r }) {
|
|
|
3037
3050
|
})]
|
|
3038
3051
|
});
|
|
3039
3052
|
}
|
|
3040
|
-
var
|
|
3053
|
+
var pn = {
|
|
3041
3054
|
green: "#34D39918",
|
|
3042
3055
|
amber: "#FBBF2418",
|
|
3043
3056
|
red: "#F0606018"
|
|
3044
|
-
},
|
|
3057
|
+
}, mn = {
|
|
3045
3058
|
green: "#34D399",
|
|
3046
3059
|
amber: "#FBBF24",
|
|
3047
3060
|
red: "#F06060"
|
|
3048
3061
|
};
|
|
3049
|
-
function
|
|
3050
|
-
|
|
3062
|
+
function hn({ items: e = [] }) {
|
|
3063
|
+
let t = e.filter((e) => e.name ?? e.value);
|
|
3064
|
+
return t.length === 0 ? null : /* @__PURE__ */ s("div", {
|
|
3051
3065
|
style: {
|
|
3052
3066
|
display: "flex",
|
|
3053
3067
|
flexDirection: "column",
|
|
3054
3068
|
gap: 5
|
|
3055
3069
|
},
|
|
3056
|
-
children:
|
|
3070
|
+
children: t.map((e, t) => /* @__PURE__ */ c("div", {
|
|
3057
3071
|
style: {
|
|
3058
3072
|
display: "flex",
|
|
3059
3073
|
alignItems: "center",
|
|
@@ -3110,8 +3124,8 @@ function gn({ items: e = [] }) {
|
|
|
3110
3124
|
style: {
|
|
3111
3125
|
fontSize: 18,
|
|
3112
3126
|
fontWeight: 500,
|
|
3113
|
-
color:
|
|
3114
|
-
background:
|
|
3127
|
+
color: mn[e.badgeSeverity],
|
|
3128
|
+
background: pn[e.badgeSeverity],
|
|
3115
3129
|
padding: "2px 7px",
|
|
3116
3130
|
borderRadius: 4,
|
|
3117
3131
|
fontFamily: $,
|
|
@@ -3123,7 +3137,7 @@ function gn({ items: e = [] }) {
|
|
|
3123
3137
|
}),
|
|
3124
3138
|
e.sublabel && /* @__PURE__ */ s("span", {
|
|
3125
3139
|
style: {
|
|
3126
|
-
...
|
|
3140
|
+
...rn,
|
|
3127
3141
|
flexShrink: 0,
|
|
3128
3142
|
minWidth: 80,
|
|
3129
3143
|
textAlign: "right"
|
|
@@ -3134,20 +3148,21 @@ function gn({ items: e = [] }) {
|
|
|
3134
3148
|
}, t))
|
|
3135
3149
|
});
|
|
3136
3150
|
}
|
|
3137
|
-
var
|
|
3151
|
+
var gn = {
|
|
3138
3152
|
red: Q.red,
|
|
3139
3153
|
amber: Q.amber,
|
|
3140
3154
|
green: Q.green
|
|
3141
3155
|
};
|
|
3142
|
-
function
|
|
3143
|
-
|
|
3156
|
+
function _n({ items: e = [] }) {
|
|
3157
|
+
let t = e.filter((e) => e.text);
|
|
3158
|
+
return t.length === 0 ? null : /* @__PURE__ */ s("div", {
|
|
3144
3159
|
style: {
|
|
3145
3160
|
display: "flex",
|
|
3146
3161
|
flexDirection: "column",
|
|
3147
3162
|
gap: 5
|
|
3148
3163
|
},
|
|
3149
|
-
children:
|
|
3150
|
-
let n =
|
|
3164
|
+
children: t.map((e, t) => {
|
|
3165
|
+
let n = gn[e.severity];
|
|
3151
3166
|
return /* @__PURE__ */ c("div", {
|
|
3152
3167
|
style: {
|
|
3153
3168
|
display: "flex",
|
|
@@ -3173,13 +3188,13 @@ function vn({ items: e = [] }) {
|
|
|
3173
3188
|
/* @__PURE__ */ s("span", {
|
|
3174
3189
|
style: {
|
|
3175
3190
|
flex: 1,
|
|
3176
|
-
...
|
|
3191
|
+
...rn
|
|
3177
3192
|
},
|
|
3178
3193
|
children: e.text
|
|
3179
3194
|
}),
|
|
3180
3195
|
/* @__PURE__ */ s("span", {
|
|
3181
3196
|
style: {
|
|
3182
|
-
...
|
|
3197
|
+
...rn,
|
|
3183
3198
|
flexShrink: 0,
|
|
3184
3199
|
marginTop: 1
|
|
3185
3200
|
},
|
|
@@ -3190,8 +3205,8 @@ function vn({ items: e = [] }) {
|
|
|
3190
3205
|
})
|
|
3191
3206
|
});
|
|
3192
3207
|
}
|
|
3193
|
-
function
|
|
3194
|
-
return /* @__PURE__ */ c("div", {
|
|
3208
|
+
function vn({ columns: e = [], rows: t = [] }) {
|
|
3209
|
+
return t.length === 0 ? null : /* @__PURE__ */ c("div", {
|
|
3195
3210
|
style: {
|
|
3196
3211
|
display: "flex",
|
|
3197
3212
|
flexDirection: "column",
|
|
@@ -3253,21 +3268,21 @@ function yn({ columns: e = [], rows: t = [] }) {
|
|
|
3253
3268
|
}, t))]
|
|
3254
3269
|
});
|
|
3255
3270
|
}
|
|
3256
|
-
function
|
|
3271
|
+
function yn({ block: e }) {
|
|
3257
3272
|
if (!e) return null;
|
|
3258
3273
|
switch (e.type) {
|
|
3259
|
-
case "stats": return /* @__PURE__ */ s(
|
|
3260
|
-
case "ranked": return /* @__PURE__ */ s(
|
|
3261
|
-
case "chips": return /* @__PURE__ */ s(
|
|
3262
|
-
case "badges": return /* @__PURE__ */ s(
|
|
3263
|
-
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, {
|
|
3264
3279
|
min: e.min,
|
|
3265
3280
|
max: e.max,
|
|
3266
3281
|
unit: e.unit,
|
|
3267
3282
|
dots: e.dots,
|
|
3268
3283
|
chips: e.chips
|
|
3269
3284
|
});
|
|
3270
|
-
case "proportion": return /* @__PURE__ */ s(
|
|
3285
|
+
case "proportion": return /* @__PURE__ */ s(dn, {
|
|
3271
3286
|
leftPct: e.leftPct,
|
|
3272
3287
|
leftLabel: e.leftLabel,
|
|
3273
3288
|
leftValue: e.leftValue,
|
|
@@ -3278,15 +3293,15 @@ function bn({ block: e }) {
|
|
|
3278
3293
|
rightColor: e.rightColor,
|
|
3279
3294
|
chips: e.chips
|
|
3280
3295
|
});
|
|
3281
|
-
case "ring": return /* @__PURE__ */ s(
|
|
3296
|
+
case "ring": return /* @__PURE__ */ s(fn, {
|
|
3282
3297
|
pct: e.pct,
|
|
3283
3298
|
label: e.label,
|
|
3284
3299
|
color: e.color,
|
|
3285
3300
|
chips: e.chips
|
|
3286
3301
|
});
|
|
3287
|
-
case "scorecard-rows": return /* @__PURE__ */ s(
|
|
3288
|
-
case "flags-list": return /* @__PURE__ */ s(
|
|
3289
|
-
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, {
|
|
3290
3305
|
columns: e.columns,
|
|
3291
3306
|
rows: e.rows
|
|
3292
3307
|
});
|
|
@@ -3295,14 +3310,14 @@ function bn({ block: e }) {
|
|
|
3295
3310
|
}
|
|
3296
3311
|
//#endregion
|
|
3297
3312
|
//#region src/components/keyHighlights/Takeaway.tsx
|
|
3298
|
-
var
|
|
3313
|
+
var bn = "'Satoshi Variable', 'DM Sans', sans-serif", xn = {
|
|
3299
3314
|
color: "#C2C2C2",
|
|
3300
|
-
fontFamily:
|
|
3315
|
+
fontFamily: bn,
|
|
3301
3316
|
fontSize: 18,
|
|
3302
3317
|
fontWeight: 400,
|
|
3303
3318
|
lineHeight: 1.65
|
|
3304
3319
|
};
|
|
3305
|
-
function
|
|
3320
|
+
function Sn({ text: e }) {
|
|
3306
3321
|
return /* @__PURE__ */ c("div", {
|
|
3307
3322
|
style: {
|
|
3308
3323
|
padding: "8px 0px",
|
|
@@ -3315,16 +3330,16 @@ function Cn({ text: e }) {
|
|
|
3315
3330
|
fontSize: 18,
|
|
3316
3331
|
fontWeight: 500,
|
|
3317
3332
|
color: u.t1,
|
|
3318
|
-
fontFamily:
|
|
3333
|
+
fontFamily: bn,
|
|
3319
3334
|
lineHeight: 1.65,
|
|
3320
3335
|
marginRight: 8
|
|
3321
3336
|
},
|
|
3322
3337
|
children: "Takeaway"
|
|
3323
3338
|
}), /* @__PURE__ */ s("span", {
|
|
3324
|
-
style: { ...
|
|
3339
|
+
style: { ...xn },
|
|
3325
3340
|
children: e
|
|
3326
3341
|
})]
|
|
3327
3342
|
});
|
|
3328
3343
|
}
|
|
3329
3344
|
//#endregion
|
|
3330
|
-
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 };
|