@divami-artefacts/ai-design-system 1.0.25 → 1.0.27
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.js
CHANGED
|
@@ -504,7 +504,13 @@ var L = 680, R = 42, oe = 10, se = 24, ce = 24, le = 8, ue = [
|
|
|
504
504
|
u.amber,
|
|
505
505
|
u.red
|
|
506
506
|
];
|
|
507
|
-
function de(
|
|
507
|
+
function de(e, t, n) {
|
|
508
|
+
if (e.measureText(t).width <= n) return t;
|
|
509
|
+
let r = t;
|
|
510
|
+
for (; r.length > 0 && e.measureText(r + "…").width > n;) r = r.slice(0, -1);
|
|
511
|
+
return r + "…";
|
|
512
|
+
}
|
|
513
|
+
function fe({ items: e = [], "data-testid": t }) {
|
|
508
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)), [_]), E = i(() => m ? S : S.slice(0, le), [S, m]), O = E.length, k = se + ce + O * R + Math.max(0, O - 1) * oe, { hoveredRef: A, tooltip: j, hitZonesRef: M } = w(r, {
|
|
509
515
|
width: L,
|
|
510
516
|
height: k
|
|
@@ -535,7 +541,7 @@ function de({ items: e = [], "data-testid": t }) {
|
|
|
535
541
|
sublabel: `Base: ${r.baseLabel ?? String(r.base ?? 0)} · Variations: ${r.variationLabel ?? String(r.variation ?? 0)}`,
|
|
536
542
|
color: o
|
|
537
543
|
};
|
|
538
|
-
T(M.current, r.id, u, c + R / 2, 14, m), t.font = p.font, t.fillStyle = h(o, .9 + s * .1), t.textAlign = "left", t.textBaseline = "middle", t.fillText(`${r.percentage ?? 0}%`, u + 10, c + R / 2), t.font = `${s > 0 ? "bold " : ""}` + f.font, t.fillStyle = s > 0 ? o : f.color, t.textAlign = "right", t.fillText(r.abbreviation ?? r.name
|
|
544
|
+
T(M.current, r.id, u, c + R / 2, 14, m), t.font = p.font, t.fillStyle = h(o, .9 + s * .1), t.textAlign = "left", t.textBaseline = "middle", t.fillText(`${r.percentage ?? 0}%`, u + 10, c + R / 2), t.font = `${s > 0 ? "bold " : ""}` + f.font, t.fillStyle = s > 0 ? o : f.color, t.textAlign = "right", t.fillText(de(t, r.abbreviation ?? r.name ?? "", n - 16), n - 8, c + R / 2);
|
|
539
545
|
}), t.strokeStyle = h(u.t3, .3), t.lineWidth = 1, t.setLineDash([]), t.beginPath(), t.moveTo(n + a, se), t.lineTo(n + a, se + (O - 1) * (R + oe) + R), t.stroke(), x(t, L, k, e, .015), o = requestAnimationFrame(s);
|
|
540
546
|
};
|
|
541
547
|
return s(), () => cancelAnimationFrame(o);
|
|
@@ -574,18 +580,18 @@ function de({ items: e = [], "data-testid": t }) {
|
|
|
574
580
|
}
|
|
575
581
|
//#endregion
|
|
576
582
|
//#region src/components/semiCircularGaugeChart/SemiCircularGaugeChart.tsx
|
|
577
|
-
var
|
|
578
|
-
function
|
|
583
|
+
var pe = 480, me = 340;
|
|
584
|
+
function he({ value: e, confirmed: t, total: r, "data-testid": i }) {
|
|
579
585
|
let o = a(null), c = a(0);
|
|
580
586
|
return n(() => {
|
|
581
587
|
let n = o.current;
|
|
582
588
|
if (!n) return;
|
|
583
|
-
let i = v(n,
|
|
589
|
+
let i = v(n, pe, me);
|
|
584
590
|
c.current = 0;
|
|
585
|
-
let a =
|
|
591
|
+
let a = pe / 2, s = Math.PI, l = 2 * Math.PI, d = Math.PI, p, g = () => {
|
|
586
592
|
c.current++;
|
|
587
593
|
let n = c.current;
|
|
588
|
-
i.clearRect(0, 0,
|
|
594
|
+
i.clearRect(0, 0, pe, me), i.letterSpacing = f.letterSpacing;
|
|
589
595
|
let o = D(Math.min(n / 80, 1)), _ = A(Math.min(n / 72, 1));
|
|
590
596
|
i.beginPath(), i.arc(a, 220, 120, s, l), i.strokeStyle = h(u.bd, .35), i.lineWidth = 46, i.stroke(), [
|
|
591
597
|
{
|
|
@@ -626,7 +632,7 @@ function me({ value: e, confirmed: t, total: r, "data-testid": i }) {
|
|
|
626
632
|
let v = e ?? 0, b = s + v / 100 * d * o, x = v >= 66 ? u.green : v >= 33 ? u.amber : u.red;
|
|
627
633
|
y(i, a + Math.cos(b) * 194 / 2, 220 + Math.sin(b) * 194 / 2, 18, x, .35 * o), i.beginPath(), i.arc(a, 220, 194 / 2, s, b), i.strokeStyle = h(x, .7 * o), i.lineWidth = 38, i.lineCap = "round", i.stroke(), i.lineCap = "butt";
|
|
628
634
|
let S = s + v / 100 * d * _, C = a + Math.cos(S) * 82, w = 220 + Math.sin(S) * 82, T = a - Math.cos(S) * 14, E = 220 - Math.sin(S) * 14;
|
|
629
|
-
i.strokeStyle = h(x, .18 * _), i.lineWidth = 6, i.lineCap = "round", i.beginPath(), i.moveTo(T, E), i.lineTo(C, w), i.stroke(), i.strokeStyle = h(u.t1, .92 * _), i.lineWidth = 2, i.lineCap = "round", i.beginPath(), i.moveTo(T, E), i.lineTo(C, w), i.stroke(), i.beginPath(), i.arc(C, w, 3, 0, Math.PI * 2), i.fillStyle = h(x, .9 * _), i.fill(), y(i, a, 220, 20, x, .25 * _), i.beginPath(), i.arc(a, 220, 9, 0, Math.PI * 2), i.strokeStyle = h(x, .5 * _), i.lineWidth = 1.5, i.stroke(), i.beginPath(), i.arc(a, 220, 5, 0, Math.PI * 2), i.fillStyle = u.t1, i.fill(), o > .5 && (i.globalAlpha = Math.min(1, (o - .5) / .5), i.font = "500 24px 'Satoshi Variable', 'DM Sans', sans-serif", i.fillStyle = x, i.textAlign = "center", i.fillText(`${Math.round(v * _)}%`, a, 182), i.globalAlpha = 1), o > .7 && (i.globalAlpha = Math.min(1, (o - .7) / .3), i.font = m.font, i.fillStyle = m.color, i.textAlign = "center", i.fillText("NCEs confirmed", a, 252), i.font = m.font, i.fillStyle = m.color, i.fillText(`${t ?? 0} of ${r ?? 0} NCEs are confirmed compensation events`, a,
|
|
635
|
+
i.strokeStyle = h(x, .18 * _), i.lineWidth = 6, i.lineCap = "round", i.beginPath(), i.moveTo(T, E), i.lineTo(C, w), i.stroke(), i.strokeStyle = h(u.t1, .92 * _), i.lineWidth = 2, i.lineCap = "round", i.beginPath(), i.moveTo(T, E), i.lineTo(C, w), i.stroke(), i.beginPath(), i.arc(C, w, 3, 0, Math.PI * 2), i.fillStyle = h(x, .9 * _), i.fill(), y(i, a, 220, 20, x, .25 * _), i.beginPath(), i.arc(a, 220, 9, 0, Math.PI * 2), i.strokeStyle = h(x, .5 * _), i.lineWidth = 1.5, i.stroke(), i.beginPath(), i.arc(a, 220, 5, 0, Math.PI * 2), i.fillStyle = u.t1, i.fill(), o > .5 && (i.globalAlpha = Math.min(1, (o - .5) / .5), i.font = "500 24px 'Satoshi Variable', 'DM Sans', sans-serif", i.fillStyle = x, i.textAlign = "center", i.fillText(`${Math.round(v * _)}%`, a, 182), i.globalAlpha = 1), o > .7 && (i.globalAlpha = Math.min(1, (o - .7) / .3), i.font = m.font, i.fillStyle = m.color, i.textAlign = "center", i.fillText("NCEs confirmed", a, 252), i.font = m.font, i.fillStyle = m.color, i.fillText(`${t ?? 0} of ${r ?? 0} NCEs are confirmed compensation events`, a, 282), i.globalAlpha = 1);
|
|
630
636
|
for (let e = 0; e <= 10; e++) {
|
|
631
637
|
let t = s + e / 10 * d;
|
|
632
638
|
if (i.strokeStyle = h(u.bd, .5), i.lineWidth = e % 5 == 0 ? 1.5 : .8, i.beginPath(), i.moveTo(a + Math.cos(t) * 122, 220 + Math.sin(t) * 122), i.lineTo(a + Math.cos(t) * 128, 220 + Math.sin(t) * 128), i.stroke(), e % 5 == 0) {
|
|
@@ -645,16 +651,16 @@ function me({ value: e, confirmed: t, total: r, "data-testid": i }) {
|
|
|
645
651
|
"data-testid": i,
|
|
646
652
|
style: {
|
|
647
653
|
position: "relative",
|
|
648
|
-
width:
|
|
649
|
-
height:
|
|
654
|
+
width: pe,
|
|
655
|
+
height: me
|
|
650
656
|
},
|
|
651
657
|
children: /* @__PURE__ */ s("canvas", {
|
|
652
658
|
ref: o,
|
|
653
659
|
role: "img",
|
|
654
660
|
"aria-label": `Compensation event gauge — ${e}% of NCEs confirmed as compensation events`,
|
|
655
661
|
style: {
|
|
656
|
-
width:
|
|
657
|
-
height:
|
|
662
|
+
width: pe,
|
|
663
|
+
height: me,
|
|
658
664
|
display: "block"
|
|
659
665
|
}
|
|
660
666
|
})
|
|
@@ -662,7 +668,7 @@ function me({ value: e, confirmed: t, total: r, "data-testid": i }) {
|
|
|
662
668
|
}
|
|
663
669
|
//#endregion
|
|
664
670
|
//#region src/canvas/useCanvasLoop.ts
|
|
665
|
-
function
|
|
671
|
+
function ge(e, t, r, i, o = !0, s = {}) {
|
|
666
672
|
let c = a(0), { easing: l = D, durationFrames: u = 48 } = s;
|
|
667
673
|
n(() => {
|
|
668
674
|
let n = e.current;
|
|
@@ -694,28 +700,28 @@ function he(e, t, r, i, o = !0, s = {}) {
|
|
|
694
700
|
}
|
|
695
701
|
//#endregion
|
|
696
702
|
//#region src/components/multiMetricConstellationChart/MultiMetricConstellationChart.tsx
|
|
697
|
-
var z = 780,
|
|
703
|
+
var z = 780, _e = 234, ve = 130, ye = 52, be = [
|
|
698
704
|
u.blue,
|
|
699
705
|
u.amber,
|
|
700
706
|
u.purple,
|
|
701
707
|
u.green
|
|
702
|
-
],
|
|
708
|
+
], xe = [
|
|
703
709
|
"Base Value",
|
|
704
710
|
"Variations",
|
|
705
711
|
"Commitment"
|
|
706
|
-
],
|
|
712
|
+
], Se = [
|
|
707
713
|
"Base",
|
|
708
714
|
"Var",
|
|
709
715
|
"Commit"
|
|
710
716
|
];
|
|
711
|
-
function
|
|
717
|
+
function Ce({ items: e = [], "data-testid": t }) {
|
|
712
718
|
let n = a(null), r = a(/* @__PURE__ */ new Map()), { hoveredRef: o, tooltip: l, hitZonesRef: d } = w(n, {
|
|
713
719
|
width: z,
|
|
714
|
-
height:
|
|
720
|
+
height: _e
|
|
715
721
|
}), p = i(() => e.filter((e) => typeof e == "object" && !!e), [e]), g = i(() => {
|
|
716
722
|
let e = Math.max(...p.map((e) => e.base ?? 0)), t = Math.max(...p.map((e) => e.variation ?? 0));
|
|
717
723
|
return p.map((n, r) => {
|
|
718
|
-
let i = z * (.12 + r * .19), a =
|
|
724
|
+
let i = z * (.12 + r * .19), a = ve, o = Math.min(z * .075, ye), s = be[r % be.length], c = [
|
|
719
725
|
(n.base ?? 0) / (e || 1) * 100,
|
|
720
726
|
(n.variation ?? 0) / (t || 1) * 100,
|
|
721
727
|
n.percentage ?? 0
|
|
@@ -724,10 +730,10 @@ function Se({ items: e = [], "data-testid": t }) {
|
|
|
724
730
|
n.variationLabel ?? String(n.variation ?? 0),
|
|
725
731
|
`${n.percentage ?? 0}%`
|
|
726
732
|
], u = c.map((e, t) => {
|
|
727
|
-
let n = -Math.PI / 2 + t /
|
|
733
|
+
let n = -Math.PI / 2 + t / xe.length * Math.PI * 2, r = e / 100, s = o * Math.max(.08, r);
|
|
728
734
|
return {
|
|
729
|
-
name:
|
|
730
|
-
short:
|
|
735
|
+
name: xe[t],
|
|
736
|
+
short: Se[t],
|
|
731
737
|
label: l[t],
|
|
732
738
|
val: Math.round(e),
|
|
733
739
|
x: i + Math.cos(n) * s,
|
|
@@ -747,8 +753,8 @@ function Se({ items: e = [], "data-testid": t }) {
|
|
|
747
753
|
};
|
|
748
754
|
});
|
|
749
755
|
}, [p]);
|
|
750
|
-
return
|
|
751
|
-
N(r.current, o.current), d.current = [], b(e, z,
|
|
756
|
+
return ge(n, z, _e, (e, t, n) => {
|
|
757
|
+
N(r.current, o.current), d.current = [], b(e, z, _e, n, 30), g.forEach((t, i) => {
|
|
752
758
|
let a = t.color, o = `constellation-${i}`, s = r.current.get(o) ?? 0;
|
|
753
759
|
e.beginPath(), e.arc(t.cx, t.cy, t.baseR + 5, 0, Math.PI * 2), e.strokeStyle = h(u.bd, .08 + .08 * s), e.lineWidth = .5, e.stroke(), e.beginPath(), t.stars.forEach((t, n) => {
|
|
754
760
|
n === 0 ? e.moveTo(t.x, t.y) : e.lineTo(t.x, t.y);
|
|
@@ -768,17 +774,17 @@ function Se({ items: e = [], "data-testid": t }) {
|
|
|
768
774
|
sublabel: `${t.percentage ?? 0}% committed · scatter ${t.scatter.toFixed(1)}`,
|
|
769
775
|
color: a
|
|
770
776
|
});
|
|
771
|
-
}), e.font = m.font, e.textAlign = "center", e.textBaseline = "middle", e.fillStyle = m.color, e.fillText("▲ top = Base value · ▼▸ lower-right = Variations · ◂▼ lower-left = Commitment % · hover stars for details", z / 2,
|
|
777
|
+
}), e.font = m.font, e.textAlign = "center", e.textBaseline = "middle", e.fillStyle = m.color, e.fillText("▲ top = Base value · ▼▸ lower-right = Variations · ◂▼ lower-left = Commitment % · hover stars for details", z / 2, _e - 14), x(e, z, _e, n, .012);
|
|
772
778
|
}, !0), g.length === 0 ? /* @__PURE__ */ s(I, {
|
|
773
779
|
width: z,
|
|
774
|
-
height:
|
|
780
|
+
height: _e,
|
|
775
781
|
"data-testid": t
|
|
776
782
|
}) : /* @__PURE__ */ c("div", {
|
|
777
783
|
"data-testid": t,
|
|
778
784
|
style: {
|
|
779
785
|
position: "relative",
|
|
780
786
|
width: z,
|
|
781
|
-
height:
|
|
787
|
+
height: _e
|
|
782
788
|
},
|
|
783
789
|
children: [/* @__PURE__ */ s("canvas", {
|
|
784
790
|
ref: n,
|
|
@@ -786,19 +792,19 @@ function Se({ items: e = [], "data-testid": t }) {
|
|
|
786
792
|
"aria-label": "Contract value breakdown per contractor — multi-KPI constellation chart",
|
|
787
793
|
style: {
|
|
788
794
|
width: z,
|
|
789
|
-
height:
|
|
795
|
+
height: _e,
|
|
790
796
|
display: "block"
|
|
791
797
|
}
|
|
792
798
|
}), /* @__PURE__ */ s(C, {
|
|
793
799
|
...l,
|
|
794
800
|
parentW: z,
|
|
795
|
-
parentH:
|
|
801
|
+
parentH: _e
|
|
796
802
|
})]
|
|
797
803
|
});
|
|
798
804
|
}
|
|
799
805
|
//#endregion
|
|
800
806
|
//#region src/components/stackedHorizontalBarChart/StackedHorizontalBarChart.tsx
|
|
801
|
-
var
|
|
807
|
+
var we = 680, Te = 220, Ee = 8, De = [
|
|
802
808
|
u.blue,
|
|
803
809
|
u.amber,
|
|
804
810
|
u.purple,
|
|
@@ -808,48 +814,48 @@ var Ce = 680, we = 220, Te = 8, Ee = [
|
|
|
808
814
|
right: 80,
|
|
809
815
|
top: 16,
|
|
810
816
|
bottom: 38
|
|
811
|
-
},
|
|
812
|
-
function
|
|
817
|
+
}, Oe = 150, V = 18;
|
|
818
|
+
function ke(e, t, n) {
|
|
813
819
|
if (e.measureText(t).width <= n) return t;
|
|
814
820
|
let r = t;
|
|
815
821
|
for (; r.length > 0 && e.measureText(r + "…").width > n;) r = r.slice(0, -1);
|
|
816
822
|
return r + "…";
|
|
817
823
|
}
|
|
818
|
-
function
|
|
824
|
+
function Ae(e) {
|
|
819
825
|
let t = Math.abs(e), n = e < 0 ? "-" : "";
|
|
820
826
|
return t >= 1e6 ? `${n}£${(t / 1e6).toFixed(1)}M` : t >= 1e3 ? `${n}£${(t / 1e3).toFixed(1)}K` : `${n}£${t.toFixed(0)}`;
|
|
821
827
|
}
|
|
822
|
-
function
|
|
823
|
-
let n = a(null), r = a(/* @__PURE__ */ new Map()), [i, l] = o(!1), { items: d = [], totals: g } = e, _ = d.filter((e) => typeof e == "object" && !!e), v = [..._].sort((e, t) => (t.total ?? 0) - (e.total ?? 0)), b = i ? v : v.slice(0,
|
|
824
|
-
width:
|
|
825
|
-
height:
|
|
828
|
+
function je({ data: e, "data-testid": t }) {
|
|
829
|
+
let n = a(null), r = a(/* @__PURE__ */ new Map()), [i, l] = o(!1), { items: d = [], totals: g } = e, _ = d.filter((e) => typeof e == "object" && !!e), v = [..._].sort((e, t) => (t.total ?? 0) - (e.total ?? 0)), b = i ? v : v.slice(0, Ee), x = b.length, S = Math.max(...v.map((e) => Math.abs(e.total ?? 0)), 1), T = x * V + Math.max(0, x - 1) * 8, D = B.top + B.bottom + T, k = we - B.left - Oe - B.right, A = _.length === 0, { hoveredRef: j, tooltip: P, hitZonesRef: F } = w(n, {
|
|
830
|
+
width: we,
|
|
831
|
+
height: D
|
|
826
832
|
});
|
|
827
|
-
return
|
|
833
|
+
return ge(n, we, D, (e, t) => {
|
|
828
834
|
N(r.current, j.current), F.current = [], b.forEach((n, i) => {
|
|
829
|
-
let a =
|
|
830
|
-
e.font = f.font, e.fillStyle = l > 0 ? a : f.color, e.textAlign = "right", e.textBaseline = "middle", e.fillText(
|
|
835
|
+
let a = De[i % De.length], o = M(t, i, x, O), s = B.top + i * (V + 8), c = B.left + Oe, 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;
|
|
836
|
+
e.font = f.font, e.fillStyle = l > 0 ? a : f.color, e.textAlign = "right", e.textBaseline = "middle", e.fillText(ke(e, n.name ?? "", Oe - 16), c - 8, s + V / 2), e.fillStyle = h(u.bd, .25), e.beginPath(), e.roundRect(c, s, k, V, 4), e.fill(), g > 0 && (l > 0 && y(e, c + g / 2, s + V / 2, g * .3, a, .1 * l), e.fillStyle = h(a, .5 + l * .15), e.beginPath(), e.roundRect(c, s, g, V, 4), e.fill()), v > 2 && (e.fillStyle = h(a, .22 + l * .08), e.beginPath(), e.roundRect(c + g, s, v, V, [
|
|
831
837
|
0,
|
|
832
838
|
4,
|
|
833
839
|
4,
|
|
834
840
|
0
|
|
835
|
-
]), 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 + V - 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, _, V, 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 ??
|
|
841
|
+
]), 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 + V - 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, _, V, 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 ?? Ae(n.total ?? 0), c + _ + 6, s + V / 2), e.globalAlpha = 1), E(F.current, n.id, c, s, Math.max(_, 1), V, {
|
|
836
842
|
label: n.name,
|
|
837
|
-
value: `${n.totalLabel ??
|
|
838
|
-
sublabel: `Base ${n.baseLabel ??
|
|
843
|
+
value: `${n.totalLabel ?? Ae(n.total ?? 0)} total`,
|
|
844
|
+
sublabel: `Base ${n.baseLabel ?? Ae(n.base ?? 0)} + Var ${n.variationLabel ?? Ae(n.variation ?? 0)} · ${n.percentage ?? 0}% committed`,
|
|
839
845
|
color: a
|
|
840
846
|
});
|
|
841
847
|
});
|
|
842
|
-
let n =
|
|
843
|
-
e.textBaseline = "middle", e.font = m.font, e.textAlign = "left", e.fillStyle = h(u.blue, .5), e.beginPath(), e.roundRect(B.left +
|
|
848
|
+
let n = D - 14;
|
|
849
|
+
e.textBaseline = "middle", e.font = m.font, e.textAlign = "left", e.fillStyle = h(u.blue, .5), e.beginPath(), e.roundRect(B.left + Oe, n - 3, 14, 6, 2), e.fill(), e.fillStyle = m.color, e.fillText("base value", B.left + Oe + 18, n), e.fillStyle = h(u.blue, .22), e.beginPath(), e.roundRect(B.left + Oe + 94, n - 3, 14, 6, 2), e.fill(), e.setLineDash([2, 3]), e.strokeStyle = h(u.blue, .5), e.lineWidth = .5, e.beginPath(), e.moveTo(B.left + Oe + 101, n - 3), e.lineTo(B.left + Oe + 101, n + 3), e.stroke(), e.setLineDash([]), e.fillStyle = m.color, e.fillText("approved variations", B.left + Oe + 112, n), e.font = m.font, e.textAlign = "right", e.fillStyle = m.color, e.fillText(`Portfolio: ${Ae(g?.total ?? 0)}`, we - 8, n);
|
|
844
850
|
}, !0, { easing: O }), A ? /* @__PURE__ */ s(I, {
|
|
845
|
-
width:
|
|
846
|
-
height:
|
|
851
|
+
width: we,
|
|
852
|
+
height: Te,
|
|
847
853
|
message: "No contract data available",
|
|
848
854
|
"data-testid": t
|
|
849
855
|
}) : /* @__PURE__ */ c("div", {
|
|
850
856
|
"data-testid": t,
|
|
851
857
|
style: {
|
|
852
|
-
width:
|
|
858
|
+
width: we,
|
|
853
859
|
transition: "all 0.25s ease"
|
|
854
860
|
},
|
|
855
861
|
children: [/* @__PURE__ */ c("div", {
|
|
@@ -859,17 +865,17 @@ function Ae({ data: e, "data-testid": t }) {
|
|
|
859
865
|
role: "img",
|
|
860
866
|
"aria-label": "Total contract value per contractor — horizontal bar chart",
|
|
861
867
|
style: {
|
|
862
|
-
width:
|
|
863
|
-
height:
|
|
868
|
+
width: we,
|
|
869
|
+
height: D,
|
|
864
870
|
display: "block",
|
|
865
871
|
borderRadius: 8
|
|
866
872
|
}
|
|
867
873
|
}), /* @__PURE__ */ s(C, {
|
|
868
874
|
...P,
|
|
869
|
-
parentW:
|
|
870
|
-
parentH:
|
|
875
|
+
parentW: we,
|
|
876
|
+
parentH: D
|
|
871
877
|
})]
|
|
872
|
-
}), _.length >
|
|
878
|
+
}), _.length > Ee && /* @__PURE__ */ s("div", {
|
|
873
879
|
style: { marginTop: 8 },
|
|
874
880
|
children: /* @__PURE__ */ s(ae, {
|
|
875
881
|
expanded: i,
|
|
@@ -880,94 +886,94 @@ function Ae({ data: e, "data-testid": t }) {
|
|
|
880
886
|
}
|
|
881
887
|
//#endregion
|
|
882
888
|
//#region src/components/rankedCardLeaderboard/RankedCardLeaderboard.tsx
|
|
883
|
-
var
|
|
889
|
+
var Me = 780, H = 240, Ne = 12, Pe = 10, Fe = [
|
|
884
890
|
"Highest exposure",
|
|
885
891
|
"Elevated risk",
|
|
886
892
|
"Moderate exposure",
|
|
887
893
|
"Moderate exposure",
|
|
888
894
|
"Low exposure"
|
|
889
895
|
];
|
|
890
|
-
function
|
|
896
|
+
function Ie({ items: e = [], "data-testid": t }) {
|
|
891
897
|
let r = a(null), o = a(0), l = a(/* @__PURE__ */ new Map()), { hoveredRef: m, tooltip: g, hitZonesRef: _ } = w(r, {
|
|
892
|
-
width:
|
|
893
|
-
height:
|
|
898
|
+
width: Me,
|
|
899
|
+
height: H
|
|
894
900
|
}), b = [...i(() => e.filter((e) => typeof e == "object" && !!e), [e])].sort((e, t) => (t.count ?? 0) - (e.count ?? 0)).slice(0, 5), S = b.reduce((e, t) => e + (t.count ?? 0), 0);
|
|
895
901
|
return n(() => {
|
|
896
902
|
let e = r.current;
|
|
897
903
|
if (!e) return;
|
|
898
|
-
let t = v(e,
|
|
904
|
+
let t = v(e, Me, H);
|
|
899
905
|
o.current = 0;
|
|
900
|
-
let n =
|
|
906
|
+
let n = (Me - 2 * Ne - 4 * Pe) / 5, i = H * .84, a = H * .08, s = Ne, c, g = () => {
|
|
901
907
|
o.current++;
|
|
902
908
|
let e = o.current;
|
|
903
|
-
t.clearRect(0, 0,
|
|
909
|
+
t.clearRect(0, 0, Me, H), t.letterSpacing = f.letterSpacing, _.current = [], l.current.forEach((e, t) => {
|
|
904
910
|
let n = t === m.current ? 1 : 0, r = e + (n - e) * .12;
|
|
905
911
|
Math.abs(r - n) < .005 ? n === 0 ? l.current.delete(t) : l.current.set(t, 1) : l.current.set(t, r);
|
|
906
|
-
}), m.current && !l.current.has(m.current) && l.current.set(m.current, 0), b.forEach((
|
|
907
|
-
let
|
|
908
|
-
t.fillStyle = h(
|
|
909
|
-
let T = Math.min(
|
|
910
|
-
k.addColorStop(0, h(
|
|
911
|
-
let A =
|
|
912
|
-
t.font = p.font, t.textBaseline = "alphabetic", t.fillStyle = h(
|
|
913
|
-
let M = Math.round((
|
|
914
|
-
E(_.current,
|
|
915
|
-
label:
|
|
912
|
+
}), m.current && !l.current.has(m.current) && l.current.set(m.current, 0), b.forEach((r, o) => {
|
|
913
|
+
let c = o === 0, m = o === 0 ? u.red : o === 1 ? u.amber : d[o % d.length], g = s + o * (n + Pe), v = l.current.get(r.id) ?? 0, b = v * 8, x = g - b / 2, C = n + b, w = c ? j(e, .04, 3e-4) * .06 + .06 : 0;
|
|
914
|
+
t.fillStyle = h(m, .08 + v * .07), t.beginPath(), t.roundRect(x, a, C, i, 6), t.fill(), t.strokeStyle = h(m, .2 + v * .4 + w), t.lineWidth = c ? 1.5 : 1, t.stroke(), (v > .01 || c) && y(t, x + C / 2, a + i / 2, C * .55, m, w + v * .14), t.font = p.font, t.textAlign = "left", t.textBaseline = "top", t.fillStyle = h(m, .5 + v * .35), t.fillText(`#${o + 1}`, x + 7, a + 6);
|
|
915
|
+
let T = Math.min(n * .28, i * .32, 72), D = x + C / 2, O = a + i * .38, k = t.createRadialGradient(D, O - T * .2, 0, D, O, T);
|
|
916
|
+
k.addColorStop(0, h(m, .5 + v * .2)), k.addColorStop(1, h(m, .2 + v * .1)), t.beginPath(), t.arc(D, O, T, 0, Math.PI * 2), t.fillStyle = k, t.fill(), t.strokeStyle = h(m, .4 + v * .3), t.lineWidth = 1, t.stroke(), t.font = p.font, t.textAlign = "center", t.textBaseline = "middle", t.fillStyle = h(u.t1, .9), t.fillText(r.abbreviation ?? r.name?.slice(0, 6) ?? "", D, O);
|
|
917
|
+
let A = r.label ?? String(r.count ?? 0);
|
|
918
|
+
t.font = p.font, t.textBaseline = "alphabetic", t.fillStyle = h(m, .9 + v * .1), t.fillText(A, D, a + i * .76), r.label || (t.font = f.font, t.fillStyle = f.color, t.fillText("open EWs", D, a + i * .88));
|
|
919
|
+
let M = Math.round((r.count ?? 0) / (S || 1) * 100), N = Fe[o] ?? "Low exposure";
|
|
920
|
+
E(_.current, r.id, g, a, n, i, {
|
|
921
|
+
label: r.name,
|
|
916
922
|
value: `${A ?? 0} open · ${M}% of total`,
|
|
917
|
-
sublabel: `Rank #${
|
|
918
|
-
color:
|
|
923
|
+
sublabel: `Rank #${o + 1} · ${N}`,
|
|
924
|
+
color: m
|
|
919
925
|
});
|
|
920
|
-
}), x(t,
|
|
926
|
+
}), x(t, Me, H, e, .015), c = requestAnimationFrame(g);
|
|
921
927
|
};
|
|
922
|
-
return
|
|
928
|
+
return g(), () => cancelAnimationFrame(c);
|
|
923
929
|
}, [b, S]), b.length === 0 ? /* @__PURE__ */ s(I, {
|
|
924
|
-
width:
|
|
925
|
-
height:
|
|
930
|
+
width: Me,
|
|
931
|
+
height: H,
|
|
926
932
|
"data-testid": t
|
|
927
933
|
}) : /* @__PURE__ */ c("div", {
|
|
928
934
|
"data-testid": t,
|
|
929
935
|
style: {
|
|
930
936
|
position: "relative",
|
|
931
|
-
width:
|
|
932
|
-
height:
|
|
937
|
+
width: Me,
|
|
938
|
+
height: H
|
|
933
939
|
},
|
|
934
940
|
children: [/* @__PURE__ */ s("canvas", {
|
|
935
941
|
ref: r,
|
|
936
942
|
role: "img",
|
|
937
943
|
"aria-label": "Contractor rank — open EW count per contractor",
|
|
938
944
|
style: {
|
|
939
|
-
width:
|
|
940
|
-
height:
|
|
945
|
+
width: Me,
|
|
946
|
+
height: H,
|
|
941
947
|
display: "block",
|
|
942
948
|
borderRadius: 8
|
|
943
949
|
}
|
|
944
950
|
}), /* @__PURE__ */ s(C, {
|
|
945
951
|
...g,
|
|
946
|
-
parentW:
|
|
947
|
-
parentH:
|
|
952
|
+
parentW: Me,
|
|
953
|
+
parentH: H
|
|
948
954
|
})]
|
|
949
955
|
});
|
|
950
956
|
}
|
|
951
957
|
//#endregion
|
|
952
958
|
//#region src/components/dotMatrixChart/DotMatrixChart.tsx
|
|
953
|
-
var
|
|
954
|
-
function
|
|
959
|
+
var U = 680, W = 260;
|
|
960
|
+
function Le({ items: e = [], "data-testid": t }) {
|
|
955
961
|
let r = a(null), o = a(0), l = a(/* @__PURE__ */ new Map()), { hoveredRef: d, tooltip: p, hitZonesRef: m } = w(r, {
|
|
956
|
-
width:
|
|
957
|
-
height:
|
|
962
|
+
width: U,
|
|
963
|
+
height: W
|
|
958
964
|
}), g = i(() => e.filter((e) => typeof e == "object" && !!e), [e]);
|
|
959
965
|
return n(() => {
|
|
960
966
|
let e = r.current;
|
|
961
967
|
if (!e) return;
|
|
962
|
-
let t = v(e,
|
|
968
|
+
let t = v(e, U, W);
|
|
963
969
|
o.current = 0;
|
|
964
|
-
let n = g.length, i = Math.max(...g.map((e) => e.count), 1), a = i, s =
|
|
970
|
+
let n = g.length, i = Math.max(...g.map((e) => e.count), 1), a = i, s = U * .05, c = W * .1, p = U * .9 / n, _ = W * .7 / a, S = g.reduce((e, t) => e + t.count, 0), C, w = () => {
|
|
965
971
|
o.current++;
|
|
966
972
|
let e = o.current;
|
|
967
|
-
t.clearRect(0, 0,
|
|
973
|
+
t.clearRect(0, 0, U, W), m.current = [], l.current.forEach((e, t) => {
|
|
968
974
|
let n = t === d.current ? 1 : 0, r = e + (n - e) * .12;
|
|
969
975
|
Math.abs(r - n) < .005 ? n === 0 ? l.current.delete(t) : l.current.set(t, 1) : l.current.set(t, r);
|
|
970
|
-
}), d.current && !l.current.has(d.current) && l.current.set(d.current, 0), b(t,
|
|
976
|
+
}), d.current && !l.current.has(d.current) && l.current.set(d.current, 0), b(t, U, W, e, 40, h(u.blue, .04)), g.forEach((n, r) => {
|
|
971
977
|
let o = n.count === i, d = u.blue, g = l.current.get(`${n.category}-col`) ?? 0;
|
|
972
978
|
for (let u = 0; u < a; u++) {
|
|
973
979
|
let a = s + r * p + p / 2, f = c + u * _ + _ / 2, v = Math.min(p, _) * .38;
|
|
@@ -985,40 +991,40 @@ function Fe({ items: e = [], "data-testid": t }) {
|
|
|
985
991
|
}
|
|
986
992
|
let v = c + a * _ + 16;
|
|
987
993
|
t.font = f.font, t.textAlign = "center", t.textBaseline = "alphabetic", t.fillStyle = o ? u.blue : h(u.t2, .65), t.fillText(n.category, s + r * p + p / 2, v);
|
|
988
|
-
}), x(t,
|
|
994
|
+
}), x(t, U, W, e, .015), C = requestAnimationFrame(w);
|
|
989
995
|
};
|
|
990
996
|
return w(), () => cancelAnimationFrame(C);
|
|
991
997
|
}, [g]), g.length === 0 ? /* @__PURE__ */ s(I, {
|
|
992
|
-
width:
|
|
993
|
-
height:
|
|
998
|
+
width: U,
|
|
999
|
+
height: W,
|
|
994
1000
|
"data-testid": t
|
|
995
1001
|
}) : /* @__PURE__ */ c("div", {
|
|
996
1002
|
"data-testid": t,
|
|
997
1003
|
style: {
|
|
998
1004
|
position: "relative",
|
|
999
|
-
width:
|
|
1000
|
-
height:
|
|
1005
|
+
width: U,
|
|
1006
|
+
height: W
|
|
1001
1007
|
},
|
|
1002
1008
|
children: [/* @__PURE__ */ s("canvas", {
|
|
1003
1009
|
ref: r,
|
|
1004
1010
|
role: "img",
|
|
1005
1011
|
"aria-label": "Early Warning count by category — breathing dot grid",
|
|
1006
1012
|
style: {
|
|
1007
|
-
width:
|
|
1008
|
-
height:
|
|
1013
|
+
width: U,
|
|
1014
|
+
height: W,
|
|
1009
1015
|
display: "block",
|
|
1010
1016
|
borderRadius: 8
|
|
1011
1017
|
}
|
|
1012
1018
|
}), /* @__PURE__ */ s(C, {
|
|
1013
1019
|
...p,
|
|
1014
|
-
parentW:
|
|
1015
|
-
parentH:
|
|
1020
|
+
parentW: U,
|
|
1021
|
+
parentH: W
|
|
1016
1022
|
})]
|
|
1017
1023
|
});
|
|
1018
1024
|
}
|
|
1019
1025
|
//#endregion
|
|
1020
1026
|
//#region src/components/lineChart/LineChart.tsx
|
|
1021
|
-
function
|
|
1027
|
+
function Re({ rows: e = [], className: t, colors: n }) {
|
|
1022
1028
|
return /* @__PURE__ */ s(ee, {
|
|
1023
1029
|
rows: e,
|
|
1024
1030
|
variant: "line",
|
|
@@ -1028,7 +1034,7 @@ function Ie({ rows: e = [], className: t, colors: n }) {
|
|
|
1028
1034
|
}
|
|
1029
1035
|
//#endregion
|
|
1030
1036
|
//#region src/components/constants.ts
|
|
1031
|
-
var
|
|
1037
|
+
var ze = [
|
|
1032
1038
|
"#4C93D9",
|
|
1033
1039
|
"#5DA537",
|
|
1034
1040
|
"#F3862C",
|
|
@@ -1036,7 +1042,7 @@ var Le = [
|
|
|
1036
1042
|
"#A0B724",
|
|
1037
1043
|
"#EEBF3B",
|
|
1038
1044
|
"#3C45D1"
|
|
1039
|
-
],
|
|
1045
|
+
], Be = {
|
|
1040
1046
|
nodes: [
|
|
1041
1047
|
{
|
|
1042
1048
|
id: "supplier-x",
|
|
@@ -1079,8 +1085,8 @@ var Le = [
|
|
|
1079
1085
|
};
|
|
1080
1086
|
//#endregion
|
|
1081
1087
|
//#region src/components/miniBars/MiniBars.tsx
|
|
1082
|
-
function
|
|
1083
|
-
let r = n?.slices ??
|
|
1088
|
+
function Ve({ rows: e = [], className: t, colors: n }) {
|
|
1089
|
+
let r = n?.slices ?? ze;
|
|
1084
1090
|
return /* @__PURE__ */ s("div", {
|
|
1085
1091
|
className: ["d3-mini-bars", t].filter(Boolean).join(" "),
|
|
1086
1092
|
children: e.map(([e, t, n], i) => /* @__PURE__ */ c("div", {
|
|
@@ -1106,7 +1112,7 @@ function ze({ rows: e = [], className: t, colors: n }) {
|
|
|
1106
1112
|
width: Math.max(0, Math.min(100, t)),
|
|
1107
1113
|
height: "12",
|
|
1108
1114
|
rx: "6",
|
|
1109
|
-
className: `d3-mini-fill tone-${i %
|
|
1115
|
+
className: `d3-mini-fill tone-${i % ze.length}`,
|
|
1110
1116
|
fill: r[i % r.length]
|
|
1111
1117
|
})]
|
|
1112
1118
|
})
|
|
@@ -1117,102 +1123,137 @@ function ze({ rows: e = [], className: t, colors: n }) {
|
|
|
1117
1123
|
});
|
|
1118
1124
|
}
|
|
1119
1125
|
//#endregion
|
|
1126
|
+
//#region src/utils/numberFormat.ts
|
|
1127
|
+
var He = [
|
|
1128
|
+
{
|
|
1129
|
+
value: 0xe8d4a51000,
|
|
1130
|
+
suffix: "T",
|
|
1131
|
+
divisor: 0xe8d4a51000
|
|
1132
|
+
},
|
|
1133
|
+
{
|
|
1134
|
+
value: 1e9,
|
|
1135
|
+
suffix: "B",
|
|
1136
|
+
divisor: 1e9
|
|
1137
|
+
},
|
|
1138
|
+
{
|
|
1139
|
+
value: 1e6,
|
|
1140
|
+
suffix: "M",
|
|
1141
|
+
divisor: 1e6
|
|
1142
|
+
},
|
|
1143
|
+
{
|
|
1144
|
+
value: 1e3,
|
|
1145
|
+
suffix: "K",
|
|
1146
|
+
divisor: 1e3
|
|
1147
|
+
}
|
|
1148
|
+
];
|
|
1149
|
+
function Ue(e, t = 1) {
|
|
1150
|
+
let n = Math.abs(e), r = e < 0 ? "-" : "";
|
|
1151
|
+
for (let e of He) if (n >= e.value) return `${r}${(n / e.divisor).toFixed(t)}${e.suffix}`;
|
|
1152
|
+
return `${r}${n.toFixed(0)}`;
|
|
1153
|
+
}
|
|
1154
|
+
//#endregion
|
|
1120
1155
|
//#region src/components/radialFanTreeChart/RadialFanTreeChart.tsx
|
|
1121
|
-
var
|
|
1122
|
-
function
|
|
1123
|
-
let
|
|
1124
|
-
width:
|
|
1125
|
-
height:
|
|
1156
|
+
var We = 800, Ge = 320, Ke = 60, qe = 28;
|
|
1157
|
+
function Je({ total: e = 0, totalLabel: t, items: r = [], width: o = We, "data-testid": l }) {
|
|
1158
|
+
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(Ge, Ke + Math.max(0, b.length - 1) * qe), [b.length]), { hoveredRef: S, tooltip: E, hitZonesRef: O } = w(m, {
|
|
1159
|
+
width: o,
|
|
1160
|
+
height: x
|
|
1126
1161
|
});
|
|
1127
1162
|
return n(() => {
|
|
1128
|
-
let n =
|
|
1163
|
+
let n = m.current;
|
|
1129
1164
|
if (!n) return;
|
|
1130
|
-
let r = v(n,
|
|
1131
|
-
|
|
1132
|
-
let i =
|
|
1165
|
+
let r = v(n, o, x);
|
|
1166
|
+
_.current = 0;
|
|
1167
|
+
let i = x / 2, a = o - 200, s = Math.max(...b.map((e) => e.count ?? 0), 1), c = b.length > 1 ? (x - 60) / (b.length - 1) : 0, l = b.map((e, t) => ({
|
|
1133
1168
|
x: a,
|
|
1134
|
-
y: 30 + t *
|
|
1135
|
-
})),
|
|
1136
|
-
|
|
1137
|
-
let n =
|
|
1138
|
-
r.clearRect(0, 0,
|
|
1139
|
-
let
|
|
1140
|
-
N(
|
|
1141
|
-
let
|
|
1142
|
-
if (
|
|
1143
|
-
let S = 88 + (a - 88) * .4, C = i, w = 88 + (a - 88) * .6,
|
|
1169
|
+
y: 30 + t * c
|
|
1170
|
+
})), C, w = () => {
|
|
1171
|
+
_.current++;
|
|
1172
|
+
let n = _.current;
|
|
1173
|
+
r.clearRect(0, 0, o, x), r.letterSpacing = f.letterSpacing;
|
|
1174
|
+
let c = D(Math.min(n / 72, 1));
|
|
1175
|
+
if (N(g.current, S.current), O.current = [], y(r, 88, i, 48 * c, u.blue, .15 * c), b.forEach((t, n) => {
|
|
1176
|
+
let o = d[n % d.length], m = M(c, n, b.length, D), _ = l[n], v = g.current.get(t.id) ?? 0, x = Math.max(1.5, (t.count ?? 0) / s * 6);
|
|
1177
|
+
if (m < .01) return;
|
|
1178
|
+
let S = 88 + (a - 88) * .4, C = i, w = 88 + (a - 88) * .6, E = _.y, k = m;
|
|
1144
1179
|
r.beginPath();
|
|
1145
1180
|
for (let e = 0; e <= 40; e++) {
|
|
1146
|
-
let t = e / 40 * k, n = (1 - t) ** 3 * 88 + 3 * (1 - t) ** 2 * t * S + 3 * (1 - t) * t ** 2 * w + t ** 3 *
|
|
1181
|
+
let t = e / 40 * k, n = (1 - t) ** 3 * 88 + 3 * (1 - t) ** 2 * t * S + 3 * (1 - t) * t ** 2 * w + t ** 3 * _.x, a = (1 - t) ** 3 * i + 3 * (1 - t) ** 2 * t * C + 3 * (1 - t) * t ** 2 * E + t ** 3 * _.y;
|
|
1147
1182
|
e === 0 ? r.moveTo(n, a) : r.lineTo(n, a);
|
|
1148
1183
|
}
|
|
1149
|
-
if (r.strokeStyle = h(
|
|
1150
|
-
let n = Math.min(1, (
|
|
1151
|
-
y(r,
|
|
1152
|
-
let a =
|
|
1153
|
-
T(
|
|
1184
|
+
if (r.strokeStyle = h(o, v > 0 ? .8 : .45), r.lineWidth = x * (v > 0 ? 1.3 : 1), r.stroke(), m > .85) {
|
|
1185
|
+
let n = Math.min(1, (m - .85) / .15), i = 4 + (t.count ?? 0) / s * 12;
|
|
1186
|
+
y(r, _.x, _.y, i * 2.5, o, (.25 + v * .2) * n), r.beginPath(), r.arc(_.x, _.y, i * n, 0, Math.PI * 2), r.fillStyle = h(o, (.7 + v * .2) * n), r.fill();
|
|
1187
|
+
let a = Ue(t.count ?? 0);
|
|
1188
|
+
T(O.current, t.id, _.x, _.y, i + 8, {
|
|
1154
1189
|
label: t.name,
|
|
1155
1190
|
value: `${a} NCEs raised`,
|
|
1156
1191
|
sublabel: `${Math.round((t.count ?? 0) / (e || 1) * 100)}% of all NCEs`,
|
|
1157
|
-
color:
|
|
1192
|
+
color: o
|
|
1158
1193
|
}), r.globalAlpha = n, r.font = f.font, r.textAlign = "left";
|
|
1159
|
-
let
|
|
1160
|
-
r.fillStyle =
|
|
1161
|
-
let
|
|
1162
|
-
r.font = p.font, r.fillStyle =
|
|
1194
|
+
let c = t.abbreviation ?? t.name?.slice(0, 6) ?? "", l = ` ${Ue(t.count ?? 0)}`, d = _.x + i + 6, g = _.y + 4;
|
|
1195
|
+
r.fillStyle = v > 0 ? o : h(u.t2, .85), r.fillText(c, d, g);
|
|
1196
|
+
let b = r.measureText(c).width;
|
|
1197
|
+
r.font = p.font, r.fillStyle = v > 0 ? o : u.t1, r.fillText(l, d + b, g), r.globalAlpha = 1;
|
|
1163
1198
|
}
|
|
1164
|
-
}), r.beginPath(), r.arc(88, i, 32 *
|
|
1199
|
+
}), r.beginPath(), r.arc(88, i, 32 * c, 0, Math.PI * 2), r.fillStyle = u.bgL, r.fill(), r.strokeStyle = h(u.blue, .6 * c), r.lineWidth = 2, r.stroke(), c > .4) {
|
|
1200
|
+
r.globalAlpha = Math.min(1, (c - .4) / .4), r.font = "500 24px 'Satoshi Variable', 'DM Sans', sans-serif", r.fillStyle = u.t1, r.textAlign = "center";
|
|
1201
|
+
let n = t ?? Ue(e, 0);
|
|
1202
|
+
r.fillText(n, 88, i + 2), r.font = f.font, r.fillStyle = f.color, r.fillText("NCEs", 88, i + 22), r.globalAlpha = 1;
|
|
1203
|
+
}
|
|
1204
|
+
C = requestAnimationFrame(w);
|
|
1165
1205
|
};
|
|
1166
|
-
return
|
|
1206
|
+
return w(), () => cancelAnimationFrame(C);
|
|
1167
1207
|
}, [
|
|
1168
1208
|
e,
|
|
1169
1209
|
t,
|
|
1170
|
-
|
|
1171
|
-
|
|
1172
|
-
|
|
1173
|
-
|
|
1174
|
-
|
|
1175
|
-
|
|
1210
|
+
b,
|
|
1211
|
+
x,
|
|
1212
|
+
o
|
|
1213
|
+
]), b.length === 0 ? /* @__PURE__ */ s(I, {
|
|
1214
|
+
width: o,
|
|
1215
|
+
height: Ge,
|
|
1216
|
+
"data-testid": l
|
|
1176
1217
|
}) : /* @__PURE__ */ c("div", {
|
|
1177
|
-
"data-testid":
|
|
1218
|
+
"data-testid": l,
|
|
1178
1219
|
style: {
|
|
1179
1220
|
position: "relative",
|
|
1180
|
-
width:
|
|
1181
|
-
height:
|
|
1221
|
+
width: o,
|
|
1222
|
+
height: x
|
|
1182
1223
|
},
|
|
1183
1224
|
children: [/* @__PURE__ */ s("canvas", {
|
|
1184
|
-
ref:
|
|
1225
|
+
ref: m,
|
|
1185
1226
|
role: "img",
|
|
1186
1227
|
"aria-label": "NCE fault tree — NCEs per contractor as branching tree",
|
|
1187
1228
|
style: {
|
|
1188
|
-
width:
|
|
1189
|
-
height:
|
|
1229
|
+
width: o,
|
|
1230
|
+
height: x,
|
|
1190
1231
|
display: "block"
|
|
1191
1232
|
}
|
|
1192
1233
|
}), /* @__PURE__ */ s(C, {
|
|
1193
|
-
...
|
|
1194
|
-
parentW:
|
|
1195
|
-
parentH:
|
|
1234
|
+
...E,
|
|
1235
|
+
parentW: o,
|
|
1236
|
+
parentH: x
|
|
1196
1237
|
})]
|
|
1197
1238
|
});
|
|
1198
1239
|
}
|
|
1199
1240
|
//#endregion
|
|
1200
1241
|
//#region src/components/pieChart/PieChart.tsx
|
|
1201
|
-
var
|
|
1202
|
-
function
|
|
1242
|
+
var Ye = 192, Xe = Ye, Ze = Ye + 80;
|
|
1243
|
+
function Qe({ rows: e = [], variant: t, className: r, colors: i }) {
|
|
1203
1244
|
let o = a(null), f = a(/* @__PURE__ */ new Map()), p = a(0), m = i?.slices ?? d, { hoveredRef: g, tooltip: b, hitZonesRef: x } = w(o, {
|
|
1204
|
-
width:
|
|
1205
|
-
height:
|
|
1245
|
+
width: Xe,
|
|
1246
|
+
height: Ze
|
|
1206
1247
|
});
|
|
1207
1248
|
return n(() => {
|
|
1208
1249
|
let n = o.current;
|
|
1209
1250
|
if (!n) return;
|
|
1210
|
-
let r = v(n,
|
|
1251
|
+
let r = v(n, Xe, Ze);
|
|
1211
1252
|
p.current = 0;
|
|
1212
|
-
let i =
|
|
1253
|
+
let i = Xe / 2, a = Ye / 2, s = Ye * .4, c = t === "donut" ? Ye * .21 : 0, l = e.reduce((e, t) => e + (t.pricing ?? 0), 0) || 1, d, b = () => {
|
|
1213
1254
|
p.current++;
|
|
1214
1255
|
let n = p.current;
|
|
1215
|
-
r.clearRect(0, 0,
|
|
1256
|
+
r.clearRect(0, 0, Xe, Ze);
|
|
1216
1257
|
let o = 1 - (1 - Math.min(n / 48, 1)) ** 3;
|
|
1217
1258
|
N(f.current, g.current), x.current = [];
|
|
1218
1259
|
let v = -Math.PI / 2;
|
|
@@ -1226,10 +1267,10 @@ function Je({ rows: e = [], variant: t, className: r, colors: i }) {
|
|
|
1226
1267
|
let O = j(n, .03, 3e-4), k = s + b * 6 + (b > 0 ? O * 2 : 0);
|
|
1227
1268
|
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;
|
|
1228
1269
|
}), t === "donut" && e.length > 0 && y(r, i, a, c * .8, u.blue, .06);
|
|
1229
|
-
let S =
|
|
1270
|
+
let S = Ye + 12;
|
|
1230
1271
|
e.forEach((e, t) => {
|
|
1231
1272
|
let n = m[t % m.length], i = (e.pricing ?? 0) / l, a = f.current.get(e.id ?? `sl-${t}`) ?? 0, o = S + t * 18;
|
|
1232
|
-
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)}%)`,
|
|
1273
|
+
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)}%)`, Xe - 4, o + 3.5);
|
|
1233
1274
|
}), d = requestAnimationFrame(b);
|
|
1234
1275
|
};
|
|
1235
1276
|
return b(), () => cancelAnimationFrame(d);
|
|
@@ -1243,30 +1284,30 @@ function Je({ rows: e = [], variant: t, className: r, colors: i }) {
|
|
|
1243
1284
|
children: /* @__PURE__ */ c("div", {
|
|
1244
1285
|
style: {
|
|
1245
1286
|
position: "relative",
|
|
1246
|
-
width:
|
|
1247
|
-
height:
|
|
1287
|
+
width: Xe,
|
|
1288
|
+
height: Ze
|
|
1248
1289
|
},
|
|
1249
1290
|
children: [/* @__PURE__ */ s("canvas", {
|
|
1250
1291
|
ref: o,
|
|
1251
1292
|
role: "img",
|
|
1252
1293
|
"aria-label": `${t} chart`,
|
|
1253
1294
|
style: {
|
|
1254
|
-
width:
|
|
1255
|
-
height:
|
|
1295
|
+
width: Xe,
|
|
1296
|
+
height: Ze,
|
|
1256
1297
|
display: "block",
|
|
1257
1298
|
borderRadius: 8
|
|
1258
1299
|
}
|
|
1259
1300
|
}), /* @__PURE__ */ s(C, {
|
|
1260
1301
|
...b,
|
|
1261
|
-
parentW:
|
|
1262
|
-
parentH:
|
|
1302
|
+
parentW: Xe,
|
|
1303
|
+
parentH: Ze
|
|
1263
1304
|
})]
|
|
1264
1305
|
})
|
|
1265
1306
|
});
|
|
1266
1307
|
}
|
|
1267
1308
|
//#endregion
|
|
1268
1309
|
//#region src/components/sankey/SankeySvg.tsx
|
|
1269
|
-
function
|
|
1310
|
+
function $e(e, t, n, r) {
|
|
1270
1311
|
let i = new Set(t.map((e) => e.source)), a = new Set(t.map((e) => e.target)), o = /* @__PURE__ */ new Map(), s = [];
|
|
1271
1312
|
for (e.forEach((e) => {
|
|
1272
1313
|
i.has(e.id) && !a.has(e.id) && s.push({
|
|
@@ -1311,8 +1352,8 @@ function Ye(e, t, n, r) {
|
|
|
1311
1352
|
});
|
|
1312
1353
|
}), f;
|
|
1313
1354
|
}
|
|
1314
|
-
function
|
|
1315
|
-
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(() =>
|
|
1355
|
+
function et({ nodes: e, links: t, width: r = 960, height: o = 280, ariaLabel: f, selectedEntity: p, className: m, colors: g }) {
|
|
1356
|
+
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(() => $e(e, t, r, o), [
|
|
1316
1357
|
e,
|
|
1317
1358
|
t,
|
|
1318
1359
|
r,
|
|
@@ -1412,7 +1453,7 @@ function Xe({ nodes: e, links: t, width: r = 960, height: o = 280, ariaLabel: f,
|
|
|
1412
1453
|
}
|
|
1413
1454
|
//#endregion
|
|
1414
1455
|
//#region src/canvas/CausalFlowCanvas.tsx
|
|
1415
|
-
var
|
|
1456
|
+
var tt = [
|
|
1416
1457
|
{
|
|
1417
1458
|
x: .13,
|
|
1418
1459
|
y: .48
|
|
@@ -1445,7 +1486,7 @@ var Ze = [
|
|
|
1445
1486
|
x: .92,
|
|
1446
1487
|
y: .22
|
|
1447
1488
|
}
|
|
1448
|
-
],
|
|
1489
|
+
], nt = [
|
|
1449
1490
|
u.blue,
|
|
1450
1491
|
u.orange,
|
|
1451
1492
|
u.red,
|
|
@@ -1453,7 +1494,7 @@ var Ze = [
|
|
|
1453
1494
|
u.green,
|
|
1454
1495
|
u.amber,
|
|
1455
1496
|
u.t2
|
|
1456
|
-
],
|
|
1497
|
+
], rt = [
|
|
1457
1498
|
26,
|
|
1458
1499
|
24,
|
|
1459
1500
|
24,
|
|
@@ -1463,21 +1504,21 @@ var Ze = [
|
|
|
1463
1504
|
22,
|
|
1464
1505
|
22
|
|
1465
1506
|
];
|
|
1466
|
-
function
|
|
1507
|
+
function it(e, t) {
|
|
1467
1508
|
let n = 1 - t;
|
|
1468
1509
|
return {
|
|
1469
1510
|
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,
|
|
1470
1511
|
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
|
|
1471
1512
|
};
|
|
1472
1513
|
}
|
|
1473
|
-
function
|
|
1514
|
+
function at(e, t) {
|
|
1474
1515
|
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;
|
|
1475
1516
|
return {
|
|
1476
1517
|
x: -i / a,
|
|
1477
1518
|
y: r / a
|
|
1478
1519
|
};
|
|
1479
1520
|
}
|
|
1480
|
-
function
|
|
1521
|
+
function ot(e, t) {
|
|
1481
1522
|
let n = t.x - e.x, r = t.y - e.y;
|
|
1482
1523
|
return {
|
|
1483
1524
|
p0: {
|
|
@@ -1498,7 +1539,7 @@ function nt(e, t) {
|
|
|
1498
1539
|
}
|
|
1499
1540
|
};
|
|
1500
1541
|
}
|
|
1501
|
-
function
|
|
1542
|
+
function st({ nodes: e, links: t, width: r = 960, height: o = 280, selectedEntity: l }) {
|
|
1502
1543
|
let d = a(null), f = a(0), p = a([]), { hoveredRef: m, tooltip: g, hitZonesRef: S } = w(d, {
|
|
1503
1544
|
width: r,
|
|
1504
1545
|
height: o
|
|
@@ -1506,15 +1547,15 @@ function rt({ nodes: e, links: t, width: r = 960, height: o = 280, selectedEntit
|
|
|
1506
1547
|
let t = /* @__PURE__ */ new Map();
|
|
1507
1548
|
return e.forEach((e, n) => t.set(e.id, n)), t;
|
|
1508
1549
|
}, [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) => {
|
|
1509
|
-
let n =
|
|
1550
|
+
let n = tt[t % tt.length];
|
|
1510
1551
|
return {
|
|
1511
1552
|
id: e.id,
|
|
1512
1553
|
label: e.name,
|
|
1513
1554
|
sub: e.valueLabel ?? "",
|
|
1514
1555
|
x: n.x * r,
|
|
1515
1556
|
y: n.y * o,
|
|
1516
|
-
r:
|
|
1517
|
-
color:
|
|
1557
|
+
r: rt[t % rt.length],
|
|
1558
|
+
color: nt[t % nt.length]
|
|
1518
1559
|
};
|
|
1519
1560
|
}), [
|
|
1520
1561
|
e,
|
|
@@ -1536,7 +1577,7 @@ function rt({ nodes: e, links: t, width: r = 960, height: o = 280, selectedEntit
|
|
|
1536
1577
|
if (t.clearRect(0, 0, r, o), S.current = [], b(t, r, o, e, 50, h(u.blue, .05)), M.forEach((e, n) => {
|
|
1537
1578
|
let r = A[e.fromIdx], i = A[e.toIdx];
|
|
1538
1579
|
if (!r || !i) return;
|
|
1539
|
-
let a = !!l && (r.id === l || i.id === l), o = _(r.color, i.color, .5), s = a ? .18 : .05, c = a ? .25 : .1, d =
|
|
1580
|
+
let a = !!l && (r.id === l || i.id === l), o = _(r.color, i.color, .5), s = a ? .18 : .05, c = a ? .25 : .1, d = ot(r, i);
|
|
1540
1581
|
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();
|
|
1541
1582
|
for (let t = 0; t < e.conf * 2.5; t++) Math.random() < .45 && p.current.push({
|
|
1542
1583
|
edgeIdx: n,
|
|
@@ -1545,7 +1586,7 @@ function rt({ nodes: e, links: t, width: r = 960, height: o = 280, selectedEntit
|
|
|
1545
1586
|
off: (Math.random() - .5) * 13,
|
|
1546
1587
|
sz: .7 + Math.random() * 2
|
|
1547
1588
|
});
|
|
1548
|
-
let f =
|
|
1589
|
+
let f = it(d, .5), m = `${Math.round(e.conf * 100)}%`;
|
|
1549
1590
|
t.font = "bold 12px 'JetBrains Mono', monospace", t.textBaseline = "middle";
|
|
1550
1591
|
let g = t.measureText(m).width + 14;
|
|
1551
1592
|
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);
|
|
@@ -1555,7 +1596,7 @@ function rt({ nodes: e, links: t, width: r = 960, height: o = 280, selectedEntit
|
|
|
1555
1596
|
if (!n) return !1;
|
|
1556
1597
|
let r = A[n.fromIdx], i = A[n.toIdx];
|
|
1557
1598
|
if (!r || !i) return !1;
|
|
1558
|
-
let a =
|
|
1599
|
+
let a = ot(r, i), o = it(a, e.t), s = at(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);
|
|
1559
1600
|
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;
|
|
1560
1601
|
}), p.current.length > 350 && (p.current = p.current.slice(-350)), A.forEach((n, r) => {
|
|
1561
1602
|
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);
|
|
@@ -1612,10 +1653,10 @@ function rt({ nodes: e, links: t, width: r = 960, height: o = 280, selectedEntit
|
|
|
1612
1653
|
}
|
|
1613
1654
|
//#endregion
|
|
1614
1655
|
//#region src/components/sankey/ProcessSankey.tsx
|
|
1615
|
-
function
|
|
1616
|
-
return /* @__PURE__ */ s(
|
|
1617
|
-
nodes:
|
|
1618
|
-
links:
|
|
1656
|
+
function ct({ selectedEntity: e, colors: t }) {
|
|
1657
|
+
return /* @__PURE__ */ s(st, {
|
|
1658
|
+
nodes: Be.nodes,
|
|
1659
|
+
links: Be.links,
|
|
1619
1660
|
width: 960,
|
|
1620
1661
|
height: 280,
|
|
1621
1662
|
selectedEntity: e
|
|
@@ -1623,7 +1664,7 @@ function it({ selectedEntity: e, colors: t }) {
|
|
|
1623
1664
|
}
|
|
1624
1665
|
//#endregion
|
|
1625
1666
|
//#region src/components/sankey/RankingSankey.tsx
|
|
1626
|
-
function
|
|
1667
|
+
function lt({ rows: e = [], className: t, colors: n }) {
|
|
1627
1668
|
let { nodes: r, links: a } = i(() => {
|
|
1628
1669
|
let t = e.slice(0, 5);
|
|
1629
1670
|
return {
|
|
@@ -1641,7 +1682,7 @@ function at({ rows: e = [], className: t, colors: n }) {
|
|
|
1641
1682
|
}))
|
|
1642
1683
|
};
|
|
1643
1684
|
}, [e]);
|
|
1644
|
-
return /* @__PURE__ */ s(
|
|
1685
|
+
return /* @__PURE__ */ s(et, {
|
|
1645
1686
|
nodes: r,
|
|
1646
1687
|
links: a,
|
|
1647
1688
|
width: 760,
|
|
@@ -1653,62 +1694,62 @@ function at({ rows: e = [], className: t, colors: n }) {
|
|
|
1653
1694
|
}
|
|
1654
1695
|
//#endregion
|
|
1655
1696
|
//#region src/components/balanceScaleChart/BalanceScaleChart.tsx
|
|
1656
|
-
var
|
|
1657
|
-
function
|
|
1697
|
+
var ut = 500, dt = 320;
|
|
1698
|
+
function ft({ left: e, right: t, "data-testid": r }) {
|
|
1658
1699
|
let i = a(null), o = a(0);
|
|
1659
1700
|
return n(() => {
|
|
1660
1701
|
let n = i.current;
|
|
1661
1702
|
if (!n) return;
|
|
1662
|
-
let r = v(n,
|
|
1703
|
+
let r = v(n, ut, dt);
|
|
1663
1704
|
o.current = 0;
|
|
1664
|
-
let a =
|
|
1705
|
+
let a = ut / 2, s = Math.max(e.value, t.value), c = (e.value - t.value) / s * 14, l, d = () => {
|
|
1665
1706
|
o.current++;
|
|
1666
1707
|
let n = o.current;
|
|
1667
|
-
r.clearRect(0, 0,
|
|
1668
|
-
let i = D(Math.min(n / 80, 1)),
|
|
1669
|
-
r.strokeStyle = h(u.bd, .5 * i), r.lineWidth = 2, r.beginPath(), r.moveTo(a, 100), r.lineTo(a,
|
|
1670
|
-
let
|
|
1671
|
-
x: a - Math.cos(
|
|
1672
|
-
y: 100 + Math.sin(-
|
|
1673
|
-
},
|
|
1674
|
-
x: a + Math.cos(
|
|
1675
|
-
y: 100 + Math.sin(
|
|
1708
|
+
r.clearRect(0, 0, ut, dt), r.letterSpacing = f.letterSpacing;
|
|
1709
|
+
let i = D(Math.min(n / 80, 1)), m = c * A(Math.min(n / 80, 1)) * Math.PI / 180;
|
|
1710
|
+
r.strokeStyle = h(u.bd, .5 * i), r.lineWidth = 2, r.beginPath(), r.moveTo(a, 100), r.lineTo(a, dt - 80), r.stroke(), r.beginPath(), r.arc(a, 100, 5 * i, 0, Math.PI * 2), r.fillStyle = u.t2, r.fill();
|
|
1711
|
+
let g = {
|
|
1712
|
+
x: a - Math.cos(m) * 160,
|
|
1713
|
+
y: 100 + Math.sin(-m) * 160
|
|
1714
|
+
}, _ = {
|
|
1715
|
+
x: a + Math.cos(m) * 160,
|
|
1716
|
+
y: 100 + Math.sin(m) * 160
|
|
1676
1717
|
};
|
|
1677
|
-
r.strokeStyle = h(u.t2, .5 * i), r.lineWidth = 2, r.beginPath(), r.moveTo(
|
|
1678
|
-
let
|
|
1679
|
-
y(r,
|
|
1718
|
+
r.strokeStyle = h(u.t2, .5 * i), r.lineWidth = 2, r.beginPath(), r.moveTo(g.x, g.y), r.lineTo(_.x, _.y), r.stroke();
|
|
1719
|
+
let v = Math.max(20, e.value / s * 100 * i), b = g.y + 18;
|
|
1720
|
+
y(r, g.x, b + v / 2, 90 * .5, u.green, .18 * i), r.fillStyle = h(u.green, .5 * i), r.beginPath(), r.roundRect(g.x - 90 / 2, b, 90, v, [
|
|
1680
1721
|
0,
|
|
1681
1722
|
0,
|
|
1682
1723
|
6,
|
|
1683
1724
|
6
|
|
1684
1725
|
]), r.fill(), r.strokeStyle = h(u.green, .7 * i), r.lineWidth = 1.5, r.stroke(), r.strokeStyle = h(u.t2, .35 * i), r.lineWidth = 1, [-90 / 3, 90 / 3].forEach((e) => {
|
|
1685
|
-
r.beginPath(), r.moveTo(
|
|
1686
|
-
}), i > .5 && (r.globalAlpha = Math.min(1, (i - .5) / .5), r.font = p.font, r.fillStyle = u.green, r.textAlign = "center", r.fillText(e.label,
|
|
1687
|
-
let
|
|
1688
|
-
r.fillStyle = h(u.amber, .3 * i), r.strokeStyle = h(u.amber, .5 * i), r.lineWidth = 1.5, r.beginPath(), r.roundRect(
|
|
1726
|
+
r.beginPath(), r.moveTo(g.x + e, g.y + 4), r.lineTo(g.x + e, b), r.stroke();
|
|
1727
|
+
}), i > .5 && (r.globalAlpha = Math.min(1, (i - .5) / .5), r.font = p.font, r.fillStyle = u.green, r.textAlign = "center", r.fillText(e.label, g.x, b + v + 18), r.font = f.font, r.fillStyle = f.color, r.fillText("Accepted", g.x, b + v + 38), r.fillText(`${e.count} quotations`, g.x, b + v + 58), r.globalAlpha = 1);
|
|
1728
|
+
let x = Math.max(20, t.value / s * 100 * i), S = _.y + 18;
|
|
1729
|
+
r.fillStyle = h(u.amber, .3 * i), r.strokeStyle = h(u.amber, .5 * i), r.lineWidth = 1.5, r.beginPath(), r.roundRect(_.x - 90 / 2, S, 90, x, [
|
|
1689
1730
|
0,
|
|
1690
1731
|
0,
|
|
1691
1732
|
6,
|
|
1692
1733
|
6
|
|
1693
1734
|
]), r.fill(), r.stroke(), r.strokeStyle = h(u.t2, .35 * i), r.lineWidth = 1, [-90 / 3, 90 / 3].forEach((e) => {
|
|
1694
|
-
r.beginPath(), r.moveTo(
|
|
1695
|
-
}), i > .5 && (r.globalAlpha = Math.min(1, (i - .5) / .5), r.font = p.font, r.fillStyle = u.amber, r.textAlign = "center", r.fillText(t.label,
|
|
1735
|
+
r.beginPath(), r.moveTo(_.x + e, _.y + 4), r.lineTo(_.x + e, S), r.stroke();
|
|
1736
|
+
}), i > .5 && (r.globalAlpha = Math.min(1, (i - .5) / .5), r.font = p.font, r.fillStyle = u.amber, r.textAlign = "center", r.fillText(t.label, _.x, S + x + 18), r.font = f.font, r.fillStyle = f.color, r.fillText("Submitted", _.x, S + x + 38), r.fillText(`${t.count} quotations`, _.x, S + x + 58), r.globalAlpha = 1), l = requestAnimationFrame(d);
|
|
1696
1737
|
};
|
|
1697
1738
|
return d(), () => cancelAnimationFrame(l);
|
|
1698
1739
|
}, [e, t]), /* @__PURE__ */ s("div", {
|
|
1699
1740
|
"data-testid": r,
|
|
1700
1741
|
style: {
|
|
1701
1742
|
position: "relative",
|
|
1702
|
-
width:
|
|
1703
|
-
height:
|
|
1743
|
+
width: ut,
|
|
1744
|
+
height: dt
|
|
1704
1745
|
},
|
|
1705
1746
|
children: /* @__PURE__ */ s("canvas", {
|
|
1706
1747
|
ref: i,
|
|
1707
1748
|
role: "img",
|
|
1708
1749
|
"aria-label": "Quotation balance — accepted vs submitted quotation value",
|
|
1709
1750
|
style: {
|
|
1710
|
-
width:
|
|
1711
|
-
height:
|
|
1751
|
+
width: ut,
|
|
1752
|
+
height: dt,
|
|
1712
1753
|
display: "block"
|
|
1713
1754
|
}
|
|
1714
1755
|
})
|
|
@@ -1716,25 +1757,25 @@ function ct({ left: e, right: t, "data-testid": r }) {
|
|
|
1716
1757
|
}
|
|
1717
1758
|
//#endregion
|
|
1718
1759
|
//#region src/components/areaLineChart/AreaLineChart.tsx
|
|
1719
|
-
var
|
|
1720
|
-
function
|
|
1760
|
+
var pt = 680, G = 280;
|
|
1761
|
+
function mt({ points: e = [], "data-testid": t }) {
|
|
1721
1762
|
let r = a(null), o = a(/* @__PURE__ */ new Map()), l = a(0), { hoveredRef: d, tooltip: p, hitZonesRef: m } = w(r, {
|
|
1722
|
-
width:
|
|
1723
|
-
height:
|
|
1763
|
+
width: pt,
|
|
1764
|
+
height: G
|
|
1724
1765
|
}), g = i(() => e.filter((e) => typeof e == "object" && !!e), [e]);
|
|
1725
1766
|
return n(() => {
|
|
1726
1767
|
let e = r.current;
|
|
1727
1768
|
if (!e) return;
|
|
1728
|
-
let t = v(e,
|
|
1769
|
+
let t = v(e, pt, G);
|
|
1729
1770
|
l.current = 0;
|
|
1730
|
-
let n =
|
|
1771
|
+
let n = pt - 54 - 28, i = G - 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) => ({
|
|
1731
1772
|
x: 54 + t * c,
|
|
1732
1773
|
y: 30 + i - e.count / a * i,
|
|
1733
1774
|
point: e
|
|
1734
1775
|
})), _, b = () => {
|
|
1735
1776
|
l.current++;
|
|
1736
1777
|
let e = l.current;
|
|
1737
|
-
t.clearRect(0, 0,
|
|
1778
|
+
t.clearRect(0, 0, pt, G), t.letterSpacing = f.letterSpacing;
|
|
1738
1779
|
let r = D(Math.min(e / 72, 1));
|
|
1739
1780
|
N(o.current, d.current), m.current = [], [
|
|
1740
1781
|
.25,
|
|
@@ -1744,7 +1785,7 @@ function ut({ points: e = [], "data-testid": t }) {
|
|
|
1744
1785
|
].forEach((e) => {
|
|
1745
1786
|
let r = 30 + i - e * i;
|
|
1746
1787
|
t.strokeStyle = h(u.bd, .18), t.lineWidth = 1, t.setLineDash([3, 5]), t.beginPath(), t.moveTo(54, r), t.lineTo(54 + n, r), t.stroke(), t.setLineDash([]), t.font = f.font, t.fillStyle = f.color, t.textAlign = "right", t.fillText(String(Math.round(a * e)), 48, r + 3);
|
|
1747
|
-
}), t.save(), t.translate(12, 30 + i / 2), t.rotate(-Math.PI / 2), t.font = f.font, t.fillStyle = f.color, t.textAlign = "center", t.fillText("Submissions", 0, 0), t.restore(), t.font = f.font, t.fillStyle = f.color, t.textAlign = "center", t.fillText("Week", 54 + n / 2,
|
|
1788
|
+
}), t.save(), t.translate(12, 30 + i / 2), t.rotate(-Math.PI / 2), t.font = f.font, t.fillStyle = f.color, t.textAlign = "center", t.fillText("Submissions", 0, 0), t.restore(), t.font = f.font, t.fillStyle = f.color, t.textAlign = "center", t.fillText("Week", 54 + n / 2, G - 6), t.strokeStyle = h(u.bd, .3), t.lineWidth = 1, t.setLineDash([]), t.beginPath(), t.moveTo(54, 30 + i), t.lineTo(54 + n, 30 + i), t.stroke();
|
|
1748
1789
|
let c = r * (s - 1), g = Math.floor(c) + 1;
|
|
1749
1790
|
if (g >= 2) {
|
|
1750
1791
|
t.beginPath(), t.moveTo(p[0].x, 30 + i), t.lineTo(p[0].x, p[0].y);
|
|
@@ -1772,13 +1813,13 @@ function ut({ points: e = [], "data-testid": t }) {
|
|
|
1772
1813
|
color: u.blue
|
|
1773
1814
|
}), s > 0 && S(t, e.x, 30, 30 + i, h(u.blue, .15 * s));
|
|
1774
1815
|
let c = e.point.count === a;
|
|
1775
|
-
(s > 0 || c) && y(t, e.x, e.y, 14, u.blue, (c ? .3 : 0) + s * .25), t.beginPath(), t.arc(e.x, e.y, s > 0 ? 5 : 3.5, 0, Math.PI * 2), t.fillStyle = h(u.blue, s > 0 ? 1 : .8), t.fill(), (s > 0 || c) && (t.font = f.font, t.fillStyle = u.blue, t.textAlign = "center", t.fillText(String(e.point.count), e.x, e.y - 10)), t.font = f.font, t.fillStyle = s > 0 ? u.blue : f.color, t.textAlign = "center", t.fillText(e.point.week, e.x,
|
|
1816
|
+
(s > 0 || c) && y(t, e.x, e.y, 14, u.blue, (c ? .3 : 0) + s * .25), t.beginPath(), t.arc(e.x, e.y, s > 0 ? 5 : 3.5, 0, Math.PI * 2), t.fillStyle = h(u.blue, s > 0 ? 1 : .8), t.fill(), (s > 0 || c) && (t.font = f.font, t.fillStyle = u.blue, t.textAlign = "center", t.fillText(String(e.point.count), e.x, e.y - 10)), t.font = f.font, t.fillStyle = s > 0 ? u.blue : f.color, t.textAlign = "center", t.fillText(e.point.week, e.x, G - 54 + 14);
|
|
1776
1817
|
}), _ = requestAnimationFrame(b);
|
|
1777
1818
|
};
|
|
1778
1819
|
return b(), () => cancelAnimationFrame(_);
|
|
1779
1820
|
}, [g]), g.length < 2 ? /* @__PURE__ */ s(I, {
|
|
1780
|
-
width:
|
|
1781
|
-
height:
|
|
1821
|
+
width: pt,
|
|
1822
|
+
height: G,
|
|
1782
1823
|
"data-testid": t
|
|
1783
1824
|
}) : /* @__PURE__ */ s("div", {
|
|
1784
1825
|
"data-testid": t,
|
|
@@ -1790,114 +1831,132 @@ function ut({ points: e = [], "data-testid": t }) {
|
|
|
1790
1831
|
children: /* @__PURE__ */ c("div", {
|
|
1791
1832
|
style: {
|
|
1792
1833
|
position: "relative",
|
|
1793
|
-
width:
|
|
1794
|
-
height:
|
|
1834
|
+
width: pt,
|
|
1835
|
+
height: G
|
|
1795
1836
|
},
|
|
1796
1837
|
children: [/* @__PURE__ */ s("canvas", {
|
|
1797
1838
|
ref: r,
|
|
1798
1839
|
role: "img",
|
|
1799
1840
|
"aria-label": "Trend chart — count over time",
|
|
1800
1841
|
style: {
|
|
1801
|
-
width:
|
|
1802
|
-
height:
|
|
1842
|
+
width: pt,
|
|
1843
|
+
height: G,
|
|
1803
1844
|
display: "block"
|
|
1804
1845
|
}
|
|
1805
1846
|
}), /* @__PURE__ */ s(C, {
|
|
1806
1847
|
...p,
|
|
1807
|
-
parentW:
|
|
1808
|
-
parentH:
|
|
1848
|
+
parentW: pt,
|
|
1849
|
+
parentH: G
|
|
1809
1850
|
})]
|
|
1810
1851
|
})
|
|
1811
1852
|
});
|
|
1812
1853
|
}
|
|
1813
1854
|
//#endregion
|
|
1814
1855
|
//#region src/components/trend/Trend.tsx
|
|
1815
|
-
var
|
|
1816
|
-
function
|
|
1856
|
+
var ht = 680, K = 280, gt = 54, _t = 48, vt = 64, yt = f.font, bt = 12, xt = Math.PI * 2, St = 72, Ct = 20, wt = 5e3;
|
|
1857
|
+
function Tt({ points: e = [], "data-testid": t }) {
|
|
1817
1858
|
let r = a(null), o = a(null), l = a(0), d = i(() => e.filter((e) => typeof e == "object" && !!e), [e]), p = i(() => {
|
|
1818
|
-
if (d.length <= 1) return
|
|
1859
|
+
if (d.length <= 1) return vt;
|
|
1819
1860
|
let e = document.createElement("canvas").getContext("2d");
|
|
1820
|
-
if (!e) return
|
|
1821
|
-
e.font =
|
|
1822
|
-
let t = Math.max(1, Math.ceil(d.length /
|
|
1823
|
-
return Math.max(
|
|
1824
|
-
}, [d]), m = Math.round(p / 2), g =
|
|
1861
|
+
if (!e) return vt;
|
|
1862
|
+
e.font = yt;
|
|
1863
|
+
let t = Math.max(1, Math.ceil(d.length / Ct)), n = Math.max(...d.filter((e, n) => n % t === 0).map((t) => e.measureText(t.week).width));
|
|
1864
|
+
return Math.max(vt, n + bt);
|
|
1865
|
+
}, [d]), m = Math.round(p / 2), g = _t + m + Math.max(0, d.length - 1) * p, _ = Math.max(ht - gt, Math.min(g, wt)), { tooltip: y, hitZonesRef: b } = w(r, {
|
|
1825
1866
|
width: _,
|
|
1826
|
-
height:
|
|
1867
|
+
height: K
|
|
1827
1868
|
});
|
|
1828
1869
|
return n(() => {
|
|
1829
1870
|
let e = r.current;
|
|
1830
1871
|
if (!e) return;
|
|
1831
|
-
let t = v(e, _,
|
|
1872
|
+
let t = v(e, _, K), n = o.current ? v(o.current, gt, K) : null;
|
|
1832
1873
|
l.current = 0;
|
|
1833
|
-
let i = d.length <=
|
|
1834
|
-
x: m + t *
|
|
1835
|
-
y:
|
|
1874
|
+
let i = d.length <= St ? St : Math.max(24, Math.round(St * (St / d.length))), a = _ - _t, s = K - 42 - 54, c = d.map((e) => e.count), 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) => ({
|
|
1875
|
+
x: m + t * C,
|
|
1876
|
+
y: 42 + s - (e.count - g) / x * s,
|
|
1836
1877
|
point: e
|
|
1837
1878
|
}));
|
|
1838
|
-
|
|
1839
|
-
.
|
|
1840
|
-
|
|
1841
|
-
|
|
1842
|
-
|
|
1843
|
-
|
|
1844
|
-
|
|
1845
|
-
|
|
1846
|
-
|
|
1847
|
-
|
|
1848
|
-
|
|
1849
|
-
|
|
1850
|
-
|
|
1851
|
-
|
|
1852
|
-
|
|
1879
|
+
if (n) {
|
|
1880
|
+
n.clearRect(0, 0, gt, K), n.letterSpacing = f.letterSpacing;
|
|
1881
|
+
let e = E ? [
|
|
1882
|
+
g,
|
|
1883
|
+
g + x * .25,
|
|
1884
|
+
g + x * .5,
|
|
1885
|
+
g + x * .75,
|
|
1886
|
+
y
|
|
1887
|
+
] : [
|
|
1888
|
+
0,
|
|
1889
|
+
y * .25,
|
|
1890
|
+
y * .5,
|
|
1891
|
+
y * .75,
|
|
1892
|
+
y
|
|
1893
|
+
];
|
|
1894
|
+
e.forEach((t, r) => {
|
|
1895
|
+
let i = r / (e.length - 1), a = 42 + s - i * s;
|
|
1896
|
+
n.font = f.font, n.fillStyle = f.color, n.textAlign = "right", n.fillText(Ue(t), gt - 6, a + 3);
|
|
1897
|
+
}), 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();
|
|
1898
|
+
}
|
|
1899
|
+
let A = t.createLinearGradient(0, 42, 0, 42 + s);
|
|
1900
|
+
A.addColorStop(0, h(u.blue, .22)), A.addColorStop(1, h(u.blue, .02));
|
|
1901
|
+
let j = 0, M, N = (e) => {
|
|
1902
|
+
t.font = yt, t.fillStyle = f.color, t.textAlign = "center";
|
|
1903
|
+
for (let n = 0; n < e; n++) n % w === 0 && t.fillText(k[n].point.week, k[n].x, K - 54 + 14);
|
|
1904
|
+
}, P = () => {
|
|
1853
1905
|
l.current++;
|
|
1854
1906
|
let e = Math.min(l.current / i, 1), n = D(e), r = e >= 1;
|
|
1855
|
-
t.clearRect(0, 0, _,
|
|
1907
|
+
t.clearRect(0, 0, _, K), t.letterSpacing = f.letterSpacing, (E ? [
|
|
1908
|
+
0,
|
|
1856
1909
|
.25,
|
|
1857
1910
|
.5,
|
|
1858
1911
|
.75,
|
|
1859
1912
|
1
|
|
1860
|
-
]
|
|
1861
|
-
|
|
1913
|
+
] : [
|
|
1914
|
+
.25,
|
|
1915
|
+
.5,
|
|
1916
|
+
.75,
|
|
1917
|
+
1
|
|
1918
|
+
]).forEach((e) => {
|
|
1919
|
+
let n = 42 + s - e * s;
|
|
1862
1920
|
t.strokeStyle = h(u.bd, .18), t.lineWidth = 1, t.setLineDash([3, 5]), t.beginPath(), t.moveTo(0, n), t.lineTo(a, n), t.stroke(), t.setLineDash([]);
|
|
1863
|
-
}), t.font = f.font, t.fillStyle = f.color, t.textAlign = "center", t.fillText("Period", m + (a - m) / 2,
|
|
1864
|
-
let o = n * (
|
|
1921
|
+
}), t.font = f.font, t.fillStyle = f.color, t.textAlign = "center", t.fillText("Period", m + (a - m) / 2, K - 6), t.strokeStyle = h(u.bd, E ? .5 : .3), t.lineWidth = E ? 2 : 1, t.beginPath(), t.moveTo(m, E ? O : 42 + s), t.lineTo(a, E ? O : 42 + s), t.stroke();
|
|
1922
|
+
let o = n * (S - 1), c = Math.floor(o) + 1;
|
|
1865
1923
|
if (c >= 2) {
|
|
1866
|
-
|
|
1924
|
+
let e = E ? O : 42 + s;
|
|
1925
|
+
t.beginPath(), t.moveTo(k[0].x, e), t.lineTo(k[0].x, k[0].y);
|
|
1867
1926
|
for (let e = 1; e < c; e++) {
|
|
1868
|
-
let n = o - Math.floor(o), r = e === c - 1 && e === Math.ceil(o) && n > 0, i = r ?
|
|
1927
|
+
let n = o - Math.floor(o), r = e === c - 1 && e === Math.ceil(o) && n > 0, i = r ? k[e - 1].x + (k[e].x - k[e - 1].x) * n : k[e].x, a = r ? k[e - 1].y + (k[e].y - k[e - 1].y) * n : k[e].y;
|
|
1869
1928
|
t.lineTo(i, a);
|
|
1870
1929
|
}
|
|
1871
|
-
t.lineTo(
|
|
1930
|
+
t.lineTo(k[c - 1].x, e), t.closePath(), t.fillStyle = A, t.fill();
|
|
1872
1931
|
}
|
|
1873
1932
|
t.beginPath();
|
|
1874
1933
|
for (let e = 0; e < c; e++) {
|
|
1875
|
-
let n = o - Math.floor(o), r = e === c - 1 && e > 0 && e === Math.ceil(o) && n > 0, i = r ?
|
|
1934
|
+
let n = o - Math.floor(o), r = e === c - 1 && e > 0 && e === Math.ceil(o) && n > 0, i = r ? k[e - 1].x + (k[e].x - k[e - 1].x) * n : k[e].x, a = r ? k[e - 1].y + (k[e].y - k[e - 1].y) * n : k[e].y;
|
|
1876
1935
|
e === 0 ? t.moveTo(i, a) : t.lineTo(i, a);
|
|
1877
1936
|
}
|
|
1878
1937
|
t.strokeStyle = h(u.blue, .85), t.lineWidth = 2, t.stroke(), t.fillStyle = h(u.blue, .8), t.beginPath();
|
|
1879
|
-
for (let e = 0; e < c; e++) t.moveTo(
|
|
1880
|
-
if (t.fill(), c >
|
|
1938
|
+
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, xt);
|
|
1939
|
+
if (t.fill(), c > j) {
|
|
1881
1940
|
b.current = [];
|
|
1882
|
-
for (let e = 0; e < c; e++) T(b.current, `pt-${e}`,
|
|
1883
|
-
label:
|
|
1884
|
-
value: `${
|
|
1885
|
-
sublabel: `£${
|
|
1941
|
+
for (let e = 0; e < c; e++) T(b.current, `pt-${e}`, k[e].x, k[e].y, 10, {
|
|
1942
|
+
label: k[e].point.week,
|
|
1943
|
+
value: `${k[e].point.count} submissions`,
|
|
1944
|
+
sublabel: `£${k[e].point.value}M value`,
|
|
1886
1945
|
color: u.blue
|
|
1887
1946
|
});
|
|
1888
|
-
|
|
1947
|
+
j = c;
|
|
1889
1948
|
}
|
|
1890
|
-
r &&
|
|
1949
|
+
r && N(S), r || (M = requestAnimationFrame(P));
|
|
1891
1950
|
};
|
|
1892
|
-
return
|
|
1951
|
+
return P(), () => cancelAnimationFrame(M);
|
|
1893
1952
|
}, [
|
|
1894
1953
|
d,
|
|
1895
1954
|
_,
|
|
1896
1955
|
p,
|
|
1897
1956
|
b
|
|
1898
1957
|
]), d.length < 2 ? /* @__PURE__ */ s(I, {
|
|
1899
|
-
width:
|
|
1900
|
-
height:
|
|
1958
|
+
width: ht,
|
|
1959
|
+
height: K,
|
|
1901
1960
|
"data-testid": t
|
|
1902
1961
|
}) : /* @__PURE__ */ c("div", {
|
|
1903
1962
|
"data-testid": t,
|
|
@@ -1910,8 +1969,8 @@ function xt({ points: e = [], "data-testid": t }) {
|
|
|
1910
1969
|
ref: o,
|
|
1911
1970
|
"aria-hidden": "true",
|
|
1912
1971
|
style: {
|
|
1913
|
-
width:
|
|
1914
|
-
height:
|
|
1972
|
+
width: gt,
|
|
1973
|
+
height: K,
|
|
1915
1974
|
display: "block",
|
|
1916
1975
|
flexShrink: 0
|
|
1917
1976
|
}
|
|
@@ -1925,7 +1984,7 @@ function xt({ points: e = [], "data-testid": t }) {
|
|
|
1925
1984
|
style: {
|
|
1926
1985
|
position: "relative",
|
|
1927
1986
|
width: _,
|
|
1928
|
-
height:
|
|
1987
|
+
height: K
|
|
1929
1988
|
},
|
|
1930
1989
|
children: [/* @__PURE__ */ s("canvas", {
|
|
1931
1990
|
ref: r,
|
|
@@ -1933,13 +1992,13 @@ function xt({ points: e = [], "data-testid": t }) {
|
|
|
1933
1992
|
"aria-label": "Trend chart — count over time",
|
|
1934
1993
|
style: {
|
|
1935
1994
|
width: _,
|
|
1936
|
-
height:
|
|
1995
|
+
height: K,
|
|
1937
1996
|
display: "block"
|
|
1938
1997
|
}
|
|
1939
1998
|
}), /* @__PURE__ */ s(C, {
|
|
1940
1999
|
...y,
|
|
1941
2000
|
parentW: _,
|
|
1942
|
-
parentH:
|
|
2001
|
+
parentH: K
|
|
1943
2002
|
})]
|
|
1944
2003
|
})
|
|
1945
2004
|
})]
|
|
@@ -1947,38 +2006,38 @@ function xt({ points: e = [], "data-testid": t }) {
|
|
|
1947
2006
|
}
|
|
1948
2007
|
//#endregion
|
|
1949
2008
|
//#region src/components/proportionalBandChart/ProportionalBandChart.tsx
|
|
1950
|
-
var
|
|
1951
|
-
function
|
|
2009
|
+
var q = 680, Et = 240;
|
|
2010
|
+
function Dt(e, t, n) {
|
|
1952
2011
|
if (e.measureText(t).width <= n) return t;
|
|
1953
2012
|
let r = t;
|
|
1954
2013
|
for (; r.length > 0 && e.measureText(`${r}…`).width > n;) r = r.slice(0, -1);
|
|
1955
2014
|
return `${r}…`;
|
|
1956
2015
|
}
|
|
1957
|
-
var
|
|
2016
|
+
var Ot = {
|
|
1958
2017
|
Critical: u.red,
|
|
1959
2018
|
High: u.orange,
|
|
1960
2019
|
Medium: u.amber,
|
|
1961
2020
|
Low: u.green
|
|
1962
2021
|
};
|
|
1963
|
-
function
|
|
2022
|
+
function kt({ severities: e = [], "data-testid": t }) {
|
|
1964
2023
|
let r = a(null), o = a(/* @__PURE__ */ new Map()), l = a(0), { hoveredRef: d, tooltip: m, hitZonesRef: g } = w(r, {
|
|
1965
|
-
width:
|
|
1966
|
-
height:
|
|
2024
|
+
width: q,
|
|
2025
|
+
height: Et
|
|
1967
2026
|
}), _ = i(() => e.filter((e) => typeof e == "object" && !!e), [e]);
|
|
1968
2027
|
return n(() => {
|
|
1969
2028
|
let e = r.current;
|
|
1970
2029
|
if (!e) return;
|
|
1971
|
-
let t = v(e,
|
|
2030
|
+
let t = v(e, q, Et);
|
|
1972
2031
|
l.current = 0;
|
|
1973
|
-
let n = _.reduce((e, t) => e + (t.count ?? 0), 0), i =
|
|
2032
|
+
let n = _.reduce((e, t) => e + (t.count ?? 0), 0), i = q - 28 - 28, a = Et - 50 - 52, s = _.map((e) => (e.count ?? 0) / (n || 1) * i), c, m = () => {
|
|
1974
2033
|
l.current++;
|
|
1975
2034
|
let e = l.current;
|
|
1976
|
-
t.clearRect(0, 0,
|
|
2035
|
+
t.clearRect(0, 0, q, Et), t.letterSpacing = f.letterSpacing;
|
|
1977
2036
|
let r = O(Math.min(e / 60, 1));
|
|
1978
|
-
N(o.current, d.current), g.current = [], t.strokeStyle = h(u.bd, .2), t.lineWidth = 1, t.beginPath(), t.rect(28, 50, i, a), t.stroke(), t.strokeStyle = h(u.t2, .15), t.lineWidth = 1, t.setLineDash([4, 4]), t.beginPath(), t.moveTo(
|
|
2037
|
+
N(o.current, d.current), g.current = [], t.strokeStyle = h(u.bd, .2), t.lineWidth = 1, t.beginPath(), t.rect(28, 50, i, a), t.stroke(), t.strokeStyle = h(u.t2, .15), t.lineWidth = 1, t.setLineDash([4, 4]), t.beginPath(), t.moveTo(q / 2, 50), t.lineTo(q / 2, 50 + a), t.stroke(), t.setLineDash([]);
|
|
1979
2038
|
let v = 28;
|
|
1980
2039
|
_.forEach((e, i) => {
|
|
1981
|
-
let c =
|
|
2040
|
+
let c = Ot[e.severity] ?? u.blue, l = s[i], d = o.current.get(e.severity) ?? 0, m = v + l / 2, _ = l * .85, b = l * r, x = _ * r, S = m - x / 2;
|
|
1982
2041
|
if (b > 0 && (d > 0 && y(t, v + b / 2, 50 + a / 2, b * .4, c, .15 * d), t.beginPath(), t.moveTo(S, 50), t.lineTo(S + x, 50), t.lineTo(v + b, 50 + a), t.lineTo(v, 50 + a), t.closePath(), t.fillStyle = h(c, .45 + d * .25), t.fill(), t.strokeStyle = h(c, (.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(c, (.3 + d * .3) * r), t.lineWidth = d > 0 ? 2 : 1, t.beginPath(), t.moveTo(v, 50 + a), t.lineTo(v + b, 50 + a), t.stroke()), E(g.current, e.severity, v, 50, l, a, {
|
|
1983
2042
|
label: e.severity,
|
|
1984
2043
|
value: `${e.count} Early Warnings`,
|
|
@@ -1986,7 +2045,7 @@ function Tt({ severities: e = [], "data-testid": t }) {
|
|
|
1986
2045
|
color: c
|
|
1987
2046
|
}), r > .5) {
|
|
1988
2047
|
let i = Math.min(1, (r - .5) / .5), o = v + l / 2;
|
|
1989
|
-
t.globalAlpha = i, t.font = f.font, t.fillStyle = d > 0 ? c : h(c, .9), t.textAlign = "center", t.fillText(
|
|
2048
|
+
t.globalAlpha = i, t.font = f.font, t.fillStyle = d > 0 ? c : h(c, .9), t.textAlign = "center", t.fillText(Dt(t, e.severity, l - 12), o, 38), t.font = p.font, t.fillStyle = d > 0 ? u.t1 : h(u.t1, .85), t.fillText(String(e.count), o, 50 + a / 2 + 6), t.font = f.font, t.fillStyle = d > 0 ? c : f.color, t.fillText(`${Math.round((e.count ?? 0) / (n || 1) * 100)}%`, o, 50 + a + 18), t.globalAlpha = 1;
|
|
1990
2049
|
}
|
|
1991
2050
|
v += l;
|
|
1992
2051
|
});
|
|
@@ -1995,64 +2054,64 @@ function Tt({ severities: e = [], "data-testid": t }) {
|
|
|
1995
2054
|
};
|
|
1996
2055
|
return m(), () => cancelAnimationFrame(c);
|
|
1997
2056
|
}, [_]), _.length === 0 ? /* @__PURE__ */ s(I, {
|
|
1998
|
-
width:
|
|
1999
|
-
height:
|
|
2057
|
+
width: q,
|
|
2058
|
+
height: Et,
|
|
2000
2059
|
"data-testid": t
|
|
2001
2060
|
}) : /* @__PURE__ */ c("div", {
|
|
2002
2061
|
"data-testid": t,
|
|
2003
2062
|
style: {
|
|
2004
2063
|
position: "relative",
|
|
2005
|
-
width:
|
|
2006
|
-
height:
|
|
2064
|
+
width: q,
|
|
2065
|
+
height: Et
|
|
2007
2066
|
},
|
|
2008
2067
|
children: [/* @__PURE__ */ s("canvas", {
|
|
2009
2068
|
ref: r,
|
|
2010
2069
|
role: "img",
|
|
2011
2070
|
"aria-label": "Early Warning severity distribution — prism spectrum bands",
|
|
2012
2071
|
style: {
|
|
2013
|
-
width:
|
|
2014
|
-
height:
|
|
2072
|
+
width: q,
|
|
2073
|
+
height: Et,
|
|
2015
2074
|
display: "block"
|
|
2016
2075
|
}
|
|
2017
2076
|
}), /* @__PURE__ */ s(C, {
|
|
2018
2077
|
...m,
|
|
2019
|
-
parentW:
|
|
2020
|
-
parentH:
|
|
2078
|
+
parentW: q,
|
|
2079
|
+
parentH: Et
|
|
2021
2080
|
})]
|
|
2022
2081
|
});
|
|
2023
2082
|
}
|
|
2024
2083
|
//#endregion
|
|
2025
2084
|
//#region src/components/hubAndSpokeRadialChart/HubAndSpokeRadialChart.tsx
|
|
2026
|
-
var
|
|
2085
|
+
var J = 460, Y = 300, At = {
|
|
2027
2086
|
Open: u.red,
|
|
2028
2087
|
Submitted: u.amber,
|
|
2029
2088
|
Closed: u.green
|
|
2030
2089
|
};
|
|
2031
|
-
function
|
|
2090
|
+
function jt({ segments: e = [], title: t, "data-testid": r }) {
|
|
2032
2091
|
let o = a(null), l = a(0), d = a(/* @__PURE__ */ new Map()), { hoveredRef: m, tooltip: g, hitZonesRef: _ } = w(o, {
|
|
2033
|
-
width:
|
|
2034
|
-
height:
|
|
2092
|
+
width: J,
|
|
2093
|
+
height: Y
|
|
2035
2094
|
}), S = i(() => e.filter((e) => typeof e == "object" && !!e), [e]);
|
|
2036
2095
|
return n(() => {
|
|
2037
2096
|
let e = o.current;
|
|
2038
2097
|
if (!e) return;
|
|
2039
|
-
let t = v(e,
|
|
2098
|
+
let t = v(e, J, Y);
|
|
2040
2099
|
l.current = 0;
|
|
2041
|
-
let n =
|
|
2100
|
+
let n = J * .5, r = Y * .54, i = J * .22, a = S.reduce((e, t) => e + (t.count ?? 0), 0), s = Math.max(...S.map((e) => e.count ?? 0), 1), c, g = () => {
|
|
2042
2101
|
l.current++;
|
|
2043
2102
|
let e = l.current;
|
|
2044
|
-
t.clearRect(0, 0,
|
|
2103
|
+
t.clearRect(0, 0, J, Y), t.letterSpacing = f.letterSpacing, _.current = [], d.current.forEach((e, t) => {
|
|
2045
2104
|
let n = t === m.current ? 1 : 0, r = e + (n - e) * .12;
|
|
2046
2105
|
Math.abs(r - n) < .005 ? n === 0 ? d.current.delete(t) : d.current.set(t, 1) : d.current.set(t, r);
|
|
2047
|
-
}), m.current && !d.current.has(m.current) && d.current.set(m.current, 0), b(t,
|
|
2048
|
-
let c = o / 3 * Math.PI * 2 - Math.PI / 2, l = n + Math.cos(c) * i, d = r + Math.sin(c) * i, f =
|
|
2106
|
+
}), m.current && !d.current.has(m.current) && d.current.set(m.current, 0), b(t, J, Y, e, 40, h(u.blue, .04)), S.forEach((a, o) => {
|
|
2107
|
+
let c = o / 3 * Math.PI * 2 - Math.PI / 2, l = n + Math.cos(c) * i, d = r + Math.sin(c) * i, f = At[a.status] ?? u.blue, m = 2 + a.count / s * 8;
|
|
2049
2108
|
t.beginPath(), t.moveTo(n, r), t.lineTo(l, d), t.strokeStyle = h(f, .08), t.lineWidth = m * 2, t.stroke(), t.beginPath(), t.moveTo(n, r), t.lineTo(l, d), t.strokeStyle = h(f, .25), t.lineWidth = 1, t.stroke();
|
|
2050
2109
|
let g = (e * .005 + o * .33) % 1, _ = n + (l - n) * g, v = r + (d - r) * g;
|
|
2051
2110
|
y(t, _, v, 6, f, .4), t.beginPath(), t.arc(_, v, 2, 0, Math.PI * 2), t.fillStyle = h(f, .8), t.fill();
|
|
2052
2111
|
let b = (n + l) / 2, x = (r + d) / 2;
|
|
2053
2112
|
t.font = p.font, t.textAlign = "center", t.textBaseline = "middle", t.fillStyle = h(f, .85), t.fillText(String(a.count), b, x);
|
|
2054
2113
|
}), S.forEach((e, o) => {
|
|
2055
|
-
let c = o / 3 * Math.PI * 2 - Math.PI / 2, l = n + Math.cos(c) * i, p = r + Math.sin(c) * i, m =
|
|
2114
|
+
let c = o / 3 * Math.PI * 2 - Math.PI / 2, l = n + Math.cos(c) * i, p = r + Math.sin(c) * i, m = At[e.status] ?? u.blue, g = 10 + e.count / s * 18, v = d.current.get(e.status) ?? 0;
|
|
2056
2115
|
y(t, l, p, g * 2.5, m, .2 + v * .15);
|
|
2057
2116
|
let b = t.createRadialGradient(l, p - g * .2, 0, l, p, g);
|
|
2058
2117
|
b.addColorStop(0, h(m, .8 + v * .2)), b.addColorStop(1, h(m, .4 + v * .1)), t.beginPath(), t.arc(l, p, g, 0, Math.PI * 2), t.fillStyle = b, t.fill(), t.font = "bold " + f.font, t.textAlign = "center", t.textBaseline = "middle", t.fillStyle = h(u.t1, .9), t.fillText(e.status, l, p), T(_.current, e.status, l, p, g + 6, {
|
|
@@ -2069,41 +2128,41 @@ function Dt({ segments: e = [], title: t, "data-testid": r }) {
|
|
|
2069
2128
|
label: "Total EW Status",
|
|
2070
2129
|
value: `${a} Early Warnings`,
|
|
2071
2130
|
color: u.t2
|
|
2072
|
-
}), x(t,
|
|
2131
|
+
}), x(t, J, Y, e, .015), c = requestAnimationFrame(g);
|
|
2073
2132
|
};
|
|
2074
2133
|
return g(), () => cancelAnimationFrame(c);
|
|
2075
2134
|
}, [S, t]), S.length === 0 ? /* @__PURE__ */ s(I, {
|
|
2076
|
-
width:
|
|
2077
|
-
height:
|
|
2135
|
+
width: J,
|
|
2136
|
+
height: Y,
|
|
2078
2137
|
"data-testid": r
|
|
2079
2138
|
}) : /* @__PURE__ */ c("div", {
|
|
2080
2139
|
"data-testid": r,
|
|
2081
2140
|
style: {
|
|
2082
2141
|
position: "relative",
|
|
2083
|
-
width:
|
|
2084
|
-
height:
|
|
2142
|
+
width: J,
|
|
2143
|
+
height: Y
|
|
2085
2144
|
},
|
|
2086
2145
|
children: [/* @__PURE__ */ s("canvas", {
|
|
2087
2146
|
ref: o,
|
|
2088
2147
|
role: "img",
|
|
2089
2148
|
"aria-label": t ?? "EW status arc visualization",
|
|
2090
2149
|
style: {
|
|
2091
|
-
width:
|
|
2092
|
-
height:
|
|
2150
|
+
width: J,
|
|
2151
|
+
height: Y,
|
|
2093
2152
|
display: "block",
|
|
2094
2153
|
borderRadius: 8
|
|
2095
2154
|
}
|
|
2096
2155
|
}), /* @__PURE__ */ s(C, {
|
|
2097
2156
|
...g,
|
|
2098
|
-
parentW:
|
|
2099
|
-
parentH:
|
|
2157
|
+
parentW: J,
|
|
2158
|
+
parentH: Y
|
|
2100
2159
|
})]
|
|
2101
2160
|
});
|
|
2102
2161
|
}
|
|
2103
2162
|
//#endregion
|
|
2104
2163
|
//#region src/components/trendChart/TrendChart.tsx
|
|
2105
|
-
var
|
|
2106
|
-
function
|
|
2164
|
+
var Mt = 280, X = 96;
|
|
2165
|
+
function Nt({ points: e = [], className: t, colors: r }) {
|
|
2107
2166
|
let o = a(null), d = a(/* @__PURE__ */ new Map()), f = a(0), p = i(() => e.filter(Array.isArray).map(([e, t]) => {
|
|
2108
2167
|
let n = String(t).match(/-?\d+(\.\d+)?/);
|
|
2109
2168
|
return {
|
|
@@ -2111,18 +2170,18 @@ function kt({ points: e = [], className: t, colors: r }) {
|
|
|
2111
2170
|
value: n ? Number(n[0]) : 0
|
|
2112
2171
|
};
|
|
2113
2172
|
}), [e]), { mouseRef: m, hoveredRef: g, tooltip: _, hitZonesRef: b } = w(o, {
|
|
2114
|
-
width:
|
|
2115
|
-
height:
|
|
2173
|
+
width: Mt,
|
|
2174
|
+
height: X
|
|
2116
2175
|
});
|
|
2117
2176
|
return n(() => {
|
|
2118
2177
|
let e = o.current;
|
|
2119
2178
|
if (!e) return;
|
|
2120
|
-
let t = v(e,
|
|
2179
|
+
let t = v(e, Mt, X);
|
|
2121
2180
|
f.current = 0;
|
|
2122
2181
|
let n = r?.line ?? u.blue, i = r?.point ?? u.blue, a = r?.axisLine ?? u.bd, s, c = () => {
|
|
2123
2182
|
f.current++;
|
|
2124
2183
|
let e = f.current;
|
|
2125
|
-
if (t.clearRect(0, 0,
|
|
2184
|
+
if (t.clearRect(0, 0, Mt, X), p.length < 2) {
|
|
2126
2185
|
s = requestAnimationFrame(c);
|
|
2127
2186
|
return;
|
|
2128
2187
|
}
|
|
@@ -2131,9 +2190,9 @@ function kt({ points: e = [], className: t, colors: r }) {
|
|
|
2131
2190
|
right: 12,
|
|
2132
2191
|
top: 16,
|
|
2133
2192
|
bottom: 20
|
|
2134
|
-
}, o =
|
|
2135
|
-
if (N(d.current, g.current), b.current = [], t.strokeStyle = h(a, .3), t.lineWidth = .5, t.setLineDash([]), t.beginPath(), t.moveTo(r.left,
|
|
2136
|
-
t.fillText(e.label.replace("Day ", "D"), C(n),
|
|
2193
|
+
}, o = Mt - r.left - r.right, l = X - 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));
|
|
2194
|
+
if (N(d.current, g.current), b.current = [], t.strokeStyle = h(a, .3), t.lineWidth = .5, t.setLineDash([]), t.beginPath(), t.moveTo(r.left, X - r.bottom), t.lineTo(Mt - r.right, X - r.bottom), t.stroke(), t.font = "9px 'JetBrains Mono', monospace", t.fillStyle = h(u.t4, .9), t.textAlign = "center", p.forEach((e, n) => {
|
|
2195
|
+
t.fillText(e.label.replace("Day ", "D"), C(n), X - 4);
|
|
2137
2196
|
}), m.current.over && g.current) {
|
|
2138
2197
|
let e = parseInt(g.current.split("-")[1]);
|
|
2139
2198
|
isNaN(e) || S(t, C(e), r.top, r.top + l);
|
|
@@ -2169,44 +2228,50 @@ function kt({ points: e = [], className: t, colors: r }) {
|
|
|
2169
2228
|
children: /* @__PURE__ */ c("div", {
|
|
2170
2229
|
style: {
|
|
2171
2230
|
position: "relative",
|
|
2172
|
-
width:
|
|
2173
|
-
height:
|
|
2231
|
+
width: Mt,
|
|
2232
|
+
height: X
|
|
2174
2233
|
},
|
|
2175
2234
|
children: [/* @__PURE__ */ s("canvas", {
|
|
2176
2235
|
ref: o,
|
|
2177
2236
|
role: "img",
|
|
2178
2237
|
"aria-label": "trend chart",
|
|
2179
2238
|
style: {
|
|
2180
|
-
width:
|
|
2181
|
-
height:
|
|
2239
|
+
width: Mt,
|
|
2240
|
+
height: X,
|
|
2182
2241
|
display: "block",
|
|
2183
2242
|
borderRadius: 8
|
|
2184
2243
|
}
|
|
2185
2244
|
}), /* @__PURE__ */ s(C, {
|
|
2186
2245
|
..._,
|
|
2187
|
-
parentW:
|
|
2188
|
-
parentH:
|
|
2246
|
+
parentW: Mt,
|
|
2247
|
+
parentH: X
|
|
2189
2248
|
})]
|
|
2190
2249
|
})
|
|
2191
2250
|
});
|
|
2192
2251
|
}
|
|
2193
2252
|
//#endregion
|
|
2194
2253
|
//#region src/components/segmentedSplitBarChart/SegmentedSplitBarChart.tsx
|
|
2195
|
-
|
|
2196
|
-
|
|
2197
|
-
let r =
|
|
2198
|
-
|
|
2254
|
+
function Pt(e, t, n) {
|
|
2255
|
+
if (e.measureText(t).width <= n) return t;
|
|
2256
|
+
let r = t;
|
|
2257
|
+
for (; r.length > 0 && e.measureText(r + "…").width > n;) r = r.slice(0, -1);
|
|
2258
|
+
return r + "…";
|
|
2259
|
+
}
|
|
2260
|
+
var Ft = 680, It = 8, Lt = 26, Rt = 14, zt = 16, Bt = 32;
|
|
2261
|
+
function Vt({ items: e = [], "data-testid": t }) {
|
|
2262
|
+
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, It), [b, g]), S = zt + Bt + x.length * (Lt + Rt) - Rt, { hoveredRef: T, tooltip: D, hitZonesRef: k } = w(r, {
|
|
2263
|
+
width: Ft,
|
|
2199
2264
|
height: S
|
|
2200
2265
|
});
|
|
2201
2266
|
return n(() => {
|
|
2202
2267
|
let e = r.current;
|
|
2203
2268
|
if (!e) return;
|
|
2204
|
-
let t = v(e,
|
|
2269
|
+
let t = v(e, Ft, S);
|
|
2205
2270
|
d.current = 0;
|
|
2206
|
-
let n =
|
|
2271
|
+
let n = zt, i = Bt, a = Lt, o = Rt, s = Ft - 60 - 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 = () => {
|
|
2207
2272
|
d.current++;
|
|
2208
2273
|
let e = d.current;
|
|
2209
|
-
t.clearRect(0, 0,
|
|
2274
|
+
t.clearRect(0, 0, Ft, S);
|
|
2210
2275
|
let n = O(Math.min(e / 60, 1));
|
|
2211
2276
|
N(l.current, T.current), k.current = [], x.forEach((e, r) => {
|
|
2212
2277
|
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;
|
|
@@ -2220,7 +2285,7 @@ function It({ items: e = [], "data-testid": t }) {
|
|
|
2220
2285
|
value: `${e.unimplemented ?? 0} variations`,
|
|
2221
2286
|
sublabel: `${Math.round((e.unimplemented ?? 0) / (m || 1) * 100)}% pending`,
|
|
2222
2287
|
color: u.amber
|
|
2223
|
-
}), t.font = f.font, t.fillStyle = u.t2, t.textAlign = "right", t.fillText(e.abbreviation ?? e.name
|
|
2288
|
+
}), t.font = f.font, t.fillStyle = u.t2, t.textAlign = "right", t.fillText(Pt(t, e.abbreviation ?? e.name ?? "", 44), 52, d + a / 2 + 4), t.fillStyle = h(u.bd, .15), t.beginPath(), t.roundRect(60, d, m / c * s, a, 4), t.fill(), g > 0 && (C > 0 && y(t, 60 + g / 2, d + a / 2, g * .3, u.green, .12 * C), t.fillStyle = h(u.green, .6 + C * .2), t.beginPath(), t.roundRect(60, d, g, a, [
|
|
2224
2289
|
4,
|
|
2225
2290
|
0,
|
|
2226
2291
|
0,
|
|
@@ -2237,16 +2302,16 @@ function It({ items: e = [], "data-testid": t }) {
|
|
|
2237
2302
|
};
|
|
2238
2303
|
return C(), () => cancelAnimationFrame(b);
|
|
2239
2304
|
}, [x, S]), b.length === 0 ? /* @__PURE__ */ s(I, {
|
|
2240
|
-
width:
|
|
2305
|
+
width: Ft,
|
|
2241
2306
|
height: 160,
|
|
2242
2307
|
"data-testid": t
|
|
2243
2308
|
}) : /* @__PURE__ */ c("div", {
|
|
2244
2309
|
"data-testid": t,
|
|
2245
|
-
style: { width:
|
|
2310
|
+
style: { width: Ft },
|
|
2246
2311
|
children: [/* @__PURE__ */ c("div", {
|
|
2247
2312
|
style: {
|
|
2248
2313
|
position: "relative",
|
|
2249
|
-
width:
|
|
2314
|
+
width: Ft,
|
|
2250
2315
|
height: S
|
|
2251
2316
|
},
|
|
2252
2317
|
children: [/* @__PURE__ */ s("canvas", {
|
|
@@ -2254,16 +2319,16 @@ function It({ items: e = [], "data-testid": t }) {
|
|
|
2254
2319
|
role: "img",
|
|
2255
2320
|
"aria-label": "Implemented vs unimplemented variations per contractor — split bar",
|
|
2256
2321
|
style: {
|
|
2257
|
-
width:
|
|
2322
|
+
width: Ft,
|
|
2258
2323
|
height: S,
|
|
2259
2324
|
display: "block"
|
|
2260
2325
|
}
|
|
2261
2326
|
}), /* @__PURE__ */ s(C, {
|
|
2262
2327
|
...D,
|
|
2263
|
-
parentW:
|
|
2328
|
+
parentW: Ft,
|
|
2264
2329
|
parentH: S
|
|
2265
2330
|
})]
|
|
2266
|
-
}), b.length >
|
|
2331
|
+
}), b.length > It && /* @__PURE__ */ s("div", {
|
|
2267
2332
|
style: { marginTop: 8 },
|
|
2268
2333
|
children: /* @__PURE__ */ s(ae, {
|
|
2269
2334
|
expanded: g,
|
|
@@ -2274,18 +2339,18 @@ function It({ items: e = [], "data-testid": t }) {
|
|
|
2274
2339
|
}
|
|
2275
2340
|
//#endregion
|
|
2276
2341
|
//#region src/components/weeklyFlow/WeeklyFlow.tsx
|
|
2277
|
-
var
|
|
2278
|
-
function
|
|
2342
|
+
var Ht = 800, Ut = 360;
|
|
2343
|
+
function Wt({ items: e = [], "data-testid": t }) {
|
|
2279
2344
|
let r = a(null), i = a(/* @__PURE__ */ new Map()), o = a(0), { hoveredRef: l, tooltip: m, hitZonesRef: g } = w(r, {
|
|
2280
|
-
width:
|
|
2281
|
-
height:
|
|
2345
|
+
width: Ht,
|
|
2346
|
+
height: Ut
|
|
2282
2347
|
});
|
|
2283
2348
|
return n(() => {
|
|
2284
2349
|
let t = r.current;
|
|
2285
2350
|
if (!t) return;
|
|
2286
|
-
let n = v(t,
|
|
2351
|
+
let n = v(t, Ht, Ut);
|
|
2287
2352
|
o.current = 0;
|
|
2288
|
-
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 =
|
|
2353
|
+
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 = Ut - 20 - 26, _ = m - 6 * (e.length - 1), b = 20, x = e.map((e, t) => {
|
|
2289
2354
|
let n = Math.max(24, (e.total ?? 0) / (c || 1) * _), r = {
|
|
2290
2355
|
x: 100 - 110 / 2,
|
|
2291
2356
|
y: b,
|
|
@@ -2313,16 +2378,16 @@ function zt({ items: e = [], "data-testid": t }) {
|
|
|
2313
2378
|
}, j, P = () => {
|
|
2314
2379
|
o.current++;
|
|
2315
2380
|
let t = o.current;
|
|
2316
|
-
n.clearRect(0, 0,
|
|
2381
|
+
n.clearRect(0, 0, Ht, Ut), n.letterSpacing = f.letterSpacing;
|
|
2317
2382
|
let r = D(Math.min(t / 80, 1));
|
|
2318
2383
|
if (N(i.current, l.current), g.current = [], e.forEach((t, o) => {
|
|
2319
2384
|
let c = x[o], l = M(r, o, e.length, D), u = i.current.get(t.id) ?? 0;
|
|
2320
2385
|
if (l < .01) return;
|
|
2321
2386
|
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;
|
|
2322
|
-
|
|
2387
|
+
Gt(n, c.x + 110, h, 420 - 110 / 2, y, _ * l, c.color, S), Gt(n, c.x + 110, g, 420 - 110 / 2, b, v * l, c.color, S * .75);
|
|
2323
2388
|
}), r > .3) {
|
|
2324
2389
|
let e = Math.min(1, (r - .3) / .7), t = A.y + a / c * m / 2, i = A.y + m - s / c * m / 2;
|
|
2325
|
-
|
|
2390
|
+
Gt(n, 475, O.cy, 720 - 110 / 2, t, C * e, u.blue, .25 * e), Gt(n, 475, k.cy, 720 - 110 / 2, i, w * e, u.amber, .22 * e);
|
|
2326
2391
|
}
|
|
2327
2392
|
if ([
|
|
2328
2393
|
"Contractors",
|
|
@@ -2334,7 +2399,7 @@ function zt({ items: e = [], "data-testid": t }) {
|
|
|
2334
2399
|
420,
|
|
2335
2400
|
720
|
|
2336
2401
|
][t];
|
|
2337
|
-
n.font = f.font, n.fillStyle = f.color, n.textAlign = "center", n.fillText(e, r,
|
|
2402
|
+
n.font = f.font, n.fillStyle = f.color, n.textAlign = "center", n.fillText(e, r, Ut - 8);
|
|
2338
2403
|
}), e.forEach((t, a) => {
|
|
2339
2404
|
let o = x[a], s = M(r, a, e.length, D), c = i.current.get(t.id) ?? 0;
|
|
2340
2405
|
E(g.current, t.id, o.x, o.y, 110, o.h, {
|
|
@@ -2358,33 +2423,33 @@ function zt({ items: e = [], "data-testid": t }) {
|
|
|
2358
2423
|
"data-testid": t,
|
|
2359
2424
|
style: {
|
|
2360
2425
|
position: "relative",
|
|
2361
|
-
width:
|
|
2362
|
-
height:
|
|
2426
|
+
width: Ht,
|
|
2427
|
+
height: Ut
|
|
2363
2428
|
},
|
|
2364
2429
|
children: [/* @__PURE__ */ s("canvas", {
|
|
2365
2430
|
ref: r,
|
|
2366
2431
|
role: "img",
|
|
2367
2432
|
"aria-label": "Weekly report flow — base value and variations per contractor flowing to total commitment",
|
|
2368
2433
|
style: {
|
|
2369
|
-
width:
|
|
2370
|
-
height:
|
|
2434
|
+
width: Ht,
|
|
2435
|
+
height: Ut,
|
|
2371
2436
|
display: "block"
|
|
2372
2437
|
}
|
|
2373
2438
|
}), /* @__PURE__ */ s(C, {
|
|
2374
2439
|
...m,
|
|
2375
|
-
parentW:
|
|
2376
|
-
parentH:
|
|
2440
|
+
parentW: Ht,
|
|
2441
|
+
parentH: Ut
|
|
2377
2442
|
})]
|
|
2378
2443
|
});
|
|
2379
2444
|
}
|
|
2380
|
-
function
|
|
2445
|
+
function Gt(e, t, n, r, i, a, o, s) {
|
|
2381
2446
|
let c = (t + r) / 2;
|
|
2382
2447
|
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();
|
|
2383
2448
|
}
|
|
2384
2449
|
//#endregion
|
|
2385
2450
|
//#region src/components/visualizationRenderer/VisualizationRenderer.tsx
|
|
2386
|
-
function
|
|
2387
|
-
return e.type === "line" ? /* @__PURE__ */ s(
|
|
2451
|
+
function Kt({ config: e, className: t }) {
|
|
2452
|
+
return e.type === "line" ? /* @__PURE__ */ s(Re, {
|
|
2388
2453
|
rows: e.rows,
|
|
2389
2454
|
className: t
|
|
2390
2455
|
}) : e.type === "area" ? /* @__PURE__ */ s(te, {
|
|
@@ -2393,78 +2458,78 @@ function Vt({ config: e, className: t }) {
|
|
|
2393
2458
|
}) : e.type === "bar" ? /* @__PURE__ */ s(ie, {
|
|
2394
2459
|
rows: e.rows,
|
|
2395
2460
|
className: t
|
|
2396
|
-
}) : e.type === "pie" ? /* @__PURE__ */ s(
|
|
2461
|
+
}) : e.type === "pie" ? /* @__PURE__ */ s(Qe, {
|
|
2397
2462
|
rows: e.rows,
|
|
2398
2463
|
variant: "pie",
|
|
2399
2464
|
className: t
|
|
2400
|
-
}) : e.type === "donut" ? /* @__PURE__ */ s(
|
|
2465
|
+
}) : e.type === "donut" ? /* @__PURE__ */ s(Qe, {
|
|
2401
2466
|
rows: e.rows,
|
|
2402
2467
|
variant: "donut",
|
|
2403
2468
|
className: t
|
|
2404
|
-
}) : e.type === "sankey" ? /* @__PURE__ */ s(
|
|
2469
|
+
}) : e.type === "sankey" ? /* @__PURE__ */ s(lt, {
|
|
2405
2470
|
rows: e.rows,
|
|
2406
2471
|
className: t
|
|
2407
|
-
}) : e.type === "flow" ? /* @__PURE__ */ s(
|
|
2472
|
+
}) : e.type === "flow" ? /* @__PURE__ */ s(ct, {
|
|
2408
2473
|
selectedEntity: e.selectedEntity,
|
|
2409
2474
|
className: t
|
|
2410
|
-
}) : e.type === "trend" ? /* @__PURE__ */ s(
|
|
2475
|
+
}) : e.type === "trend" ? /* @__PURE__ */ s(Nt, {
|
|
2411
2476
|
points: e.points,
|
|
2412
2477
|
className: t
|
|
2413
|
-
}) : e.type === "mini-bars" ? /* @__PURE__ */ s(
|
|
2478
|
+
}) : e.type === "mini-bars" ? /* @__PURE__ */ s(Ve, {
|
|
2414
2479
|
rows: e.rows,
|
|
2415
2480
|
className: t
|
|
2416
|
-
}) : e.type === "stacked-horizontal-bar-chart" ? /* @__PURE__ */ s(
|
|
2481
|
+
}) : e.type === "stacked-horizontal-bar-chart" ? /* @__PURE__ */ s(je, { data: e.data }) : e.type === "multi-metric-constellation-chart" ? /* @__PURE__ */ s(Ce, { items: e.items }) : e.type === "progress-race-chart" ? /* @__PURE__ */ s(fe, { items: e.items }) : e.type === "hub-and-spoke-radial-chart" ? /* @__PURE__ */ s(jt, {
|
|
2417
2482
|
segments: e.segments,
|
|
2418
2483
|
title: e.title
|
|
2419
|
-
}) : e.type === "dot-matrix-chart" ? /* @__PURE__ */ s(
|
|
2484
|
+
}) : e.type === "dot-matrix-chart" ? /* @__PURE__ */ s(Le, { items: e.items }) : e.type === "ranked-card-leaderboard" ? /* @__PURE__ */ s(Ie, { items: e.items }) : e.type === "proportional-band-chart" ? /* @__PURE__ */ s(kt, { severities: e.severities }) : e.type === "radial-fan-tree-chart" ? /* @__PURE__ */ s(Je, {
|
|
2420
2485
|
total: e.total,
|
|
2421
2486
|
totalLabel: e.totalLabel,
|
|
2422
2487
|
items: e.items
|
|
2423
|
-
}) : e.type === "semi-circular-gauge-chart" ? /* @__PURE__ */ s(
|
|
2488
|
+
}) : e.type === "semi-circular-gauge-chart" ? /* @__PURE__ */ s(he, {
|
|
2424
2489
|
value: e.value,
|
|
2425
2490
|
confirmed: e.confirmed,
|
|
2426
2491
|
total: e.total
|
|
2427
|
-
}) : e.type === "segmented-split-bar-chart" ? /* @__PURE__ */ s(
|
|
2492
|
+
}) : e.type === "segmented-split-bar-chart" ? /* @__PURE__ */ s(Vt, { items: e.items }) : e.type === "balance-scale-chart" ? /* @__PURE__ */ s(ft, {
|
|
2428
2493
|
left: e.left,
|
|
2429
2494
|
right: e.right
|
|
2430
|
-
}) : e.type === "area-line-chart" ? /* @__PURE__ */ s(
|
|
2495
|
+
}) : e.type === "area-line-chart" ? /* @__PURE__ */ s(mt, { points: e.points }) : e.type === "trend-view" ? /* @__PURE__ */ s(Tt, { points: e.points }) : e.type === "weekly-flow" ? /* @__PURE__ */ s(Wt, { items: e.items }) : /* @__PURE__ */ s("div", {
|
|
2431
2496
|
className: "viz-empty",
|
|
2432
2497
|
children: "Visualization unavailable"
|
|
2433
2498
|
});
|
|
2434
2499
|
}
|
|
2435
2500
|
//#endregion
|
|
2436
2501
|
//#region src/utils/mounts.tsx
|
|
2437
|
-
var
|
|
2438
|
-
function
|
|
2502
|
+
var qt = [];
|
|
2503
|
+
function Jt(e) {
|
|
2439
2504
|
try {
|
|
2440
2505
|
return JSON.parse(decodeURIComponent(e));
|
|
2441
2506
|
} catch {
|
|
2442
2507
|
return null;
|
|
2443
2508
|
}
|
|
2444
2509
|
}
|
|
2445
|
-
function
|
|
2446
|
-
for (;
|
|
2447
|
-
let e =
|
|
2510
|
+
function Yt() {
|
|
2511
|
+
for (; qt.length;) {
|
|
2512
|
+
let e = qt.pop();
|
|
2448
2513
|
e && e.unmount();
|
|
2449
2514
|
}
|
|
2450
2515
|
}
|
|
2451
|
-
function
|
|
2452
|
-
|
|
2516
|
+
function Xt() {
|
|
2517
|
+
Yt(), document.querySelectorAll("[data-d3-viz]").forEach((t) => {
|
|
2453
2518
|
let n = t.dataset.d3Viz;
|
|
2454
2519
|
if (!n) return;
|
|
2455
|
-
let r =
|
|
2520
|
+
let r = Jt(n);
|
|
2456
2521
|
if (!r) return;
|
|
2457
2522
|
let i = e(t);
|
|
2458
|
-
|
|
2523
|
+
qt.push(i), i.render(/* @__PURE__ */ s(Kt, { config: r }));
|
|
2459
2524
|
});
|
|
2460
2525
|
}
|
|
2461
|
-
function
|
|
2526
|
+
function Zt(e) {
|
|
2462
2527
|
return encodeURIComponent(JSON.stringify(e));
|
|
2463
2528
|
}
|
|
2464
2529
|
//#endregion
|
|
2465
2530
|
//#region src/components/donutChart/DonutChart.tsx
|
|
2466
|
-
function
|
|
2467
|
-
return /* @__PURE__ */ s(
|
|
2531
|
+
function Qt({ rows: e = [], className: t, colors: n }) {
|
|
2532
|
+
return /* @__PURE__ */ s(Qe, {
|
|
2468
2533
|
rows: e,
|
|
2469
2534
|
variant: "donut",
|
|
2470
2535
|
className: t,
|
|
@@ -2473,7 +2538,7 @@ function qt({ rows: e = [], className: t, colors: n }) {
|
|
|
2473
2538
|
}
|
|
2474
2539
|
//#endregion
|
|
2475
2540
|
//#region src/components/keyHighlights/KeyHighlights.tsx
|
|
2476
|
-
var
|
|
2541
|
+
var Z = {
|
|
2477
2542
|
bg: "transparent",
|
|
2478
2543
|
border: "transparent",
|
|
2479
2544
|
t1: u.t1,
|
|
@@ -2483,20 +2548,20 @@ var Q = {
|
|
|
2483
2548
|
red: u.red,
|
|
2484
2549
|
amber: u.amber,
|
|
2485
2550
|
green: u.green
|
|
2486
|
-
},
|
|
2551
|
+
}, Q = "'Satoshi Variable', 'DM Sans', sans-serif", $t = {
|
|
2487
2552
|
color: "#F7F7F7",
|
|
2488
|
-
fontFamily:
|
|
2553
|
+
fontFamily: Q,
|
|
2489
2554
|
fontSize: 24,
|
|
2490
2555
|
fontWeight: 500,
|
|
2491
2556
|
lineHeight: "32px"
|
|
2492
|
-
},
|
|
2557
|
+
}, $ = {
|
|
2493
2558
|
color: "#C2C2C2",
|
|
2494
|
-
fontFamily:
|
|
2559
|
+
fontFamily: Q,
|
|
2495
2560
|
fontSize: 18,
|
|
2496
2561
|
fontWeight: 400,
|
|
2497
2562
|
lineHeight: "20px"
|
|
2498
2563
|
};
|
|
2499
|
-
function
|
|
2564
|
+
function en({ chips: e = [] }) {
|
|
2500
2565
|
return /* @__PURE__ */ s("div", {
|
|
2501
2566
|
style: {
|
|
2502
2567
|
display: "flex",
|
|
@@ -2510,21 +2575,21 @@ function Xt({ chips: e = [] }) {
|
|
|
2510
2575
|
display: "flex",
|
|
2511
2576
|
alignItems: "baseline",
|
|
2512
2577
|
gap: 8,
|
|
2513
|
-
padding: "8px
|
|
2514
|
-
background:
|
|
2515
|
-
border: `1px solid ${
|
|
2578
|
+
padding: "8px 0px",
|
|
2579
|
+
background: Z.bg,
|
|
2580
|
+
border: `1px solid ${Z.border}`,
|
|
2516
2581
|
borderRadius: 5,
|
|
2517
2582
|
boxSizing: "border-box"
|
|
2518
2583
|
},
|
|
2519
2584
|
children: [/* @__PURE__ */ s("span", {
|
|
2520
2585
|
style: {
|
|
2521
|
-
|
|
2522
|
-
color: e.color ??
|
|
2586
|
+
...$t,
|
|
2587
|
+
color: e.color ?? Z.t1
|
|
2523
2588
|
},
|
|
2524
2589
|
children: e.value
|
|
2525
2590
|
}), /* @__PURE__ */ s("span", {
|
|
2526
2591
|
style: {
|
|
2527
|
-
|
|
2592
|
+
...$,
|
|
2528
2593
|
flex: 1
|
|
2529
2594
|
},
|
|
2530
2595
|
children: e.label
|
|
@@ -2532,7 +2597,7 @@ function Xt({ chips: e = [] }) {
|
|
|
2532
2597
|
}, t))
|
|
2533
2598
|
});
|
|
2534
2599
|
}
|
|
2535
|
-
function
|
|
2600
|
+
function tn({ items: e = [] }) {
|
|
2536
2601
|
return /* @__PURE__ */ s("div", {
|
|
2537
2602
|
style: {
|
|
2538
2603
|
display: "flex",
|
|
@@ -2546,27 +2611,27 @@ function Zt({ items: e = [] }) {
|
|
|
2546
2611
|
alignItems: "flex-start",
|
|
2547
2612
|
width: 260,
|
|
2548
2613
|
height: 120,
|
|
2549
|
-
padding:
|
|
2614
|
+
padding: "24px 0",
|
|
2550
2615
|
gap: 8,
|
|
2551
2616
|
flexShrink: 0,
|
|
2552
|
-
border: `1px solid ${
|
|
2553
|
-
background:
|
|
2617
|
+
border: `1px solid ${Z.border}`,
|
|
2618
|
+
background: Z.bg,
|
|
2554
2619
|
boxSizing: "border-box"
|
|
2555
2620
|
},
|
|
2556
2621
|
children: [/* @__PURE__ */ s("div", {
|
|
2557
2622
|
style: {
|
|
2558
|
-
|
|
2559
|
-
color: e.color ??
|
|
2623
|
+
...$t,
|
|
2624
|
+
color: e.color ?? Z.t1
|
|
2560
2625
|
},
|
|
2561
2626
|
children: e.value
|
|
2562
2627
|
}), /* @__PURE__ */ s("div", {
|
|
2563
|
-
style: {
|
|
2628
|
+
style: { ...$ },
|
|
2564
2629
|
children: e.label
|
|
2565
2630
|
})]
|
|
2566
2631
|
}, t))
|
|
2567
2632
|
});
|
|
2568
2633
|
}
|
|
2569
|
-
function
|
|
2634
|
+
function nn({ items: e = [] }) {
|
|
2570
2635
|
return /* @__PURE__ */ s("div", {
|
|
2571
2636
|
style: {
|
|
2572
2637
|
display: "flex",
|
|
@@ -2578,29 +2643,29 @@ function Qt({ items: e = [] }) {
|
|
|
2578
2643
|
display: "flex",
|
|
2579
2644
|
alignItems: "center",
|
|
2580
2645
|
gap: 12,
|
|
2581
|
-
padding: "9px
|
|
2582
|
-
background:
|
|
2583
|
-
border: `1px solid ${
|
|
2646
|
+
padding: "9px 0px",
|
|
2647
|
+
background: Z.bg,
|
|
2648
|
+
border: `1px solid ${Z.border}`
|
|
2584
2649
|
},
|
|
2585
2650
|
children: [
|
|
2586
2651
|
/* @__PURE__ */ s("span", {
|
|
2587
2652
|
style: {
|
|
2588
2653
|
fontSize: 18,
|
|
2589
2654
|
fontWeight: 500,
|
|
2590
|
-
color: e.color ??
|
|
2591
|
-
background: (e.color ??
|
|
2655
|
+
color: e.color ?? Z.t2,
|
|
2656
|
+
background: (e.color ?? Z.t2) + "22",
|
|
2592
2657
|
padding: "2px 8px",
|
|
2593
2658
|
borderRadius: 4,
|
|
2594
|
-
fontFamily:
|
|
2659
|
+
fontFamily: Q,
|
|
2595
2660
|
flexShrink: 0
|
|
2596
2661
|
},
|
|
2597
2662
|
children: e.name
|
|
2598
2663
|
}),
|
|
2599
2664
|
/* @__PURE__ */ s("span", {
|
|
2600
2665
|
style: {
|
|
2601
|
-
|
|
2666
|
+
...$t,
|
|
2602
2667
|
fontSize: 18,
|
|
2603
|
-
color: e.color ??
|
|
2668
|
+
color: e.color ?? Z.t1,
|
|
2604
2669
|
minWidth: 70,
|
|
2605
2670
|
flexShrink: 0
|
|
2606
2671
|
},
|
|
@@ -2608,7 +2673,7 @@ function Qt({ items: e = [] }) {
|
|
|
2608
2673
|
}),
|
|
2609
2674
|
/* @__PURE__ */ s("span", {
|
|
2610
2675
|
style: {
|
|
2611
|
-
|
|
2676
|
+
...$,
|
|
2612
2677
|
flex: 1
|
|
2613
2678
|
},
|
|
2614
2679
|
children: e.kpiLabel
|
|
@@ -2617,7 +2682,7 @@ function Qt({ items: e = [] }) {
|
|
|
2617
2682
|
}, t))
|
|
2618
2683
|
});
|
|
2619
2684
|
}
|
|
2620
|
-
function
|
|
2685
|
+
function rn({ items: e = [] }) {
|
|
2621
2686
|
return /* @__PURE__ */ s("div", {
|
|
2622
2687
|
style: {
|
|
2623
2688
|
display: "flex",
|
|
@@ -2631,31 +2696,31 @@ function $t({ items: e = [] }) {
|
|
|
2631
2696
|
alignItems: "flex-start",
|
|
2632
2697
|
width: 260,
|
|
2633
2698
|
height: 120,
|
|
2634
|
-
padding:
|
|
2699
|
+
padding: "24px 0",
|
|
2635
2700
|
gap: 8,
|
|
2636
2701
|
flexShrink: 0,
|
|
2637
|
-
background:
|
|
2702
|
+
background: Z.bg,
|
|
2638
2703
|
boxSizing: "border-box"
|
|
2639
2704
|
},
|
|
2640
2705
|
children: [/* @__PURE__ */ s("div", {
|
|
2641
2706
|
style: {
|
|
2642
|
-
|
|
2643
|
-
color: e.color ??
|
|
2707
|
+
...$t,
|
|
2708
|
+
color: e.color ?? Z.t1
|
|
2644
2709
|
},
|
|
2645
2710
|
children: e.value
|
|
2646
2711
|
}), /* @__PURE__ */ s("div", {
|
|
2647
|
-
style: {
|
|
2712
|
+
style: { ...$ },
|
|
2648
2713
|
children: e.label
|
|
2649
2714
|
})]
|
|
2650
2715
|
}, t))
|
|
2651
2716
|
});
|
|
2652
2717
|
}
|
|
2653
|
-
var
|
|
2654
|
-
red:
|
|
2655
|
-
amber:
|
|
2656
|
-
green:
|
|
2718
|
+
var an = {
|
|
2719
|
+
red: Z.red,
|
|
2720
|
+
amber: Z.amber,
|
|
2721
|
+
green: Z.green
|
|
2657
2722
|
};
|
|
2658
|
-
function
|
|
2723
|
+
function on({ items: e = [] }) {
|
|
2659
2724
|
return /* @__PURE__ */ s("div", {
|
|
2660
2725
|
style: {
|
|
2661
2726
|
display: "flex",
|
|
@@ -2663,15 +2728,15 @@ function tn({ items: e = [] }) {
|
|
|
2663
2728
|
gap: 5
|
|
2664
2729
|
},
|
|
2665
2730
|
children: e.map((e, t) => {
|
|
2666
|
-
let n =
|
|
2731
|
+
let n = an[e.severity];
|
|
2667
2732
|
return /* @__PURE__ */ c("div", {
|
|
2668
2733
|
style: {
|
|
2669
2734
|
display: "flex",
|
|
2670
2735
|
alignItems: "flex-start",
|
|
2671
2736
|
gap: 10,
|
|
2672
|
-
padding: "10px
|
|
2673
|
-
background:
|
|
2674
|
-
border: `1px solid ${
|
|
2737
|
+
padding: "10px 0px",
|
|
2738
|
+
background: Z.bg,
|
|
2739
|
+
border: `1px solid ${Z.border}`
|
|
2675
2740
|
},
|
|
2676
2741
|
children: [/* @__PURE__ */ s("span", { style: {
|
|
2677
2742
|
width: 7,
|
|
@@ -2681,14 +2746,14 @@ function tn({ items: e = [] }) {
|
|
|
2681
2746
|
flexShrink: 0,
|
|
2682
2747
|
marginTop: 5
|
|
2683
2748
|
} }), /* @__PURE__ */ s("span", {
|
|
2684
|
-
style: {
|
|
2749
|
+
style: { ...$ },
|
|
2685
2750
|
children: e.text
|
|
2686
2751
|
})]
|
|
2687
2752
|
}, t);
|
|
2688
2753
|
})
|
|
2689
2754
|
});
|
|
2690
2755
|
}
|
|
2691
|
-
function
|
|
2756
|
+
function sn({ min: e, max: t, unit: n, dots: r = [], chips: i = [] }) {
|
|
2692
2757
|
let a = t - e;
|
|
2693
2758
|
return /* @__PURE__ */ c("div", { children: [/* @__PURE__ */ c("div", {
|
|
2694
2759
|
style: {
|
|
@@ -2712,8 +2777,8 @@ function nn({ min: e, max: t, unit: n, dots: r = [], chips: i = [] }) {
|
|
|
2712
2777
|
top: 43,
|
|
2713
2778
|
left: 0,
|
|
2714
2779
|
fontSize: 16,
|
|
2715
|
-
color:
|
|
2716
|
-
fontFamily:
|
|
2780
|
+
color: Z.t4,
|
|
2781
|
+
fontFamily: Q
|
|
2717
2782
|
},
|
|
2718
2783
|
children: [e, n]
|
|
2719
2784
|
}),
|
|
@@ -2723,8 +2788,8 @@ function nn({ min: e, max: t, unit: n, dots: r = [], chips: i = [] }) {
|
|
|
2723
2788
|
top: 43,
|
|
2724
2789
|
right: 0,
|
|
2725
2790
|
fontSize: 16,
|
|
2726
|
-
color:
|
|
2727
|
-
fontFamily:
|
|
2791
|
+
color: Z.t4,
|
|
2792
|
+
fontFamily: Q
|
|
2728
2793
|
},
|
|
2729
2794
|
children: [t, n]
|
|
2730
2795
|
}),
|
|
@@ -2747,7 +2812,7 @@ function nn({ min: e, max: t, unit: n, dots: r = [], chips: i = [] }) {
|
|
|
2747
2812
|
style: {
|
|
2748
2813
|
fontSize: 18,
|
|
2749
2814
|
color: o,
|
|
2750
|
-
fontFamily:
|
|
2815
|
+
fontFamily: Q,
|
|
2751
2816
|
whiteSpace: "nowrap"
|
|
2752
2817
|
},
|
|
2753
2818
|
children: t.name
|
|
@@ -2756,7 +2821,7 @@ function nn({ min: e, max: t, unit: n, dots: r = [], chips: i = [] }) {
|
|
|
2756
2821
|
fontSize: 18,
|
|
2757
2822
|
fontWeight: 500,
|
|
2758
2823
|
color: o,
|
|
2759
|
-
fontFamily:
|
|
2824
|
+
fontFamily: Q,
|
|
2760
2825
|
whiteSpace: "nowrap"
|
|
2761
2826
|
},
|
|
2762
2827
|
children: [t.val, n]
|
|
@@ -2779,7 +2844,7 @@ function nn({ min: e, max: t, unit: n, dots: r = [], chips: i = [] }) {
|
|
|
2779
2844
|
style: {
|
|
2780
2845
|
fontSize: 18,
|
|
2781
2846
|
color: o,
|
|
2782
|
-
fontFamily:
|
|
2847
|
+
fontFamily: Q,
|
|
2783
2848
|
whiteSpace: "nowrap"
|
|
2784
2849
|
},
|
|
2785
2850
|
children: t.name
|
|
@@ -2788,7 +2853,7 @@ function nn({ min: e, max: t, unit: n, dots: r = [], chips: i = [] }) {
|
|
|
2788
2853
|
fontSize: 18,
|
|
2789
2854
|
fontWeight: 500,
|
|
2790
2855
|
color: o,
|
|
2791
|
-
fontFamily:
|
|
2856
|
+
fontFamily: Q,
|
|
2792
2857
|
whiteSpace: "nowrap"
|
|
2793
2858
|
},
|
|
2794
2859
|
children: [t.val, n]
|
|
@@ -2798,9 +2863,9 @@ function nn({ min: e, max: t, unit: n, dots: r = [], chips: i = [] }) {
|
|
|
2798
2863
|
}, r);
|
|
2799
2864
|
})
|
|
2800
2865
|
]
|
|
2801
|
-
}), i && i.length > 0 && /* @__PURE__ */ s(
|
|
2866
|
+
}), i && i.length > 0 && /* @__PURE__ */ s(en, { chips: i })] });
|
|
2802
2867
|
}
|
|
2803
|
-
function
|
|
2868
|
+
function cn({ leftPct: e, leftLabel: t, leftValue: n, leftColor: r, rightPct: i, rightLabel: a, rightValue: o, rightColor: l, chips: d }) {
|
|
2804
2869
|
let f = r ?? u.blue, p = l ?? u.blue;
|
|
2805
2870
|
return /* @__PURE__ */ c("div", { children: [
|
|
2806
2871
|
/* @__PURE__ */ c("div", {
|
|
@@ -2826,7 +2891,7 @@ function rn({ leftPct: e, leftLabel: t, leftValue: n, leftColor: r, rightPct: i,
|
|
|
2826
2891
|
fontSize: 18,
|
|
2827
2892
|
fontWeight: 500,
|
|
2828
2893
|
color: f,
|
|
2829
|
-
fontFamily:
|
|
2894
|
+
fontFamily: Q
|
|
2830
2895
|
},
|
|
2831
2896
|
children: n
|
|
2832
2897
|
})
|
|
@@ -2849,7 +2914,7 @@ function rn({ leftPct: e, leftLabel: t, leftValue: n, leftColor: r, rightPct: i,
|
|
|
2849
2914
|
fontSize: 18,
|
|
2850
2915
|
fontWeight: 500,
|
|
2851
2916
|
color: p,
|
|
2852
|
-
fontFamily:
|
|
2917
|
+
fontFamily: Q
|
|
2853
2918
|
},
|
|
2854
2919
|
children: o
|
|
2855
2920
|
})
|
|
@@ -2867,7 +2932,7 @@ function rn({ leftPct: e, leftLabel: t, leftValue: n, leftColor: r, rightPct: i,
|
|
|
2867
2932
|
style: {
|
|
2868
2933
|
fontSize: 18,
|
|
2869
2934
|
color: f,
|
|
2870
|
-
fontFamily:
|
|
2935
|
+
fontFamily: Q
|
|
2871
2936
|
},
|
|
2872
2937
|
children: [
|
|
2873
2938
|
e,
|
|
@@ -2884,7 +2949,7 @@ function rn({ leftPct: e, leftLabel: t, leftValue: n, leftColor: r, rightPct: i,
|
|
|
2884
2949
|
style: {
|
|
2885
2950
|
fontSize: 18,
|
|
2886
2951
|
color: p,
|
|
2887
|
-
fontFamily:
|
|
2952
|
+
fontFamily: Q
|
|
2888
2953
|
},
|
|
2889
2954
|
children: [
|
|
2890
2955
|
i,
|
|
@@ -2894,10 +2959,10 @@ function rn({ leftPct: e, leftLabel: t, leftValue: n, leftColor: r, rightPct: i,
|
|
|
2894
2959
|
})
|
|
2895
2960
|
})]
|
|
2896
2961
|
}),
|
|
2897
|
-
d && d.length > 0 && /* @__PURE__ */ s(
|
|
2962
|
+
d && d.length > 0 && /* @__PURE__ */ s(en, { chips: d })
|
|
2898
2963
|
] });
|
|
2899
2964
|
}
|
|
2900
|
-
function
|
|
2965
|
+
function ln({ pct: e, label: t, color: n, chips: r }) {
|
|
2901
2966
|
let i = n ?? u.blue, a = 2 * Math.PI * 30, o = a * (1 - e / 100);
|
|
2902
2967
|
return /* @__PURE__ */ c("div", {
|
|
2903
2968
|
style: {
|
|
@@ -2947,7 +3012,7 @@ function an({ pct: e, label: t, color: n, chips: r }) {
|
|
|
2947
3012
|
fontSize: 18,
|
|
2948
3013
|
fontWeight: 500,
|
|
2949
3014
|
color: i,
|
|
2950
|
-
fontFamily:
|
|
3015
|
+
fontFamily: Q
|
|
2951
3016
|
},
|
|
2952
3017
|
children: [e, "%"]
|
|
2953
3018
|
})
|
|
@@ -2956,7 +3021,7 @@ function an({ pct: e, label: t, color: n, chips: r }) {
|
|
|
2956
3021
|
style: { flex: 1 },
|
|
2957
3022
|
children: [/* @__PURE__ */ s("div", {
|
|
2958
3023
|
style: {
|
|
2959
|
-
|
|
3024
|
+
...$,
|
|
2960
3025
|
marginBottom: 10
|
|
2961
3026
|
},
|
|
2962
3027
|
children: t
|
|
@@ -2972,18 +3037,18 @@ function an({ pct: e, label: t, color: n, chips: r }) {
|
|
|
2972
3037
|
alignItems: "baseline",
|
|
2973
3038
|
gap: 8,
|
|
2974
3039
|
padding: "7px 10px",
|
|
2975
|
-
background:
|
|
2976
|
-
border: `1px solid ${
|
|
3040
|
+
background: Z.bg,
|
|
3041
|
+
border: `1px solid ${Z.border}`,
|
|
2977
3042
|
borderRadius: 5
|
|
2978
3043
|
},
|
|
2979
3044
|
children: [/* @__PURE__ */ s("span", {
|
|
2980
3045
|
style: {
|
|
2981
|
-
|
|
2982
|
-
color: e.color ??
|
|
3046
|
+
...$t,
|
|
3047
|
+
color: e.color ?? Z.t1
|
|
2983
3048
|
},
|
|
2984
3049
|
children: e.value
|
|
2985
3050
|
}), /* @__PURE__ */ s("span", {
|
|
2986
|
-
style: {
|
|
3051
|
+
style: { ...$ },
|
|
2987
3052
|
children: e.label
|
|
2988
3053
|
})]
|
|
2989
3054
|
}, t))
|
|
@@ -2991,16 +3056,16 @@ function an({ pct: e, label: t, color: n, chips: r }) {
|
|
|
2991
3056
|
})]
|
|
2992
3057
|
});
|
|
2993
3058
|
}
|
|
2994
|
-
var
|
|
3059
|
+
var un = {
|
|
2995
3060
|
green: "#34D39918",
|
|
2996
3061
|
amber: "#FBBF2418",
|
|
2997
3062
|
red: "#F0606018"
|
|
2998
|
-
},
|
|
3063
|
+
}, dn = {
|
|
2999
3064
|
green: "#34D399",
|
|
3000
3065
|
amber: "#FBBF24",
|
|
3001
3066
|
red: "#F06060"
|
|
3002
3067
|
};
|
|
3003
|
-
function
|
|
3068
|
+
function fn({ items: e = [] }) {
|
|
3004
3069
|
return /* @__PURE__ */ s("div", {
|
|
3005
3070
|
style: {
|
|
3006
3071
|
display: "flex",
|
|
@@ -3012,20 +3077,20 @@ function cn({ items: e = [] }) {
|
|
|
3012
3077
|
display: "flex",
|
|
3013
3078
|
alignItems: "center",
|
|
3014
3079
|
gap: 10,
|
|
3015
|
-
padding: "8px
|
|
3016
|
-
background:
|
|
3017
|
-
border: `1px solid ${
|
|
3080
|
+
padding: "8px 0px",
|
|
3081
|
+
background: Z.bg,
|
|
3082
|
+
border: `1px solid ${Z.border}`
|
|
3018
3083
|
},
|
|
3019
3084
|
children: [
|
|
3020
3085
|
/* @__PURE__ */ s("span", {
|
|
3021
3086
|
style: {
|
|
3022
3087
|
fontSize: 18,
|
|
3023
3088
|
fontWeight: 500,
|
|
3024
|
-
color: e.color ??
|
|
3025
|
-
background: (e.color ??
|
|
3089
|
+
color: e.color ?? Z.t2,
|
|
3090
|
+
background: (e.color ?? Z.t2) + "1A",
|
|
3026
3091
|
padding: "2px 7px",
|
|
3027
3092
|
borderRadius: 4,
|
|
3028
|
-
fontFamily:
|
|
3093
|
+
fontFamily: Q,
|
|
3029
3094
|
flexShrink: 0,
|
|
3030
3095
|
minWidth: 62,
|
|
3031
3096
|
textAlign: "center"
|
|
@@ -3043,7 +3108,7 @@ function cn({ items: e = [] }) {
|
|
|
3043
3108
|
children: /* @__PURE__ */ s("div", { style: {
|
|
3044
3109
|
height: "100%",
|
|
3045
3110
|
width: `${e.pct}%`,
|
|
3046
|
-
background: e.color ??
|
|
3111
|
+
background: e.color ?? Z.t2,
|
|
3047
3112
|
borderRadius: 2,
|
|
3048
3113
|
opacity: .75
|
|
3049
3114
|
} })
|
|
@@ -3052,8 +3117,8 @@ function cn({ items: e = [] }) {
|
|
|
3052
3117
|
style: {
|
|
3053
3118
|
fontSize: 18,
|
|
3054
3119
|
fontWeight: 500,
|
|
3055
|
-
color: e.color ??
|
|
3056
|
-
fontFamily:
|
|
3120
|
+
color: e.color ?? Z.t1,
|
|
3121
|
+
fontFamily: Q,
|
|
3057
3122
|
flexShrink: 0,
|
|
3058
3123
|
minWidth: 52,
|
|
3059
3124
|
textAlign: "right"
|
|
@@ -3064,11 +3129,11 @@ function cn({ items: e = [] }) {
|
|
|
3064
3129
|
style: {
|
|
3065
3130
|
fontSize: 18,
|
|
3066
3131
|
fontWeight: 500,
|
|
3067
|
-
color:
|
|
3068
|
-
background:
|
|
3132
|
+
color: dn[e.badgeSeverity],
|
|
3133
|
+
background: un[e.badgeSeverity],
|
|
3069
3134
|
padding: "2px 7px",
|
|
3070
3135
|
borderRadius: 4,
|
|
3071
|
-
fontFamily:
|
|
3136
|
+
fontFamily: Q,
|
|
3072
3137
|
flexShrink: 0,
|
|
3073
3138
|
minWidth: 72,
|
|
3074
3139
|
textAlign: "center"
|
|
@@ -3077,7 +3142,7 @@ function cn({ items: e = [] }) {
|
|
|
3077
3142
|
}),
|
|
3078
3143
|
e.sublabel && /* @__PURE__ */ s("span", {
|
|
3079
3144
|
style: {
|
|
3080
|
-
|
|
3145
|
+
...$,
|
|
3081
3146
|
flexShrink: 0,
|
|
3082
3147
|
minWidth: 80,
|
|
3083
3148
|
textAlign: "right"
|
|
@@ -3088,12 +3153,12 @@ function cn({ items: e = [] }) {
|
|
|
3088
3153
|
}, t))
|
|
3089
3154
|
});
|
|
3090
3155
|
}
|
|
3091
|
-
var
|
|
3092
|
-
red:
|
|
3093
|
-
amber:
|
|
3094
|
-
green:
|
|
3156
|
+
var pn = {
|
|
3157
|
+
red: Z.red,
|
|
3158
|
+
amber: Z.amber,
|
|
3159
|
+
green: Z.green
|
|
3095
3160
|
};
|
|
3096
|
-
function
|
|
3161
|
+
function mn({ items: e = [] }) {
|
|
3097
3162
|
return /* @__PURE__ */ s("div", {
|
|
3098
3163
|
style: {
|
|
3099
3164
|
display: "flex",
|
|
@@ -3101,7 +3166,7 @@ function un({ items: e = [] }) {
|
|
|
3101
3166
|
gap: 5
|
|
3102
3167
|
},
|
|
3103
3168
|
children: e.map((e, t) => {
|
|
3104
|
-
let n =
|
|
3169
|
+
let n = pn[e.severity];
|
|
3105
3170
|
return /* @__PURE__ */ c("div", {
|
|
3106
3171
|
style: {
|
|
3107
3172
|
display: "flex",
|
|
@@ -3123,7 +3188,7 @@ function un({ items: e = [] }) {
|
|
|
3123
3188
|
/* @__PURE__ */ s("span", {
|
|
3124
3189
|
style: {
|
|
3125
3190
|
flex: 1,
|
|
3126
|
-
|
|
3191
|
+
...$
|
|
3127
3192
|
},
|
|
3128
3193
|
children: e.text
|
|
3129
3194
|
}),
|
|
@@ -3135,14 +3200,14 @@ function un({ items: e = [] }) {
|
|
|
3135
3200
|
background: n + "20",
|
|
3136
3201
|
padding: "2px 7px",
|
|
3137
3202
|
borderRadius: 4,
|
|
3138
|
-
fontFamily:
|
|
3203
|
+
fontFamily: Q,
|
|
3139
3204
|
flexShrink: 0
|
|
3140
3205
|
},
|
|
3141
3206
|
children: e.tag
|
|
3142
3207
|
}),
|
|
3143
3208
|
/* @__PURE__ */ s("span", {
|
|
3144
3209
|
style: {
|
|
3145
|
-
|
|
3210
|
+
...$,
|
|
3146
3211
|
flexShrink: 0,
|
|
3147
3212
|
marginTop: 1
|
|
3148
3213
|
},
|
|
@@ -3153,7 +3218,7 @@ function un({ items: e = [] }) {
|
|
|
3153
3218
|
})
|
|
3154
3219
|
});
|
|
3155
3220
|
}
|
|
3156
|
-
function
|
|
3221
|
+
function hn({ columns: e = [], rows: t = [] }) {
|
|
3157
3222
|
return /* @__PURE__ */ c("div", {
|
|
3158
3223
|
style: {
|
|
3159
3224
|
display: "flex",
|
|
@@ -3165,16 +3230,16 @@ function dn({ columns: e = [], rows: t = [] }) {
|
|
|
3165
3230
|
display: "flex",
|
|
3166
3231
|
alignItems: "center",
|
|
3167
3232
|
gap: 10,
|
|
3168
|
-
padding: "0
|
|
3169
|
-
borderBottom: `1px solid ${
|
|
3233
|
+
padding: "0 0px 6px",
|
|
3234
|
+
borderBottom: `1px solid ${Z.border}`
|
|
3170
3235
|
},
|
|
3171
3236
|
children: [/* @__PURE__ */ s("div", { style: { minWidth: 64 } }), e.map((e, t) => /* @__PURE__ */ s("div", {
|
|
3172
3237
|
style: {
|
|
3173
3238
|
flex: 1,
|
|
3174
3239
|
fontSize: 18,
|
|
3175
3240
|
fontWeight: 500,
|
|
3176
|
-
color:
|
|
3177
|
-
fontFamily:
|
|
3241
|
+
color: Z.t2,
|
|
3242
|
+
fontFamily: Q,
|
|
3178
3243
|
textTransform: "uppercase",
|
|
3179
3244
|
letterSpacing: .6
|
|
3180
3245
|
},
|
|
@@ -3185,19 +3250,19 @@ function dn({ columns: e = [], rows: t = [] }) {
|
|
|
3185
3250
|
display: "flex",
|
|
3186
3251
|
alignItems: "center",
|
|
3187
3252
|
gap: 10,
|
|
3188
|
-
padding: "8px
|
|
3189
|
-
background:
|
|
3190
|
-
border: `1px solid ${
|
|
3253
|
+
padding: "8px 0px",
|
|
3254
|
+
background: Z.bg,
|
|
3255
|
+
border: `1px solid ${Z.border}`
|
|
3191
3256
|
},
|
|
3192
3257
|
children: [/* @__PURE__ */ s("span", {
|
|
3193
3258
|
style: {
|
|
3194
3259
|
fontSize: 18,
|
|
3195
3260
|
fontWeight: 600,
|
|
3196
|
-
color:
|
|
3197
|
-
background: (e.color ??
|
|
3261
|
+
color: Z.t2,
|
|
3262
|
+
background: (e.color ?? Z.t4) + "1A",
|
|
3198
3263
|
padding: "2px 8px",
|
|
3199
3264
|
borderRadius: 4,
|
|
3200
|
-
fontFamily:
|
|
3265
|
+
fontFamily: Q,
|
|
3201
3266
|
flexShrink: 0,
|
|
3202
3267
|
minWidth: 64,
|
|
3203
3268
|
textAlign: "center"
|
|
@@ -3208,29 +3273,29 @@ function dn({ columns: e = [], rows: t = [] }) {
|
|
|
3208
3273
|
flex: 1,
|
|
3209
3274
|
fontSize: 18,
|
|
3210
3275
|
fontWeight: 500,
|
|
3211
|
-
color: e.color ??
|
|
3212
|
-
fontFamily:
|
|
3276
|
+
color: e.color ?? Z.t1,
|
|
3277
|
+
fontFamily: Q
|
|
3213
3278
|
},
|
|
3214
3279
|
children: t
|
|
3215
3280
|
}, n))]
|
|
3216
3281
|
}, t))]
|
|
3217
3282
|
});
|
|
3218
3283
|
}
|
|
3219
|
-
function
|
|
3284
|
+
function gn({ block: e }) {
|
|
3220
3285
|
if (!e) return null;
|
|
3221
3286
|
switch (e.type) {
|
|
3222
|
-
case "stats": return /* @__PURE__ */ s(
|
|
3223
|
-
case "ranked": return /* @__PURE__ */ s(
|
|
3224
|
-
case "chips": return /* @__PURE__ */ s(
|
|
3225
|
-
case "badges": return /* @__PURE__ */ s(
|
|
3226
|
-
case "dot-strip": return /* @__PURE__ */ s(
|
|
3287
|
+
case "stats": return /* @__PURE__ */ s(tn, { items: e.items });
|
|
3288
|
+
case "ranked": return /* @__PURE__ */ s(nn, { items: e.items });
|
|
3289
|
+
case "chips": return /* @__PURE__ */ s(rn, { items: e.items });
|
|
3290
|
+
case "badges": return /* @__PURE__ */ s(on, { items: e.items });
|
|
3291
|
+
case "dot-strip": return /* @__PURE__ */ s(sn, {
|
|
3227
3292
|
min: e.min,
|
|
3228
3293
|
max: e.max,
|
|
3229
3294
|
unit: e.unit,
|
|
3230
3295
|
dots: e.dots,
|
|
3231
3296
|
chips: e.chips
|
|
3232
3297
|
});
|
|
3233
|
-
case "proportion": return /* @__PURE__ */ s(
|
|
3298
|
+
case "proportion": return /* @__PURE__ */ s(cn, {
|
|
3234
3299
|
leftPct: e.leftPct,
|
|
3235
3300
|
leftLabel: e.leftLabel,
|
|
3236
3301
|
leftValue: e.leftValue,
|
|
@@ -3241,15 +3306,15 @@ function fn({ block: e }) {
|
|
|
3241
3306
|
rightColor: e.rightColor,
|
|
3242
3307
|
chips: e.chips
|
|
3243
3308
|
});
|
|
3244
|
-
case "ring": return /* @__PURE__ */ s(
|
|
3309
|
+
case "ring": return /* @__PURE__ */ s(ln, {
|
|
3245
3310
|
pct: e.pct,
|
|
3246
3311
|
label: e.label,
|
|
3247
3312
|
color: e.color,
|
|
3248
3313
|
chips: e.chips
|
|
3249
3314
|
});
|
|
3250
|
-
case "scorecard-rows": return /* @__PURE__ */ s(
|
|
3251
|
-
case "flags-list": return /* @__PURE__ */ s(
|
|
3252
|
-
case "comparison-rows": return /* @__PURE__ */ s(
|
|
3315
|
+
case "scorecard-rows": return /* @__PURE__ */ s(fn, { items: e.items });
|
|
3316
|
+
case "flags-list": return /* @__PURE__ */ s(mn, { items: e.items });
|
|
3317
|
+
case "comparison-rows": return /* @__PURE__ */ s(hn, {
|
|
3253
3318
|
columns: e.columns,
|
|
3254
3319
|
rows: e.rows
|
|
3255
3320
|
});
|
|
@@ -3258,14 +3323,14 @@ function fn({ block: e }) {
|
|
|
3258
3323
|
}
|
|
3259
3324
|
//#endregion
|
|
3260
3325
|
//#region src/components/keyHighlights/Takeaway.tsx
|
|
3261
|
-
var
|
|
3326
|
+
var _n = "'Satoshi Variable', 'DM Sans', sans-serif", vn = {
|
|
3262
3327
|
color: "#C2C2C2",
|
|
3263
|
-
fontFamily:
|
|
3328
|
+
fontFamily: _n,
|
|
3264
3329
|
fontSize: 18,
|
|
3265
3330
|
fontWeight: 400,
|
|
3266
3331
|
lineHeight: 1.65
|
|
3267
3332
|
};
|
|
3268
|
-
function
|
|
3333
|
+
function yn({ text: e }) {
|
|
3269
3334
|
return /* @__PURE__ */ c("div", {
|
|
3270
3335
|
style: {
|
|
3271
3336
|
padding: "8px 0px",
|
|
@@ -3278,16 +3343,16 @@ function hn({ text: e }) {
|
|
|
3278
3343
|
fontSize: 18,
|
|
3279
3344
|
fontWeight: 500,
|
|
3280
3345
|
color: u.t1,
|
|
3281
|
-
fontFamily:
|
|
3346
|
+
fontFamily: _n,
|
|
3282
3347
|
lineHeight: 1.65,
|
|
3283
3348
|
marginRight: 8
|
|
3284
3349
|
},
|
|
3285
3350
|
children: "Takeaway"
|
|
3286
3351
|
}), /* @__PURE__ */ s("span", {
|
|
3287
|
-
style: { ...
|
|
3352
|
+
style: { ...vn },
|
|
3288
3353
|
children: e
|
|
3289
3354
|
})]
|
|
3290
3355
|
});
|
|
3291
3356
|
}
|
|
3292
3357
|
//#endregion
|
|
3293
|
-
export { te as AreaChart, ie as BarChart, l as ChartFrame,
|
|
3358
|
+
export { te as AreaChart, ie as BarChart, l as ChartFrame, Qt as DonutChart, gn as KeyHighlights, Re as LineChart, Ve as MiniBars, Qe as PieChart, ct as ProcessSankey, lt as RankingSankey, et as SankeySvg, ee as SeriesChart, yn as Takeaway, Tt as Trend, Nt as TrendChart, Kt as VisualizationRenderer, Yt as cleanupVisualizationMounts, Xt as hydrateVisualizationMounts, Zt as serializeVisualizationConfig };
|